On 07/01/2010, at 14:54, Daniel O'Connor wrote:
> 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 :(

I had another think about this..

What about if devel/pkgconfig is modified to search in /usr/libdata/pkgconfig 
and systems with native libusb have entries in there?
eg..
--- Makefile.orig       2011-02-05 11:55:04.546436357 +1030
+++ Makefile    2011-02-05 11:50:37.055279037 +1030
@@ -25,7 +25,7 @@
 
 .include <bsd.port.pre.mk>
 
-PC_PATH=${PREFIX}/libdata/pkgconfig
+PC_PATH=/usr/libdata/pkgconfig:${PREFIX}/libdata/pkgconfig
 PC_PATH:=${PC_PATH}:${PREFIX}/lib/pkgconfig
 .if ${LOCALBASE} != ${PREFIX}
 PC_PATH:=      ${PC_PATH}:${LOCALBASE}/libdata/pkgconfig

Along with..
[midget 11:57] ~ >cat /usr/libdata/pkgconfig/libusb-1.0.pc
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: libusb
Description: USB access library
Version: 1.0.1
Libs: -L${libdir} -lusb
Cflags: -I${includedir}

[midget 11:57] ~ >cat /usr/libdata/pkgconfig/libusb.pc    
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: libusb
Description: USB access library
Version: 0.1
Libs: -L${libdir} -lusb
Cflags: -I${includedir}

Ports will still need code to know 8.x+ do not require libusb but they need 
that regardless.

I'm not sure what the "right way" to install such files in libdata is though.

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






_______________________________________________
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"

Reply via email to