summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 04f095f28d268eea8203cd24b630d9bfb82c16ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
# Maintainer: Tucker Boniface <tucker@boniface.tech>

_pkgname=perl
pkgname=perl-git
pkgver=5.29.1.r86.g48ae8dc39c
_baseversion="${pkgver%.*.*}"
pkgrel=1
pkgdesc="A highly capable, feature-rich programming language (development version)"
arch=(x86_64)
license=('GPL' 'PerlArtistic')
url="http://www.perl.org"
depends=('gdbm' 'db' 'glibc')
makedepends=('git')
# NOTE: This array is automatically generated by `./patchprov`.
#       If you want to add entries, do so in the next array.
provides=('perlarchive-tar=2.30'
          'perlattribute-handlers=1.01'
          'perlautodie=2.29'
          'perlautoloader=5.74'
          'perlautouse=1.11'
          'perlb-debug=1.26'
          'perlbase=2.27'
          'perlbignum=0.50'
          'perlcarp=1.50'
          'perlcompress-raw-bzip2=2.081'
          'perlcompress-raw-zlib=2.081'
          'perlconfig-perl-v=0.30'
          'perlconstant=1.33'
          'perlcpan-meta-requirements=2.140'
          'perlcpan-meta-yaml=0.018'
          'perlcpan-meta=2.150010'
          'perlcpan=2.20'
          'perldata-dumper=2.171'
          'perldb_file=1.842'
          'perldevel-ppport=3.42'
          'perldevel-selfstubber=1.06'
          'perldigest-md5=2.55'
          'perldigest-sha=6.02'
          'perldigest=1.17_01'
          'perldumpvalue=1.18'
          'perlencode=2.97'
          'perlencoding-warnings=0.13'
          'perlenv=1.04'
          'perlexperimental=0.020'
          'perlexporter=5.73'
          'perlextutils-cbuilder=0.280230'
          'perlextutils-constant=0.25'
          'perlextutils-install=2.14'
          'perlextutils-makemaker=7.34'
          'perlextutils-manifest=1.71'
          'perlextutils-parsexs=3.39'
          'perlfile-fetch=0.56'
          'perlfile-path=2.15'
          'perlfile-temp=0.2308'
          'perlfilter-simple=0.95'
          'perlfilter-util-call=1.59'
          'perlgetopt-long=2.5'
          'perlhttp-tiny=0.076'
          'perli18n-collate=1.02'
          'perli18n-langtags=0.43'
          'perlif=0.0608'
          'perlio-compress=2.081'
          'perlio-socket-ip=0.39'
          'perlio-zlib=1.10'
          'perlio=1.39'
          'perlipc-cmd=1.02'
          'perlipc-sysv=2.07'
          'perljson-pp=2.97001'
          'perllib=0.64'
          'perllibnet=3.11'
          'perllocale-codes=3.57'
          'perllocale-maketext-simple=0.21_01'
          'perllocale-maketext=1.29'
          'perlmath-bigint-fastcalc=0.5007'
          'perlmath-bigint=1.999813'
          'perlmath-bigrat=0.2614'
          'perlmath-complex=1.5901'
          'perlmemoize=1.03_01'
          'perlmime-base64=3.15'
          'perlmodule-corelist=5.20180820'
          'perlmodule-load-conditional=0.68'
          'perlmodule-load=0.32'
          'perlmodule-loaded=0.08'
          'perlmodule-metadata=1.000033'
          'perlnet-ping=2.62'
          'perlparams-check=0.38'
          'perlparent=0.237'
          'perlpathtools=3.75'
          'perlperl-ostype=1.010'
          'perlperlfaq=5.20180605'
          'perlperlio-via-quotedprint=0.08'
          'perlpod-checker=1.73'
          'perlpod-escapes=1.07'
          'perlpod-parser=1.63'
          'perlpod-perldoc=3.2801'
          'perlpod-simple=3.35'
          'perlpod-usage=1.69'
          'perlpodlators=5.006'
          'perlsafe=2.40'
          'perlscalar-list-utils=1.50'
          'perlsearch-dict=1.07'
          'perlselfloader=1.25'
          'perlsocket=2.027'
          'perlstorable=3.12'
          'perlsys-syslog=0.35'
          'perlterm-ansicolor=4.06'
          'perlterm-cap=1.17'
          'perlterm-complete=1.403'
          'perlterm-readline=1.17'
          'perltest-harness=3.42'
          'perltest-simple=1.302138'
          'perltest=1.31'
          'perltext-abbrev=1.02'
          'perltext-balanced=2.03'
          'perltext-parsewords=3.30'
          'perltext-tabs=2013.0523'
          'perlthread-queue=3.13'
          'perlthread-semaphore=2.13'
          'perlthreads-shared=1.58'
          'perlthreads=2.22'
          'perltie-file=1.02'
          'perltie-refhash=1.39'
          'perltime-hires=1.9760'
          'perltime-local=1.28'
          'perltime-piece=1.3204'
          'perlunicode-collate=1.25'
          'perlunicode-normalize=1.26'
          'perlversion=0.9924'
          'perlxsloader=0.30')
# Add your own provides here
provides=(${provides[@]}
          'perl')
conflicts=('perl')
source=(perl::git+https://perl5.git.perl.org/perl.git
        perlbin.sh
        perlbin.csh
        perlbin.fish
        detect-old-perl-modules.sh
        detect-old-perl-modules.hook)
options=('makeflags' '!purge' 'emptydirs')
sha512sums=('SKIP'
            '46724344828e7f86e016f9c8d588bf52b2e764e65e0acc1a38899a530c99bc6e4fd8b46fa0d4bbd685aa2074dd5bcbf9029ac3bb3f2d0ee9adfc4f6c0745f373'
            'fc1344a02c741d61af6f6b5967f29cc6f43c2059761522b150261924dd7e1989da5254c03ffa0627accd9af01bc152edd24e84a6b59579acb9ee1900b6ce9383'
            '881e2efe05ba818cd7300f126800b56bb0685cb5c9c5fb7e67ef6aaf5abd17d2391a979d5d16d109c5111f4b35504ba83d19b0e6eda4431e8421fcbea19d2f1a'
            'bd48af7a6209f2ad51aa1747a7238ecb11607a53f61460d873202bf14b55c3b7dd6f66f4a9f2cac8a24240313789a9a44dbc81b73587de46a6b1866bdfca5e26'
            '6b5b2ba606d443da22c6c1a754829abd36f3fdfef1089bcf06c8f9db0217f2c2f02ebc14958ffa7afe618c9a80bd1025e76704f67466c0c3db7d40ef2c0e56b3')
# https://www.cpan.org/src/5.0/perl-$pkgver.tar.xz.sha256.txt

pkgver() {
  cd "$srcdir/${_pkgname}"
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd ${srcdir}/${_pkgname}

  # 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

}

build() {
  cd ${srcdir}/${_pkgname}

  if [ "${CARCH}" = "x86_64" ]; then
    # for x86_64
    arch_opts="-Dcccdlflags='-fPIC'"
  else
    # for i686
    arch_opts=""
  fi

  ./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 -Dusedevel \
    -Dman1ext=1perl -Dman3ext=3perl ${arch_opts} \
    -Dlddlflags="-shared ${LDFLAGS}" -Dldflags="${LDFLAGS}" 
  make
}

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

package() {
  cd ${srcdir}/${_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"

  . ${srcdir}/${_pkgname}/config.sh
  (cd ${pkgdir}/usr/bin; mv perl${version} 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"

  find $pkgdir -name perllocal.pod -delete
  find $pkgdir -name .packlist -delete
}