diff --git a/ports/kf6threadweaver/001_fix_lnk2005_windows_static.patch b/ports/kf6threadweaver/001_fix_lnk2005_windows_static.patch new file mode 100644 index 00000000000000..3460695927c651 --- /dev/null +++ b/ports/kf6threadweaver/001_fix_lnk2005_windows_static.patch @@ -0,0 +1,10 @@ +diff --git a/examples/ThumbNailer/CMakeLists.txt b/examples/ThumbNailer/CMakeLists.txt +--- a/examples/ThumbNailer/CMakeLists.txt ++++ b/examples/ThumbNailer/CMakeLists.txt +@@ -20,3 +20,6 @@ + ${UI_FILES} + ) + target_link_libraries(ThreadWeaver_ThumbNailer KF6::ThreadWeaver Qt6::Test Qt6::Widgets) ++if(MSVC AND NOT BUILD_SHARED_LIBS) ++ target_link_options(ThreadWeaver_ThumbNailer PRIVATE /FORCE:MULTIPLE) ++endif() diff --git a/ports/kf6threadweaver/portfile.cmake b/ports/kf6threadweaver/portfile.cmake new file mode 100644 index 00000000000000..d600c21c94e77e --- /dev/null +++ b/ports/kf6threadweaver/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/threadweaver + REF "v${VERSION}" + SHA512 54c93f2100ee313f931e5f6546e9bc2be759a49ca9a53227c77e7bc3fb3bdf194514bbc38860a0b12cff6918f1208a565b4f668785d79a381362a38a2fc9dd01 + HEAD_REF master + PATCHES + 001_fix_lnk2005_windows_static.patch +) + +# Prevent KDEClangFormat from writing to source effectively blocking parallel configure +file(WRITE "${SOURCE_PATH}/.clang-format" "DisableFormat: true\nSortIncludes: false\n") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/KF6ThreadWeaver) +vcpkg_copy_pdbs() + + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(GLOB LICENSE_FILES "${SOURCE_PATH}/LICENSES/*") +vcpkg_install_copyright(FILE_LIST ${LICENSE_FILES}) diff --git a/ports/kf6threadweaver/vcpkg.json b/ports/kf6threadweaver/vcpkg.json new file mode 100644 index 00000000000000..6b3559b6f92e99 --- /dev/null +++ b/ports/kf6threadweaver/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "kf6threadweaver", + "version": "6.23.0", + "description": "KDE Threading library", + "homepage": "https://invent.kde.org/frameworks/threadweaver", + "documentation": "https://api.kde.org/threadweaver-index.html", + "dependencies": [ + "ecm", + { + "name": "qtbase", + "default-features": false + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 46883066b988f8..f4905cff4b1ec7 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4424,6 +4424,10 @@ "baseline": "6.22.0", "port-version": 0 }, + "kf6threadweaver": { + "baseline": "6.23.0", + "port-version": 0 + }, "kfr": { "baseline": "6.3.1", "port-version": 0 diff --git a/versions/k-/kf6threadweaver.json b/versions/k-/kf6threadweaver.json new file mode 100644 index 00000000000000..440ac271dd8148 --- /dev/null +++ b/versions/k-/kf6threadweaver.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "aee4553128aa064e2bb8648c93514721ad0f2907", + "version": "6.23.0", + "port-version": 0 + } + ] +}