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