wok-next view glibc/receipt @ rev 21286
updated gnuradio (3.7.8 -> 3.8.0.0)
author | Hans-G?nter Theisgen |
---|---|
date | Sun Dec 08 11:42:09 2019 +0100 (2019-12-08) |
parents | d5aab818505e |
children |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="glibc"
4 VERSION="2.28"
5 CATEGORY="meta"
6 SHORT_DESC="The GNU C libraries"
7 MAINTAINER="devel@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="http://www.gnu.org/software/libc/"
10 LFS="http://www.linuxfromscratch.org/lfs/view/stable/chapter06/glibc.html"
12 TARBALL="$PACKAGE-$VERSION.tar.gz"
13 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
15 BUILD_DEPENDS="linux-api-headers autoconf bash gawk gettext-dev bison texinfo"
16 # slitaz-i18n should present in wok
17 SPLIT="$PACKAGE-base $PACKAGE-locale nscd $PACKAGE-dev"
19 # Locales include to glibc-base package by default, other locales are in: locale-** and glibc-locale
20 DEFAULT_LOCALE="en_US en_GB"
22 # Compile & install the temporary toolchain.
23 cook_tmp_toolchain() {
24 unset CFLAGS CXXFLAGS
25 case $ARCH in
26 i386) Arch='i486';;
27 x86_64) Arch='nocona';;
28 *) Arch="$ARCH";;
29 esac
30 echo "CFLAGS += -O2 -march=$Arch -mtune=$Arch" > configparms
32 # Build in a separate directory.
33 mkdir build
34 cd build
36 ../configure \
37 --host=$HOST_SYSTEM \
38 --build=$($src/scripts/config.guess) \
39 --disable-profile \
40 --enable-add-ons \
41 --enable-kernel=3.2 \
42 --with-headers=/tools/include \
43 libc_cv_forced_unwind=yes \
44 libc_cv_c_cleanup=yes &&
45 make -j1 &&
46 make install || 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 \
51 | sed \
52 -e 's@/lib\(64\)\?/ld@/tools&@g' \
53 -e "/^\*cpp:$/{n;s,$, -isystem /tools/include,}" > $SPECS
54 unset SPECS
55 }
57 compile_rules() {
58 # Glibc needs ld.so.conf in the install destdir.
59 mkdir -p $install/etc
60 touch $install/etc/ld.so.conf
62 # Read the INSTALL file in glibc. Also Glibc don't build with -Os flag.
63 unset CFLAGS CXXFLAGS
64 case $ARCH in
65 i?86) Arch='i486'; ARCH_ARGS='-m32';;
66 x86_64) Arch='nocona'; ARCH_ARGS='-m64';;
67 *) Arch="$ARCH"; ARCH_ARGS='';;
68 esac
69 echo "CFLAGS += -O2 -march=$Arch -mtune=$Arch" > configparms
71 # Remove a file that may be left over from a previous build attempt
72 rm -f /usr/include/limits.h 2>/dev/null
74 mkdir build
75 cd build
76 # --enale-kernel: please respect Kernel version of the build host,
77 # put the exact or lower numbers. From Glibc INSTALL:
78 # > The higher the VERSION number is, the less compatibility code is
79 # > added, and the faster the code gets.
80 CC="gcc $ARCH_ARGS -isystem /usr/lib/gcc/$BUILD_SYSTEM/$(. $WOK/gcc/receipt; echo $VERSION)/include \
81 -isystem /usr/include" \
82 ../configure \
83 --disable-werror \
84 --enable-kernel=3.2 \
85 --enable-stack-protector=strong \
86 libc_cv_slibdir=/lib \
87 $CONFIGURE_ARGS &&
88 make -j1 &&
89 touch $install/etc/ld.so.conf &&
90 sed '/test-installation/s@$(PERL)@echo not running@' -i ../Makefile &&
91 make install_root=$install install || return 1
93 # nscd
94 install -Dm644 ../nscd/nscd.conf $install/etc/nscd.conf
95 mkdir -p $install/var/cache/nscd $install/var/db
96 install -Dm755 $stuff/nscd $install/etc/init.d/nscd
98 # nsswitch.conf
99 install -Dm644 $stuff/nsswitch.conf $install/etc/nsswitch.conf
101 # ld.so.conf
102 install -Dm644 $stuff/ld.so.conf $install/etc/ld.so.conf
104 # If temporary toolchain was previously used, switch to regular toolchain.
105 if [ -d /tools ]; then
106 mv /tools/bin/ld /tools/bin/ld-old
107 mv /tools/$(gcc -dumpmachine)/bin/ld /tools/$(gcc -dumpmachine)/bin/ld-old
108 mv /tools/bin/ld-new /tools/bin/ld
109 ln -s /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld
110 gcc -dumpspecs \
111 | sed -e 's@/tools@@g' \
112 -e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \
113 -e '/\*cpp:/{n;s@$@ -isystem /usr/include@}' > \
114 $(dirname $(gcc --print-libgcc-file-name))/specs
115 fi
117 # Create symlinks to the dynamic loader for LSB compliance.
118 case $ARCH in
119 i?86)
120 ln -sf ld-linux.so.2 $install/lib/ld-lsb.so.3
121 ;;
122 x86_64)
123 mkdir -p $install/lib64
124 ln -sf ../lib/ld-$VERSION.so $install/lib64/ld-linux-x86-64.so.2
125 ln -sf ../lib/ld-$VERSION.so $install/lib64/ld-lsb-x86-64.so.3
126 ;;
127 esac
129 # Place the debugging symbols for selected libraries in separate files.
130 # This debugging information is needed if running regression tests that use valgrind or gdb.
131 # http://www.linuxfromscratch.org/lfs/view/development/chapter06/strippingagain.html
133 cd $install/lib/
134 for i in ld-$VERSION.so libc-$VERSION.so libpthread-$VERSION.so libthread_db-1.0.so; do
135 objcopy --only-keep-debug $i $i.dbg
136 strip --strip-unneeded $i
137 objcopy --add-gnu-debuglink=$i.dbg $i
138 done
139 }
141 genpkg_rules() {
142 case $PACKAGE in
143 glibc)
144 LOCALE=""
145 CAT="meta|meta-package"
146 DEPENDS="glibc-base glibc-locale glibc-dev"
147 TAGS="LFS"
148 ;;
149 glibc-base)
150 copy \
151 ld-*.so* ld.so* \
152 libanl-*.so* libanl.so* \
153 libc-*.so* libc.so* \
154 libcrypt-*.so* libcrypt.so* \
155 libdl-*.so* libdl.so* \
156 libm-*.so* libm.so* \
157 libnsl-*.so* libnsl.so* \
158 libnss_compat-*.so* libnss_compat.so* \
159 libnss_dns-*.so* libnss_dns.so* \
160 libnss_files-*.so* libnss_files.so* \
161 libpthread-*.so* libpthread.so* \
162 libresolv-*.so* libresolv.so* \
163 librt-*.so* librt.so* \
164 libthread_db-*.so* libthread_db.so* \
165 libutil-*.so* libutil.so* \
166 \
167 UNICODE.so gconv-modules ANSI_X3.110.so ISO8859-1.so \
168 ISO8859-15.so UTF-16.so CP1252.so IBM437.so IBM850.so \
169 \
170 i18n iso14651_t1 iso14651_t1_common \
171 translit_neutral translit_combining translit_circle \
172 translit_cjk_compat translit_compat translit_font \
173 translit_fraction translit_narrow translit_small \
174 translit_wide \
175 \
176 locale localedef locale.alias UTF-8.gz UTC rpc \
177 nsswitch.conf \
178 $DEFAULT_LOCALE
180 find $fs -type f -name '*.so.dbg' -delete
182 CAT="base-system|minimal libraries and UTF-8 support for SliTaz"
183 DEPENDS=" "
184 ;;
185 glibc-locale)
186 copy gconv/ locale/ i18n/ iconv tzselect @rm # Remove glibc-base files
188 # Remove files provided by locale-pack.
189 . $WOK/slitaz-i18n/stuff/locale-pack.conf
190 echo -n "Removing locale: "
191 for i in $LOCALE_PACK; do
192 echo -n "$i "
193 rm -rf $fs/usr/share/locale/$i
194 done
195 status
196 CAT="system-tools|misc. locale files and utilities"
197 DEPENDS="glibc-base"
198 ;;
199 nscd)
200 copy /var/db/ /var/cache/nscd/ nscd getent nscd.conf
201 CAT="base-system|name-server caching daemon"
202 DEPENDS=" "
203 ;;
204 glibc-dev)
205 copy @std @dev @rm
206 DEPENDS="glibc-base"
207 ;;
208 esac
209 }