summaryrefslogtreecommitdiffstats
path: root/www/mod_webapp/Makefile
blob: 17b3c93d4ed2e68b18831f46b7b886afceb7fef4 (plain)
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
# Ports collection makefile for:	mod_webapp for Apache 1.3.x
# Date created:				Jun 12 2003
# Whom: 				Andre Sachs <asachs@uunet.co.za>
#
# $FreeBSD$
#

PORTNAME=	mod_webapp
PORTVERSION=	4.1.24
PORTREVISION=	1
CATEGORIES=	www
MASTER_SITES=	http://jakarta.apache.org/%SUBDIR%/
MASTER_SITE_SUBDIR=	builds/jakarta-tomcat-4.0/release/v${TOMCAT_RELEASE}/src
DISTNAME=	jakarta-tomcat-connectors-${CONNECTORS_RELEASE}-src
DIST_SUBDIR=	mod_webapp

MAINTAINER=	apache@FreeBSD.org
COMMENT=	Apache module mounts Tomcat web applications

BUILD_DEPENDS=	${NONEXISTANT}:${PORTSDIR}/devel/apr:configure

USE_REINPLACE=	yes
USE_APACHE=	yes
USE_AUTOTOOLS=	autoconf:253:env libtool:13:env
GNU_CONFIGURE=	yes
USE_GMAKE=	yes
INSTALLS_SHLIB=	yes

# Release information for distribution files.
TOMCAT_RELEASE=		${PORTVERSION}
CONNECTORS_RELEASE=	${PORTVERSION}

.include <bsd.port.pre.mk>

.if ${ARCH} == "amd64" || ${ARCH} == "ia64"
BROKEN=		"Does not build on amd64 or ia64"
.endif

# Apache locations.
APACHECTL?=	${LOCALBASE}/sbin/apachectl
APR_LIB?=	${LOCALBASE}/lib/
APR_INCLUDE?=	${LOCALBASE}/include/apr-${APR_MAJORVER}/
APACHE_MODULES?=libexec/apache
APR_VER!=	cd ${PORTSDIR}/devel/apr && ${MAKE} -V PORTVERSION
APR_WRKSRC!=	cd ${PORTSDIR}/devel/apr && ${MAKE} -V WRKSRC
APR_MAJORVER=	${APR_VER:C/\..*//g}
APR_SRC=	${APR_WRKSRC}/apr-${APR_VER}
AUTOCONF?=	${LOCALBASE}/bin/autoconf

# If the user's changed the modules directory, pack things correctly.
PLIST_SUB=	APACHE_MODULES=${APACHE_MODULES}

# Build options.
APACHE_VERSION=	1.3.6
WRKSRC=		${WRKDIR}/${DISTNAME}/webapp
HAS_CONFIGURE=	yes
CONFIGURE_ARGS=	--with-apxs=${APXS} \
		--with-apr-lib=${APR_LIB} \
		--with-apr-include=${APR_INCLUDE} \
		--with-apr=${APR_SRC} \
		--without-ant

post-patch:
	${REINPLACE_CMD} -e 's/apr-config/apr-${APR_MAJORVER}-config/g' \
		${WRKSRC}/support/wa_apr.m4

pre-configure:
	cd ${WRKSRC} && ${AUTOCONF}

pre-build:
	${MKDIR} ${WRKSRC}/build
	${MKDIR} ${WRKSRC}/build/objs

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/apache-1.3/mod_webapp.so \
	    ${PREFIX}/libexec/apache

post-install:
	@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.if !defined(NOPORTDOCS)
	${MKDIR} ${DOCSDIR}
	${INSTALL_MAN} ${WRKSRC}/INSTALL.txt ${DOCSDIR}
.endif

.include <bsd.port.post.mk>
OpenPOWER on IntegriCloud