libnfc: make example build optional
PATCH v3 1/1 libnfc: make example build optional
create mode 100644 package/libnfc/libnfc-build-systems-make-example-build-optional.patch
package/libnfc/Config.in +5 -0
@@ -6,3 +6,8 @@ config BR2_PACKAGE_LIBNFC Public platform independent Near Field Communication (NFC) library. http://www.libnfc.org/ + +config BR2_PACKAGE_LIBNFC_EXAMPLES + bool "build libnfc examples" + depends on BR2_PACKAGE_LIBNFC + select BR2_PACKAGE_READLINE
package/libnfc/libnfc-build-systems-make-example-build-optional.patch new file +121 -0
121 lines not on this page · raw message
package/libnfc/libnfc.mk +7 -0
@@ -13,4 +13,11 @@ LIBNFC_DEPENDENCIES = host-pkg-config libusb libusb-compat # N.B. The acr122 driver requires pcsc-lite. LIBNFC_CONF_OPT = --with-drivers=arygon,pn53x_usb +ifeq ($(BR2_PACKAGE_LIBNFC_EXAMPLES),y) +LIBNFC_CONF_OPT += --enable-example +LIBNFC_DEPENDENCIES += readline +else +LIBNFC_CONF_OPT += --disable-example +endif + $(eval $(call AUTOTARGETS))
Signature · 1 line
1.7.10.4
PATCH v3 1/1 libnfc: make example build optional
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Samuel" == Samuel Martin <[email protected]> writes:
Samuel> Signed-off-by: Samuel Martin <[email protected]>
Committed with minor changes, see below.
Samuel> create mode 100644 package/libnfc/libnfc-build-systems-make-example-build-optional.patch
You somehow are missing the --- delimiter, so this line becomes part of the commit message.
Samuel> +++ b/package/libnfc/libnfc-build-systems-make-example-build-optional.patch
Samuel> @@ -0,0 +1,121 @@
Samuel> +From 40a4871b171293d98acb40cf54be9ee9b78a3244 Mon Sep 17 00:00:00 2001
Samuel> +From: Samuel Martin <[email protected]>
Samuel> +Date: Wed, 6 Jun 2012 00:49:25 +0200
Samuel> +Subject: [PATCH 1/1] build systems: make example build optional
Samuel> +
Samuel> +This patch makes example build optional for both cmake and autotools build
Samuel> +systems.
Samuel> +
Samuel> +In order to keep the former behavior, example build is enabled by default.
Samuel> +
Samuel> +Signed-off-by: Samuel Martin <[email protected]>
Samuel> +
Samuel> +diff --git a/configure.ac b/configure.ac
Samuel> +index 0a222a8..6988164 100644
Samuel> +--- a/configure.ac
Samuel> ++++ b/configure.ac
Samuel> +@@ -71,11 +71,11 @@ AC_SUBST(LIBNFC_CFLAGS)
Samuel> +
Samuel> + # Debug support (default:no)
Samuel> + AC_ARG_ENABLE([debug],AS_HELP_STRING([--enable-debug],[Enable debug output]),[enable_debug=$enableval],[enable_debug="no"]) Samuel> +-
Samuel> ++
Unneeded whitespace changes.
Samuel> + AC_MSG_CHECKING(for debug flag)
Samuel> + AC_MSG_RESULT($enable_debug)
Samuel> + AM_CONDITIONAL([WITH_DEBUG], [test "$enable_debug" != "no"]) Samuel> +-
Samuel> ++
Here as well.
Samuel> + if test x"$enable_debug" = "xyes"
Samuel> + then
Samuel> + CFLAGS="$CFLAGS -g -DDEBUG -O0 -ggdb"
Samuel> +@@ -86,7 +86,7 @@ LIBNFC_ARG_WITH_DRIVERS
Samuel> +
Samuel> + # Serial autoprobing support (default:no)
Samuel> + AC_ARG_ENABLE([serial-autoprobe],AS_HELP_STRING([--enable-serial-autoprobe],[Allow serial ports to be probed (can seriously disturb connected serial devices)]),[enable_serial_autoprobe=$enableval],[enable_serial_autoprobe="no"]) Samuel> +-
Samuel> ++
And here.
Samuel> diff --git a/package/libnfc/libnfc.mk b/package/libnfc/libnfc.mk Samuel> index f1028b1..687aee8 100644
Samuel> --- a/package/libnfc/libnfc.mk
Samuel> +++ b/package/libnfc/libnfc.mk
Samuel> @@ -13,4 +13,11 @@ LIBNFC_DEPENDENCIES = host-pkg-config libusb libusb-compat Samuel> # N.B. The acr122 driver requires pcsc-lite.
Samuel> LIBNFC_CONF_OPT = --with-drivers=arygon,pn53x_usb
Samuel> +ifeq ($(BR2_PACKAGE_LIBNFC_EXAMPLES),y)
Samuel> +LIBNFC_CONF_OPT += --enable-example
Samuel> +LIBNFC_DEPENDENCIES += readline
Samuel> +else
Samuel> +LIBNFC_CONF_OPT += --disable-example
Samuel> +endif
Samuel> +
You're modifying configure.ac / Makefile.am so we need LIBNFC_AUTORECONF = YES
Signature · 1 line
Bye, Peter Korsgaard