1 # Build script for perl and perl-cross.
2 # Perl-cross URL: http://arsv.github.io/perl-cross/
4 # Copyright (c) 2014-2017 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.
21 rm -rf -- "${TMPDIR}/perl-${version}" \
22 "${TMPDIR}/perl-cross-${cross_ver}"
23 untar "${worktree}/sources/perl-${version}.tar.gz" "$TMPDIR"
24 untar "${worktree}/sources/perl-cross-${cross_ver}.tar.gz" "$TMPDIR"
26 # Copy perl-cross files over perl-<version>
28 cp -f -r "perl-cross-${cross_ver}"/* "perl-${version}"
33 # Don't use -fstack-protector* (troubles)
34 sed -i 's/-fstack-protector/-fnostack-protector/g' ./Configure
40 -Dprivlib=/tools/lib${libSuffix}/perl5 \
41 -Dsitelib=/tools/lib${libSuffix}/perl5/site_perl \
42 -A ldflags="$BTLDFLAGS -static"
46 mkdir -p -- "${rootdir}/tools/bin" "${rootdir}/tools/lib${libSuffix}/perl5"
48 cp -f perl cpan/podlators/scripts/pod2man "${rootdir}/tools/bin"
49 cp -R lib/* "${rootdir}/tools/lib${libSuffix}/perl5"
53 cd -- "$TMPDIR" && rm -rf "perl-${version}" "perl-cross-${cross_ver}"