Name perl
Description A highly capable, feature-rich programming language
Version 5.42.0-1
Package Base perl
Homepage https://www.perl.org
Maintainers ['Antonio Rojas <arojas@archlinux.org>', 'Florian Pritz <bluewind@xinu.at>']
Contributors ['Angel Velasquez <angvp@archlinux.org>', 'francois <francois.archlinux.org>', 'judd <jvinet.zeroflux.org>', 'kevin <kevin.archlinux.org>']
Distro-repo https://gitlab.archlinux.org/archlinux/packaging/packages/perl
Sources ['config.over', 'detect-old-perl-modules.hook', 'detect-old-perl-modules.sh', 'perl::git+https://github.com/Perl/perl5.git#tag=v5.42.0', 'perlbin.csh', 'perlbin.fish', 'perlbin.sh']
Dependencies ['db5.3', 'gdbm', 'glibc', 'libcrypt.so', 'libxcrypt']
Optional-Dependencies []
Build-Dependencies ['git', 'patchutils']
Provides ['perl-archive-tar', 'perl-attribute-handlers', 'perl-autodie', 'perl-autoloader', 'perl-autouse', 'perl-base', 'perl-bignum', 'perl-carp', 'perl-compress-raw-bzip2', 'perl-compress-raw-zlib', 'perl-config-perl-v', 'perl-constant', 'perl-cpan-meta-requirements', 'perl-cpan-meta-yaml', 'perl-cpan-meta', 'perl-cpan', 'perl-data-dumper', 'perl-db_file', 'perl-devel-ppport', 'perl-devel-selfstubber', 'perl-digest-md5', 'perl-digest-sha', 'perl-digest', 'perl-dumpvalue', 'perl-encode', 'perl-encoding-warnings', 'perl-env', 'perl-experimental', 'perl-exporter', 'perl-extutils-cbuilder', 'perl-extutils-constant', 'perl-extutils-install', 'perl-extutils-makemaker', 'perl-extutils-manifest', 'perl-extutils-parsexs', 'perl-extutils-pl2bat', 'perl-file-fetch', 'perl-file-path', 'perl-file-temp', 'perl-filter-simple', 'perl-filter-util-call', 'perl-findbin', 'perl-getopt-long', 'perl-http-tiny', 'perl-i18n-collate', 'perl-i18n-langtags', 'perl-if', 'perl-io-compress', 'perl-io-socket-ip', 'perl-io-zlib', 'perl-io', 'perl-ipc-cmd', 'perl-ipc-sysv', 'perl-json-pp', 'perl-lib', 'perl-libnet', 'perl-locale-maketext-simple', 'perl-locale-maketext', 'perl-math-bigint-fastcalc', 'perl-math-bigint', 'perl-math-complex', 'perl-memoize', 'perl-mime-base64', 'perl-module-corelist', 'perl-module-load-conditional', 'perl-module-load', 'perl-module-loaded', 'perl-module-metadata', 'perl-net-ping', 'perl-params-check', 'perl-parent', 'perl-pathtools', 'perl-perl-ostype', 'perl-perlfaq', 'perl-perlio-via-quotedprint', 'perl-pod-checker', 'perl-pod-escapes', 'perl-pod-perldoc', 'perl-pod-simple', 'perl-pod-usage', 'perl-podlators', 'perl-safe', 'perl-scalar-list-utils', 'perl-search-dict', 'perl-selfloader', 'perl-socket', 'perl-storable', 'perl-sys-syslog', 'perl-term-ansicolor', 'perl-term-cap', 'perl-term-complete', 'perl-term-readline', 'perl-term-table', 'perl-test-harness', 'perl-test-simple', 'perl-test', 'perl-text-abbrev', 'perl-text-balanced', 'perl-text-parsewords', 'perl-text-tabs', 'perl-thread-queue', 'perl-thread-semaphore', 'perl-threads-shared', 'perl-threads', 'perl-tie-file', 'perl-tie-refhash', 'perl-time-hires', 'perl-time-local', 'perl-time-piece', 'perl-unicode-collate', 'perl-unicode-normalize', 'perl-version', 'perl-xsloader']
Builddate 13-07-2025 18:43:52
Architecture x86_64
Distro-Version
Licenses ['Artistic-1.0-Perl OR GPL-1.0-or-later']
Hash deeb19367d70758fe9b9222321e6b753ffb918b252a7ced7807d40e886226c35
# Maintainer: Florian Pritz <bluewind@xinu.at>
# Contributor: Angel Velasquez <angvp@archlinux.org>
# Contributor: kevin <kevin.archlinux.org>
# Contributor: judd <jvinet.zeroflux.org>
# Contributor: francois <francois.archlinux.org>

