- removes 001-autoconf-compat.patch: Looks like this was meant as a workaround for a libtool issue. But it doesn't appear to be needed anymore. - removes 101-fix_apr_time_now.patch: Mentioned in https://dev.openwrt.org/ticket/9287, meant as a fix, but issue was fixed differently in the end (by activating LFS). - removes 201-upgrade-and-fix-1.5.1.patch: This is a cross-compile fix. This patch gets replaced by 001-cross-compile.patch from buildroot project. The latter was sent upstream by buildroot and is in line with the patch used by OpenWrt for the apache package. - adds 002-sys-param-h.patch: Fix PATH_MAX detection by including sys/param.h if available. Also from buildroot. Additionally configure variables found in buildroot package are added. These also enable LFS support. This was previously done (in OpenWrt) by defining _LARGEFILE64_SOURCE in TARGET_CPPFLAGS. But the configure variable is cleaner (and easier to follow). Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>lilik-openwrt-22.03
@ -1,26 +0,0 @@ | |||||
Index: apr-1.5.2/Makefile.in | |||||
=================================================================== | |||||
--- apr-1.5.2.orig/Makefile.in | |||||
+++ apr-1.5.2/Makefile.in | |||||
@@ -3,6 +3,7 @@ srcdir=@srcdir@ | |||||
VPATH=@srcdir@ | |||||
top_srcdir=@apr_srcdir@ | |||||
top_blddir=@apr_builddir@ | |||||
+top_builddir=@top_builddir@ | |||||
# | |||||
# APR (Apache Portable Runtime) library Makefile. | |||||
Index: apr-1.5.2/configure.in | |||||
=================================================================== | |||||
--- apr-1.5.2.orig/configure.in | |||||
+++ apr-1.5.2/configure.in | |||||
@@ -245,9 +245,6 @@ case $host in | |||||
gcc $CFLAGS $CPPFLAGS -o $LIBTOOL.exe $LIBTOOL.c | |||||
;; | |||||
*) | |||||
- if test "x$LTFLAGS" = "x"; then | |||||
- LTFLAGS='--silent' | |||||
- fi | |||||
if test "$experimental_libtool" = "yes"; then | |||||
# Use a custom-made libtool replacement | |||||
echo "using jlibtool" |
@ -0,0 +1,56 @@ | |||||
Fix cross-compilation | |||||
Patch was backported from Apache httpd: | |||||
http://svn.apache.org/viewvc?view=revision&revision=1327907 | |||||
http://svn.apache.org/viewvc?view=revision&revision=1328390 | |||||
http://svn.apache.org/viewvc?view=revision&revision=1328714 | |||||
Patch submitted upstream: | |||||
https://issues.apache.org/bugzilla/show_bug.cgi?id=57058 | |||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> | |||||
--- a/configure.in | |||||
+++ b/configure.in | |||||
@@ -118,6 +118,16 @@ AC_CANONICAL_SYSTEM | |||||
echo "Configuring APR library" | |||||
echo "Platform: $host" | |||||
+dnl In case of cross compilation we set CC_FOR_BUILD to cc unless | |||||
+dnl we got already CC_FOR_BUILD from environment. | |||||
+if test "x${build_alias}" != "x${host_alias}"; then | |||||
+ if test "x${CC_FOR_BUILD}" = "x"; then | |||||
+ CC_FOR_BUILD=cc | |||||
+ fi | |||||
+fi | |||||
+AC_SUBST(CC_FOR_BUILD) | |||||
+AC_SUBST(CFLAGS_FOR_BUILD) | |||||
+ | |||||
dnl Some initial steps for configuration. We setup the default directory | |||||
dnl and which files are to be configured. | |||||
--- a/Makefile.in | |||||
+++ b/Makefile.in | |||||
@@ -8,6 +8,8 @@ top_blddir=@apr_builddir@ | |||||
# APR (Apache Portable Runtime) library Makefile. | |||||
# | |||||
CPP = @CPP@ | |||||
+CC_FOR_BUILD = @CC_FOR_BUILD@ | |||||
+CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ | |||||
# get substituted into some targets | |||||
APR_MAJOR_VERSION=@APR_MAJOR_VERSION@ | |||||
@@ -137,8 +139,13 @@ tools/gen_test_char.lo: tools/gen_test_c | |||||
$(APR_MKDIR) tools | |||||
$(LT_COMPILE) | |||||
+ifdef CC_FOR_BUILD | |||||
+tools/gen_test_char@EXEEXT@: tools/gen_test_char.c $(LOCAL_LIBS) | |||||
+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -DCROSS_COMPILE -o $@ $< | |||||
+else | |||||
tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char) | |||||
$(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS) | |||||
+endif | |||||
include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@ | |||||
$(APR_MKDIR) include/private |
@ -0,0 +1,37 @@ | |||||
Fix PATH_MAX detection by including sys/param.h if available | |||||
Patch sent upstream: | |||||
https://bz.apache.org/bugzilla/show_bug.cgi?id=63782 | |||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> | |||||
--- a/configure.in | |||||
+++ b/configure.in | |||||
@@ -1593,6 +1593,7 @@ AC_SUBST(stdlibh) | |||||
AC_SUBST(stringh) | |||||
AC_SUBST(stringsh) | |||||
AC_SUBST(sys_ioctlh) | |||||
+AC_SUBST(sys_paramh) | |||||
AC_SUBST(sys_sendfileh) | |||||
AC_SUBST(sys_signalh) | |||||
AC_SUBST(sys_socketh) | |||||
--- a/include/apr.h.in | |||||
+++ b/include/apr.h.in | |||||
@@ -94,6 +94,7 @@ | |||||
#define APR_HAVE_STRING_H @stringh@ | |||||
#define APR_HAVE_STRINGS_H @stringsh@ | |||||
#define APR_HAVE_SYS_IOCTL_H @sys_ioctlh@ | |||||
+#define APR_HAVE_SYS_PARAM_H @sys_paramh@ | |||||
#define APR_HAVE_SYS_SENDFILE_H @sys_sendfileh@ | |||||
#define APR_HAVE_SYS_SIGNAL_H @sys_signalh@ | |||||
#define APR_HAVE_SYS_SOCKET_H @sys_socketh@ | |||||
@@ -201,6 +202,9 @@ | |||||
#ifdef __cplusplus | |||||
extern "C" { | |||||
#endif | |||||
+#if APR_HAVE_SYS_PARAM_H | |||||
+#include <sys/param.h> | |||||
+#endif | |||||
/** | |||||
* @addtogroup apr_platform |
@ -1,13 +0,0 @@ | |||||
https://dev.openwrt.org/ticket/9287 | |||||
--- a/time/unix/time.c | |||||
+++ b/time/unix/time.c | |||||
@@ -75,7 +75,7 @@ APR_DECLARE(apr_time_t) apr_time_now(voi | |||||
{ | |||||
struct timeval tv; | |||||
gettimeofday(&tv, NULL); | |||||
- return tv.tv_sec * APR_USEC_PER_SEC + tv.tv_usec; | |||||
+ return tv.tv_sec * (apr_time_t)APR_USEC_PER_SEC + (apr_time_t)tv.tv_usec; | |||||
} | |||||
static void explode_time(apr_time_exp_t *xt, apr_time_t t, |
@ -1,51 +0,0 @@ | |||||
Makefile.in: fix cross compiling failed | |||||
The tools/gen_test_char was invoked at build time, | |||||
and it didn't work for the cross compiling, so we | |||||
compile it with $BUILDCC. | |||||
Remove the 'tools' dir creation, it always existed. | |||||
And it caused gen_test_char unexpected rebuilt at | |||||
do_install time. | |||||
Upstream-Status: inappropriate [oe specific] | |||||
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | |||||
--- | |||||
Makefile.in | 10 ++-------- | |||||
1 file changed, 2 insertions(+), 8 deletions(-) | |||||
Index: apr-1.5.2/Makefile.in | |||||
=================================================================== | |||||
--- apr-1.5.2.orig/Makefile.in | |||||
+++ apr-1.5.2/Makefile.in | |||||
@@ -20,7 +20,7 @@ INCDIR=./include | |||||
OSDIR=$(top_srcdir)/include/arch/@OSDIR@ | |||||
DEFOSDIR=$(INCDIR)/arch/@DEFAULT_OSDIR@ | |||||
INCLUDES=-I$(INCDIR) -I$(OSDIR) -I$(DEFOSDIR) -I$(top_srcdir)/include/arch/@DEFAULT_OSDIR@ -I$(top_srcdir)/include -I$(top_srcdir)/include/private -I$(top_blddir)/include/private | |||||
- | |||||
+BUILDCC=gcc | |||||
# | |||||
# Macros for target determination | |||||
# | |||||
@@ -47,7 +47,6 @@ LT_VERSION = @LT_VERSION@ | |||||
CLEAN_TARGETS = apr-config.out apr.exp exports.c export_vars.c .make.dirs \ | |||||
build/apr_rules.out tools/gen_test_char@EXEEXT@ \ | |||||
- tools/gen_test_char.o tools/gen_test_char.lo \ | |||||
include/private/apr_escape_test_char.h | |||||
DISTCLEAN_TARGETS = config.cache config.log config.status \ | |||||
include/apr.h include/arch/unix/apr_private.h \ | |||||
@@ -138,9 +137,9 @@ tools/gen_test_char.lo: tools/gen_test_c | |||||
$(APR_MKDIR) tools | |||||
$(LT_COMPILE) | |||||
-tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char) | |||||
- $(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS) | |||||
- | |||||
+tools/gen_test_char@EXEEXT@: tools/gen_test_char.c | |||||
+ $(BUILDCC) $(CFLAGS_FOR_BUILD) $< -o $@ | |||||
+ | |||||
include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@ | |||||
$(APR_MKDIR) include/private | |||||
tools/gen_test_char@EXEEXT@ > $@ |