Opentracing-cpp: new package
v5 cover Opentracing-cpp: new package
From: Jan Heylen <[email protected]>
Hi,
V5 of "this adds opentracing-cpp package as a logging library package."
Removed generalisation of pkg-cmake stuff related to shared/static stuff again and added note in pkg-cmake.mk why.
br,
Jan
Jan Heylen (3):
rabbitmq-c: BUILD_SHARED_LIBS is handled in pkg-cmake.mk
pkg-cmake: add note on BUILD_STATIC_LIBS
opentracing-cpp: new package
DEVELOPERS | 3 + package/Config.in | 1 + ...shared-static-target-a-configurable-optio.patch | 74 ++++++++++++++++++++++ package/opentracing-cpp/Config.in | 16 +++++ package/opentracing-cpp/opentracing-cpp.hash | 3 + package/opentracing-cpp/opentracing-cpp.mk | 25 ++++++++ package/pkg-cmake.mk | 9 +++ package/rabbitmq-c/rabbitmq-c.mk | 7 +- 8 files changed, 135 insertions(+), 3 deletions(-) create mode 100644 package/opentracing-cpp/0001-CMake-make-shared-static-target-a-configurable-optio.patch create mode 100644 package/opentracing-cpp/Config.in create mode 100644 package/opentracing-cpp/opentracing-cpp.hash create mode 100644 package/opentracing-cpp/opentracing-cpp.mk
Signature · 1 line
2.7.4
PATCH v5 1/3 rabbitmq-c: BUILD_SHARED_LIBS is handled in pkg-cmake.mk
From: Jan Heylen <[email protected]>
--- package/rabbitmq-c/rabbitmq-c.mk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
package/rabbitmq-c/rabbitmq-c.mk +4 -3
@@ -13,12 +13,13 @@ RABBITMQ_C_CONF_OPTS = \ -DBUILD_API_DOCS=OFF \ -DBUILD_TOOLS_DOCS=OFF +# BUILD_SHARED_LIBS is handled in pkg-cmake.mk as it is a generic cmake variable ifeq ($(BR2_STATIC_LIBS),y) -RABBITMQ_C_CONF_OPTS += -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON +RABBITMQ_C_CONF_OPTS += -DBUILD_STATIC_LIBS=ON else ifeq ($(BR2_SHARED_STATIC_LIBS),y) -RABBITMQ_C_CONF_OPTS += -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON +RABBITMQ_C_CONF_OPTS += -DBUILD_STATIC_LIBS=ON else ifeq ($(BR2_SHARED_LIBS),y) -RABBITMQ_C_CONF_OPTS += -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF +RABBITMQ_C_CONF_OPTS += -DBUILD_STATIC_LIBS=OFF endif # CMake OpenSSL detection is buggy, and doesn't properly use
Signature · 1 line
2.7.4
PATCH v5 2/3 pkg-cmake: add note on BUILD_STATIC_LIBS
In reply to Jan HeylenFrom: Jan Heylen <[email protected]>
as BUILD_STATIC_LIBS is not a standard cmake variable (while BUILD_SHARED_LIBS is) we shouldn't add it in pkg-cmake.mk, although for some packages that would make sense. Therefore, add a note so we don't forget about this abnormality.
see: https://cmake.org/cmake/help/v3.8/manual/cmake-variables.7.html#variables-that-change-behavior
--- package/pkg-cmake.mk | 9 +++++++++ 1 file changed, 9 insertions(+)
package/pkg-cmake.mk +9 -0
@@ -80,6 +80,15 @@ ifndef $(2)_CONFIGURE_CMDS ifeq ($(4),target) # Configure package for target +# +# Note: +# BUILD_SHARED_LIBS is a cmake internal variable, +# BUILD_STATIC_LIBS is not standard in any way, which means some +# projects may choose another name for a similar option and there is not +# much we can do about this. +# see: https://cmake.org/cmake/help/v3.8/manual/cmake-variables.7.html#variables-that-change-behavior +# +# So: we handle BUILD_SHARED_LIBS here, but BUILD_STATIC_LIBS must be handled per package define $(2)_CONFIGURE_CMDS (mkdir -p $$($$(PKG)_BUILDDIR) && \ cd $$($$(PKG)_BUILDDIR) && \
Signature · 1 line
2.7.4
PATCH v5 3/3 opentracing-cpp: new package
In reply to Jan HeylenFrom: Jan Heylen <[email protected]>
---
test-pkg passes
Changes v4 -> v5:
- added static switch again, as pck-cmake can only handle shared libs variable part
Changes v3 -> v4:
- remove shared/static switch in mk file as that is handled in pkg-cmake.mk now
Changes v2 -> v3:
- Fix another indendation typo
- Add DEVELOPERS file change
- Signoff opetracing-cpp patch
- run test-pkg and include various dependencies (toolchain bug & m68k cf)
- add comments in Config.in on the dependencies
Changes v1 -> v2:
- Fix indendation typo
- Add licence hash
- remove INTALL_TARGET=yes as that is default
--- DEVELOPERS | 3 + package/Config.in | 1 + ...shared-static-target-a-configurable-optio.patch | 74 ++++++++++++++++++++++ package/opentracing-cpp/Config.in | 16 +++++ package/opentracing-cpp/opentracing-cpp.hash | 3 + package/opentracing-cpp/opentracing-cpp.mk | 25 ++++++++ 6 files changed, 122 insertions(+) create mode 100644 package/opentracing-cpp/0001-CMake-make-shared-static-target-a-configurable-optio.patch create mode 100644 package/opentracing-cpp/Config.in create mode 100644 package/opentracing-cpp/opentracing-cpp.hash create mode 100644 package/opentracing-cpp/opentracing-cpp.mk
DEVELOPERS +3 -0
@@ -790,6 +790,9 @@ F: package/pangomm/ F: package/rpm/ F: package/yad/ +N: Jan Heylen <[email protected]> +F: package/opentracing-cpp/ + N: Jan Kraval <[email protected]> F: board/orangepi/orangepi-lite F: configs/orangepi_lite_defconfig
package/Config.in +1 -0
@@ -1288,6 +1288,7 @@ menu "Logging" source "package/log4cplus/Config.in" source "package/log4cpp/Config.in" source "package/log4cxx/Config.in" + source "package/opentracing-cpp/Config.in" source "package/zlog/Config.in" endmenu
package/opentracing-cpp/0001-CMake-make-shared-static-target-a-configurable-optio.patch new file +74 -0
74 lines not on this page · raw message
package/opentracing-cpp/Config.in new file +16 -0
@@ -0,0 +1,16 @@ +config BR2_PACKAGE_OPENTRACING_CPP + bool "opentracing-cpp" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 + depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # exception_ptr + depends on !BR2_m68k_cf # exception_ptr + help + OpenTracing API for C++ + + http://opentracing.io + +comment "opentracing-cpp needs a toolchain w/ C++11" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 + +comment "opentracing-cpp needs exception_ptr" + depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735 || BR2_m68k_cf
package/opentracing-cpp/opentracing-cpp.hash new file +3 -0
@@ -0,0 +1,3 @@ +# Locally calculated +sha256 c77041cb2f147ac81b2b0702abfced5565a9cebc318d045c060a4c3e074009ee opentracing-cpp-v1.2.0.tar.gz +sha256 b80bffcfee825a69645f7ca97ddba48714031ea5c845198d184714d5490798b6 COPYING
package/opentracing-cpp/opentracing-cpp.mk new file +25 -0
@@ -0,0 +1,25 @@ +################################################################################ +# +# opentracing-cpp +# +################################################################################ + +OPENTRACING_CPP_VERSION = v1.2.0 +OPENTRACING_CPP_SITE = $(call github,opentracing,opentracing-cpp,$(OPENTRACING_CPP_VERSION)) +OPENTRACING_CPP_LICENSE = MIT +OPENTRACING_CPP_LICENSE_FILES = COPYING + +OPENTRACING_CPP_INSTALL_STAGING = YES + +# BUILD_SHARED_LIBS is handled in pkg-cmake.mk as it is a generic cmake variable +# although BUILD_STATIC_LIBS=ON is default, make it explicit, +# cmake and static/shared libs is confusing enough already. +ifeq ($(BR2_STATIC_LIBS),y) +OPENTRACING_CPP_CONF_OPTS += -DBUILD_STATIC_LIBS=ON +else ifeq ($(BR2_SHARED_STATIC_LIBS),y) +OPENTRACING_CPP_CONF_OPTS += -DBUILD_STATIC_LIBS=ON +else ifeq ($(BR2_SHARED_LIBS),y) +OPENTRACING_CPP_CONF_OPTS += -DBUILD_STATIC_LIBS=OFF +endif + +$(eval $(cmake-package))
Signature · 1 line
2.7.4