9 |
: ${HOMEPAGE="http://hackage.haskell.org/package/${PNAME/#haskell-/}"} |
: ${HOMEPAGE="http://hackage.haskell.org/package/${PNAME/#haskell-/}"} |
10 |
|
|
11 |
# some sane default dependencies |
# some sane default dependencies |
12 |
DEPEND="${DEPEND} |
SDEPEND="${SDEPEND} |
13 |
>= dev-lang/ghc-6.12" |
>= dev-lang/ghc-6.12" |
14 |
|
|
15 |
# default SRCFILE SRCDIR and SRC_URI |
# default SRCFILE SRCDIR and SRC_URI |
23 |
|
|
24 |
HASKELL_PNAME="${PNAME}" |
HASKELL_PNAME="${PNAME}" |
25 |
SPECIAL_VARS="HASKELL_PNAME" |
SPECIAL_VARS="HASKELL_PNAME" |
26 |
SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} haskell_preinstall haskell_postinstall haskell_preremove" |
SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} haskell_preinstall haskell_postinstall haskell_preremove haskell_postremove" |
27 |
|
|
28 |
haskell_ghc_version() |
haskell_ghc_version() |
29 |
{ |
{ |
67 |
{ |
{ |
68 |
local configure_opts="$@" |
local configure_opts="$@" |
69 |
|
|
70 |
|
configure_opts+=" --enable-split-objs" |
71 |
|
configure_opts+=" --enable-shared" |
72 |
|
|
73 |
runhaskell $(haskell_ghc_setup_script) configure \ |
runhaskell $(haskell_ghc_setup_script) configure \ |
74 |
--ghc \ |
--ghc \ |
75 |
--prefix=/usr \ |
--prefix=/usr \ |
136 |
# fi |
# fi |
137 |
# } |
# } |
138 |
|
|
139 |
export_inherits haskell src_prepare src_compile src_install preinstall postinstall #preremove |
# to be on the safe side, fix all broken packages afer a package remove |
140 |
|
haskell_postremove() |
141 |
|
{ |
142 |
|
if [[ -x $(which ghc-pkg) ]] |
143 |
|
then |
144 |
|
local broken="$(ghc-pkg check --simple-output)" |
145 |
|
if [[ ! -z ${broken} ]] |
146 |
|
then |
147 |
|
echo "fixing broken haskell modules:" |
148 |
|
local pkg |
149 |
|
for pkg in ${broken} |
150 |
|
do |
151 |
|
echo " unregister ${pkg} ..." |
152 |
|
ghc-pkg unregister ${pkg} |
153 |
|
done |
154 |
|
fi |
155 |
|
fi |
156 |
|
} |
157 |
|
|
158 |
|
export_inherits haskell src_prepare src_compile src_install preinstall postinstall postremove #preremove |