summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e02f94f8981529842b7ddbca245bc44596d18bd1 (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
# Contributor: Tucker Boniface <tucker@boniface.tech>

_pkgname=perl
pkgname=$_pkgname-git
pkgver=5.40.0.RC1.r10.g121cb45e8f
_baseversion="${pkgver%.*.*}"
pkgrel=1
pkgdesc="A highly capable, feature-rich programming language (Git)"
arch=(x86_64)
license=('GPL' 'PerlArtistic')
url="https://www.perl.org"
depends=('gdbm>=1.17' '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=('perl-archive-tar=2.40'
          'perl-attribute-handlers=1.03'
          'perl-autodie=2.36'
          'perl-autoloader=5.74'
          'perl-autouse=1.11'
          'perl-base=2.27'
          'perl-bignum=0.66'
          'perl-carp=1.54'
          'perl-compress-raw-bzip2=2.205'
          'perl-compress-raw-zlib=2.205'
          'perl-config-perl-v=0.36'
          'perl-constant=1.33'
          'perl-cpan-meta-requirements=2.143'
          'perl-cpan-meta-yaml=0.018'
          'perl-cpan-meta=2.150010'
          'perl-cpan=2.36'
          'perl-data-dumper=2.188'
          'perl-db_file=1.858'
          'perl-devel-ppport=3.71'
          'perl-devel-selfstubber=1.06'
          'perl-digest-md5=2.58_01'
          'perl-digest-sha=6.04'
          'perl-digest=1.20'
          'perl-dumpvalue=1.21'
          'perl-encode=3.19'
          'perl-encoding-warnings=0.14'
          'perl-env=1.06'
          'perl-experimental=0.031'
          'perl-exporter=5.77'
          'perl-extutils-cbuilder=0.280239'
          'perl-extutils-constant=0.25'
          'perl-extutils-install=2.22'
          'perl-extutils-makemaker=7.70'
          'perl-extutils-manifest=1.75'
          'perl-extutils-parsexs=3.51'
          '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.53'
          'perl-getopt-long=2.54'
          'perl-http-tiny=0.086'
          'perl-i18n-collate=1.02'
          'perl-i18n-langtags=0.45'
          'perl-if=0.0610'
          'perl-io-compress=2.205'
          'perl-io-socket-ip=0.41_01'
          'perl-io-zlib=1.14'
          'perl-io=1.52'
          '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.5014'
          'perl-math-bigint=1.999839'
          'perl-math-bigrat=0.2624'
          'perl-math-complex=1.62'
          'perl-memoize=1.16'
          'perl-mime-base64=3.16_01'
          'perl-module-corelist=5.20230720'
          '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.241'
          'perl-pathtools=3.89'
          'perl-perl-ostype=1.010'
          'perl-perlfaq=5.20230701'
          'perl-perlio-via-quotedprint=0.10'
          'perl-pod-checker=1.75'
          'perl-pod-escapes=1.07'
          'perl-pod-perldoc=3.2801'
          'perl-pod-simple=3.43'
          'perl-pod-usage=2.03'
          'perl-podlators=5.010'
          'perl-safe=2.44'
          'perl-scalar-list-utils=1.63'
          'perl-search-dict=1.07'
          'perl-selfloader=1.26'
          'perl-socket=2.037'
          'perl-storable=3.32'
          '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-test-harness=3.44'
          'perl-test-simple=1.302195'
          'perl-test=1.31'
          'perl-text-abbrev=1.02'
          'perl-text-balanced=2.06'
          'perl-text-parsewords=3.31'
          'perl-text-tabs=2023.0511'
          'perl-thread-queue=3.14'
          'perl-thread-semaphore=2.13'
          'perl-threads-shared=1.68'
          'perl-threads=2.37'
          'perl-tie-file=1.07'
          'perl-tie-refhash=1.40'
          'perl-time-hires=1.9776'
          'perl-time-local=1.35'
          'perl-time-piece=1.3401_01'
          'perl-unicode-collate=1.31'
          'perl-unicode-normalize=1.32'
          'perl-version=0.9929'
          'perl-xsloader=0.32')
# Add your own provides here
provides=(${provides[@]}
          "perl=${pkgver}")
conflicts=('perl')
source=("perl::git+https://github.com/Perl/perl5.git"
        perlbin.sh
        perlbin.csh
        perlbin.fish
        detect-old-perl-modules.sh
        detect-old-perl-modules.hook)
options=('makeflags' '!purge' 'emptydirs')
sha512sums=('SKIP'
            'b7678078d64cc593a3503c45f023c49915d0d703f1cea8282f4191f1e3aa62764cc6cfcae3dc3828101415b8e15d5ed8b1b79d423ef387550ae33172b0de92bc'
            '53eb0cddfd637014f3d3a101665db8dcafe5ac5bf3d319a259974334eb89c1c405097518ae96b6d18e520194633c7be57c9b2cd9ae6398443eb08f1a2008d112'
            '881e2efe05ba818cd7300f126800b56bb0685cb5c9c5fb7e67ef6aaf5abd17d2391a979d5d16d109c5111f4b35504ba83d19b0e6eda4431e8421fcbea19d2f1a'
            'bd48af7a6209f2ad51aa1747a7238ecb11607a53f61460d873202bf14b55c3b7dd6f66f4a9f2cac8a24240313789a9a44dbc81b73587de46a6b1866bdfca5e26'
            '063624b6fc3728339e4f352597e6913c476c4eaa8e1004b2a46c480b5cce9c42f3083d1e6960081202099acf2b7d0b5d13dc6b7ee0aa303c272826febdcd311e')
# 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}
}

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 \
    -Dman1ext=1perl -Dman3ext=3perl ${arch_opts} \
    -Dlddlflags="-shared ${LDFLAGS}" -Dldflags="${LDFLAGS}" \
    -Dmyuname="archlinux" \
    -Dmyhostname="archlinux" \
    -Dcf_time="`date -u --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}"`"
  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$version"

  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
}