aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>2019-10-30 13:50:12 -0700
committerGriffin Downs <35574547+grdowns@users.noreply.github.com>2019-10-30 13:50:12 -0700
commit34eff46c92019fe9e107779ec4b6ec3716194ab3 (patch)
treeb4ad49a4027a196f14599082a3c04a97d4b3ccb0
parent628e795c6ae4f856cc76ae0842339b2f3b8eedf2 (diff)
downloadvcpkg-34eff46c92019fe9e107779ec4b6ec3716194ab3.tar.gz
vcpkg-34eff46c92019fe9e107779ec4b6ec3716194ab3.zip
[libdivide] Add new port (#8320)
* [libdivide] Add new port * Update to v3.0
-rw-r--r--ports/libdivide/CONTROL7
-rw-r--r--ports/libdivide/portfile.cmake31
2 files changed, 38 insertions, 0 deletions
diff --git a/ports/libdivide/CONTROL b/ports/libdivide/CONTROL
new file mode 100644
index 000000000..95af9a72c
--- /dev/null
+++ b/ports/libdivide/CONTROL
@@ -0,0 +1,7 @@
+Source: libdivide
+Version: 3.0
+Homepage: https://github.com/ridiculousfish/libdivide
+Description: libdivide.h is a header-only C/C++ library for optimizing integer division.
+
+Feature: test
+Description: Build test \ No newline at end of file
diff --git a/ports/libdivide/portfile.cmake b/ports/libdivide/portfile.cmake
new file mode 100644
index 000000000..17f63e4a7
--- /dev/null
+++ b/ports/libdivide/portfile.cmake
@@ -0,0 +1,31 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO ridiculousfish/libdivide
+ REF v3.0
+ SHA512 fae17a4125c3b17aeb37283d7bba9fea2e4d3b208861d6ed81a6cdcf5dbf3286cf676cedba99c73a16115cf8bf9dcbd2cf6a48ca52fb85d4b0b24024e53d055e
+ HEAD_REF master
+)
+
+vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ test BUILD_TESTS
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS ${FEATURE_OPTIONS}
+ -DLIBDIVIDE_SSE2=OFF
+ -DLIBDIVIDE_AVX2=OFF
+ -DLIBDIVIDE_AVX512=OFF
+ -DENABLE_VECTOR_EXTENSIONS=OFF
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)