Update to APR-1.4.6. Enable threads by default and remove the 'mt' flavour.

Grab maintainership.
ok sthen
This commit is contained in:
stsp 2012-04-28 09:48:17 +00:00
parent 2d817bf514
commit a4a2a5df05
14 changed files with 83 additions and 247 deletions

View File

@ -1,16 +1,14 @@
# $OpenBSD: Makefile,v 1.25 2011/11/18 10:11:32 espie Exp $
# $OpenBSD: Makefile,v 1.26 2012/04/28 09:48:17 stsp Exp $
COMMENT= Apache Portable Runtime
V= 1.2.11
V= 1.4.6
DISTNAME= apr-$V
FULLPKGNAME= apr${MT}-$V
REVISION= 5
SHARED_LIBS += apr-1${MT} 3.0 # .2.11
SHARED_LIBS += apr-1 4.6 # .4.6
CATEGORIES= devel
MAINTAINER= Aleksander Piotrowski <alek@openbsd.org>
MAINTAINER= Stefan Sperling <stsp@openbsd.org>
HOMEPAGE= http://apr.apache.org/
@ -25,29 +23,12 @@ MASTER_SITES= ${MASTER_SITE_APACHE:=apr/}
USE_LIBTOOL= Yes
CONFIGURE_STYLE=gnu
CONFIGURE_ARGS= ${CONFIGURE_SHARED} \
--includedir=${LOCALBASE}/include/apr-1${MT}/ \
--with-installbuilddir=${LOCALBASE}/lib/apr-1${MT}/ \
--includedir=${LOCALBASE}/include/apr-1/ \
--with-installbuilddir=${LOCALBASE}/lib/apr-1/ \
--enable-other-child \
--enable-threads \
ac_cv_prog_AWK=awk
FLAVORS= mt
FLAVOR?=
SUBST_VARS+= MT
.if ${FLAVOR:Mmt}
MT=-mt
CONFIGURE_ARGS+= --enable-threads
post-install:
sed 's/{APR_LIBNAME}/{APR_LIBNAME}-mt/g' ${WRKSRC}/apr-config.out > ${PREFIX}/bin/apr-1-mt-config
.else
MT=
CONFIGURE_ARGS+= --disable-threads
.endif
MAKE_ENV+= MT=${MT}
pre-install:
rm -f ${WRKSRC}/libtool

View File

@ -1,5 +1,5 @@
MD5 (apr-1.2.11.tar.gz) = r8+VQdwxVRq+tsU7tCwllg==
RMD160 (apr-1.2.11.tar.gz) = ixwYMc2Cgd4X9B+E/8XP2bbDVVM=
SHA1 (apr-1.2.11.tar.gz) = veLItuR3dSvKxPOHrA3pZxzRXRo=
SHA256 (apr-1.2.11.tar.gz) = /HoU6N7QAsJSz188zObNVjbwGoWYYYjjc/k0OhdMQv8=
SIZE (apr-1.2.11.tar.gz) = 1114033
MD5 (apr-1.4.6.tar.gz) = dsxEV/u3Hu/a+ifbqPUR+w==
RMD160 (apr-1.4.6.tar.gz) = ra8c0WRtM7VxJ8+gaNLEbHVa0LQ=
SHA1 (apr-1.4.6.tar.gz) = P14/H2fLT+DMRujDdAEFw1oCAwg=
SHA256 (apr-1.4.6.tar.gz) = U41ZPYBcNphfxtIA0xv2wbX5DfKlC5F5AnQ6E7vBDgU=
SIZE (apr-1.4.6.tar.gz) = 982243

View File

