# $Id$ PNAME="perl" PVER="5.28.1" PBUILD="r1" PCAT="dev-lang" DESCRIPTION="Larry Wall's Practical Extraction and Reporting Language." HOMEPAGE="http://www.perl.org/" DEPEND_x86_64=">= sys-apps/multiarch-wrapper-1" SPECIAL_VARS="DEPEND_x86_64" DEPEND="$(marchdepend) >= sys-apps/groff-1.20 >= sys-libs/zlib-1.2.5 >= dev-db/db-6.2" SRCFILE="${PNAME}-${PVER}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" EXPORT_ABI_LDFLAGS=false sminclude multilib msetfeature "!check" SRC_URI=( #http://www.cpan.org/src/${PVER%%.*}.0/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/${PNAME}-5.8.7-Configure_multilib-1.patch ) #UP2DATE="updatecmd ${HOMEPAGE} | grep 'download now' | sed 's/.*\[.*\]\(.*\) -.*/\1/'" UP2DATE="updatecmd https://www.perl.org/get.html | highesttarball gz" src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} if [[ $(mlibdir) != lib ]] then # allow configure to run successfully on multilib builds mpatch ${PNAME}-5.8.7-Configure_multilib-1.patch || die fi # tell perl where to install the libs to all-abis 'echo "installstyle=\"$(mlibdir)/perl5\"" >>hints/linux.sh || die' } src_compile() { # from gentoo: # set a hook to check for each detected library whether it actually works. export libscheck=" ( echo 'main(){}' > '${SRCDIR}'-$(mabi)/conftest.c && $(mabi-cc) -o '${SRCDIR}'-$(mabi)/conftest '${SRCDIR}'-$(mabi)/conftest.c -l\$thislib >/dev/null 2>/dev/null ) || xxx=/dev/null" # filter -march from cflags export CFLAGS=$(mfilterflag CFLAGS '-march=*') all-abis ./Configure \ -des \ -Darchname=${CHOST} \ -Doptimize='"${CFLAGS}"' \ -Dldflags='"${LDFLAGS}"' \ -Dcc='"${CC}"' \ -Dcccdlflags='-fPIC' \ -Dccdlflags='-rdynamic' \ -Dusethreads \ -Duseshrplib \ -Dpager='"/bin/less -isR"' \ -Dcf_by='Magellan' \ -Dprefix='/usr' \ -Dvendorprefix='/usr' \ -Dsiteprefix='/usr' \ -Dman1dir=/usr/share/man/man1 \ -Dman3dir=/usr/share/man/man3 \ -Dinstallman1dir=/usr/share/man/man1 \ -Dinstallman3dir=/usr/share/man/man3 \ -Dman1ext='1' \ -Dman3ext='3pm' \ -Dlibpth='"/usr/local/$(mlibdir) /$(mlibdir) /usr/$(mlibdir) "' \ -Dglibpth='"/$(mlibdir) /usr/$(mlibdir) "' \ -Dlocincpth='/usr/include ' \ || die mmake || die } src_check() { mmake test_harness || die } src_install() { mmake -j1 DESTDIR=${BINDIR} install || die minstalldocs AUTHORS Artistic Changes* Copying MANIFEST README* || die # install multiarch-wrapper if [[ $(mlibdir) != lib ]] then all-abis minstallexec perl /usr/bin/perl${PVER}-$(mabi) || die mlink multiarch-wrapper /usr/bin/perl${PVER} || die all-abis mlink perl${PVER}-$(mabi) /usr/bin/perl-$(mabi) || die all-abis mlink perl${PVER} /usr/bin/perl || die fi }