Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 00/16] New package Apache including mod_php
@ 2014-10-05 17:38 Bernd Kuhls
  2014-10-05 17:38 ` [Buildroot] [PATCH v2 01/16] package/apr: Fix detection of rlimit and large file support Bernd Kuhls
                   ` (16 more replies)
  0 siblings, 17 replies; 21+ messages in thread
From: Bernd Kuhls @ 2014-10-05 17:38 UTC (permalink / raw)
  To: buildroot

Hi,

this patchset adds Apache webserver and its PHP module to buildroot.

v2:
- reordered patches (Yann)
- split patch and reordered apr-util dependencies (Yann)
- added support for PHP modules gd, mcrypt, mbstring
- updated patch to support in PHP (Yann, Thomas)
  - split patch to support Apache in PHP
    - patch PHP configure only to properly detect Apache
    - patching PHP configure for thread detection is now done
      with by sed as a POST_PATCH_HOOK
    - added slash after PKGDIR
- updated patch to add Apache as new package
  - added upstream SCM urls for the gen_test_char cross-compile patch (Yann)
  - added comments for the need to install to staging and autoreconf
  - added apr as dependency
  - moved --enable-nonportable-atomics to an if-clause
- apr
  - added upstream SCM urls for the gen_test_char cross-compile patch (Yann)
  - added comment for the need to autoreconf

Regards, Bernd

Bernd Kuhls (16):
  package/apr: Fix detection of rlimit and large file support
  package/apr-util: Add expat hard-dependency
  package/apr-util: Remove unused dependencies to neon and zlib
  package/apr-util: make sqlite optional
  package/apr-util: add optional dependency to berkeleydb
  package/apr-util: add optional dependency to gdbm
  package/apr-util: add optional dependency to mysql
  package/apr-util: add optional dependency to openssl
  package/php: Add support for GD module
  package/php: Add support for mcrypt module
  package/php: Add support for mbstring module
  package/apr: Bump version to 1.5.1
  package/apr: Fix for Apache when listening to multiple ports
  package/apr-util: Bump version to 1.5.4
  Apache: New package
  package/php: Add Apache support

-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Buildroot] [PATCH v2 01/16] package/apr: Fix detection of rlimit and large file support
  2014-10-05 17:38 [Buildroot] [PATCH v2 00/16] New package Apache including mod_php Bernd Kuhls
@ 2014-10-05 17:38 ` Bernd Kuhls
  2014-10-05 17:38 ` [Buildroot] [PATCH v2 02/16] package/apr-util: Add expat hard-dependency Bernd Kuhls
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 21+ messages in thread
From: Bernd Kuhls @ 2014-10-05 17:38 UTC (permalink / raw)
  To: buildroot

Snippets from configure log:

before:
checking whether to enable -D_LARGEFILE64_SOURCE... no
...
checking struct rlimit... no

after
checking whether to enable -D_LARGEFILE64_SOURCE... (cached) yes
...
checking struct rlimit... (cached) yes

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/apr/apr.mk |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/package/apr/apr.mk b/package/apr/apr.mk
index 1a4c0e2..dfaf213 100644
--- a/package/apr/apr.mk
+++ b/package/apr/apr.mk
@@ -16,6 +16,7 @@ APR_CONF_ENV = \
 	apr_cv_mutex_robust_shared=no \
 	apr_cv_tcp_nodelay_with_cork=yes \
 	ac_cv_sizeof_struct_iovec=8 \
+	ac_cv_struct_rlimit=yes \
 	apr_cv_mutex_recursive=yes
 APR_CONFIG_SCRIPTS = apr-1-config
 
@@ -24,6 +25,11 @@ ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
 APR_CONF_ENV += apr_cv_pthreads_lib="-lpthread"
 endif
 
+# Fix lfs detection when cross compiling
+ifeq ($(BR2_LARGEFILE),y)
+APR_CONF_ENV += apr_cv_use_lfs64=yes
+endif
+
 define APR_CLEANUP_UNNEEDED_FILES
 	$(RM) -rf $(TARGET_DIR)/usr/build-1/
 endef
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [Buildroot] [PATCH v2 02/16] package/apr-util: Add expat hard-dependency
  2014-10-05 17:38 [Buildroot] [PATCH v2 00/16] New package Apache including mod_php Bernd Kuhls
  2014-10-05 17:38 ` [Buildroot] [PATCH v2 01/16] package/apr: Fix detection of rlimit and large file support Bernd Kuhls
@ 2014-10-05 17:38 ` Bernd Kuhls
  2014-10-05 17:38 ` [Buildroot] [PATCH v2 03/16] package/apr-util: Remove unused dependencies to neon and zlib Bernd Kuhls
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 21+ messages in thread
From: Bernd Kuhls @ 2014-10-05 17:38 UTC (permalink / raw)
  To: buildroot

When expat is missing, apr-util compiles its own expat

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/apr-util/Config.in   |    1 +
 package/apr-util/apr-util.mk |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/apr-util/Config.in b/package/apr-util/Config.in
index fcef693..6a7c00c 100644
--- a/package/apr-util/Config.in
+++ b/package/apr-util/Config.in
@@ -5,6 +5,7 @@ config BR2_PACKAGE_APR_UTIL
 	select BR2_PACKAGE_NEON
 	select BR2_PACKAGE_NEON_ZLIB
 	select BR2_PACKAGE_ZLIB
+	select BR2_PACKAGE_EXPAT
 	# apr really needs shared library support
 	depends on !BR2_PREFER_STATIC_LIB
 	depends on BR2_USE_MMU # apr
diff --git a/package/apr-util/apr-util.mk b/package/apr-util/apr-util.mk
index bdb3004..c8c75a2 100644
--- a/package/apr-util/apr-util.mk
+++ b/package/apr-util/apr-util.mk
@@ -9,7 +9,7 @@ APR_UTIL_SITE = http://archive.apache.org/dist/apr
 APR_UTIL_LICENSE = Apache-2.0
 APR_UTIL_LICENSE_FILES = LICENSE
 APR_UTIL_INSTALL_STAGING = YES
-APR_UTIL_DEPENDENCIES = apr sqlite neon zlib
+APR_UTIL_DEPENDENCIES = apr expat sqlite neon zlib
 APR_UTIL_CONF_OPTS = \
 	--with-apr=$(STAGING_DIR)/usr/bin/apr-1-config
 APR_UTIL_CONFIG_SCRIPTS = apu-1-config
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [Buildroot] [PATCH v2 03/16] package/apr-util: Remove unused dependencies to neon and zlib
  2014-10-05 17:38 [Buildroot] [PATCH v2 00/16] New package Apache including mod_php Bernd Kuhls
  2014-10-05 17:38 ` [Buildroot] [PATCH v2 01/16] package/apr: Fix detection of rlimit and large file support Bernd Kuhls
  2014-10-05 17:38 ` [Buildroot] [PATCH v2 02/16] package/apr-util: Add expat hard-dependency Bernd Kuhls
@ 2014-10-05 17:38 ` Bernd Kuhls
  2014-10-05 17:38 ` [Buildroot] [PATCH v2 04/16] package/apr-util: make sqlite optional Bernd Kuhls
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 21+ messages in thread
From: Bernd Kuhls @ 2014-10-05 17:38 UTC (permalink / raw)
  To: buildroot


Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/apr-util/Config.in   |    3 ---
 package/apr-util/apr-util.mk |    2 +-
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/package/apr-util/Config.in b/package/apr-util/Config.in
index 6a7c00c..f54e85a 100644
--- a/package/apr-util/Config.in
+++ b/package/apr-util/Config.in
@@ -2,9 +2,6 @@ config BR2_PACKAGE_APR_UTIL
 	bool "apr-util"
 	select BR2_PACKAGE_APR
 	select BR2_PACKAGE_SQLITE
-	select BR2_PACKAGE_NEON
-	select BR2_PACKAGE_NEON_ZLIB
-	select BR2_PACKAGE_ZLIB
 	select BR2_PACKAGE_EXPAT
 	# apr really needs shared library support
 	depends on !BR2_PREFER_STATIC_LIB
diff --git a/package/apr-util/apr-util.mk b/package/apr-util/apr-util.mk
index c8c75a2..1b85dae 100644
--- a/package/apr-util/apr-util.mk
+++ b/package/apr-util/apr-util.mk
@@ -9,7 +9,7 @@ APR_UTIL_SITE = http://archive.apache.org/dist/apr
 APR_UTIL_LICENSE = Apache-2.0
 APR_UTIL_LICENSE_FILES = LICENSE
 APR_UTIL_INSTALL_STAGING = YES
-APR_UTIL_DEPENDENCIES = apr expat sqlite neon zlib
+APR_UTIL_DEPENDENCIES = apr expat sqlite
 APR_UTIL_CONF_OPTS = \
 	--with-apr=$(STAGING_DIR)/usr/bin/apr-1-config
 APR_UTIL_CONFIG_SCRIPTS = apu-1-config
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [Buildroot] [PATCH v2 04/16] package/apr-util: make sqlite optional
  2014-10-05 17:38 [Buildroot] [PATCH v2 00/16] New package Apache including mod_php Bernd Kuhls
                   ` (2 preceding siblings ...)
  2014-10-05 17:38 ` [Buildroot] [PATCH v2 03/16] package/apr-util: Remove unused dependencies to neon and zlib Bernd Kuhls
@ 2014-10-05 17:38 ` Bernd Kuhls
  2014-10-05 17:38 ` [Buildroot] [PATCH v2 05/16] package/apr-util: add optional dependency to berkeleydb Bernd Kuhls
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 21+ messages in thread
From: Bernd Kuhls @ 2014-10-05 17:38 UTC (permalink / raw)
  To: buildroot


Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/apr-util/Config.in   |    1 -
 package/apr-util/apr-util.mk |    9 ++++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/package/apr-util/Config.in b/package/apr-util/Config.in
index f54e85a..6757e7e 100644
--- a/package/apr-util/Config.in
+++ b/package/apr-util/Config.in
@@ -1,7 +1,6 @@
 config BR2_PACKAGE_APR_UTIL
 	bool "apr-util"
 	select BR2_PACKAGE_APR
-	select BR2_PACKAGE_SQLITE
 	select BR2_PACKAGE_EXPAT
 	# apr really needs shared library support
 	depends on !BR2_PREFER_STATIC_LIB
diff --git a/package/apr-util/apr-util.mk b/package/apr-util/apr-util.mk
index 1b85dae..6bc6ee9 100644
--- a/package/apr-util/apr-util.mk
+++ b/package/apr-util/apr-util.mk
@@ -9,7 +9,7 @@ APR_UTIL_SITE = http://archive.apache.org/dist/apr
 APR_UTIL_LICENSE = Apache-2.0
 APR_UTIL_LICENSE_FILES = LICENSE
 APR_UTIL_INSTALL_STAGING = YES
-APR_UTIL_DEPENDENCIES = apr expat sqlite
+APR_UTIL_DEPENDENCIES = apr expat
 APR_UTIL_CONF_OPTS = \
 	--with-apr=$(STAGING_DIR)/usr/bin/apr-1-config
 APR_UTIL_CONFIG_SCRIPTS = apu-1-config
@@ -18,4 +18,11 @@ APR_UTIL_CONFIG_SCRIPTS = apu-1-config
 # features.
 APR_UTIL_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBICONV),libiconv)
 
+ifeq ($(BR2_PACKAGE_SQLITE),y)
+APR_UTIL_CONF_OPTS += --with-sqlite3="$(STAGING_DIR)/usr"
+APR_UTIL_DEPENDENCIES += sqlite
+else
+APR_UTIL_CONF_OPTS += --without-sqlite3
+endif
+
 $(eval $(autotools-package))
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [Buildroot] [PATCH v2 05/16] package/apr-util: add optional dependency to berkeleydb
  2014-10-05 17:38 [Buildroot] [PATCH v2 00/16] New package Apache including mod_php Bernd Kuhls
                   ` (3 preceding siblings ...)
  2014-10-05 17:38 ` [Buildroot] [PATCH v2 04/16] package/apr-util: make sqlite optional Bernd Kuhls
@ 2014-10-05 17:38 ` Bernd Kuhls
  2014-10-05 17:38 ` [Buildroot] [PATCH v2 06/16] package/apr-util: add optional dependency to gdbm Bernd Kuhls
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 21+ messages in thread
From: Bernd Kuhls @ 2014-10-05 17:38 UTC (permalink / raw)
  To: buildroot


Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/apr-util/apr-util.mk |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/apr-util/apr-util.mk b/package/apr-util/apr-util.mk
index 6bc6ee9..c65b0fb 100644
--- a/package/apr-util/apr-util.mk
+++ b/package/apr-util/apr-util.mk
@@ -18,6 +18,13 @@ APR_UTIL_CONFIG_SCRIPTS = apu-1-config
 # features.
 APR_UTIL_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBICONV),libiconv)
 
+ifeq ($(BR2_PACKAGE_BERKELEYDB),y)
+APR_UTIL_CONF_OPTS += --with-dbm=db53 --with-berkeley-db="$(STAGING_DIR)/usr"
+APR_UTIL_DEPENDENCIES += berkeleydb
+else
+APR_UTIL_CONF_OPTS += --without-berkeley-db
+endif
+
 ifeq ($(BR2_PACKAGE_SQLITE),y)
 APR_UTIL_CONF_OPTS += --with-sqlite3="$(STAGING_DIR)/usr"
 APR_UTIL_DEPENDENCIES += sqlite
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [Buildroot] [PATCH v2 06/16] package/apr-util: add optional dependency to gdbm
  2014-10-05 17:38 [Buildroot] [PATCH v2 00/16] New package Apache including mod_php Bernd Kuhls
                   ` (4 preceding siblings ...)
  2014-10-05 17:38 ` [Buildroot] [PATCH v2 05/16] package/apr-util: add optional dependency to berkeleydb Bernd Kuhls
@ 2014-10-05 17:38 ` Bernd Kuhls
  2014-10-05 17:38 ` [Buildroot] [PATCH v2 07/16] package/apr-util: add optional dependency to mysql Bernd Kuhls
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 21+ messages in thread
From: Bernd Kuhls @ 2014-10-05 17:38 UTC (permalink / raw)
  To: buildroot


Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/apr-util/apr-util.mk |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/apr-util/apr-util.mk b/package/apr-util/apr-util.mk
index c65b0fb..e22efb2 100644
--- a/package/apr-util/apr-util.mk
+++ b/package/apr-util/apr-util.mk
@@ -25,6 +25,13 @@ else
 APR_UTIL_CONF_OPTS += --without-berkeley-db
 endif
 
+ifeq ($(BR2_PACKAGE_GDBM),y)
+APR_UTIL_CONF_OPTS += --with-gdbm="$(STAGING_DIR)/usr"
+APR_UTIL_DEPENDENCIES += gdbm
+else
+APR_UTIL_CONF_OPTS += --without-gdbm
+endif
+
 ifeq ($(BR2_PACKAGE_SQLITE),y)
 APR_UTIL_CONF_OPTS += --with-sqlite3="$(STAGING_DIR)/usr"
 APR_UTIL_DEPENDENCIES += sqlite
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [Buildroot] [PATCH v2 07/16] package/apr-util: add optional dependency to mysql
  2014-10-05 17:38 [Buildroot] [PATCH v2 00/16] New package Apache including mod_php Bernd Kuhls
                   ` (5 preceding siblings ...)
  2014-10-05 17:38 ` [Buildroot] [PATCH v2 06/16] package/apr-util: add optional dependency to gdbm Bernd Kuhls
@ 2014-10-05 17:38 ` Bernd Kuhls
  2014-10-05 17:38 ` [Buildroot] [PATCH v2 08/16] package/apr-util: add optional dependency to openssl Bernd Kuhls
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 21+ messages in thread
From: Bernd Kuhls @ 2014-10-05 17:38 UTC (permalink / raw)
  To: buildroot


Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/apr-util/apr-util.mk |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/apr-util/apr-util.mk b/package/apr-util/apr-util.mk
index e22efb2..42506bb 100644
--- a/package/apr-util/apr-util.mk
+++ b/package/apr-util/apr-util.mk
@@ -32,6 +32,13 @@ else
 APR_UTIL_CONF_OPTS += --without-gdbm
 endif
 
+ifeq ($(BR2_PACKAGE_MYSQL),y)
+APR_UTIL_CONF_OPTS += --with-mysql="$(STAGING_DIR)/usr"
+APR_UTIL_DEPENDENCIES += mysql
+else
+APR_UTIL_CONF_OPTS += --without-mysql
+endif
+
 ifeq ($(BR2_PACKAGE_SQLITE),y)
 APR_UTIL_CONF_OPTS += --with-sqlite3="$(STAGING_DIR)/usr"
 APR_UTIL_DEPENDENCIES += sqlite
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [Buildroot] [PATCH v2 08/16] package/apr-util: add optional dependency to openssl
  2014-10-05 17:38 [Buildroot] [PATCH v2 00/16] New package Apache including mod_php Bernd Kuhls
                   ` (6 preceding siblings ...)
  2014-10-05 17:38 ` [Buildroot] [PATCH v2 07/16] package/apr-util: add optional dependency to mysql Bernd Kuhls
@ 2014-10-05 17:38 ` Bernd Kuhls
  2014-10-05 18:39   ` Thomas Petazzoni
  2014-10-05 17:38 ` [Buildroot] [PATCH v2 09/16] package/php: Add support for GD module Bernd Kuhls
                   ` (8 subsequent siblings)
  16 siblings, 1 reply; 21+ messages in thread
From: Bernd Kuhls @ 2014-10-05 17:38 UTC (permalink / raw)
  To: buildroot


Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/apr-util/apr-util.mk |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/apr-util/apr-util.mk b/package/apr-util/apr-util.mk
index 42506bb..ed8eb28 100644
--- a/package/apr-util/apr-util.mk
+++ b/package/apr-util/apr-util.mk
@@ -46,4 +46,11 @@ else
 APR_UTIL_CONF_OPTS += --without-sqlite3
 endif
 
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+APR_UTIL_CONF_OPTS += --with-crypto --with-openssl="$(STAGING_DIR)/usr"
+APR_UTIL_DEPENDENCIES += openssl
+else
+APR_UTIL_CONF_OPTS += --without-ssl
+endif
+
 $(eval $(autotools-package))
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [Buildroot] [PATCH v2 09/16] package/php: Add support for GD module
  2014-10-05 17:38 [Buildroot] [PATCH v2 00/16] New package Apache including mod_php Bernd Kuhls
                   ` (7 preceding siblings ...)
  2014-10-05 17:38 ` [Buildroot] [PATCH v2 08/16] package/apr-util: add optional dependency to openssl Bernd Kuhls
@ 2014-10-05 17:38 ` Bernd Kuhls
  2014-10-05 17:38 ` [Buildroot] [PATCH v2 10/16] package/php: Add support for mcrypt module Bernd Kuhls
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 21+ messages in thread
From: Bernd Kuhls @ 2014-10-05 17:38 UTC (permalink / raw)
  To: buildroot


Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/php/Config.ext |    8 ++++++++
 package/php/php.mk     |    8 ++++++++
 2 files changed, 16 insertions(+)

diff --git a/package/php/Config.ext b/package/php/Config.ext
index 6880cd7..f745cc9 100644
--- a/package/php/Config.ext
+++ b/package/php/Config.ext
@@ -194,6 +194,14 @@ config BR2_PACKAGE_PHP_EXT_EXIF
 	help
 	  EXIF support
 
+config BR2_PACKAGE_PHP_EXT_GD
+	bool "GD"
+	select BR2_PACKAGE_FREETYPE
+	select BR2_PACKAGE_JPEG
+	select BR2_PACKAGE_LIBPNG
+	help
+	  GD support
+
 comment "Mathematical extensions"
 
 config BR2_PACKAGE_PHP_EXT_BCMATH
diff --git a/package/php/php.mk b/package/php/php.mk
index 2e97c9a..648dc55 100644
--- a/package/php/php.mk
+++ b/package/php/php.mk
@@ -213,6 +213,14 @@ ifeq ($(BR2_PACKAGE_PHP_EXT_SNMP),y)
 	PHP_DEPENDENCIES += netsnmp
 endif
 
+ifeq ($(BR2_PACKAGE_PHP_EXT_GD),y)
+	PHP_CONF_OPTS += --with-gd --with-jpeg-dir=$(STAGING_DIR)/usr \
+		--with-png-dir=$(STAGING_DIR)/usr \
+		--with-zlib-dir=$(STAGING_DIR)/usr \
+		--with-freetype-dir=$(STAGING_DIR)/usr
+	PHP_DEPENDENCIES += jpeg libpng freetype
+endif
+
 define PHP_EXTENSIONS_FIXUP
 	$(SED) "/prefix/ s:/usr:$(STAGING_DIR)/usr:" \
 		$(STAGING_DIR)/usr/bin/phpize
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [Buildroot] [PATCH v2 10/16] package/php: Add support for mcrypt module
  2014-10-05 17:38 [Buildroot] [PATCH v2 00/16] New package Apache including mod_php Bernd Kuhls
                   ` (8 preceding siblings ...)
  2014-10-05 17:38 ` [Buildroot] [PATCH v2 09/16] package/php: Add support for GD module Bernd Kuhls
@ 2014-10-05 17:38 ` Bernd Kuhls
  2014-10-05 17:38 ` [Buildroot] [PATCH v2 11/16] package/php: Add support for mbstring module Bernd Kuhls
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 21+ messages in thread
From: Bernd Kuhls @ 2014-10-05 17:38 UTC (permalink / raw)
  To: buildroot


Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/php/Config.ext |    5 +++++
 package/php/php.mk     |    5 +++++
 2 files changed, 10 insertions(+)

diff --git a/package/php/Config.ext b/package/php/Config.ext
index f745cc9..4649375 100644
--- a/package/php/Config.ext
+++ b/package/php/Config.ext
@@ -56,6 +56,11 @@ config BR2_PACKAGE_PHP_EXT_HASH
 	help
 	  HASH message digest framework
 
+config BR2_PACKAGE_PHP_EXT_MCRYPT
+	bool "mcrypt"
+	help
+	  mcrypt support
+
 config BR2_PACKAGE_PHP_EXT_OPENSSL
 	bool "openssl"
 	select BR2_PACKAGE_OPENSSL
diff --git a/package/php/php.mk b/package/php/php.mk
index 648dc55..0cf4058 100644
--- a/package/php/php.mk
+++ b/package/php/php.mk
@@ -78,6 +78,11 @@ PHP_CONF_OPTS += $(if $(BR2_PACKAGE_PHP_EXT_SOCKETS),--enable-sockets) \
 		$(if $(BR2_PACKAGE_PHP_EXT_BCMATH),--enable-bcmath) \
 		$(if $(BR2_PACKAGE_PHP_EXT_PHAR),--enable-phar)
 
+ifeq ($(BR2_PACKAGE_PHP_EXT_MCRYPT),y)
+	PHP_CONF_OPTS += --with-mcrypt=$(STAGING_DIR)/usr
+	PHP_DEPENDENCIES += libmcrypt
+endif
+
 ifeq ($(BR2_PACKAGE_PHP_EXT_OPENSSL),y)
 	PHP_CONF_OPTS += --with-openssl=$(STAGING_DIR)/usr
 	PHP_DEPENDENCIES += openssl
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [Buildroot] [PATCH v2 11/16] package/php: Add support for mbstring module
  2014-10-05 17:38 [Buildroot] [PATCH v2 00/16] New package Apache including mod_php Bernd Kuhls
                   ` (9 preceding siblings ...)
  2014-10-05 17:38 ` [Buildroot] [PATCH v2 10/16] package/php: Add support for mcrypt module Bernd Kuhls
@ 2014-10-05 17:38 ` Bernd Kuhls
  2014-10-05 17:39 ` [Buildroot] [PATCH v2 12/16] package/apr: Bump version to 1.5.1 Bernd Kuhls
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 21+ messages in thread
From: Bernd Kuhls @ 2014-10-05 17:38 UTC (permalink / raw)
  To: buildroot


Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/php/Config.ext |    5 +++++
 package/php/php.mk     |    1 +
 2 files changed, 6 insertions(+)

diff --git a/package/php/Config.ext b/package/php/Config.ext
index 4649375..241e4a9 100644
--- a/package/php/Config.ext
+++ b/package/php/Config.ext
@@ -192,6 +192,11 @@ comment "intl support needs a toolchain w/ C++, wchar, threads"
 	depends on BR2_ARCH_HAS_ATOMICS
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
 
+config BR2_PACKAGE_PHP_EXT_MBSTRING
+	bool "mbstring"
+	help
+	  multibyte string support
+
 comment "Image processing"
 
 config BR2_PACKAGE_PHP_EXT_EXIF
diff --git a/package/php/php.mk b/package/php/php.mk
index 0cf4058..e6c2db7 100644
--- a/package/php/php.mk
+++ b/package/php/php.mk
@@ -76,6 +76,7 @@ PHP_CONF_OPTS += $(if $(BR2_PACKAGE_PHP_EXT_SOCKETS),--enable-sockets) \
 		$(if $(BR2_PACKAGE_PHP_EXT_CALENDAR),--enable-calendar) \
 		$(if $(BR2_PACKAGE_PHP_EXT_FILEINFO),--enable-fileinfo) \
 		$(if $(BR2_PACKAGE_PHP_EXT_BCMATH),--enable-bcmath) \
+		$(if $(BR2_PACKAGE_PHP_EXT_MBSTRING),--enable-mbstring) \
 		$(if $(BR2_PACKAGE_PHP_EXT_PHAR),--enable-phar)
 
 ifeq ($(BR2_PACKAGE_PHP_EXT_MCRYPT),y)
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [Buildroot] [PATCH v2 12/16] package/apr: Bump version to 1.5.1
  2014-10-05 17:38 [Buildroot] [PATCH v2 00/16] New package Apache including mod_php Bernd Kuhls
                   ` (10 preceding siblings ...)
  2014-10-05 17:38 ` [Buildroot] [PATCH v2 11/16] package/php: Add support for mbstring module Bernd Kuhls
@ 2014-10-05 17:39 ` Bernd Kuhls
  2014-10-05 17:39 ` [Buildroot] [PATCH v2 13/16] package/apr: Fix for Apache when listening to multiple ports Bernd Kuhls
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 21+ messages in thread
From: Bernd Kuhls @ 2014-10-05 17:39 UTC (permalink / raw)
  To: buildroot

apr-0001-cross-compile.patch: Fix cross compilation
Fix top_builddir in usr/build-1/apr_rules.mk

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/apr/apr-0001-cross-compile.patch |   58 ++++++++++++++++++++++++++++++
 package/apr/apr.mk                       |    9 ++++-
 2 files changed, 66 insertions(+), 1 deletion(-)
 create mode 100644 package/apr/apr-0001-cross-compile.patch

diff --git a/package/apr/apr-0001-cross-compile.patch b/package/apr/apr-0001-cross-compile.patch
new file mode 100644
index 0000000..5b596fb
--- /dev/null
+++ b/package/apr/apr-0001-cross-compile.patch
@@ -0,0 +1,58 @@
+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>
+
+diff -uNr apr-1.5.1.org/configure.in apr-1.5.1/configure.in
+--- apr-1.5.1.org/configure.in	2014-01-25 16:17:29.000000000 +0100
++++ apr-1.5.1/configure.in	2014-10-05 11:20:40.080746760 +0200
+@@ -118,6 +118,16 @@
+ 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.
+ 
+diff -uNr apr-1.5.1.org/Makefile.in apr-1.5.1/Makefile.in
+--- apr-1.5.1.org/Makefile.in	2014-03-17 16:10:26.000000000 +0100
++++ apr-1.5.1/Makefile.in	2014-10-05 11:22:53.031070519 +0200
+@@ -8,6 +8,8 @@
+ # 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@
+@@ -134,8 +136,13 @@
+ 
+ OBJECTS_gen_test_char = tools/gen_test_char.lo $(LOCAL_LIBS)
+ tools/gen_test_char.lo: make_tools_dir
++ifdef CC_FOR_BUILD
++tools/gen_test_char at EXEEXT@: tools/gen_test_char.c $(LOCAL_LIBS)
++	$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -DCROSS_COMPILE -o $@ $<
++else
+ tools/gen_test_char at 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
diff --git a/package/apr/apr.mk b/package/apr/apr.mk
index dfaf213..4b3afc9 100644
--- a/package/apr/apr.mk
+++ b/package/apr/apr.mk
@@ -4,12 +4,17 @@
 #
 ################################################################################
 
-APR_VERSION = 1.4.8
+APR_VERSION = 1.5.1
 APR_SITE = http://archive.apache.org/dist/apr
 APR_LICENSE = Apache-2.0
 APR_LICENSE_FILES = LICENSE
 APR_INSTALL_STAGING = YES
+# We have a patch touching configure.in and Makefile.in,
+# so we need to autoreconf:
+APR_AUTORECONF = YES
 APR_CONF_ENV = \
+	CC_FOR_BUILD="$(HOSTCC)" \
+	CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \
 	ac_cv_file__dev_zero=yes \
 	ac_cv_func_setpgrp_void=yes \
 	apr_cv_process_shared_works=yes \
@@ -41,6 +46,8 @@ define APR_FIXUP_RULES_MK
 		$(STAGING_DIR)/usr/build-1/apr_rules.mk
 	$(SED) 's%apr_builders=%apr_builders=$(STAGING_DIR)%' \
 		$(STAGING_DIR)/usr/build-1/apr_rules.mk
+	$(SED) 's%top_builddir=%top_builddir=$(STAGING_DIR)%' \
+		$(STAGING_DIR)/usr/build-1/apr_rules.mk
 endef
 
 APR_POST_INSTALL_STAGING_HOOKS += APR_FIXUP_RULES_MK
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [Buildroot] [PATCH v2 13/16] package/apr: Fix for Apache when listening to multiple ports
  2014-10-05 17:38 [Buildroot] [PATCH v2 00/16] New package Apache including mod_php Bernd Kuhls
                   ` (11 preceding siblings ...)
  2014-10-05 17:39 ` [Buildroot] [PATCH v2 12/16] package/apr: Bump version to 1.5.1 Bernd Kuhls
@ 2014-10-05 17:39 ` Bernd Kuhls
  2014-10-05 17:39 ` [Buildroot] [PATCH v2 14/16] package/apr-util: Bump version to 1.5.4 Bernd Kuhls
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 21+ messages in thread
From: Bernd Kuhls @ 2014-10-05 17:39 UTC (permalink / raw)
  To: buildroot

For details:
https://issues.apache.org/bugzilla/show_bug.cgi?id=56727#c6

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/apr/apr.mk |    1 +
 1 file changed, 1 insertion(+)

diff --git a/package/apr/apr.mk b/package/apr/apr.mk
index 4b3afc9..cbae0ff 100644
--- a/package/apr/apr.mk
+++ b/package/apr/apr.mk
@@ -22,6 +22,7 @@ APR_CONF_ENV = \
 	apr_cv_tcp_nodelay_with_cork=yes \
 	ac_cv_sizeof_struct_iovec=8 \
 	ac_cv_struct_rlimit=yes \
+	ac_cv_o_nonblock_inherited=no \
 	apr_cv_mutex_recursive=yes
 APR_CONFIG_SCRIPTS = apr-1-config
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [Buildroot] [PATCH v2 14/16] package/apr-util: Bump version to 1.5.4
  2014-10-05 17:38 [Buildroot] [PATCH v2 00/16] New package Apache including mod_php Bernd Kuhls
                   ` (12 preceding siblings ...)
  2014-10-05 17:39 ` [Buildroot] [PATCH v2 13/16] package/apr: Fix for Apache when listening to multiple ports Bernd Kuhls
@ 2014-10-05 17:39 ` Bernd Kuhls
  2014-10-05 17:39 ` [Buildroot] [PATCH v2 15/16] Apache: New package Bernd Kuhls
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 21+ messages in thread
From: Bernd Kuhls @ 2014-10-05 17:39 UTC (permalink / raw)
  To: buildroot


Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/apr-util/apr-util.mk |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/apr-util/apr-util.mk b/package/apr-util/apr-util.mk
index ed8eb28..0cf72bc 100644
--- a/package/apr-util/apr-util.mk
+++ b/package/apr-util/apr-util.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-APR_UTIL_VERSION = 1.5.2
+APR_UTIL_VERSION = 1.5.4
 APR_UTIL_SITE = http://archive.apache.org/dist/apr
 APR_UTIL_LICENSE = Apache-2.0
 APR_UTIL_LICENSE_FILES = LICENSE
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [Buildroot] [PATCH v2 15/16] Apache: New package
  2014-10-05 17:38 [Buildroot] [PATCH v2 00/16] New package Apache including mod_php Bernd Kuhls
                   ` (13 preceding siblings ...)
  2014-10-05 17:39 ` [Buildroot] [PATCH v2 14/16] package/apr-util: Bump version to 1.5.4 Bernd Kuhls
@ 2014-10-05 17:39 ` Bernd Kuhls
  2014-10-05 17:39 ` [Buildroot] [PATCH v2 16/16] package/php: Add Apache support Bernd Kuhls
  2014-10-26 21:53 ` [Buildroot] [PATCH v2 00/16] New package Apache including mod_php Thomas Petazzoni
  16 siblings, 0 replies; 21+ messages in thread
