packages/net/apache/patches/001-cross-compile.patch
Sebastian Kemper 623ae46141 apache: bump to 2.4.41 & sync with master
This is a squash of the following cherry-picked commits:

14f4f0bef0
4e6bdd8a49
c8aba5113b
2d188fd37f
31e0d618e5
39e68309e8
a1472254db
d6476f30bb
258967b0d2
e94a08298e
6bd63d24f0
66bb68a7b6
d44ad09fcd

Short summary:

- version is bumped to 2.4.41
- httpd is renamed to apache2 to avoid overwriting of other servers (for
  instance busybox's httpd)
- the name apache2 is now also used for directories, for instance
  /etc/apache2 instead of /etc/apache
- a simple init script it added (/etc/init.d/apache2)
- a user "apache" is added upon package installation and used by default
- adds the Apache modules (in the main package as well as in additional
  packages)
- Makefile and patches are updated and cleaned
- adds myself as maintainer
- improves the cross-compile setup (via configure variables, patches &
  sed scripts)
- apxs is fixed up so that external modules can be added easily

For more details please check the individual commits provided above.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2020-02-08 22:14:48 +01:00

57 lines
1.8 KiB
Diff

Fix cross-compilation
Fetched httpd-2.4.x-cross_compile.diff from upstream bugtracker:
https://issues.apache.org/bugzilla/show_bug.cgi?id=51257#c6
which is a bundle of upstream revisions:
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
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
--- a/server/Makefile.in
+++ b/server/Makefile.in
@@ -24,9 +24,14 @@ TARGETS = delete-exports $(LTLIBRARY_NAM
include $(top_builddir)/build/rules.mk
include $(top_srcdir)/build/library.mk
+ifdef CC_FOR_BUILD
+gen_test_char: gen_test_char.c
+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -DCROSS_COMPILE -o $@ $<
+else
gen_test_char_OBJECTS = gen_test_char.lo
gen_test_char: $(gen_test_char_OBJECTS)
$(LINK) $(EXTRA_LDFLAGS) $(gen_test_char_OBJECTS) $(EXTRA_LIBS)
+endif
test_char.h: gen_test_char
./gen_test_char > test_char.h
--- a/configure.in
+++ b/configure.in
@@ -206,6 +206,14 @@ AC_PROG_CPP
dnl Try to get c99 support for variadic macros
ifdef([AC_PROG_CC_C99], [AC_PROG_CC_C99])
+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
+
if test "x${cache_file}" = "x/dev/null"; then
# Likewise, ensure that CC and CPP are passed through to the pcre
# configure script iff caching is disabled (the autoconf 2.5x default).
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -55,6 +55,8 @@ AC_DEFUN([APACHE_GEN_CONFIG_VARS],[
APACHE_SUBST(CPPFLAGS)
APACHE_SUBST(CFLAGS)
APACHE_SUBST(CXXFLAGS)
+ APACHE_SUBST(CC_FOR_BUILD)
+ APACHE_SUBST(CFLAGS_FOR_BUILD)
APACHE_SUBST(LTFLAGS)
APACHE_SUBST(LDFLAGS)
APACHE_SUBST(LT_LDFLAGS)