[02/10] libapr: New recipe
diff mbox

Message ID 4f932581138ffaa1e9566c22a534d191d6e7df1b.1388738593.git.kibo@prevas.dk
State Accepted
Delegated to: Esben Haabendal
Headers show

Commit Message

Kim B√łndergaard Jan. 3, 2014, 8:49 a.m. UTC
---
 recipes/libapr/libapr/apr_escape.patch      | 39 +++++++++++++++
 recipes/libapr/libapr/configure_fixes.patch | 78 +++++++++++++++++++++++++++++
 recipes/libapr/libapr_1.5.0.oe              | 22 ++++++++
 recipes/libapr/libapr_1.5.0.oe.sig          |  1 +
 4 files changed, 140 insertions(+)
 create mode 100644 recipes/libapr/libapr/apr_escape.patch
 create mode 100644 recipes/libapr/libapr/configure_fixes.patch
 create mode 100644 recipes/libapr/libapr_1.5.0.oe
 create mode 100644 recipes/libapr/libapr_1.5.0.oe.sig

Comments

Esben Haabendal Feb. 7, 2014, 9:15 a.m. UTC | #1
Merged to master, thanks.

/Esben

Patch
diff mbox

diff --git a/recipes/libapr/libapr/apr_escape.patch b/recipes/libapr/libapr/apr_escape.patch
new file mode 100644
index 0000000..c7554bb
--- /dev/null
+++ b/recipes/libapr/libapr/apr_escape.patch
@@ -0,0 +1,39 @@ 
+--- apr-1.5.0/Makefile.in.orig	2014-01-02 11:02:17.168267653 +0100
++++ apr-1.5.0/Makefile.in	2014-01-02 11:02:39.700267063 +0100
+@@ -133,8 +133,8 @@
+ tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char)
+ 	$(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS)
+ 
+-include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@
+-	tools/gen_test_char@EXEEXT@ > $@
++#include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@
++#	tools/gen_test_char@EXEEXT@ > $@
+ 
+ LINK_PROG = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) $(LT_LDFLAGS) \
+ 	    @LT_NO_INSTALL@ $(ALL_LDFLAGS) -o $@
+--- apr-1.5.0/include/private/apr_escape_test_char.h.orig	2014-01-02 10:53:45.308281071 +0100
++++ apr-1.5.0/include/private/apr_escape_test_char.h	2014-01-02 10:50:01.912286926 +0100
+@@ -0,0 +1,23 @@
++/* this file is automatically generated by gen_test_char, do not edit. "make include/private/apr_escape_test_char.h" to regenerate. */
++#define T_ESCAPE_SHELL_CMD     (1)
++#define T_ESCAPE_PATH_SEGMENT  (2)
++#define T_OS_ESCAPE_PATH       (4)
++#define T_ESCAPE_ECHO          (8)
++#define T_ESCAPE_URLENCODED    (16)
++#define T_ESCAPE_XML           (32)
++
++static const unsigned char test_char_table[256] = {
++    32,30,30,30,30,30,30,30,30,30,31,30,30,30,30,30,30,30,30,30,
++    30,30,30,30,30,30,30,30,30,30,30,30,6,16,63,22,17,22,49,17,
++    17,17,1,16,16,0,0,18,0,0,0,0,0,0,0,0,0,0,16,23,
++    55,16,55,23,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
++    0,0,0,0,0,0,0,0,0,0,0,23,31,23,23,0,23,0,0,0,
++    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
++    0,0,0,23,23,23,17,30,30,30,30,30,30,30,30,30,30,30,30,30,
++    30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
++    30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
++    30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
++    30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
++    30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
++    30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30 
++};
diff --git a/recipes/libapr/libapr/configure_fixes.patch b/recipes/libapr/libapr/configure_fixes.patch
new file mode 100644
index 0000000..d6242f5
--- /dev/null
+++ b/recipes/libapr/libapr/configure_fixes.patch
@@ -0,0 +1,78 @@ 
+Upstream-Status: Inappropriate [configuration]
+
+Index: apr-1.3.3/configure.in
+===================================================================
+--- apr-1.3.3.orig/configure.in
++++ apr-1.3.3/configure.in
+@@ -794,39 +794,6 @@ AC_CHECK_FUNCS([mmap munmap shm_open shm
+                 create_area])
+ 
+ APR_CHECK_DEFINE(MAP_ANON, sys/mman.h)
+-AC_CHECK_FILE(/dev/zero)
+-
+-# Not all systems can mmap /dev/zero (such as HP-UX).  Check for that.
+-if test "$ac_cv_func_mmap" = "yes" &&
+-   test "$ac_cv_file__dev_zero" = "yes"; then
+-    AC_MSG_CHECKING(for mmap that can map /dev/zero)
+-    AC_TRY_RUN([
+-#include <sys/types.h>
+-#include <sys/stat.h>
+-#include <fcntl.h>
+-#ifdef HAVE_SYS_MMAN_H
+-#include <sys/mman.h>
+-#endif
+-    int main()
+-    {
+-        int fd;
+-        void *m;
+-        fd = open("/dev/zero", O_RDWR);
+-        if (fd < 0) {
+-            return 1;
+-        }
+-        m = mmap(0, sizeof(void*), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
+-        if (m == (void *)-1) {  /* aka MAP_FAILED */
+-            return 2;
+-        }
+-        if (munmap(m, sizeof(void*)) < 0) {
+-            return 3;
+-        }
+-        return 0;
+-    }], [], [ac_cv_file__dev_zero=no], [ac_cv_file__dev_zero=no])
+-
+-    AC_MSG_RESULT($ac_cv_file__dev_zero)
+-fi
+ 
+ # Now we determine which one is our anonymous shmem preference.
+ haveshmgetanon="0"
+@@ -1518,13 +1485,14 @@ else
+     bigendian=0
+ fi
+ 
+-APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>
+-#include <sys/uio.h>],struct iovec,0)
+-if test "$ac_cv_sizeof_struct_iovec" = "0"; then
+-    have_iovec=0
+-else
+-    have_iovec=1
+-fi
++#APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>
++##include <sys/uio.h>],struct iovec,0)
++#if test "$ac_cv_sizeof_struct_iovec" = "0"; then
++#    have_iovec=0
++#else
++#    have_iovec=1
++#fi
++have_iovec=1
+ 
+ AC_SUBST(voidp_size)
+ AC_SUBST(short_value)
+@@ -2543,7 +2543,7 @@
+
+ APR_CHECK_TCP_NODELAY_INHERITED
+ APR_CHECK_O_NONBLOCK_INHERITED
+-APR_CHECK_TCP_NODELAY_WITH_CORK
++#APR_CHECK_TCP_NODELAY_WITH_CORK
+
+ # Look for a way of corking TCP...
+ APR_CHECK_DEFINE(TCP_CORK, netinet/tcp.h)
+
diff --git a/recipes/libapr/libapr_1.5.0.oe b/recipes/libapr/libapr_1.5.0.oe
new file mode 100644
index 0000000..db7ab8b
--- /dev/null
+++ b/recipes/libapr/libapr_1.5.0.oe
@@ -0,0 +1,22 @@ 
+DESCRIPTION="software libraries providing a predictable and consistent interface to underlying platform-specific implementations"
+HOMEPAGE="apr.apache.org"
+
+inherit autotools-autoreconf pkgconfig library binconfig
+
+SRC_URI = "http://apache.mirrors.spacedump.net/apr/apr-${PV}.tar.bz2"
+SRC_URI += "file://configure_fixes.patch"
+SRC_URI += "file://apr_escape.patch"
+
+LICENSE = "Apache-2.0"
+DEPENDS += "libdl libpthread"
+DEPENDS_${PN} += "libc libgcc libdl libpthread"
+RDEPENDS_${PN} += "libc libgcc libdl libpthread"
+
+RECIPE_TYPES = "machine sdk native"
+
+S = "${SRCDIR}/apr-${PV}"
+
+EXTRA_OECONF += "--disable-threads"
+
+FILES_${PN}-dev += "${libdir}/apr.exp ${datadir}/build-1/*"
+
diff --git a/recipes/libapr/libapr_1.5.0.oe.sig b/recipes/libapr/libapr_1.5.0.oe.sig
new file mode 100644
index 0000000..ff2a35b
--- /dev/null
+++ b/recipes/libapr/libapr_1.5.0.oe.sig
@@ -0,0 +1 @@ 
+cae122be79070645a7ab36a53148487c84ce8bf0  apr-1.5.0.tar.bz2