summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2012-11-16 15:47:17 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2012-11-16 15:47:17 +0000
commit16c7ef4c334304da9a8972ef56baf1d58b1c5dfc (patch)
tree70e0066fd6b776923418158be697c758049d2d3f /eclass
parenthttp://my.opera.com/desktopteam/blog/2012/11/16/opera-12-11-rc2 (diff)
downloadgentoo-2-16c7ef4c334304da9a8972ef56baf1d58b1c5dfc.tar.gz
gentoo-2-16c7ef4c334304da9a8972ef56baf1d58b1c5dfc.tar.bz2
gentoo-2-16c7ef4c334304da9a8972ef56baf1d58b1c5dfc.zip
Restore dynamic linking of Cabal's ./setup and add building of shared libraries for ghc-7.7+.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog7
-rw-r--r--eclass/ghc-package.eclass8
-rw-r--r--eclass/haskell-cabal.eclass24
3 files changed, 33 insertions, 6 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index c786463f3b33..9523568f59be 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for eclass directory
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.507 2012/11/15 20:06:34 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.508 2012/11/16 15:47:17 slyfox Exp $
+
+ 16 Nov 2012; Sergei Trofimovich <slyfox@gentoo.org> ghc-package.eclass,
+ haskell-cabal.eclass:
+ Restore dynamic linking of Cabal's ./setup and add building of shared
+ libraries for ghc-7.7+.
15 Nov 2012; Tomáš Chvátal <scarabeus@gentoo.org> obs-service.eclass:
Depend on suse-build as most services require it.
diff --git a/eclass/ghc-package.eclass b/eclass/ghc-package.eclass
index e687630dd015..a9b8e7a1ba37 100644
--- a/eclass/ghc-package.eclass
+++ b/eclass/ghc-package.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ghc-package.eclass,v 1.34 2012/09/14 02:51:23 gienah Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ghc-package.eclass,v 1.35 2012/11/16 15:47:17 slyfox Exp $
# @ECLASS: ghc-package.eclass
# @MAINTAINER:
@@ -39,7 +39,11 @@ ghc-getghcpkgbin() {
# the ghc-pkg executable changed name in ghc 6.10, as it no longer needs
# the wrapper script with the static flags
echo '[]' > "${T}/empty.conf"
- if version_is_at_least "7.5.20120516" "$(ghc-version)"; then
+ if version_is_at_least "7.7.20121101" "$(ghc-version)"; then
+ # was moved to bin/ subtree by:
+ # http://www.haskell.org/pipermail/cvs-ghc/2012-September/076546.html
+ echo "$(ghc-libdir)/bin/ghc-pkg" "--global-package-db=${T}/empty.conf"
+ elif version_is_at_least "7.5.20120516" "$(ghc-version)"; then
echo "$(ghc-libdir)/ghc-pkg" "--global-package-db=${T}/empty.conf"
else
echo "$(ghc-libdir)/ghc-pkg" "--global-conf=${T}/empty.conf"
diff --git a/eclass/haskell-cabal.eclass b/eclass/haskell-cabal.eclass
index 0e4b051aa624..06470ee1555f 100644
--- a/eclass/haskell-cabal.eclass
+++ b/eclass/haskell-cabal.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.34 2012/09/27 16:35:41 axs Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.35 2012/11/16 15:47:17 slyfox Exp $
# @ECLASS: haskell-cabal.eclass
# @MAINTAINER:
@@ -19,6 +19,7 @@
# Currently supported features:
# haddock -- for documentation generation
# hscolour -- generation of colourised sources
+# hoogle -- generation of documentation search index
# alex -- lexer/scanner generator
# happy -- parser generator
# c2hs -- C interface generator
@@ -187,9 +188,19 @@ cabal-bootstrap() {
if $(ghc-supports-shared-libraries); then
# # some custom build systems might use external libraries,
# # for which we don't have shared libs, so keep static fallback
- # Disabled '-dynamic' as ghc does not embed RPATH to used extra-libraries:
# bug #411789, http://hackage.haskell.org/trac/ghc/ticket/5743#comment:3
- # make_setup -dynamic "$@" ||
+ # http://hackage.haskell.org/trac/ghc/ticket/7062
+ # http://hackage.haskell.org/trac/ghc/ticket/3072
+ # ghc does not set RPATH for extralibs, thus we do it ourselves by hands
+ einfo "Prepending $(ghc-libdir) to LD_LIBRARY_PATH"
+ if [[ ${CHOST} != *-darwin* ]]; then
+ LD_LIBRARY_PATH="$(ghc-libdir)${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"
+ export LD_LIBRARY_PATH
+ else
+ DYLD_LIBRARY_PATH="$(ghc-libdir)${DYLD_LIBRARY_PATH:+:}${DYLD_LIBRARY_PATH}"
+ export DYLD_LIBRARY_PATH
+ fi
+ { make_setup -dynamic "$@" && ./setup --help >/dev/null; } ||
make_setup "$@" || die "compiling ${setupmodule} failed"
else
make_setup "$@" || die "compiling ${setupmodule} failed"
@@ -292,6 +303,13 @@ cabal-configure() {
$(ghc-supports-shared-libraries) && \
cabalconf="${cabalconf} --enable-shared"
+ if $(ghc-supports-shared-libraries); then
+ # maybe a bit lower
+ if version_is_at_least "7.7.20121114" "$(ghc-version)"; then
+ cabalconf="${cabalconf} --enable-shared"
+ fi
+ fi
+
set -- configure \
--ghc --prefix="${EPREFIX}"/usr \
--with-compiler="$(ghc-getghc)" \