10-perl 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # Build script for perl and perl-cross.
  2. # Perl-cross URL: http://arsv.github.io/perl-cross/
  3. #
  4. # Copyright (c) 2014-2020 Matias Fonzo, <selk@dragora.org>.
  5. #
  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
  9. #
  10. # http://www.apache.org/licenses/LICENSE-2.0
  11. #
  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.
  17. version=5.30.1
  18. cross_ver=1.3.1
  19. cd -- "$TMPDIR"
  20. rm -rf perl-${version} perl-cross-${cross_ver}
  21. unpack "${worktree}/sources/perl-${version}.tar.gz" \
  22. "${worktree}/sources/perl-cross-${cross_ver}.tar.gz"
  23. # Copy perl-cross over Perl distribution
  24. cp -f -r perl-cross-${cross_ver}/* perl-${version}/
  25. # Build instructions
  26. cd perl-${version}
  27. ./configure \
  28. --prefix=/tools \
  29. --target=$target \
  30. --all-static \
  31. -Dprivlib=/tools/lib${libSuffix}/perl5 \
  32. -Dsitelib=/tools/lib${libSuffix}/perl5/site_perl \
  33. -Dldflags="$BTLDFLAGS -static"
  34. make -j1
  35. mkdir -p -- "${rootdir}/tools/bin" "${rootdir}/tools/lib${libSuffix}/perl5"
  36. cp -f perl cpan/podlators/scripts/pod2man "${rootdir}/tools/bin"
  37. cp -R lib/* "${rootdir}/tools/lib${libSuffix}/perl5"
  38. cleanup()
  39. {
  40. cd -- "$TMPDIR" && rm -rf perl-${version} perl-cross-${cross_ver}
  41. }