early-access version 2853
This commit is contained in:
121
externals/vcpkg/ports/cgicc/CMakeLists.txt
vendored
Executable file
121
externals/vcpkg/ports/cgicc/CMakeLists.txt
vendored
Executable file
@@ -0,0 +1,121 @@
|
||||
|
||||
cmake_minimum_required (VERSION 3.8)
|
||||
project (cgicc)
|
||||
include (CheckIncludeFiles)
|
||||
include(CheckSymbolExists)
|
||||
include (CheckCXXSourceCompiles)
|
||||
|
||||
set (VERSION "3.2.19")
|
||||
execute_process (COMMAND hostname OUTPUT_VARIABLE HOST OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
check_include_files (dlfcn.h HAVE_DLFCN_H)
|
||||
check_symbol_exists(gettimeofday sys/time.h HAVE_GETTIMEOFDAY)
|
||||
check_include_files (inttypes.h HAVE_INTTYPES_H)
|
||||
check_include_files (memory.h HAVE_MEMORY_H)
|
||||
|
||||
check_cxx_source_compiles ("
|
||||
namespace test { }
|
||||
int main(int, char**) {
|
||||
using namespace ::test;
|
||||
}" HAVE_NAMESPACES)
|
||||
check_include_files (stdint.h HAVE_STDINT_H)
|
||||
check_include_files (stdlib.h HAVE_STDLIB_H)
|
||||
set (CMAKE_REQUIRED_FLAGS "-DHAVE_NAMESPACES")
|
||||
check_cxx_source_compiles ("
|
||||
#include <list>
|
||||
#include <deque>
|
||||
#ifdef HAVE_NAMESPACES
|
||||
using namespace std;
|
||||
#endif
|
||||
int
|
||||
main ()
|
||||
{
|
||||
list<int> x; x.push_back(5);
|
||||
list<int>::iterator iter = x.begin(); if (iter != x.end()) ++iter; return 0;
|
||||
;
|
||||
return 0;
|
||||
}" HAVE_STL)
|
||||
check_include_files (strings.h HAVE_STRINGS_H)
|
||||
check_include_files (string.h HAVE_STRING_H)
|
||||
check_include_files (sys/stat.h HAVE_SYS_STAT_H)
|
||||
check_include_files (sys/time.h HAVE_SYS_TIME_H)
|
||||
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 @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
|
||||
cgicc/CgiInput.cpp
|
||||
cgicc/CgiUtils.cpp
|
||||
cgicc/Cgicc.cpp
|
||||
cgicc/FormEntry.cpp
|
||||
cgicc/FormFile.cpp
|
||||
cgicc/HTMLAttribute.cpp
|
||||
cgicc/HTMLAttributeList.cpp
|
||||
cgicc/HTMLDoctype.cpp
|
||||
cgicc/HTMLElement.cpp
|
||||
cgicc/HTMLElementList.cpp
|
||||
cgicc/HTTPContentHeader.cpp
|
||||
cgicc/HTTPCookie.cpp
|
||||
cgicc/HTTPHTMLHeader.cpp
|
||||
cgicc/HTTPHeader.cpp
|
||||
cgicc/HTTPPlainHeader.cpp
|
||||
cgicc/HTTPRedirectHeader.cpp
|
||||
cgicc/HTTPResponseHeader.cpp
|
||||
cgicc/HTTPStatusHeader.cpp
|
||||
cgicc/HTTPXHTMLHeader.cpp
|
||||
cgicc/MStreamable.cpp
|
||||
cgicc/XHTMLDoctype.cpp
|
||||
cgicc/XMLPI.cpp)
|
||||
set (cgicc_HEADERS
|
||||
cgicc/Cgicc.h
|
||||
cgicc/CgiEnvironment.h
|
||||
cgicc/CgiInput.h
|
||||
cgicc/CgiUtils.h
|
||||
cgicc/FormEntry.h
|
||||
cgicc/FormFile.h
|
||||
cgicc/HTMLAtomicElement.h
|
||||
cgicc/HTMLAttribute.h
|
||||
cgicc/HTMLAttributeList.h
|
||||
cgicc/HTMLBooleanElement.h
|
||||
cgicc/HTMLClasses.h
|
||||
cgicc/HTMLDoctype.h
|
||||
cgicc/HTMLElement.h
|
||||
cgicc/HTMLElementList.h
|
||||
cgicc/HTTPContentHeader.h
|
||||
cgicc/HTTPCookie.h
|
||||
cgicc/HTTPHeader.h
|
||||
cgicc/HTTPHTMLHeader.h
|
||||
cgicc/HTTPPlainHeader.h
|
||||
cgicc/HTTPRedirectHeader.h
|
||||
cgicc/HTTPResponseHeader.h
|
||||
cgicc/HTTPStatusHeader.h
|
||||
cgicc/HTTPXHTMLHeader.h
|
||||
cgicc/MStreamable.h
|
||||
cgicc/XHTMLDoctype.h
|
||||
cgicc/XMLDeclaration.h
|
||||
cgicc/XMLPI.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/CgiDefs.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/config.h
|
||||
)
|
||||
|
||||
include_directories (. ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
add_library (cgicc ${cgicc_SOURCES} ${cgicc_HEADERS})
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
add_definitions(-DCGICC_EXPORTS)
|
||||
else()
|
||||
add_definitions(-DCGICC_STATIC)
|
||||
endif()
|
||||
|
||||
install(TARGETS cgicc
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
|
||||
if(NOT DISABLE_INSTALL_HEADERS)
|
||||
install(FILES ${cgicc_HEADERS} DESTINATION include/cgicc)
|
||||
endif()
|
||||
22
externals/vcpkg/ports/cgicc/fix-define.patch
vendored
Executable file
22
externals/vcpkg/ports/cgicc/fix-define.patch
vendored
Executable file
@@ -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. */
|
||||
15
externals/vcpkg/ports/cgicc/fix-static-build.patch
vendored
Executable file
15
externals/vcpkg/ports/cgicc/fix-static-build.patch
vendored
Executable file
@@ -0,0 +1,15 @@
|
||||
diff --git a/cgicc/CgiDefs.h.in b/cgicc/CgiDefs.h.in
|
||||
index 71b70ad..3793cd8 100644
|
||||
--- a/cgicc/CgiDefs.h.in
|
||||
+++ b/cgicc/CgiDefs.h.in
|
||||
@@ -47,7 +47,9 @@
|
||||
#ifdef WIN32
|
||||
|
||||
// export library symbols
|
||||
-# ifdef CGICC_EXPORTS
|
||||
+# ifdef CGICC_STATIC
|
||||
+# define CGICC_API
|
||||
+# elif defined(CGICC_EXPORTS)
|
||||
# define CGICC_API __declspec(dllexport)
|
||||
# else
|
||||
# define CGICC_API __declspec(dllimport)
|
||||
41
externals/vcpkg/ports/cgicc/portfile.cmake
vendored
Executable file
41
externals/vcpkg/ports/cgicc/portfile.cmake
vendored
Executable file
@@ -0,0 +1,41 @@
|
||||
set(CGICC_VERSION 3.2.19)
|
||||
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://ftp.gnu.org/gnu/cgicc/cgicc-${CGICC_VERSION}.tar.gz" "https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/cgicc/cgicc-${CGICC_VERSION}.tar.gz"
|
||||
FILENAME "cgicc-${CGICC_VERSION}.tar.gz"
|
||||
SHA512 c361923cf3ac876bc3fc94dffd040d2be7cd44751d8534f4cfa3545e9f58a8ec35ebcd902a8ce6a19da0efe52db67506d8b02e5cc868188d187ce3092519abdf
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive_ex(
|
||||
ARCHIVE ${ARCHIVE}
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
PATCHES
|
||||
fix-define.patch
|
||||
fix-static-build.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
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(READ ${CURRENT_PACKAGES_DIR}/include/cgicc/CgiDefs.h CGI_H)
|
||||
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()
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/include/cgicc/CgiDefs.h "${CGI_H}")
|
||||
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/COPYING.DOC DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
7
externals/vcpkg/ports/cgicc/vcpkg.json
vendored
Executable file
7
externals/vcpkg/ports/cgicc/vcpkg.json
vendored
Executable file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "cgicc",
|
||||
"version-string": "3.2.19",
|
||||
"port-version": 5,
|
||||
"description": "GNU Cgicc is an ANSI C++ compliant class library that greatly simplifies the creation of CGI applications for the World Wide Web",
|
||||
"homepage": "https://www.gnu.org/software/cgicc/"
|
||||
}
|
||||
Reference in New Issue
Block a user