aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/polyclipping/CONTROL3
-rw-r--r--ports/polyclipping/portfile.cmake28
2 files changed, 31 insertions, 0 deletions
diff --git a/ports/polyclipping/CONTROL b/ports/polyclipping/CONTROL
new file mode 100644
index 000000000..0e97f0a32
--- /dev/null
+++ b/ports/polyclipping/CONTROL
@@ -0,0 +1,3 @@
+Source: polyclipping
+Version: 6.4.2
+Description: The Clipper library performs clipping and offsetting for both lines and polygons. All four boolean clipping operations are supported - intersection, union, difference and exclusive-or. Polygons can be of any shape including self-intersecting polygons.
diff --git a/ports/polyclipping/portfile.cmake b/ports/polyclipping/portfile.cmake
new file mode 100644
index 000000000..b1b1997cf
--- /dev/null
+++ b/ports/polyclipping/portfile.cmake
@@ -0,0 +1,28 @@
+include(vcpkg_common_functions)
+
+vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://sourceforge.net/projects/polyclipping/files/clipper_ver6.4.2.zip/download"
+ FILENAME "clipper_ver6.4.2.zip"
+ SHA512 ffc88818c44a38aa278d5010db6cfd505796f39664919f1e48c7fa9267563f62135868993e88f7246dcd688241d1172878e4a008a390648acb99738452e3e5dd
+)
+
+vcpkg_extract_source_archive_ex(
+ OUT_SOURCE_PATH SOURCE_PATH
+ ARCHIVE ${ARCHIVE}
+ NO_REMOVE_ONE_LEVEL
+ REF 6.4.2
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}/cpp
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+
+file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)