[hedley] Add new port (#6776)

* [hedley] Add new port

* [hedley] Generate license from source code
This commit is contained in:
myd7349 2019-06-11 07:28:28 +08:00 committed by Robert Schumacher
parent 8bfae5624f
commit 5b35f447c7
2 changed files with 22 additions and 0 deletions

3
ports/hedley/CONTROL Normal file
View File

@ -0,0 +1,3 @@
Source: hedley
Version: 2019-05-08-1
Description: A C/C++ header to help move #ifdefs out of your code

View File

@ -0,0 +1,19 @@
# header-only library
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO nemequ/hedley
REF 1b74d9bc892137b3f006d04ff905098b900116d0
SHA512 8f3e4fc081fb33cc3a3d637eb09863e80fa94b5e46ecf6507aabe6a5b0648881a96c8cf2ef01b4146ecd3a14908ef87f3204960514af6c91d00c93bea18eda41
HEAD_REF master
)
file(COPY ${SOURCE_PATH}/hedley.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
file(STRINGS ${SOURCE_PATH}/hedley.h SOURCE_LINES)
# Capture more lines than required to handle future license file changes
list(SUBLIST SOURCE_LINES 0 30 SOURCE_LINES)
list(JOIN SOURCE_LINES "\n" _contents)
file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright "${_contents}")