mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-22 18:47:09 +01:00
[jaeger-client-cpp] New port (#9126)
* Initial commit * Add missing files * Add patchfile * UWP Builds not supported * Fix Linux version * Removed 'include(vcpkg_common_functions)' as it is no longer needed * Implemented proposed changes to portfile.cmake * Further changes to portfile.cmake * Added indicator that a failure is expected for arm64 * Added the expected failure on arm64 to ci.baseline.txt * Combined two separate vcpkg_fail_port_install() calls * Use upstream version compatible with opentracing 1.6 * Added 'Supports:' entry in CONTROL to signal missing arm64 support and removed vcpkg_fail_port_install() for UWP in portfile.cmake Co-authored-by: xgcssch <soenke.schau@alte-leipziger.de>
This commit is contained in:
parent
663a898bca
commit
fa42722d56
6
ports/jaeger-client-cpp/CONTROL
Normal file
6
ports/jaeger-client-cpp/CONTROL
Normal file
@ -0,0 +1,6 @@
|
||||
Source: jaeger-client-cpp
|
||||
Version: 0.5.1
|
||||
Build-Depends: nlohmann-json,thrift,yaml-cpp,opentracing
|
||||
Homepage: https://github.com/jaegertracing/jaeger-client-cpp
|
||||
Description: C++ OpenTracing binding for Jaeger https://jaegertracing.io/
|
||||
Supports: !arm64
|
32
ports/jaeger-client-cpp/fix-CMakeLists.patch
Normal file
32
ports/jaeger-client-cpp/fix-CMakeLists.patch
Normal file
@ -0,0 +1,32 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 5893f31..c8864fd 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -59,7 +59,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND
|
||||
endif()
|
||||
|
||||
hunter_add_package(thrift)
|
||||
-find_package(thrift ${hunter_config} REQUIRED)
|
||||
+find_package(Thrift CONFIG REQUIRED)
|
||||
if(HUNTER_ENABLED)
|
||||
list(APPEND LIBS thrift::thrift_static)
|
||||
else()
|
||||
@@ -268,6 +268,9 @@ if(JAEGERTRACING_PLUGIN)
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/export.map
|
||||
"{ global: OpenTracingMakeTracerFactory; local: *; };")
|
||||
add_library(jaegertracing_plugin MODULE ${SRC})
|
||||
+ if (WIN32)
|
||||
+ target_link_libraries(jaegertracing_plugin PUBLIC Iphlpapi Ws2_32)
|
||||
+ endif()
|
||||
add_lib_deps(jaegertracing_plugin)
|
||||
target_link_libraries(jaegertracing_plugin PUBLIC
|
||||
-static-libgcc
|
||||
@@ -410,7 +413,7 @@ include(GNUInstallDirs)
|
||||
# * <prefix>/lib*/cmake/<PROJECT-NAME>
|
||||
# * <prefix>/lib*/
|
||||
# * <prefix>/include/
|
||||
-set(config_install_dir "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
|
||||
+set(config_install_dir "${CMAKE_INSTALL_DATAROOTDIR}/jaeger-client-cpp")
|
||||
|
||||
set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated")
|
||||
|
68
ports/jaeger-client-cpp/portfile.cmake
Normal file
68
ports/jaeger-client-cpp/portfile.cmake
Normal file
@ -0,0 +1,68 @@
|
||||
vcpkg_fail_port_install(ON_ARCH "arm64")
|
||||
|
||||
# Get jaeger-idl from github
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO jaegertracing/jaeger-idl
|
||||
REF 378b83a64a4a822a4e7d2936bac5d787780555ad
|
||||
SHA512 eceea3dc806600bea8a05b597e26035e97950db227bbefc582d8f20ad549e0be42ebfad92ef3927ebc4892233bac9bcf85a96a25c17ec71fbca0b1b1755f556f
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
# Create target directory for proxy/stub generation
|
||||
file(MAKE_DIRECTORY ${SOURCE_PATH}/data)
|
||||
# List of input files
|
||||
set(THRIFT_SOURCE_FILES agent.thrift jaeger.thrift sampling.thrift zipkincore.thrift crossdock/tracetest.thrift baggage.thrift dependency.thrift aggregation_validator.thrift)
|
||||
|
||||
# Generate proxy/stubs for the input files
|
||||
foreach(THRIFT_SOURCE_FILE IN LISTS THRIFT_SOURCE_FILES)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/installed/${TARGET_TRIPLET}/tools/thrift/thrift --gen cpp:no_skeleton -o "${SOURCE_PATH}/data" ${THRIFT_SOURCE_FILE}
|
||||
WORKING_DIRECTORY ${SOURCE_PATH}/thrift
|
||||
LOGNAME jaeger-idl-${TARGET_TRIPLET}
|
||||
)
|
||||
endforeach()
|
||||
|
||||
# Save generated proxy/stub target directory
|
||||
set(IDL_SOURCE_DIR "${SOURCE_PATH}/data/gen-cpp")
|
||||
|
||||
# Get jaeger-client-cpp from github
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO jaegertracing/jaeger-client-cpp
|
||||
REF 47fbf19aae2e48d59dd8335b6f2a1e1a99abba7f
|
||||
SHA512 a07e4d3e585c0f3e99aff6a662229f6beed8aef80fc6f7188629da38421bc49ab9effea479398e0d94e0a127bd931054ab332b38b73c2191bf75d4adfe5f6928
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
"fix-CMakeLists.patch"
|
||||
)
|
||||
|
||||
# Do not use hunter, not testtools and build opentracing plugin
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DHUNTER_ENABLED=0
|
||||
-DBUILD_TESTING=0
|
||||
-DJAEGERTRACING_PLUGIN=0
|
||||
-DJAEGERTRACING_BUILD_EXAMPLES=0
|
||||
)
|
||||
|
||||
# Copy generated files over to jaeger-client-cpp
|
||||
file(GLOB IDL_SOURCE_FILES LIST_DIRECTORIES false ${IDL_SOURCE_DIR}/*)
|
||||
file(COPY ${IDL_SOURCE_FILES} DESTINATION ${SOURCE_PATH}/src/jaegertracing/thrift-gen)
|
||||
|
||||
# Generate Jaeger client
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_fixup_cmake_targets()
|
||||
|
||||
# Cleanup unused Debug files
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
|
||||
# Cleanup
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/jaegertracing/testutils)
|
@ -668,6 +668,7 @@ itk:x86-windows=fail
|
||||
ixwebsocket:x64-linux=ignore
|
||||
jack2:arm-uwp=fail
|
||||
jack2:x64-uwp=fail
|
||||
jaeger-client-cpp:arm64-windows=fail
|
||||
jbig2dec:arm-uwp=fail
|
||||
jbig2dec:x64-uwp=fail
|
||||
jemalloc:arm64-windows=fail
|
||||
|
Loading…
x
Reference in New Issue
Block a user