diff options
Diffstat (limited to 'source/xap/sane/sane.SlackBuild')
-rwxr-xr-x | source/xap/sane/sane.SlackBuild | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/source/xap/sane/sane.SlackBuild b/source/xap/sane/sane.SlackBuild index 2d82f09e0..95daed9de 100755 --- a/source/xap/sane/sane.SlackBuild +++ b/source/xap/sane/sane.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2008, 2009 Patrick Volkerding, Sebeka, MN, USA +# Copyright 2008, 2009, 2010 Patrick Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -20,11 +20,20 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -VERSION=1.0.19 -BACKVER=1.0.19 +VERSION=1.0.21 +BACKVER=1.0.21 FRONTVER=1.0.14 -ARCH=${ARCH:-x86_64} -BUILD=${BUILD:-4} +BUILD=${BUILD:-1} + +# 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 NUMJOBS=${NUMJOBS:-" -j7 "} @@ -37,6 +46,9 @@ elif [ "$ARCH" = "s390" ]; then elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" fi CWD=$(pwd) @@ -52,6 +64,11 @@ rm -rf sane-backends-$BACKVER tar xvf $CWD/sane-backends-$BACKVER.tar.bz2 || exit 1 cd sane-backends-$BACKVER chown -R root:root . + +# Put the SANE_CAP_ALWAYS_SETTABLE definition back until +# everything else catches up with the API change... +zcat $CWD/sane-frontends-1.0.14-sane_cap_always_settable.diff.gz | patch -p1 || exit 1 + CFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ @@ -69,11 +86,10 @@ make $NUMJOBS || make || exit 1 make install || exit 1 make install DESTDIR=$PKG || exit 1 -# Add the default udev rules, and until it's handled upstream, -# fix their syntax work with recent versions of udev +# Add the default udev rules mkdir -p $PKG/lib/udev/rules.d -sed s/SYSFS/ATTRS/g tools/udev/libsane.rules \ - > $PKG/lib/udev/rules.d/80-libsane.rules +cat tools/udev/libsane.rules > $PKG/lib/udev/rules.d/80-libsane.rules + # Add the hal fdi file mkdir -p $PKG/usr/share/hal/fdi/policy/10osvendor/ cat tools/hal/libsane.fdi \ @@ -85,6 +101,7 @@ rm -rf sane-frontends-$FRONTVER tar xvf $CWD/sane-frontends-$FRONTVER.tar.bz2 || exit 1 cd sane-frontends-$FRONTVER chown -R root:root . + CFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ |