From: Bradford Barr <bradford@density.io>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] msgpack: new option install libs
Date: Mon, 18 Sep 2017 16:56:04 -0400 [thread overview]
Message-ID: <20170918205604.26827-1-bradford@density.io> (raw)
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
next reply other threads:[~2017-09-18 20:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-18 20:56 Bradford Barr [this message]
2017-09-18 21:03 ` [Buildroot] [PATCH 1/1] msgpack: new option install libs Bradford Barr
2017-09-19 21:19 ` Arnout Vandecappelle
2017-09-20 0:47 ` Bradford Barr
2018-03-31 22:36 ` Arnout Vandecappelle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170918205604.26827-1-bradford@density.io \
--to=bradford@density.io \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox