2002-07-15 17:58:32 +00:00
|
|
|
# New ports collection makefile for: apr
|
2002-03-14 16:39:26 +00:00
|
|
|
# Date created: 19 February 2002
|
|
|
|
# Whom: Garrett Rooney <rooneg@electricjellyfish.net>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
2003-11-09 00:57:38 +00:00
|
|
|
# Tunables:
|
2004-02-01 08:07:50 +00:00
|
|
|
# APR_UTIL_WITHOUT_THREADS: disable threads support
|
2003-11-09 00:57:38 +00: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 18:16:16 +00: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 00:57:38 +00:00
|
|
|
# (the database bindings are detected and recorded automatically if these
|
|
|
|
# switches are not set)
|
2004-10-12 22:41:44 +00:00
|
|
|
# APR_UTIL_WITH_LDAP: force dependency on OpenLDAP
|
2002-03-14 16:39:26 +00:00
|
|
|
|
2002-07-15 17:58:32 +00:00
|
|
|
PORTNAME= apr
|
2004-11-25 04:13:59 +00:00
|
|
|
PORTVERSION= 1.0.1
|
2004-11-25 05:01:04 +00:00
|
|
|
PORTREVISION= 1
|
2002-03-14 16:39:26 +00:00
|
|
|
CATEGORIES= devel
|
2004-11-25 04:54:14 +00:00
|
|
|
MASTER_SITES= ${MASTER_SITE_APACHE}
|
|
|
|
MASTER_SITE_SUBDIR= apr
|
2004-10-12 22:41:44 +00:00
|
|
|
DISTFILES= apr-${PORTVERSION}.tar.gz apr-util-${PORTVERSION}.tar.gz
|
2002-03-14 16:39:26 +00:00
|
|
|
|
2003-10-03 05:25:25 +00:00
|
|
|
MAINTAINER= rodrigc@crodrigues.org
|
2003-02-21 11:23:04 +00:00
|
|
|
COMMENT= The Apache Group's Portability Library
|
2002-03-14 16:39:26 +00:00
|
|
|
|
2004-10-12 22:41:44 +00:00
|
|
|
BUILD_DEPENDS= ${PYTHON_CMD}:${PYTHON_PORTSDIR}
|
2004-03-30 19:20:22 +00:00
|
|
|
LIB_DEPENDS+= expat.5:${PORTSDIR}/textproc/expat2
|
2002-03-14 16:39:26 +00:00
|
|
|
|
2004-06-04 17:29:38 +00:00
|
|
|
USE_ICONV= yes
|
2004-10-15 17:32:46 +00:00
|
|
|
USE_AUTOMAKE_VER= 19
|
2004-07-01 17:06:41 +00:00
|
|
|
USE_AUTOCONF_VER= 259
|
2004-06-04 17:29:38 +00:00
|
|
|
WANT_LIBTOOL_VER= 15
|
2004-11-25 04:54:14 +00:00
|
|
|
USE_REINPLACE= yes
|
2002-12-29 14:46:21 +00:00
|
|
|
USE_PERL5= yes
|
|
|
|
USE_GMAKE= yes
|
2004-10-12 22:41:44 +00:00
|
|
|
USE_PYTHON= yes
|
|
|
|
PYTHON_NO_DEPENDS= yes
|
2003-01-22 01:27:29 +00:00
|
|
|
INSTALLS_SHLIB= yes
|
2004-01-24 03:36:43 +00:00
|
|
|
GNU_CONFIGURE= yes
|
2002-03-14 16:39:26 +00:00
|
|
|
WRKSRC= ${WRKDIR}
|
|
|
|
|
2003-04-19 03:29:02 +00:00
|
|
|
APR_UTIL_CONF_ARGS= --with-apr=../apr-${PORTVERSION} \
|
2003-03-28 05:46:27 +00:00
|
|
|
--with-expat=${PREFIX} \
|
|
|
|
--with-iconv=${PREFIX}
|
2002-12-29 14:46:21 +00:00
|
|
|
|
2003-11-09 00:57:38 +00:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2004-02-01 08:07:50 +00: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 00:57:38 +00:00
|
|
|
.if defined(APR_UTIL_WITHOUT_GDBM)
|
|
|
|
APR_UTIL_CONF_ARGS+= --without-gdbm
|
2004-02-01 08:07:50 +00:00
|
|
|
.elif defined(APR_UTIL_WITH_GDBM) || exists(${LOCALBASE}/lib/libgdbm.so.3)
|
2003-11-09 00:57:38 +00: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 18:16:16 +00: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-28 23:07:50 +00:00
|
|
|
APR_UTIL_CONF_ARGS+= --with-berkeley-db=${PREFIX}
|
2003-11-09 00:57:38 +00:00
|
|
|
.if defined(PKGNAMESUFFIX)
|
|
|
|
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-db4
|
|
|
|
.else
|
|
|
|
PKGNAMESUFFIX= -db4
|
|
|
|
.endif
|
|
|
|
.endif
|
2004-02-01 08:07:50 +00:00
|
|
|
|
2004-10-12 22:41:44 +00: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 08:07:50 +00: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 18:16:16 +00:00
|
|
|
@${ECHO_MSG} "Berkeley db4.2 support is disabled."
|
2004-02-01 08:07:50 +00:00
|
|
|
.elif defined(APR_UTIL_WITH_BERKELEY_DB)
|
2004-11-06 18:16:16 +00: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 08:07:50 +00:00
|
|
|
.else
|
2004-11-06 18:16:16 +00: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 00:57:38 +00:00
|
|
|
.endif
|
2004-02-01 08:07:50 +00:00
|
|
|
@${ECHO_MSG} ""
|
2003-11-09 00:57:38 +00:00
|
|
|
|
2004-11-03 04:19:11 +00:00
|
|
|
post-patch:
|
2004-11-25 04:54:14 +00:00
|
|
|
${SED} -i .orig1 's/OSVERSION/'${OSVERSION}'/g' \
|
2004-11-03 04:19:11 +00:00
|
|
|
${WRKDIR}/apr-${PORTVERSION}/build/apr_hints.m4
|
2004-11-25 04:54:14 +00:00
|
|
|
${FIND} ${WRKDIR} -name "Makefile.in*" | ${XARGS} ${REINPLACE_CMD} -e \
|
|
|
|
's|[(]libdir[)]/pkgconfig|(prefix)/libdata/pkgconfig|g'
|
2004-01-14 14:45:24 +00:00
|
|
|
|
2002-03-14 16:39:26 +00:00
|
|
|
pre-configure:
|
2004-06-28 23:16:53 +00: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 17:34:39 +00:00
|
|
|
|
|
|
|
run-autotools:
|
2004-07-01 17:06:41 +00:00
|
|
|
cd ${WRKDIR}/apr-${PORTVERSION}; ${SETENV} ${SCRIPTS_ENV} ${SH} ./buildconf
|
2004-03-15 14:07:47 +00:00
|
|
|
cd ${WRKDIR}/apr-util-${PORTVERSION} ; \
|
|
|
|
${RM} -fr xml/expat
|
|
|
|
cd ${WRKDIR}/apr-util-${PORTVERSION} ; \
|
2004-07-01 17:06:41 +00:00
|
|
|
${SETENV} ${SCRIPTS_ENV} ${SH} ./buildconf \
|
2003-04-19 03:29:02 +00:00
|
|
|
--with-apr=../apr-${PORTVERSION}
|
|
|
|
cd ${WRKDIR}/apr-${PORTVERSION}; \
|
2004-02-13 00:32:24 +00:00
|
|
|
${SETENV} ${SCRIPTS_ENV} ${SH} ./configure ${CONFIGURE_ARGS}
|
2003-04-19 03:29:02 +00:00
|
|
|
cd ${WRKDIR}/apr-util-${PORTVERSION}; \
|
2004-02-13 00:32:24 +00:00
|
|
|
${SETENV} ${SCRIPTS_ENV} ${SH} \
|
2003-04-06 22:37:13 +00:00
|
|
|
./configure ${CONFIGURE_ARGS} ${APR_UTIL_CONF_ARGS}
|
2002-03-14 16:39:26 +00:00
|
|
|
|
2004-03-15 14:07:47 +00:00
|
|
|
do-configure:
|
|
|
|
${DO_NADA}
|
|
|
|
|
2002-03-14 16:39:26 +00:00
|
|
|
do-build:
|
2003-10-03 05:25:25 +00:00
|
|
|
cd ${WRKDIR}/apr-${PORTVERSION}; ${SETENV} ${MAKE_ENV} ${GMAKE}
|
|
|
|
cd ${WRKDIR}/apr-util-${PORTVERSION}; ${SETENV} ${MAKE_ENV} ${GMAKE}
|
2002-03-14 16:39:26 +00:00
|
|
|
|
|
|
|
do-install:
|
2003-10-03 05:25:25 +00:00
|
|
|
cd ${WRKDIR}/apr-${PORTVERSION}; ${SETENV} ${MAKE_ENV} ${GMAKE} install
|
|
|
|
cd ${WRKDIR}/apr-util-${PORTVERSION}; ${SETENV} ${MAKE_ENV} ${GMAKE} install
|
2002-03-14 16:39:26 +00:00
|
|
|
|
2004-04-10 17:34:39 +00:00
|
|
|
debug_autoconf:
|
2004-11-25 04:54:14 +00: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 17:34:39 +00:00
|
|
|
@echo "AUTOCONF_DIR: ${AUTOCONF_DIR}"
|
|
|
|
@echo "BUILD_DEPENDS: ${BUILD_DEPENDS}"
|
|
|
|
@echo "ACLOCAL_DIR: ${ACLOCAL_DIR}"
|
|
|
|
@echo "LIBTOOLFILES: ${LIBTOOLFILES}"
|
2004-11-25 04:54:14 +00:00
|
|
|
@echo "LIBTOOL_SHAREDIR: ${LIBTOOL_SHAREDIR}"
|
|
|
|
@echo "LIBTOOL_LIBEXECDIR: ${LIBTOOL_LIBEXECDIR}"
|
|
|
|
@echo "LIBTOOL_M4: ${LIBTOOL_M4}"
|
2004-04-10 17:34:39 +00:00
|
|
|
|
2003-11-09 00:57:38 +00:00
|
|
|
.include <bsd.port.post.mk>
|