From: Bernd Kuhls @ 2014-10-05 17:39 UTC (permalink / raw)
  To: buildroot


Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/Config.in                              |    1 +
 package/apache/Config.in                       |   19 +++++++
 package/apache/apache-0001-cross-compile.patch |   63 ++++++++++++++++++++++++
 package/apache/apache.mk                       |   48 ++++++++++++++++++
 4 files changed, 131 insertions(+)
 create mode 100644 package/apache/Config.in
 create mode 100644 package/apache/apache-0001-cross-compile.patch
 create mode 100644 package/apache/apache.mk

diff --git a/package/Config.in b/package/Config.in
index 318b743..3b22d25 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -945,6 +945,7 @@ endmenu
 menu "Networking applications"
 	source "package/aiccu/Config.in"
 	source "package/aircrack-ng/Config.in"
+	source "package/apache/Config.in"
 	source "package/argus/Config.in"
 	source "package/arptables/Config.in"
 	source "package/atftp/Config.in"
diff --git a/package/apache/Config.in b/package/apache/Config.in
new file mode 100644
index 0000000..172346c
--- /dev/null
+++ b/package/apache/Config.in
@@ -0,0 +1,19 @@
+config BR2_PACKAGE_APACHE
+	bool "apache"
+	select BR2_PACKAGE_APR_UTIL
+	select BR2_PACKAGE_PCRE
+	depends on !BR2_PREFER_STATIC_LIB
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_USE_MMU # apr
+	help
+	  The Apache HTTP Server Project is an effort to develop and maintain an
+	  open-source HTTP server for modern operating systems including UNIX
+	  and Windows NT. The goal of this project is to provide a secure,
+	  efficient and extensible server that provides HTTP services in sync
+	  with the current HTTP standards.
+
+	  http://httpd.apache.org
+
+comment "apache needs a toolchain w/ dynamic library, threads"
+	depends on BR2_USE_MMU
+	depends on BR2_PREFER_STATIC_LIB || !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/apache/apache-0001-cross-compile.patch b/package/apache/apache-0001-cross-compile.patch
new file mode 100644
index 0000000..790b7a0
--- /dev/null
+++ b/package/apache/apache-0001-cross-compile.patch
@@ -0,0 +1,63 @@
+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>
+
+Index: server/Makefile.in
+===================================================================
+--- a/server/Makefile.in	(revision 1328714)
++++ b/server/Makefile.in	(working copy)
+@@ -22,9 +22,14 @@
+ 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
+Index: configure.in
+===================================================================
+--- a/configure.in	(revision 1328714)
++++ b/configure.in	(working copy)
+@@ -193,6 +193,14 @@
+ 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).
+Index: acinclude.m4
+===================================================================
+--- a/acinclude.m4	(revision 1328714)
++++ ab/cinclude.m4	(working copy)
+@@ -53,6 +53,8 @@
+   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)
diff --git a/package/apache/apache.mk b/package/apache/apache.mk
new file mode 100644
index 0000000..d801aff
--- /dev/null
+++ b/package/apache/apache.mk
@@ -0,0 +1,48 @@
+################################################################################
+#
+# apache
+#
+################################################################################
+
+APACHE_VERSION = 2.4.10
+APACHE_SOURCE = httpd-$(APACHE_VERSION).tar.bz2
+APACHE_SITE = http://archive.apache.org/dist/httpd
+APACHE_LICENSE = Apache-2.0
+APACHE_LICENSE_FILES = LICENSE
+# Needed for mod_php
+APACHE_INSTALL_STAGING = YES
+# We have a patch touching configure.in and Makefile.in,
+# so we need to autoreconf:
+APACHE_AUTORECONF = YES
+APACHE_DEPENDENCIES = apr apr-util pcre
+
+APACHE_CONF_ENV= \
+	CC_FOR_BUILD="$(HOSTCC)" \
+	CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \
+	ap_cv_void_ptr_lt_long=no \
+	PCRE_CONFIG=$(STAGING_DIR)/usr/bin/pcre-config
+
+APACHE_CONF_OPTS = \
+	--sysconfdir=/etc/apache2 \
+	--with-apr=$(STAGING_DIR)/usr \
+	--with-apr-util=$(STAGING_DIR)/usr \
+	--with-pcre=$(STAGING_DIR)/usr/bin/pcre-config \
+	--enable-http \
+	--enable-dbd \
+	--enable-proxy \
+	--enable-mime-magic \
+	--without-suexec-bin \
+	--enable-mods-shared=all \
+	--with-mpm=worker
+
+ifeq ($(BR2_ARCH_HAS_ATOMICS),y)
+APACHE_CONF_OPTS += --enable-nonportable-atomics=yes
+endif
+
+define APACHE_FIX_STAGING_APACHE_CONFIG
+	$(SED) 's%/usr/build%$(STAGING_DIR)/usr/build%' $(STAGING_DIR)/usr/bin/apxs
+	$(SED) 's%^prefix =.*%prefix = $(STAGING_DIR)/usr%' $(STAGING_DIR)/usr/build/config_vars.mk
+endef
+APACHE_POST_INSTALL_STAGING_HOOKS += APACHE_FIX_STAGING_APACHE_CONFIG
+
+$(eval $(autotools-package))
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [Buildroot] [PATCH v2 16/16] package/php: Add Apache support
  2014-10-05 17:38 [Buildroot] [PATCH v2 00/16] New package Apache including mod_php Bernd Kuhls
                   ` (14 preceding siblings ...)
  2014-10-05 17:39 ` [Buildroot] [PATCH v2 15/16] Apache: New package Bernd Kuhls
