aboutsummaryrefslogtreecommitdiffstats
path: root/devel/subversion-freebsd/Makefile
blob: c6440acf1e31fec732533612964476927ec5c704 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# New ports collection makefile for:    subversion
# Date created:             10 September 2001
# Whom:                 rooneg@electricjellyfish.net
#
# $FreeBSD$

PORTNAME=   subversion
PORTVERSION=    0.24.2
CATEGORIES= devel
MASTER_SITES=   http://subversion.tigris.org/files/documents/15/4807/
MASTER_SITES+=  ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR=     bmah

MAINTAINER= bmah@freebsd.org
COMMENT=    Version control system

LIB_DEPENDS=    db4:${PORTSDIR}/databases/db4 \
        neon.23:${PORTSDIR}/www/neon \
        expat.4:${PORTSDIR}/textproc/expat2 \
        apr-0.9:${PORTSDIR}/devel/apr

INSTALLS_SHLIB= yes

WRKSRC= ${WRKDIR}/subversion-${PORTVERSION}
GNU_CONFIGURE=  yes
USE_REINPLACE=  yes
CONFIGURE_TARGET=   --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ARGS= --with-ssl \
        --with-neon=${LOCALBASE} \
        --with-berkeley-db=${LOCALBASE}/include/db4:${LOCALBASE}/lib \
        --with-apr=${LOCALBASE} \
        --with-apr-util=${LOCALBASE} \
        --with-swig=no

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"
    @${ECHO_MSG} "by defining WITH_MOD_DAV_SVN."
    @${ECHO_MSG}
.endif

post-extract:
    @${REINPLACE_CMD} 's/ldb/ldb4/g' ${WRKSRC}/configure

    @${RM} -r ${WRKSRC}/neon
    @${RM} -r ${WRKSRC}/apr
    @${RM} -r ${WRKSRC}/apr-util

.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:
.if !defined(NOPORTDOCS)
    cd ${WRKSRC}/doc/book; \
    ${MAKE} INSTALL_DIR=${DOCSDIR} \
        install-book-html install-book-pdf install-book-ps
    for f in BUGS CHANGES COMMITTERS COPYING HACKING IDEAS INSTALL PORTING README; do \
        ${INSTALL_DATA} ${WRKSRC}/$$f ${DOCSDIR}; \
    done
.endif

post-deinstall:
.if defined(WITH_MOD_DAV_SVN)
    @PKG_PREFIX=${PREFIX} ${SH} ${PKGDEINSTALL} ${PKGNAME} POST-DEINSTALL
.endif

.include <bsd.port.mk>