Those are really just nits, but I thought I'd share what I've noticed.
> cabal-mksetup() {
> local setupdir
>
> if [[ -n $1 ]]; then
> setupdir=$1
> else
> setupdir=${S}
> fi
>
> rm -f "${setupdir}"/Setup.{lhs,hs}
>
> echo 'import Distribution.Simple; main = defaultMainWithHooks
> defaultUserHooks' \
> > $setupdir/Setup.hs
> }
I think there should be || die after echo, to catch out-of-disk-space
problems.
> cabal-copy() {
> has "${EAPI:-0}" 0 1 2 && ! use prefix && ED=${D}
>
> set -- copy --destdir="${D}" "$@"
> echo ./setup "$@"
> ./setup "$@" || die "setup copy failed"
>
> # cabal is a bit eager about creating dirs,
> # so remove them if they are empty
> rmdir "${ED}/usr/bin" 2> /dev/null
>
> # GHC 6.4 has a bug in get/setPermission and Cabal 1.1.1 has
> # no workaround.
> # set the +x permission on executables
> if [[ -d "${ED}/usr/bin" ]] ; then
> chmod +x "${ED}/usr/bin/"*
> fi
> # TODO: do we still need this?
> }
I think there should be || die after chmod.
> haskell-cabal_pkg_setup() {
> ghc-package_pkg_setup
> if [[ -z "${CABAL_BOOTSTRAP}" && -z "${CABAL_FROM_GHC}" ]] && !
> ghc-sanecabal "${CABAL_MIN_VERSION}"; then
> eerror "The package dev-haskell/cabal is not correctly installed for"
> eerror "the currently active version of ghc ($(ghc-version)). Please"
> eerror "run ghc-updater or haskell-updater or re-build
> dev-haskell/cabal."
> die "cabal is not correctly installed"
> fi
> if [[ -z "${CABAL_HAS_BINARIES}" ]] && [[ -z "${CABAL_HAS_LIBRARIES}" ]];
> then
> eerror "QA: Neither bin nor lib are in CABAL_FEATURES."
Shouldn't this be eqawarn?
> fi
> if [[ -n "${CABAL_UNKNOWN}" ]]; then
> ewarn "Unknown entry in CABAL_FEATURES: ${CABAL_UNKNOWN}"
Shouldn't this be eqawarn?
> fi
> if cabal-is-dummy-lib; then
> einfo "${P} is included in ghc-${CABAL_CORE_LIB_GHC_PV}, nothing to
> install."
> fi
> }
signature.asc
Description: OpenPGP digital signature
