aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoroliver <oliver@FreeBSD.org>2005-05-31 00:36:17 +0800
committeroliver <oliver@FreeBSD.org>2005-05-31 00:36:17 +0800
commit41d68dfc18281068bc2e6267bcac1575204d312e (patch)
tree4e5bb2ed02a9190f802ee21a613e10cd0a065409
parentce3d4b71ddebe52df3e7d97d175d3f3a3e41d28c (diff)
downloadfreebsd-ports-gnome-41d68dfc18281068bc2e6267bcac1575204d312e.tar.gz
freebsd-ports-gnome-41d68dfc18281068bc2e6267bcac1575204d312e.tar.zst
freebsd-ports-gnome-41d68dfc18281068bc2e6267bcac1575204d312e.zip
fix build I broke
PR: ports/81671 Submitted by: Vasil Dimov <vd@datamax.bg> Noted by: kris via pointyhat Pointyhat to: oliver
-rw-r--r--www/pserv/Makefile5
-rw-r--r--www/pserv/files/patch-handlers.c26
-rw-r--r--www/pserv/files/patch-main.h2
-rw-r--r--www/pserv/files/patch-pserv.conf2
-rw-r--r--www/pserv/pkg-plist5
5 files changed, 19 insertions, 21 deletions
diff --git a/www/pserv/Makefile b/www/pserv/Makefile
index 41222052095b..9cb0e71abd5d 100644
--- a/www/pserv/Makefile
+++ b/www/pserv/Makefile
@@ -36,8 +36,9 @@ post-patch:
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/sources/pserv ${PREFIX}/sbin/
- ${INSTALL_DATA} ${WRKSRC}/defaults/mime_types.dat ${PREFIX}/etc/mime.types.pserv
- ${INSTALL_DATA} ${WRKSRC}/defaults/pserv.conf ${PREFIX}/etc/
+ ${MKDIR} ${PREFIX}/etc/pserv
+ ${INSTALL_DATA} ${WRKSRC}/defaults/mime_types.dat ${PREFIX}/etc/pserv/mime.types
+ ${INSTALL_DATA} ${WRKSRC}/defaults/pserv.conf ${PREFIX}/etc/pserv/
${INSTALL_SCRIPT} ${FILESDIR}/pserv.sh ${PREFIX}/etc/rc.d/
.include <bsd.port.post.mk>
diff --git a/www/pserv/files/patch-handlers.c b/www/pserv/files/patch-handlers.c
index c3a602e951f0..93f4a73df9c8 100644
--- a/www/pserv/files/patch-handlers.c
+++ b/www/pserv/files/patch-handlers.c
@@ -1,5 +1,5 @@
---- sources/handlers.c.orig Mon May 16 23:03:16 2005
-+++ sources/handlers.c Sat May 28 10:38:18 2005
+--- sources/handlers.c.orig Tue May 17 00:03:16 2005
++++ sources/handlers.c Mon May 30 11:44:23 2005
@@ -25,6 +25,7 @@
#endif
@@ -23,7 +23,7 @@
strcpy(newEnvp[i], "SERVER_SOFTWARE=");
strcat(newEnvp[i], SERVER_SOFTWARE_STR);
strcat(newEnvp[i], "/");
-@@ -326,8 +335,237 @@
+@@ -326,8 +335,233 @@
}
#endif /* ENABLE_CGI */
@@ -36,7 +36,7 @@
+struct request req;
+char *postStr;
+{
-+ char envPath[MAX_PATH_LEN+1]; /* where to hold the envrion PATH parameter */
++ char *envPath; /* pointer to the envrionment PATH variable */
+ char *relativePath;
+ char scriptWorkingDir[MAX_PATH_LEN+1];
+ char **newArgv;
@@ -137,16 +137,8 @@
+ newEnvp[i] = calloc(MAX_PATH_LEN, sizeof(char));
+ }
+
-+
-+
-+ /* extracting PATH env variable */
-+ i = 0;
-+ while (environ && strncmp(environ[i], PATH_MATCH_STRING, strlen(PATH_MATCH_STRING)))
-+ i++;
-+ if(environ[i])
-+ strcpy(envPath, environ[i]);
-+ else
-+ envPath[0] = '\0'; /* maybe we should set some default? */
++ /* extract PATH env variable */
++ envPath = getenv("PATH");
+
+ i = 0;
+ strcpy(newArgv[i++], phpFileName); /* here we should pass the phppath */
@@ -205,7 +197,6 @@
+ strcpy(newEnvp[i], "GATEWAY_INTERFACE=");
+ strcat(newEnvp[i++], CGI_VERSION);
+ sprintf(newEnvp[i++], "SERVER_PORT=%d", port);
-+ strcpy(newEnvp[i++], envPath);
+ strcpy(newEnvp[i], "QUERY_STRING=");
+ strcat(newEnvp[i++], req.queryString);
+ strcpy(newEnvp[i], "SERVER_PROTOCOL=");
@@ -221,6 +212,11 @@
+ strcpy(newEnvp[i], "HTTP_COOKIE=");
+ strcat(newEnvp[i++], req.cookie);
+ }
++ if (envPath != NULL)
++ {
++ strcpy(newEnvp[i], "PATH=");
++ strcat(newEnvp[i++], envPath);
++ }
+ newEnvp[i] = NULL;
+
+ /* we change the current working directory to the scripts one */
diff --git a/www/pserv/files/patch-main.h b/www/pserv/files/patch-main.h
index 723591350aa3..6bc63310019c 100644
--- a/www/pserv/files/patch-main.h
+++ b/www/pserv/files/patch-main.h
@@ -29,7 +29,7 @@
-#define DEFAULT_MIME_FILE "/usr/local/etc/pserv/mime_types.dat"
-#define DEFAULT_CGI_ROOT "/usr/local/var/www/cgi-bin"
+#define DEFAULT_LOG_FILE "/var/log/pserv.log"
-+#define DEFAULT_MIME_FILE "%%PREFIX%%/etc/mime.types.pserv"
++#define DEFAULT_MIME_FILE "%%PREFIX%%/etc/pserv/mime.types"
+#define DEFAULT_PHP_FILE "%%LOCALBASE%%/bin/php"
+#define DEFAULT_CGI_ROOT "%%PREFIX%%/www/cgi-bin"
#define DEFAULT_SERVER_NAME "localhost"
diff --git a/www/pserv/files/patch-pserv.conf b/www/pserv/files/patch-pserv.conf
index 967831f614d7..6559d046f677 100644
--- a/www/pserv/files/patch-pserv.conf
+++ b/www/pserv/files/patch-pserv.conf
@@ -13,6 +13,6 @@
-mimeTypesFile /usr/local/etc/pserv/mime_types.dat
-cgiRoot /usr/local/var/www/cgi-bin
+logFile /var/log/pserv.log
-+mimeTypesFile %%PREFIX%%/etc/mime.types.pserv
++mimeTypesFile %%PREFIX%%/etc/pserv/mime.types
+phpFile %%LOCALBASE%%/bin/php
+cgiRoot %%PREFIX%%/www/cgi-bin
diff --git a/www/pserv/pkg-plist b/www/pserv/pkg-plist
index 23f610d3cfe9..2f391fad53e0 100644
--- a/www/pserv/pkg-plist
+++ b/www/pserv/pkg-plist
@@ -1,4 +1,5 @@
sbin/pserv
-etc/mime.types.pserv
-etc/pserv.conf
+etc/pserv/mime.types
+etc/pserv/pserv.conf
etc/rc.d/pserv.sh
+@dirrm etc/pserv