Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 31550 - (hide annotations) (download)
Fri Nov 30 09:09:19 2018 UTC (5 years, 5 months ago) by niro
File size: 3142 byte(s)
-fixed broken dynlib detection of perl's Configure script on multilib systems
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.10.1-picdl.patch
30     mirror://${PNAME}/${PNAME}-5.8.7-sharedlinker.patch
31     mirror://${PNAME}/${PNAME}-5.8.7-Configure_multilib-1.patch
32     )
33    
34     #UP2DATE="updatecmd ${HOMEPAGE} | grep 'download now' | sed 's/.*\[.*\]\(.*\) -.*/\1/'"
35     UP2DATE="updatecmd https://www.perl.org/get.html | highesttarball gz"
36    
37     src_prepare()
38     {
39     munpack ${SRCFILE} || die
40     cd ${SRCDIR}
41    
42     # enable dynamic loader
43     mpatch ${PNAME}-5.10.1-picdl.patch || die
44    
45     # and proper ldflags for shrlibs
46     mpatch ${PNAME}-5.8.7-sharedlinker.patch || die
47    
48     if [[ $(mlibdir) != lib ]]
49     then
50     # allow configure to run successfully on multilib builds
51     mpatch ${PNAME}-5.8.7-Configure_multilib-1.patch || die
52     fi
53    
54     # force use of system-zlib
55     all-abis 'sed -i "/^BUILD_ZLIB/s/True/False/" cpan/Compress-Raw-Zlib/config.in || die'
56     all-abis 'sed -i "/^INCLUDE/s,\./zlib-src,/usr/include," cpan/Compress-Raw-Zlib/config.in || die'
57     all-abis 'sed -i "/^LIB/s,\./zlib-src,/usr/lib," cpan/Compress-Raw-Zlib/config.in || die'
58    
59     # tell perl where to install the libs to
60     all-abis 'echo "installstyle=\"$(mlibdir)/perl5\"" >>hints/linux.sh || die'
61     }
62    
63     src_compile()
64     {
65 niro 31550 # from gentoo:
66     # set a hook to check for each detected library whether it actually works.
67     export libscheck="
68     ( echo 'main(){}' > '${SRCDIR}'/conftest.c &&
69     ${CC} -o '${SRCDIR}'/conftest '${SRCDIR}'/conftest.c -l\$thislib >/dev/null 2>/dev/null
70     ) || xxx=/dev/null"
71    
72 niro 31547 all-abis ./Configure \
73     -des \
74     -Darchname=${CHOST} \
75     -Doptimize='"${CFLAGS}"' \
76 niro 31550 -Dldflags='"${LDFLAGS}"' \
77 niro 31547 -Dcc='"${CC}"' \
78     -Dcccdlflags='-fPIC' \
79     -Dccdlflags='-rdynamic' \
80     -Dusethreads \
81     -Duseshrplib \
82     -Dpager='"/bin/less -isR"' \
83     -Dcf_by='Magellan' \
84     -Dprefix='/usr' \
85     -Dvendorprefix='/usr' \
86     -Dsiteprefix='/usr' \
87     -Dman1dir=/usr/share/man/man1 \
88     -Dman3dir=/usr/share/man/man3 \
89     -Dinstallman1dir=/usr/share/man/man1 \
90     -Dinstallman3dir=/usr/share/man/man3 \
91     -Dman1ext='1' \
92     -Dman3ext='3pm' \
93 niro 31550 -Dlibpth='"/usr/local/$(mlibdir) /$(mlibdir) /usr/$(mlibdir) "' \
94     -Dglibpth='"/$(mlibdir) /usr/$(mlibdir) "' \
95     -Dlocincpth='/usr/include ' \
96 niro 31547 || die
97    
98     mmake || die
99     }
100    
101     src_check()
102     {
103     mmake test_harness || die
104     }
105    
106     src_install()
107     {
108     mmake -j1 DESTDIR=${BINDIR} install || die
109     minstalldocs AUTHORS Artistic Changes* Copying MANIFEST README* || die
110    
111     # install multiarch-wrapper
112     if [[ $(mlibdir) != lib ]]
113     then
114     all-abis minstallexec perl /usr/bin/perl${PVER}-$(mabi) || die
115     mlink multiarch-wrapper /usr/bin/perl${PVER} || die
116     all-abis mlink perl${PVER}-$(mabi) /usr/bin/perl-$(mabi) || die
117     all-abis mlink perl${PVER} /usr/bin/perl || die
118     fi
119     }