Magellan Linux

Diff of /trunk/core/include/haskell.sminc

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

revision 5489 by niro, Wed Jun 30 16:30:59 2010 UTC revision 5502 by niro, Wed Jun 30 23:02:55 2010 UTC
# Line 9  sminclude mtools Line 9  sminclude mtools
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
16  : ${SRCFILE="${PNAME/#haskell-/}-${PVER}.tar.gz"}  : ${SRCFILE="${PNAME/#haskell-/}-${PVER}.tar.gz"}
17  : ${SRCDIR="${BUILDDIR}/${PNAME/#haskell-/}-${PVER}"}  : ${SRCDIR="${BUILDDIR}/${PNAME/#haskell-/}-${PVER}"}
18  : ${SRC_URI=( "http://hackage.haskell.org/packages/archive/${PNAME/#haskell-/}/${PVER}/${SRCFILE}" "mirror://${PNAME}/${SRCFILE}" )}  SRC_URI=(
19     ${SRC_URI[*]}
20     http://hackage.haskell.org/packages/archive/${PNAME/#haskell-/}/${PVER}/${SRCFILE}
21     mirror://${PNAME}/${SRCFILE}
22    )
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 haskell_postremove"
27    
28  haskell_ghc_version()  haskell_ghc_version()
29  {  {
# Line 62  haskell_src_configure() Line 67  haskell_src_configure()
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 \
# Line 86  haskell_src_install() Line 94  haskell_src_install()
94    
95   runhaskell $(haskell_ghc_setup_script) copy --destdir=${BINDIR} || die   runhaskell $(haskell_ghc_setup_script) copy --destdir=${BINDIR} || die
96    
97     # create register scripts
98     haskell_install_register || die
99    
100   # install docs   # install docs
101   local i   local i
102   for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \   for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \
# Line 125  haskell_postinstall() Line 136  haskell_postinstall()
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

Legend:
Removed from v.5489  
changed lines
  Added in v.5502