php: bump version

php5 is not maintained and does not build with current openssl versions
This commit is contained in:
Adrien Destugues
2020-08-04 22:58:49 +02:00
parent e8368cc778
commit 212b723d14
4 changed files with 409 additions and 360 deletions

View File

@@ -1,245 +0,0 @@
From 780770111a16f86a16b0ab7eb863be3a8f69da70 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Tue, 16 Jan 2018 21:32:56 +0100
Subject: Import old patch: build system.
diff --git a/acinclude.m4 b/acinclude.m4
index 3db7438..4eaacc6 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -762,7 +762,7 @@ AC_DEFUN([PHP_REQUIRE_CXX],[
if test -z "$php_cxx_done"; then
AC_PROG_CXX
AC_PROG_CXXCPP
- PHP_ADD_LIBRARY(stdc++)
+ PHP_ADD_LIBRARY(stdc++.r4)
php_cxx_done=yes
fi
])
diff --git a/aclocal.m4 b/aclocal.m4
index 47f05b2..1d546e7 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -762,7 +762,7 @@ AC_DEFUN([PHP_REQUIRE_CXX],[
if test -z "$php_cxx_done"; then
AC_PROG_CXX
AC_PROG_CXXCPP
- PHP_ADD_LIBRARY(stdc++)
+ PHP_ADD_LIBRARY(stdc++.r4)
php_cxx_done=yes
fi
])
diff --git a/ext/curl/config.m4 b/ext/curl/config.m4
index 2f82c34..b6a09d9 100644
--- a/ext/curl/config.m4
+++ b/ext/curl/config.m4
@@ -10,8 +10,8 @@ if test "$PHP_CURL" != "no"; then
CURL_DIR=$PHP_CURL
else
AC_MSG_CHECKING(for cURL in default path)
- for i in /usr/local /usr; do
- if test -r $i/include/curl/easy.h; then
+ for i in /usr/local /usr /system; do
+ if test -r $i/develop/headers/curl/easy.h; then
CURL_DIR=$i
AC_MSG_RESULT(found in $i)
break
@@ -22,7 +22,7 @@ if test "$PHP_CURL" != "no"; then
if test -z "$CURL_DIR"; then
AC_MSG_RESULT(not found)
AC_MSG_ERROR(Please reinstall the libcurl distribution -
- easy.h should be in <curl-dir>/include/curl/)
+ easy.h should be in <curl-dir>/develop/headers/curl/)
fi
CURL_CONFIG="curl-config"
diff --git a/ext/gd/config.m4 b/ext/gd/config.m4
index e643e52..517cf26 100644
--- a/ext/gd/config.m4
+++ b/ext/gd/config.m4
@@ -50,23 +50,23 @@ dnl
AC_DEFUN([PHP_GD_ZLIB],[
if test "$PHP_ZLIB_DIR" != "no" && test "$PHP_ZLIB_DIR" != "yes"; then
- if test -f "$PHP_ZLIB_DIR/include/zlib/zlib.h"; then
+ if test -f "$PHP_ZLIB_DIR/develop/headers/zlib/zlib.h"; then
PHP_ZLIB_DIR="$PHP_ZLIB_DIR"
- PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include/zlib"
- elif test -f "$PHP_ZLIB_DIR/include/zlib.h"; then
+ PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/develop/headers/zlib"
+ elif test -f "$PHP_ZLIB_DIR/develop/headers/zlib.h"; then
PHP_ZLIB_DIR="$PHP_ZLIB_DIR"
- PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include"
+ PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/develop/headers"
else
AC_MSG_ERROR([Can't find zlib headers under "$PHP_ZLIB_DIR"])
fi
else
- for i in /usr/local /usr; do
- if test -f "$i/include/zlib/zlib.h"; then
+ for i in /usr/local /usr /system; do
+ if test -f "$i/develop/headers/zlib/zlib.h"; then
PHP_ZLIB_DIR="$i"
- PHP_ZLIB_INCDIR="$i/include/zlib"
+ PHP_ZLIB_INCDIR="$i/develop/headers/zlib"
elif test -f "$i/include/zlib.h"; then
PHP_ZLIB_DIR="$i"
- PHP_ZLIB_INCDIR="$i/include"
+ PHP_ZLIB_INCDIR="$i/develop/headers"
fi
done
fi
@@ -101,8 +101,8 @@ AC_DEFUN([PHP_GD_VPX],[
AC_DEFUN([PHP_GD_JPEG],[
if test "$PHP_JPEG_DIR" != "no"; then
- for i in $PHP_JPEG_DIR /usr/local /usr; do
- test -f $i/include/jpeglib.h && GD_JPEG_DIR=$i && break
+ for i in $PHP_JPEG_DIR /usr/local /usr /system; do
+ test -f $i/develop/headers/jpeglib.h && GD_JPEG_DIR=$i && break
done
if test -z "$GD_JPEG_DIR"; then
@@ -126,8 +126,8 @@ AC_DEFUN([PHP_GD_JPEG],[
AC_DEFUN([PHP_GD_PNG],[
if test "$PHP_PNG_DIR" != "no"; then
- for i in $PHP_PNG_DIR /usr/local /usr; do
- test -f $i/include/png.h && GD_PNG_DIR=$i && break
+ for i in $PHP_PNG_DIR /usr/local /usr /system; do
+ test -f $i/develop/headers/png.h && GD_PNG_DIR=$i && break
done
if test -z "$GD_PNG_DIR"; then
diff --git a/ext/zip/config.m4 b/ext/zip/config.m4
index 845d446..3113459 100644
--- a/ext/zip/config.m4
+++ b/ext/zip/config.m4
@@ -20,23 +20,23 @@ if test "$PHP_ZIP" != "no"; then
dnl libzip, depends on zlib
if test "$PHP_ZLIB_DIR" != "no" && test "$PHP_ZLIB_DIR" != "yes"; then
- if test -f "$PHP_ZLIB_DIR/include/zlib/zlib.h"; then
+ if test -f "$PHP_ZLIB_DIR/develop/headers/zlib/zlib.h"; then
PHP_ZLIB_DIR="$PHP_ZLIB_DIR"
- PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include/zlib"
- elif test -f "$PHP_ZLIB_DIR/include/zlib.h"; then
+ PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/develop/headers/zlib"
+ elif test -f "$PHP_ZLIB_DIR/develop/headers/zlib.h"; then
PHP_ZLIB_DIR="$PHP_ZLIB_DIR"
- PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include"
+ PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/develop/headers"
else
AC_MSG_ERROR([Can not find zlib headers under "$PHP_ZLIB_DIR"])
fi
else
- for i in /usr/local /usr; do
- if test -f "$i/include/zlib/zlib.h"; then
+ for i in /usr/local /usr /system; do
+ if test -f "$i/develop/headers/zlib/zlib.h"; then
PHP_ZLIB_DIR="$i"
- PHP_ZLIB_INCDIR="$i/include/zlib"
- elif test -f "$i/include/zlib.h"; then
+ PHP_ZLIB_INCDIR="$i/develop/headers/zlib"
+ elif test -f "$i/develop/headers/zlib.h"; then
PHP_ZLIB_DIR="$i"
- PHP_ZLIB_INCDIR="$i/include"
+ PHP_ZLIB_INCDIR="$i/develop/headers"
fi
done
fi
--
2.16.4
From c836206cfc96e562d56e3c8fbd85a1d2916b37d9 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Tue, 16 Jan 2018 21:34:13 +0100
Subject: Import old patch: code changes.
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index 801208d..12170e3 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -33,8 +33,6 @@
#ifdef PHP_WIN32
static __inline __int64 php_date_llabs( __int64 i ) { return i >= 0? i: -i; }
-#elif defined(__GNUC__) && __GNUC__ < 3
-static __inline __int64_t php_date_llabs( __int64_t i ) { return i >= 0 ? i : -i; }
#else
static inline long long php_date_llabs( long long i ) { return i >= 0 ? i : -i; }
#endif
diff --git a/ext/standard/microtime.c b/ext/standard/microtime.c
index 982c83c..9e17082 100644
--- a/ext/standard/microtime.c
+++ b/ext/standard/microtime.c
@@ -131,7 +131,7 @@ PHP_FUNCTION(getrusage)
array_init(return_value);
#define PHP_RUSAGE_PARA(a) \
add_assoc_long(return_value, #a, usg.a)
-#if !defined( _OSD_POSIX) && !defined(__BEOS__) /* BS2000 has only a few fields in the rusage struct */
+#if !defined( _OSD_POSIX) && !defined(__BEOS__) && !defined(__HAIKU__) /* BS2000 has only a few fields in the rusage struct */
PHP_RUSAGE_PARA(ru_oublock);
PHP_RUSAGE_PARA(ru_inblock);
PHP_RUSAGE_PARA(ru_msgsnd);
--
2.16.4
From 59b8b431815c4416df3d9a242b2fb95ce09c9968 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Tue, 16 Jan 2018 21:58:37 +0100
Subject: More build system fixes
diff --git a/ext/zlib/config0.m4 b/ext/zlib/config0.m4
index ebf67cc..b53c7e2 100644
--- a/ext/zlib/config0.m4
+++ b/ext/zlib/config0.m4
@@ -13,21 +13,22 @@ if test "$PHP_ZLIB" != "no" || test "$PHP_ZLIB_DIR" != "no"; then
PHP_SUBST(ZLIB_SHARED_LIBADD)
if test "$PHP_ZLIB" != "yes" -a "$PHP_ZLIB" != "no"; then
- if test -f $PHP_ZLIB/include/zlib/zlib.h; then
+ if test -f $PHP_ZLIB/develop/headers/zlib/zlib.h; then
ZLIB_DIR=$PHP_ZLIB
- ZLIB_INCDIR=$ZLIB_DIR/include/zlib
- elif test -f $PHP_ZLIB/include/zlib.h; then
+ ZLIB_INCDIR=$ZLIB_DIR/develop/headers/zlib
+ elif test -f $PHP_ZLIB/develop/headers/zlib.h; then
ZLIB_DIR=$PHP_ZLIB
- ZLIB_INCDIR=$ZLIB_DIR/include
+ ZLIB_INCDIR=$ZLIB_DIR/develop/headers
fi
else
- for i in /usr/local /usr $PHP_ZLIB_DIR; do
- if test -f $i/include/zlib/zlib.h; then
+ for i in /usr/local /usr /system $PHP_ZLIB_DIR; do
+ echo $i
+ if test -f $i/develop/headers/zlib/zlib.h; then
ZLIB_DIR=$i
- ZLIB_INCDIR=$i/include/zlib
- elif test -f $i/include/zlib.h; then
+ ZLIB_INCDIR=$i/develop/headers/zlib
+ elif test -f $i/develop/headers/zlib.h; then
ZLIB_DIR=$i
- ZLIB_INCDIR=$i/include
+ ZLIB_INCDIR=$i/develop/headers
fi
done
fi
@@ -42,7 +43,7 @@ if test "$PHP_ZLIB" != "no" || test "$PHP_ZLIB_DIR" != "no"; then
esac
AC_MSG_CHECKING([for zlib version >= 1.2.0.4])
- ZLIB_VERSION=`$EGREP "define ZLIB_VERSION" $ZLIB_DIR/include/zlib.h | $SED -e 's/[[^0-9\.]]//g'`
+ ZLIB_VERSION=`$EGREP "define ZLIB_VERSION" $ZLIB_DIR/develop/headers/zlib.h | $SED -e 's/[[^0-9\.]]//g'`
AC_MSG_RESULT([$ZLIB_VERSION])
if test `echo $ZLIB_VERSION | $SED -e 's/[[^0-9]]/ /g' | $AWK '{print $1*1000000 + $2*10000 + $3*100 + $4}'` -lt 1020004; then
AC_MSG_ERROR([libz version greater or equal to 1.2.0.4 required])
--
2.16.4

View File

@@ -0,0 +1,298 @@
From 8b5d11f20b672d37d4d36b71e20eb843f7f3e7b8 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Tue, 4 Aug 2020 22:53:53 +0200
Subject: Build fixes
diff --git a/configure.ac b/configure.ac
index 437e556..b289b8b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -393,9 +393,9 @@ dnl Some systems (OpenServer 5) dislike -lsocket -lnsl, so we try to avoid -lnsl
dnl checks, if we already have the functions which are usually in libnsl. Also,
dnl uClibc will bark at linking with glibc's libnsl.
-PHP_CHECK_FUNC(socket, socket)
-PHP_CHECK_FUNC(socketpair, socket)
-PHP_CHECK_FUNC(htonl, socket)
+PHP_CHECK_FUNC(socket, network)
+PHP_CHECK_FUNC(socketpair, network)
+PHP_CHECK_FUNC(htonl, network)
PHP_CHECK_FUNC(gethostname, nsl)
PHP_CHECK_FUNC(gethostbyaddr, nsl)
PHP_CHECK_FUNC(dlopen, dl)
diff --git a/ext/fileinfo/libmagic/ascmagic.c b/ext/fileinfo/libmagic/ascmagic.c
index 0bc0cce..bbd925d 100644
--- a/ext/fileinfo/libmagic/ascmagic.c
+++ b/ext/fileinfo/libmagic/ascmagic.c
@@ -51,7 +51,7 @@ FILE_RCSID("@(#)$File: ascmagic.c,v 1.104 2019/05/07 02:27:11 christos Exp $")
#define ISSPC(x) ((x) == ' ' || (x) == '\t' || (x) == '\r' || (x) == '\n' \
|| (x) == 0x85 || (x) == '\f')
-private unsigned char *encode_utf8(unsigned char *, size_t, unichar *, size_t);
+private unsigned char *encode_utf8(unsigned char *, size_t, php_unichar *, size_t);
private size_t trim_nuls(const unsigned char *, size_t);
/*
@@ -70,7 +70,7 @@ trim_nuls(const unsigned char *buf, size_t nbytes)
protected int
file_ascmagic(struct magic_set *ms, const struct buffer *b, int text)
{
- unichar *ubuf = NULL;
+ php_unichar *ubuf = NULL;
size_t ulen = 0;
int rv = 1;
struct buffer bb;
@@ -103,7 +103,7 @@ file_ascmagic(struct magic_set *ms, const struct buffer *b, int text)
protected int
file_ascmagic_with_encoding(struct magic_set *ms,
- const struct buffer *b, unichar *ubuf, size_t ulen, const char *code,
+ const struct buffer *b, php_unichar *ubuf, size_t ulen, const char *code,
const char *type, int text)
{
struct buffer bb;
@@ -338,7 +338,7 @@ done:
* after end of string, or NULL if an invalid character is found.
*/
private unsigned char *
-encode_utf8(unsigned char *buf, size_t len, unichar *ubuf, size_t ulen)
+encode_utf8(unsigned char *buf, size_t len, php_unichar *ubuf, size_t ulen)
{
size_t i;
unsigned char *end = buf + len;
diff --git a/ext/fileinfo/libmagic/encoding.c b/ext/fileinfo/libmagic/encoding.c
index 121bbd7..2d4e8ce 100644
--- a/ext/fileinfo/libmagic/encoding.c
+++ b/ext/fileinfo/libmagic/encoding.c
@@ -44,14 +44,14 @@ FILE_RCSID("@(#)$File: encoding.c,v 1.20 2019/04/15 16:48:41 christos Exp $")
#include <stdlib.h>
-private int looks_ascii(const unsigned char *, size_t, unichar *, size_t *);
-private int looks_utf8_with_BOM(const unsigned char *, size_t, unichar *,
+private int looks_ascii(const unsigned char *, size_t, php_unichar *, size_t *);
+private int looks_utf8_with_BOM(const unsigned char *, size_t, php_unichar *,
size_t *);
-private int looks_utf7(const unsigned char *, size_t, unichar *, size_t *);
-private int looks_ucs16(const unsigned char *, size_t, unichar *, size_t *);
-private int looks_ucs32(const unsigned char *, size_t, unichar *, size_t *);
-private int looks_latin1(const unsigned char *, size_t, unichar *, size_t *);
-private int looks_extended(const unsigned char *, size_t, unichar *, size_t *);
+private int looks_utf7(const unsigned char *, size_t, php_unichar *, size_t *);
+private int looks_ucs16(const unsigned char *, size_t, php_unichar *, size_t *);
+private int looks_ucs32(const unsigned char *, size_t, php_unichar *, size_t *);
+private int looks_latin1(const unsigned char *, size_t, php_unichar *, size_t *);
+private int looks_extended(const unsigned char *, size_t, php_unichar *, size_t *);
private void from_ebcdic(const unsigned char *, size_t, unsigned char *);
#ifdef DEBUG_ENCODING
@@ -63,11 +63,11 @@ private void from_ebcdic(const unsigned char *, size_t, unsigned char *);
/*
* Try to determine whether text is in some character code we can
* identify. Each of these tests, if it succeeds, will leave
- * the text converted into one-unichar-per-character Unicode in
+ * the text converted into one-php_unichar-per-character Unicode in
* ubuf, and the number of characters converted in ulen.
*/
protected int
-file_encoding(struct magic_set *ms, const struct buffer *b, unichar **ubuf,
+file_encoding(struct magic_set *ms, const struct buffer *b, php_unichar **ubuf,
size_t *ulen, const char **code, const char **code_mime, const char **type)
{
const unsigned char *buf = CAST(const unsigned char *, b->fbuf);
@@ -75,7 +75,7 @@ file_encoding(struct magic_set *ms, const struct buffer *b, unichar **ubuf,
size_t mlen;
int rv = 1, ucs_type;
unsigned char *nbuf = NULL;
- unichar *udefbuf;
+ php_unichar *udefbuf;
size_t udeflen;
if (ubuf == NULL)
@@ -89,7 +89,7 @@ file_encoding(struct magic_set *ms, const struct buffer *b, unichar **ubuf,
*code_mime = "binary";
mlen = (nbytes + 1) * sizeof((*ubuf)[0]);
- if ((*ubuf = CAST(unichar *, ecalloc(CAST(size_t, 1), mlen))) == NULL) {
+ if ((*ubuf = CAST(php_unichar *, ecalloc(CAST(size_t, 1), mlen))) == NULL) {
file_oomem(ms, mlen);
goto done;
}
@@ -251,7 +251,7 @@ private char text_chars[256] = {
};
private int
-looks_ascii(const unsigned char *buf, size_t nbytes, unichar *ubuf,
+looks_ascii(const unsigned char *buf, size_t nbytes, php_unichar *ubuf,
size_t *ulen)
{
size_t i;
@@ -271,7 +271,7 @@ looks_ascii(const unsigned char *buf, size_t nbytes, unichar *ubuf,
}
private int
-looks_latin1(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen)
+looks_latin1(const unsigned char *buf, size_t nbytes, php_unichar *ubuf, size_t *ulen)
{
size_t i;
@@ -290,7 +290,7 @@ looks_latin1(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ule
}
private int
-looks_extended(const unsigned char *buf, size_t nbytes, unichar *ubuf,
+looks_extended(const unsigned char *buf, size_t nbytes, php_unichar *ubuf,
size_t *ulen)
{
size_t i;
@@ -321,11 +321,11 @@ looks_extended(const unsigned char *buf, size_t nbytes, unichar *ubuf,
* ubuf must be big enough!
*/
protected int
-file_looks_utf8(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen)
+file_looks_utf8(const unsigned char *buf, size_t nbytes, php_unichar *ubuf, size_t *ulen)
{
size_t i;
int n;
- unichar c;
+ php_unichar c;
int gotone = 0, ctrl = 0;
if (ubuf)
@@ -392,7 +392,7 @@ done:
* rest of the text.
*/
private int
-looks_utf8_with_BOM(const unsigned char *buf, size_t nbytes, unichar *ubuf,
+looks_utf8_with_BOM(const unsigned char *buf, size_t nbytes, php_unichar *ubuf,
size_t *ulen)
{
if (nbytes > 3 && buf[0] == 0xef && buf[1] == 0xbb && buf[2] == 0xbf)
@@ -402,7 +402,7 @@ looks_utf8_with_BOM(const unsigned char *buf, size_t nbytes, unichar *ubuf,
}
private int
-looks_utf7(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen)
+looks_utf7(const unsigned char *buf, size_t nbytes, php_unichar *ubuf, size_t *ulen)
{
if (nbytes > 4 && buf[0] == '+' && buf[1] == '/' && buf[2] == 'v')
switch (buf[3]) {
@@ -421,7 +421,7 @@ looks_utf7(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen)
}
private int
-looks_ucs16(const unsigned char *bf, size_t nbytes, unichar *ubf,
+looks_ucs16(const unsigned char *bf, size_t nbytes, php_unichar *ubf,
size_t *ulen)
{
int bigend;
@@ -444,10 +444,10 @@ looks_ucs16(const unsigned char *bf, size_t nbytes, unichar *ubf,
if (bigend)
ubf[(*ulen)++] = bf[i + 1]
- | (CAST(unichar, bf[i]) << 8);
+ | (CAST(php_unichar, bf[i]) << 8);
else
ubf[(*ulen)++] = bf[i]
- | (CAST(unichar, bf[i + 1]) << 8);
+ | (CAST(php_unichar, bf[i + 1]) << 8);
if (ubf[*ulen - 1] == 0xfffe)
return 0;
@@ -460,7 +460,7 @@ looks_ucs16(const unsigned char *bf, size_t nbytes, unichar *ubf,
}
private int
-looks_ucs32(const unsigned char *bf, size_t nbytes, unichar *ubf,
+looks_ucs32(const unsigned char *bf, size_t nbytes, php_unichar *ubf,
size_t *ulen)
{
int bigend;
@@ -482,15 +482,15 @@ looks_ucs32(const unsigned char *bf, size_t nbytes, unichar *ubf,
/* XXX fix to properly handle chars > 65536 */
if (bigend)
- ubf[(*ulen)++] = CAST(unichar, bf[i + 3])
- | (CAST(unichar, bf[i + 2]) << 8)
- | (CAST(unichar, bf[i + 1]) << 16)
- | (CAST(unichar, bf[i]) << 24);
+ ubf[(*ulen)++] = CAST(php_unichar, bf[i + 3])
+ | (CAST(php_unichar, bf[i + 2]) << 8)
+ | (CAST(php_unichar, bf[i + 1]) << 16)
+ | (CAST(php_unichar, bf[i]) << 24);
else
- ubf[(*ulen)++] = CAST(unichar, bf[i + 0])
- | (CAST(unichar, bf[i + 1]) << 8)
- | (CAST(unichar, bf[i + 2]) << 16)
- | (CAST(unichar, bf[i + 3]) << 24);
+ ubf[(*ulen)++] = CAST(php_unichar, bf[i + 0])
+ | (CAST(php_unichar, bf[i + 1]) << 8)
+ | (CAST(php_unichar, bf[i + 2]) << 16)
+ | (CAST(php_unichar, bf[i + 3]) << 24);
if (ubf[*ulen - 1] == 0xfffe)
return 0;
diff --git a/ext/fileinfo/libmagic/file.h b/ext/fileinfo/libmagic/file.h
index 698a307..5d4c86b 100644
--- a/ext/fileinfo/libmagic/file.h
+++ b/ext/fileinfo/libmagic/file.h
@@ -445,7 +445,7 @@ struct magic_set {
};
/* Type for Unicode characters */
-typedef unsigned long unichar;
+typedef unsigned long php_unichar;
#define FILE_T_LOCAL 1
#define FILE_T_WINDOWS 2
@@ -470,9 +470,9 @@ protected int file_zmagic(struct magic_set *, const struct buffer *,
protected int file_ascmagic(struct magic_set *, const struct buffer *,
int);
protected int file_ascmagic_with_encoding(struct magic_set *,
- const struct buffer *, unichar *, size_t, const char *, const char *, int);
+ const struct buffer *, php_unichar *, size_t, const char *, const char *, int);
protected int file_encoding(struct magic_set *, const struct buffer *,
- unichar **, size_t *, const char **, const char **, const char **);
+ php_unichar **, size_t *, const char **, const char **, const char **);
protected int file_is_json(struct magic_set *, const struct buffer *);
protected int file_is_tar(struct magic_set *, const struct buffer *);
protected int file_softmagic(struct magic_set *, const struct buffer *,
@@ -494,7 +494,7 @@ protected size_t file_mbswidth(const char *);
protected const char *file_getbuffer(struct magic_set *);
protected ssize_t sread(int, void *, size_t, int);
protected int file_check_mem(struct magic_set *, unsigned int);
-protected int file_looks_utf8(const unsigned char *, size_t, unichar *,
+protected int file_looks_utf8(const unsigned char *, size_t, php_unichar *,
size_t *);
protected size_t file_pstring_length_size(const struct magic *);
protected size_t file_pstring_get_length(const struct magic *, const char *);
diff --git a/ext/standard/microtime.c b/ext/standard/microtime.c
index 9bd45e1..fad5bd4 100644
--- a/ext/standard/microtime.c
+++ b/ext/standard/microtime.c
@@ -131,7 +131,7 @@ PHP_FUNCTION(getrusage)
#ifdef PHP_WIN32 /* Windows only implements a limited amount of fields from the rusage struct */
PHP_RUSAGE_PARA(ru_majflt);
PHP_RUSAGE_PARA(ru_maxrss);
-#elif !defined(_OSD_POSIX)
+#elif !defined(_OSD_POSIX) && !defined(__HAIKU__)
PHP_RUSAGE_PARA(ru_oublock);
PHP_RUSAGE_PARA(ru_inblock);
PHP_RUSAGE_PARA(ru_msgsnd);
diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c
index 0f1f036..2351b9c 100644
--- a/sapi/phpdbg/phpdbg.c
+++ b/sapi/phpdbg/phpdbg.c
@@ -1736,7 +1736,7 @@ phpdbg_main:
exit(0);
}
-#ifndef _WIN32
+#if !defined(_WIN32) && !defined(__HAIKU__)
zend_sigaction(SIGIO, &sigio_struct, NULL);
#endif
--
2.27.0

View File

@@ -1,115 +0,0 @@
SUMMARY="A popular general-purpose scripting language"
DESCRIPTION="PHP is a popular general-purpose scripting language that is \
especially suited to web development.
Fast, flexible and pragmatic, PHP powers everything from your blog to the most \
popular websites in the world."
HOMEPAGE="https://php.net/"
COPYRIGHT="2001-2018 PHP Group"
LICENSE="PHP License v3.01"
REVISION="7"
SOURCE_URI="https://php.net/get/php-$portVersion.tar.bz2/from/this/mirror"
CHECKSUM_SHA256="886ad63d05d94ea3e54322691aadea0cf1d4bcdb4450b02fe300e5b570788b23"
SOURCE_FILENAME="php-$portVersion.tar.bz2"
PATCHES="php-$portVersion.patchset"
ARCHITECTURES="x86_gcc2 ?x86 ?x86_64"
GLOBAL_WRITABLE_FILES="
settings/pear.conf keep-old
"
PROVIDES="
php = $portVersion
cmd:pear
cmd:peardev
cmd:pecl
cmd:phar
cmd:phar.phar
cmd:php
cmd:php_cgi
cmd:php_config
cmd:phpize
"
REQUIRES="
haiku
lib:libbz2
lib:libcrypto
lib:libcurl
lib:libfreetype
lib:libicuuc
lib:libjpeg
lib:libnghttp2
lib:libpcre
lib:libpng16
lib:libssl
lib:libxml2
lib:libz
"
BUILD_REQUIRES="
devel:libbz2
devel:libcrypto
devel:libcurl
devel:libfreetype
devel:libicuuc
devel:libjpeg
devel:libnghttp2
devel:libpcre
devel:libpng16
devel:libssl
devel:libxml2
devel:libz
"
BUILD_PREREQUIRES="
haiku_devel
cmd:autoreconf
cmd:awk
cmd:bison
cmd:dos2unix
cmd:freetype_config
cmd:gcc
cmd:icu_config
cmd:make
cmd:pkg_config
cmd:xml2_config
"
PATCH()
{
dos2unix Zend/zend_language_scanner.l
dos2unix Zend/zend_language_scanner.c
}
BUILD()
{
autoreconf
autoconf
runConfigure ./configure \
--with-libxml-dir=`finddir B_SYSTEM_DIRECTORY` \
--with-zlib-dir=`finddir B_SYSTEM_DIRECTORY` --with-zlib=shared \
--with-openssl \
--with-curl \
--with-gd \
--with-pcre-dir=`finddir B_SYSTEM_DIRECTORY` \
--with-png-dir=`finddir B_SYSTEM_DIRECTORY` \
--with-jpeg-dir=`finddir B_SYSTEM_DIRECTORY` \
--with-freetype-dir=`finddir B_SYSTEM_DIRECTORY` \
--disable-opcache \
--enable-intl \
--enable-ftp \
--enable-soap \
--without-iconv \
--disable-debug
make $jobArgs
}
INSTALL()
{
make install
rm -rf $libDir/build # Only garbage is installed here.
}
TEST()
{
make test
}

View File

@@ -0,0 +1,111 @@
SUMMARY="A popular general-purpose scripting language"
DESCRIPTION="PHP is a popular general-purpose scripting language that is \
especially suited to web development.
Fast, flexible and pragmatic, PHP powers everything from your blog to the most \
popular websites in the world."
HOMEPAGE="https://php.net/"
COPYRIGHT="2001-2020 PHP Group"
LICENSE="PHP License v3.01"
REVISION="1"
SOURCE_URI="https://php.net/get/php-$portVersion.tar.bz2/from/this/mirror"
CHECKSUM_SHA256="6a48d3a605c003b088984ceb53be5df1e698b8b35ddacadd12fe50f49c0e8062"
SOURCE_FILENAME="php-$portVersion.tar.bz2"
PATCHES="php-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64"
SECONDARY_ARCHITECTURES="x86"
commandSuffix=$secondaryArchSuffix
commandBinDir=$binDir
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
PROVIDES="
php = $portVersion
cmd:pear
cmd:peardev
cmd:pecl
cmd:phar
cmd:phar.phar
cmd:php
cmd:phpdbg
cmd:php_cgi
cmd:php_config
cmd:phpize
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libbz2$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libfreetype$secondaryArchSuffix
lib:libicuuc$secondaryArchSuffix
lib:libjpeg$secondaryArchSuffix
lib:libnghttp2$secondaryArchSuffix
lib:libpcre$secondaryArchSuffix
lib:libpng16$secondaryArchSuffix
lib:libsqlite3$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libxml2$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
devel:libbz2$secondaryArchSuffix
devel:libcrypto$secondaryArchSuffix
devel:libcurl$secondaryArchSuffix
devel:libfreetype$secondaryArchSuffix
devel:libicuuc$secondaryArchSuffix
devel:libjpeg$secondaryArchSuffix
devel:libnghttp2$secondaryArchSuffix
devel:libpcre$secondaryArchSuffix
devel:libpng16$secondaryArchSuffix
devel:libsqlite3$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libxml2$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel
cmd:aclocal
cmd:autoreconf
cmd:awk
cmd:bison
cmd:freetype_config$secondaryArchSuffix
cmd:gcc$secondaryArchSuffix
cmd:icu_config$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:xargs
cmd:xml2_config$secondaryArchSuffix
"
BUILD()
{
autoreconf
autoconf
runConfigure --omit-dirs binDir ./configure --bindir=$commandBinDir \
--with-zlib-dir=`finddir B_SYSTEM_DIRECTORY` --with-zlib=shared \
--with-openssl \
--with-curl \
--disable-opcache \
--enable-intl \
--enable-ftp \
--enable-soap \
--without-iconv \
--disable-debug
make $jobArgs
}
INSTALL()
{
make install
rm -rf $libDir/build # Only garbage is installed here.
}
TEST()
{
make test
}