diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2018-05-28 19:12:29 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-05-31 23:39:35 +0200 |
commit | 646a5c1cbfd95873950a87b5f75d52073a967023 (patch) | |
tree | b8b8d2ab3b0d432ea69ad1a64d1c789649d65020 /source/d/perl/perl.SlackBuild | |
parent | d31c50870d0bee042ce660e445c9294a59a3a65b (diff) | |
download | current-646a5c1cbfd95873950a87b5f75d52073a967023.tar.gz |
Mon May 28 19:12:29 UTC 201820180528191229
a/pkgtools-15.0-noarch-13.txz: Rebuilt.
installpkg: default line length for --terselength is the number of columns.
removepkg: added --terse mode.
upgradepkg: default line length for --terselength is the number of columns.
upgradepkg: accept -option in addition to --option.
ap/vim-8.1.0026-x86_64-1.txz: Upgraded.
d/bison-3.0.5-x86_64-1.txz: Upgraded.
e/emacs-26.1-x86_64-1.txz: Upgraded.
kde/kopete-4.14.3-x86_64-8.txz: Rebuilt.
Recompiled against libidn-1.35.
n/conntrack-tools-1.4.5-x86_64-1.txz: Upgraded.
n/libnetfilter_conntrack-1.0.7-x86_64-1.txz: Upgraded.
n/libnftnl-1.1.0-x86_64-1.txz: Upgraded.
n/links-2.16-x86_64-2.txz: Rebuilt.
Rebuilt to enable X driver for -g mode.
n/lynx-2.8.9dev.19-x86_64-1.txz: Upgraded.
n/nftables-0.8.5-x86_64-1.txz: Upgraded.
n/p11-kit-0.23.11-x86_64-1.txz: Upgraded.
n/ulogd-2.0.7-x86_64-1.txz: Upgraded.
n/whois-5.3.1-x86_64-1.txz: Upgraded.
xap/network-manager-applet-1.8.12-x86_64-1.txz: Upgraded.
xap/vim-gvim-8.1.0026-x86_64-1.txz: Upgraded.
Diffstat (limited to 'source/d/perl/perl.SlackBuild')
-rwxr-xr-x | source/d/perl/perl.SlackBuild | 227 |
1 files changed, 141 insertions, 86 deletions
diff --git a/source/d/perl/perl.SlackBuild b/source/d/perl/perl.SlackBuild index 1210b6dc..94518bfe 100755 --- a/source/d/perl/perl.SlackBuild +++ b/source/d/perl/perl.SlackBuild @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -# Copyright 2009, 2010, 2011, 2012, 2013, 2015, 2016 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2009, 2010, 2011, 2012, 2013, 2015, 2016, 2017, 2018 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -20,12 +20,14 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - # originally by: David Cantrell <david@slackware.com> # maintained by: <volkerdi@slackware.com> -VERSION=5.22.2 -BUILD=${BUILD:-1} +cd $(dirname $0) ; CWD=$(pwd) + +PKGNAM=perl +VERSION=5.26.2 +BUILD=${BUILD:-3} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then @@ -37,20 +39,33 @@ if [ -z "$ARCH" ]; then esac fi -NUMJOBS=${NUMJOBS:--j6} +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz" + exit 0 +fi + +NUMJOBS=${NUMJOBS:-" -j7 "} + +# Set to "yes" to run tests: +MAKETEST=${MAKETEST:-no} -CWD=$(pwd) TMP=${TMP:-/tmp} PKG=$TMP/package-perl # Additional required modules: -DBDMYSQL=4.033 -DBI=1.636 -URI=1.71 -XMLPARSER=2.44 -XMLSIMPLE=2.22 +DBDMYSQL=4.046 +DBI=1.641 GETTEXT=1.07 -TERMREADKEY=2.33 +TERMREADKEY=2.37 +URI=1.74 +XMLPARSER=2.44 +XMLSIMPLE=2.25 +AUTHENSASL=2.16 +MIMEBASE64=3.15 +LIBNET=3.11 if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mcpu=i686" @@ -84,7 +99,7 @@ mkdir -p $PKG # Extract the source code: cd $TMP rm -rf perl-$VERSION -tar xvf $CWD/perl-$VERSION.tar.?z* || exit 1 +tar xvf $CWD/perl-$VERSION.tar.?z || exit 1 # Change into the source directory: cd perl-$VERSION @@ -140,30 +155,25 @@ fi -Ubincompat5005 \ -Uversiononly \ -Dpager='/usr/bin/less -isr' \ - -Darchname=$ARCH-linux + -Darchname=$ARCH-linux || exit 1 # -Duseshrplib creates libperl.so # -Ubincompat5005 helps create DSO -> libperl.so -# Kludge for gcc-4.2.4's needlessly changed output: -cat makefile | grep -v '\<command-line\>' > foo -mv foo makefile - # Build perl make $NUMJOBS || exit 1 -make test +if [ "$MAKETEST" = "yes" ]; then + make test || exit 1 +fi # Install perl (needed to build modules): -make install +make install || exit 1 ( cd /usr/bin ln -sf perl$VERSION perl - ln -sf c2ph pstruct ) -#mkdir -p /usr/lib${LIBDIRSUFFIX}/perl5/vendor_perl/${VERSION}/${ARCH}-linux-thread-multi # Install perl package: -make install DESTDIR=$PKG -#mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/perl5/vendor_perl/${VERSION}/${ARCH}-linux-thread-multi +make install DESTDIR=$PKG || exit 1 # Add additional modules: ( cd ext @@ -171,58 +181,69 @@ make install DESTDIR=$PKG cd DBI-${DBI} chown -R root:root . perl Makefile.PL INSTALLDIRS=vendor - make - make test - make install - make install DESTDIR=$PKG + make || exit 1 + if [ "$MAKETEST" = "yes" ]; then + make test || exit 1 + fi + make install || exit 1 + make install DESTDIR=$PKG || exit 1 mkdir -p $PKG/usr/doc/perl-$VERSION/DBI-${DBI} cp -a README* $PKG/usr/doc/perl-$VERSION/DBI-${DBI} chmod 644 $PKG/usr/doc/perl-$VERSION/DBI-${DBI}/README* - ) + ) || exit 1 ( tar xzvf $CWD/DBD-mysql-${DBDMYSQL}.tar.gz cd DBD-mysql-${DBDMYSQL} + zcat $CWD/DBD-mysql.net_buffer_length.diff.gz | patch -p1 --verbose || exit 1 chown -R root:root . perl Makefile.PL INSTALLDIRS=vendor - make - make test - make install - make install DESTDIR=$PKG + make || exit 1 + if [ "$MAKETEST" = "yes" ]; then + make test || exit 1 + fi + make install || exit 1 + make install DESTDIR=$PKG || exit 1 mkdir -p $PKG/usr/doc/perl-$VERSION/DBD-mysql-${DBDMYSQL} cp -a INSTALL.html README* TODO $PKG/usr/doc/perl-$VERSION/DBD-mysql-${DBDMYSQL} chmod 644 $PKG/usr/doc/perl-$VERSION/DBD-mysql-${DBDMYSQL}/* - ) + ) || exit 1 ( tar xzvf $CWD/XML-Parser-${XMLPARSER}.tar.gz cd XML-Parser-${XMLPARSER} chown -R root:root . - perl Makefile.PL INSTALLDIRS=vendor - make - make test - make install - make install DESTDIR=$PKG + perl -I . Makefile.PL INSTALLDIRS=vendor + make || exit 1 + if [ "$MAKETEST" = "yes" ]; then + make test || exit 1 + fi + make install || exit 1 + make install DESTDIR=$PKG || exit 1 mkdir -p $PKG/usr/doc/perl-$VERSION/XML-Parser-${XMLPARSER} cp -a README* $PKG/usr/doc/perl-$VERSION/XML-Parser-${XMLPARSER} chmod 644 $PKG/usr/doc/perl-$VERSION/XML-Parser-${XMLPARSER}/* - ) + ) || exit 1 ( tar xzvf $CWD/XML-Simple-${XMLSIMPLE}.tar.gz cd XML-Simple-${XMLSIMPLE} chown -R root:root . perl Makefile.PL INSTALLDIRS=vendor - make - make test - make install - make install DESTDIR=$PKG + make || exit 1 + if [ "$MAKETEST" = "yes" ]; then + make test || exit 1 + fi + make install || exit 1 + make install DESTDIR=$PKG || exit 1 mkdir -p $PKG/usr/doc/perl-$VERSION/XML-Simple${XMLSIMPLE} cp -a README* $PKG/usr/doc/perl-$VERSION/XML-Simple${XMLSIMPLE} chmod 644 $PKG/usr/doc/perl-$VERSION/XML-Simple${XMLSIMPLE}/* - ) + ) || exit 1 ( tar xzvf $CWD/URI-${URI}.tar.gz cd URI-${URI} chown -R root:root . perl Makefile.PL INSTALLDIRS=vendor - make - make test - make install - make install DESTDIR=$PKG + make || exit 1 + if [ "$MAKETEST" = "yes" ]; then + make test || exit 1 + fi + make install || exit 1 + make install DESTDIR=$PKG || exit 1 mkdir -p $PKG/usr/doc/perl-$VERSION/URI-${URI} cp -a README* $PKG/usr/doc/perl-$VERSION/URI-${URI} chmod 644 $PKG/usr/doc/perl-$VERSION/URI-${URI}/* @@ -231,27 +252,76 @@ make install DESTDIR=$PKG cd Locale-gettext-${GETTEXT} chown -R root:root . perl Makefile.PL INSTALLDIRS=vendor - make - make test - make install - make install DESTDIR=$PKG + make || exit 1 + if [ "$MAKETEST" = "yes" ]; then + make test || exit 1 + fi + make install || exit 1 + make install DESTDIR=$PKG || exit 1 mkdir -p $PKG/usr/doc/perl-$VERSION/gettext-${GETTEXT} cp -a README* $PKG/usr/doc/perl-$VERSION/gettext-${GETTEXT} chmod 644 $PKG/usr/doc/perl-$VERSION/gettext-${GETTEXT}/* - ) + ) || exit 1 ( tar xzvf $CWD/TermReadKey-${TERMREADKEY}.tar.gz cd TermReadKey-${TERMREADKEY} chown -R root:root . perl Makefile.PL INSTALLDIRS=vendor - make - make test - make install - make install DESTDIR=$PKG + make || exit 1 + if [ "$MAKETEST" = "yes" ]; then + make test || exit 1 + fi + make install || exit 1 + make install DESTDIR=$PKG || exit 1 mkdir -p $PKG/usr/doc/perl-$VERSION/TermReadKey-${TERMREADKEY} cp -a README* $PKG/usr/doc/perl-$VERSION/TermReadKey-${TERMREADKEY} chmod 644 $PKG/usr/doc/perl-$VERSION/TermReadKey-${TERMREADKEY}/* - ) -) + ) || exit 1 + ( tar xzvf $CWD/Authen-SASL-${AUTHENSASL}.tar.gz + cd Authen-SASL-${AUTHENSASL} + chown -R root:root . + perl -I . Makefile.PL INSTALLDIRS=vendor + make || exit 1 + if [ "$MAKETEST" = "yes" ]; then + make test || exit 1 + fi + make install || exit 1 + make install DESTDIR=$PKG || exit 1 + mkdir -p $PKG/usr/doc/perl-$VERSION/Authen-SASL-${AUTHENSASL} + cp -a README* META.yml $PKG/usr/doc/perl-$VERSION/Authen-SASL-${AUTHENSASL} + chmod 644 $PKG/usr/doc/perl-$VERSION/Authen-SASL-${AUTHENSASL}/* + ) || exit 1 + ( tar xzvf $CWD/MIME-Base64-${MIMEBASE64}.tar.gz + cd MIME-Base64-${MIMEBASE64} + chown -R root:root . + perl Makefile.PL INSTALLDIRS=vendor + make || exit 1 + if [ "$MAKETEST" = "yes" ]; then + make test || exit 1 + fi + make install || exit 1 + make install DESTDIR=$PKG || exit 1 + mkdir -p $PKG/usr/doc/perl-$VERSION/MIME-Base64-${MIMEBASE64} + cp -a README* $PKG/usr/doc/perl-$VERSION/MIME-Base64-${MIMEBASE64} + chmod 644 $PKG/usr/doc/perl-$VERSION/MIME-Base64-${MIMEBASE64}/* + ) || exit 1 + ( tar xzvf $CWD/libnet-${LIBNET}.tar.gz + cd libnet-${LIBNET} + zcat $CWD/libnet-3.08-Do-not-create-Net-libnet.cfg.patch.gz | patch -p1 --verbose || exit 1 + chown -R root:root . + echo | perl Makefile.PL \ + PREFIX=/usr \ + INSTALLDIRS=vendor + make || exit 1 + if [ "$MAKETEST" = "yes" ]; then + make test || exit 1 + fi + make install || exit 1 + make install DESTDIR=$PKG || exit 1 + mkdir -p $PKG/usr/doc/perl-$VERSION/libnet-${LIBNET} + cp -a Artistic Changes Copying INSTALL LICENCE README $PKG/usr/doc/perl-$VERSION/libnet-${LIBNET} + chmod 644 $PKG/usr/doc/perl-$VERSION/libnet-${LIBNET}/* + ) || exit 1 +) || exit 1 # Strip everything: ( cd $PKG @@ -263,12 +333,12 @@ make install DESTDIR=$PKG # I haven't had any requests for them, but would be willing # to consider adding one or both to the package if anyone # actually needs them for some reason. -#make microperl +#make microperl || exit 1 # Symlinks that replace hard links ( cd $PKG/usr/bin ln -sf perl$VERSION perl - ln -sf c2ph pstruct ) +) # Install documentation mkdir -p $PKG/usr/doc/perl-$VERSION @@ -280,7 +350,8 @@ cp -a \ # We follow LSB with symlinks in /usr/share: ( cd $PKG/usr/share - mv man .. ) + mv man .. +) ( cd $PKG/usr/man/man1 mkdir foo cp *.1 foo @@ -288,40 +359,24 @@ cp -a \ mv foo/* . rmdir foo gzip -9 * - ln -sf c2ph.1.gz pstruct.1.gz ) +) ( cd $PKG/usr/man/man3 - gzip -9 * ) + gzip -9 * +) chmod 755 $PKG/usr/bin/* chmod 644 $PKG/usr/man/man?/* -# This file shouldn't get clobbered: +# Don't ship a perllocal.pod populated with vendor_perl additions. The file is +# meant for locally added perl modules: if [ -r $PKG/usr/lib${LIBDIRSUFFIX}/perl5/perllocal.pod ]; then - mv $PKG/usr/lib${LIBDIRSUFFIX}/perl5/perllocal.pod $PKG/usr/lib${LIBDIRSUFFIX}/perl5/perllocal.pod.new + mv $PKG/usr/lib${LIBDIRSUFFIX}/perl5/perllocal.pod $PKG/usr/lib${LIBDIRSUFFIX}/perl5/vendor_perl.pod fi # Insert the slack-desc: mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc - -cat << EOF | sed -e "s#/lib/#/lib${LIBDIRSUFFIX}/#" | sed -e "s#i486#$ARCH#" \ - > $PKG/install/doinst.sh -#!/bin/sh -config() { - NEW="\$1" - OLD="\$(dirname \$NEW)/\$(basename \$NEW .new)" - # If there's no config file by that name, mv it over: - if [ ! -r \$OLD ]; then - mv \$NEW \$OLD - elif [ "\$(cat \$OLD | md5sum)" = "\$(cat \$NEW | md5sum)" ]; then # toss the redundant copy - rm \$NEW - fi - # Otherwise, we leave the .new copy for the admin to consider... -} -config usr/lib/perl5/perllocal.pod.new -EOF - # Build the package: cd $PKG /sbin/makepkg -l y -c n $TMP/perl-$VERSION-$ARCH-$BUILD.txz |