2017-06-08 10:23:17 +08:00
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2023-12-12 17:22:44 +08:00
|
|
|
URLS "https://www.inf.puc-rio.br/~roberto/lpeg/lpeg-${VERSION}.tar.gz"
|
|
|
|
FILENAME "lpeg-${VERSION}.tar.gz"
|
|
|
|
SHA512 01b2a4ceb2d110e143603bc63c84a59736ea735dd0ed9866286ba115d41be48d09c9ff21c8e2327974d2296944f6508d50a5c3a18f26ac1d81b8b2fc41f61222
|
2017-06-08 10:23:17 +08:00
|
|
|
)
|
2019-10-08 01:35:13 +08:00
|
|
|
|
2023-03-08 06:14:52 +08:00
|
|
|
vcpkg_extract_source_archive(
|
|
|
|
SOURCE_PATH
|
|
|
|
ARCHIVE "${ARCHIVE}"
|
2019-10-08 01:35:13 +08:00
|
|
|
)
|
2017-06-08 10:23:17 +08:00
|
|
|
|
2023-03-08 06:14:52 +08:00
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/lpeg.def" DESTINATION "${SOURCE_PATH}")
|
2024-06-06 16:04:40 +08:00
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/unofficial-lpeg-config.cmake.in" DESTINATION "${SOURCE_PATH}")
|
2017-06-08 10:23:17 +08:00
|
|
|
|
2023-03-08 06:14:52 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2024-06-06 16:04:40 +08:00
|
|
|
OPTIONS
|
|
|
|
"-DLPEG_VERSION=${VERSION}"
|
2017-06-08 10:23:17 +08:00
|
|
|
)
|
|
|
|
|
2023-03-08 06:14:52 +08:00
|
|
|
vcpkg_cmake_install()
|
2024-06-06 16:04:40 +08:00
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME "unofficial-lpeg")
|
2017-06-08 10:23:17 +08:00
|
|
|
|
|
|
|
# Remove debug share
|
2023-03-08 06:14:52 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2017-06-08 10:23:17 +08:00
|
|
|
|
|
|
|
# Handle copyright
|
2023-03-08 06:14:52 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/lpeg.html" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
2024-06-06 16:04:40 +08:00
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
2017-06-08 10:23:17 +08:00
|
|
|
|
|
|
|
# Allow empty include directory
|
|
|
|
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
|