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.

166 lines
4.1 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../uclibc/uclibc.conf
  5. # Copyright (C) 2006 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. . $confdir/functions.in
  16. # create /etc/ld.so.conf
  17. hook_add postinstall 5 'uclibc_ldsoconf'
  18. uclibc_ldsoconf() {
  19. cat > $root/etc/ld.so.conf <<-EOT
  20. /lib
  21. /usr/lib
  22. /usr/X11/lib
  23. /opt/*/lib
  24. EOT
  25. }
  26. # rulesets
  27. var_append conffiles ' ' $confdir/clean_arch.config
  28. hook_add preconf 3 "default_config > $builddir/.config"
  29. var_append conffiles ' ' $builddir/.config
  30. # add custom/target configuration from $targetdir
  31. if [ -e $targetdir/uclibc.config ] ; then
  32. var_append conffiles ' ' $targetdir/uclibc.config
  33. fi
  34. default_config()
  35. {
  36. echo "X TARGET_$( echo $arch | arch2uname )"
  37. # case "$arch" in
  38. # i386) cpu
  39. # echo "X CONFIG_$( echo SDECFG_X86_OPT )"
  40. # esac
  41. if [ "$arch_bigendian" = "yes" ]; then
  42. echo "X ARCH_BIG_ENDIAN"
  43. echo "X ARCH_WANTS_BIG_ENDIAN"
  44. else
  45. echo "X ARCH_LITTLE_ENDIAN"
  46. echo "X ARCH_WANTS_LITTLE_ENDIAN"
  47. fi
  48. # PREFIX
  49. if atstage toolchain; then
  50. echo "X KERNEL_SOURCE \"$base/build/$SDECFG_ID/usr\""
  51. else
  52. echo "X KERNEL_SOURCE \"$root/usr\""
  53. fi
  54. echo "X RUNTIME_PREFIX \"/\""
  55. #echo "X DEVEL_PREFIX \"/usr/lib/uclibc\"" # NOTE: why there?
  56. echo "X DEVEL_PREFIX \"/usr\""
  57. if [ "$SDECFG_STATIC" = 0 ]; then
  58. echo "X SHARED_LIB_LOADER_PREFIX \"/lib\""
  59. # ld.so preload
  60. echo "X LDSO_PRELOAD_FILE_SUPPORT"
  61. else
  62. echo "O HAVE_SHARED"
  63. fi
  64. # locale
  65. if [ "$SDECFG_DISABLE_NLS" = "0" ]; then
  66. echo "X UCLIBC_HAS_LOCALE"
  67. fi
  68. # turning off locale will break ncurses
  69. # util-linux needs it to build some mounts
  70. # FIXME: this has to be done in the oposite way (disable those mounts
  71. # if libc doesn't have support)
  72. echo "X UCLIBC_HAS_RPC"
  73. echo "X UCLIBC_HAS_FULL_RPC"
  74. # to get rint (iproute2)
  75. echo "X DO_C99_MATH"
  76. # to make reiserfsprogs happy
  77. echo "X UCLIBC_HAS_GLIBC_CUSTOM_PRINTF"
  78. # to make sed happy
  79. echo "X UCLIBC_HAS_WCHAR"
  80. # I want V6
  81. echo "X UCLIBC_HAS_IPV6"
  82. # needed for attr
  83. echo "X UCLIBC_HAS_FTW"
  84. # needed for acl (among others)
  85. echo "X UCLIBC_HAS_GETTEXT_AWARENESS"
  86. # make make happy :)
  87. echo "X MALLOC_GLIBC_COMPAT"
  88. echo "X UCLIBC_HAS_GNU_GETOPT"
  89. echo "X UCLIBC_HAS_GLOB"
  90. echo "X UCLIBC_HAS_FLOATS"
  91. }
  92. if [ "$SDECFG_DISABLE_NLS" = "0" ]; then
  93. uclibc_preparelocale() {
  94. find ./charmaps -name "*.pairs" > codesets.txt
  95. cp -v LOCALES locales.txt
  96. }
  97. hook_add preconf 5 '( cd extra/locale; uclibc_preparelocale )'
  98. var_append patchfiles ' ' $confdir/make_locale_after_headers.diff
  99. fi
  100. runconf=0
  101. # FIXME: inject X options early - so 2 loops are enough
  102. hook_add premake 5 "auto_config 3"
  103. var_remove_regex makeopt ' ' 'prefix=[^ ]*'
  104. if atstage toolchain; then
  105. var_append makeopt ' ' PREFIX=$base/build/$SDECFG_ID
  106. else
  107. var_append makeopt ' ' "PREFIX=$root"
  108. fi
  109. makeinstopt="$makeopt"
  110. if atstage toolchain; then
  111. var_append makeopt ' ' "headers"
  112. var_append makeinstopt ' ' "install_headers"
  113. else
  114. var_append makeopt ' ' "pregen"
  115. var_append makeopt ' ' "all"
  116. var_append makeopt ' ' "utils"
  117. var_append makeinstopt ' ' "install_dev"
  118. var_append makeinstopt ' ' "install_runtime"
  119. var_append makeinstopt ' ' "install_utils"
  120. fi
  121. hook_add prepatch 5 'sanitize_makefile'
  122. sanitize_makefile() {
  123. sed -i -e 's,\($(RM)\) $(PREFIX)$(DEVEL_PREFIX)\(.*\.h\),\1 \2,' Makefile.in
  124. }
  125. # inject kernel symlinks
  126. hook_add preconf 5 'uclibc_kernellinks'
  127. uclibc_kernellinks() {
  128. local x=
  129. rm -rvf include/scsi
  130. for x in $( ls -1d $root/usr/include/{asm,asm-*,scsi,linux} 2> /dev/null ); do
  131. ln -svf $x include/
  132. done
  133. }
  134. # remove symlinks to avoid shares (install_dev)
  135. hook_add inmake 5 'rm -vf include/{asm,asm-*,scsi,linux}'
  136. hook_add postdoc 5 'cp -v .config $root/$docdir/'