@ 2014-10-05 17:39 ` Bernd Kuhls
  2014-10-26 21:53 ` [Buildroot] [PATCH v2 00/16] New package Apache including mod_php Thomas Petazzoni
  16 siblings, 0 replies; 21+ messages in thread
From: Bernd Kuhls @ 2014-10-05 17:39 UTC (permalink / raw)
  To: buildroot


Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/php/Config.in           |   17 +++++++++++
 package/php/php-04-apache.patch |   63 +++++++++++++++++++++++++++++++++++++++
 package/php/php.mk              |   19 ++++++++++++
 3 files changed, 99 insertions(+)
 create mode 100644 package/php/php-04-apache.patch

diff --git a/package/php/Config.in b/package/php/Config.in
index 32faa32..db4e647 100644
--- a/package/php/Config.in
+++ b/package/php/Config.in
@@ -11,6 +11,9 @@ if BR2_PACKAGE_PHP
 
 source "package/php/Config.ext"
 
+config BR2_PACKAGE_PHP_APACHE
+	bool
+
 config BR2_PACKAGE_PHP_CLI
 	bool
 
@@ -26,6 +29,20 @@ choice
 	help
 	  Select the PHP interface(s).
 
+config BR2_PACKAGE_PHP_SAPI_APACHE
+	bool "Apache"
+	select BR2_PACKAGE_APACHE
+	select BR2_PACKAGE_PHP_APACHE
+	depends on !BR2_PREFER_STATIC_LIB # apache
+	depends on BR2_TOOLCHAIN_HAS_THREADS # apache
+	depends on BR2_USE_MMU # apr
+	help
+	  Apache module
+
+comment "apache module needs a toolchain w/ dynamic library, threads"
+	depends on BR2_USE_MMU
+	depends on BR2_PREFER_STATIC_LIB || !BR2_TOOLCHAIN_HAS_THREADS
+
 config BR2_PACKAGE_PHP_SAPI_CGI
 	bool "CGI"
 	# CGI uses fork()
