tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: pkgsrc/devel/libusb-compat

		Hi tech-pkg@, Greg,

On 24/01/2018 02:16, Greg Troxel wrote:
> Pierre Pronchery <> writes:
>>> Import file for devel/libusb-compat
>>> libusb-compat is an API wrapper, emulating devel/libusb through the newer
>>> code from devel/libusb1. On NetBSD, this has multiple advantages, such as
>>> not requiring root privileges when accessing ugen(4) USB devices. We should
>>> therefore consider to default to devel/libusb-compat instead of
>>> devel/libusb on NetBSD at the very least.
>>> Tested with devel/libftdi on NetBSD/amd64.
>> Can we do this, and if yes what would be the best way?
>> I thought I could use prior art from eg devel/pkg-config vs
>> devel/pkgconf, but it does not involve files like here. Is
>> there another place I could get inspiration from?
> I have not really thought about this case, but we often have an
> mk/ file that uses a pkgsrc-settable variable to switch between
> implementations (including native as a choice, when that makes sense).
> You might look at the krb5 one.

Yes, I have been discussing this with leot too, and we came to the same
conclusion. I will suggest a patch using this approach in a moment.

It should be easier and faster this way than by turning devel/libusb
into a meta-package for instance (which was my initial idea, like done
for print/ghostscript).

> I am guessing that it's reasonable to let the user choose whether
> programs that want libusb(0) get libusb or the compat, except that
> perhaps some packages are hardwired to only one.

That is my intention. I do not know about any package hardwired to
devel/libusb, but I am about to find out :)

> Of course, it doesn't really matter where the mk file is, and sometimes
> we have them in a package directory.



Home | Main Index | Thread Index | Old Index