Contents of /smage/trunk/core/perl/perl-5.12.1-r1.smage2
Parent Directory | Revision Log
Revision 684 -
(show annotations)
(download)
Thu Oct 21 12:58:01 2010 UTC (13 years, 6 months ago) by niro
File size: 2652 byte(s)
Thu Oct 21 12:58:01 2010 UTC (13 years, 6 months ago) by niro
File size: 2652 byte(s)
-mcore
1 | # $Id: perl-5.10.1-r2.smage2 5593 2010-07-07 07:26:46Z niro $ |
2 | |
3 | PNAME="perl" |
4 | PVER="5.12.1" |
5 | PBUILD="r1" |
6 | |
7 | PCATEGORIE="dev-lang" |
8 | STATE="unstable" |
9 | |
10 | DESCRIPTION="Larry Wall's Practical Extraction and Reporting Language." |
11 | HOMEPAGE="http://www.perl.org/" |
12 | |
13 | DEPEND=">= sys-apps/groff-1.20 |
14 | >= sys-libs/zlib-1.2.5 |
15 | >= dev-db/db-5.0" |
16 | |
17 | SRCFILE="${PNAME}-${PVER}.tar.gz" |
18 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
19 | |
20 | MCORE_ONLY_KEEP="usr/bin/perl usr/bin/perl${PVER}" |
21 | sminclude mcore-split |
22 | |
23 | SRC_URI=( |
24 | http://ftp.funet.fi/pub/CPAN/src/${SRCFILE} |
25 | mirror://${PNAME}/${SRCFILE} |
26 | mirror://${PNAME}/${PNAME}-5.10.1-picdl.patch |
27 | mirror://${PNAME}/${PNAME}-5.8.7-sharedlinker.patch |
28 | mirror://${PNAME}/${PNAME}-5.8.7-Configure_multilib-1.patch |
29 | mirror://${PNAME}/${PNAME}-5.12.1-libc_lib64-1.patch |
30 | ) |
31 | |
32 | #UP2DATE="updatecmd http://ftp.funet.fi/pub/CPAN/src | grep ${PNAME}- | lasttarball" |
33 | #UP2DATE="updatecmd ${HOMEPAGE} | grep 'Current Release:' | sed 's/.*: \[.*\]\(.*\).*/\1/'" |
34 | #UP2DATE="updatecmd ${HOMEPAGE} | grep 'Latest Version:' | sed 's/.*: \[.*\]\(.*\).*/\1/'" |
35 | UP2DATE="updatecmd ${HOMEPAGE} | grep 'download now' | sed 's/.*\[.*\]\(.*\) -.*/\1/'" |
36 | |
37 | src_prepare() |
38 | { |
39 | munpack ${SRCFILE} || die |
40 | cd ${SRCDIR} |
41 | |
42 | # enable dynamic loader |
43 | mpatch ${PNAME}-5.10.1-picdl.patch || die |
44 | |
45 | # and proper ldflags for shrlibs |
46 | mpatch ${PNAME}-5.8.7-sharedlinker.patch || die |
47 | |
48 | if [[ ${ARCH} = x86_64 ]] |
49 | then |
50 | # allow configure to run successfully on multilib builds |
51 | mpatch ${PNAME}-5.8.7-Configure_multilib-1.patch || die |
52 | # fix a small issue where perl -V assume libc in /lib |
53 | mpatch ${PNAME}-5.12.1-libc_lib64-1.patch || die |
54 | fi |
55 | |
56 | # force use of system-zlib |
57 | sed -i -e '/^BUILD_ZLIB/s/True/False/' \ |
58 | -e '/^INCLUDE/s,\./zlib-src,/usr/include,' \ |
59 | -e '/^LIB/s,\./zlib-src,/usr/lib,' \ |
60 | cpan/Compress-Raw-Zlib/config.in \ |
61 | || die |
62 | |
63 | # tell perl where to install the libs to |
64 | echo "installstyle=\"$(mlibdir)/perl5\"" >>hints/linux.sh || die |
65 | } |
66 | |
67 | src_compile() |
68 | { |
69 | cd ${SRCDIR} |
70 | |
71 | ./Configure \ |
72 | -des \ |
73 | -Darchname=${CHOST} \ |
74 | -Doptimize="${CFLAGS}" \ |
75 | -Dcccdlflags='-fPIC' \ |
76 | -Dccdlflags='-rdynamic' \ |
77 | -Duseshrplib \ |
78 | -Dpager="/bin/less -isR" \ |
79 | -Dcf_by='Magellan' \ |
80 | -Dprefix='/usr' \ |
81 | -Dvendorprefix='/usr' \ |
82 | -Dsiteprefix='/usr' \ |
83 | -Dman1dir=/usr/share/man/man1 \ |
84 | -Dman3dir=/usr/share/man/man3 \ |
85 | -Dinstallman1dir=/usr/share/man/man1 \ |
86 | -Dinstallman3dir=/usr/share/man/man3 \ |
87 | -Dman1ext='1' \ |
88 | -Dman3ext='3pm' \ |
89 | -Dlibpth="/usr/local/$(mlibdir) /$(mlibdir) /usr/$(mlibdir)" \ |
90 | || die |
91 | |
92 | mmake || die |
93 | } |
94 | |
95 | mcore_generic_src_install() |
96 | { |
97 | cd ${SRCDIR} |
98 | |
99 | make DESTDIR=${BINDIR} install || die |
100 | minstalldocs AUTHORS Artistic Changes* Copying MANIFEST README* || die |
101 | } |