summaryrefslogtreecommitdiff
path: root/source/xap/sane
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2010-05-19 08:58:23 +0000
committerEric Hameleers <alien@slackware.com>2018-05-31 22:43:05 +0200
commitb76270bf9e6dd375e495fec92140a79a79415d27 (patch)
tree3dbed78b2279bf9f14207a16dc634b90995cbd40 /source/xap/sane
parent5a12e7c134274dba706667107d10d231517d3e05 (diff)
downloadcurrent-b76270bf9e6dd375e495fec92140a79a79415d27.tar.gz
Slackware 13.1slackware-13.1
Wed May 19 08:58:23 UTC 2010 Slackware 13.1 x86_64 stable is released! Lots of thanks are due -- see the RELEASE_NOTES and the rest of the ChangeLog for credits. The ISOs are on their way to replication, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. We are taking pre-orders now at store.slackware.com, and offering a discount if you sign up for a subscription. Consider picking up a copy to help support the project. Thanks again to the Slackware community for testing, contributing, and generally holding us to a high level of quality. :-) Enjoy!
Diffstat (limited to 'source/xap/sane')
-rw-r--r--source/xap/sane/sane-frontends-1.0.14-sane_cap_always_settable.diff11
-rwxr-xr-xsource/xap/sane/sane.SlackBuild35
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 \