pkgname=perl
pkgver=5.42.0
_baseversion="${pkgver%.*}"
pkgrel=1
pkgdesc="A highly capable, feature-rich programming language"
arch=(x86_64)
license=('Artistic-1.0-Perl OR GPL-1.0-or-later')
url="https://www.perl.org"
depends=('gdbm>=1.17' 'db5.3' 'glibc' 'libxcrypt' 'libcrypt.so')
makedepends=('git' 'patchutils')
checkdepends=('procps-ng')
# NOTE: This array is automatically generated by `./patchprov`.
#       If you want to add entries, do so in the next array.
provides=('perl-archive-tar=3.04'
          'perl-attribute-handlers=1.03'
          'perl-autodie=2.37'
          'perl-autoloader=5.74'
          'perl-autouse=1.11'
          'perl-base=2.27'
          'perl-bignum=0.67'
          'perl-carp=1.54'
          'perl-compress-raw-bzip2=2.213'
          'perl-compress-raw-zlib=2.213'
          'perl-config-perl-v=0.38'
          'perl-constant=1.33'
          'perl-cpan-meta-requirements=2.143'
          'perl-cpan-meta-yaml=0.020'
          'perl-cpan-meta=2.150010'
          'perl-cpan=2.38'
          'perl-data-dumper=2.192'
          'perl-db_file=1.859'
          'perl-devel-ppport=3.73'
          'perl-devel-selfstubber=1.06'
          'perl-digest-md5=2.59'
          'perl-digest-sha=6.04'
          'perl-digest=1.20'
          'perl-dumpvalue=1.21'
          'perl-encode=3.21'
          'perl-encoding-warnings=0.14'
          'perl-env=1.06'
          'perl-experimental=0.035'
          'perl-exporter=5.79'
          'perl-extutils-cbuilder=0.280242'
          'perl-extutils-constant=0.25'
          'perl-extutils-install=2.22'
          'perl-extutils-makemaker=7.76'
          'perl-extutils-manifest=1.75'
          'perl-extutils-parsexs=3.57'
          'perl-extutils-pl2bat=0.005'
          'perl-file-fetch=1.04'
          'perl-file-path=2.18'
          'perl-file-temp=0.2311'
          'perl-filter-simple=0.96'
          'perl-filter-util-call=1.64'
          'perl-findbin=1.54'
          'perl-getopt-long=2.58'
          'perl-http-tiny=0.090'
          'perl-i18n-collate=1.02'
          'perl-i18n-langtags=0.45'
          'perl-if=0.0610'
          'perl-io-compress=2.213'
          'perl-io-socket-ip=0.43'
          'perl-io-zlib=1.15'
          'perl-io=1.55'
          'perl-ipc-cmd=1.04'
          'perl-ipc-sysv=2.09'
          'perl-json-pp=4.16'
          'perl-lib=0.65'
          'perl-libnet=3.15'
          'perl-locale-maketext-simple=0.21_01'
          'perl-locale-maketext=1.33'
          'perl-math-bigint-fastcalc=0.5020'
          'perl-math-bigint=2.005002'
          'perl-math-complex=1.63'
          'perl-memoize=1.17'
          'perl-mime-base64=3.16_01'
          'perl-module-corelist=5.20250702'
          'perl-module-load-conditional=0.74'
          'perl-module-load=0.36'
          'perl-module-loaded=0.08'
          'perl-module-metadata=1.000038'
          'perl-net-ping=2.76'
          'perl-params-check=0.38'
          'perl-parent=0.244'
          'perl-pathtools=3.94'
          'perl-perl-ostype=1.010'
          'perl-perlfaq=5.20250619'
          'perl-perlio-via-quotedprint=0.10'
          'perl-pod-checker=1.77'
          'perl-pod-escapes=1.07'
          'perl-pod-perldoc=3.2801'
          'perl-pod-simple=3.45'
          'perl-pod-usage=2.05'
          'perl-podlators=6.0.2'
          'perl-safe=2.47'
          'perl-scalar-list-utils=1.68_01'
          'perl-search-dict=1.08'
          'perl-selfloader=1.28'
          'perl-socket=2.038'
          'perl-storable=3.37'
          'perl-sys-syslog=0.36'
          'perl-term-ansicolor=5.01'
          'perl-term-cap=1.18'
          'perl-term-complete=1.403'
          'perl-term-readline=1.17'
          'perl-term-table=0.024'
          'perl-test-harness=3.50'
          'perl-test-simple=1.302210'
          'perl-test=1.31'
          'perl-text-abbrev=1.02'
          'perl-text-balanced=2.06'
          'perl-text-parsewords=3.31'
          'perl-text-tabs=2024.001'
          'perl-thread-queue=3.14'
          'perl-thread-semaphore=2.13'
          'perl-threads-shared=1.70'
          'perl-threads=2.43'
          'perl-tie-file=1.10'
          'perl-tie-refhash=1.41'
          'perl-time-hires=1.9778'
          'perl-time-local=1.35'
          'perl-time-piece=1.36'
          'perl-unicode-collate=1.31'
          'perl-unicode-normalize=1.32'
          'perl-version=0.9933'
          'perl-xsloader=0.32')
