mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
Add recipe for older php 5.4.34.
Unfortunately it panics in the same way as 5.6.2.
This commit is contained in:
@@ -1,166 +0,0 @@
|
||||
diff -urN php-5.2.9/acinclude.m4 php-5.2.9-haiku/acinclude.m4
|
||||
--- php-5.2.9/acinclude.m4 2009-03-01 12:13:19.000000000 +0000
|
||||
+++ php-5.2.9-haiku/acinclude.m4 2009-03-01 12:56:26.000000000 +0000
|
||||
@@ -2332,7 +2332,7 @@
|
||||
if test "$found_openssl" = "no"; then
|
||||
|
||||
if test "$PHP_OPENSSL_DIR" = "yes"; then
|
||||
- PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
|
||||
+ PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl /boot/common/ssl"
|
||||
fi
|
||||
|
||||
for i in $PHP_OPENSSL_DIR; do
|
||||
@@ -2444,7 +2444,7 @@
|
||||
dnl
|
||||
if test "$found_iconv" = "no"; then
|
||||
|
||||
- for i in $PHP_ICONV /usr/local /usr; do
|
||||
+ for i in $PHP_ICONV /usr/local /usr /boot/common; do
|
||||
if test -r $i/include/giconv.h; then
|
||||
AC_DEFINE(HAVE_GICONV_H, 1, [ ])
|
||||
ICONV_DIR=$i
|
||||
@@ -2500,7 +2500,7 @@
|
||||
AC_DEFUN([PHP_SETUP_LIBXML], [
|
||||
AC_CACHE_CHECK([for xml2-config path], ac_cv_php_xml2_config_path,
|
||||
[
|
||||
- for i in $PHP_LIBXML_DIR /usr/local /usr; do
|
||||
+ for i in $PHP_LIBXML_DIR /usr/local /boot/common /usr; do
|
||||
if test -x "$i/bin/xml2-config"; then
|
||||
ac_cv_php_xml2_config_path="$i/bin/xml2-config"
|
||||
break
|
||||
diff -urN php-5.2.9/aclocal.m4 php-5.2.9-haiku/aclocal.m4
|
||||
--- php-5.2.9/aclocal.m4 2009-03-01 12:12:52.000000000 +0000
|
||||
+++ php-5.2.9-haiku/aclocal.m4 2009-03-01 14:55:37.000000000 +0000
|
||||
@@ -4142,6 +4142,15 @@
|
||||
shlibpath_var=LIBRARY_PATH
|
||||
;;
|
||||
|
||||
+haiku*)
|
||||
+ version_type=linux
|
||||
+ need_lib_prefix=no
|
||||
+ need_version=no
|
||||
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||
+ soname_spec='${libname}${release}${shared_ext}$major'
|
||||
+ shlibpath_var=LD_LIBRARY_PATH
|
||||
+ hardcode_into_libs=yes;;
|
||||
+
|
||||
bsdi[[45]]*)
|
||||
version_type=linux
|
||||
need_version=no
|
||||
diff -urN php-5.2.9/configure.in php-5.2.9-haiku/configure.in
|
||||
--- php-5.2.9/configure.in 2009-03-01 12:13:18.000000000 +0000
|
||||
+++ php-5.2.9-haiku/configure.in 2009-03-01 14:55:53.000000000 +0000
|
||||
@@ -345,6 +345,11 @@
|
||||
PHP_CHECK_FUNC(gethostbyaddr, nsl)
|
||||
PHP_CHECK_FUNC(yp_get_default_domain, nsl)
|
||||
|
||||
+PHP_CHECK_FUNC(socket, network)
|
||||
+PHP_CHECK_FUNC(socketpair, network)
|
||||
+PHP_CHECK_FUNC(gethostname, network)
|
||||
+PHP_CHECK_FUNC(gethostbyaddr, network)
|
||||
+
|
||||
PHP_CHECK_FUNC(dlopen, dl)
|
||||
if test "$ac_cv_func_dlopen" = "yes"; then
|
||||
AC_DEFINE(HAVE_LIBDL, 1, [ ])
|
||||
diff -urN php-5.2.9/ext/spl/spl_directory.c php-5.2.9-haiku/ext/spl/spl_directory.c
|
||||
--- php-5.2.9/ext/spl/spl_directory.c 2009-03-01 12:07:38.000000000 +0000
|
||||
+++ php-5.2.9-haiku/ext/spl/spl_directory.c 2009-03-01 14:56:24.000000000 +0000
|
||||
@@ -849,7 +849,7 @@
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
-#if (!defined(__BEOS__) && !defined(NETWARE) && HAVE_REALPATH) || defined(ZTS)
|
||||
+#if ((defined(__HAIKU__) || !defined(__BEOS__)) && !defined(NETWARE) && HAVE_REALPATH) || defined(ZTS)
|
||||
/* {{{ proto string SplFileInfo::getRealPath()
|
||||
Return the resolved path */
|
||||
SPL_METHOD(SplFileInfo, getRealPath)
|
||||
@@ -1433,7 +1433,7 @@
|
||||
SPL_ME(SplFileInfo, isDir, NULL, ZEND_ACC_PUBLIC)
|
||||
SPL_ME(SplFileInfo, isLink, NULL, ZEND_ACC_PUBLIC)
|
||||
SPL_ME(SplFileInfo, getLinkTarget, NULL, ZEND_ACC_PUBLIC)
|
||||
-#if (!defined(__BEOS__) && !defined(NETWARE) && HAVE_REALPATH) || defined(ZTS)
|
||||
+#if ((defined(__HAIKU__) || !defined(__BEOS__)) && !defined(NETWARE) && HAVE_REALPATH) || defined(ZTS)
|
||||
SPL_ME(SplFileInfo, getRealPath, NULL, ZEND_ACC_PUBLIC)
|
||||
#endif
|
||||
SPL_ME(SplFileInfo, getFileInfo, arginfo_info_optinalFileClass, ZEND_ACC_PUBLIC)
|
||||
diff -urN php-5.2.9/ext/standard/basic_functions.c php-5.2.9-haiku/ext/standard/basic_functions.c
|
||||
--- php-5.2.9/ext/standard/basic_functions.c 2009-03-01 12:12:25.000000000 +0000
|
||||
+++ php-5.2.9-haiku/ext/standard/basic_functions.c 2009-03-01 14:57:12.000000000 +0000
|
||||
@@ -1395,7 +1395,7 @@
|
||||
ZEND_ARG_INFO(0, enclosure)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
-#if (!defined(__BEOS__) && !defined(NETWARE) && HAVE_REALPATH) || defined(ZTS)
|
||||
+#if ((defined(__HAIKU__) || !defined(__BEOS__)) && !defined(NETWARE) && HAVE_REALPATH) || defined(ZTS)
|
||||
static
|
||||
ZEND_BEGIN_ARG_INFO(arginfo_realpath, 0)
|
||||
ZEND_ARG_INFO(0, path)
|
||||
@@ -3574,7 +3574,7 @@
|
||||
|
||||
PHP_FALIAS(socket_get_status, stream_get_meta_data, arginfo_stream_get_meta_data)
|
||||
|
||||
-#if (!defined(__BEOS__) && !defined(NETWARE) && HAVE_REALPATH) || defined(ZTS)
|
||||
+#if ((defined(__HAIKU__) || !defined(__BEOS__)) && !defined(NETWARE) && HAVE_REALPATH) || defined(ZTS)
|
||||
PHP_FE(realpath, arginfo_realpath)
|
||||
#endif
|
||||
|
||||
diff -urN php-5.2.9/ext/standard/file.c php-5.2.9-haiku/ext/standard/file.c
|
||||
--- php-5.2.9/ext/standard/file.c 2009-03-01 12:12:25.000000000 +0000
|
||||
+++ php-5.2.9-haiku/ext/standard/file.c 2009-03-01 14:57:31.000000000 +0000
|
||||
@@ -2384,7 +2384,7 @@
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
-#if (!defined(__BEOS__) && !defined(NETWARE) && HAVE_REALPATH) || defined(ZTS)
|
||||
+#if ((defined(__HAIKU__) || !defined(__BEOS__)) && !defined(NETWARE) && HAVE_REALPATH) || defined(ZTS)
|
||||
/* {{{ proto string realpath(string path)
|
||||
Return the resolved path */
|
||||
PHP_FUNCTION(realpath)
|
||||
diff -urN php-5.2.9/ext/standard/file.h php-5.2.9-haiku/ext/standard/file.h
|
||||
--- php-5.2.9/ext/standard/file.h 2009-03-01 14:57:50.000000000 +0000
|
||||
+++ php-5.2.9-haiku/ext/standard/file.h 2009-03-01 12:12:25.000000000 +0000
|
||||
@@ -60,7 +60,7 @@
|
||||
PHP_FUNCTION(flock);
|
||||
PHP_FUNCTION(fd_set);
|
||||
PHP_FUNCTION(fd_isset);
|
||||
-#if ((defined(__HAIKU__) || !defined(__BEOS__)) && !defined(NETWARE) && HAVE_REALPATH) || defined(ZTS)
|
||||
+#if (!defined(__BEOS__) && !defined(NETWARE) && HAVE_REALPATH) || defined(ZTS)
|
||||
PHP_FUNCTION(realpath);
|
||||
#endif
|
||||
#ifdef HAVE_FNMATCH
|
||||
diff -urN php-5.2.9/ext/standard/filestat.c php-5.2.9-haiku/ext/standard/filestat.c
|
||||
--- php-5.2.9/ext/standard/filestat.c 2009-03-01 12:12:26.000000000 +0000
|
||||
+++ php-5.2.9-haiku/ext/standard/filestat.c 2009-03-01 14:58:07.000000000 +0000
|
||||
@@ -898,7 +898,7 @@
|
||||
case S_IFDIR: RETURN_STRING("dir", 1);
|
||||
case S_IFBLK: RETURN_STRING("block", 1);
|
||||
case S_IFREG: RETURN_STRING("file", 1);
|
||||
-#if defined(S_IFSOCK) && !defined(ZEND_WIN32)&&!defined(__BEOS__)
|
||||
+#if defined(S_IFSOCK) && !defined(ZEND_WIN32) && (defined(__HAIKU__) || !defined(__BEOS__))
|
||||
case S_IFSOCK: RETURN_STRING("socket", 1);
|
||||
#endif
|
||||
}
|
||||
diff -urN php-5.2.9/ext/standard/microtime.c php-5.2.9-haiku/ext/standard/microtime.c
|
||||
--- php-5.2.9/ext/standard/microtime.c 2009-03-01 12:12:26.000000000 +0000
|
||||
+++ php-5.2.9-haiku/ext/standard/microtime.c 2009-03-01 12:06:02.000000000 +0000
|
||||
@@ -132,7 +132,7 @@
|
||||
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 -urN php-5.2.9/main/network.c php-5.2.9-haiku/main/network.c
|
||||
--- php-5.2.9/main/network.c 2009-03-01 12:12:46.000000000 +0000
|
||||
+++ php-5.2.9-haiku/main/network.c 2009-03-01 14:58:23.000000000 +0000
|
||||
@@ -268,7 +268,7 @@
|
||||
#define O_NONBLOCK O_NDELAY
|
||||
#endif
|
||||
|
||||
-#if !defined(__BEOS__)
|
||||
+#if !defined(__BEOS__) || defined(__HAIKU__)
|
||||
# define HAVE_NON_BLOCKING_CONNECT 1
|
||||
# ifdef PHP_WIN32
|
||||
typedef u_long php_non_blocking_flags_t;
|
||||
35
dev-lang/php/patches/php-5.4.34.patchset
Normal file
35
dev-lang/php/patches/php-5.4.34.patchset
Normal file
@@ -0,0 +1,35 @@
|
||||
From 252717d13be2d08cfc4546b0135b01e35f4e8082 Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@gmail.com>
|
||||
Date: Mon, 20 Oct 2014 11:29:08 +0200
|
||||
Subject: Fix build on Haiku.
|
||||
|
||||
|
||||
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
|
||||
index 92e9480..0172809 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
|
||||
|
||||
73
dev-lang/php/php-5.4.34.recipe
Normal file
73
dev-lang/php/php-5.4.34.recipe
Normal file
@@ -0,0 +1,73 @@
|
||||
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="http://www.php.net"
|
||||
REVISION="1"
|
||||
COPYRIGHT="2001-2014 PHP Group"
|
||||
LICENSE="PHP License v3.01"
|
||||
ARCHITECTURES="x86_gcc2"
|
||||
|
||||
SRC_URI="http://php.net/get/php-$portVersion.tar.bz2/from/this/mirror"
|
||||
SRC_FILENAME="php-$portVersion.tar.bz2"
|
||||
CHECKSUM_SHA256="57d4ea10f0c18b096a7c8fd0a98dcbe40c8f4dc94453fd3ca0a10e35fb2f8234"
|
||||
PATCHES="php-$portVersion.patchset"
|
||||
|
||||
PROVIDES="
|
||||
php = $portVersion
|
||||
cmd:pear
|
||||
cmd:peardev
|
||||
cmd:pecl
|
||||
cmd:phar
|
||||
cmd:phar.phar
|
||||
cmd:php
|
||||
cmd:php_cgi
|
||||
cmd:php_config
|
||||
cmd:phpize
|
||||
"
|
||||
|
||||
GLOBAL_WRITABLE_FILES="
|
||||
settings/pear.conf keep-old
|
||||
"
|
||||
|
||||
REQUIRES="
|
||||
haiku >= $haikuVersion
|
||||
lib:libxml2
|
||||
lib:libz
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
devel:libxml2
|
||||
devel:libz
|
||||
"
|
||||
|
||||
BUILD_PREREQUIRES="
|
||||
haiku_devel >= $haikuVersion
|
||||
cmd:awk
|
||||
cmd:bison
|
||||
cmd:dos2unix
|
||||
cmd:gcc
|
||||
cmd:make
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
runConfigure ./configure --with-libxml-dir=/system --without-iconv
|
||||
dos2unix Zend/zend_language_scanner.l
|
||||
dos2unix Zend/zend_language_scanner.c
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make test
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user