2019-05-02 22:57:43 -07:00
|
|
|
|
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
2018-01-20 16:18:36 +02:00
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2024-02-08 04:33:25 +08:00
|
|
|
URLS "https://ftp.gnu.org/gnu/cgicc/cgicc-${VERSION}.tar.gz" "https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/cgicc/cgicc-${VERSION}.tar.gz"
|
|
|
|
FILENAME "cgicc-${VERSION}.tar.gz"
|
|
|
|
SHA512 e57b8f30b26b29008bcf1ffc3b2d272bdbd77848fb02e24912b6182ae90923d5933b9d204c556ac922a389f73ced465065b6e2202fc0c3d008e0e6038e7c8052
|
2018-01-20 16:18:36 +02:00
|
|
|
)
|
2019-09-19 01:04:51 +08:00
|
|
|
|
2023-03-07 07:44:04 +08:00
|
|
|
vcpkg_extract_source_archive(
|
|
|
|
SOURCE_PATH
|
|
|
|
ARCHIVE "${ARCHIVE}"
|
2020-01-11 07:51:51 +08:00
|
|
|
PATCHES
|
|
|
|
fix-define.patch
|
|
|
|
fix-static-build.patch
|
2019-09-19 01:04:51 +08:00
|
|
|
)
|
2018-01-20 16:18:36 +02:00
|
|
|
|
2023-03-07 07:44:04 +08:00
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
2018-01-20 16:18:36 +02:00
|
|
|
|
2023-03-07 07:44:04 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2024-06-11 22:26:30 +02:00
|
|
|
OPTIONS
|
|
|
|
-DCMAKE_CXX_STANDARD=11 # 17 removes std::unary_function
|
2019-09-19 01:04:51 +08:00
|
|
|
OPTIONS_DEBUG
|
|
|
|
-DDISABLE_INSTALL_HEADERS=ON
|
|
|
|
-DDISABLE_INSTALL_TOOLS=ON
|
2018-01-20 16:18:36 +02:00
|
|
|
)
|
|
|
|
|
2023-03-07 07:44:04 +08:00
|
|
|
vcpkg_cmake_install()
|
2018-01-20 16:18:36 +02:00
|
|
|
vcpkg_copy_pdbs()
|
2019-10-07 19:35:13 +02:00
|
|
|
|
2023-03-07 07:44:04 +08:00
|
|
|
file(READ "${CURRENT_PACKAGES_DIR}/include/cgicc/CgiDefs.h" CGI_H)
|
2020-01-11 07:51:51 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
|
|
|
string(REPLACE "# ifdef CGICC_STATIC" "# if 0" CGI_H "${CGI_H}")
|
|
|
|
else()
|
|
|
|
string(REPLACE "# ifdef CGICC_STATIC" "# if 1" CGI_H "${CGI_H}")
|
|
|
|
endif()
|
2023-03-07 07:44:04 +08:00
|
|
|
file(WRITE "${CURRENT_PACKAGES_DIR}/include/cgicc/CgiDefs.h" "${CGI_H}")
|
2020-01-11 07:51:51 +08:00
|
|
|
|
|
|
|
|
2023-03-07 07:44:04 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/COPYING.DOC" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|