[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>
This commit is contained in:
chausner 2021-09-30 22:55:14 +02:00 committed by GitHub
parent 35bfef7084
commit 3434e5cbab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 61 additions and 0 deletions

View File

@ -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

View File

@ -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}")

9
ports/promise-cpp/usage Normal file
View File

@ -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"

View File

@ -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
}
]
}

View File

@ -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

View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "ebacf13f64f6bab1413ec0e45d16259c8cf78279",
"version": "2.1.2",
"port-version": 0
}
]
}