diff options
| author | chausner <15180557+chausner@users.noreply.github.com> | 2021-09-30 22:55:14 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-30 13:55:14 -0700 |
| commit | 3434e5cbab6106eb86b198711cdae4c8f99e7dd8 (patch) | |
| tree | 267fd5745756534a40760065157b6ede1b9c715b | |
| parent | 35bfef708400cf882efb3e4df93045e0a06c9c23 (diff) | |
| download | vcpkg-3434e5cbab6106eb86b198711cdae4c8f99e7dd8.tar.gz vcpkg-3434e5cbab6106eb86b198711cdae4c8f99e7dd8.zip | |
[promise-cpp] Add new port (#20340)
* Update promise-cpp to 1.0.3
* Update CI baseline
* Fix portfile
* Update git-tree hash
* Update to version 2.1.0
* Update CI baseline and git-tree hash
* Add usage
* Update git-tree hash
* Update to promise-cpp 2.1.2
* Update git-tree hash
Co-authored-by: chausner <chausner@users.noreply.github.com>
| -rw-r--r-- | ports/promise-cpp/fix-ifdef.patch | 12 | ||||
| -rw-r--r-- | ports/promise-cpp/portfile.cmake | 15 | ||||
| -rw-r--r-- | ports/promise-cpp/usage | 9 | ||||
| -rw-r--r-- | ports/promise-cpp/vcpkg.json | 12 | ||||
| -rw-r--r-- | versions/baseline.json | 4 | ||||
| -rw-r--r-- | versions/p-/promise-cpp.json | 9 |
6 files changed, 61 insertions, 0 deletions
diff --git a/ports/promise-cpp/fix-ifdef.patch b/ports/promise-cpp/fix-ifdef.patch new file mode 100644 index 000000000..8d818b3ab --- /dev/null +++ b/ports/promise-cpp/fix-ifdef.patch @@ -0,0 +1,12 @@ +diff --git a/include/promise-cpp/promise.hpp b/include/promise-cpp/promise.hpp
+--- a/include/promise-cpp/promise.hpp
++++ b/include/promise-cpp/promise.hpp
+@@ -2,7 +2,7 @@
+ #ifndef INC_PROMISE_HPP_
+ #define INC_PROMISE_HPP_
+
+-#ifdef PROMISE_HEADER_ONLY
++#ifdef PROMISE_HEADONLY
+ #define PROMISE_API inline
+ #elif defined PROMISE_BUILD_SHARED
+
diff --git a/ports/promise-cpp/portfile.cmake b/ports/promise-cpp/portfile.cmake new file mode 100644 index 000000000..ed49e0526 --- /dev/null +++ b/ports/promise-cpp/portfile.cmake @@ -0,0 +1,15 @@ +vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO xhawk18/promise-cpp
+ REF 2.1.2
+ SHA512 490571e6d6742e05ae6a2549af4e242a1d7084edc583fbbb183798bdddb25d08a7f68becfa94f55b877cba7e2e8e8515964f892881591b5bb394b4b33e6593f7
+ HEAD_REF master
+ PATCHES fix-ifdef.patch
+)
+
+file(GLOB PROMISE_HEADERS "${SOURCE_PATH}/include/*.hpp")
+file(INSTALL "${SOURCE_PATH}/include/promise-cpp" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
+
+file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
+
+file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
diff --git a/ports/promise-cpp/usage b/ports/promise-cpp/usage new file mode 100644 index 000000000..0e9d48636 --- /dev/null +++ b/ports/promise-cpp/usage @@ -0,0 +1,9 @@ +The package promise-cpp is header only and can be used from CMake via:
+
+ find_path(PROMISE_CPP_INCLUDE_DIRS "promise-cpp/promise.hpp")
+ target_include_directories(main PRIVATE ${PROMISE_CPP_INCLUDE_DIRS})
+
+Make sure to define the pre-processor macro PROMISE_HEADONLY before including "promise-cpp/promise.hpp":
+
+ #define PROMISE_HEADONLY
+ #include "promise-cpp/promise.hpp"
\ No newline at end of file diff --git a/ports/promise-cpp/vcpkg.json b/ports/promise-cpp/vcpkg.json new file mode 100644 index 000000000..3e6b7976d --- /dev/null +++ b/ports/promise-cpp/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "promise-cpp", + "version": "2.1.2", + "description": "C++ promise/A+ library in Javascript style.", + "homepage": "https://github.com/xhawk18/promise-cpp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 9af77e253..cfaecb60e 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5272,6 +5272,10 @@ "baseline": "0.13.0", "port-version": 0 }, + "promise-cpp": { + "baseline": "2.1.2", + "port-version": 0 + }, "protobuf": { "baseline": "3.18.0", "port-version": 0 diff --git a/versions/p-/promise-cpp.json b/versions/p-/promise-cpp.json new file mode 100644 index 000000000..63ec6b263 --- /dev/null +++ b/versions/p-/promise-cpp.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "ebacf13f64f6bab1413ec0e45d16259c8cf78279", + "version": "2.1.2", + "port-version": 0 + } + ] +} |