diff --git a/package/php/php-04-apache.patch b/package/php/php-04-apache.patch
new file mode 100644
index 0000000..aa0dc16
--- /dev/null
+++ b/package/php/php-04-apache.patch
@@ -0,0 +1,63 @@
+Fix cross-compilation when used as Apache module.
+
+Avoid calling the Apache httpd target binary to check for its presence.
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+
+diff -uNr php-5.5.17.org/configure php-5.5.17/configure
+--- php-5.5.17.org/configure	2014-09-16 14:53:57.000000000 +0200
++++ php-5.5.17/configure	2014-10-05 15:06:12.162625672 +0200
+@@ -6342,7 +6342,7 @@
+ 
+   # Test that we're trying to configure with apache 1.x
+ 
+-  ac_output=`$APXS_HTTPD -v 2>&1 | grep version | $SED -e 's/Oracle-HTTP-//'`
++  ac_output='Server version: Apache/2.4.10 (Unix)'
+   ac_IFS=$IFS
+ IFS="- /.
+ "
+@@ -7626,7 +7626,7 @@
+ 
+   # Test that we're trying to configure with apache 2.x
+ 
+-  ac_output=`$APXS_HTTPD -v 2>&1 | grep version | $SED -e 's/Oracle-HTTP-//'`
++  ac_output='Server version: Apache/2.4.10 (Unix)'
+   ac_IFS=$IFS
+ IFS="- /.
+ "
+@@ -8332,7 +8332,7 @@
+ 
+     fi
+   else
+-    APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'`
++    APACHE_THREADED_MPM="threaded:     yes (fixed thread count)"
+     if test -n "$APACHE_THREADED_MPM"; then
+ 
+   enable_maintainer_zts=yes
+@@ -8450,7 +8450,7 @@
+ 
+   # Test that we're trying to configure with apache 2.x
+ 
+-  ac_output=`$APXS_HTTPD -v 2>&1 | grep version | $SED -e 's/Oracle-HTTP-//'`
++  ac_output='Server version: Apache/2.4.10 (Unix)'
+   ac_IFS=$IFS
+ IFS="- /.
+ "
+@@ -9156,7 +9156,7 @@
+ 
+     fi
+   else
+-    APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'`
++    APACHE_THREADED_MPM="threaded:     yes (fixed thread count)"
+     if test -n "$APACHE_THREADED_MPM"; then
+ 
+   enable_maintainer_zts=yes
+@@ -9255,7 +9255,7 @@
+ 
+   # Test that we're trying to configure with apache 1.x
+ 
+-  ac_output=`$APXS_HTTPD -v 2>&1 | grep version | $SED -e 's/Oracle-HTTP-//'`
++  ac_output='Server version: Apache/2.4.10 (Unix)'
+   ac_IFS=$IFS
+ IFS="- /.
+ "
diff --git a/package/php/php.mk b/package/php/php.mk
index e6c2db7..444c690 100644
--- a/package/php/php.mk
+++ b/package/php/php.mk
@@ -50,6 +50,25 @@ PHP_CONF_OPTS += $(if $(BR2_PACKAGE_PHP_CLI),,--disable-cli)
 PHP_CONF_OPTS += $(if $(BR2_PACKAGE_PHP_CGI),,--disable-cgi)
 PHP_CONF_OPTS += $(if $(BR2_PACKAGE_PHP_FPM),--enable-fpm,--disable-fpm)
 
