wok-next annotate glibc/receipt @ rev 19760

Typo: glibc, ncurses; up jsmin, kmod, svkbd.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat Jun 10 08:37:51 2017 +0300 (2017-06-10)
parents 0ff6bd677938
children b938e6730252
rev   line source
al@19743 1 # SliTaz package receipt v2.
pankso@9 2
pankso@9 3 PACKAGE="glibc"
al@19743 4 VERSION="2.25"
pankso@3475 5 CATEGORY="meta"
al@19743 6 SHORT_DESC="The GNU C libraries"
pankso@9 7 MAINTAINER="pankso@slitaz.org"
pascal@15000 8 LICENSE="GPL2"
al@19561 9 WEB_SITE="http://www.gnu.org/software/libc/"
al@19561 10
pankso@9 11 TARBALL="$PACKAGE-$VERSION.tar.gz"
pankso@9 12 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
pankso@9713 13
pankso@9713 14 DEPENDS="glibc-base glibc-locale glibc-dev"
al@19743 15 BUILD_DEPENDS="linux-api-headers autoconf bash gawk gettext bison \
al@19577 16 texinfo"
al@19743 17 # slitaz-i18n should present in wok
al@19743 18 SPLIT="glibc-base glibc-locale nscd glibc-dev"
al@19743 19
al@19743 20 # Locales include to glibc-base package by default, other locales are in: locale-** and glibc-locale
al@19743 21 DEFAULT_LOCALE="en_US en_GB"
al@19743 22
al@19743 23 # Handle multiarch compilation.
al@19743 24 case "$ARCH" in
al@19743 25 arm*|x86_64) VERSION="2.13";;
al@19743 26 esac
al@19743 27
al@19743 28 # Handle multiarch installation.
al@19743 29 case "$SLITAZ_ARCH" in
al@19743 30 arm*|x86_64) VERSION="2.13";;
al@19743 31 esac
al@19743 32
al@18922 33
gokhlayeh@8189 34 # Rules to compile & install the temporary toolchain.
gokhlayeh@8189 35 cook_tmp_toolchain()
gokhlayeh@8189 36 {
slaxemulator@10420 37 unset CFLAGS CXXFLAGS
pascal@19744 38 echo "CFLAGS += -O2 -march=${ARCH/i386/i486} -mtune=${ARCH/i386/i486}" > configparms
gokhlayeh@8189 39
al@19561 40 {
al@19561 41 # Build in a separate directory.
al@19561 42 mkdir glibc-build
al@19561 43 cd glibc-build
al@19561 44
al@19561 45 ../configure \
al@19561 46 --host=$HOST_SYSTEM \
al@19561 47 --build=$($src/scripts/config.guess) \
al@19561 48 --disable-profile \
al@19561 49 --enable-add-ons \
al@19561 50 --enable-kernel=2.6.32 \
al@19561 51 --with-headers=/tools/include \
al@19561 52 libc_cv_forced_unwind=yes \
al@19561 53 libc_cv_c_cleanup=yes &&
al@19561 54 make -j1 &&
al@19561 55 make install
gokhlayeh@8189 56 } || return 1
gokhlayeh@8189 57
gokhlayeh@8189 58 # Link compiler to this new glibc.
al@19577 59 SPECS=$(dirname $($HOST_SYSTEM-gcc -print-libgcc-file-name))/specs
slaxemulator@10420 60 $HOST_SYSTEM-gcc -dumpspecs | sed \
gokhlayeh@8189 61 -e 's@/lib\(64\)\?/ld@/tools&@g' \
al@19577 62 -e "/^\*cpp:$/{n;s,$, -isystem /tools/include,}" > $SPECS
gokhlayeh@8189 63 unset SPECS
gokhlayeh@8189 64 }
pankso@9 65
pankso@9 66 # Rules to configure and make the package.
pankso@9 67 compile_rules()
pankso@9 68 {
pankso@10031 69 # Glibc needs ld.so.conf in the install destdir.
al@19743 70 mkdir -p $install/etc
al@19743 71 touch $install/etc/ld.so.conf
al@19561 72
al@19743 73 # Read the INSTALL file in glibc. Also Glibc don't build with -Os flag.
pankso@10031 74 # --enale-kernel use latest SliTaz Kernel version. From Glibc INSTALL:
pankso@10031 75 # "The higher the VERSION number is, the less compatibility code is
pankso@10031 76 # added, and the faster the code gets."
pankso@10031 77 unset CFLAGS CXXFLAGS
pascal@19744 78 echo "CFLAGS += -O2 -march=${ARCH/i386/i486} -mtune=${ARCH/i386/i486}" > configparms
al@19561 79
al@19561 80 {
al@19561 81 mkdir build
al@19561 82 cd build
al@19561 83 $src/configure \
al@19561 84 --disable-profile \
al@19561 85 --enable-add-ons \
al@19581 86 --enable-obsolete-rpc \
al@19561 87 --enable-kernel=2.6.32 \
al@19561 88 --libexecdir=/usr/lib/glibc \
al@19561 89 --build=$HOST_SYSTEM \
al@19561 90 --host=$HOST_SYSTEM \
al@19561 91 --target=$BUILD_SYSTEM &&
al@19561 92 make -j1 && make install_root=$DESTDIR install
gokhlayeh@8189 93 } || return 1
al@19561 94
al@19743 95 # nscd
al@19743 96 mkdir -p $install/etc/init.d $install/var/db
al@19743 97 cp $stuff/nscd $install/etc/init.d
al@19756 98 chmod +x $install/etc/init.d/nscd
al@19743 99
al@19743 100 # nsswitch.conf
al@19743 101 cp $stuff/nsswitch.conf $install/etc
gokhlayeh@8189 102
pankso@10031 103 # If temporary toolchain was previously used, switch to regular toolchain.
al@19578 104 if [ -d /tools ]; then
al@19577 105 mv /tools/bin/ld /tools/bin/ld-old
al@19577 106 mv /tools/$(gcc -dumpmachine)/bin/ld /tools/$(gcc -dumpmachine)/bin/ld-old
al@19577 107 mv /tools/bin/ld-new /tools/bin/ld
al@19577 108 ln -s /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld
al@19577 109 gcc -dumpspecs | sed -e 's@/tools@@g' \
al@19577 110 -e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \
al@19577 111 -e '/\*cpp:/{n;s@$@ -isystem /usr/include@}' > \
al@19577 112 $(dirname $(gcc --print-libgcc-file-name))/specs
al@19577 113 fi
pankso@9 114 }
pankso@9 115
al@19743 116 # i18n
al@19743 117 get_locales()
al@19743 118 {
al@19743 119 local path=$1
al@19743 120 for i in $DEFAULT_LOCALE; do
al@19743 121 cp $install/$path/i18n/locales/$i $fs/usr/share/i18n/locales
al@19743 122 done
al@19743 123 }
al@19743 124
al@19743 125 mk_dirs()
al@19743 126 {
al@19743 127 mkdir -p \
al@19743 128 $fs/etc \
al@19743 129 $fs/lib \
al@19743 130 $fs/usr/bin \
al@19743 131 $fs/usr/lib/gconv \
al@19743 132 $fs/usr/lib/locale \
al@19743 133 $fs/usr/share/zoneinfo/America \
al@19743 134 $fs/usr/share/zoneinfo/Europe \
al@19743 135 $fs/usr/share/i18n/locales \
al@19743 136 $fs/usr/share/i18n/charmaps \
al@19743 137 $fs/usr/share/locale
al@19743 138 }
al@19743 139
pankso@9 140 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@9 141 genpkg_rules()
pankso@9 142 {
al@19743 143 case $PACKAGE in
al@19743 144 glibc)
al@19743 145 LOCALE=""
al@19743 146 ;;
al@19743 147 glibc-base)
al@19743 148 case "$ARCH" in
al@19743 149 arm*)
al@19743 150 # Eglibc is cross compiled by cross to have a toolchain so we can
al@19743 151 # use these files instead of recooking it. ARM use Eglibc
al@19743 152 echo "Using cross compiled Eglibc..."
al@19743 153 install="/cross/$ARCH/sysroot"
al@19743 154 copy libc_nonshared.a libpthread_nonshared.a
al@19743 155 ;;
al@19743 156 x86_64)
al@19743 157 # EXPERIMENTAL: Glibc is cross compiled by cross to have a
al@19743 158 # toolchain so we can use these files instead of recooking it.
al@19743 159 echo "Using cross compiled Glibc..."
al@19743 160 install="/usr/cross/$ARCH"
al@19743 161 copy libc_nonshared.a libpthread_nonshared.a
al@19743 162 ;;
al@19743 163 esac
al@19743 164 copy \
al@19743 165 ld-*.so* ld.so* \
al@19743 166 libanl-*.so* libanl.so* \
al@19743 167 libc-*.so* libc.so* \
al@19743 168 libcrypt-*.so* libcrypt.so* \
al@19743 169 libdl-*.so* libdl.so* \
al@19743 170 libm-*.so* libm.so* \
al@19743 171 libnsl-*.so* libnsl.so* \
al@19743 172 libnss_compat-*.so* libnss_compat.so* \
al@19743 173 libnss_dns-*.so* libnss_dns.so* \
al@19743 174 libnss_files-*.so* libnss_files.so* \
al@19743 175 libpthread-*.so* libpthread.so* \
al@19743 176 libresolv-*.so* libresolv.so* \
al@19743 177 librt-*.so* librt.so* \
al@19743 178 libthread_db-*.so* libthread_db.so* \
al@19743 179 libutil-*.so* libutil.so* \
al@19743 180 \
al@19743 181 UNICODE.so gconv-modules ANSI_X3.110.so ISO8859-1.so \
al@19743 182 ISO8859-15.so UTF-16.so CP1252.so IBM437.so IBM850.so \
al@19743 183 \
al@19743 184 i18n iso14651_t1 iso14651_t1_common \
al@19743 185 translit_neutral translit_combining translit_circle \
al@19743 186 translit_cjk_compat translit_compat translit_font \
al@19743 187 translit_fraction translit_narrow translit_small \
al@19743 188 translit_wide \
al@19743 189 \
al@19743 190 locale localedef locale.alias UTF-8.gz UTC rpc \
al@19743 191 nsswitch.conf \
al@19743 192 $DEFAULT_LOCALE
gokhlayeh@8189 193
al@19743 194 case "$ARCH" in
al@19743 195 x86_64)
al@19743 196 # Fix libraries search path
al@19743 197 sed -i "s|/usr/cross/$ARCH||g" $fs/lib/libc.so
al@19743 198 sed -i "s|/usr/cross/$ARCH||g" $fs/lib/libpthread.so
al@19743 199 ;;
al@19743 200 esac
al@19743 201 CAT="base-system|minimal libraries and UTF-8 support for SliTaz"
al@19743 202 ;;
al@19743 203 glibc-locale)
al@19743 204 copy gconv/ locale/ i18n/ iconv tzselect
al@19743 205 # Remove glibc-base files
al@19743 206 remove_already_packed
al@19743 207
al@19743 208 # Remove files provided by locale-pack.
al@19743 209 . $WOK/slitaz-i18n/stuff/locale-pack.conf
al@19743 210 echo -n "Removing locale: "
al@19743 211 for i in $LOCALE_PACK; do
al@19743 212 echo -n "$i "
al@19743 213 rm -rf $fs/usr/share/locale/$i
al@19743 214 done
al@19743 215 status
al@19743 216 CAT="system-tools|locale files and utilities"
al@19743 217 DEPENDS="glibc-base"
al@19743 218 ;;
al@19743 219 nscd)
al@19743 220 copy /var/db/ nscd getent nscd.conf
al@19743 221 CAT="base-system|name-server caching daemon"
al@19743 222 ;;
al@19743 223 glibc-dev)
al@19760 224 copy @std @dev
al@19743 225 remove_already_packed
al@19743 226 DEPENDS="glibc-base"
al@19743 227 ;;
al@19743 228 esac
pankso@9 229 }