From owner-freebsd-ports@FreeBSD.ORG Fri Feb 5 06:35:54 2010 Return-Path: Delivered-To: ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8A691065672 for ; Fri, 5 Feb 2010 06:35:54 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id 3ABEC8FC15 for ; Fri, 5 Feb 2010 06:35:53 +0000 (UTC) Received: from inchoate.gsoft.com.au ([203.31.81.30]) (authenticated bits=0) by cain.gsoft.com.au (8.13.8/8.13.8) with ESMTP id o156OCm0076314 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 5 Feb 2010 16:54:13 +1030 (CST) (envelope-from darius@dons.net.au) From: "Daniel O'Connor" To: ports@FreeBSD.org Date: Fri, 5 Feb 2010 16:54:08 +1030 User-Agent: KMail/1.9.10 MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2195277.GGA1PoM9SJ"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201002051654.09298.darius@dons.net.au> X-Spam-Score: -3.865 () ALL_TRUSTED,AWL,BAYES_00 X-Scanned-By: MIMEDefang 2.63 on 203.31.81.10 Cc: Subject: graphics/sane-backends on 8.0 + USB X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: darius@dons.net.au List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 06:35:54 -0000 --nextPart2195277.GGA1PoM9SJ Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, I have spent a while getting sane to work with my USB scanner..=20 I found that I needed to tell it to use the 1.0 API otherwise it would=20 cause a crash in libusb (not sure whos fault it is). To do this I made a port which installs the requisite pkg_config files=20 so that the base libusb can be seen by SANE without an issue. Here is the diff to SANE so it uses the 1.0 API.. diff -ur /usr/ports/graphics/sane-backends/Makefile=20 sane-backends/Makefile =2D-- /usr/ports/graphics/sane-backends/Makefile 2009-09-11=20 23:45:26.000000000 +0930 +++ sane-backends/Makefile 2010-02-05 16:52:31.028901308 +1030 @@ -51,6 +51,8 @@ .else .if ${OSVERSION} < 800069 LIB_DEPENDS+=3D usb-0.1.8:${PORTSDIR}/devel/libusb +.else +CONFIGURE_ARGS+=3D --enable-libusb_1_0 .endif .endif The libusb port is at http://www.dons.net.au/~darius/libusb_base.tgz Note that (obviously) the SANE port needs to depend on libusb_base,=20 however I don't know the best way to do that in terms of backward=20 compatibility. ie wether libusb_base should be merged with libusb or=20 ports are modified so that they select which one. The former seems more elegant to me but I don't know how to merge=20 them :) =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart2195277.GGA1PoM9SJ Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iD8DBQBLa7mJ5ZPcIHs/zowRAmKcAJ9ZfwSSTm5hGwYve2URUFWpuQqfHwCggdE6 U8x3bsoV6Ax1rQtAd68zHSc= =wV1s -----END PGP SIGNATURE----- --nextPart2195277.GGA1PoM9SJ--