@ -1,42 +0,0 @@
$OpenBSD: patch-Makefile_in,v 1.2 2007/04/01 20:03:07 kurt Exp $
--- Makefile.in.orig Fri Feb 4 06:55:44 2005
+++ Makefile.in Wed Mar 28 09:57:24 2007
@@ -3,6 +3,7 @@ srcdir=@srcdir@
VPATH=@srcdir@
top_srcdir=@apr_srcdir@
top_blddir=@apr_builddir@
+MT?=
#
# APR (Apache Portable Runtime) library Makefile.
@@ -26,9 +27,10 @@ INCLUDES=-I$(INCDIR) -I$(OSDIR) -I$(DEFOSDIR) -I$(top_
CLEAN_SUBDIRS= test
INSTALL_SUBDIRS=@INSTALL_SUBDIRS@
-TARGET_LIB = lib@APR_LIBNAME@.la
-APR_PCFILE = apr-$(APR_MAJOR_VERSION).pc
+TARGET_LIB = lib@APR_LIBNAME@${MT}.la
+APR_PCFILE = apr-$(APR_MAJOR_VERSION)${MT}.pc
APR_CONFIG = apr-$(APR_MAJOR_VERSION)-config
+APR_INSTCONFIG = apr-$(APR_MAJOR_VERSION)${MT}-config
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
@@ -75,7 +77,7 @@ install: $(TARGET_LIB) apr-config.out build/apr_rules.
done
$(LIBTOOL) --mode=install $(INSTALL) -m 755 $(TARGET_LIB) $(DESTDIR)$(libdir)
$(INSTALL_DATA) apr.exp $(DESTDIR)$(libdir)/apr.exp
- $(INSTALL_DATA) apr.pc $(DESTDIR)$(libdir)/pkgconfig/$(APR_PCFILE)
+ $(INSTALL_DATA) apr${MT}.pc $(DESTDIR)$(libdir)/pkgconfig/$(APR_PCFILE)
for f in libtool shlibtool; do \
if test -f $${f}; then $(INSTALL) -m 755 $${f} $(DESTDIR)$(installbuilddir); fi; \
done
@@ -84,7 +86,7 @@ install: $(TARGET_LIB) apr-config.out build/apr_rules.
$(INSTALL_DATA) $(top_srcdir)/build/$${f} $(DESTDIR)$(installbuilddir); \
done
$(INSTALL_DATA) build/apr_rules.out $(DESTDIR)$(installbuilddir)/apr_rules.mk
- $(INSTALL) -m 755 apr-config.out $(DESTDIR)$(bindir)/$(APR_CONFIG)
+ $(INSTALL) -m 755 apr-config.out $(DESTDIR)$(bindir)/$(APR_INSTCONFIG)
@if [ $(INSTALL_SUBDIRS) != "none" ]; then \
for i in $(INSTALL_SUBDIRS); do \
( cd $$i ; $(MAKE) DESTDIR=$(DESTDIR) install ); \

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-apr-config_in,v 1.1 2007/10/30 16:55:48 steven Exp $
--- apr-config.in.orig Tue Oct 30 16:36:08 2007
+++ apr-config.in Tue Oct 30 16:36:27 2007
@@ -222,11 +222,7 @@ while test $# -gt 0; do
$OpenBSD: patch-apr-config_in,v 1.2 2012/04/28 09:48:20 stsp Exp $
--- apr-config.in.orig Fri Jun 20 17:46:02 2008
+++ apr-config.in Fri Apr 27 09:51:08 2012
@@ -223,11 +223,7 @@ while test $# -gt 0; do
exit 0
;;
--apr-libtool)

View File

