2002-07-15 19:58:32 +02:00
|
|
|
# New ports collection makefile for: apr
|
2002-03-14 17:39:26 +01:00
|
|
|
# Date created: 19 February 2002
|
|
|
|
# Whom: Garrett Rooney <rooneg@electricjellyfish.net>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
2003-11-09 01:57:38 +01:00
|
|
|
# Tunables:
|
2004-02-01 09:07:50 +01:00
|
|
|
# APR_UTIL_WITHOUT_THREADS: disable threads support
|
2003-11-09 01:57:38 +01:00
|
|
|
# APR_UTIL_WITH_GDBM: force dependency on the GNU dbm
|
|
|
|
# APR_UTIL_WITHOUT_GDBM: unconditionally disable the use of GNU dbm
|
2004-11-06 19:16:16 +01:00
|
|
|
# APR_UTIL_WITH_BERKELEY_DB: force dependency on Sleepycat's Berkeley DB 4.2
|
|
|
|
# APR_UTIL_WITHOUT_BERKELEY_DB: unconditionally disable the use of db4.2
|
2003-11-09 01:57:38 +01:00
|
|
|
# (the database bindings are detected and recorded automatically if these
|
|
|
|
# switches are not set)
|
2004-10-13 00:41:44 +02:00
|
|
|
# APR_UTIL_WITH_LDAP: force dependency on OpenLDAP
|
2002-03-14 17:39:26 +01:00
|
|
|
|
2002-07-15 19:58:32 +02:00
|
|
|
PORTNAME= apr
|
2004-11-25 05:13:59 +01:00
|
|
|
PORTVERSION= 1.0.1
|
2002-03-14 17:39:26 +01:00
|
|
|
CATEGORIES= devel
|
2004-10-13 00:41:44 +02:00
|
|
|
MASTER_SITES= http://www.apache.org/dist/apr/
|
|
|
|
DISTFILES= apr-${PORTVERSION}.tar.gz apr-util-${PORTVERSION}.tar.gz
|
2002-03-14 17:39:26 +01:00
|
|
|
|
2003-10-03 07:25:25 +02:00
|
|
|
MAINTAINER= rodrigc@crodrigues.org
|
2003-02-21 12:23:04 +01:00
|
|
|
COMMENT= The Apache Group's Portability Library
|
2002-03-14 17:39:26 +01:00
|
|
|
|
2004-10-13 00:41:44 +02:00
|
|
|
BUILD_DEPENDS= ${PYTHON_CMD}:${PYTHON_PORTSDIR}
|
2004-03-30 21:20:22 +02:00
|
|
|
LIB_DEPENDS+= expat.5:${PORTSDIR}/textproc/expat2
|
2002-03-14 17:39:26 +01:00
|
|
|
|
2004-06-04 19:29:38 +02:00
|
|
|
USE_ICONV= yes
|
2004-10-15 19:32:46 +02:00
|
|
|
USE_AUTOMAKE_VER= 19
|
2004-07-01 19:06:41 +02:00
|
|
|
USE_AUTOCONF_VER= 259
|
2004-06-04 19:29:38 +02:00
|
|
|
WANT_LIBTOOL_VER= 15
|
2002-12-29 15:46:21 +01:00
|
|
|
USE_PERL5= yes
|
|
|
|
USE_GMAKE= yes
|
2004-10-13 00:41:44 +02:00
|
|
|
USE_PYTHON= yes
|
|
|
|
PYTHON_NO_DEPENDS= yes
|
2003-01-22 02:27:29 +01:00
|
|
|
INSTALLS_SHLIB= yes
|
2004-01-24 04:36:43 +01:00
|
|
|
GNU_CONFIGURE= yes
|
2002-03-14 17:39:26 +01:00
|
|
|
WRKSRC= ${WRKDIR}
|
|
|
|
|
2003-04-19 05:29:02 +02:00
|
|
|
APR_UTIL_CONF_ARGS= --with-apr=../apr-${PORTVERSION} \
|
2003-03-28 06:46:27 +01:00
|
|
|
--with-expat=${PREFIX} \
|
|
|
|
--with-iconv=${PREFIX}
|
2002-12-29 15:46:21 +01:00
|
|
|
|
2003-11-09 01:57:38 +01:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2004-02-01 09:07:50 +01:00
|
|
|
.if defined(APR_UTIL_WITHOUT_THREADS)
|
|
|
|
CONFIGURE_ARGS+= --disable-threads
|
|
|
|
APR_UTIL_CONF_ARGS+= --disable-threads
|
|
|
|
.if defined(PKGNAMESUFFIX)
|
|
|
|
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-nothr
|
|
|
|
.else
|
|
|
|
PKGNAMESUFFIX= -nothr
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
2003-11-09 01:57:38 +01:00
|
|
|
.if defined(APR_UTIL_WITHOUT_GDBM)
|
|
|
|
APR_UTIL_CONF_ARGS+= --without-gdbm
|
2004-02-01 09:07:50 +01:00
|
|
|
.elif defined(APR_UTIL_WITH_GDBM) || exists(${LOCALBASE}/lib/libgdbm.so.3)
|
2003-11-09 01:57:38 +01:00
|
|
|
LIB_DEPENDS+= gdbm.3:${PORTSDIR}/databases/gdbm
|
|
|
|
.if defined(PKGNAMESUFFIX)
|
|
|
|
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-gdbm
|
|
|
|
.else
|
|
|
|
PKGNAMESUFFIX= -gdbm
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(APR_UTIL_WITHOUT_BERKELEY_DB)
|
|
|
|
APR_UTIL_CONF_ARGS+= --without-berkeley-db
|
2004-11-06 19:16:16 +01:00
|
|
|
.elif defined(APR_UTIL_WITH_BERKELEY_DB) || exists(${LOCALBASE}/lib/libdb-4.2.so.2)
|
|
|
|
LIB_DEPENDS+= db-4.2.2:${PORTSDIR}/databases/db42
|
2004-05-29 01:07:50 +02:00
|
|
|
APR_UTIL_CONF_ARGS+= --with-berkeley-db=${PREFIX}
|
2003-11-09 01:57:38 +01:00
|
|
|
.if defined(PKGNAMESUFFIX)
|
|
|
|
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-db4
|
|
|
|
.else
|
|
|
|
PKGNAMESUFFIX= -db4
|
|
|
|
.endif
|
|
|
|
.endif
|
2004-02-01 09:07:50 +01:00
|
|
|
|
2004-10-13 00:41:44 +02:00
|
|
|
.if defined(APR_UTIL_WITH_LDAP)
|
|
|
|
USE_OPENLDAP= yes
|
|
|
|
APR_UTIL_CONF_ARGS+= --with-ldap-include=${PREFIX}/include \
|
|
|
|
--with-ldap-lib=${PREFIX}/lib --with-ldap=ldap
|
|
|
|
.if defined(PKGNAMESUFFIX)
|
|
|
|
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-ldap
|
|
|
|
.else
|
|
|
|
PKGNAMESUFFIX= -ldap
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
2004-02-01 09:07:50 +01:00
|
|
|
pre-extract:
|
|
|
|
@${ECHO_MSG} ""
|
|
|
|
.if defined(APR_UTIL_WITHOUT_THREADS)
|
|
|
|
@${ECHO_MSG} "apr library will be built without threads support."
|
|
|
|
.else
|
|
|
|
@${ECHO_MSG} "apr library will be built with threads support."
|
|
|
|
@${ECHO_MSG} "All programs which use apr must be linked with threads too."
|
|
|
|
@${ECHO_MSG} "You can disable threads by defining APR_UTIL_WITHOUT_THREADS."
|
|
|
|
.endif
|
|
|
|
@${ECHO_MSG} ""
|
|
|
|
.if defined(APR_UTIL_WITHOUT_GDBM)
|
|
|
|
@${ECHO_MSG} "GDBM support is disabled."
|
|
|
|
.elif defined(APR_UTIL_WITH_GDBM)
|
|
|
|
@${ECHO_MSG} "GDBM support is forced."
|
|
|
|
.elif exists(${LOCALBASE}/lib/libgdbm.so.3)
|
|
|
|
@${ECHO_MSG} "GDBM support is enabled."
|
|
|
|
@${ECHO_MSG} "You can disable GDBM support by defining APR_UTIL_WITHOUT_GDBM."
|
|
|
|
.else
|
|
|
|
@${ECHO_MSG} "GDBM was not found."
|
|
|
|
@${ECHO_MSG} "You can force GDBM support by defining APR_UTIL_WITH_GDBM."
|
|
|
|
.endif
|
|
|
|
@${ECHO_MSG} ""
|
|
|
|
.if defined(APR_UTIL_WITHOUT_BERKELEY_DB)
|
2004-11-06 19:16:16 +01:00
|
|
|
@${ECHO_MSG} "Berkeley db4.2 support is disabled."
|
2004-02-01 09:07:50 +01:00
|
|
|
.elif defined(APR_UTIL_WITH_BERKELEY_DB)
|
2004-11-06 19:16:16 +01:00
|
|
|
@${ECHO_MSG} "Berkeley db4.2 support forced."
|
|
|
|
.elif exists(${LOCALBASE}/lib/libdb-4.2.so.2)
|
|
|
|
@${ECHO_MSG} "Berkeley db4.2 support is enabled."
|
|
|
|
@${ECHO_MSG} "You can disable Berkeley db4.2 support by defining APR_UTIL_WITHOUT_BERKELEY_DB."
|
2004-02-01 09:07:50 +01:00
|
|
|
.else
|
2004-11-06 19:16:16 +01:00
|
|
|
@${ECHO_MSG} "Berkeley db4.2 was not found."
|
|
|
|
@${ECHO_MSG} "You can force Berkeley db4.2 support by defining APR_UTIL_WITH_BERKELEY_DB."
|
2003-11-09 01:57:38 +01:00
|
|
|
.endif
|
2004-02-01 09:07:50 +01:00
|
|
|
@${ECHO_MSG} ""
|
2003-11-09 01:57:38 +01:00
|
|
|
|
2004-11-03 05:19:11 +01:00
|
|
|
post-patch:
|
|
|
|
sed -i .orig1 's/OSVERSION/'${OSVERSION}'/g' \
|
|
|
|
${WRKDIR}/apr-${PORTVERSION}/build/apr_hints.m4
|
2004-01-14 15:45:24 +01:00
|
|
|
|
2002-03-14 17:39:26 +01:00
|
|
|
pre-configure:
|
2004-06-29 01:16:53 +02:00
|
|
|
.for d in apr apr-util
|
|
|
|
.for f in config.guess config.sub
|
|
|
|
${CP} -f ${TEMPLATES}/${f} ${WRKDIR}/${d}-${PORTVERSION}/build/${f}
|
|
|
|
${CHMOD} a+rx ${WRKDIR}/${d}-${PORTVERSION}/build/${f}
|
|
|
|
.endfor
|
|
|
|
.endfor
|
2004-04-10 19:34:39 +02:00
|
|
|
|
|
|
|
run-autotools:
|
2004-07-01 19:06:41 +02:00
|
|
|
cd ${WRKDIR}/apr-${PORTVERSION}; ${SETENV} ${SCRIPTS_ENV} ${SH} ./buildconf
|
2004-03-15 15:07:47 +01:00
|
|
|
cd ${WRKDIR}/apr-util-${PORTVERSION} ; \
|
|
|
|
${RM} -fr xml/expat
|
|
|
|
cd ${WRKDIR}/apr-util-${PORTVERSION} ; \
|
2004-07-01 19:06:41 +02:00
|
|
|
${SETENV} ${SCRIPTS_ENV} ${SH} ./buildconf \
|
2003-04-19 05:29:02 +02:00
|
|
|
--with-apr=../apr-${PORTVERSION}
|
|
|
|
cd ${WRKDIR}/apr-${PORTVERSION}; \
|
2004-02-13 01:32:24 +01:00
|
|
|
${SETENV} ${SCRIPTS_ENV} ${SH} ./configure ${CONFIGURE_ARGS}
|
2003-04-19 05:29:02 +02:00
|
|
|
cd ${WRKDIR}/apr-util-${PORTVERSION}; \
|
2004-02-13 01:32:24 +01:00
|
|
|
${SETENV} ${SCRIPTS_ENV} ${SH} \
|
2003-04-07 00:37:13 +02:00
|
|
|
./configure ${CONFIGURE_ARGS} ${APR_UTIL_CONF_ARGS}
|
2002-03-14 17:39:26 +01:00
|
|
|
|
2004-03-15 15:07:47 +01:00
|
|
|
do-configure:
|
|
|
|
${DO_NADA}
|
|
|
|
|
2002-03-14 17:39:26 +01:00
|
|
|
do-build:
|
2003-10-03 07:25:25 +02:00
|
|
|
cd ${WRKDIR}/apr-${PORTVERSION}; ${SETENV} ${MAKE_ENV} ${GMAKE}
|
|
|
|
cd ${WRKDIR}/apr-util-${PORTVERSION}; ${SETENV} ${MAKE_ENV} ${GMAKE}
|
2002-03-14 17:39:26 +01:00
|
|
|
|
|
|
|
do-install:
|
2003-10-03 07:25:25 +02:00
|
|
|
cd ${WRKDIR}/apr-${PORTVERSION}; ${SETENV} ${MAKE_ENV} ${GMAKE} install
|
|
|
|
cd ${WRKDIR}/apr-util-${PORTVERSION}; ${SETENV} ${MAKE_ENV} ${GMAKE} install
|
2002-03-14 17:39:26 +01:00
|
|
|
|
2004-04-10 19:34:39 +02:00
|
|
|
debug_autoconf:
|
|
|
|
@echo "LIBTOOL: ${LIBTOOL_VERSION}"
|
|
|
|
@echo "AUTOCONF: dev ${dev_acver} cur ${cur_acver} use ${use_acver}"
|
|
|
|
@echo "AUTOMAKE: dev ${dev_amver} cur ${cur_amver} use ${use_amver}"
|
|
|
|
@echo "AUTOCONF_DIR: ${AUTOCONF_DIR}"
|
|
|
|
@echo "BUILD_DEPENDS: ${BUILD_DEPENDS}"
|
|
|
|
@echo "ACLOCAL_DIR: ${ACLOCAL_DIR}"
|
|
|
|
@echo "LIBTOOLFILES: ${LIBTOOLFILES}"
|
|
|
|
@echo "LIBTOOL_SHAREDIR: ${LIBTOOL_SHAREDIR}"
|
|
|
|
@echo "LIBTOOL_LIBEXECDIR: ${LIBTOOL_LIBEXECDIR}"
|
|
|
|
@echo "LIBTOOL_M4: ${LIBTOOL_M4}"
|
|
|
|
|
2003-11-09 01:57:38 +01:00
|
|
|
.include <bsd.port.post.mk>
|