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.

67 lines
2.2 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/mnemoc/uclibc/parse-config-9
  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. if [ "$ROCKCFG_PKG_UCLIBC_USEIT" == "1" ]; then
  23. pkg_uclibc_dir=$base/package/mnemoc/uclibc
  24. # the most tipical fix is to config.sub
  25. #
  26. uclibc_fix_configsub() {
  27. local x; for x; do
  28. echo "uclibc_fix_configsub: adding uclibc_arch_target support to $x"
  29. cp -f $x $x.orig
  30. sed -e 's,\([-]\?linux\)-gnu\*,\1-gnu\* | \1-uclibc\*,g' $x.orig > $x
  31. diff -u $x.orig $x || true
  32. done
  33. }
  34. uclibc_auto_fix_configsub() {
  35. local f
  36. for f in . ./config ./support; do
  37. if [ -e $f/config.sub ]; then
  38. uclibc_fix_configsub $f/config.sub
  39. fi
  40. done
  41. }
  42. # fix tipical locations
  43. hook_add postpatch 5 'uclibc_auto_fix_configsub'
  44. # and some others
  45. case "$pkg" in
  46. gcc33) hook_add postpatch 6 'uclibc_fix_configsub boehm-gc/config.sub' ;;
  47. esac
  48. # same package translations to look for patches
  49. case "$xpkg" in
  50. linux24*)
  51. pkg_uclibc_patchdir=$pkg_uclibc_dir/patches/linux24 ;;
  52. linux26*)
  53. pkg_uclibc_patchdir=$pkg_uclibc_dir/patches/linux26 ;;
  54. *)
  55. pkg_uclibc_patchdir=$pkg_uclibc_dir/patches/$xpkg ;;
  56. esac
  57. # patching
  58. if [ "`echo $pkg_uclibc_patchdir-*.patch`" != "$pkg_uclibc_patchdir-*.patch" ]; then
  59. echo_status "uClibc: appending patches..."
  60. var_append patchfiles ' ' "`echo $pkg_uclibc_patchdir-*.patch`"
  61. fi
  62. fi