wok-next view glibc/receipt @ rev 19715

Fix building: pciutils, pcmanfm-legacy, arj
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat May 13 17:25:31 2017 +0300 (2017-05-13)
parents 12dc3b9e499d
children 7387df590f12
line source
1 # SliTaz package receipt.
3 PACKAGE="glibc"
4 VERSION="2.24"
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 WEB_SITE="http://www.gnu.org/software/libc/"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
14 DEPENDS="glibc-base glibc-locale glibc-dev"
15 BUILD_DEPENDS="linux-api-headers autoconf bash advancecomp gawk gettext bison \
16 texinfo"
17 SPLIT="glibc-base glibc-locale glibc-dev"
19 # Rules to compile & install the temporary toolchain.
20 cook_tmp_toolchain()
21 {
22 unset CFLAGS CXXFLAGS
23 case $ARCH in
24 i386|i486)
25 echo "CFLAGS += -O2 -march=i486 -mtune=i486" > configparms ;;
26 *)
27 echo "CFLAGS += -O2 -march=$ARCH -mtune=$ARCH" > configparms ;;
28 esac
30 {
31 # Build in a separate directory.
32 mkdir glibc-build
33 cd glibc-build
35 ../configure \
36 --host=$HOST_SYSTEM \
37 --build=$($src/scripts/config.guess) \
38 --disable-profile \
39 --enable-add-ons \
40 --enable-kernel=2.6.32 \
41 --with-headers=/tools/include \
42 libc_cv_forced_unwind=yes \
43 libc_cv_c_cleanup=yes &&
44 make -j1 &&
45 make install
46 } || return 1
48 # Link compiler to this new glibc.
49 SPECS=$(dirname $($HOST_SYSTEM-gcc -print-libgcc-file-name))/specs
50 $HOST_SYSTEM-gcc -dumpspecs | sed \
51 -e 's@/lib\(64\)\?/ld@/tools&@g' \
52 -e "/^\*cpp:$/{n;s,$, -isystem /tools/include,}" > $SPECS
53 unset SPECS
54 }
56 # Rules to configure and make the package.
57 compile_rules()
58 {
59 # Glibc needs ld.so.conf in the install destdir.
60 mkdir -p $WOK/$PACKAGE/install/etc
61 touch $WOK/$PACKAGE/install/etc/ld.so.conf
63 # Read the INSTALL file in glibc. Also Glibc dont build with -Os flag.
64 # --enale-kernel use latest SliTaz Kernel version. From Glibc INSTALL:
65 # "The higher the VERSION number is, the less compatibility code is
66 # added, and the faster the code gets."
67 unset CFLAGS CXXFLAGS
68 case "$ARCH" in
69 i386|i486)
70 echo "CFLAGS += -O2 -march=i486 -mtune=i486" > configparms ;;
71 *)
72 echo "CFLAGS += -O2 -march=$ARCH -mtune=$ARCH" > configparms ;;
73 esac
75 # Glibc FHS Patch - LFS 7.10
76 patch -p1 -i $stuff/glibc-2.24-fhs-1.patch
77 # Remove restricted '\v' from po files
78 patch -p1 -i $stuff/glibc-po.patch
80 {
81 mkdir build
82 cd build
83 $src/configure \
84 --disable-profile \
85 --enable-add-ons \
86 --enable-obsolete-rpc \
87 --enable-kernel=2.6.32 \
88 --libexecdir=/usr/lib/glibc \
89 --build=$HOST_SYSTEM \
90 --host=$HOST_SYSTEM \
91 --target=$BUILD_SYSTEM &&
92 make -j1 && make install_root=$DESTDIR install
93 } || return 1
95 if [ -n "$(which advdef)" ]; then
96 action 'Recompress charmaps...'
97 local size0=$(ls -l $install/usr/share/i18n/charmaps/*.gz | awk '{s+=$5}END{print s}')
98 local time0=$(date +%s)
99 for i in $install/usr/share/i18n/charmaps/*.gz; do
100 advdef -z4q $i
101 done
102 local size1=$(ls -l $install/usr/share/i18n/charmaps/*.gz | awk '{s+=$5}END{print s}')
103 local time1=$(date +%s)
104 status
105 comp_summary "$time0" "$time1" "$size0" "$size1"
106 fi
108 # If temporary toolchain was previously used, switch to regular toolchain.
109 if [ -d /tools ]; then
110 mv /tools/bin/ld /tools/bin/ld-old
111 mv /tools/$(gcc -dumpmachine)/bin/ld /tools/$(gcc -dumpmachine)/bin/ld-old
112 mv /tools/bin/ld-new /tools/bin/ld
113 ln -s /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld
114 gcc -dumpspecs | sed -e 's@/tools@@g' \
115 -e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \
116 -e '/\*cpp:/{n;s@$@ -isystem /usr/include@}' > \
117 $(dirname $(gcc --print-libgcc-file-name))/specs
118 fi
119 }
121 # Rules to gen a SliTaz package suitable for Tazpkg.
122 genpkg_rules()
123 {
124 LOCALE=""
125 mkdir -p $fs/var
127 # check install
128 ls $install/lib/ | tr '\n' ' ' | fold -s
129 echo
130 }