[Buildroot] [git commit] package/libminiupnpc: drop dependencies

Arnout Vandecappelle (Essensium/Mind) arnout at mind.be
Sun Mar 27 14:53:12 UTC 2022


commit: https://git.buildroot.net/buildroot/commit/?id=ffcb5ded44e932ca6c7d03a8a33c051d94d47b2a
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

libminiupnpc can be statically built with or without binfmt flat since
version 1.7 and
https://github.com/miniupnp/miniupnp/commit/c183a72c46cae9e37ddf635318dfb0bdcd56ed9d

Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout at mind.be>
---
 package/libminiupnpc/Config.in       | 6 ------
 package/libminiupnpc/libminiupnpc.mk | 8 ++++++++
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/package/libminiupnpc/Config.in b/package/libminiupnpc/Config.in
index a3410a0225..51f4b43bbb 100644
--- a/package/libminiupnpc/Config.in
+++ b/package/libminiupnpc/Config.in
@@ -1,7 +1,5 @@
 config BR2_PACKAGE_LIBMINIUPNPC
 	bool "libminiupnpc"
-	depends on !BR2_BINFMT_FLAT
-	depends on !BR2_STATIC_LIBS
 	help
 	  The UPnP protocol is supported by most home adsl/cable routers
 	  and Microsoft Windows 2K/XP. The aim of the MiniUPnP project
@@ -14,7 +12,3 @@ config BR2_PACKAGE_LIBMINIUPNPC
 	  ANSI C.
 
 	  http://miniupnp.free.fr
-
-comment "libminiupnpc needs a toolchain w/ dynamic library"
-	depends on BR2_STATIC_LIBS
-	depends on !BR2_BINFMT_FLAT
diff --git a/package/libminiupnpc/libminiupnpc.mk b/package/libminiupnpc/libminiupnpc.mk
index 0633ccd234..52fe9849f2 100644
--- a/package/libminiupnpc/libminiupnpc.mk
+++ b/package/libminiupnpc/libminiupnpc.mk
@@ -18,4 +18,12 @@ LIBMINIUPNPC_CPE_ID_VERSION = $(LIBMINIUPNPC_VERSION_MAJOR)
 LIBMINIUPNPC_CPE_ID_UPDATE = $(LIBMINIUPNPC_VERSION_MINOR)
 LIBMINIUPNPC_CONF_OPTS = -DUPNPC_BUILD_SAMPLE=OFF -DUPNPC_BUILD_TESTS=OFF
 
+ifeq ($(BR2_STATIC_LIBS),y)
+LIBMINIUPNPC_CONF_OPTS += -DUPNPC_BUILD_SHARED=OFF -DUPNPC_BUILD_STATIC=ON
+else ifeq ($(BR2_SHARED_LIBS),y)
+LIBMINIUPNPC_CONF_OPTS += -DUPNPC_BUILD_SHARED=ON -DUPNPC_BUILD_STATIC=OFF
+else
+LIBMINIUPNPC_CONF_OPTS += -DUPNPC_BUILD_SHARED=ON -DUPNPC_BUILD_STATIC=ON
+endif
+
 $(eval $(cmake-package))



More information about the buildroot mailing list