# Add your own provides here
provides=("${provides[@]}")
source=(${pkgname}::git+https://github.com/Perl/perl5.git#tag=v${pkgver}
        config.over
        perlbin.sh
        perlbin.csh
        perlbin.fish
        detect-old-perl-modules.sh
        detect-old-perl-modules.hook)
options=('makeflags' '!purge' 'emptydirs')
sha512sums=('6b5da864ecc0ae7712ee224989a0ea5fa00563c58257cb8403de83c7f95643faae32027fc7f80090a257200a0c781be0b7fc0cc1ee16d4524120c9a7b32ec797'
            'b96e3c2c44e7453ac4c1c77aef8b3370651c9cb9f59bb82de11218564fabe1b8d285a9c892ea87cb7d6acb6913bbd1af242d3ab20dcab8149270c2269cae9f7c'
            '6ed5bc6dbdc47bc7f4c0fedbe18deaf35ab02a2e6700988beb545954bb1d0fe20ff1a4de39d6d9fc882ef1741f7bf6d85ba165d0cd8dc0d9939b789c894f48a1'
            '53eb0cddfd637014f3d3a101665db8dcafe5ac5bf3d319a259974334eb89c1c405097518ae96b6d18e520194633c7be57c9b2cd9ae6398443eb08f1a2008d112'
            '881e2efe05ba818cd7300f126800b56bb0685cb5c9c5fb7e67ef6aaf5abd17d2391a979d5d16d109c5111f4b35504ba83d19b0e6eda4431e8421fcbea19d2f1a'
            'bd48af7a6209f2ad51aa1747a7238ecb11607a53f61460d873202bf14b55c3b7dd6f66f4a9f2cac8a24240313789a9a44dbc81b73587de46a6b1866bdfca5e26'
            '1af97d598f8d2e7e818ee5fe9b4bf0a82b480385b383df3cf53d636d8a882b9f474f54e6b26712ddf533a1ab6f870bca6f4edfd75331f5e2514a4d6668c234b1')
# https://www.cpan.org/src/5.0/perl-$pkgver.tar.xz.sha256.txt

prepare() {
  cd ${pkgname}

  # reproducible patchlevel_date
  [ -n "${SOURCE_DATE_EPOCH}" ] && touch -h -d @$SOURCE_DATE_EPOCH patchlevel.h
}

build() {
  cd ${pkgname}

  # reproducible build overrides are only fully effective when loaded from file
  cp ../config.over .

  export TZ=UTC
  ./Configure -des -Dusethreads -Duseshrplib -Doptimize="${CFLAGS}" \
    -Dprefix=/usr -Dvendorprefix=/usr \
    -Dprivlib=/usr/share/perl5/core_perl \
    -Darchlib=/usr/lib/perl5/$_baseversion/core_perl \
    -Dsitelib=/usr/share/perl5/site_perl \
    -Dsitearch=/usr/lib/perl5/$_baseversion/site_perl \
    -Dvendorlib=/usr/share/perl5/vendor_perl \
    -Dvendorarch=/usr/lib/perl5/$_baseversion/vendor_perl \
    -Dscriptdir=/usr/bin/core_perl \
    -Dsitescript=/usr/bin/site_perl \
    -Dvendorscript=/usr/bin/vendor_perl \
    -Dinc_version_list=none \
    -Dman1ext=1perl -Dman3ext=3perl \
    -Dlddlflags="-shared ${LDFLAGS}" -Dldflags="${LDFLAGS}" \
    -Dloclibpth="/usr/lib/db5.3" -Dlocincpth="/usr/include/db5.3"
  make
}

check() {
  cd ${pkgname}
#  TEST_JOBS=$(echo "$MAKEFLAGS" | sed 's/.*-j\([0-9][0-9]*\).*/\1/') make test_harness
  make test
}

package() {
  cd ${pkgname}
  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/1perl/1p/' -e '/^man3ext=/ s/3perl/3pm/' \
      -e "/^cf_email=/ s/'.*'/''/" \
      -e "/^perladmin=/ s/'.*'/''/" \
      -i "${pkgdir}/usr/lib/perl5/$_baseversion/core_perl/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_perl/CPAN/FirstTime.pm"

  # Profile script to set paths to perl scripts.
  install -D -m644 "${srcdir}/perlbin.sh" \
                   "${pkgdir}/etc/profile.d/perlbin.sh"
  # Profile script to set paths to perl scripts on csh. (FS#22441)
  install -D -m644 "${srcdir}/perlbin.csh" \
                  "${pkgdir}/etc/profile.d/perlbin.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/perlbin.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_perl"
  install -d -m755 "$pkgdir/usr/bin/site_perl"

  #(cd ${pkgdir}/usr/bin; mv perl${pkgver} perl)
  rm "$pkgdir/usr/bin/perl$pkgver"

  install -D -m755 -t "$pkgdir/usr/share/libalpm/scripts" "$srcdir/detect-old-perl-modules.sh"
  install -D -m644 -t "$pkgdir/usr/share/libalpm/hooks" "$srcdir/detect-old-perl-modules.hook"

}