5 if [[ ! -d src
/ghc-
${pkgver}/libraries
]]; then
6 echo "error: no directory src/ghc-${pkgver}/libraries: You must extract the source tarball under src/"
11 # no Win32 cause we're not building on windows
13 # no integer-simple because we use integer-gmp
14 exclude
['integer-simple']=1
15 # extract excluded libraries from ghc.mk
16 for exclude_pkg
in $
(sed 's/PKGS_THAT_ARE_INTREE_ONLY := //p' -n src
/ghc-
${pkgver}/ghc.mk
); do
17 exclude
[${exclude_pkg}]=1
22 # $1 is the name of the field
23 # $2 is the string for the test, either '=' or '<'
24 # ..$@ are the files to search
32 for path
in $
(ls $@
); do
33 dirname=$
(echo $path |
awk -F '/' '{ print $2 }')
34 cabalfile
=$
(echo $path |
awk -F '/' '{ print $3 }')
35 cabalname
=$
(basename $cabalfile .cabal
)
36 [[ ${exclude[${dirname}]} ]] && continue
37 version
=$
(awk 'tolower($0) ~ /^version:/ {print $2 }' $path)
38 printf "'haskell-${cabalname,,}"
39 [[ -n "$output_version" ]] && printf "$output_version$version"
42 printf "\033[1A'haskell-${cabalname,,}"
43 [[ -n "$output_version" ]] && printf "$output_version$version"
48 print_var
'provides' '=' libraries
/*/*.cabal libraries
/{containers
/containers
,Cabal
/Cabal
}/*.cabal utils
/ghc-pkg
/*.cabal
49 print_var
'replaces' '' libraries
/*/*.cabal libraries
/{containers
/containers
,Cabal
/Cabal
}/*.cabal utils
/ghc-pkg
/*.cabal
52 print_var
'provides' '=' utils
/{hpc
,hsc2hs
,haddock
*,hp2ps
}/*.cabal
53 print_var
'replaces' '' utils
/{hpc
,hsc2hs
,haddock
*,hp2ps
}/*.cabal