Magellan Linux

Diff of /trunk/include/haskell.sminc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 5542 by niro, Thu Jul 1 15:34:06 2010 UTC revision 5578 by niro, Fri Jul 2 13:40:50 2010 UTC
# Line 4  Line 4 
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    
# Line 62  haskell_disable_feature() Line 70  haskell_disable_feature()
70  {  {
71   local feature="$1"   local feature="$1"
72   haskell_feature_is_supported "${feature}" || die "haskell feature '${feature}' not supported!"   haskell_feature_is_supported "${feature}" || die "haskell feature '${feature}' not supported!"
73   echo -e "${COLBLUE}--- ${COLGRED}  disabled haskell feature '${feature}'${COLDEFAULT}"   echo -e "${COLBLUE}--- ${COLRED}disabled haskell feature '${feature}'${COLDEFAULT}"
74   export HASKELL_FEATURES="${HASKELL_FEATURES/${feature}/}"   export HASKELL_FEATURES="${HASKELL_FEATURES/${feature}/}"
75  }  }
76    
# Line 70  haskell_enable_feature() Line 78  haskell_enable_feature()
78  {  {
79   local feature="$1"   local feature="$1"
80   haskell_feature_is_supported "${feature}" || 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}"   echo -e "${COLBLUE}+++ ${COLGREEN}enabled haskell feature '${feature}'${COLDEFAULT}"
82   export HASKELL_FEATURES+=" ${feature}"   export HASKELL_FEATURES+=" ${feature}"
83  }  }
84    
# Line 123  haskell_src_configure() Line 131  haskell_src_configure()
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  }  }
# Line 148  haskell_src_install() Line 156  haskell_src_install()
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

Legend:
Removed from v.5542  
changed lines
  Added in v.5578