Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Jan 2010 14:54:45 +1030
From:      "Daniel O'Connor" <doconnor@gsoft.com.au>
To:        Hans Petter Selasky <hselasky@c2i.net>
Cc:        freebsd-usb@freebsd.org
Subject:   Re: libusb-config missing?
Message-ID:  <201001071454.47314.doconnor@gsoft.com.au>
In-Reply-To: <200912251244.46651.hselasky@c2i.net>
References:  <200912251137.43667.doconnor@gsoft.com.au> <200912252058.58879.doconnor@gsoft.com.au> <200912251244.46651.hselasky@c2i.net>

next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart2827689.JiVFfemQix
Content-Type: multipart/mixed;
  boundary="Boundary-01=_PIWRLgoRtOrJjxT"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

--Boundary-01=_PIWRLgoRtOrJjxT
Content-Type: text/plain;
  charset="iso-8859-15"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On Fri, 25 Dec 2009, Hans Petter Selasky wrote:
> On Friday 25 December 2009 11:28:51 Daniel O'Connor wrote:
> > On Fri, 25 Dec 2009, Hans Petter Selasky wrote:
> > > On Friday 25 December 2009 02:07:42 Daniel O'Connor wrote:
> > > > Would it be possible to create a libusb-config shell script and
> > > > install it in /usr/bin?
>
> Can you provide a pseudo-libusb port patch for this?

I've attached a shar and there is this..
diff -ur /usr/ports/devel/libusb/Makefile libusb/Makefile
=2D-- /usr/ports/devel/libusb/Makefile    2009-08-22 09:48:15.000000000 +09=
30
+++ libusb/Makefile     2010-01-07 14:52:57.000000000 +1030
@@ -16,6 +16,8 @@

 OPTIONS=3D       SGML "Install developer guide from SGML" off

+CONFLICTS=3D     libusb_base-*
+
 .include <bsd.port.pre.mk>

 .if ${OSVERSION} >=3D 800069

Although I think it's mostly unecessary due to the OSVERSION check.

One problem is that ports don't know which version to use, it would be nice=
=20
if they could just depend on devel/libusb and Magic Happened (tm) to pick
the correct thing.

