mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-21 19:20:08 +02:00
php: enable more features.
This commit is contained in:
186
dev-lang/php/patches/php-5.6.4.patch
Normal file
186
dev-lang/php/patches/php-5.6.4.patch
Normal file
@@ -0,0 +1,186 @@
|
||||
From a6c749bea2f66db568d9868e302fc030f1ce1980 Mon Sep 17 00:00:00 2001
|
||||
From: Augustin Cavalier <waddlesplash@gmail.com>
|
||||
Date: Thu, 15 Jan 2015 20:35:37 -0500
|
||||
Subject: [PATCH] php: fixes to work on Haiku.
|
||||
|
||||
C code changes by Adrien, build system changes by me.
|
||||
---
|
||||
acinclude.m4 | 2 +-
|
||||
aclocal.m4 | 2 +-
|
||||
ext/curl/config.m4 | 6 +++---
|
||||
ext/date/php_date.c | 2 --
|
||||
ext/gd/config.m4 | 12 ++++++------
|
||||
ext/standard/microtime.c | 2 +-
|
||||
ext/zip/config.m4 | 8 ++++----
|
||||
ext/zlib/config0.m4 | 10 +++++-----
|
||||
8 files changed, 21 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/acinclude.m4 b/acinclude.m4
|
||||
index 81dc0db..42dca5e 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 189149f..390dd21 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..07b940e 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/date/php_date.c b/ext/date/php_date.c
|
||||
index bf29a56..17d2446 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/gd/config.m4 b/ext/gd/config.m4
|
||||
index 446c242..e81cc94 100644
|
||||
--- a/ext/gd/config.m4
|
||||
+++ b/ext/gd/config.m4
|
||||
@@ -50,12 +50,12 @@ 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
|
||||
@@ -102,7 +102,7 @@ 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
|
||||
+ test -f $i/develop/headers/jpeglib.h && GD_JPEG_DIR=$i && break
|
||||
done
|
||||
|
||||
if test -z "$GD_JPEG_DIR"; then
|
||||
@@ -127,7 +127,7 @@ 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
|
||||
+ test -f $i/develop/headers/png.h && GD_PNG_DIR=$i && break
|
||||
done
|
||||
|
||||
if test -z "$GD_PNG_DIR"; then
|
||||
diff --git a/ext/standard/microtime.c b/ext/standard/microtime.c
|
||||
index fe22366..14298fb 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);
|
||||
diff --git a/ext/zip/config.m4 b/ext/zip/config.m4
|
||||
index a21ad2d..c6dad41 100644
|
||||
--- a/ext/zip/config.m4
|
||||
+++ b/ext/zip/config.m4
|
||||
@@ -20,12 +20,12 @@ 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
|
||||
diff --git a/ext/zlib/config0.m4 b/ext/zlib/config0.m4
|
||||
index ebf67cc..607f6df 100644
|
||||
--- a/ext/zlib/config0.m4
|
||||
+++ b/ext/zlib/config0.m4
|
||||
@@ -22,12 +22,12 @@ if test "$PHP_ZLIB" != "no" || test "$PHP_ZLIB_DIR" != "no"; then
|
||||
fi
|
||||
else
|
||||
for i in /usr/local /usr $PHP_ZLIB_DIR; do
|
||||
- if test -f $i/include/zlib/zlib.h; then
|
||||
+ 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 +42,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])
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
From ab052deefe2d7bb24449c4f0c2baf536551ef43c Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@gmail.com>
|
||||
Date: Fri, 17 Oct 2014 13:22:16 +0200
|
||||
Subject: port php 5.3 patch from 2011.
|
||||
|
||||
|
||||
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
|
||||
index 64a40a2..6b0d782 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 fe22366..14298fb 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);
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
@@ -5,7 +5,7 @@ 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"
|
||||
REVISION="1"
|
||||
REVISION="2"
|
||||
COPYRIGHT="2001-2014 PHP Group"
|
||||
LICENSE="PHP License v3.01"
|
||||
ARCHITECTURES="x86_gcc2"
|
||||
@@ -13,7 +13,7 @@ ARCHITECTURES="x86_gcc2"
|
||||
SRC_URI="https://php.net/get/php-$portVersion.tar.bz2/from/this/mirror"
|
||||
CHECKSUM_SHA256="576f9001b612f5ddc22f447311bbec321e2c959b6a52259d664c4ba04ef044f1"
|
||||
SRC_FILENAME="php-$portVersion.tar.bz2"
|
||||
PATCHES="php-$portVersion.patchset"
|
||||
PATCHES="php-$portVersion.patch"
|
||||
|
||||
PROVIDES="
|
||||
php = $portVersion
|
||||
@@ -34,28 +34,68 @@ GLOBAL_WRITABLE_FILES="
|
||||
|
||||
REQUIRES="
|
||||
haiku
|
||||
icu
|
||||
lib:libxml2
|
||||
lib:libz
|
||||
lib:libssl
|
||||
lib:libcrypto
|
||||
lib:libcurl
|
||||
|
||||
lib:libpng16
|
||||
lib:libjpeg
|
||||
lib:libfreetype
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
icu_devel
|
||||
devel:libxml2
|
||||
devel:libz
|
||||
devel:libssl
|
||||
devel:libcrypto
|
||||
devel:libcurl
|
||||
|
||||
devel:libpng16
|
||||
devel:libjpeg
|
||||
devel:libfreetype
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
haiku_devel
|
||||
cmd:autoreconf
|
||||
cmd:awk
|
||||
cmd:bison
|
||||
cmd:dos2unix
|
||||
cmd:gcc
|
||||
cmd:make
|
||||
cmd:pkg_config
|
||||
cmd:freetype_config
|
||||
cmd:xml2_config
|
||||
cmd:icu_config
|
||||
"
|
||||
|
||||
PATCH()
|
||||
{
|
||||
dos2unix Zend/zend_language_scanner.l
|
||||
dos2unix Zend/zend_language_scanner.c
|
||||
}
|
||||
|
||||
BUILD()
|
||||
{
|
||||
runConfigure ./configure --with-libxml-dir=/system --without-iconv
|
||||
dos2unix Zend/zend_language_scanner.l
|
||||
dos2unix Zend/zend_language_scanner.c
|
||||
autoreconf
|
||||
runConfigure ./configure \
|
||||
--with-libxml-dir=/system \
|
||||
--with-zlib-dir=/system \
|
||||
--with-openssl \
|
||||
--with-curl \
|
||||
--with-gd \
|
||||
--with-png-dir=/system \
|
||||
--with-jpeg-dir=/system \
|
||||
--with-freetype-dir=/system \
|
||||
--disable-opcache \
|
||||
--enable-intl \
|
||||
--enable-ftp \
|
||||
--enable-soap \
|
||||
--without-iconv \
|
||||
--disable-debug
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user