summaryrefslogtreecommitdiff
path: root/data/php/m4.diff
blob: 788a196ac3cb054fd354f1ad2a30a05924d3873a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
diff -ur php-7.3.4/aclocal.m4 php-7.3.4+iPhone/aclocal.m4
--- php-7.3.4/aclocal.m4	2019-04-02 13:48:51.000000000 +0000
+++ php-7.3.4+iPhone/aclocal.m4	2019-05-01 14:53:45.935424715 +0000
@@ -2534,54 +2534,10 @@
 dnl Common setup macro for libxml
 dnl
 AC_DEFUN([PHP_SETUP_LIBXML], [
-  found_libxml=no
-
-  dnl First try to find xml2-config
-  AC_CACHE_CHECK([for xml2-config path], ac_cv_php_xml2_config_path,
-  [
-    for i in $PHP_LIBXML_DIR /usr/local /usr; do
-      if test -x "$i/bin/xml2-config"; then
-        ac_cv_php_xml2_config_path="$i/bin/xml2-config"
-        break
-      fi
-    done
-  ])
-
-  if test -x "$ac_cv_php_xml2_config_path"; then
-    XML2_CONFIG="$ac_cv_php_xml2_config_path"
-    libxml_full_version=`$XML2_CONFIG --version`
-    ac_IFS=$IFS
-    IFS="."
-    set $libxml_full_version
-    IFS=$ac_IFS
-    LIBXML_VERSION=`expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3`
-    if test "$LIBXML_VERSION" -ge "2006011"; then
-      found_libxml=yes
-      LIBXML_LIBS=`$XML2_CONFIG --libs`
-      LIBXML_INCS=`$XML2_CONFIG --cflags`
-    else
-      AC_MSG_ERROR([libxml2 version 2.6.11 or greater required.])
-    fi
-  fi
-
-  dnl If xml2-config fails, try pkg-config
-  if test "$found_libxml" = "no"; then
-    if test -z "$PKG_CONFIG"; then
-      AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
-    fi
-
-    dnl If pkg-config is found try using it
-    if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists libxml-2.0; then
-      if $PKG_CONFIG --atleast-version=2.6.11 libxml-2.0; then
-        found_libxml=yes
-        LIBXML_LIBS=`$PKG_CONFIG --libs libxml-2.0`
-        LIBXML_INCS=`$PKG_CONFIG --cflags-only-I libxml-2.0`
-      else
-        AC_MSG_ERROR([libxml2 version 2.6.11 or greater required.])
-      fi
-    fi
-  fi
+  found_libxml=yes
 
+  LIBXML_LIBS="-lxml2"
+  LIBXML_INCS="-I${PKG_ROOT:-/nonexist}/usr/include/libxml2"
   if test "$found_libxml" = "yes"; then
     PHP_EVAL_LIBLINE($LIBXML_LIBS, $1)
     PHP_EVAL_INCLINE($LIBXML_INCS)
diff -ur php-7.3.4/ext/fileinfo/config.m4 php-7.3.4+iPhone/ext/fileinfo/config.m4
--- php-7.3.4/ext/fileinfo/config.m4	2019-04-02 13:48:51.000000000 +0000
+++ php-7.3.4+iPhone/ext/fileinfo/config.m4	2019-05-01 13:34:15.528408824 +0000
@@ -14,39 +14,9 @@
     libmagic/buffer.c"
 
   AC_MSG_CHECKING([for strcasestr])
-  AC_RUN_IFELSE([AC_LANG_SOURCE([[
-#include <string.h>
-#include <strings.h>
-#include <stdlib.h>
-
-int main(void)
-{
-        char *s0, *s1, *ret;
-
-        s0 = (char *) malloc(42);
-        s1 = (char *) malloc(8);
-
-        memset(s0, 'X', 42);
-        s0[24] = 'Y';
-        s0[26] = 'Z';
-        s0[41] = '\0';
-        memset(s1, 'x', 8);
-        s1[0] = 'y';
-        s1[2] = 'Z';
-        s1[7] = '\0';
-
-        ret = strcasestr(s0, s1);
-
-        return !(NULL != ret);
-}
-  ]])],[
-    dnl using the platform implementation
-    AC_MSG_RESULT(yes)
-  ],[
     AC_MSG_RESULT(no)
     AC_MSG_NOTICE(using libmagic strcasestr implementation)
     libmagic_sources="$libmagic_sources libmagic/strcasestr.c"
-  ],[AC_MSG_RESULT([skipped, cross-compiling])])
 
   PHP_NEW_EXTENSION(fileinfo, fileinfo.c $libmagic_sources, $ext_shared,,-I@ext_srcdir@/libmagic)
   PHP_ADD_BUILD_DIR($ext_builddir/libmagic)
diff -ur php-7.3.4/ext/iconv/config.m4 php-7.3.4+iPhone/ext/iconv/config.m4
--- php-7.3.4/ext/iconv/config.m4	2019-04-02 13:48:54.000000000 +0000
+++ php-7.3.4+iPhone/ext/iconv/config.m4	2019-05-01 13:34:15.528408824 +0000
@@ -13,7 +13,7 @@
 
   if test "$iconv_avail" != "no"; then
     if test -z "$ICONV_DIR"; then
-      for i in /usr/local /usr; do
+      for i in "${PKG_ROOT}/usr"; do
         if test -f "$i/include/iconv.h" || test -f "$i/include/giconv.h"; then
           PHP_ICONV_PREFIX="$i"
           break
diff -ur php-7.3.4/ext/readline/config.m4 php-7.3.4+iPhone/ext/readline/config.m4
--- php-7.3.4/ext/readline/config.m4	2019-04-02 13:48:52.000000000 +0000
+++ php-7.3.4+iPhone/ext/readline/config.m4	2019-05-01 13:40:52.160420030 +0000
@@ -12,7 +12,7 @@
 fi
 
 if test "$PHP_READLINE" && test "$PHP_READLINE" != "no"; then
-  for i in $PHP_READLINE /usr/local /usr; do
+  for i in $PHP_READLINE; do
     test -f $i/include/readline/readline.h && READLINE_DIR=$i && break
   done
 
@@ -76,7 +76,7 @@
 
 elif test "$PHP_LIBEDIT" != "no"; then
 
-  for i in $PHP_LIBEDIT /usr/local /usr; do
+  for i in $PHP_LIBEDIT; do
     test -f $i/include/editline/readline.h && LIBEDIT_DIR=$i && break
   done
 
diff -ur php-7.3.4/ext/xml/config.m4 php-7.3.4+iPhone/ext/xml/config.m4
--- php-7.3.4/ext/xml/config.m4	2019-04-02 13:48:59.000000000 +0000
+++ php-7.3.4+iPhone/ext/xml/config.m4	2019-05-01 13:37:46.820400693 +0000
@@ -34,7 +34,7 @@
   dnl Check for expat only if --with-libexpat-dir is used.
   dnl
   if test "$PHP_LIBEXPAT_DIR" != "no"; then
-    for i in $PHP_XML $PHP_LIBEXPAT_DIR /usr /usr/local; do
+    for i in $PHP_XML $PHP_LIBEXPAT_DIR; do
       if test -f "$i/$PHP_LIBDIR/libexpat.a" || test -f "$i/$PHP_LIBDIR/libexpat.$SHLIB_SUFFIX_NAME"; then
         EXPAT_DIR=$i
         break
diff -ur php-7.3.4/ext/xsl/config.m4 php-7.3.4+iPhone/ext/xsl/config.m4
--- php-7.3.4/ext/xsl/config.m4	2019-04-02 13:48:57.000000000 +0000
+++ php-7.3.4+iPhone/ext/xsl/config.m4	2019-05-01 13:34:15.532408824 +0000
@@ -14,49 +14,16 @@
     AC_MSG_ERROR([XSL extension requires DOM extension, add --enable-dom])
   fi
 
-  for i in $PHP_XSL /usr/local /usr; do
-    if test -x "$i/bin/xslt-config"; then
-      XSLT_CONFIG=$i/bin/xslt-config
-      break
-    fi
-  done
-
-  if test -z "$XSLT_CONFIG"; then
-    AC_MSG_ERROR([xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution])
-  else
-    libxslt_full_version=`$XSLT_CONFIG --version`
-    ac_IFS=$IFS
-    IFS="."
-    set $libxslt_full_version
-    IFS=$ac_IFS
-    LIBXSLT_VERSION=`expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3`
-    if test "$LIBXSLT_VERSION" -ge "1001000"; then
-      XSL_LIBS=`$XSLT_CONFIG --libs`
-      XSL_INCS=`$XSLT_CONFIG --cflags`
-      PHP_EVAL_LIBLINE($XSL_LIBS, XSL_SHARED_LIBADD)
-      PHP_EVAL_INCLINE($XSL_INCS)
-
-      AC_MSG_CHECKING([for EXSLT support])
-      for i in $PHP_XSL /usr/local /usr; do
-        if test -r "$i/include/libexslt/exslt.h"; then
+        XSL_LIBS=-lxslt
+        XSL_INCS="${PKG_ROOT}"/usr/include/libxslt
+        if test -r "${PKG_ROOT}/usr/include/libexslt/exslt.h" || test -r "$PHP_XSL/usr/include/libexslt/exslt.h"; then
           PHP_XSL_EXSL_DIR=$i
           break
         fi
-      done
-      if test -z "$PHP_XSL_EXSL_DIR"; then
-        AC_MSG_RESULT(not found)
-      else
         AC_MSG_RESULT(found)
         PHP_ADD_LIBRARY_WITH_PATH(exslt, $PHP_XSL_EXSL_DIR/$PHP_LIBDIR, XSL_SHARED_LIBADD)
         PHP_ADD_INCLUDE($PHP_XSL_EXSL_DIR/include)
         AC_DEFINE(HAVE_XSL_EXSLT,1,[ ])
-      fi
-    else
-      AC_MSG_ERROR([libxslt version 1.1.0 or greater required.])
-    fi
-
-
-  fi
 
   AC_DEFINE(HAVE_XSL,1,[ ])
   PHP_NEW_EXTENSION(xsl, php_xsl.c xsltprocessor.c, $ext_shared)
diff -ur php-7.3.4/ext/zlib/config0.m4 php-7.3.4+iPhone/ext/zlib/config0.m4
--- php-7.3.4/ext/zlib/config0.m4	2019-04-02 13:48:52.000000000 +0000
+++ php-7.3.4+iPhone/ext/zlib/config0.m4	2019-05-01 13:39:49.992411350 +0000
@@ -19,7 +19,7 @@
       ZLIB_INCDIR=$ZLIB_DIR/include
     fi
   else
-    for i in /usr/local /usr $PHP_ZLIB_DIR; do
+    for i in $PHP_ZLIB_DIR; do
       if test -f $i/include/zlib/zlib.h; then
         ZLIB_DIR=$i
         ZLIB_INCDIR=$i/include/zlib