Unfortunately that is beyond my port fu :(

=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

--Boundary-01=_PIWRLgoRtOrJjxT
Content-Type: text/plain;
  charset="iso 8859-15";
  name="libusb_base.shar"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="libusb_base.shar"

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	libusb_base
#	libusb_base/Makefile
#	libusb_base/files
#	libusb_base/files/libusb-config
#	libusb_base/files/libusb.pc
#	libusb_base/pkg-descr
#
echo c - libusb_base
mkdir -p libusb_base > /dev/null 2>&1
echo x - libusb_base/Makefile
sed 's/^X//' >libusb_base/Makefile << '00dd756110256c8b684f81b5bb5870e5'
X# New ports collection makefile for:	libusb_base
X# Date created:				7 January 2010
X# Whom:					Daniel O'Connor <darius@dons.net.au>
X#
X# $FreeBSD$
X#
X
XPORTNAME=3D	libusb_base
XPORTVERSION=3D	0.1
XCATEGORIES=3D	devel
XDISTFILES=3D
X
XMAINTAINER=3D	darius@dons.net.au
XCOMMENT=3D	Stub port for libusb using ports on systems after 800069
X
XNO_BUILD=3D
XPLIST_FILES=3D	bin/libusb-config libdata/pkgconfig/libusb.pc
X
XCONFLICTS=3D	libusb-*
X
Xdo-install:
X	${INSTALL_SCRIPT} ${FILESDIR}/libusb-config ${PREFIX}/bin
X	${INSTALL_DATA} ${FILESDIR}/libusb.pc ${PREFIX}/libdata/pkgconfig
X
X.include <bsd.port.pre.mk>
X
X.if ${OSVERSION} < 800069
XIGNORE=3D		only necessary for newer systems
X.endif
X
X.include <bsd.port.post.mk>
X
00dd756110256c8b684f81b5bb5870e5
echo c - libusb_base/files
mkdir -p libusb_base/files > /dev/null 2>&1
echo x - libusb_base/files/libusb-config
sed 's/^X//' >libusb_base/files/libusb-config << 'f7bc2f7ae97ecd94979fcb545=
49fc729'
X#!/bin/sh
X
Xprefix=3D/usr
Xexec_prefix=3D${prefix}
Xexec_prefix_set=3Dno
X
Xusage()
X{
X	cat <<EOF
XUsage: libusb-config [OPTIONS] [LIBRARIES]
XOptions:
X	[--prefix[=3DDIR]]
X	[--exec-prefix[=3DDIR]]
X	[--version]
X	[--libs]
X	[--cflags]
XEOF
X	exit $1
X}
X
Xif test $# -eq 0; then
X	usage 1 1>&2
Xfi
X
Xwhile test $# -gt 0; do
X  case "$1" in
X  -*=3D*) optarg=3D`echo "$1" | sed 's/[-_a-zA-Z0-9]*=3D//'` ;;
X  *) optarg=3D ;;
X  esac
X
X  case $1 in
X    --prefix=3D*)
X      prefix=3D$optarg
X      if test $exec_prefix_set =3D no ; then
X        exec_prefix=3D$optarg
X      fi
X      ;;
X    --prefix)
X      echo_prefix=3Dyes
X      ;;
X    --exec-prefix=3D*)
X      exec_prefix=3D$optarg
X      exec_prefix_set=3Dyes
X      ;;
X    --exec-prefix)
X      echo_exec_prefix=3Dyes
X      ;;
X    --version)
X      echo 0.1.12
X      exit 0
X      ;;
X    --cflags)
X      if test "${prefix}/include" !=3D /usr/include ; then
X        includes=3D"-I${prefix}/include"
X      fi
X      echo_cflags=3Dyes
X      ;;
X    --libs)
X      echo_libs=3Dyes
X      ;;
X    *)
X      usage 1 1>&2
X      ;;
X  esac
X  shift
Xdone
X
Xif test "$echo_prefix" =3D "yes"; then
X	echo $prefix
Xfi
Xif test "$echo_exec_prefix" =3D "yes"; then
X	echo $exec_prefix
Xfi
Xif test "$echo_cflags" =3D "yes"; then
X	echo $includes
Xfi
Xif test "$echo_libs" =3D "yes"; then
X	echo -lusb=20
Xfi
X
f7bc2f7ae97ecd94979fcb54549fc729
echo x - libusb_base/files/libusb.pc
sed 's/^X//' >libusb_base/files/libusb.pc << '4869b55c25608b20478ec74359930=
bfa'
Xprefix=3D/usr
Xexec_prefix=3D${prefix}
Xlibdir=3D${exec_prefix}/lib
Xincludedir=3D${prefix}/include
X
XName: libusb
XDescription: USB access library
XVersion: 0.1
XLibs: -L${libdir} -lusb
XCflags: -I${includedir}
X
4869b55c25608b20478ec74359930bfa
echo x - libusb_base/pkg-descr
sed 's/^X//' >libusb_base/pkg-descr << 'd66531e76047711b93291269fe9451dd'
XThis is a stub port to install files to allow other pieces of software to =
find
Xlibusb now that it is in base.
X
XWWW: http://www.freebsd.org
X
d66531e76047711b93291269fe9451dd
exit


--Boundary-01=_PIWRLgoRtOrJjxT--

--nextPart2827689.JiVFfemQix
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)

iD8DBQBLRWIP5ZPcIHs/zowRAqG5AJ493jflZBcQ7WB+5AYLQQcjbdPGlwCgiRaw
//3cAM2spmKD1Cjb7XJcq1c=
=lkDx
-----END PGP SIGNATURE-----

--nextPart2827689.JiVFfemQix--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001071454.47314.doconnor>