pkgsrc/comms/libticables2/options.mk
khorben b69741eca1 Import global switch for libusb's implementation [2/2]
This switch is meant to be used by packages requiring an implementation of the
former libusb (as in devel/libusb). The original implementation can be
chosen by setting LIBUSB_TYPE to "native".

The alternative implementation libusb-compat (as in devel/libusb-compat) wraps
libusb1 (in devel/libusb1). This implementation can be chosen by setting
LIBUSB_TYPE to "compat". On NetBSD, it has the advantage of not requiring root
privileges to locate and use USB devices without a kernel driver.

This second part switches packages using libusb to this framework. It does not
change compilation options or dependencies at this point.

Compile-tested on most packages affected and available on NetBSD/amd64.
2018-02-10 13:53:46 +00:00

24 lines
574 B
Makefile

# $NetBSD: options.mk,v 1.2 2018/02/10 13:53:46 khorben Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.libticables2
PKG_SUPPORTED_OPTIONS= libusb libusb1 nls
PKG_SUGGESTED_OPTIONS+= libusb nls
PLIST_VARS+= nls
.include "../../mk/bsd.options.mk"
.if !empty(PKG_OPTIONS:Mlibusb)
BUILDLINK_ABI_DEPENDS.libusb+= libusb>=0.1.12
.include "../../mk/libusb.buildlink3.mk"
.endif
.if !empty(PKG_OPTIONS:Mlibusb1)
.include "../../devel/libusb1/buildlink3.mk"
CONFIGURE_ARGS+= --enable-libusb10
.endif
.if !empty(PKG_OPTIONS:Mnls)
PLIST.nls= yes
.else
CONFIGURE_ARGS+= --disable-nls
.endif