Magellan Linux

Annotation of /trunk/core/perl/perl-5.28.1-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 31558 - (hide annotations) (download)
Fri Nov 30 10:25:44 2018 UTC (5 years, 5 months ago) by niro
File size: 2990 byte(s)
-evaluate things right
1 niro 31547 # $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     sminclude multilib
24     msetfeature "!check"
25    
26     SRC_URI=(
27 niro 31548 #http://www.cpan.org/src/${PVER%%.*}.0/${SRCFILE}
28 niro 31547 mirror://${PNAME}/${SRCFILE}
29     mirror://${PNAME}/${PNAME}-5.8.7-Configure_multilib-1.patch
30     )
31    
32     #UP2DATE="updatecmd ${HOMEPAGE} | grep 'download now' | sed 's/.*\[.*\]\(.*\) -.*/\1/'"
33     UP2DATE="updatecmd https://www.perl.org/get.html | highesttarball gz"
34    
35     src_prepare()
36     {
37     munpack ${SRCFILE} || die
38     cd ${SRCDIR}
39    
40     if [[ $(mlibdir) != lib ]]
41     then
42     # allow configure to run successfully on multilib builds
43     mpatch ${PNAME}-5.8.7-Configure_multilib-1.patch || die
44     fi
45    
46     # force use of system-zlib
47     all-abis 'sed -i "/^BUILD_ZLIB/s/True/False/" cpan/Compress-Raw-Zlib/config.in || die'
48     all-abis 'sed -i "/^INCLUDE/s,\./zlib-src,/usr/include," cpan/Compress-Raw-Zlib/config.in || die'
49     all-abis 'sed -i "/^LIB/s,\./zlib-src,/usr/lib," cpan/Compress-Raw-Zlib/config.in || die'
50    
51     # tell perl where to install the libs to
52     all-abis 'echo "installstyle=\"$(mlibdir)/perl5\"" >>hints/linux.sh || die'
53     }
54    
55     src_compile()
56     {
57 niro 31550 # from gentoo:
58     # set a hook to check for each detected library whether it actually works.
59     export libscheck="
60 niro 31558 ( echo 'main(){}' > '${SRCDIR}'-$(mabi)/conftest.c &&
61     ${CC} -o '${SRCDIR}'-$(mabi)/conftest '${SRCDIR}'-$(mabi)/conftest.c -l\$thislib >/dev/null 2>/dev/null
62 niro 31550 ) || xxx=/dev/null"
63    
64 niro 31555 # filter -march from cflags
65     export CFLAGS=$(mfilterflag CFLAGS '-march=*')
66    
67 niro 31547 all-abis ./Configure \
68     -des \
69 niro 31555 -Darchname=${CHOST} \
70 niro 31547 -Doptimize='"${CFLAGS}"' \
71 niro 31550 -Dldflags='"${LDFLAGS}"' \
72 niro 31547 -Dcc='"${CC}"' \
73     -Dcccdlflags='-fPIC' \
74     -Dccdlflags='-rdynamic' \
75     -Dusethreads \
76     -Duseshrplib \
77     -Dpager='"/bin/less -isR"' \
78     -Dcf_by='Magellan' \
79     -Dprefix='/usr' \
80     -Dvendorprefix='/usr' \
81     -Dsiteprefix='/usr' \
82     -Dman1dir=/usr/share/man/man1 \
83     -Dman3dir=/usr/share/man/man3 \
84     -Dinstallman1dir=/usr/share/man/man1 \
85     -Dinstallman3dir=/usr/share/man/man3 \
86     -Dman1ext='1' \
87     -Dman3ext='3pm' \
88 niro 31550 -Dlibpth='"/usr/local/$(mlibdir) /$(mlibdir) /usr/$(mlibdir) "' \
89     -Dglibpth='"/$(mlibdir) /usr/$(mlibdir) "' \
90     -Dlocincpth='/usr/include ' \
91 niro 31547 || 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     }