Magellan Linux

Contents of /smage/branches/alx07x-unstable/core/perl/perl-5.32.0-r6.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 14578 - (show annotations) (download)
Tue Aug 4 11:22:10 2020 UTC (3 years, 8 months ago) by niro
File size: 2842 byte(s)
-release branches/alx07x-unstable
1 # $Id$
2
3 PNAME="perl"
4 PVER="5.32.0"
5 PBUILD="r6"
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 SDEPEND=">= sys-libs/zlib-dev-1.2.5
21 >= dev-db/db-dev-6.2"
22
23 SRCFILE="${PNAME}-${PVER}.tar.gz"
24 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
25
26 sminclude multilib
27 msetfeature "!check"
28
29 SRC_URI=(
30 http://www.cpan.org/src/${PVER%%.*}.0/${SRCFILE}
31 mirror://${PNAME}/${SRCFILE}
32 mirror://${PNAME}/${PNAME}-5.8.7-Configure_multilib-1.patch
33 )
34
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 if [[ $(mlibdir) != lib ]]
43 then
44 # allow configure to run successfully on multilib builds
45 mpatch ${PNAME}-5.8.7-Configure_multilib-1.patch || die
46 fi
47
48 # tell perl where to install the libs to
49 all-abis 'echo "installstyle=\"$(mlibdir)/perl5\"" >>hints/linux.sh || die'
50 }
51
52 src_compile()
53 {
54 local myopts
55
56 # remove -as-needed
57 export LDFLAGS="${LDFLAGS//-Wl,--as-needed}"
58
59 # from gentoo:
60 # set a hook to check for each detected library whether it actually works.
61 export libscheck="
62 ( echo 'main(){}' > '${SRCDIR}'-$(mabi)/conftest.c &&
63 $(mabi-cc) -o '${SRCDIR}'-$(mabi)/conftest '${SRCDIR}'-$(mabi)/conftest.c -l\$thislib >/dev/null 2>/dev/null
64 ) || xxx=/dev/null"
65
66 # filter -march from cflags
67 export CFLAGS=$(mfilterflag CFLAGS '-march=*')
68
69 if [[ ${ARCH} = x86_64 ]]
70 then
71 myopts+=" -Dcccdlflags='-fPIC'"
72 fi
73
74 all-abis ./Configure \
75 -des \
76 -Darchname=${CHOST} \
77 -Doptimize='"${CFLAGS}"' \
78 -Dlddlflags='"-shared ${LDFLAGS}"' \
79 -Dldflags='"${LDFLAGS}"' \
80 -Dcc='"${CC}"' \
81 -Dccdlflags='-rdynamic' \
82 -Dusethreads \
83 -Duseshrplib \
84 -Dpager='"/bin/less -isR"' \
85 -Dcf_by='Magellan' \
86 -Dprefix='/usr' \
87 -Dvendorprefix='/usr' \
88 -Dsiteprefix='/usr' \
89 -Dman1dir=/usr/share/man/man1 \
90 -Dman3dir=/usr/share/man/man3 \
91 -Dinstallman1dir=/usr/share/man/man1 \
92 -Dinstallman3dir=/usr/share/man/man3 \
93 -Dman1ext='1' \
94 -Dman3ext='3pm' \
95 -Dlibpth='"/usr/local/$(mlibdir) /$(mlibdir) /usr/$(mlibdir) "' \
96 -Dglibpth='"/$(mlibdir) /usr/$(mlibdir) "' \
97 -Dlocincpth='/usr/include ' \
98 ${myopts} \
99 || die
100
101 mmake || die
102 }
103
104 src_check()
105 {
106 mmake test_harness || die
107 }
108
109 src_install()
110 {
111 mmake -j1 DESTDIR=${BINDIR} install || die
112 minstalldocs AUTHORS Artistic Changes* Copying MANIFEST README* || die
113
114 # install multiarch-wrapper
115 if [[ $(mlibdir) != lib ]]
116 then
117 all-abis minstallexec perl /usr/bin/perl${PVER}-$(mabi) || die
118 mlink multiarch-wrapper /usr/bin/perl${PVER} || die
119 all-abis mlink perl${PVER}-$(mabi) /usr/bin/perl-$(mabi) || die
120 all-abis mlink perl${PVER} /usr/bin/perl || die
121 fi
122 }