diff options
author | Daniel Bowling <swaggboi@slackware.uk> | 2020-09-12 05:58:54 +0100 |
---|---|---|
committer | Dave Woodfall <dave@slackbuilds.org> | 2020-09-12 05:58:54 +0100 |
commit | 581c850cb4c7f630bc7d9d03aad36d4e7871c2ba (patch) | |
tree | 12c7fafa17a5670afd90eec31cf00a84882aef48 /perl | |
parent | f7039168d927624fb4c8d1e4b04e9a15707e48e7 (diff) | |
download | slackbuilds-581c850cb4c7f630bc7d9d03aad36d4e7871c2ba.tar.gz |
perl/perl-Modern-Perl: Added (enable features of Modern Perl)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
Diffstat (limited to 'perl')
-rw-r--r-- | perl/perl-Modern-Perl/README | 14 | ||||
-rw-r--r-- | perl/perl-Modern-Perl/perl-Modern-Perl.SlackBuild | 107 | ||||
-rw-r--r-- | perl/perl-Modern-Perl/perl-Modern-Perl.info | 10 | ||||
-rw-r--r-- | perl/perl-Modern-Perl/slack-desc | 19 |
4 files changed, 150 insertions, 0 deletions
diff --git a/perl/perl-Modern-Perl/README b/perl/perl-Modern-Perl/README new file mode 100644 index 0000000000..e1bd96c499 --- /dev/null +++ b/perl/perl-Modern-Perl/README @@ -0,0 +1,14 @@ +Modern::Perl - enable all of the features of Modern Perl with one import + +Modern Perl programs use several modules to enable additional features +of Perl and of the CPAN. Instead of copying and pasting all of these +use lines, instead write only one: + + use Modern::Perl; + +This enables the strict and warnings pragmas, as well as all of the +features available in Perl 5.10. It also enables C3 method resolution +order as documented in perldoc mro and loads IO::File and IO::Handle +so that you may call methods on filehandles. In the future, it may +include additional core modules and pragmas (but is unlikely to +include non-core features). diff --git a/perl/perl-Modern-Perl/perl-Modern-Perl.SlackBuild b/perl/perl-Modern-Perl/perl-Modern-Perl.SlackBuild new file mode 100644 index 0000000000..107ada418a --- /dev/null +++ b/perl/perl-Modern-Perl/perl-Modern-Perl.SlackBuild @@ -0,0 +1,107 @@ +#!/usr/bin/env sh + +# Slackware build script for perl-Modern-Perl + +# Copyright 2020 Daniel Bowling <swaggboi@slackware.uk> +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=perl-Modern-Perl +VERSION=${VERSION:-1.20200211} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +SRC_PRGNAM=Modern-Perl +DOCS="README" + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $SRC_PRGNAM-$VERSION +tar xvf $CWD/$SRC_PRGNAM-$VERSION.tar.gz +cd $SRC_PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +perl Makefile.PL INSTALLDIRS=perl +make +make test +make install DESTDIR=$PKG + +mv $PKG/usr/share/man $PKG/usr/ + +( cd $PKG/usr/man + find . -type f -exec gzip -9 {} \; + for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done +) + +# Remove perllocal.pod and other special files that don't need to be installed +( cd $PKG + # Remove 'special' files + find . -name perllocal.pod \ + -o -name ".packlist" \ + -o -name "*.bs" \ + | xargs rm -f +) + +# Remove empty directories +find $PKG -depth -type d -empty -delete + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/perl/perl-Modern-Perl/perl-Modern-Perl.info b/perl/perl-Modern-Perl/perl-Modern-Perl.info new file mode 100644 index 0000000000..d05584271f --- /dev/null +++ b/perl/perl-Modern-Perl/perl-Modern-Perl.info @@ -0,0 +1,10 @@ +PRGNAM="perl-Modern-Perl" +VERSION="1.20200211" +HOMEPAGE="https://metacpan.org/pod/Modern::Perl" +DOWNLOAD="https://cpan.metacpan.org/authors/id/C/CH/CHROMATIC/Modern-Perl-1.20200211.tar.gz" +MD5SUM="2c6f7648ced3cb3451d3c73eb4e1cb24" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Daniel Bowling" +EMAIL="swaggboi@slackware.uk" diff --git a/perl/perl-Modern-Perl/slack-desc b/perl/perl-Modern-Perl/slack-desc new file mode 100644 index 0000000000..315b56ddcf --- /dev/null +++ b/perl/perl-Modern-Perl/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +perl-Modern-Perl: Modern::Perl (enable features of Modern Perl with one import) +perl-Modern-Perl: +perl-Modern-Perl: +perl-Modern-Perl: Modern Perl programs use several modules to enable additional features +perl-Modern-Perl: of Perl and of the CPAN. Instead of copying and pasting all of these +perl-Modern-Perl: use lines, instead write only one: +perl-Modern-Perl: use Modern::Perl; +perl-Modern-Perl: +perl-Modern-Perl: +perl-Modern-Perl: +perl-Modern-Perl: |