pkgconf (pkg-config), libusb and FreeBSD 9
Jan Beich
jbeich at vfemail.net
Tue Jan 26 23:25:19 UTC 2016
Lev Serebryakov <lev at FreeBSD.org> writes:
> I have port, which used libusb-1.0. It uses "pkg-config --cflags
> libusb-1.0" and "pkg-config --libs libusb-1.0".
>
> For FreeBSD 10 and 11 port works with "USES=pkgconfig". But on
> FreeBSD 9.3 it complains, that "Package libusb-1.0 was not found in
> the pkg-config search path".
>
> What should I do to make it work on FreeBSD 9?
If the port uses GNU_CONFIGURE try overriding flags:
# From multimedia/libmtp which has PKG_CHECK_MODULES(LIBUSB, ...)
.if !exists(/usr/libdata/pkgconfig/libusb-1.0.pc)
CONFIGURE_ENV+= LIBUSB_CFLAGS=" " LIBUSB_LIBS="-lusb"
.endif
Notice this doesn't pass unnecessary (and maybe poisonous)
-I/usr/include -L/usr/lib. With cmake, scons, etc. you may need to
patch the source.
--
There aren't that many libusb consumers to shun doing homework:
$ git grep -Fl pkgconfig '*/Makefile*' | xargs fgrep -- -lusb
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 602 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20160127/b26de8fa/attachment.sig>
More information about the freebsd-ports
mailing list