media-gfx/sane-backends: disable test that relies on USB support
authorMike Frysinger <vapier@gentoo.org>
Mon, 2 Nov 2015 22:37:17 +0000 (17:37 -0500)
committerMike Frysinger <vapier@gentoo.org>
Mon, 2 Nov 2015 22:46:49 +0000 (17:46 -0500)
media-gfx/sane-backends/files/sane-backends-1.0.25-disable-usb-tests.patch [new file with mode: 0644]
media-gfx/sane-backends/sane-backends-1.0.25_pre20150628.ebuild
media-gfx/sane-backends/sane-backends-9999.ebuild

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 (file)
index 0000000..217a440
--- /dev/null
@@ -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
index d8cec103cdb52d37a60d561ec273658a294b8958..61a6e8fc0f358ca03c6f4a5b3645a03c9ee116b0 100644 (file)
@@ -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
index b636bf116f0b1aa9f88aa1ec32a41962b20d4b11..9743a91699b1c3ce5f164e30e759e0aa6c2e375b 100644 (file)
@@ -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