aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Jasny <gjasny@googlemail.com>2019-12-20 21:15:42 +0100
committerdan-shaw <51385773+dan-shaw@users.noreply.github.com>2019-12-20 12:15:42 -0800
commit19ed64967c4ce360048e52c51df6b7bc1e19bdb5 (patch)
tree68142643d368872e8ca091e528320b099913f471
parent0d5fc4c6ef86b942401658222ba1aab5c1ccbda4 (diff)
downloadvcpkg-19ed64967c4ce360048e52c51df6b7bc1e19bdb5.tar.gz
vcpkg-19ed64967c4ce360048e52c51df6b7bc1e19bdb5.zip
[function2] Add port version 4.0.0 (#9246)
-rw-r--r--ports/function2/CONTROL4
-rw-r--r--ports/function2/disable-testing.patch14
-rw-r--r--ports/function2/portfile.cmake27
3 files changed, 45 insertions, 0 deletions
diff --git a/ports/function2/CONTROL b/ports/function2/CONTROL
new file mode 100644
index 000000000..9604e8084
--- /dev/null
+++ b/ports/function2/CONTROL
@@ -0,0 +1,4 @@
+Source: function2
+Version: 4.0.0
+Homepage: https://github.com/Naios/function2
+Description: Improved drop-in replacement to std::function
diff --git a/ports/function2/disable-testing.patch b/ports/function2/disable-testing.patch
new file mode 100644
index 000000000..c17403c33
--- /dev/null
+++ b/ports/function2/disable-testing.patch
@@ -0,0 +1,14 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 684abe0..32a5cf6 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -75,7 +75,9 @@ if (FU2_IS_TOP_LEVEL_PROJECT)
+ install(EXPORT "${PROJECT_NAME}Targets"
+ NAMESPACE ${PROJECT_NAME}::
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
++endif()
+
++if(0)
+ # Setup CPack for bundling
+ set(CPACK_GENERATOR "ZIP")
+ set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
diff --git a/ports/function2/portfile.cmake b/ports/function2/portfile.cmake
new file mode 100644
index 000000000..b57c722f8
--- /dev/null
+++ b/ports/function2/portfile.cmake
@@ -0,0 +1,27 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO Naios/function2
+ REF d2acdb6c3c7612a6133cd03464ef941161258f4e
+ SHA512 298f39db3c4e7a599e41fef71d1f953f3c5e20bc9f4af378c67bd47c10b126efd7be80be4ad919370a1151c8c5bc111ccd9054757a1aaf1ccf3f87ca958a7e3a
+ HEAD_REF master
+ PATCHES
+ disable-testing.patch
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
+
+file(REMOVE ${CURRENT_PACKAGES_DIR}/Readme.md)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib)
+
+# Put the installed licence file where vcpkg expects it
+file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/${PORT})
+file(RENAME ${CURRENT_PACKAGES_DIR}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright)
+
+vcpkg_copy_pdbs()