+ifeq ($(BR2_PACKAGE_PHP_APACHE),y)
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
+define PHP_FIX_THREADS_DETECTION
+	$(SED) 's/pthreads_working\=no/pthreads_working\=yes/' $(@D)/configure
+endef
+# PHP assumes pthreads are not working when cross-compiling,
+# needed for Apache-MPM worker
+PHP_POST_PATCH_HOOKS += PHP_FIX_THREADS_DETECTION
+endif
+PHP_CONF_OPTS += \
+	--with-apxs2=$(STAGING_DIR)/usr/bin/apxs \
+	--with-config-file-path=/etc/apache2 \
+	--with-config-file-scan-dir=/etc/apache2/php \
+	--oldincludedir=$(STAGING_DIR)/usr/include \
+	--enable-pthreads \
+	--localstatedir=/var
+PHP_DEPENDENCIES += apache
+endif
+
 ### Extensions
 PHP_CONF_OPTS += $(if $(BR2_PACKAGE_PHP_EXT_SOCKETS),--enable-sockets) \
 		$(if $(BR2_PACKAGE_PHP_EXT_POSIX),--enable-posix) \
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [Buildroot] [PATCH v2 08/16] package/apr-util: add optional dependency to openssl
  2014-10-05 17:38 ` [Buildroot] [PATCH v2 08/16] package/apr-util: add optional dependency to openssl Bernd Kuhls
@ 2014-10-05 18:39   ` Thomas Petazzoni
  2014-10-05 18:47     ` Bernd Kuhls
  2014-10-06 19:33     ` Bernd Kuhls
  0 siblings, 2 replies; 21+ messages in thread
