aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Sinigardi <stesinigardi@hotmail.com>2019-06-04 00:09:09 +0200
committerRobert Schumacher <roschuma@microsoft.com>2019-06-03 15:09:09 -0700
commitba259efd89a03d8bf7ab4f9e1d19af870e3d06b0 (patch)
tree1476281c68bb440ec64f1c13bc97a76fab1aabd1
parent35c8538e2cae64d79ec48c2c16b9bf97365ec21d (diff)
downloadvcpkg-ba259efd89a03d8bf7ab4f9e1d19af870e3d06b0.tar.gz
vcpkg-ba259efd89a03d8bf7ab4f9e1d19af870e3d06b0.zip
[polyclipping] new port (#6636)
* [clipper] add port * [clipper] works only if built as a static library * [clipper] rename to polyclipping
-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)