redox/recipes/wip/dev/lang/php84/recipe.toml
2025-09-18 09:32:33 +07:00

71 lines
1.4 KiB
TOML

#TODO fix openssl
[source]
tar = "https://www.php.net/distributions/php-8.4.12.tar.xz"
patches = [
"redox.patch"
]
[build]
template = "custom"
dependencies = [
"curl",
"libffi",
"libgmp",
"libavif",
"libjpeg",
"libedit",
"libonig",
"libpng",
"libwebp",
"libxml2",
"libiconv",
"libzip",
"ncurses",
"nghttp2",
"openssl1",
"pcre",
"readline",
"sqlite3",
"xz",
"zlib",
]
script = """
DYNAMIC_INIT
export SUFFIX="84"
export CURL_LIBS="-lcurl -lnghttp2 -lssl -lcrypto"
COOKBOOK_CONFIGURE_FLAGS+=(
--program-suffix=${SUFFIX}
--sysconfdir=/etc
--with-config-file-path=/etc
--with-config-file-scan-dir=/etc/conf.d
--with-iconv="${COOKBOOK_SYSROOT}/usr"
--disable-phar # doesn't work cross compiling
--disable-opcache
# --enable-fpm # need times function
--enable-gd
--with-curl
--with-gmp
--with-jpeg
--with-webp
--with-avif
--with-ffi
--with-intl
--with-mbstring
--with-libedit
--with-readline
# --with-openssl # need 1.1.1
--with-zip
)
"${COOKBOOK_CONFIGURE}" "${COOKBOOK_CONFIGURE_FLAGS[@]}" "$@"
"${COOKBOOK_MAKE}" -j "${COOKBOOK_MAKE_JOBS}"
"${COOKBOOK_MAKE}" install \
INSTALL_ROOT="${COOKBOOK_STAGE}" \
datarootdir=/usr/share localstatedir=/var
for bin in "php-cgi" "php-config" "php" "phpdbg" "phpize"; do
ln -s "$bin$SUFFIX" ${COOKBOOK_STAGE}/usr/bin/$bin
done
"""