summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2010-09-12 07:37:09 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2010-09-12 07:37:09 +0000
commit196365f380130167dd5e4d5b49fb0871507b1ff4 (patch)
treed0bf718b6215ad53f64b2c5ba7609e6d1769b3e3 /eclass
parentFix RDEPEND: s/RDPEND/RDEPEND/ (diff)
downloadhistorical-196365f380130167dd5e4d5b49fb0871507b1ff4.tar.gz
historical-196365f380130167dd5e4d5b49fb0871507b1ff4.tar.bz2
historical-196365f380130167dd5e4d5b49fb0871507b1ff4.zip
Make .cabal built haskell packages respect LDFLAGS envvar. Fixes bug #333217 (and inferior bug #335591)
Diffstat (limited to 'eclass')
-rw-r--r--eclass/haskell-cabal.eclass10
1 files changed, 8 insertions, 2 deletions
diff --git a/eclass/haskell-cabal.eclass b/eclass/haskell-cabal.eclass
index bbb8a12ea9e2..afc6fe39906e 100644
--- a/eclass/haskell-cabal.eclass
+++ b/eclass/haskell-cabal.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.21 2010/08/07 12:06:27 kolmodin Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.22 2010/09/12 07:37:09 slyfox Exp $
#
# Original authors: Andres Loeh <kosmikus@gentoo.org>
# Duncan Coutts <dcoutts@gentoo.org>
@@ -348,7 +348,13 @@ haskell-cabal_src_configure() {
pushd "${S}" > /dev/null
cabal-bootstrap
- cabal-configure "$@"
+
+ ghc_flags=""
+ # currently cabal does not respect CFLAGS and LDFLAGS on it's own (bug #333217)
+ # so translate LDFLAGS to ghc parameters (without filtering)
+ for flag in $LDFLAGS; do ghc_flags="${ghc_flags} --ghc-option=-optl$flag"; done
+
+ cabal-configure $ghc_flags "$@"
popd > /dev/null
}