From: Thomas Petazzoni @ 2014-10-05 18:39 UTC (permalink / raw)
  To: buildroot

Dear Bernd Kuhls,

On Sun,  5 Oct 2014 19:38:56 +0200, Bernd Kuhls wrote:

> +ifeq ($(BR2_PACKAGE_OPENSSL),y)
> +APR_UTIL_CONF_OPTS += --with-crypto --with-openssl="$(STAGING_DIR)/usr"
> +APR_UTIL_DEPENDENCIES += openssl
> +else
> +APR_UTIL_CONF_OPTS += --without-ssl
> +endif

This looks weird, because there's no symmetry between --with-openssl
--with-crypto and --without-ssl. Isn't there an issue here?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Buildroot] [PATCH v2 08/16] package/apr-util: add optional dependency to openssl
  2014-10-05 18:39   ` Thomas Petazzoni
@ 2014-10-05 18:47     ` Bernd Kuhls
  2014-10-06 19:33     ` Bernd Kuhls
  1 sibling, 0 replies; 21+ messages in thread
From: Bernd Kuhls @ 2014-10-05 18:47 UTC (permalink / raw)
  To: buildroot

Thomas Petazzoni <thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8
@public.gmane.org> wrote in news:20141005203902.5d8c5dcf at free-electrons.com:

>> +APR_UTIL_CONF_OPTS += --without-ssl
>> +endif
> 
> This looks weird, because there's no symmetry between --with-openssl
> --with-crypto and --without-ssl. Isn't there an issue here?

Hi,

oops, without-ssl should have been without-crypto.

To enable OpenSSL support

a) --with-crypto is needed to enable the crypto stuff as such and
b) --with-openssl to enable the use of the OpenSSL library itself.

I will update this patch in v3, thanks!

Regards, Bernd

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Buildroot] [PATCH v2 08/16] package/apr-util: add optional dependency to openssl
  2014-10-05 18:39   ` Thomas Petazzoni
  2014-10-05 18:47     ` Bernd Kuhls
@ 2014-10-06 19:33     ` Bernd Kuhls
  1 sibling, 0 replies; 21+ messages in thread
