diff --git a/ports/dacap-clip/fix-install-header-and-force-static-compilation.patch b/ports/dacap-clip/fix-install-header-and-force-static-compilation.patch new file mode 100644 index 00000000000000..6ea26d2fe2dd86 --- /dev/null +++ b/ports/dacap-clip/fix-install-header-and-force-static-compilation.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 79f7074..775b565 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -25,7 +25,7 @@ if(UNIX AND NOT APPLE) + option(CLIP_X11_WITH_PNG "Compile with libpng to support copy/paste image in png format" on) + endif() + +-add_library(clip clip.cpp) ++add_library(clip STATIC clip.cpp) + + if(CLIP_ENABLE_IMAGE) + target_sources(clip PRIVATE image.cpp) +@@ -109,6 +109,8 @@ endif() + if(CLIP_INSTALL) + include(GNUInstallDirs) + ++ target_include_directories(clip PUBLIC $) ++ + install( + FILES clip.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} diff --git a/ports/dacap-clip/portfile.cmake b/ports/dacap-clip/portfile.cmake new file mode 100644 index 00000000000000..88225349d11189 --- /dev/null +++ b/ports/dacap-clip/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dacap/clip + REF v1.10 + SHA512 a29531ef276650807233b635ecceaf408147e4e263268eaf8237d74c9a7641d28cda5c6d1eaad4dbe634e720a5969dd6cc82aaeffbc36e0c9598ded31e419ea6 + PATCHES + "fix-install-header-and-force-static-compilation.patch") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DCLIP_ENABLE_LIST_FORMATS=ON + -DCLIP_EXAMPLES=OFF + -DCLIP_TESTS=OFF + -DCLIP_X11_WITH_PNG=ON + MAYBE_UNUSED_VARIABLES + CLIP_X11_WITH_PNG # only an option when UNIX AND NOT APPLE +) +vcpkg_cmake_install() +vcpkg_copy_pdbs() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +vcpkg_cmake_config_fixup(PACKAGE_NAME clip CONFIG_PATH "lib/cmake/clip") +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt") diff --git a/ports/dacap-clip/vcpkg.json b/ports/dacap-clip/vcpkg.json new file mode 100644 index 00000000000000..97516a8911760b --- /dev/null +++ b/ports/dacap-clip/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "dacap-clip", + "version": "1.10.0", + "description": "Cross-platform C++ library to copy/paste clipboard content.", + "homepage": "https://github.com/dacap/clip", + "license": "MIT", + "supports": "!android & !uwp", + "dependencies": [ + "libpng", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 54a49d57869572..b4c4f2758b0fd0 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2288,6 +2288,10 @@ "baseline": "may2021", "port-version": 1 }, + "dacap-clip": { + "baseline": "1.10.0", + "port-version": 0 + }, "darknet": { "baseline": "2024-10-10", "port-version": 0 diff --git a/versions/d-/dacap-clip.json b/versions/d-/dacap-clip.json new file mode 100644 index 00000000000000..21569df5166d61 --- /dev/null +++ b/versions/d-/dacap-clip.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "6f7bfb92450f247a05aabd780ab123e48a19cc99", + "version": "1.10.0", + "port-version": 0 + } + ] +}