Subject: apr update
To: None <tech-pkg@netbsd.org>
From: Jeroen Ruigrok/asmodai <asmodai@in-nomine.org>
List: tech-pkg
Date: 06/29/2005 20:04:31
--MfFXiAuoTsnnDAfZ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi gents,

find attached a patchset for apr.

This updates apr to 1.1.1 and apr-util to 1.1.2.

The only issue this brings (nothing for subversion, I asked one of the core
developers, aside from recompiling to make use of the new libraries, due to
ABI differences) is that apache2 depends on apr.

Apache 2.0.x requires apr 0.9 and Apache 2.1.x requires apr 1.0+, so this
already prepares us for the Apache 2.1/2.2 code.

So in effect this means that the apache2 pkg needs a apr09 (repocopy from
apr).

How to handle apache 2.1/2.2?  Create an apache22 pkg or will apache2 be
moved to apache20 and 2.1/2.2 will become apache2?

Thanks for any feedback!

-- 
Jeroen Ruigrok van der Werven <asmodai(at)wxs.nl> / asmodai / kita no mono
Free Tibet! http://www.savetibet.org/ | http://ashemedai.deviantart.com/
http://www.tendra.org/   | http://www.in-nomine.org/
What's one man's poison, is another's meat or drink...

--MfFXiAuoTsnnDAfZ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="apr.diff"

diff -ruN devel/apr.orig/Makefile devel/apr/Makefile
--- devel/apr.orig/Makefile	2005-06-29 19:50:24.000000000 +0200
+++ devel/apr/Makefile	2005-06-29 19:52:30.000000000 +0200
@@ -1,24 +1,29 @@
 # $NetBSD: Makefile,v 1.35 2005/05/21 03:49:52 reed Exp $
 
-.include "../../www/apache2/Makefile.common"
-
-PKGNAME=	apr-${APR_VERSION}.${APACHE_VERSION}
+DISTNAME=	apr-${APRVER}
+PKGNAME=	apr-${APRVER}
 CATEGORIES=	devel
-PKGREVISION=	1
+MASTER_SITES=	${MASTER_SITE_APACHE}
+DIST_SUBDIR=	apr
+DISTFILES=	apr-${APRVER}.tar.gz apr-util-${APUVER}.tar.gz
 
+MAINTAINER=	asmodai@in-nomine.org
 HOMEPAGE=	http://apr.apache.org/
 COMMENT=	Apache Portable Runtime
 
+.include "Makefile.version"
+
 # 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
 
 PKG_INSTALLATION_TYPES=	overwrite pkgviews
 
-WRKSRC=			${WRKDIR}/${DISTNAME}/srclib
+WRKSRC=			${WRKDIR}
 BUILD_DIRS=		${WRKSRC}/apr ${WRKSRC}/apr-util
 
 USE_LIBTOOL=		yes
+USE_TOOLS+=		autoconf automake
 GNU_CONFIGURE=		yes
 CONFIGURE_ENV+=		LIBS="${LIBS}"
 LIBS.SunOS+=		-lnsl
@@ -26,13 +31,13 @@
 APR_CONFIGURE_ARGS= \
 		--prefix=${PREFIX} \
 		--with-devrandom=/dev/urandom \
-		--with-installbuilddir=${PREFIX}/libexec/apr
+		--with-installbuilddir=${PREFIX}/libexec/apr \
+		--with-shared
 
 APU_CONFIGURE_ARGS= \
 		--prefix=${PREFIX} \
 		--with-apr=${WRKSRC}/apr \
 		--with-expat=${BUILDLINK_PREFIX.expat} \
-		--without-gdbm
 
 .include "../../mk/bsd.prefs.mk"
 .include "../../textproc/expat/buildlink3.mk"
@@ -44,6 +49,15 @@
 SUBST_SED.conf=		-e "s,@PREFIX@,${PREFIX},g"
 SUBST_MESSAGE.conf=	"Fixing hardcoded paths."
 
+post-extract:
+	@(cd ${WRKSRC} && ln -s apr-${APRVER} apr && \
+		ln -s apr-util-${APUVER} apr-util)
+
+pre-configure:
+	cd ${WRKSRC}/apr-${APRVER}; ${SETENV} ./buildconf
+	cd ${WRKSRC}/apr-util-${APUVER}; ${SETENV} ./buildconf\
+		--with-apr=../apr 
+
 do-configure:
 	@cd ${WRKSRC}/apr && ${SETENV} ${CONFIGURE_ENV} ./configure \
 		${APR_CONFIGURE_ARGS}
@@ -53,8 +67,8 @@
 post-install:
 	${RM} ${PREFIX}/libexec/apr/libtool
 	${INSTALL_SCRIPT} ${PKG_LIBTOOL} ${PREFIX}/libexec/apr/libtool
