mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
2.7 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/base/perl5/perl5.conf
  9. # ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; either version 2 of the License, or
  14. # (at your option) any later version. A copy of the GNU General Public
  15. # License can be found at Documentation/COPYING.
  16. #
  17. # Many people helped and are helping developing ROCK Linux. Please
  18. # have a look at http://www.rocklinux.org/ and the Documentation/TEAM
  19. # file for details.
  20. #
  21. # --- ROCK-COPYRIGHT-NOTE-END ---
  22. runconfig=0
  23. confopt="-des -Dprefix=$root/usr -Darchname=$arch_target \
  24. -Dmyhostname=$ROCKCFG_PKG_PERL5_HOST_NAME \
  25. -Dsiteprefix=/$ROCKCFG_PKG_PERL5_SITE_PREFIX \
  26. -Dvendorprefix=/$ROCKCFG_PKG_PERL5_VENDOR_PREFIX"
  27. [ "$ROCKCFG_PKG_PERL5_SUIDPERL" != "0" ] && confopt="$confopt -Dd_dosuid"
  28. [ "$ROCKCFG_PKG_PERL5_THREADS" = "1" ] && confopt="$confopt -Dusethreads"
  29. [ "$ROCKCFG_PKG_PERL5_USE_DB3" = "1" ] && patchfiles="$patchfiles $confdir/use_db3.diff"
  30. if [ "$stagelevel" -le 1 ] ; then
  31. custmain=pkg_perl_custmain
  32. else
  33. hook_add preconf 2 "( rm -f config.sh Policy.sh; sh Configure \$confopt; )"
  34. hook_add postmake 4 "pkg_perl_postmake"
  35. fi
  36. pkg_perl_custmain () {
  37. sed -i -e 's/miniperl/miniperl-cross/g' \
  38. ext/util/make_ext x2p/Makefile.SH utils/Makefile
  39. CC=gcc ./configure.gnu --prefix=$root/usr -Dstatic_ext='Data/Dumper IO Fcntl POSIX'
  40. make miniperl
  41. mv miniperl miniperl-cross
  42. make clean
  43. sed -i -e "s@\(^ar=\).*@\1'${AR}'@g" \
  44. -e "s@\(^ranlib=\).*@\1'${RANLIB}'@g" \
  45. -e "s@\(^cc=\).*@\1'${CC} ${BUILD32}'@g" \
  46. -e "s@\(^ld=\).*@\1'${CC} ${BUILD32}'@g" config.sh
  47. make miniperl
  48. sed -i -e 's|(LDLIBPTH) ./miniperl|(LDLIBPTH) ./miniperl-cross|g' Makefile
  49. make perl utilities
  50. cp perl pod/pod2man $root/usr/bin
  51. install -d $root/usr/lib/perl5/$ver
  52. cp -R lib/* $root/usr/lib/perl5/$ver
  53. }
  54. pkg_perl_postmake() {
  55. h2ph $( grep ' usr/include/.*\.h$' \
  56. $root/var/adm/flists/glibc* | sed "s,^.*: ,$root/," )
  57. cat > $root/usr/bin/cpan <<- EOT
  58. #!/usr/bin/perl
  59. use POSIX;
  60. use locale;
  61. use CPAN;
  62. setlocale(LANGUAGE, "en_US");
  63. setlocale(LC_ALL, "en_US");
  64. shell;
  65. EOT
  66. chmod +x $root/usr/bin/cpan
  67. mkdir -p $root/usr/lib/perl5/$ver/${archprefix%-}
  68. touch $root/usr/lib/perl5/$ver/${archprefix%-}/perllocal.pod
  69. }