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
|
2007-06-16 21:56:47 +02:00
|
|
|
PORTVERSION= 1.2.8
|
2008-03-31 15:55:58 +02:00
|
|
|
PORTREVISION= 3
|
2002-03-14 17:39:26 +01:00
|
|
|
CATEGORIES= devel
|
2004-11-25 05:54:14 +01:00
|
|
|
MASTER_SITES= ${MASTER_SITE_APACHE}
|
|
|
|
MASTER_SITE_SUBDIR= apr
|
2004-10-13 00:41:44 +02:00
|
|
|
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
|
|
|
|
2006-01-31 00:20:05 +01:00
|
|
|
LIB_DEPENDS+= expat.6:${PORTSDIR}/textproc/expat2
|
2002-03-14 17:39:26 +01:00
|
|
|
|
2004-06-04 19:29:38 +02:00
|
|
|
USE_ICONV= yes
|
2007-09-30 06:47:36 +02:00
|
|
|
USE_AUTOTOOLS= automake:19 autoconf:261 libtool:15:env
|
2008-03-31 15:55:58 +02:00
|
|
|
USE_PERL5_BUILD= yes
|
2002-12-29 15:46:21 +01:00
|
|
|
USE_GMAKE= yes
|
2005-06-12 19:51:34 +02:00
|
|
|
USE_PYTHON_BUILD= yes
|
2008-03-31 15:55:58 +02:00
|
|
|
USE_LDCONFIG= 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
|
2006-02-11 15:42:45 +01:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --enable-threads
|
2004-02-01 09:07:50 +01:00
|
|
|
.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
|
2006-04-06 12:37:17 +02:00
|
|
|
APR_UTIL_CONF_ARGS+= --with-gdbm=${LOCALBASE}
|
2003-11-09 01:57:38 +01:00
|
|
|
.if defined(PKGNAMESUFFIX)
|
|
|
|
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-gdbm
|
|
|
|
.else
|
|
|
|
PKGNAMESUFFIX= -gdbm
|
|
|
|
.endif
|
2006-04-06 12:37:17 +02:00
|
|
|
.else
|
|
|
|
APR_UTIL_CONF_ARGS+= --without-gdbm
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_BDB)
|
|
|
|
APR_UTIL_WITH_BERKELEY_DB= yes
|
2003-11-09 01:57:38 +01:00
|
|
|
.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)
|
2006-04-06 12:37:17 +02:00
|
|
|
USE_BDB= 42+
|
|
|
|
APR_UTIL_CONF_ARGS+= --with-berkeley-db=${BDB_INCLUDE_DIR}:${BDB_LIB_DIR}
|
2003-11-09 01:57:38 +01:00
|
|
|
.if defined(PKGNAMESUFFIX)
|
2006-04-06 12:37:17 +02:00
|
|
|
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-${BDB_INCLUDE_DIR:S,^${LOCALBASE}/include/,,}
|
2003-11-09 01:57:38 +01:00
|
|
|
.else
|
2006-04-06 12:37:17 +02:00
|
|
|
PKGNAMESUFFIX= -${BDB_INCLUDE_DIR:S,^${LOCALBASE}/include/,,}
|
2003-11-09 01:57:38 +01:00
|
|
|
.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)
|
2006-04-06 12:37:17 +02:00
|
|
|
@${ECHO_MSG} "Berkeley DB support is disabled."
|
2004-02-01 09:07:50 +01:00
|
|
|
.elif defined(APR_UTIL_WITH_BERKELEY_DB)
|
2006-04-06 12:37:17 +02:00
|
|
|
@${ECHO_MSG} "Berkeley DB support forced."
|
2004-11-06 19:16:16 +01:00
|
|
|
.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
|
2006-04-06 12:37:17 +02:00
|
|
|
@${ECHO_MSG} "Berkeley DB was not found."
|
|
|
|
@${ECHO_MSG} "You can force Berkeley DB 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:
|
2005-07-27 17:58:52 +02:00
|
|
|
${REINPLACE_CMD} -e 's/OSVERSION/'${OSVERSION}'/g' \
|
2004-11-03 05:19:11 +01:00
|
|
|
${WRKDIR}/apr-${PORTVERSION}/build/apr_hints.m4
|
2004-11-25 05:54:14 +01:00
|
|
|
${FIND} ${WRKDIR} -name "Makefile.in*" | ${XARGS} ${REINPLACE_CMD} -e \
|
|
|
|
's|[(]libdir[)]/pkgconfig|(prefix)/libdata/pkgconfig|g'
|
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
|
|
|
|
2005-11-19 07:02:20 +01:00
|
|
|
run-autotools::
|
2006-02-28 06:56:43 +01:00
|
|
|
cd ${WRKDIR}/apr-${PORTVERSION} ; \
|
|
|
|
${SETENV} ${CONFIGURE_ENV} ${SH} ./buildconf
|
2004-03-15 15:07:47 +01:00
|
|
|
cd ${WRKDIR}/apr-util-${PORTVERSION} ; \
|
2006-02-28 06:56:43 +01:00
|
|
|
${RM} -fr xml/expat
|
2004-03-15 15:07:47 +01:00
|
|
|
cd ${WRKDIR}/apr-util-${PORTVERSION} ; \
|
2006-02-28 06:56:43 +01:00
|
|
|
${SETENV} ${CONFIGURE_ENV} ${SH} ./buildconf \
|
2003-04-19 05:29:02 +02:00
|
|
|
--with-apr=../apr-${PORTVERSION}
|
|
|
|
cd ${WRKDIR}/apr-${PORTVERSION}; \
|
2006-02-28 06:56:43 +01:00
|
|
|
${SETENV} ${CONFIGURE_ENV} ${SH} ./configure ${CONFIGURE_ARGS}
|
2003-04-19 05:29:02 +02:00
|
|
|
cd ${WRKDIR}/apr-util-${PORTVERSION}; \
|
2006-02-28 06:56:43 +01:00
|
|
|
${SETENV} ${CONFIGURE_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:
|
2006-04-06 12:37:17 +02:00
|
|
|
cd ${WRKDIR}/apr-${PORTVERSION}; ${SETENV} ${MAKE_ENV} ${GMAKE} ${INSTALL_TARGET}
|
|
|
|
cd ${WRKDIR}/apr-util-${PORTVERSION}; ${SETENV} ${MAKE_ENV} ${GMAKE} ${INSTALL_TARGET}
|
2002-03-14 17:39:26 +01:00
|
|
|
|
2004-04-10 19:34:39 +02:00
|
|
|
debug_autoconf:
|
2004-11-25 05:54:14 +01:00
|
|
|
@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}"
|
2004-04-10 19:34:39 +02:00
|
|
|
@echo "AUTOCONF_DIR: ${AUTOCONF_DIR}"
|
|
|
|
@echo "BUILD_DEPENDS: ${BUILD_DEPENDS}"
|
|
|
|
@echo "ACLOCAL_DIR: ${ACLOCAL_DIR}"
|
|
|
|
@echo "LIBTOOLFILES: ${LIBTOOLFILES}"
|
2004-11-25 05:54:14 +01:00
|
|
|
@echo "LIBTOOL_SHAREDIR: ${LIBTOOL_SHAREDIR}"
|
|
|
|
@echo "LIBTOOL_LIBEXECDIR: ${LIBTOOL_LIBEXECDIR}"
|
|
|
|
@echo "LIBTOOL_M4: ${LIBTOOL_M4}"
|
2004-04-10 19:34:39 +02:00
|
|
|
|
2003-11-09 01:57:38 +01:00
|
|
|
.include <bsd.port.post.mk>
|