From 1719148744c6c538edf80af7b800f4434c9144b5 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Fri, 17 Oct 2014 13:24:14 +0200 Subject: [PATCH] Add recipe for php 5.6.2. * Testsuite triggers a scheduler KDL! --- dev-lang/php/patches/php-5.6.2.patchset | 35 ++++++++++++ dev-lang/php/php-5.6.2.recipe | 71 +++++++++++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 dev-lang/php/patches/php-5.6.2.patchset create mode 100644 dev-lang/php/php-5.6.2.recipe diff --git a/dev-lang/php/patches/php-5.6.2.patchset b/dev-lang/php/patches/php-5.6.2.patchset new file mode 100644 index 000000000..24a26835c --- /dev/null +++ b/dev-lang/php/patches/php-5.6.2.patchset @@ -0,0 +1,35 @@ +From ab052deefe2d7bb24449c4f0c2baf536551ef43c Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +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 + diff --git a/dev-lang/php/php-5.6.2.recipe b/dev-lang/php/php-5.6.2.recipe new file mode 100644 index 000000000..900527ab3 --- /dev/null +++ b/dev-lang/php/php-5.6.2.recipe @@ -0,0 +1,71 @@ +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://fr2.php.net/get/php-5.6.2.tar.bz2/from/this/mirror" +SRC_FILENAME="php-$portVersion.tar.bz2" + +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 +} +