From ed50fc52a9ab91703bd58dd24d7b61916e4696d4 Mon Sep 17 00:00:00 2001 From: Andrew Kornilov Date: Tue, 31 Jan 2023 01:37:32 +0300 Subject: [PATCH 1/3] [clipper2] Add new port --- ports/clipper2/portfile.cmake | 21 +++++++++++++++++++++ ports/clipper2/vcpkg.json | 13 +++++++++++++ versions/baseline.json | 4 ++++ 3 files changed, 38 insertions(+) create mode 100644 ports/clipper2/portfile.cmake create mode 100644 ports/clipper2/vcpkg.json diff --git a/ports/clipper2/portfile.cmake b/ports/clipper2/portfile.cmake new file mode 100644 index 00000000000000..0ade7b67e28efb --- /dev/null +++ b/ports/clipper2/portfile.cmake @@ -0,0 +1,21 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO AngusJohnson/Clipper2 + REF "Clipper2_${VERSION}" + SHA512 b2b35cf4d03a387f43ee65ea49a30ec194d75ecf1b9b7431263c9073ee35ac63419ae3714f15220e5865e437b2bb5d9863cc01c5a3844304bb61933ae8c03c5b + HEAD_REF main +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}/CPP" + OPTIONS + -DCLIPPER2_EXAMPLES=OFF + -DCLIPPER2_TESTS=OFF + -DCLIPPER2_UTILS=OFF +) +vcpkg_cmake_install() +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/ports/clipper2/vcpkg.json b/ports/clipper2/vcpkg.json new file mode 100644 index 00000000000000..2f3182adc48403 --- /dev/null +++ b/ports/clipper2/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "clipper2", + "version": "1.1.1", + "description": "Polygon Clipping and Offsetting", + "homepage": "http://www.angusj.com/clipper2", + "license": "BSL-1.0", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 1bda4f83223174..a3b9b201ab044d 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1500,6 +1500,10 @@ "baseline": "2019-04-30", "port-version": 2 }, + "clipper2": { + "baseline": "1.1.1", + "port-version": 0 + }, "clockutils": { "baseline": "1.1.1", "port-version": 1 From 8a4dbd0eeba0f64a4ef1cee7897f3b713923f776 Mon Sep 17 00:00:00 2001 From: Andrew Kornilov Date: Tue, 31 Jan 2023 01:53:18 +0300 Subject: [PATCH 2/3] [clipper2] Add usage. Static-only for windows --- ports/clipper2/portfile.cmake | 4 ++++ ports/clipper2/usage | 12 ++++++++++++ versions/c-/clipper2.json | 9 +++++++++ 3 files changed, 25 insertions(+) create mode 100644 ports/clipper2/usage create mode 100644 versions/c-/clipper2.json diff --git a/ports/clipper2/portfile.cmake b/ports/clipper2/portfile.cmake index 0ade7b67e28efb..211f7a88bc01fb 100644 --- a/ports/clipper2/portfile.cmake +++ b/ports/clipper2/portfile.cmake @@ -1,3 +1,7 @@ +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO AngusJohnson/Clipper2 diff --git a/ports/clipper2/usage b/ports/clipper2/usage new file mode 100644 index 00000000000000..8670c02ccf273e --- /dev/null +++ b/ports/clipper2/usage @@ -0,0 +1,12 @@ +The package clipper2 can be imported via CMake FindPkgConfig module: + + # Clipper2 + find_package(PkgConfig REQUIRED) + pkg_check_modules(Clipper2 REQUIRED IMPORTED_TARGET Clipper2) + target_link_libraries(main PkgConfig::Clipper2) + + # Clipper2Z + find_package(PkgConfig REQUIRED) + pkg_check_modules(Clipper2Z REQUIRED IMPORTED_TARGET Clipper2Z) + target_link_libraries(main PkgConfig::Clipper2Z) + diff --git a/versions/c-/clipper2.json b/versions/c-/clipper2.json new file mode 100644 index 00000000000000..b8cf70eef8d8a6 --- /dev/null +++ b/versions/c-/clipper2.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "e4e17a0f6cbecf7ac4863b830eb47df1e10d9b83", + "version": "1.1.1", + "port-version": 0 + } + ] +} From 17b62569e06434db0ad9212461bc50aa751e52f5 Mon Sep 17 00:00:00 2001 From: Andrew Kornilov Date: Tue, 31 Jan 2023 15:36:51 +0300 Subject: [PATCH 3/3] [clipper2] Update hash --- ports/clipper2/portfile.cmake | 2 +- versions/c-/clipper2.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/clipper2/portfile.cmake b/ports/clipper2/portfile.cmake index 211f7a88bc01fb..d6159d80cfd636 100644 --- a/ports/clipper2/portfile.cmake +++ b/ports/clipper2/portfile.cmake @@ -6,7 +6,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO AngusJohnson/Clipper2 REF "Clipper2_${VERSION}" - SHA512 b2b35cf4d03a387f43ee65ea49a30ec194d75ecf1b9b7431263c9073ee35ac63419ae3714f15220e5865e437b2bb5d9863cc01c5a3844304bb61933ae8c03c5b + SHA512 e996ef8a2ec412189f0ba95a6f200c0818f9755930b05cd20b630d33760dec619c6a735ac056f5dfbaccf793bf6ebeb7b6c102fd9ff83b0d297a4d660389d8d9 HEAD_REF main ) diff --git a/versions/c-/clipper2.json b/versions/c-/clipper2.json index b8cf70eef8d8a6..4b279f9019c253 100644 --- a/versions/c-/clipper2.json +++ b/versions/c-/clipper2.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "e4e17a0f6cbecf7ac4863b830eb47df1e10d9b83", + "git-tree": "3768ef634c9d40c4bb981380ed16756c16eab600", "version": "1.1.1", "port-version": 0 }