aboutsummaryrefslogtreecommitdiffstats
path: root/www/mod_frontpage2-rtr
diff options
context:
space:
mode:
authorlawrance <lawrance@FreeBSD.org>2006-02-11 12:32:03 +0800
committerlawrance <lawrance@FreeBSD.org>2006-02-11 12:32:03 +0800
commit384733ded00765646f3dd0a2b76b1778e2e54205 (patch)
tree9fc1a0db4a50ace313becc114678735bc8e20ab7 /www/mod_frontpage2-rtr
parent6f083fab2e76d46bbc0bab6810c869a7278f6a11 (diff)
downloadfreebsd-ports-gnome-384733ded00765646f3dd0a2b76b1778e2e54205.tar.gz
freebsd-ports-gnome-384733ded00765646f3dd0a2b76b1778e2e54205.tar.zst
freebsd-ports-gnome-384733ded00765646f3dd0a2b76b1778e2e54205.zip
Allow frontpage ports to build with Apache 2.2.
PR: ports/91968 Submitted by: Scot Hetzel <swhetzel@gmail.com> (maintainer)
Diffstat (limited to 'www/mod_frontpage2-rtr')
-rw-r--r--www/mod_frontpage2-rtr/Makefile73
-rw-r--r--www/mod_frontpage2-rtr/files/patch-apache2::mod_fpcgid.c105
-rw-r--r--www/mod_frontpage2-rtr/files/patch-apache2::mod_frontpage.c81
-rw-r--r--www/mod_frontpage2-rtr/pkg-message15
-rw-r--r--www/mod_frontpage2-rtr/pkg-message1317
-rw-r--r--www/mod_frontpage2-rtr/pkg-plist3
6 files changed, 210 insertions, 84 deletions
diff --git a/www/mod_frontpage2-rtr/Makefile b/www/mod_frontpage2-rtr/Makefile
index 0d82cde50708..485053482a8c 100644
--- a/www/mod_frontpage2-rtr/Makefile
+++ b/www/mod_frontpage2-rtr/Makefile
@@ -7,10 +7,10 @@
PORTNAME= mod_frontpage
PORTVERSION= 5.0.2.2635
-PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= # Requries manual fetch of files from http://www.rtr.com/
-PKGNAMESUFFIX= ${AP_VER}
+PKGNAMESUFFIX= ${AP_VERSION:S/+//}
DISTFILES= ${FRONTPAGE}
MAINTAINER= swhetzel@gmail.com
@@ -22,43 +22,44 @@ DIST_SUBDIR= fp${PORTVERSION:S/.//g}
ONLY_FOR_ARCHS= i386 ia64 amd64 alpha sparc64
-USE_REINPLACE= yes
+PATCH_WRKSRC= ${WRKDIR}
-WANT_APACHE?= 2
+FPDIR= frontpage/version${FP_VER}
-.include <bsd.port.pre.mk>
-.include "${.CURDIR}/../apache20/Makefile.modules.3rd"
-.include "${.CURDIR}/../frontpage/Makefile.fp.common"
+EXTRACT_FILES= ${FPDIR}/apache-fp/mod_frontpage.c \
+ ${FPDIR}/apache2/mod_fpcgid.c \
+ ${FPDIR}/apache2/mod_fpcgid.h \
+ ${FPDIR}/apache2/mod_frontpage.c \
+ ${FPDIR}/apache2/mod_frontpage.h \
+ ${FPDIR}/apache2/mod_suexec.h
-.ifdef WITH_APACHE2
-FP_AP_VER= 2.0
-APACHE= apache2
-.else
-FP_AP_VER= 1.3
-APACHE= apache
-.endif
+USE_APACHE?= 20+
+AP_FAST_BUILD= yes
+AP_GENPLIST= yes
+
+AP_EXTRAS= -Wc,-DFreeBSD
-FPDIR= frontpage/version${FP_VER}
-FP_INSTALL= ${FPDIR}/fp_install.sh
FP_SETPERM= ${FPDIR}/set_default_perms.sh
.ifdef WITH_MODFP_COMPAT
-FP_ARGS= -DIMPROVED_MODFP_COMPAT
+AP_EXTRAS+= -DIMPROVED_MODFP_COMPAT
.endif
-.ifdef WITH_DISABLED
-FP_ARGS+= -DDEFAULT_TO_OFF
+.ifdef WITH_DISAPLED
+AP_EXTRAS+= -DDEFAULT_TO_OFF
.endif
-NO_WRKSUBDIR= yes
-EXTRACT_FILES= ${FPDIR}/apache-fp/mod_frontpage.c \
- ${FPDIR}/apache2/mod_fpcgid.c \
- ${FPDIR}/apache2/mod_fpcgid.h \
- ${FPDIR}/apache2/mod_frontpage.c \
- ${FPDIR}/apache2/mod_frontpage.h \
- ${FPDIR}/apache2/mod_suexec.h
+.include <bsd.port.pre.mk>
+.include "${.CURDIR}/../frontpage/Makefile.fp.common"
-PLIST_SUB+= FP_VER=${FP_VER} \
- APACHE=${APACHE}
+.if ${APACHE_VERSION} >= 20
+FP_AP_VER= 2.0
+WRKSRC= ${WRKDIR}/${FPDIR}/apache2
+SRC_FILE= mod_frontpage.c mod_fpcgid.c
+.else
+FP_AP_VER= 1.3
+WRKSRC= ${WRKDIR}/${FPDIR}/apache-fp
+PKGMESSAGE= ${MASTERDIR}/pkg-message13
+.endif
do-extract:
@${RM} -rf ${WRKDIR}
@@ -69,22 +70,6 @@ do-extract:
exit 1; \
fi
-do-build:
-.ifdef WITH_APACHE2
- @${APXS} -c -Wc,-DFREEBSD ${FP_ARGS} ${WRKDIR}/${FPDIR}/apache2/mod_frontpage.c \
- ${WRKDIR}/${FPDIR}/apache2/mod_fpcgid.c
-.else
- @(cd ${WRKDIR}/${FPDIR}/apache-fp && \
- ${APXS} -c -Wc,-DFREEBSD ${FP_ARGS} ${WRKDIR}/${FPDIR}/apache-fp/mod_frontpage.c)
-.endif
-
-do-install:
-.ifdef WITH_APACHE2
- @${APXS} -i -a -n frontpage ${WRKDIR}/${FPDIR}/apache2/mod_frontpage.la
-.else
- @${APXS} -i -a -n frontpage ${WRKDIR}/${FPDIR}/apache-fp/mod_frontpage.so
-.endif
-
post-install:
.if (${PREFIX} != "/usr/local")
@${CAT} ${PKGMESSAGE} | ${SED} -e 's|%%PREFIX%%|${PREFIX}|'
diff --git a/www/mod_frontpage2-rtr/files/patch-apache2::mod_fpcgid.c b/www/mod_frontpage2-rtr/files/patch-apache2::mod_fpcgid.c
index fb94895807a4..1d4a651bc729 100644
--- a/www/mod_frontpage2-rtr/files/patch-apache2::mod_fpcgid.c
+++ b/www/mod_frontpage2-rtr/files/patch-apache2::mod_fpcgid.c
@@ -1,15 +1,17 @@
---- frontpage/version5.0/apache2/mod_fpcgid.c.orig Thu Jan 9 12:19:29 2003
-+++ frontpage/version5.0/apache2/mod_fpcgid.c Wed Feb 12 10:30:45 2003
-@@ -121,8 +121,6 @@
+--- frontpage/version5.0/apache2/mod_fpcgid.c-orig Fri Jun 27 15:18:28 2003
++++ frontpage/version5.0/apache2/mod_fpcgid.c Tue Jan 17 18:01:02 2006
+@@ -120,8 +120,8 @@
+ #include <sys/stat.h>
#include <sys/un.h> /* for sockaddr_un */
-
--module AP_MODULE_DECLARE_DATA frontpage_module;
-
+-module AP_MODULE_DECLARE_DATA frontpage_module;
++#include "mpm_common.h"
++#include "httpd.h"
+
#if 0
This section is not used in the FrontPage daemon.
- static int cgid_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *main_server);
-@@ -187,13 +185,6 @@
+@@ -187,13 +187,6 @@
#define DEFAULT_CONNECT_ATTEMPTS 15
#endif
@@ -23,7 +25,16 @@
/* If a request includes query info in the URL (stuff after "?"), and
* the query info does not contain "=" (indicative of a FORM submission),
* then this routine is called to create the argument list to be passed
-@@ -755,21 +746,42 @@
+@@ -685,7 +678,7 @@
+ /* Bad things happened. Everyone should have cleaned up. */
+ ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, rc, r,
+ "couldn't create child process: %d: %s", rc,
+- apr_filename_of_pathname(r->filename));
++ apr_filepath_name_get(r->filename));
+ }
+ }
+ frontpage_closePipeWrite(&pipe_info);
+@@ -755,9 +748,12 @@
void* fpcreate_cgid_config(apr_pool_t *p, server_rec *s)
{
@@ -31,21 +42,14 @@
- (cgid_server_conf *) apr_pcalloc(p, sizeof(cgid_server_conf));
+ cgid_server_conf *c;
-- c->logname = NULL;
-- c->logbytes = DEFAULT_LOGBYTES;
-- c->bufbytes = DEFAULT_BUFBYTES;
-- c->sockname = ap_server_root_relative(p, DEFAULT_SOCKET);
-- return c;
+ c = (cgid_server_conf *) apr_pcalloc(p, sizeof(cgid_server_conf));
+
+ c->fp_status = -1;
+ c->fp_admin_status = -1;
-+ c->logname = NULL;
-+ c->logbytes = DEFAULT_LOGBYTES;
-+ c->bufbytes = DEFAULT_BUFBYTES;
-+ c->sockname = ap_server_root_relative(p, DEFAULT_SOCKET);
-+ return c;
- }
+ c->logname = NULL;
+ c->logbytes = DEFAULT_LOGBYTES;
+ c->bufbytes = DEFAULT_BUFBYTES;
+@@ -767,9 +763,27 @@
void* fpmerge_cgid_config(apr_pool_t *p, void *basev, void *overridesv)
{
@@ -75,7 +79,7 @@
}
static const char *set_scriptlog(cmd_parms *cmd, void *dummy, const char *arg)
-@@ -823,8 +835,76 @@
+@@ -823,8 +837,76 @@
return NULL;
}
@@ -152,3 +156,64 @@
AP_INIT_TAKE1("FPScriptLog", set_scriptlog, NULL, RSRC_CONF,
"the name of a log for script debugging info"),
AP_INIT_TAKE1("FPScriptLogLength", set_scriptlog_length, NULL, RSRC_CONF,
+@@ -935,12 +1017,13 @@
+ apr_file_printf(f, "%s\n", sbuf);
+
+ first = 1;
+- APR_BRIGADE_FOREACH(e, bb) {
++ e = APR_BRIGADE_FIRST(bb);
++ while (e != APR_BRIGADE_SENTINEL(bb)) {
+ if (APR_BUCKET_IS_EOS(e)) {
+ break;
+ }
+ rv = apr_bucket_read(e, &buf, &len, APR_BLOCK_READ);
+- if (!APR_STATUS_IS_SUCCESS(rv) || (len == 0)) {
++ if ((rv != APR_SUCCESS) || (len == 0)) {
+ break;
+ }
+ if (first) {
+@@ -949,6 +1032,7 @@
+ }
+ apr_file_write(f, buf, &len);
+ apr_file_puts("\n", f);
++ e = APR_BUCKET_NEXT(e);
+ }
+
+ if (script_err) {
+@@ -1036,14 +1120,16 @@
+ const char *buf;
+ apr_size_t len;
+ apr_status_t rv;
+- APR_BRIGADE_FOREACH(e, bb) {
++ e = APR_BRIGADE_FIRST(bb);
++ while (e != APR_BRIGADE_SENTINEL(bb)) {
+ if (APR_BUCKET_IS_EOS(e)) {
+ break;
+ }
+ rv = apr_bucket_read(e, &buf, &len, APR_BLOCK_READ);
+- if (!APR_STATUS_IS_SUCCESS(rv)) {
++ if (rv != APR_SUCCESS) {
+ break;
+ }
++ e = APR_BUCKET_NEXT(e);
+ }
+ }
+
+@@ -1179,7 +1265,8 @@
+ return rv;
+ }
+
+- APR_BRIGADE_FOREACH(bucket, bb) {
++ bucket = APR_BRIGADE_FIRST(bb);
++ while (bucket != APR_BRIGADE_SENTINEL(bb)) {
+ const char *data;
+ apr_size_t len;
+
+@@ -1223,6 +1310,7 @@
+ /* silly script stopped reading, soak up remaining message */
+ child_stopped_reading = 1;
+ }
++ bucket = APR_BUCKET_NEXT(bucket);
+ }
+ apr_brigade_cleanup(bb);
+ }
diff --git a/www/mod_frontpage2-rtr/files/patch-apache2::mod_frontpage.c b/www/mod_frontpage2-rtr/files/patch-apache2::mod_frontpage.c
index 39973b181ca0..812a64a055c8 100644
--- a/www/mod_frontpage2-rtr/files/patch-apache2::mod_frontpage.c
+++ b/www/mod_frontpage2-rtr/files/patch-apache2::mod_frontpage.c
@@ -1,6 +1,14 @@
---- frontpage/version5.0/apache2/mod_frontpage.c.orig Thu Jan 9 12:19:30 2003
-+++ frontpage/version5.0/apache2/mod_frontpage.c Wed Feb 12 11:29:29 2003
-@@ -578,6 +578,32 @@
+--- frontpage/version5.0/apache2/mod_frontpage.c-orig Tue Dec 2 20:18:45 2003
++++ frontpage/version5.0/apache2/mod_frontpage.c Tue Jan 17 18:01:02 2006
+@@ -62,7 +62,6 @@
+ #include <dirent.h>
+ #include <errno.h>
+ #include <unistd.h>
+-#include "apr_compat.h"
+ #include "apr_strings.h"
+ #include "http_log.h"
+
+@@ -590,6 +589,32 @@
* Thanks to Scot Hetzel (hetzels@westbend.net)
*/
ap_add_version_component(p, "FrontPage/5.0.2.2635");
@@ -33,7 +41,47 @@
return OK;
}
-@@ -836,6 +862,27 @@
+@@ -781,20 +806,20 @@
+ return DECLINED;
+
+ /*
+- * Note: ap_pstrdup allocates memory, but it checks for out of memory
++ * Note: apr_pstrdup allocates memory, but it checks for out of memory
+ * conditions - it will not return if out of memory.
+ */
+- r->handler = ap_pstrdup(r->pool, "cgi-script");
+- ap_table_set(r->notes, "alias-forced-type", r->handler);
++ r->handler = apr_pstrdup(r->pool, "cgi-script");
++ apr_table_set(r->notes, "alias-forced-type", r->handler);
+
+- ap_table_set(r->subprocess_env, "FPEXE", ap_pstrdup(r->pool, szFpexe));
++ apr_table_set(r->subprocess_env, "FPEXE", apr_pstrdup(r->pool, szFpexe));
+ sprintf(szBuf, "%d", webroot.st_uid );
+- ap_table_set(r->subprocess_env, "FPUID", ap_pstrdup(r->pool, szBuf));
++ apr_table_set(r->subprocess_env, "FPUID", apr_pstrdup(r->pool, szBuf));
+ sprintf(szBuf, "%d", webroot.st_gid );
+- ap_table_set(r->subprocess_env, "FPGID", ap_pstrdup(r->pool, szBuf));
++ apr_table_set(r->subprocess_env, "FPGID", apr_pstrdup(r->pool, szBuf));
+
+- ap_table_set(r->notes,"FPexecfilename", ap_pstrcat(r->pool, FPSTUB, NULL));
+- r->filename = ap_pstrcat(r->pool, r->filename, szCgi, NULL);
++ apr_table_set(r->notes,"FPexecfilename", apr_pstrcat(r->pool, FPSTUB, NULL));
++ r->filename = apr_pstrcat(r->pool, r->filename, szCgi, NULL);
+
+ return OK;
+ }
+@@ -836,8 +861,8 @@
+ sprintf(szBuf, "/%04d", iLcid);
+
+ /* see the note in FrontPageAlias */
+- execFilename = ap_pstrcat(r->pool, FP, szDir, szBuf, szBase, NULL);
+- ap_table_set(r->notes,"FPexecfilename", execFilename);
++ execFilename = apr_pstrcat(r->pool, FP, szDir, szBuf, szBase, NULL);
++ apr_table_set(r->notes,"FPexecfilename", execFilename);
+ /* We need to set the finfo field now. Otherwise Apache will set
+ the path_info field automatically but incorrectly, which will result
+ in the wrong file being checked.
+@@ -849,6 +874,27 @@
/*
@@ -61,7 +109,7 @@
* This routine looks for shtml.exe, fpcount.exe, author.exe and admin.exe
* in a URI, and if found we call FrontPageAlias() to check for a valid
* FrontPage scenario.
-@@ -847,6 +894,7 @@
+@@ -860,6 +906,7 @@
{
char* szVti;
char* szCgi;
@@ -69,7 +117,7 @@
/*
* Decline if we're improperly initialized.
-@@ -855,6 +903,13 @@
+@@ -868,6 +915,13 @@
return DECLINED;
/*
@@ -83,7 +131,7 @@
* Check once for anything with _vti_bin. This is much faster than
* checking all our paths, because anything without this is definitely
* not a FrontPage scenario.
-@@ -875,7 +930,7 @@
+@@ -888,7 +942,7 @@
return FrontPageAlias(r, szCgi, AUTHOR);
/*
* Convert inadvertent shtml.dll to shtml.exe
@@ -92,7 +140,7 @@
*/
if ((szCgi = strstr(szVti, SHTML2 )))
{
-@@ -885,9 +940,17 @@
+@@ -898,9 +952,17 @@
if ((szCgi = strstr(szVti, SHTML )))
return FrontPageAlias(r, szCgi, SHTML);
if ((szCgi = strstr(szVti, ADMIN )))
@@ -112,3 +160,20 @@
if ((szCgi = strstr(szVti, FPCOUNT)))
return FrontPageAlias(r, szCgi, FPCOUNT);
+@@ -939,13 +1001,13 @@
+ static int FrontPageFixup(request_rec *r)
+ {
+
+- if (!ap_table_get(r->notes, "FPexecfilename"))
++ if (!apr_table_get(r->notes, "FPexecfilename"))
+ {
+ FrontPageXlate(r);
+ }
+- if (ap_table_get(r->notes,"FPexecfilename"))
++ if (apr_table_get(r->notes,"FPexecfilename"))
+ {
+- r->filename = (char*) ap_table_get(r->notes,"FPexecfilename");
++ r->filename = (char*) apr_table_get(r->notes,"FPexecfilename");
+ apr_stat(&r->finfo, r->filename, APR_FINFO_MIN, r->pool);
+ }
+
diff --git a/www/mod_frontpage2-rtr/pkg-message b/www/mod_frontpage2-rtr/pkg-message
index 4d4091408320..4b594c9a71e9 100644
--- a/www/mod_frontpage2-rtr/pkg-message
+++ b/www/mod_frontpage2-rtr/pkg-message
@@ -2,6 +2,13 @@
1.)
+The Frontpage module has been added to your Apache httpd.conf file,
+as an inactive module. To activate this module:
+
+ apxs -e -a -n frontpage mod_frontpage.so
+
+2.)
+
You'll need to change the AllowOverride directive in
%%PREFIX%%/etc/apache2/httpd.conf under the
default web from None to at least "AuthConfig Limit Indexes Options".
@@ -20,7 +27,7 @@ You'll also need to change the AllowOverride Directive on all
virtual hosts that you are going to enable with Frontpage Extentions.
-2.)
+3.)
You can turn the extensions and the frontpage administration on/off
per site in httpd.conf and per virtual server.
@@ -43,7 +50,7 @@ FrontPageAdminEnable # Same as 'FrontPageAdmin On'
FrontPageAdminDisable # Same as 'FrontPageAdmin Off'
-3.)
+4.)
If this is a fresh Apache install, you should remove the symbolic link
to the %%PREFIX%%/www/data directory, and create a real directory.
@@ -52,7 +59,7 @@ rm %%PREFIX%%/www/data
mkdir %%PREFIX%%/www/data
-4.)
+5.)
After you have made these changes, you'll need to execute:
@@ -70,7 +77,7 @@ check the document root for .htaccess files. Rename them, and then combine
them with the .htaccess files created by the frontpage install.
-5.)
+6.)
If you have installed the port in another PREFIX than "/usr/local"
you have to create a symlink. Microsoft has hardcoded the local
diff --git a/www/mod_frontpage2-rtr/pkg-message13 b/www/mod_frontpage2-rtr/pkg-message13
index 72fc01f10b0c..da70af0e46b3 100644
--- a/www/mod_frontpage2-rtr/pkg-message13
+++ b/www/mod_frontpage2-rtr/pkg-message13
@@ -2,6 +2,13 @@
1.)
+The Frontpage module has been added to your Apache httpd.conf file,
+as an inactive module. To activate this module:
+
+ apxs -e -a -n frontpage mod_frontpage.so
+
+2.)
+
Check your httpd.conf, if you have included a ResourceConfig and
AccessConfig. If you do not have these files, you'll have to add
these lines to make the frontpage extensions work properly. These
@@ -13,7 +20,7 @@ ResourceConfig /dev/null
AccessConfig /dev/null
-2.)
+3.)
You'll need to change the AllowOverride directive under the
default web from None to at least "AuthConfig Limit Indexes Options".
@@ -32,7 +39,7 @@ You'll also need to change the AllowOverride Directive on all
virtual hosts that you are going to enable with Frontpage Extentions.
-3.)
+4.)
You can turn the extensions and the frontpage administration on/off
per site in httpd.conf and per virtual server.
@@ -55,7 +62,7 @@ FrontPageAdminEnable # Same as 'FrontPageAdmin On'
FrontPageAdminDisable # Same as 'FrontPageAdmin Off'
-4.)
+5.)
If this is a fresh Apache install, you should remove the symbolic link
to the %%PREFIX%%/www/data directory, and create a real directory.
@@ -64,7 +71,7 @@ rm %%PREFIX%%/www/data
mkdir %%PREFIX%%/www/data
-5.)
+6.)
After you have made these changes, you'll need to execute:
@@ -82,7 +89,7 @@ check the document root for .htaccess files. Rename them, and then combine
them with the .htaccess files created by the frontpage install.
-6.)
+7.)
If you have installed the port in another PREFIX than "/usr/local"
you have to create a symlink. Microsoft has hardcoded the local
diff --git a/www/mod_frontpage2-rtr/pkg-plist b/www/mod_frontpage2-rtr/pkg-plist
deleted file mode 100644
index 1649e81d4c15..000000000000
--- a/www/mod_frontpage2-rtr/pkg-plist
+++ /dev/null
@@ -1,3 +0,0 @@
-@unexec %D/sbin/apxs -e -A -n frontpage %D/libexec/%%APACHE%%/mod_frontpage.so
-libexec/%%APACHE%%/mod_frontpage.so
-@exec %D/sbin/apxs -e -a -n frontpage %D/libexec/%%APACHE%%/mod_frontpage.so