[sdbus-cpp] New port (#33879)

This commit is contained in:
Russell Greene 2023-10-09 15:29:42 -07:00 committed by GitHub
parent 3174753371
commit a57f1ee551
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 96 additions and 0 deletions

14
ports/sdbus-cpp/pic.patch Normal file
View File

@ -0,0 +1,14 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7332b23..822a594 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -130,7 +130,7 @@ target_compile_definitions(sdbus-c++-objlib PRIVATE
target_include_directories(sdbus-c++-objlib PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>)
-if(DEFINED BUILD_SHARED_LIBS)
+if(BUILD_SHARED_LIBS)
- set_target_properties(sdbus-c++-objlib PROPERTIES POSITION_INDEPENDENT_CODE ${BUILD_SHARED_LIBS})
+ set_target_properties(sdbus-c++-objlib PROPERTIES POSITION_INDEPENDENT_CODE ON)
endif()
if(BUILD_LIBSYSTEMD)
add_dependencies(sdbus-c++-objlib LibsystemdBuildProject)

View File

@ -0,0 +1,38 @@
message(WARNING "You will need to install sytemd dependencies to build sdbus-cpp:\nsudo apt install libsystemd-dev\n")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Kistler-Group/sdbus-cpp
REF "v${VERSION}"
SHA512 8f4cb9ae88b1ec0db0bcc27e131fcb9ad8a8bc88e39721b3b73f63e057bae4cd36619894e25114ccddb1a8e6c21db2f80adcabb3263ff5d8b34b72af7563afe2
PATCHES
pic.patch # can be dropped once https://github.com/Kistler-Group/sdbus-cpp/pull/361 is merged+released
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
tool BUILD_CODE_GEN
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS ${FEATURE_OPTIONS}
-DBUILD_LIBSYSTEMD=OFF
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/sdbus-c++)
vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share"
"${CURRENT_PACKAGES_DIR}/debug/bin"
)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING" "${SOURCE_PATH}/COPYING-LGPL-Exception")
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
if ("tool" IN_LIST FEATURES)
vcpkg_copy_tools(TOOL_NAMES sdbus-c++-xml2cpp AUTO_CLEAN)
endif()

3
ports/sdbus-cpp/usage Normal file
View File

@ -0,0 +1,3 @@
sdbus-cpp provides CMake targets:
find_package(sdbus-c++ REQUIRED)
target_link_libraries(main PRIVATE SDBusCpp::sdbus-c++)

View File

@ -0,0 +1,28 @@
{
"name": "sdbus-cpp",
"version": "1.3.0",
"description": "High-level C++ D-Bus library for Linux designed to provide easy-to-use yet powerful API in modern C++",
"homepage": "https://github.com/Kistler-Group/sdbus-cpp",
"license": "LGPL-2.1",
"supports": "linux",
"dependencies": [
"dbus",
"libsystemd",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"features": {
"tool": {
"description": "build C++ codegen tool",
"dependencies": [
"expat"
]
}
}
}

View File

@ -7524,6 +7524,10 @@
"baseline": "2018-08-26-16e6f435",
"port-version": 3
},
"sdbus-cpp": {
"baseline": "1.3.0",
"port-version": 0
},
"sdformat10": {
"baseline": "10.0.0",
"port-version": 3

View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "cae6cd5686aeefb86b4b97cda6d258d80a9eb5b6",
"version": "1.3.0",
"port-version": 0
}
]
}