diff options
Diffstat (limited to 'source/xap/sane')
-rw-r--r-- | source/xap/sane/sane-frontends-1.0.14-sane_cap_always_settable.diff | 11 | ||||
-rwxr-xr-x | source/xap/sane/sane.SlackBuild | 35 |
2 files changed, 37 insertions, 9 deletions
diff --git a/source/xap/sane/sane-frontends-1.0.14-sane_cap_always_settable.diff b/source/xap/sane/sane-frontends-1.0.14-sane_cap_always_settable.diff new file mode 100644 index 00000000..98f2715a --- /dev/null +++ b/source/xap/sane/sane-frontends-1.0.14-sane_cap_always_settable.diff @@ -0,0 +1,11 @@ +diff -Nur sane-backends-1.0.20.orig/include/sane/sane.h sane-backends-1.0.20/include/sane/sane.h +--- sane-backends-1.0.20.orig/include/sane/sane.h 2009-04-23 14:59:23.000000000 -0500 ++++ sane-backends-1.0.20/include/sane/sane.h 2010-01-19 18:24:29.954762582 -0600 +@@ -115,6 +115,7 @@ + #define SANE_CAP_AUTOMATIC (1 << 4) + #define SANE_CAP_INACTIVE (1 << 5) + #define SANE_CAP_ADVANCED (1 << 6) ++#define SANE_CAP_ALWAYS_SETTABLE (1 << 7) + + #define SANE_OPTION_IS_ACTIVE(cap) (((cap) & SANE_CAP_INACTIVE) == 0) + #define SANE_OPTION_IS_SETTABLE(cap) (((cap) & SANE_CAP_SOFT_SELECT) != 0) diff --git a/source/xap/sane/sane.SlackBuild b/source/xap/sane/sane.SlackBuild index 2d82f09e..95daed9d 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 \ |