From c68fa012913251443292f6381e74d0a254f4834d Mon Sep 17 00:00:00 2001 From: Thomas1664 <46387399+Thomas1664@users.noreply.github.com> Date: Tue, 27 Dec 2022 09:41:27 +0100 Subject: [PATCH] [tiny-process-library] Disable examples (#28568) * [tiny-process-library] Disable examples * version * Fix patch * version * Fix deprecated function * version * Disable dynamic builds on Windows * version --- .../disable-examples.patch | 14 ++++++++++ ports/tiny-process-library/portfile.cmake | 26 ++++++++++--------- ports/tiny-process-library/vcpkg.json | 18 ++++++++++--- versions/baseline.json | 2 +- versions/t-/tiny-process-library.json | 5 ++++ 5 files changed, 49 insertions(+), 16 deletions(-) create mode 100644 ports/tiny-process-library/disable-examples.patch diff --git a/ports/tiny-process-library/disable-examples.patch b/ports/tiny-process-library/disable-examples.patch new file mode 100644 index 0000000000..698ab804bb --- /dev/null +++ b/ports/tiny-process-library/disable-examples.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8662ba3..040e642 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -42,9 +42,6 @@ if(CMAKE_SOURCE_DIR STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") + add_compile_options(-std=c++11 -Wall -Wextra) + endif() + +- add_executable(examples examples.cpp) +- target_link_libraries(examples tiny-process-library) +- + install(TARGETS tiny-process-library + EXPORT ${PROJECT_NAME}-config + ARCHIVE DESTINATION lib diff --git a/ports/tiny-process-library/portfile.cmake b/ports/tiny-process-library/portfile.cmake index 20af73f6a0..be906205d3 100644 --- a/ports/tiny-process-library/portfile.cmake +++ b/ports/tiny-process-library/portfile.cmake @@ -1,3 +1,7 @@ +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + vcpkg_from_gitlab( GITLAB_URL https://gitlab.com OUT_SOURCE_PATH SOURCE_PATH @@ -5,29 +9,27 @@ vcpkg_from_gitlab( REF v2.0.4 SHA512 bbdd268361159b7c64cb60f29afa780ee5e57fa696f0683a55cb9824ec5985c8229a9a8217d2b9ecdd194b9a3acbbd75a1a821392361fbc85b1f6841f40c95db HEAD_REF master + PATCHES + disable-examples.patch ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS -DBUILD_TESTING=OFF - -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON ) -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets( - CONFIG_PATH lib/cmake/${PORT} - TARGET_PATH share/${PORT} +vcpkg_cmake_config_fixup( + CONFIG_PATH lib/cmake/tiny-process-library ) file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/debug/include - ${CURRENT_PACKAGES_DIR}/debug/share + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" ) -# Handle copyright -configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/ports/tiny-process-library/vcpkg.json b/ports/tiny-process-library/vcpkg.json index e6daaf3228..03f4c68580 100644 --- a/ports/tiny-process-library/vcpkg.json +++ b/ports/tiny-process-library/vcpkg.json @@ -1,6 +1,18 @@ { "name": "tiny-process-library", - "version-string": "2.0.4", - "port-version": 1, - "description": "A small platform independent library to create and stop new processes in C++" + "version": "2.0.4", + "port-version": 2, + "description": "A small platform independent library to create and stop new processes in C++", + "homepage": "https://gitlab.com/eidheim/tiny-process-library/", + "license": "MIT", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] } diff --git a/versions/baseline.json b/versions/baseline.json index eba3d4bce8..1ae21ffc39 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -7482,7 +7482,7 @@ }, "tiny-process-library": { "baseline": "2.0.4", - "port-version": 1 + "port-version": 2 }, "tiny-regex-c": { "baseline": "2019-07-31", diff --git a/versions/t-/tiny-process-library.json b/versions/t-/tiny-process-library.json index 76a7460549..9b0533d4c9 100644 --- a/versions/t-/tiny-process-library.json +++ b/versions/t-/tiny-process-library.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "f4e81e43ca82620d6c153b707cdd6626ae1705d2", + "version": "2.0.4", + "port-version": 2 + }, { "git-tree": "bdb3c92735776a800243c7cc38884357f3c743a5", "version-string": "2.0.4",