4 |
sminclude mtools |
sminclude mtools |
5 |
|
|
6 |
# some sane default values |
# some sane default values |
7 |
|
: ${HASKELL_PACKAGE="${PNAME/#haskell-/}"} |
8 |
: ${PCATEGORIE="dev-haskell"} |
: ${PCATEGORIE="dev-haskell"} |
9 |
: ${DESCRIPTION="${PNAME}"} |
: ${DESCRIPTION="${PNAME}"} |
10 |
: ${HOMEPAGE="http://hackage.haskell.org/package/${PNAME/#haskell-/}"} |
: ${HOMEPAGE="http://hackage.haskell.org/package/${HASKELL_PACKAGE}"} |
11 |
|
|
12 |
# some sane default dependencies |
# some sane default dependencies |
13 |
|
# all packages with haskell in the name needs ghc as runtime |
14 |
|
if [[ ${PNAME/#haskell-/} != ${PNAME} ]] |
15 |
|
then |
16 |
|
DEPEND="${DEPEND} |
17 |
|
>= dev-lang/ghc-6.12" |
18 |
|
fi |
19 |
|
# all other only as SDEPEND |
20 |
SDEPEND="${SDEPEND} |
SDEPEND="${SDEPEND} |
21 |
>= dev-lang/ghc-6.12" |
>= dev-lang/ghc-6.12" |
22 |
|
|
23 |
# default SRCFILE SRCDIR and SRC_URI |
# default SRCFILE SRCDIR and SRC_URI |
24 |
: ${SRCFILE="${PNAME/#haskell-/}-${PVER}.tar.gz"} |
: ${SRCFILE="${HASKELL_PACKAGE}-${PVER}.tar.gz"} |
25 |
: ${SRCDIR="${BUILDDIR}/${PNAME/#haskell-/}-${PVER}"} |
: ${SRCDIR="${BUILDDIR}/${HASKELL_PACKAGE}-${PVER}"} |
26 |
SRC_URI=( |
SRC_URI=( |
27 |
${SRC_URI[*]} |
${SRC_URI[*]} |
28 |
http://hackage.haskell.org/packages/archive/${PNAME/#haskell-/}/${PVER}/${SRCFILE} |
http://hackage.haskell.org/packages/archive/${HASKELL_PACKAGE}/${PVER}/${SRCFILE} |
29 |
mirror://${PNAME}/${SRCFILE} |
mirror://${PNAME}/${SRCFILE} |
30 |
) |
) |
31 |
|
|
69 |
haskell_disable_feature() |
haskell_disable_feature() |
70 |
{ |
{ |
71 |
local feature="$1" |
local feature="$1" |
72 |
haskell_feature_is_supported || die "haskell feature '${feature}' not supported!" |
haskell_feature_is_supported "${feature}" || die "haskell feature '${feature}' not supported!" |
73 |
|
echo -e "${COLBLUE}--- ${COLRED}disabled haskell feature '${feature}'${COLDEFAULT}" |
74 |
export HASKELL_FEATURES="${HASKELL_FEATURES/${feature}/}" |
export HASKELL_FEATURES="${HASKELL_FEATURES/${feature}/}" |
75 |
} |
} |
76 |
|
|
77 |
haskell_enable_feature() |
haskell_enable_feature() |
78 |
{ |
{ |
79 |
local feature="$1" |
local feature="$1" |
80 |
haskell_feature_is_supported || die "haskell feature '${feature}' not supported!" |
haskell_feature_is_supported "${feature}" || die "haskell feature '${feature}' not supported!" |
81 |
|
echo -e "${COLBLUE}+++ ${COLGREEN}enabled haskell feature '${feature}'${COLDEFAULT}" |
82 |
export HASKELL_FEATURES+=" ${feature}" |
export HASKELL_FEATURES+=" ${feature}" |
83 |
} |
} |
84 |
|
|
131 |
--ghc \ |
--ghc \ |
132 |
--prefix=/usr \ |
--prefix=/usr \ |
133 |
--libdir=/usr/$(mlibdir) \ |
--libdir=/usr/$(mlibdir) \ |
134 |
--libsubdir=ghc-$(haskell_ghc_version)/${PNAME/#haskell-/}-${PVER} \ |
--libsubdir=ghc-$(haskell_ghc_version)/${HASKELL_PACKAGE}-${PVER} \ |
135 |
--datadir=/usr/share \ |
--datadir=/usr/share \ |
136 |
--datasubdir=ghc-$(haskell_ghc_version)/${PNAME/#haskell-/}-${PVER} \ |
--datasubdir=ghc-$(haskell_ghc_version)/${HASKELL_PACKAGE}-${PVER} \ |
137 |
${configure_opts} \ |
${configure_opts} \ |
138 |
|| die |
|| die |
139 |
} |
} |
156 |
runhaskell $(haskell_ghc_setup_script) copy --destdir=${BINDIR} || die |
runhaskell $(haskell_ghc_setup_script) copy --destdir=${BINDIR} || die |
157 |
|
|
158 |
# create register scripts |
# create register scripts |
159 |
haskell_feature register && haskell_install_register || die |
if haskell_feature register |
160 |
|
then |
161 |
|
haskell_install_register || die |
162 |
|
fi |
163 |
|
|
164 |
# install docs |
# install docs |
165 |
local i |
local i |