-	@${CHMOD} ${SHAREMODE} ${PREFIX}/include/apr-0/*.h
-	@${CHMOD} ${PKGDIRMODE} ${PREFIX}/include/apr-0
-	@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/include/apr-0/
+	@${CHMOD} ${SHAREMODE} ${PREFIX}/include/apr-1/*.h
+	@${CHMOD} ${PKGDIRMODE} ${PREFIX}/include/apr-1
+	@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/include/apr-1/
 
 .include "../../mk/bsd.pkg.mk"
diff -ruN devel/apr.orig/Makefile.version devel/apr/Makefile.version
--- devel/apr.orig/Makefile.version	1970-01-01 01:00:00.000000000 +0100
+++ devel/apr/Makefile.version	2005-06-29 19:50:35.000000000 +0200
@@ -0,0 +1,6 @@
+# $NetBSD$
+
+.if !defined(APRVER)
+APRVER=	1.1.1
+APUVER=	1.1.2
+.endif
diff -ruN devel/apr.orig/PLIST devel/apr/PLIST
--- devel/apr.orig/PLIST	2005-06-29 19:50:24.000000000 +0200
+++ devel/apr/PLIST	2005-06-29 19:50:35.000000000 +0200
@@ -1,73 +1,79 @@
 @comment $NetBSD: PLIST,v 1.5 2004/09/22 08:09:23 jlam Exp $
-bin/apr-config
-bin/apu-config
-include/apr-0/apr.h
-include/apr-0/apr_allocator.h
-include/apr-0/apr_anylock.h
-include/apr-0/apr_atomic.h
-include/apr-0/apr_base64.h
-include/apr-0/apr_buckets.h
-include/apr-0/apr_compat.h
-include/apr-0/apr_date.h
-include/apr-0/apr_dbm.h
-include/apr-0/apr_dso.h
-include/apr-0/apr_env.h
-include/apr-0/apr_errno.h
-include/apr-0/apr_file_info.h
-include/apr-0/apr_file_io.h
-include/apr-0/apr_fnmatch.h
-include/apr-0/apr_general.h
-include/apr-0/apr_getopt.h
-include/apr-0/apr_global_mutex.h
-include/apr-0/apr_hash.h
-include/apr-0/apr_hooks.h
-include/apr-0/apr_inherit.h
-include/apr-0/apr_ldap.h
-include/apr-0/apr_ldap_url.h
-include/apr-0/apr_lib.h
-include/apr-0/apr_md4.h
-include/apr-0/apr_md5.h
-include/apr-0/apr_mmap.h
-include/apr-0/apr_network_io.h
-include/apr-0/apr_optional.h
-include/apr-0/apr_optional_hooks.h
-include/apr-0/apr_poll.h
-include/apr-0/apr_pools.h
-include/apr-0/apr_portable.h
-include/apr-0/apr_proc_mutex.h
-include/apr-0/apr_queue.h
-include/apr-0/apr_reslist.h
-include/apr-0/apr_ring.h
-include/apr-0/apr_rmm.h
-include/apr-0/apr_sdbm.h
-include/apr-0/apr_sha1.h
-include/apr-0/apr_shm.h
-include/apr-0/apr_signal.h
-include/apr-0/apr_strings.h
-include/apr-0/apr_strmatch.h
-include/apr-0/apr_support.h
-include/apr-0/apr_tables.h
-include/apr-0/apr_thread_cond.h
-include/apr-0/apr_thread_mutex.h
-include/apr-0/apr_thread_proc.h
-include/apr-0/apr_thread_rwlock.h
-include/apr-0/apr_time.h
-include/apr-0/apr_uri.h
-include/apr-0/apr_user.h
-include/apr-0/apr_uuid.h
-include/apr-0/apr_version.h
-include/apr-0/apr_want.h
-include/apr-0/apr_xlate.h
-include/apr-0/apr_xml.h
-include/apr-0/apu.h
-include/apr-0/apu_compat.h
-include/apr-0/apu_version.h
-include/apr-0/apu_want.h
+bin/apr-1-config
+bin/apu-1-config
+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_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_url.h
+include/apr-1/apr_lib.h
+include/apr-1/apr_md4.h
+include/apr-1/apr_md5.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_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
 lib/apr.exp
 lib/aprutil.exp
-lib/libapr-0.la
-lib/libaprutil-0.la
+lib/libapr-1.la
+lib/libaprutil-1.la
+lib/pkgconfig/apr-1.pc
+lib/pkgconfig/apr-util-1.pc
 libexec/apr/apr_rules.mk
 libexec/apr/libtool
+libexec/apr/make_exports.awk
+libexec/apr/make_var_export.awk
+libexec/apr/mkdir.sh
 @dirrm libexec/apr
-@dirrm include/apr-0
+@dirrm include/apr-1
diff -ruN devel/apr.orig/distinfo devel/apr/distinfo
--- devel/apr.orig/distinfo	2005-06-29 19:50:24.000000000 +0200
+++ devel/apr/distinfo	2005-06-29 19:50:35.000000000 +0200
@@ -1,9 +1,10 @@
 $NetBSD: distinfo,v 1.13 2005/04/25 09:13:02 adam Exp $
 
-SHA1 (httpd-2.0.54.tar.bz2) = 15b4fc3024cceea6562fb03383fd624e84e5e35a
-RMD160 (httpd-2.0.54.tar.bz2) = c511cb2fa396ba04caf77bfc6ca03413df48ea08
-Size (httpd-2.0.54.tar.bz2) = 5566979 bytes
-SHA1 (patch-an) = 76d9ac0cdddec7c0f41535baee63bf0aa26ed596
-SHA1 (patch-ao) = d04d37445b7e8a50a74caa9bda3e6b10924e8322
-SHA1 (patch-ap) = 357776c7208407936e09891ae87d23b112a12756
-SHA1 (patch-aq) = 6cc1fb879fb5d9280f543ebe068a441e2e6560f3
+SHA1 (apr/apr-1.1.1.tar.gz) = 9a136d42f5cac09314c2b1f691942804ccf62807
+RMD160 (apr/apr-1.1.1.tar.gz) = cc04dc85cd9f33e1bcac2865a450292c25990d27
+Size (apr/apr-1.1.1.tar.gz) = 1081272 bytes
+SHA1 (apr/apr-util-1.1.2.tar.gz) = aa51d7ec115fd4cd50661d9926affe4c5ace68f6
+RMD160 (apr/apr-util-1.1.2.tar.gz) = c48f43109938be2e327bb6003e78f3e375336ebd
+Size (apr/apr-util-1.1.2.tar.gz) = 615019 bytes
+SHA1 (patch-ap) = 0619c91c8eb1ff230719443563af2d6a70a5e927
+SHA1 (patch-aq) = d8fb9fb557f7e8af4dc555e1af70d497638b2646
diff -ruN devel/apr.orig/options.mk devel/apr/options.mk
--- devel/apr.orig/options.mk	2005-06-29 19:50:24.000000000 +0200
+++ devel/apr/options.mk	2005-06-29 19:50:35.000000000 +0200
@@ -1,7 +1,8 @@
 # $NetBSD: options.mk,v 1.4 2004/12/22 21:46:25 jlam Exp $
 
 PKG_OPTIONS_VAR=	PKG_OPTIONS.apr
-PKG_SUPPORTED_OPTIONS=	db4 ldap
+PKG_SUPPORTED_OPTIONS=	db4 gdbm ldap
+PKG_SUGGESTED_OPTIONS=	db4
 
 .include "../../mk/bsd.options.mk"
 
@@ -13,6 +14,13 @@
 APU_CONFIGURE_ARGS+=	--with-dbm=sdbm
 .endif
 
+.if !empty(PKG_OPTIONS:Mgdbm)
+APU_CONFIGURE_ARGS+=	--with-gdbm
+.  include "../../databases/gdbm/buildlink3.mk"
+.else
+APU_CONFIGURE_ARGS+=	--without-gdbm
+.endif
+
 .if !empty(PKG_OPTIONS:Mldap)
 APU_CONFIGURE_ARGS+=	--with-ldap
 APR_CONFIGURE_ARGS+=	--with-ldap
diff -ruN devel/apr.orig/patches/patch-an devel/apr/patches/patch-an
--- devel/apr.orig/patches/patch-an	2005-06-29 19:50:24.000000000 +0200
+++ devel/apr/patches/patch-an	2005-06-29 19:50:35.000000000 +0200
@@ -1,13 +0,0 @@
-$NetBSD: patch-an,v 1.2 2005/04/25 09:13:02 adam Exp $
-
---- apr/configure.in.orig	2005-02-04 16:58:13.000000000 +0000
-+++ apr/configure.in
-@@ -1679,7 +1679,7 @@ if test "$rand" != "1"; then
-   if test "$apr_devrandom" = "yes"; then
-     # /dev/random on OpenBSD doesn't provide random data, so
-     # prefer /dev/arandom, which does; see random(4).
--    for f in /dev/arandom /dev/random /dev/urandom; do
-+    for f in /dev/arandom /dev/urandom /dev/random; do
-       if test -r $f; then
-         apr_devrandom=$f
-         rand=1
diff -ruN devel/apr.orig/patches/patch-ao devel/apr/patches/patch-ao
--- devel/apr.orig/patches/patch-ao	2005-06-29 19:50:24.000000000 +0200
+++ devel/apr/patches/patch-ao	2005-06-29 19:50:35.000000000 +0200
@@ -1,13 +0,0 @@
-$NetBSD: patch-ao,v 1.2 2005/04/25 09:13:02 adam Exp $
-
---- apr/configure.orig	2005-04-11 21:04:37.000000000 +0000
-+++ apr/configure
-@@ -40289,7 +40289,7 @@ fi;
-   if test "$apr_devrandom" = "yes"; then
-     # /dev/random on OpenBSD doesn't provide random data, so
-     # prefer /dev/arandom, which does; see random(4).
--    for f in /dev/arandom /dev/random /dev/urandom; do
-+    for f in /dev/arandom /dev/urandom /dev/random; do
-       if test -r $f; then
-         apr_devrandom=$f
-         rand=1
diff -ruN devel/apr.orig/patches/patch-ap devel/apr/patches/patch-ap
--- devel/apr.orig/patches/patch-ap	2005-06-29 19:50:24.000000000 +0200
+++ devel/apr/patches/patch-ap	2005-06-29 19:50:35.000000000 +0200
@@ -1,22 +1,25 @@
-$NetBSD: patch-ap,v 1.2 2003/06/06 10:50:00 jmmv Exp $
+$NetBSD$
 
---- apr-util/config.layout.orig	Thu Apr  3 17:15:08 2003
-+++ apr-util/config.layout	Thu Apr  3 17:14:15 2003
-@@ -229,3 +229,17 @@
-     infodir:       ${exec_prefix}/share/info
+--- apr-util-1.1.2/config.layout.orig	2005-06-07 20:21:10.000000000 +0200
++++ apr-util-1.1.2/config.layout
+@@ -230,3 +230,20 @@
      libsuffix     -${APRUTIL_MAJOR_VERSION}
+     installbuilddir: ${prefix}/usr/share/apache2/build
  </Layout>
 +
-+#   NetBSD (pkgsrc) layout
++# NetBSD (pkgsrc) layout
 +<Layout NetBSD>
 +    prefix:        @PREFIX@
 +    exec_prefix:   ${prefix}
 +    bindir:        ${exec_prefix}/bin
 +    sbindir:       ${exec_prefix}/sbin
-+    libexecdir:    ${exec_prefix}/lib/httpd
++    libdir:        ${exec_prefix}/lib
++    libexecdir:    ${exec_prefix}/lib/apr/modules
 +    mandir:        ${prefix}/man
-+    datadir:       ${prefix}/share/httpd
++    datadir:       ${prefix}/share/apr
 +    includedir:    ${prefix}/include/apr
 +    localstatedir: /var
 +    runtimedir:    ${localstatedir}/run
++    infodir:       ${prefix}/info
++    libsuffix:
 +</Layout>
diff -ruN devel/apr.orig/patches/patch-aq devel/apr/patches/patch-aq
--- devel/apr.orig/patches/patch-aq	2005-06-29 19:50:24.000000000 +0200
+++ devel/apr/patches/patch-aq	2005-06-29 19:50:35.000000000 +0200
@@ -1,22 +1,25 @@
-$NetBSD: patch-aq,v 1.2 2003/06/06 10:50:00 jmmv Exp $
+$NetBSD$
 
---- apr/config.layout.orig	Thu Apr  3 17:14:54 2003
-+++ apr/config.layout	Thu Apr  3 17:14:01 2003
-@@ -229,3 +229,17 @@
+--- apr-1.1.1/config.layout.orig	2005-06-07 20:09:30.000000000 +0200
++++ apr-1.1.1/config.layout
+@@ -229,3 +229,20 @@
      infodir:       ${exec_prefix}/share/info
      libsuffix:    -${APR_MAJOR_VERSION}
  </Layout>
 +
-+#   NetBSD (pkgsrc) layout
++# NetBSD (pkgsrc) layout
 +<Layout NetBSD>
 +    prefix:        @PREFIX@
 +    exec_prefix:   ${prefix}
 +    bindir:        ${exec_prefix}/bin
 +    sbindir:       ${exec_prefix}/sbin
-+    libexecdir:    ${exec_prefix}/lib/httpd
++    libdir:        ${exec_prefix}/lib
++    libexecdir:    ${exec_prefix}/lib/apr/modules
 +    mandir:        ${prefix}/man
-+    datadir:       ${prefix}/share/httpd
++    datadir:       ${prefix}/share/apr
 +    includedir:    ${prefix}/include/apr
 +    localstatedir: /var
 +    runtimedir:    ${localstatedir}/run
++    infodir:       ${prefix}/info
++    libsuffix:
 +</Layout>

--MfFXiAuoTsnnDAfZ--