@ -1,15 +0,0 @@
$OpenBSD: patch-apr-mt_pc_in,v 1.1 2007/03/24 13:46:47 todd Exp $
--- apr-mt.pc.in.orig Thu Feb 8 14:19:40 2007
+++ apr-mt.pc.in Thu Feb 8 14:25:06 2007
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+APR_MAJOR_VERSION=@APR_MAJOR_VERSION@
+includedir=@includedir@
+
+Name: APR
+Description: The Apache Portable Runtime library
+Version: @APR_DOTTED_VERSION@
+Libs: -L${libdir} -l@APR_LIBNAME@-mt @EXTRA_LIBS@
+Cflags: @EXTRA_CPPFLAGS@ @EXTRA_CFLAGS@ -I${includedir}

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-configure,v 1.8 2007/10/30 16:47:50 steven Exp $
--- configure.orig Tue Sep 4 03:42:02 2007
+++ configure Tue Oct 30 17:41:25 2007
@@ -4326,6 +4326,11 @@ if test "x$apr_preload_done" != "xyes" ; then
$OpenBSD: patch-configure,v 1.9 2012/04/28 09:48:20 stsp Exp $
--- configure.orig Wed Feb 8 00:17:57 2012
+++ configure Fri Apr 27 09:51:08 2012
@@ -6633,6 +6633,11 @@ if test "x$apr_preload_done" != "xyes" ; then
;;
*-openbsd*)
@ -13,16 +13,16 @@ $OpenBSD: patch-configure,v 1.8 2007/10/30 16:47:50 steven Exp $
if test "x$CPPFLAGS" = "x"; then
test "x$silent" != "xyes" && echo " setting CPPFLAGS to \"-D_POSIX_THREADS\""
CPPFLAGS="-D_POSIX_THREADS"
@@ -23954,7 +23959,7 @@ fi
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
@@ -13934,7 +13939,7 @@ fi
LIBTOOL_DEPS="$ltmain"
# Always use our own libtool.
-LIBTOOL='$(SHELL) $(apr_builddir)/libtool'
+#LIBTOOL='$(SHELL) $(apr_builddir)/libtool'
# Prevent multiple expansion
@@ -26156,7 +26161,7 @@ if test "${apr_cv_pthreads_lib+set}" = set; then
@@ -19343,7 +19348,7 @@ if ${apr_cv_pthreads_lib+:} false; then :
else
apr_ptc_libs=$LIBS
@ -30,8 +30,8 @@ $OpenBSD: patch-configure,v 1.8 2007/10/30 16:47:50 steven Exp $
+ for lib in -pthread -lpthread -lpthreads -lc_r; do
LIBS="$apr_ptc_libs $lib"
if test "$cross_compiling" = yes; then
@@ -26714,7 +26719,7 @@ if test "${apr_cv_pthreads_lib+set}" = set; then
if test "$cross_compiling" = yes; then :
@@ -19591,7 +19596,7 @@ if ${apr_cv_pthreads_lib+:} false; then :
else
apr_ptc_libs=$LIBS
@ -39,8 +39,8 @@ $OpenBSD: patch-configure,v 1.8 2007/10/30 16:47:50 steven Exp $
+ for lib in -pthread -lpthread -lpthreads -lc_r; do
LIBS="$apr_ptc_libs $lib"
if test "$cross_compiling" = yes; then
@@ -39676,7 +39681,7 @@ for ac_spec in func:semget func:semctl define:SEM_UNDO
if test "$cross_compiling" = yes; then :
@@ -25452,7 +25457,7 @@ for ac_spec in func:semget func:semctl define:SEM_UNDO
done
if test ".$ac_rc" = .yes; then
:
@ -49,12 +49,3 @@ $OpenBSD: patch-configure,v 1.8 2007/10/30 16:47:50 steven Exp $
else
:
hassysvser="0"
@@ -43711,7 +43716,7 @@ esac
- ac_config_files="$ac_config_files Makefile include/apr.h build/apr_rules.mk build/pkg/pkginfo apr-$APR_MAJOR_VERSION-config:apr-config.in apr.pc"
+ ac_config_files="$ac_config_files Makefile include/apr.h build/apr_rules.mk build/pkg/pkginfo apr-$APR_MAJOR_VERSION-config:apr-config.in apr.pc apr-mt.pc"
if test -d $srcdir/test; then

View File

