summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien2018-11-05 15:06:39 +0100
committerDamien2018-11-05 19:09:16 +0100
commita429f526f48722ac7081b8888b06b0efa2394ac3 (patch)
tree7cc89e165caf7addb08243eaa0a60fdaf010b477
downloadaur-a429f526f48722ac7081b8888b06b0efa2394ac3.tar.gz
initial commit
* import perl PKGBUILD from ArchLinux * adjust PKGBUILD for cperl
-rw-r--r--.SRCINFO31
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD120
-rw-r--r--fix-installman.patch40
-rw-r--r--perlbin.csh15
-rw-r--r--perlbin.fish10
-rwxr-xr-xperlbin.sh18
7 files changed, 237 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..e155c701ac37
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,31 @@
+pkgbase = cperl
+ pkgdesc = A highly capable, feature-rich programming language
+ pkgver = 5.28.1
+ pkgrel = 1
+ url = https://github.com/perl11/cperl
+ arch = x86_64
+ arch = i686
+ license = GPL
+ license = PerlArtistic
+ depends = gdbm
+ depends = db
+ depends = glibc
+ options = makeflags
+ options = !purge
+ options = emptydirs
+ source = https://github.com/perl11/cperl/releases/download/cperl-5.28.1/cperl-5.28.1.tar.xz
+ source = https://github.com/perl11/cperl/releases/download/cperl-5.28.1/cperl-5.28.1.tar.xz.asc
+ source = perlbin.sh
+ source = perlbin.csh
+ source = perlbin.fish
+ source = fix-installman.patch
+ validpgpkeys = 2895A881D34270FABFE8F747B4F63339E65D6414
+ sha512sums = 0073aeaddb088d8643b63395822abb7997eb1ebdf3140e0312add6a3b3b2d1c16f218746f2658f066ce0d1a64d656b698018e199e03012a48aa84bd4f37a9c31
+ sha512sums = SKIP
+ sha512sums = 37c20b56b9aa531964cf46571a1d19aaf8b8c898c76123e0d73d756a18334d7d4afdd46ab41fd9de110896258453efe3042ba6d07584976a43b7bb601f2ad5a0
+ sha512sums = a587e7aac3ff7b58d859271ac316ea99702e298e53872fd33b382b2bfd6d39b5d1b66ed540930bf7df8c003d414f74640c9215e0572810423440e63277fb21a9
+ sha512sums = 93adc830e46556f197301c840aed605828ffdbe42e7e859dc9fe8d19fec46300bc4a0f356ba752f5a2d55922663b006bd1c82c4a5cde9d2ee4b0bbe818054e2a
+ sha512sums = 7f261483d9a3cfe5983d2f14e3c7f4052913ab346b4ef06edfa0f25de01ccae042cbd3011acdb6d46e92ff11bbf04eff68fcf1e6139b7928a0d747158b94df31
+
+pkgname = cperl
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..a627116255c9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+cperl-*.pkg.tar.xz
+cperl-*.tar.xz
+cperl-*.tar.xz.asc
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..49b232546065
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,120 @@
+# Maintainer: Damien Molinier <damien-43\N{COMMERCIAL AT}gmx.fr>
+# Derived from perl PKGBUILD
+
+# Do you want to install manpages?
+INSTALLMANS=0 # disable because most are already provided by Perl
+
+pkgname=cperl
+pkgver=5.28.1
+_baseversion="${pkgver%.*}"
+pkgrel=1
+pkgdesc="A highly capable, feature-rich programming language"
+arch=(x86_64 i686)
+license=('GPL' 'PerlArtistic')
+url="https://github.com/perl11/cperl"
+depends=('gdbm' 'db' 'glibc')
+validpgpkeys=(2895A881D34270FABFE8F747B4F63339E65D6414)
+source=("https://github.com/perl11/cperl/releases/download/cperl-${pkgver}/cperl-${pkgver}.tar.xz"{,.asc}
+ perlbin.sh
+ perlbin.csh
+ perlbin.fish
+ fix-installman.patch)
+options=('makeflags' '!purge' 'emptydirs')
+sha512sums=('0073aeaddb088d8643b63395822abb7997eb1ebdf3140e0312add6a3b3b2d1c16f218746f2658f066ce0d1a64d656b698018e199e03012a48aa84bd4f37a9c31'
+ 'SKIP'
+ '37c20b56b9aa531964cf46571a1d19aaf8b8c898c76123e0d73d756a18334d7d4afdd46ab41fd9de110896258453efe3042ba6d07584976a43b7bb601f2ad5a0'
+ 'a587e7aac3ff7b58d859271ac316ea99702e298e53872fd33b382b2bfd6d39b5d1b66ed540930bf7df8c003d414f74640c9215e0572810423440e63277fb21a9'
+ '93adc830e46556f197301c840aed605828ffdbe42e7e859dc9fe8d19fec46300bc4a0f356ba752f5a2d55922663b006bd1c82c4a5cde9d2ee4b0bbe818054e2a'
+ '7f261483d9a3cfe5983d2f14e3c7f4052913ab346b4ef06edfa0f25de01ccae042cbd3011acdb6d46e92ff11bbf04eff68fcf1e6139b7928a0d747158b94df31')
+
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ # test broken with gdbm 1.15. See: https://rt.perl.org/Public/Bug/Display.html?id=133295
+ sed -i 's|BEGIN {|BEGIN { plan(skip_all => "fatal test unsupported with gdbm 1.15");|' ext/GDBM_File/t/fatal.t
+
+ patch -p1 < "${srcdir}/fix-installman.patch"
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ local manflags=
+
+ if (( ! INSTALLMANS )); then
+ manflags='-Dman1dir=none -Dman3dir=none'
+ fi
+
+ if [ "${CARCH}" = "x86_64" ]; then
+ # for x86_64
+ arch_opts="-Dcccdlflags='-fPIC'"
+ else
+ # for i686
+ arch_opts=""
+ fi
+
+ # Share pure perl modules with system perl
+ ./Configure -des -Dusethreads -Duseshrplib -Doptimize="${CFLAGS}" \
+ -Dprefix=/usr -Dvendorprefix=/usr \
+ -Dprivlib=/usr/share/perl5/core_cperl \
+ -Darchlib="/usr/lib/perl5/${_baseversion}/core_cperl" \
+ -Dsitelib=/usr/share/perl5/site_perl \
+ -Dsitearch="/usr/lib/perl5/${_baseversion}/site_cperl" \
+ -Dvendorlib=/usr/share/perl5/vendor_perl \
+ -Dvendorarch="/usr/lib/perl5/${_baseversion}/vendor_cperl" \
+ -Dscriptdir=/usr/bin/core_cperl \
+ -Dsitescript=/usr/bin/site_cperl \
+ -Dvendorscript=/usr/bin/vendor_cperl \
+ -Dinc_version_list=none \
+ -Dman1ext=1cperl -Dman3ext=3cperl ${arch_opts} \
+ ${manflags} \
+ -Dlddlflags="-shared ${LDFLAGS}" -Dldflags="${LDFLAGS}"
+ make
+}
+
+check() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ TEST_JOBS=$(sed 's/.*-j\([0-9][0-9]*\).*/\1/' <<<"${MAKEFLAGS}") make test_harness
+# make test
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+
+ ### Perl Settings ###
+ # Change man page extensions for site and vendor module builds.
+ # Set no mail address since bug reports should go to the bug tracker
+ # and not someone's email.
+ sed -e '/^man1ext=/ s/1cperl/1cp/' -e '/^man3ext=/ s/3cperl/3cpm/' \
+ -e "/^cf_email=/ s/'.*'/''/" \
+ -e "/^perladmin=/ s/'.*'/''/" \
+ -i "${pkgdir}/usr/lib/perl5/${_baseversion}/core_cperl/Config_heavy.pl"
+
+ ### CPAN Settings ###
+ # Set CPAN default config to use the site directories.
+ sed -e '/(makepl_arg =>/ s/""/"INSTALLDIRS=site"/' \
+ -e '/(mbuildpl_arg =>/ s/""/"installdirs=site"/' \
+ -i "${pkgdir}/usr/share/perl5/core_cperl/CPAN/FirstTime.pm"
+
+ # Profile script to set paths to perl scripts.
+ install -D -m644 "${srcdir}/perlbin.sh" \
+ "${pkgdir}/etc/profile.d/cperlbin.sh"
+ # Profile script to set paths to perl scripts on csh. (FS#22441)
+ install -D -m644 "${srcdir}/perlbin.csh" \
+ "${pkgdir}/etc/profile.d/cperlbin.csh"
+ # Profile script to set paths to perl scripts on fish. (FS#51191)
+ install -D -m 755 "${srcdir}/perlbin.fish" \
+ "${pkgdir}/usr/share/fish/vendor_conf.d/cperlbin.fish"
+
+ # Add the dirs so new installs will already have them in PATH once they
+ # install their first perl programm
+ install -d -m755 "${pkgdir}/usr/bin/vendor_cperl"
+ install -d -m755 "${pkgdir}/usr/bin/site_cperl"
+
+ #(cd ${pkgdir}/usr/bin; mv perl${pkgver} perl)
+ rm "${pkgdir}/usr/bin/cperl${pkgver}"
+
+ find "${pkgdir}" -name perllocal.pod -delete
+ find "${pkgdir}" -name .packlist -delete
+}
diff --git a/fix-installman.patch b/fix-installman.patch
new file mode 100644
index 000000000000..4e372208532e
--- /dev/null
+++ b/fix-installman.patch
@@ -0,0 +1,40 @@
+diff --git a/installman b/installman
+index 71fe93a26f..f3670e22e7 100755
+--- a/installman
++++ b/installman
+@@ -48,6 +48,9 @@ GetOptions( \%opts,
+ die $usage if $opts{help};
+ $opts{destdir} //= '';
+
++my $installman1 = defined $opts{man1dir} && $opts{man1dir} ne '';
++my $installman3 = defined $opts{man3dir} && $opts{man3dir} ne '';
++
+ foreach my $pre (qw(man1 man3)) {
+ $opts{"${pre}dir"} //= $opts{destdir} . $Config{"install${pre}dir"};
+ $opts{"${pre}ext"} //= $Config{"${pre}ext"};
+@@ -55,7 +58,7 @@ foreach my $pre (qw(man1 man3)) {
+ $opts{verbose} ||= $opts{notify};
+
+ # Explicitely disabled installation of man pages
+-if ($opts{man1dir} eq '' && $opts{man3dir} eq '') {
++if (!$installman1 && !$installman3) {
+ warn "Manual page installation was disabled by Configure\n";
+ exit 0;
+ }
+@@ -76,14 +79,14 @@ $packlist = ExtUtils::Packlist->new("$opts{destdir}$Config{installarchlib}/.pack
+ pod2man(\%man1, $opts{man1dir}, $opts{man1ext}, 'pod');
+
+ # Install the pods for library modules.
+-if ($opts{man3dir} ne '') {
++if ($installman3) {
+ my $found = pods_to_install();
+ pod2man($found->{$_}, $opts{man3dir}, $opts{man3ext}, 'lib')
+ foreach qw(MODULE PRAGMA);
+ }
+
+ # Install the pods embedded in the installed scripts
+-my $has_man1dir = $opts{man1dir} ne '' && -d $opts{man1dir};
++my $has_man1dir = $installman1 && -d $opts{man1dir};
+ my $fh = open_or_die('utils.lst');
+ while (<$fh>) {
+ next if /^#/;
diff --git a/perlbin.csh b/perlbin.csh
new file mode 100644
index 000000000000..e09c5643aea7
--- /dev/null
+++ b/perlbin.csh
@@ -0,0 +1,15 @@
+# Set path to cperl scriptdirs if they exist
+# https://wiki.archlinux.org/index.php/Perl_Policy#Binaries_and_scripts
+# Added /usr/bin/*_cperl dirs for scripts
+# Remove /usr/lib/cperl/*_cperl/bin in next release
+
+[ -d /usr/bin/site_cperl ] && setenv PATH ${PATH}:/usr/bin/site_cperl
+[ -d /usr/lib/cperl/site_cperl/bin ] && setenv PATH ${PATH}:/usr/lib/cperl/site_cperl/bin
+
+[ -d /usr/bin/vendor_cperl ] && setenv PATH ${PATH}:/usr/bin/vendor_cperl
+[ -d /usr/lib/cperl/vendor_cperl/bin ] && setenv PATH ${PATH}:/usr/lib/cperl/vendor_cperl/bin
+
+[ -d /usr/bin/core_cperl ] && setenv PATH ${PATH}:/usr/bin/core_cperl
+
+# If you have modules in non-standard directories you can add them here.
+#export PERLLIB=dir1:dir2
diff --git a/perlbin.fish b/perlbin.fish
new file mode 100644
index 000000000000..9f46091a8103
--- /dev/null
+++ b/perlbin.fish
@@ -0,0 +1,10 @@
+# Set path to perl scriptdirs if they exist
+# https://wiki.archlinux.org/index.php/Perl_Policy#Binaries_and_scripts
+
+if status --is-login
+ for perldir in /usr/bin/site_cperl /usr/bin/vendor_cperl /usr/bin/core_cperl
+ if test -d $perldir; and not contains $perldir $PATH
+ set PATH $PATH $perldir
+ end
+ end
+end
diff --git a/perlbin.sh b/perlbin.sh
new file mode 100755
index 000000000000..e558f67f0066
--- /dev/null
+++ b/perlbin.sh
@@ -0,0 +1,18 @@
+# Set path to cperl scriptdirs if they exist
+# https://wiki.archlinux.org/index.php/Perl_Policy#Binaries_and_scripts
+# Added /usr/bin/*_cperl dirs for scripts
+# Remove /usr/lib/cperl/*_cperl/bin in next release
+
+[ -d /usr/bin/site_cperl ] && PATH=$PATH:/usr/bin/site_cperl
+[ -d /usr/lib/cperl/site_cperl/bin ] && PATH=$PATH:/usr/lib/cperl/site_cperl/bin
+
+[ -d /usr/bin/vendor_cperl ] && PATH=$PATH:/usr/bin/vendor_cperl
+[ -d /usr/lib/cperl/vendor_cperl/bin ] && PATH=$PATH:/usr/lib/cperl/vendor_cperl/bin
+
+[ -d /usr/bin/core_cperl ] && PATH=$PATH:/usr/bin/core_cperl
+
+export PATH
+
+# If you have modules in non-standard directories you can add them here.
+#export PERLLIB=dir1:dir2
+