aboutsummaryrefslogtreecommitdiff
path: root/www/fcgiwrap
diff options
context:
space:
mode:
authorAdam Weinberger <adamw@FreeBSD.org>2016-12-26 17:10:09 +0000
committerAdam Weinberger <adamw@FreeBSD.org>2016-12-26 17:10:09 +0000
commit2d97b6fb47eeef27e067ad67c15860d6710d1486 (patch)
tree8d82141dcd954a8545a04de3ef831d2e4db2a1b6 /www/fcgiwrap
parentb2a57b112ee490e9a26dfbedcd1081ed13f6c1a0 (diff)
downloadports-2d97b6fb47eeef27e067ad67c15860d6710d1486.tar.gz
ports-2d97b6fb47eeef27e067ad67c15860d6710d1486.zip
Clean up and modernize fcgi and fcgiwrap. Unbreak fcgiwrap, for
which distfiles are readily available, and host the fcgi distfile locally.
Notes
Notes: svn path=/head/; revision=429554
Diffstat (limited to 'www/fcgiwrap')
-rw-r--r--www/fcgiwrap/Makefile11
-rw-r--r--www/fcgiwrap/files/patch-fcgiwrap.88
-rw-r--r--www/fcgiwrap/files/patch-fcgiwrap.c22
3 files changed, 21 insertions, 20 deletions
diff --git a/www/fcgiwrap/Makefile b/www/fcgiwrap/Makefile
index 85d90d2067f6..1f478e60d6c2 100644
--- a/www/fcgiwrap/Makefile
+++ b/www/fcgiwrap/Makefile
@@ -4,7 +4,6 @@ PORTNAME= fcgiwrap
PORTVERSION= 1.1.0
PORTREVISION= 4
CATEGORIES= www
-MASTER_SITES= http://www.skysmurf.nl/comp/FreeBSD/distfiles/
MAINTAINER= adamw@FreeBSD.org
COMMENT= Simple FastCGI wrapper for CGI scripts
@@ -13,8 +12,6 @@ LICENSE= MIT
LIB_DEPENDS= libfcgi.so:www/fcgi
-BROKEN= unfetchable
-
USES= autoreconf gmake pkgconfig
USE_GITHUB= yes
@@ -22,13 +19,17 @@ GH_ACCOUNT= gnosek
USE_RC_SUBR= fcgiwrap
-CFLAGS+= -I${LOCALBASE}/include -L${LOCALBASE}/lib
+CPPFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
GNU_CONFIGURE= yes
PLIST_FILES= sbin/fcgiwrap man/man8/fcgiwrap.8.gz
post-patch:
@${REINPLACE_CMD} -e 's/@prefix@@mandir@/@mandir@/'\
- -e 's|-m 755 fcgiwrap|-s -m 755 fcgiwrap|' ${WRKSRC}/Makefile.in
+ ${WRKSRC}/Makefile.in
+
+post-install:
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/fcgiwrap
.include <bsd.port.mk>
diff --git a/www/fcgiwrap/files/patch-fcgiwrap.8 b/www/fcgiwrap/files/patch-fcgiwrap.8
index 5d12faf8b96c..9300c4128607 100644
--- a/www/fcgiwrap/files/patch-fcgiwrap.8
+++ b/www/fcgiwrap/files/patch-fcgiwrap.8
@@ -1,6 +1,6 @@
---- fcgiwrap.8.orig 2014-09-22 12:44:32.000000000 +0200
-+++ fcgiwrap.8 2014-09-22 12:51:14.000000000 +0200
-@@ -42,6 +42,9 @@
+--- fcgiwrap.8.orig 2013-02-03 13:25:17 UTC
++++ fcgiwrap.8
+@@ -42,6 +42,9 @@ takes care of opening the socket. Howeve
tests this option may be used. Valid socket_urls include \fIunix:/path/to/unix/socket\fP,
\fItcp:dot.ted.qu.ad:port\fP and \fItcp6:[ipv6_addr]:port\fP.
.TP
@@ -10,7 +10,7 @@
.B \-h
Show a help message and exit.
-@@ -113,3 +116,8 @@
+@@ -113,3 +116,8 @@ with contributions by W-Mark Kubacki <wm
This manual page was written by Jordi Mallach <jordi@debian.org>
(with contributions by Grzegorz Nosek)
for the Debian project (and may be used by others).
diff --git a/www/fcgiwrap/files/patch-fcgiwrap.c b/www/fcgiwrap/files/patch-fcgiwrap.c
index 0b6295ee466f..f4d280093de0 100644
--- a/www/fcgiwrap/files/patch-fcgiwrap.c
+++ b/www/fcgiwrap/files/patch-fcgiwrap.c
@@ -1,5 +1,5 @@
---- fcgiwrap.c.orig 2013-02-03 14:25:17.000000000 +0100
-+++ fcgiwrap.c 2014-12-22 13:25:23.000000000 +0100
+--- fcgiwrap.c.orig 2013-02-03 13:25:17 UTC
++++ fcgiwrap.c
@@ -43,6 +43,7 @@
#include <ctype.h>
@@ -17,7 +17,7 @@
static const char * blacklisted_env_vars[] = {
"AUTH_TYPE",
-@@ -485,6 +488,19 @@
+@@ -485,6 +488,19 @@ static void inherit_environment(void)
}
}
@@ -37,7 +37,7 @@
static void cgi_error(const char *message, const char *reason, const char *filename)
{
printf("Status: %s\r\nContent-Type: text/plain\r\n\r\n%s\r\n",
-@@ -541,6 +557,9 @@
+@@ -541,6 +557,9 @@ static void handle_fcgi_request(void)
if (!filename)
cgi_error("403 Forbidden", "Cannot get script name, are DOCUMENT_ROOT and SCRIPT_NAME (or SCRIPT_FILENAME) set and is the script executable?", NULL);
@@ -47,7 +47,7 @@
last_slash = strrchr(filename, '/');
if (!last_slash)
cgi_error("403 Forbidden", "Script name must be a fully qualified path", filename);
-@@ -587,14 +606,29 @@
+@@ -587,14 +606,29 @@ err_pipein:
FCGI_puts("System error");
}
@@ -78,7 +78,7 @@
handle_fcgi_request();
}
}
-@@ -671,7 +705,7 @@
+@@ -671,7 +705,7 @@ static int listen_on_fd(int fd) {
return 0;
}
@@ -87,7 +87,7 @@
char *p = url;
char *q;
int fd;
-@@ -751,6 +785,7 @@
+@@ -751,6 +785,7 @@ invalid_url:
return -1;
}
@@ -95,7 +95,7 @@
return listen_on_fd(fd);
}
-@@ -758,9 +793,10 @@
+@@ -758,9 +793,10 @@ int main(int argc, char **argv)
{
int nchildren = 1;
char *socket_url = NULL;
@@ -107,7 +107,7 @@
switch (c) {
case 'f':
stderr_to_fastcgi++;
-@@ -773,6 +809,7 @@
+@@ -773,6 +809,7 @@ int main(int argc, char **argv)
" -c <number>\t\tNumber of processes to prefork\n"
" -s <socket_url>\tSocket to bind to (say -s help for help)\n"
" -h\t\t\tShow this help message and exit\n"
@@ -115,7 +115,7 @@
"\nReport bugs to Grzegorz Nosek <"PACKAGE_BUGREPORT">.\n"
PACKAGE_NAME" home page: <http://nginx.localdomain.pl/wiki/FcgiWrap>\n",
argv[0]
-@@ -784,8 +821,14 @@
+@@ -784,8 +821,14 @@ int main(int argc, char **argv)
case 's':
socket_url = strdup(optarg);
break;
@@ -131,7 +131,7 @@
fprintf(stderr, "Option -%c requires an argument.\n", optopt);
else if (isprint(optopt))
fprintf(stderr, "Unknown option `-%c'.\n", optopt);
-@@ -808,13 +851,24 @@
+@@ -808,13 +851,24 @@ int main(int argc, char **argv)
} else
#endif
if (socket_url) {