diff options
author | 2014-05-22 16:35:11 +0000 | |
---|---|---|
committer | 2014-05-22 16:35:11 +0000 | |
commit | c104da5c06abfa66adaff202bb6f9b7a6cbfac1e (patch) | |
tree | bd0edc53614365912583bbd121d3e5d3da2ea4df /eclass | |
parent | fix libtool archive removal (diff) | |
download | historical-c104da5c06abfa66adaff202bb6f9b7a6cbfac1e.tar.gz historical-c104da5c06abfa66adaff202bb6f9b7a6cbfac1e.tar.bz2 historical-c104da5c06abfa66adaff202bb6f9b7a6cbfac1e.zip |
cabal_chdeps() now defaults to MY_PN (autogenerated by hackport) if exists, then to PN
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ChangeLog | 6 | ||||
-rw-r--r-- | eclass/haskell-cabal.eclass | 32 |
2 files changed, 22 insertions, 16 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index e0a795521ff2..2429d9b479d5 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for eclass directory # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1263 2014/05/22 16:30:59 slyfox Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1264 2014/05/22 16:35:11 slyfox Exp $ + + 22 May 2014; Sergei Trofimovich <slyfox@gentoo.org> haskell-cabal.eclass: + cabal_chdeps() now defaults to MY_PN (autogenerated by hackport) if exists, + then to PN 22 May 2014; Sergei Trofimovich <slyfox@gentoo.org> darcs.eclass: store darcs cache in DISTDIR diff --git a/eclass/haskell-cabal.eclass b/eclass/haskell-cabal.eclass index b6c4ea4368ca..1521bc5ca840 100644 --- a/eclass/haskell-cabal.eclass +++ b/eclass/haskell-cabal.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.43 2014/02/11 19:00:06 slyfox Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.44 2014/05/22 16:35:11 slyfox Exp $ # @ECLASS: haskell-cabal.eclass # @MAINTAINER: @@ -180,10 +180,11 @@ cabal-bootstrap() { make_setup() { set -- -package "${cabalpackage}" --make "${setupmodule}" \ + ${HCFLAGS} \ ${GHC_BOOTSTRAP_FLAGS} \ "$@" \ -o setup - echo $(ghc-getghc) ${HCFLAGS} "$@" + echo $(ghc-getghc) "$@" $(ghc-getghc) "$@" } if $(ghc-supports-shared-libraries); then @@ -209,18 +210,14 @@ cabal-bootstrap() { } cabal-mksetup() { - local setupdir + local setupdir=${1:-${S}} + local setup_src=${setupdir}/Setup.hs - if [[ -n $1 ]]; then - setupdir=$1 - else - setupdir=${S} - fi - - rm -f "${setupdir}"/Setup.{lhs,hs} + rm -vf "${setupdir}"/Setup.{lhs,hs} + elog "Creating 'Setup.hs' for 'Simple' build type." echo 'import Distribution.Simple; main = defaultMainWithHooks defaultUserHooks' \ - > $setupdir/Setup.hs || die "failed to create default Setup.hs" + > "${setup_src}" || die "failed to create default Setup.hs" } cabal-hscolour() { @@ -252,10 +249,12 @@ cabal-die-if-nonempty() { } cabal-show-brokens() { + elog "ghc-pkg check: 'checking for other broken packages:'" # pretty-printer $(ghc-getghcpkg) check 2>&1 \ | egrep -v '^Warning: haddock-(html|interfaces): ' \ - | egrep -v '^Warning: include-dirs: ' + | egrep -v '^Warning: include-dirs: ' \ + | head -n 20 cabal-die-if-nonempty 'broken' \ $($(ghc-getghcpkg) check --simple-output) @@ -311,8 +310,10 @@ cabal-configure() { if ghc-supports-parallel-make; then local max_jobs=$(makeopts_jobs) - # limit to sort-of-sane value (same as Cabal) - [[ ${max_jobs} -gt 64 ]] && max_jobs=64 + # limit to very small value, as parallelism + # helps slightly, but makes things severely worse + # when amount of threads is Very Large. + [[ ${max_jobs} -gt 4 ]] && max_jobs=4 cabalconf+=(--ghc-option=-j"$max_jobs") fi @@ -619,7 +620,8 @@ cabal_flag() { #} # cabal_chdeps() { - local cf=${CABAL_FILE:-${S}/${PN}.cabal} + local cabal_fn=${MY_PN:-${PN}}.cabal + local cf=${CABAL_FILE:-${S}/${cabal_fn}} local from_ss # ss - substring local to_ss local orig_c # c - contents |