commit:     70f1e0c27a7971ae7520a4e137f642103f8a81f7
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Mon Nov  2 22:37:17 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Mon Nov  2 22:46:49 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=70f1e0c2

media-gfx/sane-backends: disable test that relies on USB support

 .../files/sane-backends-1.0.25-disable-usb-tests.patch     | 14 ++++++++++++++
 .../sane-backends/sane-backends-1.0.25_pre20150628.ebuild  |  3 ++-
 media-gfx/sane-backends/sane-backends-9999.ebuild          |  1 +
 3 files changed, 17 insertions(+), 1 deletion(-)

diff --git 
a/media-gfx/sane-backends/files/sane-backends-1.0.25-disable-usb-tests.patch 
b/media-gfx/sane-backends/files/sane-backends-1.0.25-disable-usb-tests.patch
new file mode 100644
index 0000000..217a440
--- /dev/null
+++ b/media-gfx/sane-backends/files/sane-backends-1.0.25-disable-usb-tests.patch
@@ -0,0 +1,14 @@
+do not let the tests try reading/locking usb hardware.  we also disable
+this because the test will abort() if no usb support is found at all.
+
+--- a/testsuite/sanei/sanei_usb_test.c
++++ b/testsuite/sanei/sanei_usb_test.c
+@@ -832,6 +832,8 @@ main (int argc, char **argv)
+   int detected, opened, i;
+   SANE_Int dn[MAX_DEVICES];
+ 
++  return 77;
++
+ #ifdef HAVE_LIBUSB
+   printf ("\n%s built with old libusb\n\n", argv[0]);
+ #endif

diff --git a/media-gfx/sane-backends/sane-backends-1.0.25_pre20150628.ebuild 
b/media-gfx/sane-backends/sane-backends-1.0.25_pre20150628.ebuild
index d8cec10..61a6e8f 100644
--- a/media-gfx/sane-backends/sane-backends-1.0.25_pre20150628.ebuild
+++ b/media-gfx/sane-backends/sane-backends-1.0.25_pre20150628.ebuild
@@ -197,7 +197,8 @@ src_prepare() {
                "${FILESDIR}"/${PN}-1.0.24-automagic_systemd.patch \
                "${FILESDIR}"/${PN}-1.0.24-systemd_pkgconfig.patch \
                "${FILESDIR}"/${PN}-1.0.24-saned_pidfile_location.patch \
-               "${FILESDIR}"/${PN}-1.0.24-cross-compile.patch
+               "${FILESDIR}"/${PN}-1.0.24-cross-compile.patch \
+               "${FILESDIR}"/${PN}-1.0.25-disable-usb-tests.patch
        # Fix for "make check".
        sed -i -e 's/sane-backends 1.0.24/sane-backends 1.0.25git/' 
testsuite/tools/data/html*
        mv configure.{in,ac} || die

diff --git a/media-gfx/sane-backends/sane-backends-9999.ebuild 
b/media-gfx/sane-backends/sane-backends-9999.ebuild
index b636bf1..9743a91 100644
--- a/media-gfx/sane-backends/sane-backends-9999.ebuild
+++ b/media-gfx/sane-backends/sane-backends-9999.ebuild
@@ -190,6 +190,7 @@ src_prepare() {
        epkowa
        EOF
        epatch "${FILESDIR}"/${PN}-1.0.24-saned_pidfile_location.patch
+       epatch "${FILESDIR}"/${PN}-1.0.25-disable-usb-tests.patch
        mv configure.{in,ac} || die
        AT_NOELIBTOOLIZE=yes eautoreconf
 

Reply via email to