[Midnightbsd-cvs] mports [18393] fix fcgi build
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Fri Mar 27 19:50:05 EDT 2015
Revision: 18393
http://svnweb.midnightbsd.org/mports/?rev=18393
Author: laffer1
Date: 2015-03-27 19:50:04 -0400 (Fri, 27 Mar 2015)
Log Message:
-----------
fix fcgi build
Modified Paths:
--------------
trunk/www/fcgi/Makefile
trunk/www/fcgi/pkg-descr
trunk/www/fcgi/pkg-plist
Added Paths:
-----------
trunk/www/fcgi/files/patch-CVE-2012-6687-pool
trunk/www/fcgi/files/patch-examples__Makefile.in
Property Changed:
----------------
trunk/www/fcgi/files/patch-include__fcgio.h
trunk/www/fcgi/pkg-descr
Modified: trunk/www/fcgi/Makefile
===================================================================
--- trunk/www/fcgi/Makefile 2015-03-27 23:41:55 UTC (rev 18392)
+++ trunk/www/fcgi/Makefile 2015-03-27 23:50:04 UTC (rev 18393)
@@ -2,39 +2,42 @@
PORTNAME= fcgi
PORTVERSION= 2.4.0
+PORTREVISION= 1
CATEGORIES= www
-MASTER_SITES= http://www.fastcgi.com/dist/
+MASTER_SITES= http://www.fastcgi.com/dist/ \
+ http://www.skysmurf.nl/comp/FreeBSD/distfiles/
PKGNAMESUFFIX= -devkit
MAINTAINER= ports at MidnightBSD.org
COMMENT= FastCGI Development Kit
-LICENSE= other
-USE_AUTOTOOLS= libtool
-USE_PERL5= yes
+LICENSE= Open_Market_FastCGI_license
+LICENSE_NAME= Open Market FastCGI license
+LICENSE_FILE= ${WRKSRC}/LICENSE.TERMS
+LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
+CPE_VENDOR= fastcgi
+
+OPTIONS_DEFINE= DOCS
+
+USES= cpe libtool
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
MAKE_JOBS_UNSAFE= yes
+CPE_VENDOR= fastcgi
-MAN1= cgi-fcgi.1
-MAN3= FCGI_Accept.3 FCGI_Finish.3 FCGI_SetExitStatus.3 \
- FCGI_StartFilterData.3
+OPTIONS_DEFINE= DOCS
+.include <bsd.mport.options.mk>
+
post-install:
-.for y in ${MAN1}
- @${INSTALL_MAN} ${WRKSRC}/doc/${y} ${MANPREFIX}/man/man1
-.endfor
-.for x in ${MAN3}
- @${INSTALL_MAN} ${WRKSRC}/doc/${x} ${MANPREFIX}/man/man3
-.endfor
-.if !defined(NOPORTDOCS)
- @${MKDIR} ${DOCSDIR}
- @${INSTALL_DATA} ${WRKSRC}/doc/*.htm* ${WRKSRC}/doc/*.gif \
- ${DOCSDIR}
-.for i in fastcgi-prog-guide fastcgi-whitepaper
- @${MKDIR} ${DOCSDIR}/${i}
- @${INSTALL_DATA} ${WRKSRC}/doc/${i}/* ${DOCSDIR}/$i
-.endfor
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libfcgi.so.0.0.0
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libfcgi++.so.0.0.0
+ ${INSTALL_MAN} ${WRKSRC}/doc/*.1 ${STAGEDIR}${MANPREFIX}/man/man1/
+ ${INSTALL_MAN} ${WRKSRC}/doc/*.3 ${STAGEDIR}${MANPREFIX}/man/man3/
+.if ${PORT_OPTIONS:MDOCS}
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}
+ @${RM} -f ${STAGEDIR}${DOCSDIR}/*.[13]
.endif
.include <bsd.port.mk>
Added: trunk/www/fcgi/files/patch-CVE-2012-6687-pool
===================================================================
--- trunk/www/fcgi/files/patch-CVE-2012-6687-pool (rev 0)
+++ trunk/www/fcgi/files/patch-CVE-2012-6687-pool 2015-03-27 23:50:04 UTC (rev 18393)
@@ -0,0 +1,81 @@
+diff --git a/libfcgi/os_unix.c b/libfcgi/os_unix.c
+index 73e6a7f..af35aee 100755
+--- libfcgi/os_unix.c
++++ libfcgi/os_unix.c
+@@ -42,6 +42,7 @@ static const char rcsid[] = "$Id: os_unix.c,v 1.37 2002/03/05 19:14:49 robs Exp
+ #include <sys/time.h>
+ #include <sys/un.h>
+ #include <signal.h>
++#include <poll.h>
+
+ #ifdef HAVE_NETDB_H
+ #include <netdb.h>
+@@ -103,6 +104,9 @@ static int volatile maxFd = -1;
+ static int shutdownPending = FALSE;
+ static int shutdownNow = FALSE;
+
++static int libfcgiOsClosePollTimeout = 2000;
++static int libfcgiIsAfUnixKeeperPollTimeout = 2000;
++
+ void OS_ShutdownPending()
+ {
+ shutdownPending = TRUE;
+@@ -168,6 +172,16 @@ int OS_LibInit(int stdioFds[3])
+ if(libInitialized)
+ return 0;
+
++ char *libfcgiOsClosePollTimeoutStr = getenv( "LIBFCGI_OS_CLOSE_POLL_TIMEOUT" );
++ if(libfcgiOsClosePollTimeoutStr) {
++ libfcgiOsClosePollTimeout = atoi(libfcgiOsClosePollTimeoutStr);
++ }
++
++ char *libfcgiIsAfUnixKeeperPollTimeoutStr = getenv( "LIBFCGI_IS_AF_UNIX_KEEPER_POLL_TIMEOUT" );
++ if(libfcgiIsAfUnixKeeperPollTimeoutStr) {
++ libfcgiIsAfUnixKeeperPollTimeout = atoi(libfcgiIsAfUnixKeeperPollTimeoutStr);
++ }
++
+ asyncIoTable = (AioInfo *)malloc(asyncIoTableSize * sizeof(AioInfo));
+ if(asyncIoTable == NULL) {
+ errno = ENOMEM;
+@@ -755,19 +769,16 @@ int OS_Close(int fd)
+
+ if (shutdown(fd, 1) == 0)
+ {
+- struct timeval tv;
+- fd_set rfds;
++ struct pollfd pfd;
+ int rv;
+ char trash[1024];
+
+- FD_ZERO(&rfds);
++ pfd.fd = fd;
++ pfd.events = POLLIN;
+
+ do
+ {
+- FD_SET(fd, &rfds);
+- tv.tv_sec = 2;
+- tv.tv_usec = 0;
+- rv = select(fd + 1, &rfds, NULL, NULL, &tv);
++ rv = poll(&pfd, 1, libfcgiOsClosePollTimeout);
+ }
+ while (rv > 0 && read(fd, trash, sizeof(trash)) > 0);
+ }
+@@ -1116,13 +1127,11 @@ static int is_reasonable_accept_errno (const int error)
+ */
+ static int is_af_unix_keeper(const int fd)
+ {
+- struct timeval tval = { READABLE_UNIX_FD_DROP_DEAD_TIMEVAL };
+- fd_set read_fds;
+-
+- FD_ZERO(&read_fds);
+- FD_SET(fd, &read_fds);
++ struct pollfd pfd;
++ pfd.fd = fd;
++ pfd.events = POLLIN;
+
+- return select(fd + 1, &read_fds, NULL, NULL, &tval) >= 0 && FD_ISSET(fd, &read_fds);
++ return poll(&pfd, 1, libfcgiIsAfUnixKeeperPollTimeout) >= 0 && (pfd.revents & POLLIN);
+ }
+
+ /*
Property changes on: trunk/www/fcgi/files/patch-CVE-2012-6687-pool
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/www/fcgi/files/patch-examples__Makefile.in
===================================================================
--- trunk/www/fcgi/files/patch-examples__Makefile.in (rev 0)
+++ trunk/www/fcgi/files/patch-examples__Makefile.in 2015-03-27 23:50:04 UTC (rev 18393)
@@ -0,0 +1,11 @@
+--- ./examples/Makefile.in.orig 2003-01-19 18:21:17.000000000 +0100
++++ ./examples/Makefile.in 2014-07-08 00:25:16.000000000 +0200
+@@ -125,7 +125,7 @@
+ threaded_LDFLAGS = @PTHREAD_CFLAGS@ @PTHREAD_LIBS@
+
+ echo_cpp_SOURCES = $(INCLUDE_FILES) $(INCLUDEDIR)/fcgio.h echo-cpp.cpp
+-echo_cpp_LDADD = $(LIBDIR)/libfcgi++.la
++echo_cpp_LDADD = $(LIBDIR)/libfcgi++.la $(LIBFCGI)
+ subdir = examples
+ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+ CONFIG_HEADER = $(top_builddir)/fcgi_config.h
Property changes on: trunk/www/fcgi/files/patch-examples__Makefile.in
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: trunk/www/fcgi/files/patch-include__fcgio.h
===================================================================
--- trunk/www/fcgi/files/patch-include__fcgio.h 2015-03-27 23:41:55 UTC (rev 18392)
+++ trunk/www/fcgi/files/patch-include__fcgio.h 2015-03-27 23:50:04 UTC (rev 18393)
Property changes on: trunk/www/fcgi/files/patch-include__fcgio.h
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Modified: trunk/www/fcgi/pkg-descr
===================================================================
--- trunk/www/fcgi/pkg-descr 2015-03-27 23:41:55 UTC (rev 18392)
+++ trunk/www/fcgi/pkg-descr 2015-03-27 23:50:04 UTC (rev 18393)
@@ -15,4 +15,4 @@
fast); if the server does not support FastCGI, then FastCGI applications
behave exactly like standard CGIs.
-WWW: http://www.fastcgi.com/
+WWW: http://www.fastcgi.com/
Property changes on: trunk/www/fcgi/pkg-descr
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.2
\ No newline at end of property
Modified: trunk/www/fcgi/pkg-plist
===================================================================
--- trunk/www/fcgi/pkg-plist 2015-03-27 23:41:55 UTC (rev 18392)
+++ trunk/www/fcgi/pkg-plist 2015-03-27 23:50:04 UTC (rev 18393)
@@ -7,13 +7,18 @@
include/fcgio.h
include/fcgios.h
lib/libfcgi++.a
-lib/libfcgi++.la
lib/libfcgi++.so
lib/libfcgi++.so.0
+lib/libfcgi++.so.0.0.0
lib/libfcgi.a
-lib/libfcgi.la
lib/libfcgi.so
lib/libfcgi.so.0
+lib/libfcgi.so.0.0.0
+man/man1/cgi-fcgi.1.gz
+man/man3/FCGI_Accept.3.gz
+man/man3/FCGI_Finish.3.gz
+man/man3/FCGI_SetExitStatus.3.gz
+man/man3/FCGI_StartFilterData.3.gz
%%PORTDOCS%%%%DOCSDIR%%/fastcgi-prog-guide/ap_guida.htm
%%PORTDOCS%%%%DOCSDIR%%/fastcgi-prog-guide/ap_guide.htm
%%PORTDOCS%%%%DOCSDIR%%/fastcgi-prog-guide/apaman.htm
More information about the Midnightbsd-cvs
mailing list