From fd2206a8d1ef67d9516eff6a576d262f8d67f2b8 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Fri, 18 Dec 2015 10:06:08 +0000 Subject: glibc-multilib: rebuilt and split the creation of glib-zoneinfo to a separate SlackBuild script --- current/glibc/glibc-multilib.SlackBuild | 111 ++++++-------------------------- 1 file changed, 19 insertions(+), 92 deletions(-) (limited to 'current') diff --git a/current/glibc/glibc-multilib.SlackBuild b/current/glibc/glibc-multilib.SlackBuild index b50215a..3d3a0c0 100755 --- a/current/glibc/glibc-multilib.SlackBuild +++ b/current/glibc/glibc-multilib.SlackBuild @@ -30,7 +30,7 @@ VERSION=${VERSION:-2.22} CHECKOUT=${CHECKOUT:-""} -BUILD=${BUILD:-1alien} +BUILD=${BUILD:-2alien} ## Included in glibc now: ## glibc-libidn version @@ -173,16 +173,8 @@ apply_patches() { zcat $CWD/glibc.revert.to.fix.build.breakages.diff.gz | patch -p1 -l --verbose || exit 1 # Make it harder for people to trick ldd into running code: zcat $CWD/glibc.ldd.trace.through.dynamic.linker.diff.gz | patch -p1 --verbose || exit 1 - # Make glibc compile with binutils using --enable-initfini-array. - # At this time, we do not recommend this due to probable ABI breakage. - # The also patch needs work before it would apply. - # ***NOT READY*** - #zcat $CWD/glibc.git-4a531bb0b3b582cb693de9f76d2d97d970f9a5d5.patch.gz | patch -p1 --verbose || exit 1 - # - # 2014-05: We'll try building with the stock asm... - ## Avoid the Intel optimized asm routines for now because they break - ## the flash player. We'll phase this in when it's safer to do so. - #zcat $CWD/glibc.disable.broken.optimized.memcpy.diff.gz | patch -p1 --verbose || exit 1 + # Add a C.UTF-8 locale: + zcat $CWD/glibc-c-utf8-locale.patch.gz | patch -p1 --verbose || exit 1 if [ $BOOTSTRP -eq 1 ] ; then # Multilib - Disable check for forced unwind (Patch from eglibc) since we # do not have a multilib glibc yet to link to; @@ -194,7 +186,6 @@ apply_patches() { export PKG=$TMP/package-glibc-incoming-tree PGLIBC=$TMP/package-glibc PSOLIBS=$TMP/package-glibc-solibs -PZONE=$TMP/package-glibc-zoneinfo PI18N=$TMP/package-glibc-i18n PPROFILE=$TMP/package-glibc-profile PDEBUG=$TMP/package-glibc-debug @@ -329,53 +320,17 @@ strip -g $PKG/lib${LIBDIRSUFFIX}/l*.so* strip -g $PKG/usr/lib${LIBDIRSUFFIX}/l*.so* strip -g $PKG/usr/lib${LIBDIRSUFFIX}/lib*.a -# Build and install the zoneinfo database: -cd $TMP -rm -rf tzcodedata-build -mkdir tzcodedata-build -cd tzcodedata-build -tar xzf $CWD/tzdata?????.tar.gz -tar xzf $CWD/tzcode?????.tar.gz -sed -i "s,/usr/local,$(pwd),g" Makefile -sed -i "s,/etc/zoneinfo,/zoneinfo,g" Makefile -make -make install -mkdir -p $PKG/usr/share/zoneinfo/{posix,right} -cd etc -cp -a zoneinfo/* $PKG/usr/share/zoneinfo -cp -a zoneinfo-posix/* $PKG/usr/share/zoneinfo/posix -cp -a zoneinfo-leaps/* $PKG/usr/share/zoneinfo/right -# Remove $PKG/usr/share/zoneinfo/localtime -- the install script will -# create it as a link to /etc/localtime. -rm -f $PKG/usr/share/zoneinfo/localtime - -# Back to the sources dir to add some files/docs: -cd $TMP/glibc-$CVSVER - # We'll automatically install the config file for the Name Server Cache Daemon. # Perhaps this should also have some commented-out startup code in rc.inet2... mkdir -p $PKG/etc cat nscd/nscd.conf > $PKG/etc/nscd.conf.new -# Install some scripts to help select a timezone: -( cd $CWD/timezone-scripts - # Try to rebuild this: - sh output-updated-timeconfig.sh $PKG/usr/share/zoneinfo > timeconfig 2> /dev/null -) -mkdir -p $PKG/var/log/setup -cp -a $CWD/timezone-scripts/setup.timeconfig $PKG/var/log/setup -chown root:root $PKG/var/log/setup/setup.timeconfig -chmod 755 $PKG/var/log/setup/setup.timeconfig -mkdir -p $PKG/usr/sbin -cp -a $CWD/timezone-scripts/timeconfig $PKG/usr/sbin -chown root:root $PKG/usr/sbin/timeconfig -chmod 755 $PKG/usr/sbin/timeconfig - ## Install docs: ( mkdir -p $PKG/usr/doc/glibc-$VERSION + cd .. cp -a \ - BUGS CONFORMANCE COPYING COPYING.LIB FAQ INSTALL LICENSES NAMESPACE \ - NEWS NOTES PROJECTS README README.libm \ + BUGS CONFORMANCE COPYING* FAQ INSTALL LICENSES NAMESPACE \ + NEWS NOTES PROJECTS README* \ $PKG/usr/doc/glibc-$VERSION # Add the SlackBuild: @@ -383,11 +338,6 @@ chmod 755 $PKG/usr/sbin/timeconfig chmod 644 $PKG/usr/doc/glibc-$VERSION/glibc-multilib.SlackBuild ) -# Don't forget to add the /usr/share/zoneinfo/localtime -> /etc/localtime symlink! :) -if [ ! -r $PKG/usr/share/zoneinfo/localtime ]; then - ( cd $PKG/usr/share/zoneinfo ; ln -sf /etc/localtime . ) -fi - # OK, there are some very old Linux standards that say that any binaries in a /bin or # /sbin directory (and the directories themselves) should be group bin rather than # group root, unless a specific group is really needed for some reason. @@ -422,33 +372,6 @@ rm $PKG/etc/ld.so.cache # OK, time to make some packages # ################################## -# glibc-zoneinfo. We will start with an easy one to avoid breaking a sweat. -cd $CWD -ZONE_VERSIONS="$(echo tzdata* | cut -f1 -d . | cut -b7-11)" -echo $ZONE_VERSIONS -cd $PZONE -# Install some scripts to help select a timezone: -mkdir -p $PZONE/var/log/setup -cp -a $CWD/timezone-scripts/setup.timeconfig $PZONE/var/log/setup -chown root:root $PZONE/var/log/setup/setup.timeconfig -chmod 755 $PZONE/var/log/setup/setup.timeconfig -mkdir -p $PZONE/usr/sbin -cp -a $CWD/timezone-scripts/timeconfig $PZONE/usr/sbin -chown root:root $PZONE/usr/sbin/timeconfig -chmod 755 $PZONE/usr/sbin/timeconfig -mkdir $PZONE/install -cat $CWD/doinst.sh-glibc-zoneinfo > $PZONE/install/doinst.sh -cat $CWD/slack-desc.glibc-zoneinfo > $PZONE/install/slack-desc -mkdir -p $PZONE/usr/share -cd $PZONE/usr/share -cp -a --verbose $PKG/usr/share/zoneinfo . -cd $PZONE -mkdir -p $PZONE/etc -# This is already hard-coded into doinst.sh (like it'll be there anyway ;-): -rm -f etc/localtime -# Wrap it up: -/sbin/makepkg -l y -c n $TMP/glibc-zoneinfo-${ZONE_VERSIONS}_multilib-noarch-$BUILD.txz - # glibc-profile: cd $PPROFILE mkdir -p usr/lib${LIBDIRSUFFIX} @@ -485,18 +408,22 @@ cat $CWD/slack-desc.glibc-debug > install/slack-desc # glibc-i18n: cd $PI18N -mkdir -p usr/lib${LIBDIRSUFFIX} -rm -rf usr/lib${LIBDIRSUFFIX}/locale -cp -a $PKG/usr/lib${LIBDIRSUFFIX}/locale usr/lib${LIBDIRSUFFIX} +mkdir -p usr/lib${LIBDIRSUFFIX}/locale +mv $PKG/usr/lib${LIBDIRSUFFIX}/locale/* usr/lib${LIBDIRSUFFIX}/locale +# Leave copies of the C, POSIX, and en_US locales in the main glibc package: +cp -a usr/lib${LIBDIRSUFFIX}/locale/{C,en_US}* $PKG/usr/lib${LIBDIRSUFFIX}/locale if [ "x$LIBDIRSUFFIX" = "x64" ]; then # Same exercise for lib: - mkdir -p usr/lib - rm -rf usr/lib/locale - cp -a $PKG/usr/lib/locale usr/lib + mkdir -p usr/lib/locale + mv $PKG/usr/lib/locale/* usr/lib/locale + # Leave copies of the C, POSIX, and en_US locales in the main glibc package: + cp -a usr/lib/locale/{C,en_US}* $PKG/usr/lib/locale fi -mkdir -p usr/share -cp -a $PKG/usr/share/i18n usr/share -cp -a $PKG/usr/share/locale usr/share +mkdir -p usr/share/{i18n,locale} +mv $PKG/usr/share/i18n/* usr/share/i18n +mv $PKG/usr/share/locale/* usr/share/locale +mkdir -p $PKG/usr/share/i18n/locales +cp -a usr/share/i18n/locales/{C,POSIX,en_US} $PKG/usr/share/i18n/locales mkdir install cat $CWD/slack-desc.glibc-i18n > install/slack-desc /sbin/makepkg -l y -c n $TMP/glibc-i18n-${VERSION}_multilib-$SLACKWARE_ARCH-$BUILD.txz -- cgit v1.2.3