1 # Build script for perl and perl-cross.
2 # Perl-cross URL: http://arsv.github.io/perl-cross/
4 # Copyright (c) 2014-2019 Matias Fonzo, <selk@dragora.org>.
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
22 rm -rf perl-${version} perl-cross-${cross_ver}
23 unpack "${worktree}/sources/perl-${version}.tar.gz" \
24 "${worktree}/sources/perl-cross-${cross_ver}.tar.gz"
26 # Copy perl-cross over Perl distribution
27 cp -f -r perl-cross-${cross_ver}/* perl-${version}/
32 # Update for hosts based on musl
33 cp -f "${worktree}/archive/common/config.guess" cnf/config.guess
34 cp -f "${worktree}/archive/common/config.sub" cnf/config.sub
40 -Dprivlib=/tools/lib${libSuffix}/perl5 \
41 -Dsitelib=/tools/lib${libSuffix}/perl5/site_perl \
42 -Dldflags="$BTLDFLAGS -static"
46 mkdir -p -- "${rootdir}/tools/bin" "${rootdir}/tools/lib${libSuffix}/perl5"
47 cp -f perl cpan/podlators/scripts/pod2man "${rootdir}/tools/bin"
48 cp -R lib/* "${rootdir}/tools/lib${libSuffix}/perl5"
52 cd -- "$TMPDIR" && rm -rf perl-${version} perl-cross-${cross_ver}