Magellan Linux

Contents of /trunk/core/perl/perl-5.14.2-r4.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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