summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2010-10-04 20:57:12 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2010-10-04 20:57:12 +0000
commit2a4307a9d323337b69d7ff320cfc39c32d6ba33b (patch)
tree67eaa7f80e2a44e2d37783a666463bef297bd9f9 /dev-lang
parentAdd myself as co-maintainer and version bump (diff)
downloadhistorical-2a4307a9d323337b69d7ff320cfc39c32d6ba33b.tar.gz
historical-2a4307a9d323337b69d7ff320cfc39c32d6ba33b.tar.bz2
historical-2a4307a9d323337b69d7ff320cfc39c32d6ba33b.zip
Export typechecker internals for haddock (alpha, ia64, ppc64). Allow ghc-ia64 to link very large applications (haddock).
Package-Manager: portage-2.1.8.3/cvs/Linux x86_64
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/ghc/ChangeLog7
-rw-r--r--dev-lang/ghc/Manifest15
-rw-r--r--dev-lang/ghc/files/ghc-6.12.3-ghciless-haddock-3558.patch224
-rw-r--r--dev-lang/ghc/ghc-6.12.3.ebuild10
4 files changed, 242 insertions, 14 deletions
diff --git a/dev-lang/ghc/ChangeLog b/dev-lang/ghc/ChangeLog
index f3464bce7e3a..42770781605f 100644
--- a/dev-lang/ghc/ChangeLog
+++ b/dev-lang/ghc/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for dev-lang/ghc
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ChangeLog,v 1.193 2010/09/26 19:41:09 hwoarang Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ChangeLog,v 1.194 2010/10/04 20:57:12 slyfox Exp $
+
+ 04 Oct 2010; Sergei Trofimovich <slyfox@gentoo.org> ghc-6.12.3.ebuild,
+ +files/ghc-6.12.3-ghciless-haddock-3558.patch:
+ Export typechecker internals for haddock (alpha, ia64, ppc64). Allow
+ ghc-ia64 to link very large applications (haddock).
26 Sep 2010; Markos Chandras <hwoarang@gentoo.org> ghc-6.12.3.ebuild:
Stable on amd64 wrt bug #338652
diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index fd5fc2c33b14..559b16197cc5 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -1,6 +1,3 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
AUX 10ghc 40 RMD160 1c9e367fa4ea2fa2d3a046986b066b157964390a SHA1 33486a4907e8140f4d919813df4ef4e6203d6b20 SHA256 86c80e876343456b1a1407365bfc2a441bf4c6ca23d3549d67bd800abd617e2f
AUX depsort.py 1958 RMD160 4192ad9ed14064a9da42ce1faedcf28996094da3 SHA1 2c900abeb6cfcc4327f0e9418b5abd7761ce5879 SHA256 7406f639d17b8acab6a1db7e398e74379b44950d4821bc36901abd3455d63b3d
AUX ghc-6.10.2-readline.patch 8612 RMD160 cf3c1539a55225439c7f16c698e622c5f6f0cd47 SHA1 82318ea6285fc9dd3ed31a023e0a349a4950473c SHA256 9be6fe23aed177c6dd16fcea4eb9ba39406ee365cb923b33d084dec451005464
@@ -16,6 +13,7 @@ AUX ghc-6.12.2-configure-CHOST-part2.patch 958 RMD160 cab606658d051c3b5f5751df2c
AUX ghc-6.12.3-alpha-use-libffi-for-foreign-import-wrapper.patch 2575 RMD160 53dd2e84868f8b66e4d8741b121177bf8e305924 SHA1 2b25421962df33044d8f0556756563ab7d5b1a9d SHA256 9b9748775ddcafa0171f1594c4f5e0c90269e4fd65837d9167b127238cec3d93
AUX ghc-6.12.3-autoconf-2.66-4252.patch 950 RMD160 63225a84d59c6f71593f67d989a647345f7671b0 SHA1 6890dfc4af8d0e98b269219be9e1a5a484358120 SHA256 259813eeefebfc9656341dd6939ab6e7a3257336001d794042f1e6a57b3b20c4
AUX ghc-6.12.3-configure-CHOST-freebsd.patch 2375 RMD160 6c847baeeeaa6ea75c4cf1c687145ffaaf6153d8 SHA1 cc5128a4f6049b2b61ee5789b6c4d15725bc53e3 SHA256 fd4edb1ff5c1f0f08ffad4bae3b2007af948ecdc9c5c285cc6f2953bca25d3cf
+AUX ghc-6.12.3-ghciless-haddock-3558.patch 7222 RMD160 e2f4347100ce4c1763c3cdc37ce7286d7cbbfefc SHA1 06afb9dd4edde9bdfd0d9a9d4f6cf9fcb1ea5d09 SHA256 79f9d9931d3e9d5c45247814226372901f1db7a593dc97bff63ae42b767f3917
AUX ghc-6.12.3-ia64-fixed-relax.patch 1362 RMD160 81224e6cc74d20b80b93c55eaeda7e2a6a7e3ae0 SHA1 d93beaf3fa9fa37b87f6fc6c7fc85d488ff809c3 SHA256 db632a48cef7fdce8fd24759af33527d489121ce3e67cbbcd235608aa0247a31
AUX ghc-6.12.3-ia64-storage-manager-fix.patch 3035 RMD160 067caf41e1ba60b5215b16eafeaec262904e2e2a SHA1 12a9ef095286f22e9b7107af28bff6916c3700d2 SHA256 9e08ad179c7fdc7de1899f89560ec26215968187956f2853639bbe85650fa2ab
AUX ghc-6.12.3-ia64-use-libffi-for-foreign-import-wrapper.patch 683 RMD160 4361e22211960ef347a49e5d0fa53d6337d2c7a6 SHA1 6caf69a755034794f470c3f1e5f48e7453d4e949 SHA256 82f48006c95fb9d01c8618f7457cd2744d7a1fada8c70d25544eefa23cbfde2b
@@ -95,19 +93,12 @@ DIST ghc-bundled-readline-5.2_p13-x86.tbz2 940742 RMD160 5f9470a99047f004bd0917c
DIST ghc-testsuite-6.4.2.tar.gz 1181389 RMD160 1eea6a19a9fca6b3d56a6f29b69289cb88af8173 SHA1 7ada60fe2abb9208d841787781d522d5a1110dc2 SHA256 1a864243e922c233049585fa3bf4a86a0ca3e7b3ffebf26245eb037f15dd4d12
EBUILD ghc-6.10.4-r1.ebuild 12917 RMD160 4078e1ef50606968e5123345bddd065f2868799f SHA1 9deaa3255b400da5269d52301b1d9129ac37ee82 SHA256 3fc30313521c37fd79042e439103c4443720ff6c713b18d0b186a89f79175487
EBUILD ghc-6.12.1.ebuild 11802 RMD160 f50fd172a32521a4295eb33cc501e6a85a7dc959 SHA1 99fde8eb9bf8370d368df90284b8317fd47188b9 SHA256 100d0e349b29a0d6ea4a2824855aaa1ee19a24b641a514b79055841290b0ee7a
-EBUILD ghc-6.12.3.ebuild 14251 RMD160 6a6652456248fd55ccf8417f5286a44e74588a04 SHA1 1afa16a696b78154b0cab53337acedb248e91227 SHA256 29db83cb2401bb3745d2cec37bc4d17ac70300c4f3545f9ad777134155e199b8
+EBUILD ghc-6.12.3.ebuild 14651 RMD160 3a648ed3e53c112bec2ab89b7bdc14ebb73c5702 SHA1 ee9f8b942df2179f263ba5b778afdbc78fcb7cd5 SHA256 79ceb47c0f6f63b14eb9cb1335b85b9ccc205a65c8375067487d0fbb28bbe199
EBUILD ghc-6.2.2.ebuild 10613 RMD160 32eb80c657fcea0c99e683b313643e063fa67f30 SHA1 e35b8257c2e2d7b8ed9e62835a0b76994f0e91a8 SHA256 570e1f68ec3965ab8aab15ea946e96c6f7be7e037e60a1b9afd26cd479122cca
EBUILD ghc-6.4.2.ebuild 13718 RMD160 9cee26621e31ee8ed3e59cfd27cdf1f0689b054c SHA1 62f98f4ed6f74f770810b27d4772c4947129020e SHA256 b6fe46438045cc54225f20b4f4bdd4f33dfd18c303348e68d27626875de28368
EBUILD ghc-6.6.1.ebuild 12333 RMD160 76cd8b4fe72842cfcd0e2bf20f5c11e788472bd9 SHA1 3e5c4fc62c8fd1e6d12963a852ccea332d4b46a1 SHA256 31e22a90f41f66b127e428788f854e3ac4c08cae3cca2f326e2bb88e670e9de6
EBUILD ghc-6.6.ebuild 10978 RMD160 f67c1aa1d68f5a277d5d6db6004269f576b95d80 SHA1 7c18bc6d59b1c948651fad042a8928af8aa07a81 SHA256 8e3efaf74dd46ca2bcf3a0f5e75700b7ad4e8083795c3604cc247a0fa6e6d8bf
EBUILD ghc-6.8.2-r1.ebuild 9147 RMD160 48d75d1fb56e58c4f87e95c6e1664bdabbb3eba4 SHA1 b8510681b9f2535a87f0cbef3768a771071ea1c5 SHA256 90eef3470c0ae305c0248ce2248333e703039a2c16ce6d567a88f9601b28690d
EBUILD ghc-6.8.2.ebuild 9201 RMD160 0b0685249c09afbb3a03f8c54e458eabf6e0a90f SHA1 9dc6947b948770e710aae71ed2ccb301609b8ffb SHA256 724109ab0e94f8919bb0ea92a96f48be2a10bea5ee339e2b750bf81669e96231
-MISC ChangeLog 35061 RMD160 965fa2904b2fe4c929adc1f371c25c73b2596296 SHA1 2a2bf1cfd68bae3498b0695b11dcd7bc39b7405b SHA256 9582b968922a3ef300630f1079fc31c1933ec85264991945ec79cd2fc1c0f09a
+MISC ChangeLog 35307 RMD160 5ef5b2ead6d811dfd38e0320613ba9988b39573c SHA1 00384967957ececbfe94f7dad62ae380a21def92 SHA256 ec6861c692dc145f157136ea6c8ce4869762717c78891533cd6d0331a865c90d
MISC metadata.xml 442 RMD160 9cfa0af9084477c8a70ecf0ac3fb3093ae0cd602 SHA1 be2833090f093ac1c8fc2f5c6f3f253bdbdd6b96 SHA256 2bacbdfcaea11289949a687626f59f99af8fda9ec495b2c349ce5898d9f0dcd4
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.16 (GNU/Linux)
-
-iEYEARECAAYFAkyfoW8ACgkQ9/cejkQaxBAL6wCfRC183E0MGwq4bE4sxgMnpicB
-TGkAni6BYxlqWXP4OlTUpEoO7Q8BO4hD
-=dgoc
------END PGP SIGNATURE-----
diff --git a/dev-lang/ghc/files/ghc-6.12.3-ghciless-haddock-3558.patch b/dev-lang/ghc/files/ghc-6.12.3-ghciless-haddock-3558.patch
new file mode 100644
index 000000000000..0a25d72b5ad0
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-6.12.3-ghciless-haddock-3558.patch
@@ -0,0 +1,224 @@
+commit c7d5e1322f54b5387767c15788d8372705b8981b
+Author: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Sun Oct 3 22:32:12 2010 +0300
+
+ Sat Jul 31 14:55:06 EEST 2010 Ian Lynagh <igloo@earth.li>
+ * Expose the functions haddock needs even when haddock is disabled; #3558
+---
+ compiler/main/GHC.hs | 13 +++++++++++--
+ compiler/main/InteractiveEval.hs | 9 ---------
+ compiler/typecheck/TcRnDriver.lhs | 24 +++++++++++++++---------
+ 3 files changed, 26 insertions(+), 20 deletions(-)
+
+diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs
+index be7d574..2f25cbe 100644
+--- a/compiler/main/GHC.hs
++++ b/compiler/main/GHC.hs
+@@ -111,13 +111,13 @@ module GHC (
+ showModule,
+ isModuleInterpreted,
+ InteractiveEval.compileExpr, HValue, dynCompileExpr,
+- lookupName,
+ GHC.obtainTermFromId, GHC.obtainTermFromVal, reconstructType,
+ modInfoModBreaks,
+ ModBreaks(..), BreakIndex,
+ BreakInfo(breakInfo_number, breakInfo_module),
+ BreakArray, setBreakOn, setBreakOff, getBreak,
+ #endif
++ lookupName,
+
+ -- * Abstract syntax elements
+
+@@ -243,9 +243,9 @@ import Linker ( HValue )
+ import ByteCodeInstr
+ import BreakArray
+ import InteractiveEval
+-import TcRnDriver
+ #endif
+
++import TcRnDriver
+ import TcIface
+ import TcRnTypes hiding (LIE)
+ import TcRnMonad ( initIfaceCheck )
+@@ -2711,3 +2711,12 @@ obtainTermFromId bound force id =
+ liftIO $ InteractiveEval.obtainTermFromId hsc_env bound force id
+
+ #endif
++
++-- | Returns the 'TyThing' for a 'Name'. The 'Name' may refer to any
++-- entity known to GHC, including 'Name's defined using 'runStmt'.
++lookupName :: GhcMonad m => Name -> m (Maybe TyThing)
++lookupName name = withSession $ \hsc_env -> do
++ mb_tything <- ioMsg $ tcRnLookupName hsc_env name
++ return mb_tything
++ -- XXX: calls panic in some circumstances; is that ok?
++
+diff --git a/compiler/main/InteractiveEval.hs b/compiler/main/InteractiveEval.hs
+index 352fbf0..3339313 100644
+--- a/compiler/main/InteractiveEval.hs
++++ b/compiler/main/InteractiveEval.hs
+@@ -29,7 +29,6 @@ module InteractiveEval (
+ showModule,
+ isModuleInterpreted,
+ compileExpr, dynCompileExpr,
+- lookupName,
+ Term(..), obtainTermFromId, obtainTermFromVal, reconstructType,
+ skolemiseSubst, skolemiseTy
+ #endif
+@@ -922,14 +921,6 @@ parseName str = withSession $ \hsc_env -> do
+ (L _ rdr_name) <- hscParseIdentifier (hsc_dflags hsc_env) str
+ ioMsgMaybe $ tcRnLookupRdrName hsc_env rdr_name
+
+--- | Returns the 'TyThing' for a 'Name'. The 'Name' may refer to any
+--- entity known to GHC, including 'Name's defined using 'runStmt'.
+-lookupName :: GhcMonad m => Name -> m (Maybe TyThing)
+-lookupName name = withSession $ \hsc_env -> do
+- mb_tything <- ioMsg $ tcRnLookupName hsc_env name
+- return mb_tything
+- -- XXX: calls panic in some circumstances; is that ok?
+-
+ -- -----------------------------------------------------------------------------
+ -- Getting the type of an expression
+
+diff --git a/compiler/typecheck/TcRnDriver.lhs b/compiler/typecheck/TcRnDriver.lhs
+index 323a167..342763d 100644
+--- a/compiler/typecheck/TcRnDriver.lhs
++++ b/compiler/typecheck/TcRnDriver.lhs
+@@ -9,10 +9,10 @@ module TcRnDriver (
+ #ifdef GHCI
+ tcRnStmt, tcRnExpr, tcRnType,
+ tcRnLookupRdrName,
+- tcRnLookupName,
+- tcRnGetInfo,
+ getModuleExports,
+ #endif
++ tcRnLookupName,
++ tcRnGetInfo,
+ tcRnModule,
+ tcTopSrcDecls,
+ tcRnExtCore
+@@ -71,6 +71,7 @@ import Outputable
+ import DataCon
+ import Type
+ import Class
++import TcType
+ import Data.List ( sortBy )
+
+ #ifdef GHCI
+@@ -83,7 +84,6 @@ import IfaceEnv
+ import MkId
+ import BasicTypes
+ import TidyPgm ( globaliseAndTidyId )
+-import TcType ( isUnitTy, isTauTy, tyClsNamesOfDFunHead )
+ import TysWiredIn ( unitTy, mkListTy )
+ #endif
+
+@@ -1015,7 +1015,6 @@ get two defns for 'main' in the interface file!
+ %*********************************************************
+
+ \begin{code}
+-#ifdef GHCI
+ setInteractiveContext :: HscEnv -> InteractiveContext -> TcRn a -> TcRn a
+ setInteractiveContext hsc_env icxt thing_inside
+ = let -- Initialise the tcg_inst_env with instances from all home modules.
+@@ -1046,6 +1045,7 @@ setInteractiveContext hsc_env icxt thing_inside
+
+
+ \begin{code}
++#ifdef GHCI
+ tcRnStmt :: HscEnv
+ -> InteractiveContext
+ -> LStmt RdrName
+@@ -1401,6 +1401,7 @@ lookup_rdr_name rdr_name = do {
+
+ return good_names
+ }
++#endif
+
+ tcRnLookupName :: HscEnv -> Name -> IO (Messages, Maybe TyThing)
+ tcRnLookupName hsc_env name
+@@ -1421,8 +1422,8 @@ tcRnLookupName' name = do
+ _ -> panic "tcRnLookupName'"
+
+ tcRnGetInfo :: HscEnv
+- -> Name
+- -> IO (Messages, Maybe (TyThing, Fixity, [Instance]))
++ -> Name
++ -> IO (Messages, Maybe (TyThing, Fixity, [Instance]))
+
+ -- Used to implement :info in GHCi
+ --
+@@ -1432,8 +1433,14 @@ tcRnGetInfo :: HscEnv
+ -- *and* as a type or class constructor;
+ -- hence the call to dataTcOccs, and we return up to two results
+ tcRnGetInfo hsc_env name
+- = initTcPrintErrors hsc_env iNTERACTIVE $
+- let ictxt = hsc_IC hsc_env in
++ = initTcPrintErrors hsc_env iNTERACTIVE $
++ tcRnGetInfo' hsc_env name
++
++tcRnGetInfo' :: HscEnv
++ -> Name
++ -> TcRn (TyThing, Fixity, [Instance])
++tcRnGetInfo' hsc_env name
++ = let ictxt = hsc_IC hsc_env in
+ setInteractiveContext hsc_env ictxt $ do
+
+ -- Load the interface for all unqualified types and classes
+@@ -1482,7 +1489,6 @@ loadUnqualIfaces ictxt
+ isTcOcc (nameOccName name), -- Types and classes only
+ unQualOK gre ] -- In scope unqualified
+ doc = ptext (sLit "Need interface for module whose export(s) are in scope unqualified")
+-#endif /* GHCI */
+ \end{code}
+
+ %************************************************************************
+
+commit 83d056a7e15e3253c446d896707d0b012f9cf8b3
+Author: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Sun Oct 3 22:30:53 2010 +0300
+
+ Sat Jul 31 02:50:01 EEST 2010 Ian Lynagh <igloo@earth.li>
+
+ * Always haddock by default
+ Revert this patch:
+ Matthias Kilian <kili@outback.escape.de>**20090920181319
+ Don't build haddock if HADDOC_DOCS = NO, and disable HADDOC_DOCS
+ if GhcWithInterpreter = NO
+ Haddock uses TcRnDriver.tcRnGetInfo, which is only available if
+ GHCI is built. Set HADDOC_DOCS to NO if GhcWithInterpreter is NO,
+ and disable the haddock build if HADDOC_DOCS = NO.
+---
+ ghc.mk | 2 --
+ mk/config.mk.in | 2 +-
+ 2 files changed, 1 insertions(+), 3 deletions(-)
+
+diff --git a/ghc.mk b/ghc.mk
+index 9193f46..1b5d1f9 100644
+--- a/ghc.mk
++++ b/ghc.mk
+@@ -529,11 +529,9 @@ BUILD_DIRS += \
+ $(GHC_GENAPPLY_DIR)
+ endif
+
+-ifneq "$(HADDOCK_DOCS)" "NO"
+ BUILD_DIRS += \
+ utils/haddock \
+ utils/haddock/doc
+-endif
+
+ ifneq "$(CLEANING)" "YES"
+ BUILD_DIRS += \
+diff --git a/mk/config.mk.in b/mk/config.mk.in
+index 7399de0..55a9f19 100644
+--- a/mk/config.mk.in
++++ b/mk/config.mk.in
+@@ -736,7 +736,7 @@ SRC_ALEX_OPTS = -g
+ HSTAGS = @HstagsCmd@
+
+ # Should we build haddock docs?
+-HADDOCK_DOCS = $(GhcWithInterpreter)
++HADDOCK_DOCS = YES
+ # And HsColour the sources?
+ ifeq "$(HSCOLOUR)" ""
+ HSCOLOUR_SRCS = NO
diff --git a/dev-lang/ghc/ghc-6.12.3.ebuild b/dev-lang/ghc/ghc-6.12.3.ebuild
index c4b7f900b8d0..dc76ae370d5e 100644
--- a/dev-lang/ghc/ghc-6.12.3.ebuild
+++ b/dev-lang/ghc/ghc-6.12.3.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.12.3.ebuild,v 1.14 2010/09/26 19:41:09 hwoarang Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc/ghc-6.12.3.ebuild,v 1.15 2010/10/04 20:57:12 slyfox Exp $
# Brief explanation of the bootstrap logic:
#
@@ -126,6 +126,10 @@ ghc_setup_cflags() {
# prevent from failind building unregisterised ghc:
# http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
use ppc64 && append-ghc-cflags compile -mminimal-toc
+ # fix the similar issue as ppc64 TOC on ia64. ia64 has limited size of small data
+ # currently ghc fails to build haddock
+ # http://osdir.com/ml/gnu.binutils.bugs/2004-10/msg00050.html
+ use ia64 && append-ghc-cflags compile -G0
}
pkg_setup() {
@@ -227,6 +231,10 @@ src_unpack() {
# substitute outdated macros
epatch "${FILESDIR}/ghc-6.12.3-autoconf-2.66-4252.patch"
+ # export typechecker internals even if ghci is disabled
+ # http://hackage.haskell.org/trac/ghc/ticket/3558
+ epatch "${FILESDIR}/ghc-6.12.3-ghciless-haddock-3558.patch"
+
# as we have changed the build system
eautoreconf
fi