Permalink
Browse files

dev-lang/ghc: add USE=gmp enabled by default.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
  • Loading branch information...
1 parent 3aedb64 commit 490ca22593a0321a113446058b4397b2296fcec8 @trofi trofi committed Mar 18, 2013
Showing with 26 additions and 6 deletions.
  1. +8 −2 dev-lang/ghc/ghc-7.4.2.ebuild
  2. +7 −1 dev-lang/ghc/ghc-7.6.2.ebuild
  3. +8 −2 dev-lang/ghc/ghc-9999.ebuild
  4. +3 −1 dev-lang/ghc/metadata.xml
@@ -1,4 +1,4 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
@@ -74,7 +74,7 @@ LICENSE="BSD"
SLOT="0/${PV}"
# ghc on ia64 needs gcc to support -mcmodel=medium (or some dark hackery) to avoid TOC overflow
KEYWORDS="~alpha ~amd64 -ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
-IUSE="doc ghcbootstrap ghcmakebinary llvm"
+IUSE="doc ghcbootstrap ghcmakebinary +gmp llvm"
IUSE+=" binary" # don't forget about me later!
IUSE+=" elibc_glibc" # system stuff
@@ -473,6 +473,12 @@ src_configure() {
export PATH="${WORKDIR}/usr/bin:${PATH}"
fi
+ if use gmp; then
+ echo "INTEGER_LIBRARY=integer-gmp" >> mk/build.mk
+ else
+ echo "INTEGER_LIBRARY=integer-simple" >> mk/build.mk
+ fi
+
# Since GHC 6.12.2 the GHC wrappers store which GCC version GHC was
# compiled with, by saving the path to it. The purpose is to make sure
# that GHC will use the very same gcc version when it compiles haskell
@@ -85,7 +85,7 @@ LICENSE="BSD"
SLOT="0/${PV}"
# ghc on ia64 needs gcc to support -mcmodel=medium (or some dark hackery) to avoid TOC overflow
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
-IUSE="doc ghcbootstrap ghcmakebinary llvm"
+IUSE="doc ghcbootstrap ghcmakebinary +gmp llvm"
IUSE+=" binary" # don't forget about me later!
IUSE+=" elibc_glibc" # system stuff
@@ -502,6 +502,12 @@ src_configure() {
export PATH="${WORKDIR}/usr/bin:${PATH}"
fi
+ if use gmp; then
+ echo "INTEGER_LIBRARY=integer-gmp" >> mk/build.mk
+ else
+ echo "INTEGER_LIBRARY=integer-simple" >> mk/build.mk
+ fi
+
# Since GHC 6.12.2 the GHC wrappers store which GCC version GHC was
# compiled with, by saving the path to it. The purpose is to make sure
# that GHC will use the very same gcc version when it compiles haskell
@@ -1,4 +1,4 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
@@ -55,7 +55,7 @@ fi
LICENSE="BSD"
SLOT="0/${PV}"
KEYWORDS=""
-IUSE="dph doc +ghcbootstrap ghcmakebinary llvm +shared"
+IUSE="dph doc +ghcbootstrap ghcmakebinary +gmp llvm +shared"
REQUIRED_USE="ghcbootstrap"
RDEPEND="
@@ -381,6 +381,12 @@ src_configure() {
echo "DYNAMIC_BY_DEFAULT=NO" >> mk/build.mk
fi
+ if use gmp; then
+ echo "INTEGER_LIBRARY=integer-gmp" >> mk/build.mk
+ else
+ echo "INTEGER_LIBRARY=integer-simple" >> mk/build.mk
+ fi
+
# This is only for head builds
perl boot || die "perl boot failed"
@@ -7,9 +7,11 @@
</maintainer>
<use>
<flag name='binary'>Install the binary version directly, rather than using it to build the source version.</flag>
+ <flag name='dph'>Internal: Build ghc with Data Parallel Haskell</flag>
<flag name='ghcbootstrap'>Internal: Bootstrap GHC from an existing GHC installation.</flag>
<flag name='ghcmakebinary'>Internal: Build binary friendly for redistribution.</flag>
+ <flag name='gmp'>use <pkg>dev-libs/gmp</pkg> for integer operations (works faster, but an external depend).</flag>
<flag name='llvm'>Enable llvm code generator for ghc (activated by -fllvm)</flag>
- <flag name='dph'>Internal: Build ghc with Data Parallel Haskell</flag>
+ <flag name='shared'>Resulting ghc will generate dynamically linked libraries by default.</flag>
</use>
</pkgmetadata>

0 comments on commit 490ca22

Please sign in to comment.