From f6384d2f64979adccae46ab0e2c5e5b4e125c934 Mon Sep 17 00:00:00 2001 From: Scott McCreary Date: Wed, 21 Apr 2010 16:08:31 +0000 Subject: [PATCH] Added patch for apr-1.4.2, need to see why it wouldnt take the testpoll.c fix from the previous patch. Its been left out of this one, but may need to be added back in, in a modified form? --- dev-libs/apr/patches/apr-1.4.2.patch | 174 +++++++++++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100644 dev-libs/apr/patches/apr-1.4.2.patch diff --git a/dev-libs/apr/patches/apr-1.4.2.patch b/dev-libs/apr/patches/apr-1.4.2.patch new file mode 100644 index 000000000..97997f364 --- /dev/null +++ b/dev-libs/apr/patches/apr-1.4.2.patch @@ -0,0 +1,174 @@ +diff -urN apr-1.4.2/build/apr_hints.m4 apr-1.4.2-haiku/build/apr_hints.m4 +--- apr-1.4.2/build/apr_hints.m4 2009-06-02 09:15:46.000000000 -0700 ++++ apr-1.4.2-haiku/build/apr_hints.m4 2009-08-29 21:04:14.000000000 -0700 +@@ -35,7 +35,7 @@ + dnl Generally, we force the setting of CC, and add flags + dnl to CFLAGS, CPPFLAGS, LIBS and LDFLAGS. + dnl +-AC_DEFUN(APR_PRELOAD, [ ++AC_DEFUN([APR_PRELOAD], [ + if test "x$apr_preload_done" != "xyes" ; then + + apr_preload_done="yes" +@@ -454,6 +454,12 @@ + APR_SETIFNULL(have_proc_invoked, [1]) + APR_SETIFNULL(apr_cv_use_lfs64, [yes]) + ;; ++ *-haiku*) ++ APR_ADDTO(LIBS, [-lnetwork]) ++ APR_SETIFNULL(apr_lock_method, [USE_POSIXSEM_SERIALIZE]) ++ APR_SETIFNULL(apr_posixsem_is_global, [yes]) ++ APR_SETIFNULL(apr_process_lock_is_global, [yes]) ++ ;; + esac + + fi +@@ -464,7 +470,7 @@ + dnl + dnl Allows us to provide a default choice of compiler which + dnl the user can override. +-AC_DEFUN(APR_CC_HINTS, [ ++AC_DEFUN([APR_CC_HINTS], [ + case "$host" in + *-apple-aux3*) + APR_SETIFNULL(CC, [gcc]) +diff -urN apr-1.4.2/build/apr_network.m4 apr-1.4.2-haiku/build/apr_network.m4 +--- apr-1.4.2/build/apr_network.m4 2008-06-16 14:16:13.000000000 -0700 ++++ apr-1.4.2-haiku/build/apr_network.m4 2009-08-29 21:04:14.000000000 -0700 +@@ -21,7 +21,7 @@ + dnl + dnl check for type in_addr + dnl +-AC_DEFUN(APR_TYPE_IN_ADDR,[ ++AC_DEFUN([APR_TYPE_IN_ADDR],[ + AC_CACHE_CHECK(for type in_addr, ac_cv_type_in_addr,[ + AC_TRY_COMPILE([ + #ifdef HAVE_SYS_TYPES_H +diff -urN apr-1.4.2/build/apr_threads.m4 apr-1.4.2-haiku/build/apr_threads.m4 +--- apr-1.4.2/build/apr_threads.m4 2006-08-03 03:46:47.000000000 -0700 ++++ apr-1.4.2-haiku/build/apr_threads.m4 2009-08-29 21:04:14.000000000 -0700 +@@ -26,7 +26,7 @@ + dnl pthreads is not available. + dnl Turn off warnings if we're using gcc. + dnl +-AC_DEFUN(APR_CHECK_PTHREADS_H, [ ++AC_DEFUN([APR_CHECK_PTHREADS_H], [ + if test "$GCC" = "yes"; then + SAVE_FL="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -w" +@@ -41,7 +41,7 @@ + dnl + dnl APR_CHECK_PTHREAD_GETSPECIFIC_TWO_ARGS + dnl +-AC_DEFUN(APR_CHECK_PTHREAD_GETSPECIFIC_TWO_ARGS, [ ++AC_DEFUN([APR_CHECK_PTHREAD_GETSPECIFIC_TWO_ARGS], [ + AC_CACHE_CHECK(whether pthread_getspecific takes two arguments, ac_cv_pthread_getspecific_two_args,[ + AC_TRY_COMPILE([ + #include +@@ -65,7 +65,7 @@ + dnl + dnl APR_CHECK_PTHREAD_ATTR_GETDETACHSTATE_ONE_ARG + dnl +-AC_DEFUN(APR_CHECK_PTHREAD_ATTR_GETDETACHSTATE_ONE_ARG, [ ++AC_DEFUN([APR_CHECK_PTHREAD_ATTR_GETDETACHSTATE_ONE_ARG], [ + AC_CACHE_CHECK(whether pthread_attr_getdetachstate takes one argument, ac_cv_pthread_attr_getdetachstate_one_arg,[ + AC_TRY_COMPILE([ + #include +@@ -91,7 +91,7 @@ + dnl Try running a program which uses pthreads, executing the + dnl actions-if-success commands on success. + dnl +-AC_DEFUN(APR_PTHREADS_TRY_RUN, [ ++AC_DEFUN([APR_PTHREADS_TRY_RUN], [ + AC_TRY_RUN( [ + #include + #include +@@ -182,12 +182,12 @@ + dnl the checks for threading support so that they can restored if the + dnl result is not what the caller wanted. + dnl +-AC_DEFUN(APR_PTHREADS_CHECK_SAVE, [ ++AC_DEFUN([APR_PTHREADS_CHECK_SAVE], [ + apr_pthsv_CFLAGS="$CFLAGS" + apr_pthsv_LIBS="$LIBS" + ])dnl + +-AC_DEFUN(APR_PTHREADS_CHECK_RESTORE, [ ++AC_DEFUN([APR_PTHREADS_CHECK_RESTORE], [ + CFLAGS="$apr_pthsv_CFLAGS" + LIBS="$apr_pthsv_LIBS" + ])dnl +diff -urN apr-1.4.2/build/gen-build.py apr-1.4.2-haiku/build/gen-build.py +--- apr-1.4.2/build/gen-build.py 2007-02-28 04:44:52.000000000 -0800 ++++ apr-1.4.2-haiku/build/gen-build.py 2009-08-29 20:36:31.000000000 -0700 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/bin/env python + # + # USAGE: gen-build.py TYPE + # +diff -urN apr-1.4.2/configure.in apr-1.4.2-haiku/configure.in +--- apr-1.4.2/configure.in 2009-07-17 16:14:25.000000000 -0700 ++++ apr-1.4.2-haiku/configure.in 2009-08-29 20:48:05.000000000 -0700 +@@ -135,7 +135,7 @@ + AC_PROG_CPP + AC_PROG_AWK + AC_PROG_LN_S +-AC_PROG_RANLIB ++AC_PROG_LIBTOOL + AC_PROG_INSTALL + AC_CHECK_PROG(RM, rm, rm) + AC_CHECK_PROG(AS, as, as) +@@ -248,7 +248,7 @@ + dnl otherwise. + + case $host in +- *os390) ++ *os390|*haiku*) + if test "$ac_test_CFLAGS" != set; then + APR_REMOVEFROM(CFLAGS,-g) + fi +@@ -486,6 +486,12 @@ + OSDIR="unix" + eolstr="\\n" + ;; ++ *haiku*) ++ OSDIR="unix" ++ eolstr="\\n" ++ AC_CHECK_LIB(bsd, getpass) ++ AC_CHECK_LIB(network, socket) ++ ;; + *) + OSDIR="unix" + eolstr="\\n" +@@ -962,6 +968,10 @@ + havemmapzero="0" + havemmapanon="0" + APR_BEGIN_DECISION([anonymous shared memory allocation method]) ++APR_IFALLYES(header:kernel/OS.h func:create_area, ++ [havebeosshm="1" ++ APR_DECIDE(USE_SHMEM_BEOS_ANON, ++ [BeOS areas])]) + APR_IFALLYES(header:sys/ipc.h header:sys/shm.h header:sys/file.h dnl + func:shmget func:shmat func:shmdt func:shmctl, + [haveshmgetanon="1" +@@ -1033,6 +1043,9 @@ + haveos2shm="0" + havewin32shm="0" + APR_BEGIN_DECISION([namebased memory allocation method]) ++APR_IFALLYES(header:kernel/OS.h func:create_area, ++ [havebeosshm="1" ++ APR_DECIDE(USE_SHMEM_BEOS, [BeOS areas])]) + APR_IFALLYES(header:sys/mman.h func:mmap func:munmap, + [havemmaptmp="1" + APR_DECIDE(USE_SHMEM_MMAP_TMP, +@@ -1046,9 +1059,6 @@ + func:shmget func:shmat func:shmdt func:shmctl, + [haveshmget="1" + APR_DECIDE(USE_SHMEM_SHMGET, [SysV IPC shmget()])]) +-APR_IFALLYES(header:kernel/OS.h func:create_area, +- [havebeosshm="1" +- APR_DECIDE(USE_SHMEM_BEOS, [BeOS areas])]) + APR_IFALLYES(header:os2.h, + [haveos2shm="1" + APR_DECIDE(USE_SHMEM_OS2, [OS/2 DosAllocSharedMem()])])