From patchwork Wed Jan 3 08:52:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Heylen X-Patchwork-Id: 854903 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ZBp+IHky"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zBPpJ0jv7z9s81 for ; Wed, 3 Jan 2018 19:52:55 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4EDA188366; Wed, 3 Jan 2018 08:52:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id okxAdskIXGiH; Wed, 3 Jan 2018 08:52:49 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 416EA88350; Wed, 3 Jan 2018 08:52:49 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id EA38F1C0EFA for ; Wed, 3 Jan 2018 08:52:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id E753A896D8 for ; Wed, 3 Jan 2018 08:52:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id n2sWLjFZC1ol for ; Wed, 3 Jan 2018 08:52:46 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by hemlock.osuosl.org (Postfix) with ESMTPS id 72414896BE for ; Wed, 3 Jan 2018 08:52:46 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id 9so1346537wme.4 for ; Wed, 03 Jan 2018 00:52:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fj5J2EAaqEy2LkhJZAuLHN7aVAUMrLAfnTEhtYhVwzg=; b=ZBp+IHkyrCeqPHClvBk4Y6j5F5FEGKRnOuEVSg3wwHwZ2AN7Vt5h3HGOuGPDOgYCSl tvPbB88yzqO2dzUfhx3TMadN3M29sX4QCvs07B9bTFzM32f0WGWU6rNDDaBVqfuWmtqW jY4wy8tS79MaaR0CHF9QlKwVruNSWPmroS+uUCcc89tviUaKYi2uphjy9xApbZZhekSu pomX+szaEg1WtOXHVKQF+EHhUCCp6ykZ37LAQC6zLYoAqEBTVPy63aBe6lElNHE1/0Ug Yumkh6ledmyXu887r4agGh+HJuZexrelpet0X/2BYTZ0mhmpthatdI89+rVBNkfel0ej g3WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=fj5J2EAaqEy2LkhJZAuLHN7aVAUMrLAfnTEhtYhVwzg=; b=D56FmV8FdeZ0aN0xu6zJfkUBgFQ4qMptDsgYnQczJM8m7fTx5NO8y5LBXlAt4lmcr1 mWUwjVxaBJAvLVYXQlra7o9GR2SjwaUC4ykPQ9S/2HaWLYaEWJjpPh9mSaIZuj2Vr4BR dEe9/q96q23KlceBdZnlUwkv1llEXh9wrnzYfryBnM/hBt3ev8hbfK1APguCPP2+Fe2B RHDUJhVr+nchCm88FcxuUhhZu5Ddb/aJmUpG5/oJahSK946p2+DbMAssCJUPnAwS/gJF gdDs2UepvRZI59ujOUkbLLrc0qHtY+CLMtsz0RuGnOAPp3yLEuAQK4Hr6Rc5SWIhC+0t IQ8g== X-Gm-Message-State: AKGB3mLolel9T9vTC8NvKRlSv85d1PuA3glXLDBdz4ITL9XOvurcqOOY XHYijWPDmM97+aS6neHLXJNCOctT X-Google-Smtp-Source: ACJfBosyvq1IvJKCdT/UCCMDp2TinxS55JgQJoFigIK6nNOiBoSIN4uYcCQOzNL/zdrMMQ2+rsQdhw== X-Received: by 10.80.214.74 with SMTP id c10mr1612048edj.271.1514969564517; Wed, 03 Jan 2018 00:52:44 -0800 (PST) Received: from localhost.localdomain ([91.177.37.192]) by smtp.gmail.com with ESMTPSA id o42sm469032edo.91.2018.01.03.00.52.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 03 Jan 2018 00:52:44 -0800 (PST) From: Jan Heylen To: buildroot@buildroot.org Date: Wed, 3 Jan 2018 09:52:23 +0100 Message-Id: <1514969543-20452-2-git-send-email-heyleke@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1514969543-20452-1-git-send-email-heyleke@gmail.com> References: <1514014802-23736-2-git-send-email-heyleke@gmail.com> <1514969543-20452-1-git-send-email-heyleke@gmail.com> Subject: [Buildroot] [PATCH v3 1/1] opentracing-cpp: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jan Heylen MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Jan Heylen Signed-off-by: Jan Heylen --- test-pkg passes 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 | 22 +++++++ 6 files changed, 119 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 diff --git a/DEVELOPERS b/DEVELOPERS index fe989c0..f17fcdd 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -790,6 +790,9 @@ F: package/pangomm/ F: package/rpm/ F: package/yad/ +N: Jan Heylen +F: package/opentracing-cpp/ + N: Jan Kraval F: board/orangepi/orangepi-lite F: configs/orangepi_lite_defconfig diff --git a/package/Config.in b/package/Config.in index bd39a37..1150a3f 100644 --- a/package/Config.in +++ b/package/Config.in @@ -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 diff --git a/package/opentracing-cpp/0001-CMake-make-shared-static-target-a-configurable-optio.patch b/package/opentracing-cpp/0001-CMake-make-shared-static-target-a-configurable-optio.patch new file mode 100644 index 0000000..90a945b --- /dev/null +++ b/package/opentracing-cpp/0001-CMake-make-shared-static-target-a-configurable-optio.patch @@ -0,0 +1,74 @@ +From 9462847f23a25524fdc2112cbc8de3f2c02a1669 Mon Sep 17 00:00:00 2001 +From: Jan Heylen +Date: Fri, 22 Dec 2017 22:04:29 +0100 +Subject: [PATCH] CMake: make shared/static target a configurable option + +Signed-off-by: Jan Heylen +--- + CMakeLists.txt | 40 ++++++++++++++++++++++++++++------------ + 1 file changed, 28 insertions(+), 12 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index aadf2f9..d03bd00 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -70,18 +70,36 @@ endif() + include_directories(include) + include_directories(SYSTEM 3rd_party/include) + ++option(BUILD_SHARED_LIBS "Build as a shared library" ON) ++option(BUILD_STATIC_LIBS "Build as a static library" ON) ++ ++if (NOT BUILD_SHARED_LIBS AND NOT BUILD_STATIC_LIBS) ++ message(FATAL_ERROR "One or both of BUILD_SHARED_LIBS or BUILD_STATIC_LIBS must be set to ON to build") ++endif() ++ + set(SRCS src/propagation.cpp src/noop.cpp src/tracer.cpp) +-add_library(opentracing SHARED ${SRCS}) +-target_include_directories(opentracing INTERFACE "$") +-set_target_properties(opentracing PROPERTIES VERSION ${OPENTRACING_VERSION_STRING} ++ ++if (BUILD_SHARED_LIBS) ++ add_library(opentracing SHARED ${SRCS}) ++ target_include_directories(opentracing INTERFACE "$") ++ set_target_properties(opentracing PROPERTIES VERSION ${OPENTRACING_VERSION_STRING} + SOVERSION ${OPENTRACING_VERSION_MAJOR}) +-add_library(opentracing-static STATIC ${SRCS}) +-set_target_properties(opentracing-static PROPERTIES OUTPUT_NAME opentracing) +-target_include_directories(opentracing-static INTERFACE "$") +-if (CLANG_TIDY_EXE) +- set_target_properties(opentracing PROPERTIES ++ install(TARGETS opentracing EXPORT OpenTracingTargets ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib) ++ if (CLANG_TIDY_EXE) ++ set_target_properties(opentracing PROPERTIES + CXX_CLANG_TIDY "${DO_CLANG_TIDY}") +-endif() ++ endif() ++endif(BUILD_SHARED_LIBS) ++ ++if (BUILD_STATIC_LIBS) ++ add_library(opentracing-static STATIC ${SRCS}) ++ set_target_properties(opentracing-static PROPERTIES OUTPUT_NAME opentracing) ++ target_include_directories(opentracing-static INTERFACE "$") ++ install(TARGETS opentracing-static EXPORT OpenTracingTargets ++ ARCHIVE DESTINATION lib) ++endif(BUILD_STATIC_LIBS) + + + install(DIRECTORY 3rd_party/include/opentracing DESTINATION include +@@ -89,9 +107,7 @@ install(DIRECTORY 3rd_party/include/opentracing DESTINATION include + PATTERN "*.h") + install(DIRECTORY include/opentracing DESTINATION include + FILES_MATCHING PATTERN "*.h") +-install(TARGETS opentracing opentracing-static EXPORT OpenTracingTargets +- LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib) ++ + + # ============================================================================== + # Package configuration setup +-- +2.7.4 + diff --git a/package/opentracing-cpp/Config.in b/package/opentracing-cpp/Config.in new file mode 100644 index 0000000..f13d21b --- /dev/null +++ b/package/opentracing-cpp/Config.in @@ -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 diff --git a/package/opentracing-cpp/opentracing-cpp.hash b/package/opentracing-cpp/opentracing-cpp.hash new file mode 100644 index 0000000..d25dbaf --- /dev/null +++ b/package/opentracing-cpp/opentracing-cpp.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 c77041cb2f147ac81b2b0702abfced5565a9cebc318d045c060a4c3e074009ee opentracing-cpp-v1.2.0.tar.gz +sha256 b80bffcfee825a69645f7ca97ddba48714031ea5c845198d184714d5490798b6 COPYING diff --git a/package/opentracing-cpp/opentracing-cpp.mk b/package/opentracing-cpp/opentracing-cpp.mk new file mode 100644 index 0000000..9b2d473 --- /dev/null +++ b/package/opentracing-cpp/opentracing-cpp.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# 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 + +ifeq ($(BR2_STATIC_LIBS),y) +OPENTRACING_CPP_CONF_OPTS += -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON +else ifeq ($(BR2_SHARED_STATIC_LIBS),y) +OPENTRACING_CPP_CONF_OPTS += -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON +else ifeq ($(BR2_SHARED_LIBS),y) +OPENTRACING_CPP_CONF_OPTS += -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF +endif + +$(eval $(cmake-package))