Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] msgpack: new option install libs
@ 2017-09-18 20:56 Bradford Barr
  2017-09-18 21:03 ` Bradford Barr
  2018-03-31 22:36 ` Arnout Vandecappelle
  0 siblings, 2 replies; 5+ messages in thread
From: Bradford Barr @ 2017-09-18 20:56 UTC (permalink / raw)
  To: buildroot

From: bradford barr <bradford@density.io>

New option to install libs. MessagePack is implemented both as a C++ header and
a C runtime library. If all applications linking to msgpack use the C++ header
library there's no need to install the C library. This option allows a user to
prevent installing unused libraries.

Signed-off-by: bradford barr <bradford@density.io>
---
 package/msgpack/Config.in  | 14 ++++++++++++++
 package/msgpack/msgpack.mk |  4 ++++
 2 files changed, 18 insertions(+)

diff --git a/package/msgpack/Config.in b/package/msgpack/Config.in
index b8e8213..f32af9e 100644
--- a/package/msgpack/Config.in
+++ b/package/msgpack/Config.in
@@ -13,3 +13,17 @@ config BR2_PACKAGE_MSGPACK
 comment "msgpack needs a toolchain w/ C++"
 	depends on !BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_HAS_SYNC_4
+
+if BR2_PACKAGE_MSGPACK
+
+config BR2_PACKAGE_MSGPACK_INSTALL_LIB
+	bool "install lib"
+	default y
+	help
+	  MessagePack ships both a C library and a C++ header library.
+	  Selecting this option will install the C library in the target
+	  directory.
+
+	  https://github.com/msgpack/msgpack-c#c-header-only-library
+
+endif
diff --git a/package/msgpack/msgpack.mk b/package/msgpack/msgpack.mk
index 66dbc8d..4133e0b 100644
--- a/package/msgpack/msgpack.mk
+++ b/package/msgpack/msgpack.mk
@@ -10,6 +10,10 @@ MSGPACK_LICENSE = BSL-1.0
 MSGPACK_LICENSE_FILES = COPYING
 MSGPACK_INSTALL_STAGING = YES
 
+ifneq ($(BR2_PACKAGE_MSGPACK_INSTALL_LIB),y)
+MSGPACK_INSTALL_TARGET = NO
+endif
+
 define MSGPACK_INSTALL_TARGET_CMDS
 	cp -a $(@D)/libmsgpackc.so* $(TARGET_DIR)/usr/lib
 endef
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-03-31 22:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-18 20:56 [Buildroot] [PATCH 1/1] msgpack: new option install libs Bradford Barr
2017-09-18 21:03 ` Bradford Barr
2017-09-19 21:19   ` Arnout Vandecappelle
2017-09-20  0:47     ` Bradford Barr
2018-03-31 22:36 ` Arnout Vandecappelle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox