diff options
| author | Curoky <cccuroky@gmail.com> | 2020-05-01 08:47:22 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-30 17:47:22 -0700 |
| commit | 400957f8291222642f8f292f535f3a73671cf808 (patch) | |
| tree | 7bc21cda30be9780087214b064d7a915cfa9610a | |
| parent | 4f1ce2eea6fedfdd0d8f41d6d005f83fe7734e9e (diff) | |
| download | vcpkg-400957f8291222642f8f292f535f3a73671cf808.tar.gz vcpkg-400957f8291222642f8f292f535f3a73671cf808.zip | |
[mstch] Add new port (#11020)
* [mstch] add new port
* [mstch] update sha512 code
* [mstch] don't build in some window environment
* [mstch] remove some args which were no longer needed
* [mstch] Patch out forcing build type
* [mstch] Restore C++11 on non-Windows
* [ci.baseline.txt] Mark mstch as passing on x64-windows-static
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
| -rw-r--r-- | ports/mstch/CONTROL | 5 | ||||
| -rw-r--r-- | ports/mstch/do-not-force-release.patch | 25 | ||||
| -rw-r--r-- | ports/mstch/portfile.cmake | 25 |
3 files changed, 55 insertions, 0 deletions
diff --git a/ports/mstch/CONTROL b/ports/mstch/CONTROL new file mode 100644 index 000000000..eef64a578 --- /dev/null +++ b/ports/mstch/CONTROL @@ -0,0 +1,5 @@ +Source: mstch
+Version: 1.0.2-2
+Homepage: https://github.com/no1msd/mstch
+Description: Mstch is a complete implementation of {{mustache}} templates using modern C++
+Build-Depends: boost-variant
diff --git a/ports/mstch/do-not-force-release.patch b/ports/mstch/do-not-force-release.patch new file mode 100644 index 000000000..63916f5f4 --- /dev/null +++ b/ports/mstch/do-not-force-release.patch @@ -0,0 +1,25 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8d8e0c7..4304ad7 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -5,17 +5,17 @@ option(WITH_UNIT_TESTS "enable building unit test executable" OFF)
+ option(WITH_BENCHMARK "enable building benchmark executable" OFF)
+
+ set(CMAKE_INCLUDE_CURRENT_DIR ON)
+-set(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)
+-set(CMAKE_BUILD_TYPE Release)
+
+ set(mstch_VERSION 1.0.1)
+
+ if(NOT MSVC)
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -O3")
++ set(CMAKE_CXX_STANDARD 11)
+ endif()
+
+ add_subdirectory(src)
+
++target_include_directories(mstch PUBLIC $<INSTALL_INTERFACE:include>)
++
+ if(WITH_UNIT_TESTS)
+ enable_testing()
+ add_subdirectory(vendor/headerize)
diff --git a/ports/mstch/portfile.cmake b/ports/mstch/portfile.cmake new file mode 100644 index 000000000..e742273af --- /dev/null +++ b/ports/mstch/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO no1msd/mstch + REF ff459067bd02e80dc399006bb610238223d41c50 #1.0.2 + SHA512 b01f4c3e39a40fc9a6accc81ecbfac4b8a9ce1c2ec3df441a16039f4bf126dfeef83f87d3a5e9ec03dc133a1c5f54f5bc931479915e8a92bbfc8ebbc87c8e4dd + HEAD_REF master + PATCHES do-not-force-release.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/mstch) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) |
