wok view glibc/receipt @ rev 22891
updated gtest (1.7.0 -> 1.10.0)
author | Hans-G?nter Theisgen |
---|---|
date | Sun Feb 23 08:12:43 2020 +0100 (2020-02-23) |
parents | faaf4f7a0acc |
children | d411d873dbdf |
line source
1 # SliTaz package receipt.
3 PACKAGE="glibc"
4 VERSION="2.14.1"
5 CATEGORY="meta"
6 SHORT_DESC="The GNU C libraries. This package is used to compile the libc."
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="GPL2"
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="http://www.gnu.org/software/libc/"
11 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
13 DEPENDS="glibc-base glibc-locale glibc-dev"
14 BUILD_DEPENDS="linux-api-headers autoconf bash advancecomp"
16 # Genpkg order for tazwok.
17 COOK_OPT="genpkg=glibc-base:glib-locale:glibc-dev"
19 # Rules to compile & install the temporary toolchain.
20 cook_tmp_toolchain()
21 {
22 cd $src
24 # Glibc Bug Fixes Patch from LFS
25 patch -Np1 -i $stuff/glibc-2.14.1-fixes-1.patch
26 # Glibc Bug Sort Relocatable Objects Patch
27 patch -Np1 -i $stuff/glibc-2.14.1-sort-1.patch
28 # Fix a bug that prevents Glibc from building with GCC-4.6.2
29 patch -Np1 -i $stuff/glibc-2.14.1-gcc_fix-1.patch
30 # GHOST
31 patch -Np1 -i $stuff/glibc-2.14.1-CVE-2015-0235.patch
33 # Build in a separate directory.
34 mkdir ../glibc-build && cd ../glibc-build
36 # glibc no longer support i386, so use -march=i486 for better compatibility.
37 # If i686 ???
38 unset CFLAGS CXXFLAGS
39 case $ARCH in
40 i386|i486)
41 echo "CFLAGS += -O2 -march=i486 -mtune=i486" > configparms ;;
42 *)
43 echo "CFLAGS += -O2 -march=$ARCH -mtune=$ARCH" > configparms ;;
44 esac
46 { $src/configure \
47 --host=$HOST_SYSTEM \
48 --build=$($src/scripts/config.guess) \
49 --disable-profile --enable-add-ons \
50 --enable-kernel=2.6.30 --with-headers=/tools/include \
51 libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes &&
52 make -j1 &&
53 make install
54 } || return 1
56 # Link compiler to this new glibc.
57 SPECS=`dirname $($HOST_SYSTEM-gcc -print-libgcc-file-name)`/specs
58 $HOST_SYSTEM-gcc -dumpspecs | sed \
59 -e 's@/lib\(64\)\?/ld@/tools&@g' \
60 -e "/^\*cpp:$/{n;s,$, -isystem /tools/include,}" > $SPECS
61 unset SPECS
62 }
64 # Rules to configure and make the package.
65 compile_rules()
66 {
67 # SliTaz is a Busybox based OS, why we so small and fast. Using gawk by
68 # default to build package will not ensure package work with Busybox awk
69 # and so should NOT be use to cook.
70 if [ -x /usr/bin/cook ]; then
71 [ -d "/var/lib/tazpkg/installed/gawk" ] || tazpkg get-install gawk
72 fi
74 # Make 4.x support...
75 sed -i 's/3\.79/4.* | &/' configure*
76 # Fixes and patches from LFS, Redhat
77 sed -i -e 's/"db1"/& \&\& $name ne "nss_test1"/' scripts/test-installation.pl
78 sed -i 's|@BASH@|/bin/bash|' elf/ldd.bash.in
80 # Glibc misc Bug Fixes
81 patch -Np1 -i $stuff/glibc-2.14.1-fixes-1.patch
83 # Glibc Bug Sort Relocatable Objects Patch
84 #patch -Np1 -i $stuff/glibc-2.14.1-sort-1.patch
86 # Fix a bug that prevents Glibc from building with GCC-4.6.2
87 patch -Np1 -i $stuff/glibc-2.14.1-gcc_fix-1.patch
89 # Revert commit causing issues with crappy DNS servers
90 patch -Np1 -i $stuff/glibc-2.14-revert-4768ae77.patch
92 # re-export RPC interface until libtirpc is ready as a replacement
93 # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=acee4873 (only fedora branch...)
94 patch -Np1 -i $stuff/glibc-2.14-reexport-rpc-interface.patch
95 # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=bdd816a3 (only fedora branch...)
96 patch -Np1 -i $stuff/glibc-2.14-reinstall-nis-rpc-headers.patch
97 # GHOST
98 patch -Np1 -i $stuff/glibc-2.14.1-CVE-2015-0235.patch
100 # Fix a stack imbalance that occurs under some conditions:
101 sed -i '195,213 s/PRIVATE_FUTEX/FUTEX_CLOCK_REALTIME/' \
102 nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S \
103 nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
105 # Glibc needs ld.so.conf in the install destdir.
106 mkdir -p $WOK/$PACKAGE/install/etc
107 touch $WOK/$PACKAGE/install/etc/ld.so.conf
108 mkdir ../glibc-build && cd ../glibc-build
110 # Read the INSTALL file in glibc. Also Glibc dont build with -Os flag.
111 # --enale-kernel use latest SliTaz Kernel version. From Glibc INSTALL:
112 # "The higher the VERSION number is, the less compatibility code is
113 # added, and the faster the code gets."
114 unset CFLAGS CXXFLAGS
115 case "$ARCH" in
116 i386|i486)
117 echo "CFLAGS += -O2 -march=i486 -mtune=i486" > configparms ;;
118 *)
119 echo "CFLAGS += -O2 -march=$ARCH -mtune=$ARCH" > configparms ;;
120 esac
121 { $src/configure \
122 --disable-profile \
123 --enable-add-ons \
124 --enable-kernel=2.6.30 \
125 --libexecdir=/usr/lib/glibc \
126 --build=$HOST_SYSTEM \
127 --host=$HOST_SYSTEM \
128 --target=$BUILD_SYSTEM &&
129 make -j1 && make install_root=$DESTDIR install
130 } || return 1
131 for i in $DESTDIR/usr/share/i18n/charmaps/*.gz ; do
132 advdef -z4 $i
133 done
135 # If temporary toolchain was previously used, switch to regular toolchain.
136 [ -d /tools ] || return
137 mv /tools/bin/ld /tools/bin/ld-old
138 mv /tools/$(gcc -dumpmachine)/bin/ld /tools/$(gcc -dumpmachine)/bin/ld-old
139 mv /tools/bin/ld-new /tools/bin/ld
140 ln -s /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld
141 gcc -dumpspecs | sed -e 's@/tools@@g' \
142 -e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \
143 -e '/\*cpp:/{n;s@$@ -isystem /usr/include@}' > \
144 `dirname $(gcc --print-libgcc-file-name)`/specs
145 }
147 # Rules to gen a SliTaz package suitable for Tazpkg.
148 genpkg_rules()
149 {
150 LOCALE=""
151 mkdir -p $fs/var
153 # Remove build directory.
154 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
155 rm -rf $WOK/$PACKAGE/$PACKAGE-build
157 # check install
158 ls $install/lib/
159 }