wok view glibc/receipt @ rev 24432
updated libnetfilter_conntrack and libnetfilter_conntrack-dev (1.0.7 -> 1.0.8)
author | Hans-G?nter Theisgen |
---|---|
date | Sat Feb 12 17:34:21 2022 +0100 (2022-02-12) |
parents | 2a47d3b3f4de |
children | d79ed38ace18 |
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 current_version()
20 {
21 wget -O - $(dirname $WGET_URL) 2>/dev/null | \
22 sed '/href="glibc-[0-9]/!d;/tar/!d;s|.*>glibc-||;s|.tar.*||' | \
23 sort -Vr | sed q
24 }
26 # Rules to compile & install the temporary toolchain.
27 cook_tmp_toolchain()
28 {
29 cd $src
31 # Glibc Bug Fixes Patch from LFS
32 patch -Np1 -i $stuff/glibc-2.14.1-fixes-1.patch
33 # Glibc Bug Sort Relocatable Objects Patch
34 patch -Np1 -i $stuff/glibc-2.14.1-sort-1.patch
35 # Fix a bug that prevents Glibc from building with GCC-4.6.2
36 patch -Np1 -i $stuff/glibc-2.14.1-gcc_fix-1.patch
37 # GHOST
38 patch -Np1 -i $stuff/glibc-2.14.1-CVE-2015-0235.patch
40 # Build in a separate directory.
41 mkdir ../glibc-build && cd ../glibc-build
43 # glibc no longer support i386, so use -march=i486 for better compatibility.
44 # If i686 ???
45 unset CFLAGS CXXFLAGS
46 case $ARCH in
47 i386|i486)
48 echo "CFLAGS += -O2 -march=i486 -mtune=i486" > configparms ;;
49 *)
50 echo "CFLAGS += -O2 -march=$ARCH -mtune=$ARCH" > configparms ;;
51 esac
53 { $src/configure \
54 --host=$HOST_SYSTEM \
55 --build=$($src/scripts/config.guess) \
56 --disable-profile --enable-add-ons \
57 --enable-kernel=2.6.30 --with-headers=/tools/include \
58 libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes &&
59 make -j1 &&
60 make -j1 install
61 } || return 1
63 # Link compiler to this new glibc.
64 SPECS=`dirname $($HOST_SYSTEM-gcc -print-libgcc-file-name)`/specs
65 $HOST_SYSTEM-gcc -dumpspecs | sed \
66 -e 's@/lib\(64\)\?/ld@/tools&@g' \
67 -e "/^\*cpp:$/{n;s,$, -isystem /tools/include,}" > $SPECS
68 unset SPECS
69 }
71 # Rules to configure and make the package.
72 compile_rules()
73 {
74 # SliTaz is a Busybox based OS, why we so small and fast. Using gawk by
75 # default to build package will not ensure package work with Busybox awk
76 # and so should NOT be use to cook.
77 if [ -x /usr/bin/cook ]; then
78 [ -d "/var/lib/tazpkg/installed/gawk" ] || tazpkg get-install gawk
79 fi
81 # Make 4.x support...
82 sed -i 's/3\.79/4.* | &/' configure*
83 # Fixes and patches from LFS, Redhat
84 sed -i -e 's/"db1"/& \&\& $name ne "nss_test1"/' scripts/test-installation.pl
85 sed -i 's|@BASH@|/bin/bash|' elf/ldd.bash.in
87 # Glibc misc Bug Fixes
88 patch -Np1 -i $stuff/glibc-2.14.1-fixes-1.patch
90 # Glibc Bug Sort Relocatable Objects Patch
91 #patch -Np1 -i $stuff/glibc-2.14.1-sort-1.patch
93 # Fix a bug that prevents Glibc from building with GCC-4.6.2
94 patch -Np1 -i $stuff/glibc-2.14.1-gcc_fix-1.patch
96 # Revert commit causing issues with crappy DNS servers
97 patch -Np1 -i $stuff/glibc-2.14-revert-4768ae77.patch
99 # re-export RPC interface until libtirpc is ready as a replacement
100 # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=acee4873 (only fedora branch...)
101 patch -Np1 -i $stuff/glibc-2.14-reexport-rpc-interface.patch
102 # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=bdd816a3 (only fedora branch...)
103 patch -Np1 -i $stuff/glibc-2.14-reinstall-nis-rpc-headers.patch
104 # GHOST
105 patch -Np1 -i $stuff/glibc-2.14.1-CVE-2015-0235.patch
107 # Update for binutils 2.29, see https://sourceware.org/bugzilla/show_bug.cgi?id=21661
108 sed -i 's|obstack_compat;|obstack_compat __attribute__ ((nocommon));|' malloc/obstack.c
110 # Fix a stack imbalance that occurs under some conditions:
111 sed -i '195,213 s/PRIVATE_FUTEX/FUTEX_CLOCK_REALTIME/' \
112 nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S \
113 nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
115 # Glibc needs ld.so.conf in the install destdir.
116 mkdir -p $WOK/$PACKAGE/install/etc
117 touch $WOK/$PACKAGE/install/etc/ld.so.conf
118 mkdir ../glibc-build && cd ../glibc-build
120 # Read the INSTALL file in glibc. Also Glibc dont build with -Os flag.
121 # --enale-kernel use latest SliTaz Kernel version. From Glibc INSTALL:
122 # "The higher the VERSION number is, the less compatibility code is
123 # added, and the faster the code gets."
124 unset CFLAGS CXXFLAGS
125 case "$ARCH" in
126 i386|i486)
127 echo "CFLAGS += -O2 -march=i486 -mtune=i486" > configparms ;;
128 *)
129 echo "CFLAGS += -O2 -march=$ARCH -mtune=$ARCH" > configparms ;;
130 esac
131 { $src/configure \
132 --disable-profile \
133 --enable-add-ons \
134 --enable-kernel=2.6.30 \
135 --libexecdir=/usr/lib/glibc \
136 --build=$HOST_SYSTEM \
137 --host=$HOST_SYSTEM \
138 --target=$BUILD_SYSTEM &&
139 make -j1 && make install_root=$DESTDIR install
140 } || return 1
141 for i in $DESTDIR/usr/share/i18n/charmaps/*.gz ; do
142 advdef -z4 $i
143 done
145 # If temporary toolchain was previously used, switch to regular toolchain.
146 [ -d /tools ] || return
147 mv /tools/bin/ld /tools/bin/ld-old
148 mv /tools/$(gcc -dumpmachine)/bin/ld /tools/$(gcc -dumpmachine)/bin/ld-old
149 mv /tools/bin/ld-new /tools/bin/ld
150 ln -s /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld
151 gcc -dumpspecs | sed -e 's@/tools@@g' \
152 -e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \
153 -e '/\*cpp:/{n;s@$@ -isystem /usr/include@}' > \
154 `dirname $(gcc --print-libgcc-file-name)`/specs
155 }
157 # Rules to gen a SliTaz package suitable for Tazpkg.
158 genpkg_rules()
159 {
160 LOCALE=""
161 mkdir -p $fs/var
163 # Remove build directory.
164 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
165 rm -rf $WOK/$PACKAGE/$PACKAGE-build
167 # check install
168 ls $install/lib/
169 }