From 37d6a2681251a9bdd94a9508df3493a12c16cfcd Mon Sep 17 00:00:00 2001 From: Chess Griffin Date: Fri, 21 May 2010 23:56:03 -0400 Subject: desktop/ratpoison: fix build on 13.1 and misc cleanup Fixed build by adding -DHAVE_GETLINE to CFLAGS --- desktop/ratpoison/ratpoison.SlackBuild | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'desktop') diff --git a/desktop/ratpoison/ratpoison.SlackBuild b/desktop/ratpoison/ratpoison.SlackBuild index 5074ae9daf..d4d1ce1c6a 100644 --- a/desktop/ratpoison/ratpoison.SlackBuild +++ b/desktop/ratpoison/ratpoison.SlackBuild @@ -5,10 +5,19 @@ PRGNAM=ratpoison VERSION=${VERSION:-1.4.5} -ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi + CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM @@ -23,6 +32,9 @@ elif [ "$ARCH" = "i686" ]; then elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRDSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" fi set -e @@ -49,7 +61,7 @@ patch -p1 < $CWD/ratpoison-1.4.5-fixup_docdir.diff # else if you wish XTERM=${XTERM:-xterm} -CFLAGS="$SLKCFLAGS" \ +CFLAGS="$SLKCFLAGS -DHAVE_GETLINE" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ @@ -71,10 +83,9 @@ install -m 0755 $CWD/xinitrc.ratpoison $PKG/etc/X11/xinit/xinitrc.ratpoison find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true -( cd $PKG/usr/man - find . -type f -exec gzip -9 {} \; - for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done -) +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; + rm $i ; done rm -f $PKG/usr/info/dir gzip -9 $PKG/usr/info/*.info* -- cgit v1.2.3