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.

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