From b674061244a20af3938167f0b855933143225b6b Mon Sep 17 00:00:00 2001 From: sthen Date: Tue, 27 Mar 2012 14:21:26 +0000 Subject: [PATCH] Import ports/www/fcgi-cgi, tweaks/ok landry@ fcgi-cgi is a wrapper around CGI applications to support running them under FastCGI for use with webservers such as nginx and lighttpd 2.x which do not support running cgi scripts/binaries directly. --- www/fcgi-cgi/Makefile | 40 ++++++++++++++++++++++++++++ www/fcgi-cgi/distinfo | 5 ++++ www/fcgi-cgi/patches/patch-fastcgi_c | 11 ++++++++ www/fcgi-cgi/pkg/DESCR | 3 +++ www/fcgi-cgi/pkg/PLIST | 4 +++ www/fcgi-cgi/pkg/fcgi_cgi.rc | 13 +++++++++ 6 files changed, 76 insertions(+) create mode 100644 www/fcgi-cgi/Makefile create mode 100644 www/fcgi-cgi/distinfo create mode 100644 www/fcgi-cgi/patches/patch-fastcgi_c create mode 100644 www/fcgi-cgi/pkg/DESCR create mode 100644 www/fcgi-cgi/pkg/PLIST create mode 100755 www/fcgi-cgi/pkg/fcgi_cgi.rc diff --git a/www/fcgi-cgi/Makefile b/www/fcgi-cgi/Makefile new file mode 100644 index 00000000000..e3dc4dc01aa --- /dev/null +++ b/www/fcgi-cgi/Makefile @@ -0,0 +1,40 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2012/03/27 14:21:26 sthen Exp $ + +COMMENT= wrapper to run CGI applications via FastCGI + +DISTNAME= fcgi-cgi-0.1.8 +CATEGORIES= www + +HOMEPAGE= http://nginx.localdomain.pl/wiki/FcgiWrap + +# MIT +PERMIT_PACKAGE_CDROM= Yes +PERMIT_PACKAGE_FTP= Yes +PERMIT_DISTFILES_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes + +WANTLIB += c ev glib-2.0 + +MASTER_SITES= http://cgit.lighttpd.net/fcgi-cgi.git/snapshot/ \ + http://spacehopper.org/mirrors/ + +SEPARATE_BUILD= simple + +RUN_DEPENDS= www/spawn-fcgi +LIB_DEPENDS= devel/libev \ + devel/glib2 + +MODULES= devel/gettext + +CONFIGURE_STYLE= autoconf automake +AUTOCONF_VERSION= 2.68 +AUTOMAKE_VERSION= 1.11 + +post-patch: + cd ${WRKSRC}; AUTOCONF_VERSION=${AUTOCONF_VERSION} \ + AUTOMAKE_VERSION=${AUTOMAKE_VERSION} ./autogen.sh + +CONFIGURE_ARGS= CPPFLAGS="-I${LOCALBASE}/include ${CPPFLAGS}" \ + LDFLAGS="-lm -L${LOCALBASE}/lib ${LDFLAGS}" + +.include diff --git a/www/fcgi-cgi/distinfo b/www/fcgi-cgi/distinfo new file mode 100644 index 00000000000..967595985b4 --- /dev/null +++ b/www/fcgi-cgi/distinfo @@ -0,0 +1,5 @@ +MD5 (fcgi-cgi-0.1.8.tar.gz) = G4fqh/ZatLbdmPkkotqkGA== +RMD160 (fcgi-cgi-0.1.8.tar.gz) = 5Ezt4CrNHBjdcJKn3x0xA2wciqk= +SHA1 (fcgi-cgi-0.1.8.tar.gz) = I6dcEzvnB1yh/6YLFhDB8eXOWYk= +SHA256 (fcgi-cgi-0.1.8.tar.gz) = aOpA/9NpQEUUVRt3DLUrTpC8RWy59Hx+Ddm06q+21Nc= +SIZE (fcgi-cgi-0.1.8.tar.gz) = 14041 diff --git a/www/fcgi-cgi/patches/patch-fastcgi_c b/www/fcgi-cgi/patches/patch-fastcgi_c new file mode 100644 index 00000000000..01256b077dd --- /dev/null +++ b/www/fcgi-cgi/patches/patch-fastcgi_c @@ -0,0 +1,11 @@ +$OpenBSD: patch-fastcgi_c,v 1.1.1.1 2012/03/27 14:21:26 sthen Exp $ +--- fastcgi.c.orig Mon Feb 6 13:28:38 2012 ++++ fastcgi.c Mon Feb 6 13:28:45 2012 +@@ -5,6 +5,7 @@ + + #include "fastcgi.h" + ++#include + #include + #include + #include diff --git a/www/fcgi-cgi/pkg/DESCR b/www/fcgi-cgi/pkg/DESCR new file mode 100644 index 00000000000..cb5be6a9fd4 --- /dev/null +++ b/www/fcgi-cgi/pkg/DESCR @@ -0,0 +1,3 @@ +fcgi-cgi is a wrapper around CGI applications to support running them under +FastCGI for use with webservers such as nginx and lighttpd 2.x which do not +support running cgi scripts/binaries directly. diff --git a/www/fcgi-cgi/pkg/PLIST b/www/fcgi-cgi/pkg/PLIST new file mode 100644 index 00000000000..e05cdcb1782 --- /dev/null +++ b/www/fcgi-cgi/pkg/PLIST @@ -0,0 +1,4 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2012/03/27 14:21:26 sthen Exp $ +@bin bin/fcgi-cgi +@man man/man1/fcgi-cgi.1 +@rcscript ${RCDIR}/fcgi_cgi diff --git a/www/fcgi-cgi/pkg/fcgi_cgi.rc b/www/fcgi-cgi/pkg/fcgi_cgi.rc new file mode 100755 index 00000000000..fb04a34678a --- /dev/null +++ b/www/fcgi-cgi/pkg/fcgi_cgi.rc @@ -0,0 +1,13 @@ +#!/bin/sh +# +# $OpenBSD: fcgi_cgi.rc,v 1.1.1.1 2012/03/27 14:21:26 sthen Exp $ + +daemon="${TRUEPREFIX}/bin/spawn-fcgi" +daemon_flags="-a 127.0.0.1 -p 9001 -u www -U www -c /var/www -- ${TRUEPREFIX}/bin/fcgi-cgi" +pexp="${TRUEPREFIX}/bin/fcgi-cgi" + +. /etc/rc.d/rc.subr + +rc_reload=NO + +rc_cmd $1