aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/fastcgi
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/fastcgi
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/fastcgi')
-rw-r--r--vcpkg/ports/fastcgi/dll.patch109
-rw-r--r--vcpkg/ports/fastcgi/portfile.cmake47
-rw-r--r--vcpkg/ports/fastcgi/vcpkg.json9
3 files changed, 165 insertions, 0 deletions
diff --git a/vcpkg/ports/fastcgi/dll.patch b/vcpkg/ports/fastcgi/dll.patch
new file mode 100644
index 0000000..14e94fa
--- /dev/null
+++ b/vcpkg/ports/fastcgi/dll.patch
@@ -0,0 +1,109 @@
+diff --git a/include/fcgi_stdio.h b/include/fcgi_stdio.h
+index 6d242f36f..ec57131ce 100644
+--- a/include/fcgi_stdio.h
++++ b/include/fcgi_stdio.h
+@@ -23,14 +23,6 @@
+ extern "C" {
+ #endif
+
+-#ifndef DLLAPI
+-#if defined (_WIN32) && defined (_MSC_VER)
+-#define DLLAPI __declspec(dllimport)
+-#else
+-#define DLLAPI
+-#endif
+-#endif
+-
+ /*
+ * Wrapper type for FILE
+ */
+diff --git a/include/fcgiapp.h b/include/fcgiapp.h
+index 8cadde16d..9b034def3 100644
+--- a/include/fcgiapp.h
++++ b/include/fcgiapp.h
+@@ -23,11 +23,19 @@
+ #endif
+
+ #ifndef DLLAPI
+-#if defined (_WIN32) && defined (_MSC_VER)
+-#define DLLAPI __declspec(dllimport)
+-#else
+-#define DLLAPI
+-#endif
++# if defined (_WIN32) && defined (_MSC_VER)
++# if defined(DLL_EXPORT) && defined(LIBFCGI_BUILD)
++# define DLLAPI __declspec(dllexport)
++# else
++# ifdef LIBFCGI_DLL_IMPORT
++# define DLLAPI extern __declspec(dllimport)
++# else
++# define DLLAPI
++# endif
++# endif
++# else
++# define DLLAPI
++# endif
+ #endif
+
+ #if defined (c_plusplus) || defined (__cplusplus)
+diff --git a/include/fcgio.h b/include/fcgio.h
+index ce8b930a8..81981974a 100644
+--- a/include/fcgio.h
++++ b/include/fcgio.h
+@@ -34,14 +34,6 @@
+
+ #include "fcgiapp.h"
+
+-#ifndef DLLAPI
+-#if defined (_WIN32) && defined (_MSC_VER)
+-#define DLLAPI __declspec(dllimport)
+-#else
+-#define DLLAPI
+-#endif
+-#endif
+-
+ #if ! HAVE_STREAMBUF_CHAR_TYPE
+ typedef char char_type;
+ #endif
+diff --git a/include/fcgios.h b/include/fcgios.h
+index 206973137..7a2f5333a 100644
+--- a/include/fcgios.h
++++ b/include/fcgios.h
+@@ -50,11 +50,19 @@ extern "C" {
+ #endif /* !_WIN32 */
+
+ #ifndef DLLAPI
+-#if defined (_WIN32) && defined (_MSC_VER)
+-#define DLLAPI __declspec(dllimport)
+-#else
+-#define DLLAPI
+-#endif
++# if defined (_WIN32) && defined (_MSC_VER)
++# if defined(DLL_EXPORT) && defined(LIBFCGI_BUILD)
++# define DLLAPI __declspec(dllexport)
++# else
++# ifdef LIBFCGI_DLL_IMPORT
++# define DLLAPI extern __declspec(dllimport)
++# else
++# define DLLAPI
++# endif
++# endif
++# else
++# define DLLAPI
++# endif
+ #endif
+
+
+diff --git a/libfcgi/Makefile.am b/libfcgi/Makefile.am
+index 42d507253..26f06f550 100644
+--- a/libfcgi/Makefile.am
++++ b/libfcgi/Makefile.am
+@@ -1,7 +1,7 @@
+ # $Id: Makefile.am,v 1.9 2001/12/22 03:16:20 robs Exp $
+
+ INCLUDEDIR = ../include
+-AM_CPPFLAGS = -I$(top_srcdir)/include -W -Wall -pedantic -Wno-unused-parameter
++AM_CPPFLAGS = -I$(top_srcdir)/include -DLIBFCGI_BUILD
+
+ INCLUDE_FILES = $(INCLUDEDIR)/fastcgi.h \
+ $(INCLUDEDIR)/fcgiapp.h \
diff --git a/vcpkg/ports/fastcgi/portfile.cmake b/vcpkg/ports/fastcgi/portfile.cmake
new file mode 100644
index 0000000..56fa6f8
--- /dev/null
+++ b/vcpkg/ports/fastcgi/portfile.cmake
@@ -0,0 +1,47 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO FastCGI-Archives/fcgi2
+ REF fc8c6547ae38faf9926205a23075c47fbd4370c8
+ SHA512 7f27b1060fbeaf0de9b8a43aa4ff954a004c49e99f7d6ea11119a438fcffe575fb469ba06262e71ac8132f92e74189e2097fd049595a6a61d4d5a5bac2733f7a
+ HEAD_REF master
+ PATCHES
+ dll.patch
+)
+
+# Check build system first
+if(VCPKG_TARGET_IS_OSX)
+ message("${PORT} currently requires the following library from the system package manager:\n gettext\n automake\n libtool\n\nIt can be installed with brew install gettext automake libtool")
+elseif(NOT VCPKG_TARGET_IS_WINDOWS)
+ message("${PORT} currently requires the following library from the system package manager:\n gettext\n automake\n libtool\n libtool-bin\n\nIt can be installed with apt-get install gettext automake libtool libtool-bin")
+endif()
+
+vcpkg_configure_make(
+ SOURCE_PATH "${SOURCE_PATH}"
+ AUTOCONFIG
+ COPY_SOURCE
+ OPTIONS
+ --disable-examples
+)
+
+vcpkg_install_make()
+
+# switch ${PORT} into /${PORT}
+file(RENAME "${CURRENT_PACKAGES_DIR}/include" "${CURRENT_PACKAGES_DIR}/include2")
+file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/include")
+file(RENAME "${CURRENT_PACKAGES_DIR}/include2" "${CURRENT_PACKAGES_DIR}/include/${PORT}")
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+vcpkg_fixup_pkgconfig()
+vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/fcgi.pc" "Version: 2.4.2\n" "Version: 2.4.2\nCflags: -I\"\${prefix}/include/fastcgi\"\n")
+if(NOT VCPKG_BUILD_TYPE)
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/fcgi.pc" "Version: 2.4.2\n" "Version: 2.4.2\nCflags: -I\"\${prefix}/../include/fastcgi\"\n")
+endif()
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" AND VCPKG_TARGET_IS_WINDOWS)
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/${PORT}/fcgiapp.h" "ifdef LIBFCGI_DLL_IMPORT" "if 1")
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/${PORT}/fcgios.h" "ifdef LIBFCGI_DLL_IMPORT" "if 1")
+endif()
+vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}")
+
+# Handle copyright
+file(INSTALL "${SOURCE_PATH}/LICENSE.TERMS" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
diff --git a/vcpkg/ports/fastcgi/vcpkg.json b/vcpkg/ports/fastcgi/vcpkg.json
new file mode 100644
index 0000000..a858563
--- /dev/null
+++ b/vcpkg/ports/fastcgi/vcpkg.json
@@ -0,0 +1,9 @@
+{
+ "name": "fastcgi",
+ "version-date": "2020-09-11",
+ "port-version": 5,
+ "description": "The FastCGI interface combines the best aspects of CGI and vendor APIs. Like CGI, FastCGI applications run in separate, isolated processes.",
+ "homepage": "https://fastcgi-archives.github.io/",
+ "license": "OML",
+ "supports": "!uwp"
+}