aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJackBoosY <47264268+JackBoosY@users.noreply.github.com>2019-09-19 01:04:51 +0800
committerCurtis J Bezault <curtbezault@gmail.com>2019-09-18 10:04:51 -0700
commit095b4a2647f05f701ed50e350eb208e6055a2f1b (patch)
tree443ab130e5dc8bc5b9788094ef98ecff1ee01336
parent7db8791f7dd604e3d777f932a8870a3b24f2c64a (diff)
downloadvcpkg-095b4a2647f05f701ed50e350eb208e6055a2f1b.tar.gz
vcpkg-095b4a2647f05f701ed50e350eb208e6055a2f1b.zip
[cgicc]Fix linux build. (#8232)
-rw-r--r--ports/cgicc/CMakeLists.txt4
-rw-r--r--ports/cgicc/CONTROL2
-rw-r--r--ports/cgicc/fix-define.patch22
-rw-r--r--ports/cgicc/portfile.cmake13
4 files changed, 35 insertions, 6 deletions
diff --git a/ports/cgicc/CMakeLists.txt b/ports/cgicc/CMakeLists.txt
index 0a9ad3e13..a6533315b 100644
--- a/ports/cgicc/CMakeLists.txt
+++ b/ports/cgicc/CMakeLists.txt
@@ -42,8 +42,8 @@ check_include_files (sys/types.h HAVE_SYS_TYPES_H)
check_include_files (sys/utsname.h HAVE_SYS_UTSNAME_H)
check_symbol_exists (uname sys/utsname.h HAVE_UNAME)
check_include_files (unistd.h HAVE_UNISTD_H)
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cgicc/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cgicc/CgiDefs.h.in ${CMAKE_CURRENT_BINARY_DIR}/CgiDefs.h)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cgicc/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h @ONLY)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cgicc/CgiDefs.h.in ${CMAKE_CURRENT_BINARY_DIR}/CgiDefs.h @ONLY)
add_definitions (-DHAVE_CONFIG_H)
set (cgicc_SOURCES
cgicc/CgiEnvironment.cpp
diff --git a/ports/cgicc/CONTROL b/ports/cgicc/CONTROL
index 1e3716e0e..551d3ca13 100644
--- a/ports/cgicc/CONTROL
+++ b/ports/cgicc/CONTROL
@@ -1,4 +1,4 @@
Source: cgicc
-Version: 3.2.19-2
+Version: 3.2.19-3
Homepage: https://www.gnu.org/software/cgicc/
Description: GNU Cgicc is an ANSI C++ compliant class library that greatly simplifies the creation of CGI applications for the World Wide Web
diff --git a/ports/cgicc/fix-define.patch b/ports/cgicc/fix-define.patch
new file mode 100644
index 000000000..2c3f9bca1
--- /dev/null
+++ b/ports/cgicc/fix-define.patch
@@ -0,0 +1,22 @@
+diff --git a/cgicc/config.h.in b/cgicc/config.h.in
+index 6870cc2..ee7b5b4 100644
+--- a/cgicc/config.h.in
++++ b/cgicc/config.h.in
+@@ -76,7 +76,7 @@
+ #undef HAVE__BOOL
+
+ /* The host system cgicc was configured for */
+-#undef HOST
++#cmakedefine HOST "@HOST@"
+
+ /* Define to the sub-directory where libtool stores uninstalled libraries. */
+ #undef LT_OBJDIR
+@@ -106,7 +106,7 @@
+ #undef STDC_HEADERS
+
+ /* Version number of package */
+-#undef VERSION
++#cmakedefine VERSION "@VERSION@"
+
+ /* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
diff --git a/ports/cgicc/portfile.cmake b/ports/cgicc/portfile.cmake
index 24447e884..845baef76 100644
--- a/ports/cgicc/portfile.cmake
+++ b/ports/cgicc/portfile.cmake
@@ -9,17 +9,24 @@ vcpkg_download_distfile(ARCHIVE
FILENAME "cgicc-3.2.19.tar.gz"
SHA512 c361923cf3ac876bc3fc94dffd040d2be7cd44751d8534f4cfa3545e9f58a8ec35ebcd902a8ce6a19da0efe52db67506d8b02e5cc868188d187ce3092519abdf
)
-vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_extract_source_archive_ex(
+ ARCHIVE ${ARCHIVE}
+ OUT_SOURCE_PATH SOURCE_PATH
+ PATCHES fix-define.patch
+)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
- OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -DDISABLE_INSTALL_TOOLS=ON
+ OPTIONS_DEBUG
+ -DDISABLE_INSTALL_HEADERS=ON
+ -DDISABLE_INSTALL_TOOLS=ON
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
# Handle copyright
-file(INSTALL ${SOURCE_PATH}/COPYING.DOC DESTINATION ${CURRENT_PACKAGES_DIR}/share/cgicc RENAME copyright)
+file(INSTALL ${SOURCE_PATH}/COPYING.DOC DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)