PKGBUILD 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. # Maintainer: Florian Pritz <bluewind@xinu.at>
  2. # Contributor: Angel Velasquez <angvp@archlinux.org>
  3. # Contributor: kevin <kevin.archlinux.org>
  4. # Contributor: judd <jvinet.zeroflux.org>
  5. # Contributor: francois <francois.archlinux.org>
  6. pkgname=perl
  7. pkgver=5.28.0
  8. _baseversion="${pkgver%.*}"
  9. pkgrel=1
  10. pkgdesc="A highly capable, feature-rich programming language"
  11. arch=(x86_64 ppc64le)
  12. license=('GPL' 'PerlArtistic')
  13. url="http://www.perl.org"
  14. groups=('base')
  15. depends=('gdbm' 'db' 'glibc')
  16. # NOTE: This array is automatically generated by `./patchprov`.
  17. # If you want to add entries, do so in the next array.
  18. provides=('perl-archive-tar=2.30'
  19. 'perl-attribute-handlers=1.01'
  20. 'perl-autodie=2.29'
  21. 'perl-autoloader=5.74'
  22. 'perl-autouse=1.11'
  23. 'perl-b-debug=1.26'
  24. 'perl-base=2.27'
  25. 'perl-bignum=0.49'
  26. 'perl-carp=1.50'
  27. 'perl-compress-raw-bzip2=2.074'
  28. 'perl-compress-raw-zlib=2.076'
  29. 'perl-config-perl-v=0.29'
  30. 'perl-constant=1.33'
  31. 'perl-cpan-meta-requirements=2.140'
  32. 'perl-cpan-meta-yaml=0.018'
  33. 'perl-cpan-meta=2.150010'
  34. 'perl-cpan=2.20'
  35. 'perl-data-dumper=2.170'
  36. 'perl-db_file=1.840'
  37. 'perl-devel-ppport=3.40'
  38. 'perl-devel-selfstubber=1.06'
  39. 'perl-digest-md5=2.55'
  40. 'perl-digest-sha=6.01'
  41. 'perl-digest=1.17_01'
  42. 'perl-dumpvalue=1.18'
  43. 'perl-encode=2.97'
  44. 'perl-encoding-warnings=0.13'
  45. 'perl-env=1.04'
  46. 'perl-experimental=0.019'
  47. 'perl-exporter=5.73'
  48. 'perl-extutils-cbuilder=0.280230'
  49. 'perl-extutils-constant=0.25'
  50. 'perl-extutils-install=2.14'
  51. 'perl-extutils-makemaker=7.34'
  52. 'perl-extutils-manifest=1.70'
  53. 'perl-extutils-parsexs=3.39'
  54. 'perl-file-fetch=0.56'
  55. 'perl-file-path=2.15'
  56. 'perl-file-temp=0.2304'
  57. 'perl-filter-simple=0.95'
  58. 'perl-filter-util-call=1.58'
  59. 'perl-getopt-long=2.5'
  60. 'perl-http-tiny=0.070'
  61. 'perl-i18n-collate=1.02'
  62. 'perl-i18n-langtags=0.43'
  63. 'perl-if=0.0608'
  64. 'perl-io-compress=2.074'
  65. 'perl-io-socket-ip=0.39'
  66. 'perl-io-zlib=1.10'
  67. 'perl-io=1.39'
  68. 'perl-ipc-cmd=1.00'
  69. 'perl-ipc-sysv=2.07'
  70. 'perl-json-pp=2.97001'
  71. 'perl-lib=0.64'
  72. 'perl-libnet=3.11'
  73. 'perl-locale-codes=3.56'
  74. 'perl-locale-maketext-simple=0.21_01'
  75. 'perl-locale-maketext=1.29'
  76. 'perl-math-bigint-fastcalc=0.5006'
  77. 'perl-math-bigint=1.999811'
  78. 'perl-math-bigrat=0.2613'
  79. 'perl-math-complex=1.5901'
  80. 'perl-memoize=1.03_01'
  81. 'perl-mime-base64=3.15'
  82. 'perl-module-corelist=5.20180622'
  83. 'perl-module-load-conditional=0.68'
  84. 'perl-module-load=0.32'
  85. 'perl-module-loaded=0.08'
  86. 'perl-module-metadata=1.000033'
  87. 'perl-net-ping=2.62'
  88. 'perl-params-check=0.38'
  89. 'perl-parent=0.236'
  90. 'perl-pathtools=3.74'
  91. 'perl-perl-ostype=1.010'
  92. 'perl-perlfaq=5.021011'
  93. 'perl-perlio-via-quotedprint=0.08'
  94. 'perl-pod-checker=1.73'
  95. 'perl-pod-escapes=1.07'
  96. 'perl-pod-parser=1.63'
  97. 'perl-pod-perldoc=3.2801'
  98. 'perl-pod-simple=3.35'
  99. 'perl-pod-usage=1.69'
  100. 'perl-podlators=5.006'
  101. 'perl-safe=2.40'
  102. 'perl-scalar-list-utils=1.50'
  103. 'perl-search-dict=1.07'
  104. 'perl-selfloader=1.25'
  105. 'perl-socket=2.027'
  106. 'perl-storable=3.08'
  107. 'perl-sys-syslog=0.35'
  108. 'perl-term-ansicolor=4.06'
  109. 'perl-term-cap=1.17'
  110. 'perl-term-complete=1.403'
  111. 'perl-term-readline=1.17'
  112. 'perl-test-harness=3.42'
  113. 'perl-test-simple=1.302133'
  114. 'perl-test=1.31'
  115. 'perl-text-abbrev=1.02'
  116. 'perl-text-balanced=2.03'
  117. 'perl-text-parsewords=3.30'
  118. 'perl-text-tabs=2013.0523'
  119. 'perl-thread-queue=3.12'
  120. 'perl-thread-semaphore=2.13'
  121. 'perl-threads-shared=1.58'
  122. 'perl-threads=2.22'
  123. 'perl-tie-file=1.02'
  124. 'perl-tie-refhash=1.39'
  125. 'perl-time-hires=1.9759'
  126. 'perl-time-local=1.25'
  127. 'perl-time-piece=1.3204'
  128. 'perl-unicode-collate=1.25'
  129. 'perl-unicode-normalize=1.26'
  130. 'perl-version=0.9923'
  131. 'perl-xsloader=0.30')
  132. # Add your own provides here
  133. provides=(${provides[@]})
  134. source=(https://www.cpan.org/src/5.0/perl-${pkgver}.tar.xz
  135. perlbin.sh
  136. perlbin.csh
  137. perlbin.fish
  138. detect-old-perl-modules.sh
  139. detect-old-perl-modules.hook)
  140. options=('makeflags' '!purge' 'emptydirs')
  141. sha512sums=('de701e37371b81cecf06098bb2c09017bde9cebaf9537d58838d0adf605ac2ecf739897b0a73576a7adb74d4cf65591ec4d2ed1f94b7191e695f88cb7e214a39'
  142. '46724344828e7f86e016f9c8d588bf52b2e764e65e0acc1a38899a530c99bc6e4fd8b46fa0d4bbd685aa2074dd5bcbf9029ac3bb3f2d0ee9adfc4f6c0745f373'
  143. 'fc1344a02c741d61af6f6b5967f29cc6f43c2059761522b150261924dd7e1989da5254c03ffa0627accd9af01bc152edd24e84a6b59579acb9ee1900b6ce9383'
  144. '881e2efe05ba818cd7300f126800b56bb0685cb5c9c5fb7e67ef6aaf5abd17d2391a979d5d16d109c5111f4b35504ba83d19b0e6eda4431e8421fcbea19d2f1a'
  145. 'bd48af7a6209f2ad51aa1747a7238ecb11607a53f61460d873202bf14b55c3b7dd6f66f4a9f2cac8a24240313789a9a44dbc81b73587de46a6b1866bdfca5e26'
  146. '6b5b2ba606d443da22c6c1a754829abd36f3fdfef1089bcf06c8f9db0217f2c2f02ebc14958ffa7afe618c9a80bd1025e76704f67466c0c3db7d40ef2c0e56b3')
  147. # https://www.cpan.org/src/5.0/perl-$pkgver.tar.xz.sha256.txt
  148. prepare() {
  149. cd ${srcdir}/${pkgname}-${pkgver}
  150. # test broken with gdbm 1.15. See: https://rt.perl.org/Public/Bug/Display.html?id=133295
  151. sed -i 's|BEGIN {|BEGIN { plan(skip_all => "fatal test unsupported with gdbm 1.15");|' ext/GDBM_File/t/fatal.t
  152. }
  153. build() {
  154. cd ${srcdir}/${pkgname}-${pkgver}
  155. if [ "${CARCH}" = "x86_64" ]; then
  156. # for x86_64
  157. arch_opts="-Dcccdlflags='-fPIC'"
  158. else
  159. # for i686
  160. arch_opts=""
  161. fi
  162. ./Configure -des -Dusethreads -Duseshrplib -Doptimize="${CFLAGS}" \
  163. -Dprefix=/usr -Dvendorprefix=/usr \
  164. -Dprivlib=/usr/share/perl5/core_perl \
  165. -Darchlib=/usr/lib/perl5/$_baseversion/core_perl \
  166. -Dsitelib=/usr/share/perl5/site_perl \
  167. -Dsitearch=/usr/lib/perl5/$_baseversion/site_perl \
  168. -Dvendorlib=/usr/share/perl5/vendor_perl \
  169. -Dvendorarch=/usr/lib/perl5/$_baseversion/vendor_perl \
  170. -Dscriptdir=/usr/bin/core_perl \
  171. -Dsitescript=/usr/bin/site_perl \
  172. -Dvendorscript=/usr/bin/vendor_perl \
  173. -Dinc_version_list=none \
  174. -Dman1ext=1perl -Dman3ext=3perl ${arch_opts} \
  175. -Dlddlflags="-shared ${LDFLAGS}" -Dldflags="${LDFLAGS}"
  176. make
  177. }
  178. check() {
  179. cd ${srcdir}/${pkgname}-${pkgver}
  180. TEST_JOBS=$(echo $MAKEFLAGS | sed 's/.*-j\([0-9][0-9]*\).*/\1/') make test_harness
  181. # make test
  182. }
  183. package() {
  184. cd ${srcdir}/${pkgname}-${pkgver}
  185. make DESTDIR="$pkgdir" install
  186. ### Perl Settings ###
  187. # Change man page extensions for site and vendor module builds.
  188. # Set no mail address since bug reports should go to the bug tracker
  189. # and not someone's email.
  190. sed -e '/^man1ext=/ s/1perl/1p/' -e '/^man3ext=/ s/3perl/3pm/' \
  191. -e "/^cf_email=/ s/'.*'/''/" \
  192. -e "/^perladmin=/ s/'.*'/''/" \
  193. -i ${pkgdir}/usr/lib/perl5/$_baseversion/core_perl/Config_heavy.pl
  194. ### CPAN Settings ###
  195. # Set CPAN default config to use the site directories.
  196. sed -e '/(makepl_arg =>/ s/""/"INSTALLDIRS=site"/' \
  197. -e '/(mbuildpl_arg =>/ s/""/"installdirs=site"/' \
  198. -i ${pkgdir}/usr/share/perl5/core_perl/CPAN/FirstTime.pm
  199. # Profile script to set paths to perl scripts.
  200. install -D -m644 ${srcdir}/perlbin.sh \
  201. ${pkgdir}/etc/profile.d/perlbin.sh
  202. # Profile script to set paths to perl scripts on csh. (FS#22441)
  203. install -D -m644 ${srcdir}/perlbin.csh \
  204. ${pkgdir}/etc/profile.d/perlbin.csh
  205. # Profile script to set paths to perl scripts on fish. (FS#51191)
  206. install -D -m 755 "$srcdir/perlbin.fish" \
  207. "$pkgdir/usr/share/fish/vendor_conf.d/perlbin.fish"
  208. # Add the dirs so new installs will already have them in PATH once they
  209. # install their first perl programm
  210. install -d -m755 "$pkgdir/usr/bin/vendor_perl"
  211. install -d -m755 "$pkgdir/usr/bin/site_perl"
  212. #(cd ${pkgdir}/usr/bin; mv perl${pkgver} perl)
  213. rm "$pkgdir/usr/bin/perl$pkgver"
  214. install -D -m755 -t "$pkgdir/usr/share/libalpm/scripts" "$srcdir/detect-old-perl-modules.sh"
  215. install -D -m644 -t "$pkgdir/usr/share/libalpm/hooks" "$srcdir/detect-old-perl-modules.hook"
  216. find $pkgdir -name perllocal.pod -delete
  217. find $pkgdir -name .packlist -delete
  218. }