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