php7: fix php build issues with musl headers (fixes #4263)
authorPhilip Prindeville <redacted>
Fri, 14 Apr 2017 18:51:15 +0000 (12:51 -0600)
committerMichael Heimpold <redacted>
Mon, 17 Apr 2017 19:58:32 +0000 (21:58 +0200)
MUSL is complaining about <sys/poll.h> instead of <poll.h>.

Signed-off-by: Philip Prindeville <redacted>
[ Replaced the *-t1lib filtering stuff by simply removing the
left-over configure option ]

Signed-off-by: Michael Heimpold <redacted>
lang/php7/Makefile
lang/php7/patches/1008-fix-musl-sys-headers.patch [new file with mode: 0644]

index f01ea1b8d2d4a6a97b85be9cc645e9e33c3c069b..feb7ad1ead589a5e7631f8e0eb851f6f379e5109 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=php
 PKG_VERSION:=7.1.4
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
 
@@ -143,6 +143,9 @@ define Package/php7-fpm/description
   This package contains the FastCGI Process Manager of the PHP7 interpreter.
 endef
 
+# not everything groks --disable-nls
+DISABLE_NLS:=
+
 CONFIGURE_ARGS+= \
        --enable-cli \
        --enable-cgi \
@@ -216,7 +219,6 @@ ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-gd),)
        --with-jpeg-dir="$(STAGING_DIR)/usr" \
        --with-png-dir="$(STAGING_DIR)/usr" \
        --without-xpm-dir \
-       --without-t1lib \
        --enable-gd-native-ttf \
        --disable-gd-jis-conv
 else
diff --git a/lang/php7/patches/1008-fix-musl-sys-headers.patch b/lang/php7/patches/1008-fix-musl-sys-headers.patch
new file mode 100644 (file)
index 0000000..f636a36
--- /dev/null
@@ -0,0 +1,66 @@
+--- a/configure.in     2017-04-14 11:53:48.345481008 -0600
++++ b/configure.in     2017-04-14 11:58:47.887644651 -0600
+@@ -497,6 +497,7 @@
+ locale.h \
+ monetary.h \
+ netdb.h \
++poll.h \
+ pwd.h \
+ resolv.h \
+ signal.h \
+@@ -509,7 +510,6 @@
+ sys/file.h \
+ sys/mman.h \
+ sys/mount.h \
+-sys/poll.h \
+ sys/resource.h \
+ sys/select.h \
+ sys/socket.h \
+--- a/main/php_network.h       2017-04-11 09:37:35.000000000 -0600
++++ b/main/php_network.h       2017-04-14 12:00:00.736168983 -0600
+@@ -122,8 +122,8 @@
+ /* uncomment this to debug poll(2) emulation on systems that have poll(2) */
+ /* #define PHP_USE_POLL_2_EMULATION 1 */
+-#if defined(HAVE_SYS_POLL_H) && defined(HAVE_POLL)
+-# include <sys/poll.h>
++#if defined(HAVE_POLL_H) && defined(HAVE_POLL)
++# include <poll.h>
+ typedef struct pollfd php_pollfd;
+ #else
+ typedef struct _php_pollfd {
+--- a/main/network.c   2017-04-11 09:37:35.000000000 -0600
++++ b/main/network.c   2017-04-14 11:59:44.528052372 -0600
+@@ -51,8 +51,8 @@
+ #ifdef HAVE_SYS_SELECT_H
+ #include <sys/select.h>
+ #endif
+-#if HAVE_SYS_POLL_H
+-#include <sys/poll.h>
++#if HAVE_POLL_H
++#include <poll.h>
+ #endif
+ #if defined(NETWARE)
+--- a/main/fastcgi.c   2017-04-11 09:37:35.000000000 -0600
++++ b/main/fastcgi.c   2017-04-14 12:01:06.924644901 -0600
+@@ -76,8 +76,8 @@
+ # include <netdb.h>
+ # include <signal.h>
+-# if defined(HAVE_SYS_POLL_H) && defined(HAVE_POLL)
+-#  include <sys/poll.h>
++# if defined(HAVE_POLL_H) && defined(HAVE_POLL)
++#  include <poll.h>
+ # endif
+ # if defined(HAVE_SYS_SELECT_H)
+ #  include <sys/select.h>
+@@ -1430,7 +1430,7 @@
+                               break;
+ #else
+                               if (req->fd >= 0) {
+-#if defined(HAVE_SYS_POLL_H) && defined(HAVE_POLL)
++#if defined(HAVE_POLL_H) && defined(HAVE_POLL)
+                                       struct pollfd fds;
+                                       int ret;
git clone https://git.99rst.org/PROJECT