wok view glibc/receipt @ rev 17311

Add genext2fs
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Nov 02 13:51:07 2014 +0100 (2014-11-02)
parents 590cd40daccf
children 6f704cecf2c4
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"
16 # Genpkg order for tazwok.
17 COOK_OPT="genpkg=glibc-base:glibc-extra-samba: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
31 # Build in a separate directory.
32 mkdir ../glibc-build && cd ../glibc-build
34 # glibc no longer support i386, so use -march=i486 for better compatibility.
35 # If i686 ???
36 unset CFLAGS CXXFLAGS
37 case $ARCH in
38 i386|i486)
39 echo "CFLAGS += -O2 -march=i486 -mtune=i486" > configparms ;;
40 *)
41 echo "CFLAGS += -O2 -march=$ARCH -mtune=$ARCH" > configparms ;;
42 esac
44 { $src/configure \
45 --host=$HOST_SYSTEM \
46 --build=$($src/scripts/config.guess) \
47 --disable-profile --enable-add-ons \
48 --enable-kernel=2.6.30 --with-headers=/tools/include \
49 libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes &&
50 make &&
51 make install
52 } || return 1
54 # Link compiler to this new glibc.
55 SPECS=`dirname $($HOST_SYSTEM-gcc -print-libgcc-file-name)`/specs
56 $HOST_SYSTEM-gcc -dumpspecs | sed \
57 -e 's@/lib\(64\)\?/ld@/tools&@g' \
58 -e "/^\*cpp:$/{n;s,$, -isystem /tools/include,}" > $SPECS
59 unset SPECS
60 }
62 # Rules to configure and make the package.
63 compile_rules()
64 {
65 cd $src
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 # Fixes and patches from LFS, Redhat
75 sed -i -e 's/"db1"/& \&\& $name ne "nss_test1"/' scripts/test-installation.pl
76 sed -i 's|@BASH@|/bin/bash|' elf/ldd.bash.in
78 # Glibc misc Bug Fixes
79 patch -Np1 -i $stuff/glibc-2.14.1-fixes-1.patch
81 # Glibc Bug Sort Relocatable Objects Patch
82 #patch -Np1 -i $stuff/glibc-2.14.1-sort-1.patch
84 # Fix a bug that prevents Glibc from building with GCC-4.6.2
85 patch -Np1 -i $stuff/glibc-2.14.1-gcc_fix-1.patch
87 # Revert commit causing issues with crappy DNS servers
88 patch -Np1 -i $stuff/glibc-2.14-revert-4768ae77.patch
90 # re-export RPC interface until libtirpc is ready as a replacement
91 # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=acee4873 (only fedora branch...)
92 patch -Np1 -i $stuff/glibc-2.14-reexport-rpc-interface.patch
93 # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=bdd816a3 (only fedora branch...)
94 patch -Np1 -i $stuff/glibc-2.14-reinstall-nis-rpc-headers.patch
96 # Fix a stack imbalance that occurs under some conditions:
97 sed -i '195,213 s/PRIVATE_FUTEX/FUTEX_CLOCK_REALTIME/' \
98 nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S \
99 nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
101 # Glibc needs ld.so.conf in the install destdir.
102 mkdir -p $WOK/$PACKAGE/install/etc
103 touch $WOK/$PACKAGE/install/etc/ld.so.conf
104 mkdir ../glibc-build && cd ../glibc-build
106 # Read the INSTALL file in glibc. Also Glibc dont build with -Os flag.
107 # --enale-kernel use latest SliTaz Kernel version. From Glibc INSTALL:
108 # "The higher the VERSION number is, the less compatibility code is
109 # added, and the faster the code gets."
110 unset CFLAGS CXXFLAGS
111 case "$ARCH" in
112 i386|i486)
113 echo "CFLAGS += -O2 -march=i486 -mtune=i486" > configparms ;;
114 *)
115 echo "CFLAGS += -O2 -march=$ARCH -mtune=$ARCH" > configparms ;;
116 esac
117 { $src/configure \
118 --disable-profile \
119 --enable-add-ons \
120 --enable-kernel=2.6.30 \
121 --libexecdir=/usr/lib/glibc \
122 --build=$HOST_SYSTEM \
123 --host=$HOST_SYSTEM \
124 --target=$BUILD_SYSTEM &&
125 make && make install_root=$DESTDIR install
126 } || return 1
128 # If temporary toolchain was previously used, switch to regular toolchain.
129 [ -d /tools ] || return
130 mv /tools/bin/ld /tools/bin/ld-old
131 mv /tools/$(gcc -dumpmachine)/bin/ld /tools/$(gcc -dumpmachine)/bin/ld-old
132 mv /tools/bin/ld-new /tools/bin/ld
133 ln -s /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld
134 gcc -dumpspecs | sed -e 's@/tools@@g' \
135 -e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \
136 -e '/\*cpp:/{n;s@$@ -isystem /usr/include@}' > \
137 `dirname $(gcc --print-libgcc-file-name)`/specs
138 }
140 # Rules to gen a SliTaz package suitable for Tazpkg.
141 genpkg_rules()
142 {
143 LOCALE=""
144 mkdir -p $fs/var
146 # Remove build directory.
147 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
148 rm -rf $WOK/$PACKAGE/$PACKAGE-build
149 }