Fwd: Re: libusb-config missing?

Hans Petter Selasky hselasky at c2i.net
Thu Jan 7 09:29:36 UTC 2010


----------  Forwarded Message  ----------

Subject: Re: libusb-config missing?
Date: Thursday 07 January 2010
From: "Daniel O'Connor" <doconnor at gsoft.com.au>
To: Hans Petter Selasky <hselasky at c2i.net>

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
--- /usr/ports/devel/libusb/Makefile    2009-08-22 09:48:15.000000000 +0930
+++ libusb/Makefile     2010-01-07 14:52:57.000000000 +1030
@@ -16,6 +16,8 @@

 OPTIONS=       SGML "Install developer guide from SGML" off

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

 .if ${OSVERSION} >= 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 
if they could just depend on devel/libusb and Magic Happened (tm) to pick
the correct thing.

Unfortunately that is beyond my port fu :(

-- 
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

-------------------------------------------------------
-------------- next part --------------
# 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 at dons.net.au>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	libusb_base
XPORTVERSION=	0.1
XCATEGORIES=	devel
XDISTFILES=
X
XMAINTAINER=	darius at dons.net.au
XCOMMENT=	Stub port for libusb using ports on systems after 800069
X
XNO_BUILD=
XPLIST_FILES=	bin/libusb-config libdata/pkgconfig/libusb.pc
X
XCONFLICTS=	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=		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 << 'f7bc2f7ae97ecd94979fcb54549fc729'
X#!/bin/sh
X
Xprefix=/usr
Xexec_prefix=${prefix}
Xexec_prefix_set=no
X
Xusage()
X{
X	cat <<EOF
XUsage: libusb-config [OPTIONS] [LIBRARIES]
XOptions:
X	[--prefix[=DIR]]
X	[--exec-prefix[=DIR]]
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  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
X  *) optarg= ;;
X  esac
X
X  case $1 in
X    --prefix=*)
X      prefix=$optarg
X      if test $exec_prefix_set = no ; then
X        exec_prefix=$optarg
X      fi
X      ;;
X    --prefix)
X      echo_prefix=yes
X      ;;
X    --exec-prefix=*)
X      exec_prefix=$optarg
X      exec_prefix_set=yes
X      ;;
X    --exec-prefix)
X      echo_exec_prefix=yes
X      ;;
X    --version)
X      echo 0.1.12
X      exit 0
X      ;;
X    --cflags)
X      if test "${prefix}/include" != /usr/include ; then
X        includes="-I${prefix}/include"
X      fi
X      echo_cflags=yes
X      ;;
X    --libs)
X      echo_libs=yes
X      ;;
X    *)
X      usage 1 1>&2
X      ;;
X  esac
X  shift
Xdone
X
Xif test "$echo_prefix" = "yes"; then
X	echo $prefix
Xfi
Xif test "$echo_exec_prefix" = "yes"; then
X	echo $exec_prefix
Xfi
Xif test "$echo_cflags" = "yes"; then
X	echo $includes
Xfi
Xif test "$echo_libs" = "yes"; then
X	echo -lusb 
Xfi
X
f7bc2f7ae97ecd94979fcb54549fc729
echo x - libusb_base/files/libusb.pc
sed 's/^X//' >libusb_base/files/libusb.pc << '4869b55c25608b20478ec74359930bfa'
Xprefix=/usr
Xexec_prefix=${prefix}
Xlibdir=${exec_prefix}/lib
Xincludedir=${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



More information about the freebsd-ports mailing list