Magellan Linux

Contents of /smage/trunk/core/perl/perl-5.16.0-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3647 - (show annotations) (download)
Fri Jul 13 15:11:50 2012 UTC (11 years, 11 months ago) by niro
File size: 2875 byte(s)
auto added: ver bump to 5.16.0-r1
1 # $Id$
2
3 PNAME="perl"
4 PVER="5.16.0"
5 PBUILD="r1"
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="\$(eval echo \\\$DEPEND_\${ARCH/i*86/x86} | tr ';' '\n')
16 >= sys-apps/groff-1.20
17 >= sys-libs/zlib-1.2.5"
18
19 SRCFILE="${PNAME}-${PVER}.tar.gz"
20 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
21
22 sminclude multilib
23 msetfeature "!check"
24
25 SRC_URI=(
26 http://ftp.funet.fi/pub/CPAN/src/${SRCFILE}
27 mirror://${PNAME}/${SRCFILE}
28 mirror://${PNAME}/${PNAME}-5.10.1-picdl.patch
29 mirror://${PNAME}/${PNAME}-5.8.7-sharedlinker.patch
30 mirror://${PNAME}/${PNAME}-5.8.7-Configure_multilib-1.patch
31 mirror://${PNAME}/${PNAME}-5.12.1-libc_lib64-1.patch
32 )
33
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
102 # install multiarch-wrapper
103 if [[ $(mlibdir) != lib ]]
104 then
105 all-abis minstallexec perl /usr/bin/perl${PVER}-$(mabi) || die
106 mlink multiarch-wrapper /usr/bin/perl${PVER} || die
107 all-abis mlink perl${PVER}-$(mabi) /usr/bin/perl-$(mabi) || die
108 all-abis mlink perl${PVER} /usr/bin/perl || die
109 fi
110 }