2021-06-12 00:58:36 +08:00
|
|
|
set(OTL_VERSION 40463)
|
2019-10-08 01:35:13 +08:00
|
|
|
|
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2020-01-07 07:01:33 +08:00
|
|
|
URLS "http://otl.sourceforge.net/otlv4_${OTL_VERSION}.zip"
|
2022-01-22 05:30:52 +08:00
|
|
|
FILENAME "otlv4_${OTL_VERSION}-9485a0fe15a7-1.zip"
|
2022-09-22 03:30:21 +08:00
|
|
|
SHA512 9485a0fe15a737d55b0746a7e289b1a20e9435ed5c69bda7010705f8cde0a456163d83221d0103236a723837596613b578edc6d3d0007ce80a6cc76b4ed83888
|
2019-10-08 01:35:13 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_extract_source_archive_ex(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
ARCHIVE ${ARCHIVE}
|
|
|
|
NO_REMOVE_ONE_LEVEL
|
|
|
|
)
|
|
|
|
|
2020-01-07 07:01:33 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/otlv${OTL_VERSION}.h"
|
2020-01-11 02:43:26 +08:00
|
|
|
DESTINATION "${CURRENT_PACKAGES_DIR}/include/${PORT}"
|
2020-01-07 07:01:33 +08:00
|
|
|
RENAME otlv4.h)
|
|
|
|
|
2022-01-22 05:30:52 +08:00
|
|
|
file(READ "${SOURCE_PATH}/otlv${OTL_VERSION}.h" copyright_contents)
|
|
|
|
string(FIND "${copyright_contents}" "#ifndef OTL_H" start_of_source)
|
|
|
|
if(start_of_source EQUAL "-1")
|
|
|
|
message(FATAL_ERROR "Could not find start of source; the header file has changed in a way that we cannot get the license text.")
|
|
|
|
endif()
|
|
|
|
string(SUBSTRING "${copyright_contents}" 0 "${start_of_source}" copyright_contents)
|
|
|
|
string(REGEX REPLACE "// ?" "" copyright_contents "${copyright_contents}")
|
|
|
|
string(REGEX REPLACE "=+\n" "" copyright_contents "${copyright_contents}")
|
|
|
|
|
|
|
|
file(WRITE
|
|
|
|
"${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright"
|
|
|
|
"${copyright_contents}"
|
|
|
|
)
|