Bug 177621 - [PATCH] graphics/sane-backends 1.0.23_1 USB scanners fail if USB option selected
Summary: [PATCH] graphics/sane-backends 1.0.23_1 USB scanners fail if USB option selected
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: William Grzybowski
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-03 23:50 UTC by Eric Kraußer
Modified: 2013-04-08 13:30 UTC (History)
0 users

See Also:


Attachments
file.diff (294 bytes, patch)
2013-04-03 23:50 UTC, Eric Kraußer
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Kraußer 2013-04-03 23:50:00 UTC
This is critical: all USB scanners will fail when build *with* option USB!

Please see:
http://svnweb.freebsd.org/ports/head/graphics/sane-backends/Makefile?r1=310057&r2=315474

If you build sane-backends with option USB, then USB will be disabled:
$ /usr/local/bin/sane-find-scanner
  # sane-find-scanner will now attempt to detect your scanner.
  ...
  # No USB scanners found. If you expected something different, make sure that
  # you have loaded a kernel driver for your USB host controller and have setup
  # the USB system correctly. See man sane-usb for details.
  # SANE has been built without libusb support. This may be a reason
  # for not detecting USB scanners. Read README for more details.

Fix: Apply the attached patch. I guess one should add dependency to libusb, but since the last patch removed this i don't know the right way.

Patch attached with submission follows:
How-To-Repeat: Build with option USB an run `/usr/local/bin/sane-find-scanner`, it will tell you there is no libusb support build in.
Comment 1 William Grzybowski freebsd_committer freebsd_triage 2013-04-08 12:34:17 UTC
Responsible Changed
From-To: freebsd-ports-bugs->wg

I'll take it.
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-04-08 13:27:00 UTC
Author: wg
Date: Mon Apr  8 12:26:46 2013
New Revision: 315759
URL: http://svnweb.freebsd.org/changeset/ports/315759

Log:
  - Fix inverted logic for USB option
  
  PR:		ports/177621
  Submitted by:	Eric Krausser <eric@krausser-edv.de>
  Approved by:	portmgr (bapt), culot (mentor)

Modified:
  head/graphics/sane-backends/Makefile

Modified: head/graphics/sane-backends/Makefile
==============================================================================
--- head/graphics/sane-backends/Makefile	Mon Apr  8 12:12:46 2013	(r315758)
+++ head/graphics/sane-backends/Makefile	Mon Apr  8 12:26:46 2013	(r315759)
@@ -53,7 +53,7 @@ LDFLAGS+=	-L${LOCALBASE}/lib
 .include "Makefile.man"
 .include <bsd.port.pre.mk>
 
-.if ${PORT_OPTIONS:MUSB}
+.if empty(PORT_OPTIONS:MUSB)
 CONFIGURE_ARGS+=	--disable-libusb
 .endif
 
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 William Grzybowski freebsd_committer freebsd_triage 2013-04-08 13:30:54 UTC
State Changed
From-To: open->closed

Committed, with minor changes. Thanks!