Files
haikuports/dev-lang/php/php8-8.5.2.recipe
2026-01-23 13:38:32 +01:00

179 lines
4.8 KiB
Bash

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-2024 PHP Group"
LICENSE="PHP License v3.01"
REVISION="1"
SOURCE_URI="https://php.net/get/php-$portVersion.tar.bz2/from/this/mirror"
CHECKSUM_SHA256="f7efdeccc3a810b18920692306536b99a3ba86610dbd0795a296cf77d3fb3a06"
SOURCE_FILENAME="php-$portVersion.tar.bz2"
SOURCE_DIR="php-$portVersion"
PATCHES="php8-$portVersion.patchset"
ADDITIONAL_FILES="userlaunch.in"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
GLOBAL_WRITABLE_FILES="
settings/php8 directory keep-old
"
commandSuffix=$secondaryArchSuffix
commandBinDir=$binDir
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
PROVIDES="
php8$secondaryArchSuffix = $portVersion
cmd:pear$commandSuffix
cmd:peardev$commandSuffix
cmd:pecl$commandSuffix
cmd:phar$commandSuffix
cmd:phar.phar$commandSuffix
cmd:php$commandSuffix
cmd:phpdbg$commandSuffix
cmd:php_cgi$commandSuffix
cmd:php_config$commandSuffix
cmd:phpize$commandSuffix
cmd:php_fpm$commandSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libbz2$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libedit$secondaryArchSuffix
lib:libfreetype$secondaryArchSuffix
lib:libgd$secondaryArchSuffix
lib:libicuuc$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
lib:libjpeg$secondaryArchSuffix
lib:libnghttp2$secondaryArchSuffix
lib:libonig$secondaryArchSuffix
lib:libpcre2_8$secondaryArchSuffix
lib:libpng16$secondaryArchSuffix
lib:libsqlite3$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libwebp$secondaryArchSuffix
lib:libxml2$secondaryArchSuffix
lib:libz$secondaryArchSuffix
lib:libzip$secondaryArchSuffix
"
CONFLICTS="
php$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libbz2$secondaryArchSuffix
devel:libcrypto$secondaryArchSuffix
devel:libcurl$secondaryArchSuffix
devel:libedit$secondaryArchSuffix
devel:libfreetype$secondaryArchSuffix
devel:libgd$secondaryArchSuffix
devel:libicuuc$secondaryArchSuffix >= 74
devel:libintl$secondaryArchSuffix
devel:libjpeg$secondaryArchSuffix
devel:libnghttp2$secondaryArchSuffix
devel:libonig$secondaryArchSuffix
devel:libpcre2_8$secondaryArchSuffix
devel:libpng16$secondaryArchSuffix
devel:libpq$secondaryArchSuffix >= 16
devel:libsqlite3$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libwebp$secondaryArchSuffix
devel:libxml2$secondaryArchSuffix
devel:libz$secondaryArchSuffix
devel:libzip$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoreconf
cmd:awk
cmd:bison
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:sed
cmd:xargs
cmd:xml2_config$secondaryArchSuffix
"
BUILD()
{
./buildconf -f
runConfigure --omit-dirs "binDir sbinDir" ./configure \
--bindir=$commandBinDir \
--sbindir=$commandBinDir \
--sysconfdir=$settingsDir/php8 \
--with-config-file-path=$settingsDir/php8 \
--with-config-file-scan-dir=$settingsDir/php8 \
--disable-debug \
--disable-opcache \
--enable-bcmath \
--enable-calendar \
--enable-exif \
--enable-fpm \
--enable-ftp \
--enable-gd \
--enable-intl \
--enable-mbstring \
--enable-pcntl \
--enable-soap \
--enable-sockets \
--with-bz2 \
--with-curl \
--with-external-gd \
--with-external-pcre \
--with-freetype \
--with-gettext \
--with-jpeg \
--with-libedit \
--with-mysqli \
--with-openssl \
--with-webp \
--with-zip \
--with-zlib \
--without-iconv
make $jobArgs
}
INSTALL()
{
make install
rm -rf $libDir/build # Only garbage is installed here.
mkdir -p $dataDir/user_launch
sed \
-e "s|@APP@|php-fpm|" \
-e "s|@BIN@|$commandBinDir/php-fpm|" \
-e "s|@VERSION@|8|" \
$portDir/additional-files/userlaunch.in > $dataDir/user_launch/php-fpm
}
TEST()
{
# TEST RESULT SUMMARY
# ---------------------------------------------------------------------
# Exts skipped : 25 (com_dotnet, dba, dl_test, enchant, ffi, gmp, iconv, ldap, odbc, pdo_dblib, pdo_firebird, pdo_mysql, pdo_odbc, pdo_pgsql, pgsql, shmop, skeleton, snmp, sodium, sysvmsg, sysvsem, sysvshm, tidy, xsl, zend_test)
# Exts tested : 46
# ---------------------------------------------------------------------
# Number of tests : 21442 18369
# Tests borked : 1 ( 0.0%) --------
# Tests skipped : 3072 ( 14.3%) --------
# Tests warned : 1 ( 0.0%) ( 0.0%)
# Tests failed : 208 ( 1.0%) ( 1.1%)
# Expected fail : 9 ( 0.0%) ( 0.0%)
# Tests passed : 18151 ( 84.7%) ( 98.8%)
# ---------------------------------------------------------------------
# Time taken : 1477.279 seconds
make test
}