Annotation of /trunk/extras/ghc/ghc-6.12.3-r1.smage2
Parent Directory
|
Revision Log
Revision 5495 -
(hide annotations)
(download)
Wed Jun 30 16:48:00 2010 UTC (13 years, 11 months ago) by niro
File size: 3303 byte(s)
Wed Jun 30 16:48:00 2010 UTC (13 years, 11 months ago) by niro
File size: 3303 byte(s)
- re-cache the ghc-pkg database in postinstall
1 | niro | 5482 | # $Id$ |
2 | |||
3 | PNAME="ghc" | ||
4 | PVER="6.12.3" | ||
5 | PBUILD="r1" | ||
6 | |||
7 | PCATEGORIE="dev-lang" | ||
8 | STATE="unstable" | ||
9 | |||
10 | DESCRIPTION="Glasgow Haskell Compiler." | ||
11 | HOMEPAGE="http://www.haskell.org/ghc/" | ||
12 | |||
13 | DEPEND=">= dev-lang/perl-5.10 | ||
14 | >= sys-dev/gcc-4.3 | ||
15 | >= dev-libs/gmp-4.3 | ||
16 | >= sys-libs/readline-6" | ||
17 | |||
18 | SRCFILE="${PNAME}-${PVER}-src.tar.bz2" | ||
19 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" | ||
20 | |||
21 | # binary sources | ||
22 | SRCFILE_BIN_x86="${PNAME}-${PVER}-i386-unknown-linux-n.tar.bz2" | ||
23 | SRCFILE_BIN_x86_64="${PNAME}-${PVER}-x86_64-unknown-linux-n.tar.bz2" | ||
24 | SRCFILE_BIN="$(eval echo \$SRCFILE_BIN_${ARCH/i*86/x86})" | ||
25 | SRCDIR_BIN="${BUILDDIR}/binary/${PNAME}-${PVER}" | ||
26 | |||
27 | SRC_URI=( | ||
28 | http://www.haskell.org/ghc/dist/${PVER}/${SRCFILE} | ||
29 | http://www.haskell.org/ghc/dist/${PVER}/${SRCFILE_BIN_x86} | ||
30 | http://www.haskell.org/ghc/dist/${PVER}/${SRCFILE_BIN_x86_64} | ||
31 | niro | 5484 | http://darcs.haskell.org/download/dist/${PVER}/${SRCFILE} |
32 | http://darcs.haskell.org/download/dist/${PVER}/${SRCFILE_BIN_x86} | ||
33 | http://darcs.haskell.org/download/dist/${PVER}/${SRCFILE_BIN_x86_64} | ||
34 | niro | 5482 | mirror://${PNAME}/${SRCFILE} |
35 | mirror://${PNAME}/${SRCFILE_BIN_x86} | ||
36 | mirror://${PNAME}/${SRCFILE_BIN_x86_64} | ||
37 | niro | 5483 | mirror://${PNAME}/${PNAME}-6.12.2-chost-2.patch |
38 | niro | 5482 | ) |
39 | |||
40 | UP2DATE="updatecmd ${HOMEPAGE}download.html | grep 'Current Stable' | sed 's:.*(\(.*\)):\1:'" | ||
41 | |||
42 | src_prepare() | ||
43 | { | ||
44 | munpack ${SRCFILE} || die | ||
45 | |||
46 | install -d ${BUILDDIR}/binary || die | ||
47 | munpack ${SRCFILE_BIN} ${BUILDDIR}/binary || die | ||
48 | |||
49 | cd ${SRCDIR} | ||
50 | |||
51 | # fix broken chosts | ||
52 | niro | 5483 | mpatch ${PNAME}-6.12.2-chost-2.patch || die |
53 | niro | 5482 | |
54 | # fixes configure: line 3817: FP_DECL_ALTZONE: command not found | ||
55 | cp libraries/{,old-}time/aclocal.m4 || die | ||
56 | |||
57 | autoreconf --verbose --install --force || die | ||
58 | } | ||
59 | |||
60 | src_compile() | ||
61 | { | ||
62 | # first setup the binary compiler to bootstrap ghc | ||
63 | cd ${SRCDIR_BIN} | ||
64 | # inplace doesn't work anymore | ||
65 | # mconfigure || die | ||
66 | # make in-place || die | ||
67 | # | ||
68 | # # setup the path to ghc | ||
69 | # local myarch="${ARCH}" | ||
70 | # [[ ${ARCH} = i*86 ]] && myarch="i386" | ||
71 | # export PATH="${PATH}:${SRCDIR_BIN}/bin/${myarch}-unknown-linux" | ||
72 | # | ||
73 | # install to ${BUILDDIR}/binary from now on | ||
74 | niro | 5488 | ./configure --prefix=${BUILDDIR}/binary || die |
75 | niro | 5482 | make install || die |
76 | export PATH="${PATH}:${BUILDDIR}/binary/bin" | ||
77 | |||
78 | # now bootstrap ghc | ||
79 | cd ${SRCDIR} | ||
80 | |||
81 | # initialize build.mk | ||
82 | echo '# Magellan build' > mk/build.mk || die | ||
83 | |||
84 | # fix pathes | ||
85 | echo "docdir = /usr/share/doc/${PNAME}-${PVER}" >> mk/build.mk || die | ||
86 | echo "htmldir = /usr/share/doc/${PNAME}-${PVER}" >> mk/build.mk || die | ||
87 | |||
88 | # disable the build of docs | ||
89 | echo HADDOCK_DOCS=NO >> mk/build.mk || die | ||
90 | echo XMLDocWays="" >> mk/build.mk || die | ||
91 | |||
92 | # do not use shell wrapper | ||
93 | sed -i "s|utils/haddock_dist_INSTALL_SHELL_WRAPPER = YES|utils/haddock_dist_INSTALL_SHELL_WRAPPER = NO|" \ | ||
94 | utils/haddock/ghc.mk || die | ||
95 | |||
96 | # taken from gentoo: | ||
97 | # circumvent a very strange bug that seems related with ghc producing | ||
98 | # too much output while being filtered through tee (e.g. due to | ||
99 | # portage logging) reported as bug #111183 | ||
100 | echo "SRC_HC_OPTS+=-w" >> mk/build.mk || die | ||
101 | |||
102 | #mconfigure || die # wants to crosscompile | ||
103 | ./configure --prefix=/usr --libdir=/usr/$(mlibdir) || die | ||
104 | mmake -j1 all || die | ||
105 | } | ||
106 | |||
107 | src_install() | ||
108 | { | ||
109 | cd ${SRCDIR} | ||
110 | mmake -j1 DESTDIR=${BINDIR} install || die | ||
111 | minstalldocs ANNOUNCE HACKING LICENSE README VERSION || die | ||
112 | } | ||
113 | niro | 5495 | |
114 | postinstall() | ||
115 | { | ||
116 | if [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]] | ||
117 | then | ||
118 | # re-create ghc-pkg cache | ||
119 | [[ -x $(which ghc-pkg) ]] && ghc-pkg recache | ||
120 | fi | ||
121 | } |
Properties
Name | Value |
---|---|
svn:keywords | Id |