wok-backports diff glibc/receipt @ rev 47
Tiny edits
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Wed Mar 30 01:57:05 2016 +0300 (2016-03-30) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/glibc/receipt Wed Mar 30 01:57:05 2016 +0300 1.3 @@ -0,0 +1,149 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="glibc" 1.7 +VERSION="2.14.1" 1.8 +CATEGORY="meta" 1.9 +SHORT_DESC="The GNU C libraries. This package is used to compile the libc." 1.10 +MAINTAINER="pankso@slitaz.org" 1.11 +LICENSE="GPL2" 1.12 +TARBALL="$PACKAGE-$VERSION.tar.gz" 1.13 +WEB_SITE="http://www.gnu.org/software/libc/" 1.14 +WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL" 1.15 + 1.16 +DEPENDS="glibc-base glibc-locale glibc-dev" 1.17 +BUILD_DEPENDS="linux-api-headers autoconf bash" 1.18 + 1.19 +# Genpkg order for tazwok. 1.20 +COOK_OPT="genpkg=glibc-base:glibc-extra-samba:glib-locale:glibc-dev" 1.21 + 1.22 +# Rules to compile & install the temporary toolchain. 1.23 +cook_tmp_toolchain() 1.24 +{ 1.25 + cd $src 1.26 + 1.27 + # Glibc Bug Fixes Patch from LFS 1.28 + patch -Np1 -i $stuff/glibc-2.14.1-fixes-1.patch 1.29 + # Glibc Bug Sort Relocatable Objects Patch 1.30 + patch -Np1 -i $stuff/glibc-2.14.1-sort-1.patch 1.31 + # Fix a bug that prevents Glibc from building with GCC-4.6.2 1.32 + patch -Np1 -i stuff/glibc-2.14.1-gcc_fix-1.patch 1.33 + 1.34 + # Build in a separate directory. 1.35 + mkdir ../glibc-build && cd ../glibc-build 1.36 + 1.37 + # glibc no longer support i386, so use -march=i486 for better compatibility. 1.38 + # If i686 ??? 1.39 + unset CFLAGS CXXFLAGS 1.40 + case $ARCH in 1.41 + i386|i486) 1.42 + echo "CFLAGS += -O2 -march=i486 -mtune=i486" > configparms ;; 1.43 + *) 1.44 + echo "CFLAGS += -O2 -march=$ARCH -mtune=$ARCH" > configparms ;; 1.45 + esac 1.46 + 1.47 + { $src/configure \ 1.48 + --host=$HOST_SYSTEM \ 1.49 + --build=$($src/scripts/config.guess) \ 1.50 + --disable-profile --enable-add-ons \ 1.51 + --enable-kernel=2.6.30 --with-headers=/tools/include \ 1.52 + libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes && 1.53 + make && 1.54 + make install 1.55 + } || return 1 1.56 + 1.57 + # Link compiler to this new glibc. 1.58 + SPECS=`dirname $($HOST_SYSTEM-gcc -print-libgcc-file-name)`/specs 1.59 + $HOST_SYSTEM-gcc -dumpspecs | sed \ 1.60 + -e 's@/lib\(64\)\?/ld@/tools&@g' \ 1.61 + -e "/^\*cpp:$/{n;s,$, -isystem /tools/include,}" > $SPECS 1.62 + unset SPECS 1.63 +} 1.64 + 1.65 +# Rules to configure and make the package. 1.66 +compile_rules() 1.67 +{ 1.68 + cd $src 1.69 + 1.70 + # SliTaz is a Busybox based OS, why we so small and fast. Using gawk by 1.71 + # default to build package will not ensure package work with Busybox awk 1.72 + # and so should NOT be use to cook. 1.73 + if [ -x /usr/bin/cook ]; then 1.74 + [ -d "/var/lib/tazpkg/installed/gawk" ] || tazpkg get-install gawk 1.75 + fi 1.76 + 1.77 + # Fixes and patches from LFS, Redhat 1.78 + sed -i -e 's/"db1"/& \&\& $name ne "nss_test1"/' scripts/test-installation.pl 1.79 + sed -i 's|@BASH@|/bin/bash|' elf/ldd.bash.in 1.80 + 1.81 + # Glibc misc Bug Fixes 1.82 + patch -Np1 -i $stuff/glibc-2.14.1-fixes-1.patch 1.83 + 1.84 + # Glibc Bug Sort Relocatable Objects Patch 1.85 + #patch -Np1 -i $stuff/glibc-2.14.1-sort-1.patch 1.86 + 1.87 + # Fix a bug that prevents Glibc from building with GCC-4.6.2 1.88 + patch -Np1 -i $stuff/glibc-2.14.1-gcc_fix-1.patch 1.89 + 1.90 + # Revert commit causing issues with crappy DNS servers 1.91 + patch -Np1 -i $stuff/glibc-2.14-revert-4768ae77.patch 1.92 + 1.93 + # re-export RPC interface until libtirpc is ready as a replacement 1.94 + # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=acee4873 (only fedora branch...) 1.95 + patch -Np1 -i $stuff/glibc-2.14-reexport-rpc-interface.patch 1.96 + # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=bdd816a3 (only fedora branch...) 1.97 + patch -Np1 -i $stuff/glibc-2.14-reinstall-nis-rpc-headers.patch 1.98 + 1.99 + # Fix a stack imbalance that occurs under some conditions: 1.100 + sed -i '195,213 s/PRIVATE_FUTEX/FUTEX_CLOCK_REALTIME/' \ 1.101 + nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S \ 1.102 + nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S 1.103 + 1.104 + # Glibc needs ld.so.conf in the install destdir. 1.105 + mkdir -p $WOK/$PACKAGE/install/etc 1.106 + touch $WOK/$PACKAGE/install/etc/ld.so.conf 1.107 + mkdir ../glibc-build && cd ../glibc-build 1.108 + 1.109 + # Read the INSTALL file in glibc. Also Glibc dont build with -Os flag. 1.110 + # --enale-kernel use latest SliTaz Kernel version. From Glibc INSTALL: 1.111 + # "The higher the VERSION number is, the less compatibility code is 1.112 + # added, and the faster the code gets." 1.113 + unset CFLAGS CXXFLAGS 1.114 + case "$ARCH" in 1.115 + i386|i486) 1.116 + echo "CFLAGS += -O2 -march=i486 -mtune=i486" > configparms ;; 1.117 + *) 1.118 + echo "CFLAGS += -O2 -march=$ARCH -mtune=$ARCH" > configparms ;; 1.119 + esac 1.120 + { $src/configure \ 1.121 + --disable-profile \ 1.122 + --enable-add-ons \ 1.123 + --enable-kernel=2.6.30 \ 1.124 + --libexecdir=/usr/lib/glibc \ 1.125 + --build=$HOST_SYSTEM \ 1.126 + --host=$HOST_SYSTEM \ 1.127 + --target=$BUILD_SYSTEM && 1.128 + make && make install_root=$DESTDIR install 1.129 + } || return 1 1.130 + 1.131 + # If temporary toolchain was previously used, switch to regular toolchain. 1.132 + [ -d /tools ] || return 1.133 + mv /tools/bin/ld /tools/bin/ld-old 1.134 + mv /tools/$(gcc -dumpmachine)/bin/ld /tools/$(gcc -dumpmachine)/bin/ld-old 1.135 + mv /tools/bin/ld-new /tools/bin/ld 1.136 + ln -s /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld 1.137 + gcc -dumpspecs | sed -e 's@/tools@@g' \ 1.138 + -e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \ 1.139 + -e '/\*cpp:/{n;s@$@ -isystem /usr/include@}' > \ 1.140 + `dirname $(gcc --print-libgcc-file-name)`/specs 1.141 +} 1.142 + 1.143 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.144 +genpkg_rules() 1.145 +{ 1.146 + LOCALE="" 1.147 + mkdir -p $fs/var 1.148 + 1.149 + # Remove build directory. 1.150 + rm -rf $WOK/$PACKAGE/source/$PACKAGE-build 1.151 + rm -rf $WOK/$PACKAGE/$PACKAGE-build 1.152 +}