* [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
* [Buildroot] [PATCH 1/1] msgpack: new option install libs
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
2018-03-31 22:36 ` Arnout Vandecappelle
1 sibling, 1 reply; 5+ messages in thread
From: Bradford Barr @ 2017-09-18 21:03 UTC (permalink / raw)
To: buildroot
This depends on the version bump to msgpack. Probably should have
waited to submit it. Sorry.
B
On Mon, Sep 18, 2017 at 4:56 PM, Bradford Barr <bradford@density.io> wrote:
> 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 [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/1] msgpack: new option install libs
2017-09-18 21:03 ` Bradford Barr
@ 2017-09-19 21:19 ` Arnout Vandecappelle
2017-09-20 0:47 ` Bradford Barr
0 siblings, 1 reply; 5+ messages in thread
From: Arnout Vandecappelle @ 2017-09-19 21:19 UTC (permalink / raw)
To: buildroot
On 18-09-17 23:03, Bradford Barr wrote:
> This depends on the version bump to msgpack. Probably should have
> waited to submit it. Sorry.
Better yet, submit both as a series. For now it's OK though.
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/1] msgpack: new option install libs
2017-09-19 21:19 ` Arnout Vandecappelle
@ 2017-09-20 0:47 ` Bradford Barr
0 siblings, 0 replies; 5+ messages in thread
From: Bradford Barr @ 2017-09-20 0:47 UTC (permalink / raw)
To: buildroot
Will do next time. Sorry about that.
B
On Tue, Sep 19, 2017 at 5:19 PM Arnout Vandecappelle <arnout@mind.be> wrote:
>
>
> On 18-09-17 23:03, Bradford Barr wrote:
> > This depends on the version bump to msgpack. Probably should have
> > waited to submit it. Sorry.
>
> Better yet, submit both as a series. For now it's OK though.
>
> Regards,
> Arnout
>
> --
> Arnout Vandecappelle arnout at mind be
> Senior Embedded Software Architect +32-16-286500
> <+32%2016%2028%2065%2000>
> Essensium/Mind http://www.mind.be
> G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
> LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
> GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20170920/56148a3b/attachment.html>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/1] msgpack: new option install libs
2017-09-18 20:56 [Buildroot] [PATCH 1/1] msgpack: new option install libs Bradford Barr
2017-09-18 21:03 ` Bradford Barr
@ 2018-03-31 22:36 ` Arnout Vandecappelle
1 sibling, 0 replies; 5+ messages in thread
From: Arnout Vandecappelle @ 2018-03-31 22:36 UTC (permalink / raw)
To: buildroot
Hi Bradford,
On 18-09-17 22:56, Bradford Barr wrote:
> 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.
The version bump was applied long ago so this patch can be applied now.
However, in the meantime the build system has been changed into CMake. This will
now always install the shared library to staging, if I understand correctly. So
the solution of simply saying MSGPACK_INSTALL_TARGET = NO is no longer
sufficient: with the shared library and the C headers in staging, another
package may pick up these headers/library and try to link with it, which will
lead to a runtime failure.
Could you find a fix for that and resubmit?
Thanks,
Regards,
Arnout
>
> 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
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [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