11-perl 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # Build script for perl and perl-cross.
  2. # Perl-cross URL: http://arsv.github.io/perl-cross/
  3. #
  4. # Copyright (c) 2014-2022 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.32.1
  18. cross_ver=1.3.5
  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. -Dusethreads \
  32. -Dprivlib=/tools/lib${libSuffix}/perl5 \
  33. -Dsitelib=/tools/lib${libSuffix}/perl5/site_perl \
  34. -Dldflags="$BTLDFLAGS -static"
  35. make -j1
  36. mkdir -p -- "${rootdir}/tools/bin" "${rootdir}/tools/lib${libSuffix}/perl5"
  37. cp -f perl cpan/podlators/scripts/pod2man "${rootdir}/tools/bin"
  38. cp -R lib/* "${rootdir}/tools/lib${libSuffix}/perl5"
  39. cleanup()
  40. {
  41. cd -- "$TMPDIR" && rm -rf perl-${version} perl-cross-${cross_ver}
  42. }