Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 31562 - (hide annotations) (download)
Fri Nov 30 12:12:02 2018 UTC (5 years, 5 months ago) by niro
File size: 2713 byte(s)
-remove obsolete zlib hack and use mabi-cc()
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 niro 31561 EXPORT_ABI_LDFLAGS=false
24 niro 31547 sminclude multilib
25     msetfeature "!check"
26    
27     SRC_URI=(
28 niro 31548 #http://www.cpan.org/src/${PVER%%.*}.0/${SRCFILE}
29 niro 31547 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     # tell perl where to install the libs to
48     all-abis 'echo "installstyle=\"$(mlibdir)/perl5\"" >>hints/linux.sh || die'
49     }
50    
51     src_compile()
52     {
53 niro 31550 # from gentoo:
54     # set a hook to check for each detected library whether it actually works.
55     export libscheck="
56 niro 31558 ( echo 'main(){}' > '${SRCDIR}'-$(mabi)/conftest.c &&
57 niro 31562 $(mabi-cc) -o '${SRCDIR}'-$(mabi)/conftest '${SRCDIR}'-$(mabi)/conftest.c -l\$thislib >/dev/null 2>/dev/null
58 niro 31550 ) || xxx=/dev/null"
59    
60 niro 31555 # filter -march from cflags
61     export CFLAGS=$(mfilterflag CFLAGS '-march=*')
62    
63 niro 31547 all-abis ./Configure \
64     -des \
65 niro 31561 -Darchname=${CHOST} \
66 niro 31547 -Doptimize='"${CFLAGS}"' \
67 niro 31550 -Dldflags='"${LDFLAGS}"' \
68 niro 31547 -Dcc='"${CC}"' \
69     -Dcccdlflags='-fPIC' \
70     -Dccdlflags='-rdynamic' \
71     -Dusethreads \
72     -Duseshrplib \
73     -Dpager='"/bin/less -isR"' \
74     -Dcf_by='Magellan' \
75     -Dprefix='/usr' \
76     -Dvendorprefix='/usr' \
77     -Dsiteprefix='/usr' \
78     -Dman1dir=/usr/share/man/man1 \
79     -Dman3dir=/usr/share/man/man3 \
80     -Dinstallman1dir=/usr/share/man/man1 \
81     -Dinstallman3dir=/usr/share/man/man3 \
82     -Dman1ext='1' \
83     -Dman3ext='3pm' \
84 niro 31550 -Dlibpth='"/usr/local/$(mlibdir) /$(mlibdir) /usr/$(mlibdir) "' \
85     -Dglibpth='"/$(mlibdir) /usr/$(mlibdir) "' \
86     -Dlocincpth='/usr/include ' \
87 niro 31547 || 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     }