diff options
Diffstat (limited to 'source/d/guile/guile.SlackBuild')
-rwxr-xr-x | source/d/guile/guile.SlackBuild | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/source/d/guile/guile.SlackBuild b/source/d/guile/guile.SlackBuild index ef6cdd1a..e71c701e 100755 --- a/source/d/guile/guile.SlackBuild +++ b/source/d/guile/guile.SlackBuild @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -# Copyright 2008, 2009, 2010, 2011, 2013 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2008, 2009, 2010, 2011, 2013, 2016, 2017, 2018 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -20,31 +20,39 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) PKGNAM=guile -VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} BUILD=${BUILD:-2} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) export ARCH=i486 ;; + i?86) export ARCH=i586 ;; arm*) export ARCH=arm ;; # Unless $ARCH is already set, use uname -m for all other archs: *) export ARCH=$( uname -m ) ;; esac fi +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz" + exit 0 +fi + NUMJOBS=${NUMJOBS:-" -j7 "} -CWD=$(pwd) TMP=${TMP:-/tmp} PKG=$TMP/package-guile rm -rf $PKG mkdir -p $PKG/usr -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" @@ -59,8 +67,9 @@ fi cd $TMP rm -rf guile-$VERSION -tar xvf $CWD/guile-$VERSION.tar.xz || exit 1 +tar xvf $CWD/guile-$VERSION.tar.?z || exit 1 cd guile-$VERSION || exit 1 + chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -78,17 +87,26 @@ CFLAGS="$SLKCFLAGS" \ --disable-static \ --disable-rpath \ --disable-error-on-warning \ - --build=$ARCH-slackware-linux + --build=$ARCH-slackware-linux || exit 1 # Does not like parallel make... make $NUMJOBS || make || exit 1 make install DESTDIR=$PKG || exit 1 +# Don't ship .la files: +rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la + # Move libguile*-gdb.scm to GDB's autoload directory to avoid # getting "not an ELF file" errors from ldconfig: mkdir -p $PKG/usr/share/gdb/auto-load/usr/lib${LIBDIRSUFFIX} mv $PKG/usr/lib${LIBDIRSUFFIX}/libguile*-gdb.scm $PKG/usr/share/gdb/auto-load/usr/lib${LIBDIRSUFFIX} || exit 1 +# Change timestamps on *.go and *.scm files, otherwise on multilib systems +# the compiled (go) files may be detected as older than the source (scm) +# files, causing guile to attempt to recompile itself with every use: +find $PKG/usr/lib${LIBDIRSUFFIX} -name "*.go" -exec touch -r $CWD/guile.SlackBuild "{}" \; +find $PKG/usr/share -name "*.scm" -exec touch -r $CWD/guile.SlackBuild "{}" \; + find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null |