aboutsummaryrefslogtreecommitdiff
path: root/devel/apr2
diff options
context:
space:
mode:
authorPhilip M. Gollucci <pgollucci@FreeBSD.org>2010-06-01 22:35:25 +0000
committerPhilip M. Gollucci <pgollucci@FreeBSD.org>2010-06-01 22:35:25 +0000
commita6fd705b8485bb4879bcbd67087c92e1678acf93 (patch)
treed4e8ee75849eb36261e24248c9c4fabf56906524 /devel/apr2
parent6f7a032a5d3121ffea5431949935570ed60ed51b (diff)
Notes
Diffstat (limited to 'devel/apr2')
-rw-r--r--devel/apr2/Makefile139
-rw-r--r--devel/apr2/distinfo9
-rw-r--r--devel/apr2/files/patch-apr-util-1.3.9__build__dbm.m4129
-rw-r--r--devel/apr2/files/patch-apr_buildconf10
-rw-r--r--devel/apr2/files/patch-build__apr_hints.m4 (renamed from devel/apr2/files/patch-apr_hints.m4)13
-rw-r--r--devel/apr2/files/patch-build__iconv.m411
-rw-r--r--devel/apr2/files/patch-buildconf18
-rw-r--r--devel/apr2/pkg-plist227
8 files changed, 210 insertions, 346 deletions
diff --git a/devel/apr2/Makefile b/devel/apr2/Makefile
index 1081cd00a720..61c7618c54ad 100644
--- a/devel/apr2/Makefile
+++ b/devel/apr2/Makefile
@@ -6,17 +6,17 @@
PORTNAME= apr
PORTVERSION= ${APR_VERSION}.${APU_VERSION}
-PORTREVISION= 1
CATEGORIES= devel
-MASTER_SITES= ${MASTER_SITE_APACHE}
-MASTER_SITE_SUBDIR= apr
-DISTFILES= apr-${APR_VERSION}.tar.gz apr-util-${APU_VERSION}.tar.gz
+MASTER_SITES= http://svn.apache.org/snapshots/apr/
+DISTNAME= ${PORTNAME}_${SNAPDATE}
MAINTAINER= apache@FreeBSD.org
COMMENT= Apache Portability Library
LIB_DEPENDS= expat.6:${PORTSDIR}/textproc/expat2
+SNAPDATE= 20100527031346
+
MAKE_JOBS_SAFE= yes
OPTIONS= THREADS "Enable Threads in apr" on \
@@ -28,10 +28,8 @@ OPTIONS= THREADS "Enable Threads in apr" on \
NDBM "Enable NDBM support in apr-util" off \
PGSQL "Enable Postgresql suport in apr-util" off \
SQLITE "Enable SQLite3 support in apr-util" off \
- DEVRANDOM "Use /dev/random or compatible in apr" on
-
-APR_VERSION= 1.4.2
-APU_VERSION= 1.3.9
+ DEVRANDOM "Use /dev/random or compatible in apr" on \
+ DEVELOPER_ONLY "I want to test apr2 not the maintainer" off
USE_ICONV= yes
USE_AUTOTOOLS= automake:19 autoconf:262 libtool:22:env
@@ -42,37 +40,36 @@ GNU_CONFIGURE= yes
CONFIGURE_ENV= CC="${CC}"
-NO_WRKSUBDIR= yes
-APR_WRKDIR= ${WRKDIR}/apr-${APR_VERSION}
-APU_WRKDIR= ${WRKDIR}/apr-util-${APU_VERSION}
+CONFIGURE_ARGS= --with-installbuilddir=${DATADIR}/build-2 \
+ --with-expat=${LOCALBASE} \
+ --with-iconv=${LOCALBASE}
-PLIST_SUB= SHLIB_APR_MAJOR="${SHLIB_APR_MAJOR}" SHLIB_APU_MAJOR="${SHLIB_APU_MAJOR}"
-SHLIB_APR_MAJOR= 4
-SHLIB_APU_MAJOR= 3
+WRKSRC= ${WRKDIR}/apr
-APR_CONF_ARGS= --with-installbuilddir=${DATADIR}/build-1
-APU_CONF_ARGS= --with-apr=${APR_WRKDIR} \
- --with-expat=${LOCALBASE} \
- --with-iconv=${LOCALBASE}
+SHLIB_MAJOR= 0
+PLIST_SUB= SHLIB_MAJOR="${SHLIB_MAJOR}"
.include <bsd.port.options.mk>
-########## APR Options
+.if !defined(WITH_DEVELOPER_ONLY)
+IGNORE= not for the general public. Maintainer only supports developers of apr
+.endif
+
.if defined(WITHOUT_THREADS)
-APR_CONF_ARGS+= --disable-threads
+CONFIGURE_ARGS+= --disable-threads
.if defined(PKGNAMESUFFIX)
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-nothr
.else
PKGNAMESUFFIX= -nothr
.endif
.else
-APR_CONF_ARGS+= --enable-threads
+CONFIGURE_ARGS+= --enable-threads
.endif
.if defined(WITHOUT_IPV6)
-APR_CONF_ARGS+= --disable-ipv6
+CONFIGURE_ARGS+= --disable-ipv6
.else
-APR_CONF_ARGS+= --enable-ipv6
+CONFIGURE_ARGS+= --enable-ipv6
.if defined(PKGNAMESUFFIX)
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-ipv6
.else
@@ -81,9 +78,9 @@ PKGNAMESUFFIX= -ipv6
.endif
.if defined(WITHOUT_DEVRANDOM)
-APR_CONF_ARGS+= --without-devrandom
+CONFIGURE_ARGS+= --without-devrandom
.else
-APR_CONF_ARGS+= --with-devrandom
+CONFIGURE_ARGS+= --with-devrandom
.if defined(PKGNAMESUFFIX)
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-devrandom
.else
@@ -94,12 +91,12 @@ PKGNAMESUFFIX= -devrandom
######### APR-Util Options
.if defined(WITHOUT_GDBM)
PLIST_SUB+= GDBM="@comment "
-APU_CONF_ARGS+= --without-gdbm
+CONFIGURE_ARGS+= --without-gdbm
.else
PLIST_SUB+= GDBM=""
-APU_EXTRAS= yes
+EXTRAS= yes
LIB_DEPENDS+= gdbm.3:${PORTSDIR}/databases/gdbm
-APU_CONF_ARGS+= --with-gdbm=${LOCALBASE}
+CONFIGURE_ARGS+= --with-gdbm=${LOCALBASE}
.if defined(PKGNAMESUFFIX)
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-gdbm
.else
@@ -109,12 +106,12 @@ PKGNAMESUFFIX= -gdbm
.if defined(WITHOUT_BDB)
PLIST_SUB+= BDB="@comment "
-APU_CONF_ARGS+= --without-berkeley-db
+CONFIGURE_ARGS+= --without-berkeley-db
.else
-APU_EXTRAS= yes
+EXTRAS= yes
PLIST_SUB+= BDB=""
USE_BDB= 42+
-APU_CONF_ARGS+= --with-berkeley-db=${BDB_INCLUDE_DIR}:${BDB_LIB_DIR}
+CONFIGURE_ARGS+= --with-berkeley-db=${BDB_INCLUDE_DIR}:${BDB_LIB_DIR}
.if defined(PKGNAMESUFFIX)
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-${BDB_INCLUDE_DIR:S,^${LOCALBASE}/include/,,}
.else
@@ -123,9 +120,9 @@ PKGNAMESUFFIX= -${BDB_INCLUDE_DIR:S,^${LOCALBASE}/include/,,}
.endif
.if defined(WITH_NDBM)
-APU_EXTRAS= yes
+EXTRAS= yes
PLIST_SUB+= NDBM=""
-APU_CONF_ARGS+= --with-ndbm=/usr
+CONFIGURE_ARGS+= --with-ndbm=/usr
.if defined(PKGNAMESUFFIX)
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-ndbm
.else
@@ -133,14 +130,14 @@ PKGNAMESUFFIX= -ndbm
.endif
.else
PLIST_SUB+= NDBM="@comment "
-APU_CONF_ARGS+= --without-ndbm
+CONFIGURE_ARGS+= --without-ndbm
.endif
.if defined(WITH_LDAP)
-APU_EXTRAS= yes
+EXTRAS= yes
PLIST_SUB+= LDAP=""
USE_OPENLDAP= yes
-APU_CONF_ARGS+= --with-ldap-include=${LOCALBASE}/include \
+CONFIGURE_ARGS+= --with-ldap-include=${LOCALBASE}/include \
--with-ldap-lib=${LOCALBASE}/lib --with-ldap=ldap
.if defined(PKGNAMESUFFIX)
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-ldap${OPENLDAP_VER}
@@ -149,14 +146,14 @@ PKGNAMESUFFIX= -ldap
.endif
.else
PLIST_SUB+= LDAP="@comment "
-APU_CONF_ARGS+= --without-ldap
+CONFIGURE_ARGS+= --without-ldap
.endif
.if defined(WITH_MYSQL)
-APU_EXTRAS= yes
+EXTRAS= yes
PLIST_SUB+= MYSQL=""
USE_MYSQL= YES
-APU_CONF_ARGS+= --with-mysql=${LOCALBASE}
+CONFIGURE_ARGS+= --with-mysql=${LOCALBASE}
CONFIGURE_ENV+= LIBS="${LIBS}"
CFLAGS+= -I${LOCALBASE}/include -I${LOCALBASE}/include/mysql -DHAVE_MYSQL_H
LDFLAGS+= -L${LOCALBASE}/lib/mysql
@@ -167,14 +164,14 @@ PKGNAMESUFFIX= -mysql
.endif
.else
PLIST_SUB+= MYSQL="@comment "
-APU_CONF_ARGS+= --without-mysql
+CONFIGURE_ARGS+= --without-mysql
.endif
.if defined(WITH_PGSQL)
-APU_EXTRAS= yes
+EXTRAS= yes
PLIST_SUB+= PGSQL=""
USE_PGSQL= YES
-APU_CONF_ARGS+= --with-pgsql=${LOCALBASE}
+CONFIGURE_ARGS+= --with-pgsql=${LOCALBASE}
CONFIGURE_ENV+= ac_cv_path_PGSQL_CONFIG=""
.if defined(PKGNAMESUFFIX)
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-pgsql${PGSQL_VER}
@@ -183,66 +180,47 @@ PKGNAMESUFFIX= -pgsql
.endif
.else
PLIST_SUB+= PGSQL="@comment "
-APU_CONF_ARGS+= --without-pgsql
+CONFIGURE_ARGS+= --without-pgsql
.endif
.if defined(WITH_SQLITE)
-APU_EXTRAS= yes
+EXTRAS= yes
PLIST_SUB+= SQLITE3=""
USE_SQLITE= YES
-APU_CONF_ARGS+= --with-sqlite3=${LOCALBASE}
+CONFIGURE_ARGS+= --with-sqlite3=${LOCALBASE}
.if defined(PKGNAMESUFFIX)
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-sqlite3
.else
PKGNAMESUFFIX= -sqlite3
.endif
.else
-APU_CONF_ARGS+= --without-sqlite3
+CONFIGURE_ARGS+= --without-sqlite3
PLIST_SUB+= SQLITE3="@comment "
.endif
-.if defined(APU_EXTRAS)
-PLIST_SUB+= APU_EXTRAS=""
+.if defined(EXTRAS)
+PLIST_SUB+= EXTRAS=""
.else
-PLIST_SUB+= APU_EXTRAS="@comment "
+PLIST_SUB+= EXTRAS="@comment "
.endif
post-patch:
- ${REINPLACE_CMD} -e 's/OSVERSION/${OSVERSION}/g' \
- ${APR_WRKDIR}/build/apr_hints.m4
- ${FIND} ${APR_WRKDIR} ${APU_WRKDIR} -name "Makefile.in*" | ${XARGS} ${REINPLACE_CMD} -e \
+ ${REINPLACE_CMD} -e 's/OSVERSION/${OSVERSION}/g' ${WRKSRC}/build/apr_hints.m4
+ ${FIND} ${WRKSRC} -name "Makefile.in*" | ${XARGS} ${REINPLACE_CMD} -e \
's|[(]libdir[)]/pkgconfig|(prefix)/libdata/pkgconfig|g'
${REINPLACE_CMD} -e 's,-lpthread,${PTHREAD_LIBS},g' \
- ${APR_WRKDIR}/build/apr_threads.m4 ${APR_WRKDIR}/build/apr_hints.m4 \
- ${APU_WRKDIR}/build/apu-conf.m4
- ${REINPLACE_CMD} -e '1 s/python/${PYTHON_VERSION}/' \
- ${APR_WRKDIR}/build/gen-build.py
-
-run-autotools::
- cd ${APR_WRKDIR} ; \
- ${SETENV} ${CONFIGURE_ENV} ${SH} ./buildconf
- cd ${APU_WRKDIR} ; \
- ${RM} -fr xml/expat
- cd ${APU_WRKDIR} ; \
- ${SETENV} ${CONFIGURE_ENV} ${SH} ./buildconf \
- --with-apr=${APR_WRKDIR}
- cd ${APR_WRKDIR}; \
- ${SETENV} ${CONFIGURE_ENV} ${SH} \
- ./configure ${CONFIGURE_ARGS} ${APR_CONF_ARGS}
- cd ${APU_WRKDIR}; \
- ${SETENV} ${CONFIGURE_ENV} ${SH} \
- ./configure ${CONFIGURE_ARGS} ${APU_CONF_ARGS}
+ ${WRKSRC}/build/apr_threads.m4 \
+ ${WRKSRC}/build/apr_hints.m4 \
+ ${WRKSRC}/build/apu-conf.m4
+ ${REINPLACE_CMD} -e '1 s/python/${PYTHON_VERSION}/' ${WRKSRC}/build/gen-build.py
-do-configure:
- ${DO_NADA}
+run-autotools:
+ @(cd ${WRKSRC} ; ${SETENV} ${CONFIGURE_ENV} ${SH} ./buildconf)
-do-build:
- cd ${APR_WRKDIR}; ${SETENV} ${MAKE_ENV} ${MAKE}
- cd ${APU_WRKDIR}; ${SETENV} ${MAKE_ENV} ${MAKE}
+test: build
+ @(cd ${WRKSRC}; make test)
-do-install:
- cd ${APR_WRKDIR}; ${SETENV} ${MAKE_ENV} ${MAKE} ${INSTALL_TARGET}
- cd ${APU_WRKDIR}; ${SETENV} ${MAKE_ENV} ${MAKE} ${INSTALL_TARGET}
+#regression-test: test
debug_autoconf:
@${ECHO} "LIBTOOL: ${LIBTOOL_VERSION}"
@@ -255,7 +233,6 @@ debug_autoconf:
@${ECHO} "LIBTOOL_SHAREDIR: ${LIBTOOL_SHAREDIR}"
@${ECHO} "LIBTOOL_LIBEXECDIR: ${LIBTOOL_LIBEXECDIR}"
@${ECHO} "LIBTOOL_M4: ${LIBTOOL_M4}"
- @${ECHO} "${SETENV} ${CONFIGURE_ENV} ${SH} ./configure ${CONFIGURE_ARGS} ${APR_CONF_ARGS}"
- @${ECHO} "${SETENV} ${CONFIGURE_ENV} ${SH} ./configure ${CONFIGURE_ARGS} ${APR_UTIL_CONF_ARGS}"
+ @${ECHO} "${SETENV} ${CONFIGURE_ENV} ${SH} ./configure ${CONFIGURE_ARGS} ${CONFIGURE_ARGS}"
.include <bsd.port.mk>
diff --git a/devel/apr2/distinfo b/devel/apr2/distinfo
index 3dbdf15760e7..adb877f677c3 100644
--- a/devel/apr2/distinfo
+++ b/devel/apr2/distinfo
@@ -1,6 +1,3 @@
-MD5 (apr-1.4.2.tar.gz) = fc80cb54f158c2674f9eeb47a1f672cd
-SHA256 (apr-1.4.2.tar.gz) = 6a0291d6f6a59d5eab5ae5441c37b78b17f7a1a2fa1478741b7178f5fbc33ebe
-SIZE (apr-1.4.2.tar.gz) = 949945
-MD5 (apr-util-1.3.9.tar.gz) = cc2ec0ba4f01d88375f1170f762518fa
-SHA256 (apr-util-1.3.9.tar.gz) = 20897069274a026057df26b90a6424da9d70318d930c99885c451d8753b8e4d9
-SIZE (apr-util-1.3.9.tar.gz) = 790952
+MD5 (apr_20100527031346.tar.gz) = 46c4e65409e12273c36a420ec22dfa78
+SHA256 (apr_20100527031346.tar.gz) = 1fbb2276f030941f044ce927a7dc160868a07a87172f14dab4077d14dfc19d09
+SIZE (apr_20100527031346.tar.gz) = 990126
diff --git a/devel/apr2/files/patch-apr-util-1.3.9__build__dbm.m4 b/devel/apr2/files/patch-apr-util-1.3.9__build__dbm.m4
deleted file mode 100644
index 0f0fe1e9cbb3..000000000000
--- a/devel/apr2/files/patch-apr-util-1.3.9__build__dbm.m4
+++ /dev/null
@@ -1,129 +0,0 @@
---- ./apr-util-1.3.9/build/dbm.m4.orig 2008-11-21 01:32:58.000000000 -0500
-+++ ./apr-util-1.3.9/build/dbm.m4 2010-05-06 20:21:58.910611623 -0400
-@@ -522,6 +522,25 @@
- apu_db_version=4
- fi
- ])
-+dnl
-+dnl APU_CHECK_DB48: is DB4.8 present?
-+dnl
-+dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
-+dnl
-+AC_DEFUN([APU_CHECK_DB48], [
-+ places=$1
-+ if test -z "$places"; then
-+ places="std /usr/local/BerkeleyDB.4.8 /boot/home/config"
-+ fi
-+ APU_CHECK_BERKELEY_DB("4", "8", "-1",
-+ "$places",
-+ "db48/db.h db4/db.h db.h",
-+ "db-4.8 db4-4.8 db48 db4 db"
-+ )
-+ if test "$apu_have_db" = "1"; then
-+ apu_db_version=4
-+ fi
-+])
-
- AC_DEFUN([APU_CHECK_DB], [
- requested=$1
-@@ -606,6 +625,12 @@
- AC_MSG_ERROR(Berkeley db4 not found)
- fi
- ;;
-+ db48)
-+ APU_CHECK_DB48("$check_places")
-+ if test "$apu_db_version" != "4"; then
-+ AC_MSG_ERROR(Berkeley db4 not found)
-+ fi
-+ ;;
- default)
- APU_CHECK_DB_ALL("$check_places")
- ;;
-@@ -613,34 +638,37 @@
- ])
-
- dnl
--dnl APU_CHECK_DB_ALL: Try all Berkeley DB versions, from 4.7 to 1.
-+dnl APU_CHECK_DB_ALL: Try all Berkeley DB versions, from 4.8 to 1.
- dnl
- AC_DEFUN([APU_CHECK_DB_ALL], [
- all_places=$1
-
-- APU_CHECK_DB47("$all_places")
-+ APU_CHECK_DB48("$all_places")
- if test "$apu_db_version" != "4"; then
-- APU_CHECK_DB46("$all_places")
-+ APU_CHECK_DB47("$all_places")
- if test "$apu_db_version" != "4"; then
-- APU_CHECK_DB45("$all_places")
-+ APU_CHECK_DB46("$all_places")
- if test "$apu_db_version" != "4"; then
-- APU_CHECK_DB44("$all_places")
-+ APU_CHECK_DB45("$all_places")
- if test "$apu_db_version" != "4"; then
-- APU_CHECK_DB43("$all_places")
-+ APU_CHECK_DB44("$all_places")
- if test "$apu_db_version" != "4"; then
-- APU_CHECK_DB42("$all_places")
-+ APU_CHECK_DB43("$all_places")
- if test "$apu_db_version" != "4"; then
-- APU_CHECK_DB41("$all_places")
-+ APU_CHECK_DB42("$all_places")
- if test "$apu_db_version" != "4"; then
-- APU_CHECK_DB4("$all_places")
-+ APU_CHECK_DB41("$all_places")
- if test "$apu_db_version" != "4"; then
-- APU_CHECK_DB3("$all_places")
-- if test "$apu_db_version" != "3"; then
-- APU_CHECK_DB2("$all_places")
-- if test "$apu_db_version" != "2"; then
-- APU_CHECK_DB1("$all_places")
-- if test "$apu_db_version" != "1"; then
-- APU_CHECK_DB185("$all_places")
-+ APU_CHECK_DB4("$all_places")
-+ if test "$apu_db_version" != "4"; then
-+ APU_CHECK_DB3("$all_places")
-+ if test "$apu_db_version" != "3"; then
-+ APU_CHECK_DB2("$all_places")
-+ if test "$apu_db_version" != "2"; then
-+ APU_CHECK_DB1("$all_places")
-+ if test "$apu_db_version" != "1"; then
-+ APU_CHECK_DB185("$all_places")
-+ fi
- fi
- fi
- fi
-@@ -679,11 +707,11 @@
- apu_db_version=0
-
- AC_ARG_WITH(dbm, [APR_HELP_STRING([--with-dbm=DBM], [choose the DBM type to use.
-- DBM={sdbm,gdbm,ndbm,db,db1,db185,db2,db3,db4,db41,db42,db43,db44,db45,db46,db47}])],
-+ DBM={sdbm,gdbm,ndbm,db,db1,db185,db2,db3,db4,db41,db42,db43,db44,db45,db46,db47,db48}])],
- [
- if test "$withval" = "yes"; then
- AC_MSG_ERROR([--with-dbm needs to specify a DBM type to use.
-- One of: sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4, db41, db42, db43, db44, db45, db46, db47])
-+ One of: sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4, db41, db42, db43, db44, db45, db46, db47, db48])
- fi
- requested="$withval"
- ], [
-@@ -882,6 +910,10 @@
- apu_use_db=1
- apu_default_dbm=db4
- ;;
-+ db48)
-+ apu_use_db=1
-+ apu_default_dbm=db4
-+ ;;
- default)
- dnl ### use more sophisticated DBMs for the default?
- apu_default_dbm="sdbm (default)"
-@@ -889,7 +921,7 @@
- ;;
- *)
- AC_MSG_ERROR([--with-dbm=$look_for is an unknown DBM type.
-- Use one of: sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4, db41, db42, db43, db44, db45, db46, db47])
-+ Use one of: sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4, db41, db42, db43, db44, db45, db46, db47, db48])
- ;;
- esac
-
diff --git a/devel/apr2/files/patch-apr_buildconf b/devel/apr2/files/patch-apr_buildconf
deleted file mode 100644
index f34ebe102a4a..000000000000
--- a/devel/apr2/files/patch-apr_buildconf
+++ /dev/null
@@ -1,10 +0,0 @@
---- apr-1.4.2/buildconf.orig 2009-02-24 06:37:18.000000000 +0300
-+++ apr-1.4.2/buildconf 2009-09-27 14:25:11.000000000 +0400
-@@ -71,6 +71,7 @@
-
- echo "buildconf: Using libtool.m4 at ${ltfile}."
-
-+chmod 664 build/libtool.m4
- cat $ltfile | sed -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' > build/libtool.m4
-
- # libtool.m4 from 1.6 requires ltsugar.m4
diff --git a/devel/apr2/files/patch-apr_hints.m4 b/devel/apr2/files/patch-build__apr_hints.m4
index f86ec6c0fd5b..3359e8fdcade 100644
--- a/devel/apr2/files/patch-apr_hints.m4
+++ b/devel/apr2/files/patch-build__apr_hints.m4
@@ -1,6 +1,6 @@
---- apr-1.4.2/build/apr_hints.m4.orig Wed Oct 27 11:12:28 2004
-+++ apr-1.4.2/build/apr_hints.m4 Wed Oct 27 11:25:32 2004
-@@ -137,11 +137,7 @@
+--- ./build/apr_hints.m4.orig 2010-02-06 16:14:03.000000000 -0500
++++ ./build/apr_hints.m4 2010-05-26 23:19:19.263812317 -0400
+@@ -159,15 +159,11 @@
;;
*-freebsd*)
APR_SETIFNULL(apr_lock_method, [USE_FLOCK_SERIALIZE])
@@ -9,7 +9,12 @@
- else
- os_version=000000
- fi
-+ os_version="OSVERSION"
++ osversion="${900010}"
# 502102 is when libc_r switched to libpthread (aka libkse).
if test $os_version -ge "502102"; then
apr_cv_pthreads_cflags="none"
+- apr_cv_pthreads_lib="-lpthread"
++ apr_cv_pthreads_lib="-pthread"
+ else
+ APR_ADDTO(CPPFLAGS, [-D_THREAD_SAFE -D_REENTRANT])
+ APR_SETIFNULL(enable_threads, [no])
diff --git a/devel/apr2/files/patch-build__iconv.m4 b/devel/apr2/files/patch-build__iconv.m4
new file mode 100644
index 000000000000..d27eb6a6ee93
--- /dev/null
+++ b/devel/apr2/files/patch-build__iconv.m4
@@ -0,0 +1,11 @@
+--- ./build/iconv.m4.orig 2010-05-26 23:19:28.011405098 -0400
++++ ./build/iconv.m4 2010-05-26 23:19:37.002271826 -0400
+@@ -44,7 +44,7 @@
+ if test -f "$apu_iconv_dir/include/iconv.h"; then
+ have_iconv="1"
+ APR_ADDTO(CPPFLAGS,[-I$apu_iconv_dir/include])
+- APR_ADDTO(LDFLAGS,[-L$apu_iconv_dir/lib])
++ APR_ADDTO(LDFLAGS,[-L$apu_iconv_dir/lib -liconv])
+ fi
+ fi
+ ])
diff --git a/devel/apr2/files/patch-buildconf b/devel/apr2/files/patch-buildconf
new file mode 100644
index 000000000000..c374dc360955
--- /dev/null
+++ b/devel/apr2/files/patch-buildconf
@@ -0,0 +1,18 @@
+--- ./buildconf.orig 2009-11-13 22:13:59.000000000 -0500
++++ ./buildconf 2010-05-26 23:19:19.245814435 -0400
+@@ -69,6 +69,7 @@
+ fi
+ # Do we need this anymore?
+ echo "buildconf: Using libtool.m4 at ${ltfile}."
++ chmod 644 build/libtool.m4
+ cat $ltfile | sed -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' > build/libtool.m4
+ fi
+ if test "$1" = "2"; then
+@@ -76,6 +77,7 @@
+ # Wouldn't it just be better to define top_builddir??
+ mv build/libtool.m4 build/libtool.m4.$$
+ cat build/libtool.m4.$$ | sed -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' > build/libtool.m4
++ chmod 644 build/libtool.m4.$$
+ rm build/libtool.m4.$$
+ fi
+
diff --git a/devel/apr2/pkg-plist b/devel/apr2/pkg-plist
index b89a75c8eec4..89797373cdd7 100644
--- a/devel/apr2/pkg-plist
+++ b/devel/apr2/pkg-plist
@@ -1,118 +1,113 @@
-bin/apr-1-config
-bin/apu-1-config
-%%DATADIR%%/build-1/apr_rules.mk
-%%DATADIR%%/build-1/libtool
-%%DATADIR%%/build-1/make_exports.awk
-%%DATADIR%%/build-1/make_var_export.awk
-%%DATADIR%%/build-1/mkdir.sh
-include/apr-1/apr.h
-include/apr-1/apr_allocator.h
-include/apr-1/apr_anylock.h
-include/apr-1/apr_atomic.h
-include/apr-1/apr_base64.h
-include/apr-1/apr_buckets.h
-include/apr-1/apr_date.h
-include/apr-1/apr_dbd.h
-include/apr-1/apr_dbm.h
-include/apr-1/apr_dso.h
-include/apr-1/apr_env.h
-include/apr-1/apr_errno.h
-include/apr-1/apr_file_info.h
-include/apr-1/apr_file_io.h
-include/apr-1/apr_fnmatch.h
-include/apr-1/apr_general.h
-include/apr-1/apr_getopt.h
-include/apr-1/apr_global_mutex.h
-include/apr-1/apr_hash.h
-include/apr-1/apr_hooks.h
-include/apr-1/apr_inherit.h
-include/apr-1/apr_ldap.h
-include/apr-1/apr_ldap_init.h
-include/apr-1/apr_ldap_option.h
-include/apr-1/apr_ldap_rebind.h
-include/apr-1/apr_ldap_url.h
-include/apr-1/apr_lib.h
-include/apr-1/apr_md4.h
-include/apr-1/apr_md5.h
-include/apr-1/apr_memcache.h
-include/apr-1/apr_mmap.h
-include/apr-1/apr_network_io.h
-include/apr-1/apr_optional.h
-include/apr-1/apr_optional_hooks.h
-include/apr-1/apr_poll.h
-include/apr-1/apr_pools.h
-include/apr-1/apr_portable.h
-include/apr-1/apr_proc_mutex.h
-include/apr-1/apr_queue.h
-include/apr-1/apr_random.h
-include/apr-1/apr_reslist.h
-include/apr-1/apr_ring.h
-include/apr-1/apr_rmm.h
-include/apr-1/apr_sdbm.h
-include/apr-1/apr_sha1.h
-include/apr-1/apr_shm.h
-include/apr-1/apr_signal.h
-include/apr-1/apr_strings.h
-include/apr-1/apr_strmatch.h
-include/apr-1/apr_support.h
-include/apr-1/apr_tables.h
-include/apr-1/apr_thread_cond.h
-include/apr-1/apr_thread_mutex.h
-include/apr-1/apr_thread_pool.h
-include/apr-1/apr_thread_proc.h
-include/apr-1/apr_thread_rwlock.h
-include/apr-1/apr_time.h
-include/apr-1/apr_uri.h
-include/apr-1/apr_user.h
-include/apr-1/apr_uuid.h
-include/apr-1/apr_version.h
-include/apr-1/apr_want.h
-include/apr-1/apr_xlate.h
-include/apr-1/apr_xml.h
-include/apr-1/apu.h
-include/apr-1/apu_version.h
-include/apr-1/apu_want.h
-libdata/pkgconfig/apr-1.pc
-libdata/pkgconfig/apr-util-1.pc
+bin/apr-2-config
+%%DATADIR%%/build-2/libtool
+%%DATADIR%%/build-2/mkdir.sh
+%%DATADIR%%/build-2/make_exports.awk
+%%DATADIR%%/build-2/make_var_export.awk
+%%DATADIR%%/build-2/apr_rules.mk
+include/apr-2/apr.h
+include/apr-2/apr_allocator.h
+include/apr-2/apr_anylock.h
+include/apr-2/apr_atomic.h
+include/apr-2/apr_base64.h
+include/apr-2/apr_buckets.h
+include/apr-2/apr_crypto.h
+include/apr-2/apr_date.h
+include/apr-2/apr_dbd.h
+include/apr-2/apr_dbm.h
+include/apr-2/apr_dso.h
+include/apr-2/apr_env.h
+include/apr-2/apr_errno.h
+include/apr-2/apu_errno.h
+include/apr-2/apr_file_info.h
+include/apr-2/apr_file_io.h
+include/apr-2/apr_fnmatch.h
+include/apr-2/apr_general.h
+include/apr-2/apr_getopt.h
+include/apr-2/apr_global_mutex.h
+include/apr-2/apr_hash.h
+include/apr-2/apr_hooks.h
+include/apr-2/apr_inherit.h
+include/apr-2/apr_ldap.h
+include/apr-2/apr_ldap_init.h
+include/apr-2/apr_ldap_option.h
+include/apr-2/apr_ldap_rebind.h
+include/apr-2/apr_ldap_url.h
+include/apr-2/apr_lib.h
+include/apr-2/apr_md4.h
+include/apr-2/apr_md5.h
+include/apr-2/apr_memcache.h
+include/apr-2/apr_mmap.h
+include/apr-2/apr_network_io.h
+include/apr-2/apr_optional.h
+include/apr-2/apr_optional_hooks.h
+include/apr-2/apr_perms_set.h
+include/apr-2/apr_poll.h
+include/apr-2/apr_pools.h
+include/apr-2/apr_portable.h
+include/apr-2/apr_proc_mutex.h
+include/apr-2/apr_queue.h
+include/apr-2/apr_random.h
+include/apr-2/apr_reslist.h
+include/apr-2/apr_ring.h
+include/apr-2/apr_rmm.h
+include/apr-2/apr_sdbm.h
+include/apr-2/apr_sha1.h
+include/apr-2/apr_shm.h
+include/apr-2/apr_signal.h
+include/apr-2/apr_strings.h
+include/apr-2/apr_strmatch.h
+include/apr-2/apr_tables.h
+include/apr-2/apr_thread_cond.h
+include/apr-2/apr_thread_mutex.h
+include/apr-2/apr_thread_pool.h
+include/apr-2/apr_thread_proc.h
+include/apr-2/apr_thread_rwlock.h
+include/apr-2/apr_time.h
+include/apr-2/apr_uri.h
+include/apr-2/apr_user.h
+include/apr-2/apr_uuid.h
+include/apr-2/apr_version.h
+include/apr-2/apr_want.h
+include/apr-2/apr_xlate.h
+include/apr-2/apr_xml.h
+include/apr-2/apu.h
+include/apr-2/apu_version.h
+include/apr-2/apu_want.h
+libdata/pkgconfig/apr-2.pc
lib/apr.exp
-lib/aprutil.exp
-lib/libapr-1.a
-lib/libapr-1.la
-lib/libapr-1.so
-lib/libapr-1.so.%%SHLIB_APR_MAJOR%%
-lib/libaprutil-1.a
-lib/libaprutil-1.la
-lib/libaprutil-1.so
-lib/libaprutil-1.so.%%SHLIB_APU_MAJOR%%
-%%BDB%%lib/apr-util-1/apr_dbm_db-1.so
-%%BDB%%lib/apr-util-1/apr_dbm_db.so
-%%BDB%%lib/apr-util-1/apr_dbm_db.la
-%%BDB%%lib/apr-util-1/apr_dbm_db.a
-%%GDBM%%lib/apr-util-1/apr_dbm_gdbm-1.so
-%%GDBM%%lib/apr-util-1/apr_dbm_gdbm.so
-%%GDBM%%lib/apr-util-1/apr_dbm_gdbm.la
-%%GDBM%%lib/apr-util-1/apr_dbm_gdbm.a
-%%NDBM%%lib/apr-util-1/apr_dbm_ndbm-1.so
-%%NDBM%%lib/apr-util-1/apr_dbm_ndbm.so
-%%NDBM%%lib/apr-util-1/apr_dbm_ndbm.la
-%%NDBM%%lib/apr-util-1/apr_dbm_ndbm.a
-%%LDAP%%lib/apr-util-1/apr_ldap-1.so
-%%LDAP%%lib/apr-util-1/apr_ldap.so
-%%LDAP%%lib/apr-util-1/apr_ldap.la
-%%LDAP%%lib/apr-util-1/apr_ldap.a
-%%MYSQL%%lib/apr-util-1/apr_dbd_mysql-1.so
-%%MYSQL%%lib/apr-util-1/apr_dbd_mysql.so
-%%MYSQL%%lib/apr-util-1/apr_dbd_mysql.la
-%%MYSQL%%lib/apr-util-1/apr_dbd_mysql.a
-%%PGSQL%%lib/apr-util-1/apr_dbd_pgsql-1.so
-%%PGSQL%%lib/apr-util-1/apr_dbd_pgsql.so
-%%PGSQL%%lib/apr-util-1/apr_dbd_pgsql.la
-%%PGSQL%%lib/apr-util-1/apr_dbd_pgsql.a
-%%SQLITE3%%lib/apr-util-1/apr_dbd_sqlite3-1.so
-%%SQLITE3%%lib/apr-util-1/apr_dbd_sqlite3.so
-%%SQLITE3%%lib/apr-util-1/apr_dbd_sqlite3.la
-%%SQLITE3%%lib/apr-util-1/apr_dbd_sqlite3.a
-%%APU_EXTRAS%%@dirrm lib/apr-util-1
-@dirrm %%DATADIR%%/build-1
+lib/libapr-2.a
+lib/libapr-2.la
+lib/libapr-2.so
+lib/libapr-2.so.%%SHLIB_MAJOR%%
+%%GDBM%%lib/apr-2/apr_dbm_gdbm-2.so
+%%GDBM%%lib/apr-2/apr_dbm_gdbm.so
+%%GDBM%%lib/apr-2/apr_dbm_gdbm.la
+%%GDBM%%lib/apr-2/apr_dbm_gdbm.a
+%%BDB%%lib/apr-2/apr_dbm_db-2.so
+%%BDB%%lib/apr-2/apr_dbm_db.so
+%%BDB%%lib/apr-2/apr_dbm_db.la
+%%BDB%%lib/apr-2/apr_dbm_db.a
+%%NDBM%%lib/apr-2/apr_dbm_ndbm-2.so
+%%NDBM%%lib/apr-2/apr_dbm_ndbm.so
+%%NDBM%%lib/apr-2/apr_dbm_ndbm.la
+%%NDBM%%lib/apr-2/apr_dbm_ndbm.a
+%%LDAP%%lib/apr-2/apr_ldap-2.so
+%%LDAP%%lib/apr-2/apr_ldap.so
+%%LDAP%%lib/apr-2/apr_ldap.la
+%%LDAP%%lib/apr-2/apr_ldap.a
+%%MYSQL%%lib/apr-2/apr_dbd_mysql-2.so
+%%MYSQL%%lib/apr-2/apr_dbd_mysql.so
+%%MYSQL%%lib/apr-2/apr_dbd_mysql.la
+%%MYSQL%%lib/apr-2/apr_dbd_mysql.a
+%%PGSQL%%lib/apr-2/apr_dbd_pgsql-2.so
+%%PGSQL%%lib/apr-2/apr_dbd_pgsql.so
+%%PGSQL%%lib/apr-2/apr_dbd_pgsql.la
+%%PGSQL%%lib/apr-2/apr_dbd_pgsql.a
+%%SQLITE3%%lib/apr-2/apr_dbd_sqlite3-2.so
+%%SQLITE3%%lib/apr-2/apr_dbd_sqlite3.so
+%%SQLITE3%%lib/apr-2/apr_dbd_sqlite3.la
+%%SQLITE3%%lib/apr-2/apr_dbd_sqlite3.a
+%%EXTRAS%%@dirrm lib/apr-2
+@dirrm %%DATADIR%%/build-2
@dirrm %%DATADIR%%
-@dirrm include/apr-1
+@dirrm include/apr-2