From ed5b3ecd0dc9efa385704fc820a4ffd1defe5c49 Mon Sep 17 00:00:00 2001 From: X512 Date: Fri, 19 Jun 2020 18:39:45 +0900 Subject: [PATCH] php: update to 7.4.3 --- dev-lang/php/patches/php-7.4.3.patchset | 69 ++++++++++++++ dev-lang/php/php-7.4.3.recipe | 120 ++++++++++++++++++++++++ 2 files changed, 189 insertions(+) create mode 100644 dev-lang/php/patches/php-7.4.3.patchset create mode 100644 dev-lang/php/php-7.4.3.recipe diff --git a/dev-lang/php/patches/php-7.4.3.patchset b/dev-lang/php/patches/php-7.4.3.patchset new file mode 100644 index 0000000000..3e33b2c6a4 --- /dev/null +++ b/dev-lang/php/patches/php-7.4.3.patchset @@ -0,0 +1,69 @@ +From c1a329d4034f9524b832c892c7325fe631e1d27b Mon Sep 17 00:00:00 2001 +From: X512 +Date: Thu, 18 Jun 2020 14:34:05 +0900 +Subject: Haiku: build fixes + +--- + configure.ac | 1 + + ext/fileinfo/libmagic/file.h | 4 ++++ + ext/standard/microtime.c | 2 +- + sapi/phpdbg/phpdbg.c | 2 +- + 4 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 5219a5f2..d01b53f9 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -394,6 +394,7 @@ 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(socket, network) + PHP_CHECK_FUNC(socketpair, socket) + PHP_CHECK_FUNC(htonl, socket) + PHP_CHECK_FUNC(gethostname, nsl) +diff --git a/ext/fileinfo/libmagic/file.h b/ext/fileinfo/libmagic/file.h +index 698a307d..f69e60c7 100644 +--- a/ext/fileinfo/libmagic/file.h ++++ b/ext/fileinfo/libmagic/file.h +@@ -445,7 +445,11 @@ struct magic_set { + }; + + /* Type for Unicode characters */ ++#if defined(__HAIKU__) ++#include ++#else + typedef unsigned long unichar; ++#endif + + #define FILE_T_LOCAL 1 + #define FILE_T_WINDOWS 2 +diff --git a/ext/standard/microtime.c b/ext/standard/microtime.c +index 9bd45e18..fad5bd44 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 8b01acdf..fe253f83 100644 +--- a/sapi/phpdbg/phpdbg.c ++++ b/sapi/phpdbg/phpdbg.c +@@ -1735,7 +1735,7 @@ phpdbg_main: + } + + #ifndef _WIN32 +- zend_sigaction(SIGIO, &sigio_struct, NULL); ++ zend_sigaction(SIGPOLL, &sigio_struct, NULL); + #endif + + /* set remote flag to stop service shutting down upon quit */ +-- +2.27.0 + diff --git a/dev-lang/php/php-7.4.3.recipe b/dev-lang/php/php-7.4.3.recipe new file mode 100644 index 0000000000..da170e27a0 --- /dev/null +++ b/dev-lang/php/php-7.4.3.recipe @@ -0,0 +1,120 @@ +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="c1517ba49578fb2dcc64c73a3edc76d4fc507c4a7ac639981584cc7d3b4c6d14" +SOURCE_FILENAME="php-$portVersion.tar.bz2" +PATCHES="php-$portVersion.patchset" + +ARCHITECTURES="!x86_gcc2 x86 x86_64" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + php = $portVersion + cmd:phar$secondaryArchSuffix + cmd:phar.phar$secondaryArchSuffix + cmd:php$secondaryArchSuffix + cmd:php_cgi$secondaryArchSuffix + cmd:php_config$secondaryArchSuffix + cmd:phpdbg$secondaryArchSuffix + cmd:phpize$secondaryArchSuffix + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libcrypto$secondaryArchSuffix + lib:libcurl$secondaryArchSuffix + lib:libiconv$secondaryArchSuffix + lib:libicudata$secondaryArchSuffix + lib:libicui18n$secondaryArchSuffix + lib:libicuio$secondaryArchSuffix + lib:libicuuc$secondaryArchSuffix + lib:libjpeg$secondaryArchSuffix + lib:libonig$secondaryArchSuffix + lib:libpng16$secondaryArchSuffix + lib:libsqlite3$secondaryArchSuffix + lib:libssl$secondaryArchSuffix + lib:libwebp$secondaryArchSuffix + lib:libxml2$secondaryArchSuffix + lib:libz$secondaryArchSuffix + lib:libzip$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libbz2$secondaryArchSuffix + devel:libcrypto$secondaryArchSuffix + devel:libcurl$secondaryArchSuffix + devel:libfreetype$secondaryArchSuffix + devel:libicuuc$secondaryArchSuffix + devel:libjpeg$secondaryArchSuffix + devel:libnghttp2$secondaryArchSuffix + devel:libonig$secondaryArchSuffix + devel:libpcre$secondaryArchSuffix + devel:libpng16$secondaryArchSuffix + devel:libssl$secondaryArchSuffix + devel:libxml2$secondaryArchSuffix + devel:libz$secondaryArchSuffix + devel:libzip$secondaryArchSuffix + devel:libsqlite3$secondaryArchSuffix + devel:libwebp$secondaryArchSuffix + devel:libiconv$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:aclocal + cmd:automake + cmd:autoreconf + cmd:awk + cmd:bison + cmd:freetype_config + cmd:gcc$secondaryArchSuffix + cmd:icu_config$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix + cmd:xml2_config$secondaryArchSuffix + " + +BUILD() +{ + # libiconv detection workaround + rm -rf iconv + mkdir iconv + mkdir iconv/include + ln -s /boot/system/develop/lib${secondaryArchSubDir} iconv/lib + ln -s /boot/system/develop/headers${secondaryArchSubDir}/libcharset.h iconv/include/libcharset.h + ln -s /boot/system/develop/headers${secondaryArchSubDir}/localcharset.h iconv/include/localcharset.h + ln -s /boot/system/develop/headers${secondaryArchSubDir}/iconv.h iconv/include/iconv.h + + autoreconf + autoconf + runConfigure ./configure \ + --with-openssl \ + --with-curl \ + --enable-intl \ + --enable-ftp \ + --enable-soap \ + --enable-mbstring \ + --with-zlib \ + --with-zip \ + --with-iconv="$PWD/iconv" \ + --enable-gd \ + --with-webp \ + --with-jpeg + make $jobArgs +} + +INSTALL() +{ + make install + rm -rf $libDir/build # Only garbage is installed here. +} + +TEST() +{ + make test +}