2004-11-08 21:37:45 +01:00
|
|
|
# $NetBSD: Makefile,v 1.26 2004/11/08 20:37:45 tv Exp $
|
2003-05-25 10:55:18 +02:00
|
|
|
|
|
|
|
PKGNAME= apr-${APR_VERSION}.${APACHE_VERSION}
|
2004-10-03 02:12:51 +02:00
|
|
|
PKGREVISION= 1
|
2003-05-25 10:55:18 +02:00
|
|
|
CATEGORIES= devel
|
|
|
|
|
|
|
|
HOMEPAGE= http://apr.apache.org/
|
|
|
|
COMMENT= Apache Portable Runtime
|
|
|
|
|
2003-05-30 08:51:29 +02:00
|
|
|
# Don't bump this when apache upgrades; it is only apache2-2.0.45 and
|
|
|
|
# under that includes its own apr. apr was split out in 2.0.45nb1.
|
|
|
|
CONFLICTS= apache2<=2.0.45
|
2003-05-25 10:55:18 +02:00
|
|
|
|
2004-03-07 23:32:05 +01:00
|
|
|
USE_BUILDLINK3= YES
|
2003-05-25 10:55:18 +02:00
|
|
|
USE_LIBTOOL= YES
|
|
|
|
|
|
|
|
WRKSRC= ${WRKDIR}/${DISTNAME}/srclib
|
|
|
|
BUILD_DIRS= ${WRKSRC}/apr ${WRKSRC}/apr-util
|
|
|
|
|
2003-12-03 15:57:05 +01:00
|
|
|
CONFIGURE_ENV+= CFLAGS="${CFLAGS}" LIBS="${LDFLAGS}"
|
2003-09-04 17:35:51 +02:00
|
|
|
|
2004-03-09 20:34:14 +01:00
|
|
|
LDFLAGS.SunOS+= -lnsl
|
|
|
|
|
2003-06-06 12:49:59 +02:00
|
|
|
pre-configure:
|
|
|
|
.for f in apr/config.layout apr-util/config.layout
|
|
|
|
${SED} -e 's|@PREFIX@|${PREFIX}|g' < ${WRKSRC}/$f > ${WRKSRC}/$f.new
|
|
|
|
${MV} ${WRKSRC}/$f.new ${WRKSRC}/$f
|
|
|
|
.endfor
|
|
|
|
.undef f
|
|
|
|
|
2004-01-18 19:55:24 +01:00
|
|
|
APR_CONFIGURE_ARGS= \
|
2003-05-25 10:55:18 +02:00
|
|
|
--prefix=${PREFIX} \
|
|
|
|
--with-devrandom=/dev/urandom \
|
|
|
|
--with-installbuilddir=${PREFIX}/libexec/apr
|
2004-01-18 19:55:24 +01:00
|
|
|
|
|
|
|
APU_CONFIGURE_ARGS= \
|
2003-05-25 10:55:18 +02:00
|
|
|
--prefix=${PREFIX} \
|
|
|
|
--with-apr=${WRKSRC}/apr \
|
2004-01-27 23:07:04 +01:00
|
|
|
--with-expat=${BUILDLINK_PREFIX.expat} \
|
|
|
|
--without-gdbm
|
2003-05-25 10:55:18 +02:00
|
|
|
|
2004-01-18 19:55:24 +01:00
|
|
|
.include "../../mk/bsd.prefs.mk"
|
2004-07-17 01:21:50 +02:00
|
|
|
|
2004-09-26 01:41:26 +02:00
|
|
|
BUILD_DEFS+= APR_USE_OPENLDAP APR_USE_DB4
|
2004-07-17 01:21:50 +02:00
|
|
|
|
|
|
|
.if !empty(APR_USE_DB4:M[Yy][Ee][Ss])
|
2004-01-18 19:55:24 +01:00
|
|
|
APU_CONFIGURE_ARGS+=\
|
|
|
|
--with-berkeley-db=${BUILDLINK_PREFIX.db4}/include:${LOCALBASE}
|
|
|
|
.else
|
|
|
|
APU_CONFIGURE_ARGS+= --with-dbm=sdbm
|
|
|
|
.endif
|
|
|
|
|
|
|
|
do-configure:
|
|
|
|
@cd ${WRKSRC}/apr && ${SETENV} ${CONFIGURE_ENV} ./configure \
|
|
|
|
${APR_CONFIGURE_ARGS}
|
|
|
|
@cd ${WRKSRC}/apr-util && ${SETENV} ${CONFIGURE_ENV} ./configure \
|
|
|
|
${APU_CONFIGURE_ARGS}
|
|
|
|
|
2003-05-25 10:55:18 +02:00
|
|
|
post-install:
|
|
|
|
${RM} ${PREFIX}/libexec/apr/libtool
|
2004-02-13 19:03:40 +01:00
|
|
|
${INSTALL_SCRIPT} ${PKG_LIBTOOL} ${PREFIX}/libexec/apr/libtool
|
2004-09-20 19:13:06 +02:00
|
|
|
@${CHMOD} ${SHAREMODE} ${PREFIX}/include/apr-0/*.h
|
2004-10-29 13:51:00 +02:00
|
|
|
@${CHMOD} ${PKGDIRMODE} ${PREFIX}/include/apr-0
|
2004-09-20 19:13:06 +02:00
|
|
|
@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/include/apr-0/
|
2003-05-25 10:55:18 +02:00
|
|
|
|
|
|
|
.include "../../www/apache2/Makefile.common"
|
|
|
|
|
2004-11-08 21:37:45 +01:00
|
|
|
.if !empty(APR_USE_DB4:M[Yy][Ee][Ss])
|
2004-03-07 23:32:05 +01:00
|
|
|
.include "../../databases/db4/buildlink3.mk"
|
2004-01-18 19:55:24 +01:00
|
|
|
.endif
|
|
|
|
|
2004-07-17 01:21:50 +02:00
|
|
|
# Enable OpenLDAP support
|
|
|
|
.if !empty(APR_USE_OPENLDAP:M[Yy][Ee][Ss])
|
|
|
|
APU_CONFIGURE_ARGS+= --with-ldap
|
2004-07-17 02:14:26 +02:00
|
|
|
APR_CONFIGURE_ARGS+= --with-ldap
|
2004-07-17 01:21:50 +02:00
|
|
|
.include "../../databases/openldap/buildlink3.mk"
|
|
|
|
.endif
|
|
|
|
|
2004-03-07 23:32:05 +01:00
|
|
|
.include "../../textproc/expat/buildlink3.mk"
|
2003-05-25 10:55:18 +02:00
|
|
|
.include "../../mk/bsd.pkg.mk"
|