@ -1,61 +0,0 @@
$OpenBSD: patch-memory_unix_apr_pools_c,v 1.2 2009/08/07 04:28:28 steven Exp $
SECURITY: CVE-2009-2412 (cve.mitre.org)
Fix overflow in pools, where size alignment was taking place.
--- memory/unix/apr_pools.c.orig Thu Aug 6 18:50:47 2009
+++ memory/unix/apr_pools.c Thu Aug 6 18:53:45 2009
@@ -168,16 +168,19 @@ APR_DECLARE(void) apr_allocator_max_free_set(apr_alloc
}
static APR_INLINE
-apr_memnode_t *allocator_alloc(apr_allocator_t *allocator, apr_size_t size)
+apr_memnode_t *allocator_alloc(apr_allocator_t *allocator, apr_size_t in_size)
{
apr_memnode_t *node, **ref;
apr_uint32_t max_index;
- apr_size_t i, index;
+ apr_size_t size, i, index;
/* Round up the block size to the next boundary, but always
* allocate at least a certain size (MIN_ALLOC).
*/
- size = APR_ALIGN(size + APR_MEMNODE_T_SIZE, BOUNDARY_SIZE);
+ size = APR_ALIGN(in_size + APR_MEMNODE_T_SIZE, BOUNDARY_SIZE);
+ if (size < in_size) {
+ return NULL;
+ }
if (size < MIN_ALLOC)
size = MIN_ALLOC;
@@ -591,13 +594,19 @@ APR_DECLARE(void) apr_pool_terminate(void)
* Memory allocation
*/
-APR_DECLARE(void *) apr_palloc(apr_pool_t *pool, apr_size_t size)
+APR_DECLARE(void *) apr_palloc(apr_pool_t *pool, apr_size_t in_size)
{
apr_memnode_t *active, *node;
void *mem;
- apr_size_t free_index;
+ apr_size_t size, free_index;
- size = APR_ALIGN_DEFAULT(size);
+ size = APR_ALIGN_DEFAULT(in_size);
+ if (size < in_size) {
+ if (pool->abort_fn)
+ pool->abort_fn(APR_ENOMEM);
+
+ return NULL;
+ }
active = pool->active;
/* If the active node has enough bytes left, use it. */
@@ -662,7 +671,6 @@ APR_DECLARE(void *) apr_pcalloc(apr_pool_t *pool, apr_
{
void *mem;
- size = APR_ALIGN_DEFAULT(size);
if ((mem = apr_palloc(pool, size)) != NULL) {
memset(mem, 0, size);
}

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-network_io_unix_sockets_c,v 1.3 2007/04/26 16:05:01 kurt Exp $
--- network_io/unix/sockets.c.orig Thu Dec 8 12:24:36 2005
+++ network_io/unix/sockets.c Thu Apr 26 11:52:13 2007
@@ -256,6 +256,15 @@ apr_status_t apr_socket_accept(apr_socket_t **new, apr
$OpenBSD: patch-network_io_unix_sockets_c,v 1.4 2012/04/28 09:48:20 stsp Exp $
--- network_io/unix/sockets.c.orig Wed Mar 23 19:52:44 2011
+++ network_io/unix/sockets.c Fri Apr 27 09:51:08 2012
@@ -312,6 +312,15 @@ apr_status_t apr_socket_accept(apr_socket_t **new, apr
apr_status_t apr_socket_connect(apr_socket_t *sock, apr_sockaddr_t *sa)
{
int rc;

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-test_Makefile_in,v 1.2 2007/07/05 16:01:28 steven Exp $
--- test/Makefile.in.orig Sat Jun 2 00:02:13 2007
+++ test/Makefile.in Tue Jun 26 08:30:40 2007
@@ -27,7 +27,7 @@ TARGETS = $(PROGRAMS)
# bring in rules.mk for standard functionality
@INCLUDE_RULES@
-LOCAL_LIBS=../lib@APR_LIBNAME@.la
+LOCAL_LIBS=../lib@APR_LIBNAME@${MT}.la
CLEAN_TARGETS = testfile.tmp mod_test.slo proc_child@EXEEXT@ occhild@EXEEXT@ \
readchild@EXEEXT@ tryread@EXEEXT@ sockchild@EXEEXT@ \

View File

@ -1,6 +1,3 @@
The Apache Portable Run-time mission is to provide a library of
routines that allows programmers to write a program once and be
able to compile it anywhere.
Flavor:
mt - enable threading support

View File

@ -1,2 +0,0 @@
@comment $OpenBSD: PFRAG.mt-shared,v 1.1 2007/03/24 13:46:47 todd Exp $
@lib lib/libapr-1-mt.so.${LIBapr-1-mt_VERSION}

View File

@ -1,2 +0,0 @@
@comment $OpenBSD: PFRAG.no-mt-shared,v 1.1 2007/03/24 13:46:47 todd Exp $
@lib lib/libapr-1.so.${LIBapr-1_VERSION}

View File

@ -1,3 +1,2 @@
@comment $OpenBSD: PFRAG.shared,v 1.3 2007/03/24 13:46:47 todd Exp $
%%mt%%
!%%mt%%
@comment $OpenBSD: PFRAG.shared,v 1.4 2012/04/28 09:48:20 stsp Exp $
@lib lib/libapr-1.so.${LIBapr-1_VERSION}

View File

@ -1,50 +1,52 @@
@comment $OpenBSD: PLIST,v 1.3 2007/10/30 16:47:50 steven Exp $
@comment $OpenBSD: PLIST,v 1.4 2012/04/28 09:48:20 stsp Exp $
@conflict apr-mt-*
@pkgpath devel/apr,mt
%%SHARED%%
bin/apr-1${MT}-config
include/apr-1${MT}/
include/apr-1${MT}/apr.h
include/apr-1${MT}/apr_allocator.h
include/apr-1${MT}/apr_atomic.h
include/apr-1${MT}/apr_dso.h
include/apr-1${MT}/apr_env.h
include/apr-1${MT}/apr_errno.h
include/apr-1${MT}/apr_file_info.h
include/apr-1${MT}/apr_file_io.h
include/apr-1${MT}/apr_fnmatch.h
include/apr-1${MT}/apr_general.h
include/apr-1${MT}/apr_getopt.h
include/apr-1${MT}/apr_global_mutex.h
include/apr-1${MT}/apr_hash.h
include/apr-1${MT}/apr_inherit.h
include/apr-1${MT}/apr_lib.h
include/apr-1${MT}/apr_mmap.h
include/apr-1${MT}/apr_network_io.h
include/apr-1${MT}/apr_poll.h
include/apr-1${MT}/apr_pools.h
include/apr-1${MT}/apr_portable.h
include/apr-1${MT}/apr_proc_mutex.h
include/apr-1${MT}/apr_random.h
include/apr-1${MT}/apr_ring.h
include/apr-1${MT}/apr_shm.h
include/apr-1${MT}/apr_signal.h
include/apr-1${MT}/apr_strings.h
include/apr-1${MT}/apr_support.h
include/apr-1${MT}/apr_tables.h
include/apr-1${MT}/apr_thread_cond.h
include/apr-1${MT}/apr_thread_mutex.h
include/apr-1${MT}/apr_thread_proc.h
include/apr-1${MT}/apr_thread_rwlock.h
include/apr-1${MT}/apr_time.h
include/apr-1${MT}/apr_user.h
include/apr-1${MT}/apr_version.h
include/apr-1${MT}/apr_want.h
lib/apr-1${MT}/
lib/apr-1${MT}/apr_rules.mk
lib/apr-1${MT}/make_exports.awk
lib/apr-1${MT}/make_var_export.awk
lib/apr-1${MT}/mkdir.sh
bin/apr-1-config
include/apr-1/
include/apr-1/apr.h
include/apr-1/apr_allocator.h
include/apr-1/apr_atomic.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_inherit.h
include/apr-1/apr_lib.h
include/apr-1/apr_mmap.h
include/apr-1/apr_network_io.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_random.h
include/apr-1/apr_ring.h
include/apr-1/apr_shm.h
include/apr-1/apr_signal.h
include/apr-1/apr_strings.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_user.h
include/apr-1/apr_version.h
include/apr-1/apr_want.h
lib/apr-1/
lib/apr-1/apr_rules.mk
lib/apr-1/make_exports.awk
lib/apr-1/make_var_export.awk
lib/apr-1/mkdir.sh
@comment lib/apr.exp
lib/libapr-1${MT}.a
lib/libapr-1${MT}.la
lib/libapr-1.a
lib/libapr-1.la
lib/pkgconfig/
lib/pkgconfig/apr-1${MT}.pc
lib/pkgconfig/apr-1.pc