OpenSDE Packages Database (without history before r20070)
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.

199 lines
6.2 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../uclibc/parse-config-9
  5. # Copyright (C) 2006 - 2009 The OpenSDE Project
  6. # Copyright (C) 2004 - 2006 The T2 SDE Project
  7. #
  8. # More information can be found in the files COPYING and README.
  9. #
  10. # This program is free software; you can redistribute it and/or modify
  11. # it under the terms of the GNU General Public License as published by
  12. # the Free Software Foundation; version 2 of the License. A copy of the
  13. # GNU General Public License can be found in the file COPYING.
  14. # --- SDE-COPYRIGHT-NOTE-END ---
  15. if [ "$SDECFG_LIBC" == "uclibc" ]; then
  16. pkg_uclibc_dir=$base/package/base/uclibc
  17. if [ $pkg != "gettext" ]; then
  18. var_append flistdel "|" "usr/share/locale/locale.alias"
  19. fi
  20. # the most tipical fix is to config.sub
  21. #
  22. uclibc_fix_configsub() {
  23. local x; for x; do
  24. echo "uclibc_fix_configsub: adding uclibc_arch_target support to $x"
  25. cp -f $x $x.orig
  26. sed -e 's,\([-]\?linux\)-gnu\*,\1-gnu\* | \1-uclibc\*,g' $x.orig > $x
  27. diff -u $x.orig $x || true
  28. done
  29. }
  30. uclibc_auto_fix_configsub() {
  31. local f
  32. for f in . ./config ./support; do
  33. if [ -e $f/config.sub ] ; then
  34. if ! grep -q '\-uclibc' $f/config.sub; then
  35. uclibc_fix_configsub $f/config.sub
  36. fi
  37. fi
  38. done
  39. }
  40. uclibc_findall_fix_configsub() {
  41. local f
  42. for f in `find . -name config.sub`; do
  43. uclibc_fix_configsub $f
  44. done
  45. }
  46. # FIXME: i forgot what makes uclibc_fix_addcases different than uclibc_fix_configsub //mnemoc
  47. uclibc_fix_addcases() {
  48. local file; for file; do
  49. echo "uclibc_fix_addcases: adding *-linux-uclibc* support to $file"
  50. cp -f $file $file.orig
  51. sed -i -e 's,\([^ ]*\)linux-gnu\*\(.*\)\([\)\\]\),\1linux-gnu* | \1linux-uclibc*\2\3,g' $file
  52. diff -u $file.orig $file || true
  53. done
  54. }
  55. uclibc_fix_addcases2() {
  56. local file; for file; do
  57. echo "uclibc_fix_addcases2: adding *-linux-uclibc* support to $file"
  58. cp -f $file $file.orig
  59. sed -i -e 's,\( *.*\)linux-gnu\*)\(.*\)\;\;$,\1linux-uclibc*)\2;;\n\1linux-gnu*)\2;;,g' \
  60. -e 's,\( *.*\)linux-gnu\*)\(.*[^;][^;]\)$,\1linux-uclibc* \| \\\n\1linux-gnu*)\2,g' \
  61. $file
  62. diff -u $file.orig $file || true
  63. done
  64. }
  65. # fix tipical locations
  66. hook_add postpatch 5 'uclibc_auto_fix_configsub'
  67. # and some others
  68. case "$pkg" in
  69. gcc)
  70. hook_add postpatch 6 'uclibc_fix_configsub libjava/libltdl/config.sub'
  71. ;;
  72. apache|minicom|nmap|expat|libiconv|dmraid)
  73. hook_add postpatch 6 'uclibc_findall_fix_configsub'
  74. ;;
  75. ntp)
  76. hook_add postpatch 6 'uclibc_fix_configsub sntp/config.sub'
  77. ;;
  78. lzo)
  79. hook_add postpatch 6 'uclibc_fix_configsub autoconf/config.sub'
  80. ;;
  81. binutils)
  82. hook_add postpatch 4 'uclibc_fix_addcases ./bfd/config.bfd ./bfd/configure \
  83. ./bfd/configure.in ./ld/configure.tgt'
  84. hook_add postpatch 5 'uclibc_fix_addcases2 ./gas/configure ./gas/configure.in'
  85. ;;
  86. gdb)
  87. hook_add postpatch 4 'uclibc_fix_addcases ./bfd/config.bfd ./bfd/configure'
  88. ;;
  89. bdb)
  90. hook_add postpatch 6 'uclibc_fix_configsub ./dist/config.sub'
  91. ;;
  92. bdb33)
  93. hook_add postpatch 6 'uclibc_fix_configsub ./dist/config.sub'
  94. hook_add postpatch 6 'uclibc_fix_configsub ./dist/configure'
  95. ;;
  96. a2ps)
  97. hook_add postpatch 6 'uclibc_fix_configsub ./auxdir/config.sub'
  98. ;;
  99. pidentd)
  100. hook_add postpatch 6 'uclibc_fix_configsub ./aux/config.sub'
  101. ;;
  102. apollon)
  103. hook_add postpatch 6 'uclibc_fix_configsub ./admin/config.sub'
  104. ;;
  105. openldap)
  106. hook_add postpatch 6 'uclibc_fix_configsub ./contrib/ldapc++/config.sub'
  107. hook_add postpatch 6 'uclibc_fix_configsub ./build/config.sub'
  108. ;;
  109. libsigc++12)
  110. hook_add postpatch 6 'uclibc_fix_configsub ./scripts/config.sub'
  111. ;;
  112. libsigc++1)
  113. hook_add postpatch 6 'uclibc_fix_configsub ./scripts/config.sub'
  114. hook_add postpatch 6 'uclibc_fix_configsub ./scripts/ltconfig'
  115. ;;
  116. jasper)
  117. # jasper is autoextract=0 so postpatch is never evaluated
  118. hook_add preconf 6 'uclibc_fix_configsub ./acaux/config.sub'
  119. hook_add preconf 6 'uclibc_fix_configsub ./configure'
  120. hook_add preconf 6 'uclibc_fix_configsub ./aclocal.m4'
  121. ;;
  122. gdbm)
  123. hook_add postpatch 6 'uclibc_fix_configsub ./configure'
  124. ;;
  125. mono)
  126. hook_add postpatch 6 'uclibc_fix_configsub ./libgc/config.sub'
  127. hook_add postpatch 6 'uclibc_fix_configsub ./libgc/configure'
  128. hook_add postpatch 6 'uclibc_fix_configsub ./libgc/libtool.m4'
  129. ;;
  130. gsmlib)
  131. hook_add postpatch 6 'uclibc_fix_configsub ./configure'
  132. hook_add postpatch 6 'uclibc_fix_configsub ./aclocal.m4'
  133. hook_add postpatch 6 'uclibc_fix_configsub ./scripts/config.sub'
  134. hook_add postpatch 6 'uclibc_fix_configsub ./scripts/ltconfig'
  135. ;;
  136. libxml1|librep)
  137. hook_add postpatch 6 'uclibc_fix_configsub ./configure'
  138. hook_add postpatch 6 'uclibc_fix_configsub ./aclocal.m4'
  139. ;;
  140. fribidi)
  141. hook_add postpatch 6 'uclibc_fix_configsub ./configure'
  142. ;;
  143. rpm)
  144. hook_add postpatch 6 'uclibc_fix_configsub ./*/config.sub'
  145. hook_add postpatch 6 'uclibc_fix_configsub ./*/configure'
  146. hook_add postpatch 6 'uclibc_fix_configsub ./*/aclocal.m4'
  147. hook_add postpatch 6 'uclibc_fix_configsub ./*/*/config.sub'
  148. hook_add postpatch 6 'uclibc_fix_configsub ./*/*/configure'
  149. ;;
  150. libgd)
  151. hook_add postpatch 6 'uclibc_fix_configsub ./configure'
  152. hook_add postpatch 6 'uclibc_fix_configsub ./aclocal.m4'
  153. hook_add postpatch 6 'uclibc_fix_configsub ./config/config.sub'
  154. ;;
  155. device-mapper|lvm2)
  156. hook_add postpatch 6 'uclibc_fix_configsub ./autoconf/config.sub'
  157. ;;
  158. libdvdcss|libdvbpsi3|libmpeg2|a52dec)
  159. hook_add postpatch 6 'uclibc_fix_configsub ./autotools/config.sub'
  160. ;;
  161. apr|apr-util)
  162. hook_add postpatch 6 'uclibc_fix_configsub ./build/config.sub'
  163. ;;
  164. esac
  165. if [ "$SDECFG_STATIC" == 1 ]; then
  166. case "$pkg" in
  167. openssl|iproute2)
  168. var_append GCC_WRAPPER_REMOVE ' ' '-ldl' ;;
  169. esac
  170. fi
  171. # same package translations to look for patches
  172. case "$pkg" in
  173. linux24*)
  174. pkg_uclibc_pkg=linux24 ;;
  175. linux26*|linux-header)
  176. pkg_uclibc_pkg=linux26 ;;
  177. *)
  178. pkg_uclibc_pkg=${pkg//-/_} ;;
  179. esac
  180. pkg_uclubc_patches=$( ls -1 $pkg_uclibc_dir/pkg_patch/$pkg_uclibc_pkg/*.patch 2> /dev/null | tr '\n' ' ' )
  181. if [ -n "$pkg_uclubc_patches" ]; then
  182. echo_status "uClibc: appending patches ..."
  183. var_append patchfiles ' ' "$pkg_uclubc_patches"
  184. fi
  185. if [ -f $pkg_uclibc_dir/pkg_conf/$pkg_uclibc_pkg.conf ]; then
  186. . $pkg_uclibc_dir/pkg_conf/$pkg_uclibc_pkg.conf
  187. fi
  188. fi