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.

143 lines
4.2 KiB

  1. #!/bin/bash
  2. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  3. #
  4. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  5. # Please add additional copyright information _after_ the line containing
  6. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  7. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  8. #
  9. # ROCK Linux: rock-src/package/mnemoc/uclibc/uclibc.conf
  10. # ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
  11. #
  12. # This program is free software; you can redistribute it and/or modify
  13. # it under the terms of the GNU General Public License as published by
  14. # the Free Software Foundation; either version 2 of the License, or
  15. # (at your option) any later version. A copy of the GNU General Public
  16. # License can be found at Documentation/COPYING.
  17. #
  18. # Many people helped and are helping developing ROCK Linux. Please
  19. # have a look at http://www.rocklinux.org/ and the Documentation/TEAM
  20. # file for details.
  21. #
  22. # --- ROCK-COPYRIGHT-NOTE-END ---
  23. . $confdir/functions.in
  24. uclibc_preparelocale() {
  25. find ./charmaps -name "*.pairs" > codesets.txt
  26. cp LOCALES locales.txt
  27. }
  28. uclibc_kernellinks() {
  29. ln -svf $root/include/linux include/linux
  30. ln -svf $root/include/asm include/asm
  31. ln -svf $root/include/scsi include/scsi
  32. }
  33. # rulesets
  34. var_append conffiles ' ' $confdir/clean_arch.config
  35. var_append conffiles ' ' /tmp/$$.config
  36. # i'll use this file for the generated rules
  37. rm -f /tmp/$$.config
  38. {
  39. # TARGET_ARCH
  40. cpu="`echo "$arch_machine" | sed -e s/i.86/i386/ `"
  41. echo "X TARGET_$cpu"
  42. echo "X TARGET_ARCH \"$cpu\""
  43. if [ "$arch_bigendian" = "yes" ]; then
  44. echo "X ARCH_BIG_ENDIAN"
  45. else
  46. echo "X ARCH_LITTLE_ENDIAN"
  47. fi
  48. # CONFIG_
  49. if [ "$arch" == "x86" ]; then
  50. case "$ROCKCFG_X86_OPT" in
  51. generic) echo "X CONFIG_GENERIC_386" ;;
  52. i386) echo "X CONFIG_386" ;;
  53. i486) echo "X CONFIG_486" ;;
  54. pentium) echo "X CONFIG_586" ;;
  55. pentium-mmx) echo "X CONFIG_586MMX" ;;
  56. pentiumpro|pentium2)
  57. echo "X CONFIG_686" ;;
  58. pentium3) echo "X CONFIG_PENTIUMIII" ;;
  59. pentium4) echo "X CONFIG_PENTIUM4" ;;
  60. k6*) echo "X CONFIG_K6" ;;
  61. athlon*) echo "X CONFIG_K7" ;;
  62. via-c3*) echo "X CONFIG_CYRIXIII" ;;
  63. esac
  64. fi
  65. # PREFIX
  66. echo "X KERNEL_SOURCE \"$root/usr/src/linux\""
  67. echo "X RUNTIME_PREFIX \"/\""
  68. echo "X DEVEL_PREFIX \"/usr\""
  69. # locale
  70. if [ "$ROCKCFG_DISABLE_NLS" = "1" ]; then
  71. echo "O UCLIBC_HAS_LOCALE"
  72. else
  73. echo "X UCLIBC_HAS_LOCALE"
  74. echo "X UCLIBC_PREGENERATED_LOCALE_DATA"
  75. fi
  76. # util-linux needs it to build some mounts
  77. # FIXME: this has to be done in the oposite way (disable those mounts
  78. # if libc doesn't have support)
  79. echo "X UCLIBC_HAS_RPC"
  80. # echo "X UCLIBC_HAS_FULL_RPC"
  81. # to get rint (iproute2)
  82. echo "X DO_C99_MATH"
  83. # to make sed happy
  84. echo "X ULIBC_HAS_WCHAR"
  85. # include user config
  86. [ -f $base/config/$config/uclibc.config ] && \
  87. cat $base/config/$config/uclibc.config
  88. } > /tmp/$$.config
  89. # if [ "$ROCKCFG_DISABLE_NLS" = "0" ]; then
  90. # hook_add preconf 5 '( cd extra/locale; uclibc_preparelocale )'
  91. # var_append patchfiles ' ' $confdir/make_locale_after_headers.diff
  92. # fi
  93. var_append makeopt ' ' "PREFIX=$root"
  94. var_append makeopt ' ' "RUNTIME_PREFIX=/ DEVEL_PREFIX=/usr/"
  95. runconf=0
  96. makeinstopt="$makeopt"
  97. hook_add premake 5 "auto_config 2 ; make oldconfig ; echo 'Config is:' ; cat .config"
  98. if [ "$ROCKCFG_DISABLE_NLS" = "0" ]; then
  99. copy_locale_data() {
  100. local x="$( cd $archdir ; ls uClibc-locale-*.tgz.raw )"
  101. cp -av "$archdir/$x" "extra/locale/${x%.raw}"
  102. }
  103. hook_add preconf 5 "copy_locale_data"
  104. fi
  105. if [ $stagelevel -eq 0 ]; then
  106. var_append makeopt ' ' 'headers'
  107. var_append makeinstopt ' ' 'install_headers'
  108. elif [ $stagelevel -eq 1 ] ; then
  109. var_append makeopt ' ' "CC=$arch_target-gcc CROSS=$arch_target-"
  110. var_append makeinstopt ' ' "CC=$arch_target-gcc CROSS=$arch_target- install"
  111. # Use host system headers
  112. var_append CC_WRAPPER_REMOVE " " "-I/usr/include/"
  113. var_append CC_WRAPPER_APPEND " " "-I$root/usr/include/"
  114. else
  115. var_append makeinstopt ' ' install
  116. # remove symlinks to avoid shares (install_dev)
  117. hook_add inmake 9 'rm -v include/{asm,linux,scsi}'
  118. # utils (ldd, ldconfig )
  119. hook_add postmake 5 'uclibc_kernellinks'
  120. hook_add postmake 6 'eval "$MAKE $makeopt utils install_utils"'
  121. fi
  122. var_append flist''del '|' "usr/include"