Pierre Pronchery <khorben%defora.org@localhost> writes: >> Import buildlink3.mk 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 buildlink3.mk 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/foo.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. 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. Of course, it doesn't really matter where the mk file is, and sometimes we have them in a package directory.
Attachment:
signature.asc
Description: PGP signature