From: Bernd Kuhls @ 2014-10-06 19:33 UTC (permalink / raw)
  To: buildroot

Thomas Petazzoni <thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8
@public.gmane.org> wrote in news:20141005203902.5d8c5dcf at free-electrons.com:

> This looks weird, because there's no symmetry between --with-openssl
> --with-crypto and --without-ssl. Isn't there an issue here?

Hi Thomas,

I sent v3 of this patch: http://patchwork.ozlabs.org/patch/396912/
and superseeded the buggy version in patchworks.

Is it ok to only send a single patch and not the whole series again? This 
patch does not depend on the other patches of the apache/php series.

Regards, Bernd

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Buildroot] [PATCH v2 00/16] New package Apache including mod_php
  2014-10-05 17:38 [Buildroot] [PATCH v2 00/16] New package Apache including mod_php Bernd Kuhls
                   ` (15 preceding siblings ...)
  2014-10-05 17:39 ` [Buildroot] [PATCH v2 16/16] package/php: Add Apache support Bernd Kuhls
@ 2014-10-26 21:53 ` Thomas Petazzoni
  16 siblings, 0 replies; 21+ messages in thread
From: Thomas Petazzoni @ 2014-10-26 21:53 UTC (permalink / raw)
  To: buildroot

Dear Bernd Kuhls,

On Sun,  5 Oct 2014 19:38:48 +0200, Bernd Kuhls wrote:

> Bernd Kuhls (16):
>   package/apr: Fix detection of rlimit and large file support
>   package/apr-util: Add expat hard-dependency
>   package/apr-util: Remove unused dependencies to neon and zlib
>   package/apr-util: make sqlite optional
>   package/apr-util: add optional dependency to berkeleydb
>   package/apr-util: add optional dependency to gdbm
>   package/apr-util: add optional dependency to mysql

All applied.

>   package/apr-util: add optional dependency to openssl

I've applied this one, but the v3 you've sent.

>   package/php: Add support for GD module
>   package/php: Add support for mcrypt module
>   package/php: Add support for mbstring module
>   package/apr: Bump version to 1.5.1
>   package/apr: Fix for Apache when listening to multiple ports
>   package/apr-util: Bump version to 1.5.4

All applied.

>   Apache: New package
>   package/php: Add Apache support

I haven't applied those patches, not enough time to review/test them
yet.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2014-10-26 21:53 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-05 17:38 [Buildroot] [PATCH v2 00/16] New package Apache including mod_php Bernd Kuhls
2014-10-05 17:38 ` [Buildroot] [PATCH v2 01/16] package/apr: Fix detection of rlimit and large file support Bernd Kuhls
2014-10-05 17:38 ` [Buildroot] [PATCH v2 02/16] package/apr-util: Add expat hard-dependency Bernd Kuhls
2014-10-05 17:38 ` [Buildroot] [PATCH v2 03/16] package/apr-util: Remove unused dependencies to neon and zlib Bernd Kuhls
2014-10-05 17:38 ` [Buildroot] [PATCH v2 04/16] package/apr-util: make sqlite optional Bernd Kuhls
2014-10-05 17:38 ` [Buildroot] [PATCH v2 05/16] package/apr-util: add optional dependency to berkeleydb Bernd Kuhls
2014-10-05 17:38 ` [Buildroot] [PATCH v2 06/16] package/apr-util: add optional dependency to gdbm Bernd Kuhls
2014-10-05 17:38 ` [Buildroot] [PATCH v2 07/16] package/apr-util: add optional dependency to mysql Bernd Kuhls
2014-10-05 17:38 ` [Buildroot] [PATCH v2 08/16] package/apr-util: add optional dependency to openssl Bernd Kuhls
2014-10-05 18:39   ` Thomas Petazzoni
2014-10-05 18:47     ` Bernd Kuhls
2014-10-06 19:33     ` Bernd Kuhls
2014-10-05 17:38 ` [Buildroot] [PATCH v2 09/16] package/php: Add support for GD module Bernd Kuhls
2014-10-05 17:38 ` [Buildroot] [PATCH v2 10/16] package/php: Add support for mcrypt module Bernd Kuhls
2014-10-05 17:38 ` [Buildroot] [PATCH v2 11/16] package/php: Add support for mbstring module Bernd Kuhls
2014-10-05 17:39 ` [Buildroot] [PATCH v2 12/16] package/apr: Bump version to 1.5.1 Bernd Kuhls
2014-10-05 17:39 ` [Buildroot] [PATCH v2 13/16] package/apr: Fix for Apache when listening to multiple ports Bernd Kuhls
2014-10-05 17:39 ` [Buildroot] [PATCH v2 14/16] package/apr-util: Bump version to 1.5.4 Bernd Kuhls
2014-10-05 17:39 ` [Buildroot] [PATCH v2 15/16] Apache: New package Bernd Kuhls
2014-10-05 17:39 ` [Buildroot] [PATCH v2 16/16] package/php: Add Apache support Bernd Kuhls
2014-10-26 21:53 ` [Buildroot] [PATCH v2 00/16] New package Apache including mod_php Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox