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.

158 lines
4.8 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/glibc23/glibc23.conf
  9. # ROCK Linux is Copyright (C) 1998 - 2003 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 [ $pkg = glibc22 ] ; then
  23. # auto-detect for the old glibc
  24. ADDONS=""
  25. else
  26. # prevent the utilisation of nptl (...) - and enable it later
  27. # if a 2.5/6 kernel is used
  28. ADDONS="=linuxthreads"
  29. fi
  30. # use at least "-O" when build without optimisation for debugging ...
  31. var_insert GCC_WRAPPER_INSERT " " "-O"
  32. glibc_custmain() {
  33. # check whether profiling is enabled
  34. if [ $ROCKCFG_PKG_GLIBC_ENABLE_PROFILE = 1 ] ; then
  35. G_PROFILE=--enable-profile
  36. else
  37. G_PROFILE=--disable-profile
  38. fi
  39. # Let's use an 'objdir' directory for building glibc
  40. mkdir -p objdir; cd objdir
  41. # Disable glibc internal debuging but build debuging and profile
  42. # code so we can use this glibc to debug other programs.
  43. CFLAGS="$CFLAGS -g -DNDEBUG=1" ../configure --prefix=$root/usr \
  44. --with-gnu-binutils --enable-add-ons"$ADDONS" $G_PROFILE \
  45. --with-headers=$root/usr/src/linux/include --with-gd=/usr \
  46. --with-gd-lib=/usr/lib --with-gd-include=/usr/include \
  47. --build=${arch_build} --host=${arch_target}
  48. eval $MAKE prefix=/usr slibdir=/lib sysconfdir=/etc all
  49. eval $MAKE prefix=/usr slibdir=/lib \
  50. sysconfdir=/etc install_root=$root install
  51. ln -sf libbsd-compat.a $root/usr/lib/libbsd.a
  52. # Misc. stuff
  53. #
  54. if [ $stagelevel -gt 1 ] ; then
  55. # install locales and linuxthread manpages
  56. #
  57. eval $MAKE localedata/install-locales
  58. cp ../localedata/SUPPORTED $root/usr/share/i18n/
  59. mkdir -p $root/usr/share/man/man3
  60. if [ -f /usr/bin/perl ] ; then
  61. eval $MAKE -C ../linuxthreads/man \
  62. MANDIR=$root/usr/share/man/man3 all install
  63. fi
  64. # copy linuxthreads and crypt documentation
  65. #
  66. cp ../linuxthreads/ChangeLog $docdir/ChangeLog.threads
  67. cp ../linuxthreads/Changes $docdir/Changes.threads
  68. cp ../linuxthreads/README $docdir/README.threads
  69. cp ../linuxthreads/FAQ.html $docdir/FAQ-threads.html
  70. cp -r ../linuxthreads/Examples $docdir/examples.threads
  71. cp ../crypt/README.ufc-crypt $docdir/README.crypt
  72. # NSCD Init script and config
  73. #
  74. cp $confdir/nscd.conf $confdir/nsswitch.conf $root/etc/
  75. install_init nscd $confdir/nscd.init
  76. fi
  77. # No wrong absolute path in libc.so
  78. #
  79. if [ $stagelevel -le 1 ] ; then
  80. libcso=$root/usr/lib/libc.so
  81. sed 's,/[^ ]*/,,g' < $libcso > $libcso.new
  82. mv $libcso.new $libcso
  83. fi
  84. # Install ld.so.conf
  85. #
  86. { echo "/usr/lib" ; echo "/usr/X11/lib"
  87. echo "/usr/local/lib" ; echo "/opt/*/lib"
  88. } > $root/etc/ld.so.conf
  89. # Move 'ldconfig' and 'sln' binaries
  90. #
  91. if [ -f "$root/usr/sbin/ldconfig" ] ; then
  92. mv -v $root/usr/sbin/ldconfig $root/sbin/ldconfig
  93. fi
  94. if [ -f "$root/usr/sbin/sln" ] ; then
  95. mv -v $root/usr/sbin/sln $root/sbin/sln
  96. fi
  97. # Create /lib/ld-lsb.so.1 symlink
  98. #
  99. if
  100. [ -f $root/lib/ld-linux-$arch_machine.so.2 ]
  101. then
  102. ln -vfs ld-linux-$arch_machine.so.2 $root/lib/ld-lsb.so.1
  103. elif
  104. [ -f $root/lib/ld-linux.so.2 ]
  105. then
  106. ln -vfs ld-linux.so.2 $root/lib/ld-lsb.so.1
  107. fi
  108. }
  109. glibc_prepatch() {
  110. tarball="`echo $desc_D | grep linuxthreads | \
  111. sed 's/.* \(.*\.linuxthreads.*\) .*/\1/'`"
  112. if [ "$tarball" ] ; then
  113. tar $taropt $archdir/$tarball
  114. fi
  115. }
  116. glibc_stage0() {
  117. mkdir -p objdir; cd objdir
  118. eval "../configure --enable-add-ons"$ADDONS" ${confopt% --target=*}" \
  119. "--build=\$arch_build --host=\$arch_target"
  120. make -k cross-compiling=yes install-headers || true
  121. # make some final adaptions
  122. cp -v ../include/features.h $root/$prefix/include
  123. cp -v bits/stdio_lim.h $root/$prefix/include/bits
  124. mkdir -p $root/$prefix/include/gnu
  125. touch $root/$prefix/include/gnu/stubs.h
  126. }
  127. threadsver="$ver"
  128. prepatch="glibc_prepatch"
  129. if [ $stagelevel -eq 0 ]; then
  130. custmain="glibc_stage0"
  131. else
  132. custmain="glibc_custmain"
  133. fi
  134. if [ $stagelevel -eq 1 ]; then
  135. var_append patchfiles " " $confdir/no_path_in_glibcso.diff
  136. fi