aboutsummaryrefslogtreecommitdiff
path: root/devel/subversion-freebsd
diff options
context:
space:
mode:
authorBruce A. Mah <bmah@FreeBSD.org>2003-05-23 01:31:48 +0000
committerBruce A. Mah <bmah@FreeBSD.org>2003-05-23 01:31:48 +0000
commit7b040896425b848fec68c4c3ab03d957576a9d07 (patch)
tree0a5688f23313a89f22d6aa93ad15ca4eff548c77 /devel/subversion-freebsd
parent4ef987ed223d197dc2efa5d21362f72f27f82fd0 (diff)
downloadports-7b040896425b848fec68c4c3ab03d957576a9d07.tar.gz
ports-7b040896425b848fec68c4c3ab03d957576a9d07.zip
Notes
Diffstat (limited to 'devel/subversion-freebsd')
-rw-r--r--devel/subversion-freebsd/Makefile33
-rw-r--r--devel/subversion-freebsd/pkg-deinstall57
-rw-r--r--devel/subversion-freebsd/pkg-plist3
3 files changed, 91 insertions, 2 deletions
diff --git a/devel/subversion-freebsd/Makefile b/devel/subversion-freebsd/Makefile
index b08ffe23db57..5404d5a5c113 100644
--- a/devel/subversion-freebsd/Makefile
+++ b/devel/subversion-freebsd/Makefile
@@ -6,6 +6,7 @@
PORTNAME= subversion
PORTVERSION= 0.23.0
+PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= http://subversion.tigris.org/files/documents/15/4218/
MASTER_SITES+= ${MASTER_SITE_LOCAL}
@@ -18,8 +19,6 @@ LIB_DEPENDS= db4:${PORTSDIR}/databases/db4 \
neon.23:${PORTSDIR}/www/neon \
expat.4:${PORTSDIR}/textproc/expat2 \
apr-0.9:${PORTSDIR}/devel/apr
-RUN_DEPENDS= gdiff3:${PORTSDIR}/textproc/diffutils
-BUILD_DEPENDS= gdiff3:${PORTSDIR}/textproc/diffutils
INSTALLS_SHLIB= yes
USE_LIBTOOL= yes
@@ -37,6 +36,26 @@ CONFIGURE_ARGS= --with-ssl \
MAN1= svn.1 svnadmin.1
MANCOMPRESSED= no
+.if defined(WITH_MOD_DAV_SVN)
+APXS=${LOCALBASE}/sbin/apxs
+BUILD_DEPENDS+= ${APXS}:${PORTSDIR}/www/apache2
+RUN_DEPENDS+= ${APXS}:${PORTSDIR}/www/apache2
+CONFIGURE_ARGS+= \
+ --with-apxs=${APXS}
+PLIST_SUB+= MOD_DAV_SVN=""
+.else
+PLIST_SUB+= MOD_DAV_SVN="@comment "
+PKGDEINSTALL= NONEXISTENT
+.endif
+
+pre-extract:
+.if !defined(WITH_MOD_DAV_SVN)
+ @${ECHO_MSG}
+ @${ECHO_MSG} "You can enable the mod_dav_svn module for Apache 2.X by defining"
+ @${ECHO_MSG} "WITH_MOD_DAV_SVN."
+ @${ECHO_MSG}
+.endif
+
post-extract:
@${REINPLACE_CMD} 's/ldb/ldb4/g' ${WRKSRC}/configure
@@ -48,6 +67,11 @@ post-configure:
@${REINPLACE_CMD} 's/install-swig-py-lib//g' ${WRKSRC}/Makefile
@${REINPLACE_CMD} 's/swig-py-lib//g' ${WRKSRC}/Makefile
+.if defined(WITH_MOD_DAV_SVN)
+pre-install:
+ ${APXS} -e -S LIBEXECDIR=${PREFIX}/libexec/apache2 -a -n dav libexec/apache2/mod_dav.so
+.endif
+
post-install:
install-info ${PREFIX}/info/svn-design.info ${PREFIX}/info/dir
.if !defined(NOPORTDOCS)
@@ -56,4 +80,9 @@ post-install:
install-book-html install-book-pdf install-book-ps
.endif
+post-deinstall:
+.if defined(WITH_MOD_DAV_SVN)
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGDEINSTALL} ${PKGNAME} POST-DEINSTALL
+.endif
+
.include <bsd.port.mk>
diff --git a/devel/subversion-freebsd/pkg-deinstall b/devel/subversion-freebsd/pkg-deinstall
new file mode 100644
index 000000000000..ced36ce3c20b
--- /dev/null
+++ b/devel/subversion-freebsd/pkg-deinstall
@@ -0,0 +1,57 @@
+#!/bin/sh
+#
+# Try to de-activate mod_dav_svn in the installed httpd.conf and warn
+# if this fails.
+#
+# $FreeBSD$
+#
+
+if [ "$2" != "POST-DEINSTALL" ]; then
+ exit 0
+fi
+
+TMPDIR=${TMPDIR:=/tmp}
+PKG_TMPDIR=${PKG_TMPDIR:=${TMPDIR}}
+
+apxscmd=${PKG_PREFIX}/sbin/apxs
+tmpdir=${PKG_TMPDIR}/deinstmod_dav_svn.$$
+
+if [ ! -x ${apxscmd} ]; then
+ echo Can\'t find the apxs program: ${apxscmd}.
+ exit 1
+fi
+
+confdir=`${apxscmd} -q SYSCONFDIR`
+
+if [ ! -d ${confdir} ]; then
+ echo Can\'t find Apache conf dir: ${confdir}
+ exit 1
+fi
+
+if [ -f ${confdir}/httpd.conf ]; then
+ conffile=httpd.conf
+fi
+if [ -f ${confdir}/httpd.conf.default ]; then
+ conffile="${conffile} httpd.conf.default"
+fi
+if [ -z "${conffile}" ]; then
+ echo Can\'t find either of ${confdir}/httpd.conf or
+ echo ${confdir}/httpd.conf.default.
+ exit 1
+fi
+
+if ! mkdir ${tmpdir}; then
+ echo Can\'t create temporary directory: ${tmpdir}
+ exit 1
+fi
+
+for i in ${conffile}; do
+ awk '{if (!/^LoadModule dav_svn_module/ && !/^AddModule mod_dav_svn.c/) \
+ print $0}' < ${confdir}/$i > ${tmpdir}/$i
+ echo Removing dav_svn_module from $i in config dir: ${confdir}
+ cat ${tmpdir}/$i > ${confdir}/$i
+done
+
+rm -rf ${tmpdir}
+
+exit 0
diff --git a/devel/subversion-freebsd/pkg-plist b/devel/subversion-freebsd/pkg-plist
index 30212d368781..42650224b487 100644
--- a/devel/subversion-freebsd/pkg-plist
+++ b/devel/subversion-freebsd/pkg-plist
@@ -87,6 +87,9 @@ lib/libsvn_wc-1.a
lib/libsvn_wc-1.la
lib/libsvn_wc-1.so
lib/libsvn_wc-1.so.0
+%%MOD_DAV_SVN%%libexec/apache2/mod_dav_svn.so
+%%MOD_DAV_SVN%%@exec %D/sbin/apxs -e -S LIBEXECDIR=%D/libexec/apache2 -a -n dav libexec/apache2/mod_dav.so
+%%MOD_DAV_SVN%%@exec %D/sbin/apxs -e -S LIBEXECDIR=%D/libexec/apache2 -a -n dav_svn libexec/apache2/mod_dav_svn.so
%%PORTDOCS%%share/doc/subversion/book/images/ch02dia1.png
%%PORTDOCS%%share/doc/subversion/book/images/ch02dia2.png
%%PORTDOCS%%share/doc/subversion/book/images/ch02dia3.png