Contents of /trunk/core/perl/perl-5.28.1-r1.smage2
Parent Directory | Revision Log
Revision 31561 -
(show annotations)
(download)
Fri Nov 30 10:52:59 2018 UTC (5 years, 4 months ago) by niro
File size: 3017 byte(s)
Fri Nov 30 10:52:59 2018 UTC (5 years, 4 months ago) by niro
File size: 3017 byte(s)
auto added: ver bump to 5.28.1-r1
1 | # $Id$ |
2 | |
3 | PNAME="perl" |
4 | PVER="5.28.1" |
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="$(marchdepend) |
16 | >= sys-apps/groff-1.20 |
17 | >= sys-libs/zlib-1.2.5 |
18 | >= dev-db/db-6.2" |
19 | |
20 | SRCFILE="${PNAME}-${PVER}.tar.gz" |
21 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
22 | |
23 | EXPORT_ABI_LDFLAGS=false |
24 | sminclude multilib |
25 | msetfeature "!check" |
26 | |
27 | SRC_URI=( |
28 | #http://www.cpan.org/src/${PVER%%.*}.0/${SRCFILE} |
29 | mirror://${PNAME}/${SRCFILE} |
30 | mirror://${PNAME}/${PNAME}-5.8.7-Configure_multilib-1.patch |
31 | ) |
32 | |
33 | #UP2DATE="updatecmd ${HOMEPAGE} | grep 'download now' | sed 's/.*\[.*\]\(.*\) -.*/\1/'" |
34 | UP2DATE="updatecmd https://www.perl.org/get.html | highesttarball gz" |
35 | |
36 | src_prepare() |
37 | { |
38 | munpack ${SRCFILE} || die |
39 | cd ${SRCDIR} |
40 | |
41 | if [[ $(mlibdir) != lib ]] |
42 | then |
43 | # allow configure to run successfully on multilib builds |
44 | mpatch ${PNAME}-5.8.7-Configure_multilib-1.patch || die |
45 | fi |
46 | |
47 | # force use of system-zlib |
48 | all-abis 'sed -i "/^BUILD_ZLIB/s/True/False/" cpan/Compress-Raw-Zlib/config.in || die' |
49 | all-abis 'sed -i "/^INCLUDE/s,\./zlib-src,/usr/include," cpan/Compress-Raw-Zlib/config.in || die' |
50 | all-abis 'sed -i "/^LIB/s,\./zlib-src,/usr/lib," cpan/Compress-Raw-Zlib/config.in || die' |
51 | |
52 | # tell perl where to install the libs to |
53 | all-abis 'echo "installstyle=\"$(mlibdir)/perl5\"" >>hints/linux.sh || die' |
54 | } |
55 | |
56 | src_compile() |
57 | { |
58 | # from gentoo: |
59 | # set a hook to check for each detected library whether it actually works. |
60 | export libscheck=" |
61 | ( echo 'main(){}' > '${SRCDIR}'-$(mabi)/conftest.c && |
62 | '${CC}' -o '${SRCDIR}'-$(mabi)/conftest '${SRCDIR}'-$(mabi)/conftest.c -l\$thislib >/dev/null 2>/dev/null |
63 | ) || xxx=/dev/null" |
64 | |
65 | # filter -march from cflags |
66 | export CFLAGS=$(mfilterflag CFLAGS '-march=*') |
67 | |
68 | all-abis ./Configure \ |
69 | -des \ |
70 | -Darchname=${CHOST} \ |
71 | -Doptimize='"${CFLAGS}"' \ |
72 | -Dldflags='"${LDFLAGS}"' \ |
73 | -Dcc='"${CC}"' \ |
74 | -Dcccdlflags='-fPIC' \ |
75 | -Dccdlflags='-rdynamic' \ |
76 | -Dusethreads \ |
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 | -Dglibpth='"/$(mlibdir) /usr/$(mlibdir) "' \ |
91 | -Dlocincpth='/usr/include ' \ |
92 | || die |
93 | |
94 | mmake || die |
95 | } |
96 | |
97 | src_check() |
98 | { |
99 | mmake test_harness || die |
100 | } |
101 | |
102 | src_install() |
103 | { |
104 | mmake -j1 DESTDIR=${BINDIR} install || die |
105 | minstalldocs AUTHORS Artistic Changes* Copying MANIFEST README* || die |
106 | |
107 | # install multiarch-wrapper |
108 | if [[ $(mlibdir) != lib ]] |
109 | then |
110 | all-abis minstallexec perl /usr/bin/perl${PVER}-$(mabi) || die |
111 | mlink multiarch-wrapper /usr/bin/perl${PVER} || die |
112 | all-abis mlink perl${PVER}-$(mabi) /usr/bin/perl-$(mabi) || die |
113 | all-abis mlink perl${PVER} /usr/bin/perl || die |
114 | fi |
115 | } |