diff options
author | lev <lev@FreeBSD.org> | 2009-04-07 01:06:34 +0800 |
---|---|---|
committer | lev <lev@FreeBSD.org> | 2009-04-07 01:06:34 +0800 |
commit | 647dac055d391dd24ef69fed1ad48604bfaa3ced (patch) | |
tree | 8a095454ac2a95ba67f4a8e695eb9aabc73b0de5 /devel/subversion16 | |
parent | f189a38eb8fa4c3a15cd147ad1103d390e50eaa3 (diff) | |
download | freebsd-ports-gnome-647dac055d391dd24ef69fed1ad48604bfaa3ced.tar.gz freebsd-ports-gnome-647dac055d391dd24ef69fed1ad48604bfaa3ced.tar.zst freebsd-ports-gnome-647dac055d391dd24ef69fed1ad48604bfaa3ced.zip |
(1) Put svn_hacks-1.2.diff to local-distfiles
(2) Add optional module mod_dontdothat
(3) Fix order of apache module loading
(4) Make deinstall script much mor robust, it should not trash Apache config
in case of various errors.
PR: ports/133366 [2]
Submitted by: Many users [1], olli hauer <ohauer@gmx.de> [2], Dag-Erling Smorgrav <des@des.no> [3]
Diffstat (limited to 'devel/subversion16')
-rw-r--r-- | devel/subversion16/Makefile | 26 | ||||
-rw-r--r-- | devel/subversion16/Makefile.common | 8 | ||||
-rw-r--r-- | devel/subversion16/pkg-deinstall | 33 | ||||
-rw-r--r-- | devel/subversion16/pkg-plist | 2 |
4 files changed, 55 insertions, 14 deletions
diff --git a/devel/subversion16/Makefile b/devel/subversion16/Makefile index bf16586899cb..bd699c1615d5 100644 --- a/devel/subversion16/Makefile +++ b/devel/subversion16/Makefile @@ -19,6 +19,7 @@ TXT_DOCS= BUGS CHANGES COMMITTERS COPYING HACKING INSTALL README OPTIONS= MOD_DAV_SVN "mod_dav_svn module for Apache 2.X" off \ APACHE2_APR "Use APR from Apache 2.X" off \ + MOD_DONTDOTHAT "mod_dontdothat for Apache 2.X" off \ NEON "WebDAV/Delta-V repo access module (neon)" on \ SERF "WebDAV/Delta-V repo access module (serf)" off \ SASL "SASL2 authorization support" off \ @@ -103,6 +104,13 @@ pre-everything:: @${ECHO_MSG} "the ${APACHE_PORT} port, rather than the devel/apr port." .endif @${ECHO_MSG} "" +.if defined(WITH_MOD_DONTDOTHAT) + @${ECHO_MSG} "mod_dontdothat module for Apache 2.X enabled." + @${ECHO_MSG} "This option implies the WITH_MOD_DAV_SVN option." +.else + @${ECHO_MSG} "You can enable the mod_dontdothat module for Apache 2.X" +.endif + @${ECHO_MSG} "" .if defined(WITH_SVNSERVE_WRAPPER) @${ECHO_MSG} "svnserve wrapper enabled." @${ECHO_MSG} "" @@ -156,13 +164,27 @@ pre-configure: fi .endif + +.if defined(WITH_MOD_DAV_SVN) && defined(WITH_MOD_DONTDOTHAT) +post-build: + cd ${WRKSRC}/contrib/server-side/mod_dontdothat && \ + ${APXS} -c -I${WRKSRC}/subversion/include -L${WRKSRC}/subversion/libsvn_subr/.libs -lsvn_subr-1 mod_dontdothat.c +.endif + .if defined(WITH_MOD_DAV_SVN) pre-install: - ${APXS} -e -S LIBEXECDIR=${PREFIX}/${APACHEMODDIR} -a -n dav ${PREFIX}/${APACHEMODDIR}/mod_dav.so - ${APXS} -e -S LIBEXECDIR=${PREFIX}/${APACHEMODDIR} -a -n authz_svn ${PREFIX}/${APACHEMODDIR}/mod_authz_svn.so + ${APXS} -e -S LIBEXECDIR=${PREFIX}/${APACHEMODDIR} -a -n dav ${PREFIX}/${APACHEMODDIR}/mod_dav.so .endif post-install: ${MKREPOS_TARGET} +.if defined(WITH_MOD_DAV_SVN) + ${APXS} -e -S LIBEXECDIR=${PREFIX}/${APACHEMODDIR} -a -n authz_svn ${PREFIX}/${APACHEMODDIR}/mod_authz_svn.so +.if defined(WITH_MOD_DONTDOTHAT) + cd ${WRKSRC}/contrib/server-side/mod_dontdothat && \ + ${APXS} -i -n dontdothat mod_dontdothat.la + ${APXS} -e -S LIBEXECDIR=${PREFIX}/${APACHEMODDIR} -a -n dontdothat ${PREFIX}/${APACHEMODDIR}/mod_dontdothat.so +.endif +.endif @${MKDIR} ${DATADIR} cd ${WRKSRC}/tools ; \ ${TAR} --exclude '*.in' -cf - * | ${TAR} -C ${DATADIR} -xf - diff --git a/devel/subversion16/Makefile.common b/devel/subversion16/Makefile.common index 049367745346..20609b188b91 100644 --- a/devel/subversion16/Makefile.common +++ b/devel/subversion16/Makefile.common @@ -6,7 +6,7 @@ PORTNAME= subversion PORTVERSION= 1.6.0 -PORTREVISION?= 1 +PORTREVISION?= 2 CATEGORIES+= devel MASTER_SITES= http://subversion.tigris.org/downloads/:main \ http://svnbook.red-bean.com/en/1.5/:book @@ -66,8 +66,14 @@ CONFIGURE_ARGS+= --with-apxs=${APXS} PLIST_SUB+= MOD_DAV_SVN="" SVNGROUP?= www SVNUSER?= www +.if defined(WITH_MOD_DONTDOTHAT) +PLIST_SUB+= MOD_DONTDOTHAT="" +.else +PLIST_SUB+= MOD_DONTDOTHAT="@comment " +.endif .else PLIST_SUB+= MOD_DAV_SVN="@comment " +PLIST_SUB+= MOD_DONTDOTHAT="@comment " PKGDEINSTALL= NONEXISTENT SVNGROUP?= svn SVNUSER?= svn diff --git a/devel/subversion16/pkg-deinstall b/devel/subversion16/pkg-deinstall index 8a03c3956aac..7fa6e7fd1f1d 100644 --- a/devel/subversion16/pkg-deinstall +++ b/devel/subversion16/pkg-deinstall @@ -23,15 +23,15 @@ fi confdir=`${apxscmd} -q SYSCONFDIR` -if [ ! -d ${confdir} ]; then +if [ ! -d "${confdir}" ]; then echo Can\'t find Apache conf dir: ${confdir} exit 1 fi -if [ -f ${confdir}/httpd.conf ]; then +if [ -f "${confdir}/httpd.conf" ]; then conffile=httpd.conf fi -if [ -f ${confdir}/httpd.conf.default ]; then +if [ -f "${confdir}/httpd.conf.default" ]; then conffile="${conffile} httpd.conf.default" fi if [ -z "${conffile}" ]; then @@ -46,15 +46,26 @@ if ! mkdir ${tmpdir}; then fi for i in ${conffile}; do - awk '{if (!/^LoadModule dav_svn_module/ && - !/^AddModule mod_dav_svn.c/ &&\ - !/^LoadModule authz_svn_module/ &&\ - !/^AddModule mod_authz_svn.c/ ) \ - print $0}' < ${confdir}/$i > ${tmpdir}/$i - echo Removing dav_svn_module and authz_svn_module from $i in config dir: ${confdir} - cat ${tmpdir}/$i > ${confdir}/$i + echo -n Removing dav_svn_module, authz_svn_module and dontdothat_module from $i in config dir: ${confdir}... + awk '{if (!/^LoadModule dav_svn_module/ && + !/^AddModule mod_dav_svn.c/ && \ + !/^LoadModule authz_svn_module/ && \ + !/^AddModule mod_authz_svn.c/ && \ + !/^LoadModule dontdothat_module/ && \ + !/^AddModule mod_dontdothat.c/ ) \ + print $0}' < "${confdir}/$i" > "${tmpdir}/$i" + AWKRC=$? + diff "${confdir}/$i" "${tmpdir}/$i" | grep "^[<>]" | grep -Evq "^< (Load|Add)Module " + GREPRC=$? + # last grep should not find anything + if [ "x${AWKRC}" = "x0" -a "x${GREPRC}" = "x1" ] ; then + echo " Ok" + cat "${tmpdir}/$i" > "${confdir}/$i" + else + echo " Error! Please, remove these modules manually" + fi done -rm -rf ${tmpdir} +rm -rf "${tmpdir}" exit 0 diff --git a/devel/subversion16/pkg-plist b/devel/subversion16/pkg-plist index ea27cce42b1a..09e9cbf2463a 100644 --- a/devel/subversion16/pkg-plist +++ b/devel/subversion16/pkg-plist @@ -291,6 +291,8 @@ lib/libsvn_wc-1.so.0 %%MOD_DAV_SVN%%%%APACHEMODDIR%%/mod_authz_svn.so %%MOD_DAV_SVN%%@exec %D/sbin/apxs -e -S LIBEXECDIR=%D/%%APACHEMODDIR%% -a -n dav libexec/%%APACHEDIR%%/mod_dav.so %%MOD_DAV_SVN%%@exec %D/sbin/apxs -e -S LIBEXECDIR=%D/%%APACHEMODDIR%% -a -n dav_svn libexec/%%APACHEDIR%%/mod_dav_svn.so +%%MOD_DONTDOTHAT%%%%APACHEMODDIR%%/mod_dontdothat.so +%%MOD_DONTDOTHAT%%@exec %D/sbin/apxs -e -S LIBEXECDIR=%D/%%APACHEMODDIR%% -a -n dontdothat libexec/%%APACHEDIR%%/mod_dontdothat.so %%PORTDOCS%%%%BOOK%%@dirrm %%DOCSDIR%%/svn-book-html/images %%PORTDOCS%%%%BOOK%%@dirrm %%DOCSDIR%%/svn-book-html %%PORTDOCS%%@dirrm %%DOCSDIR%% |