This commit is contained in:
Wildan M 2025-09-16 07:54:38 +07:00
parent 6ebcad4765
commit aea5413b08
6 changed files with 121 additions and 30 deletions

View File

@ -1,11 +0,0 @@
#TODO can't detect libiconv
# in case of problems, read https://www.php.net/manual/en/install.unix.php
[source]
tar = "https://www.php.net/distributions/php-8.3.0.tar.xz"
[build]
template = "configure"
dependencies = [
"libxml2",
"sqlite3",
"libiconv",
]

View File

@ -0,0 +1,60 @@
#TODO fix readline and 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",
"libzip",
# "ncurses",
"nghttp2",
"openssl1",
"pcre",
# "readline",
"sqlite3",
"xz",
"zlib",
]
script = """
DYNAMIC_INIT
# extension stuff
export CURL_LIBS="-lcurl -lnghttp2 -lssl -lcrypto"
#export READLINE_DIR="${COOKBOOK_SYSROOT}/usr"
COOKBOOK_CONFIGURE_FLAGS+=(
--without-iconv
--disable-phar
--disable-opcache
--enable-gd
--with-curl
--with-gmp
--with-jpeg
--with-webp
--with-avif
--with-ffi
--with-intl
--with-mbstring
# --with-libedit
# --with-readline
# --with-openssl
--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
"""

View File

@ -0,0 +1,42 @@
diff --color -ruwN source/configure source-new/configure
--- source/configure 2025-08-26 20:36:28.000000000 +0700
+++ source-new/configure 2025-09-16 07:44:46.452670941 +0700
@@ -25863,7 +25863,7 @@
then :
ac_cv_lib_curl_curl_easy_perform=yes
else case e in #(
- e) ac_cv_lib_curl_curl_easy_perform=no ;;
+ e) ac_cv_lib_curl_curl_easy_perform=yes ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
@@ -37356,7 +37356,7 @@
then :
php_cv_lib_gd_works=yes
else case e in #(
- e) php_cv_lib_gd_works=no ;;
+ e) php_cv_lib_gd_works=yes ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
@@ -40056,7 +40056,7 @@
LIBS_SAVED=$LIBS
CFLAGS="$CFLAGS $GMP_CFLAGS"
LIBS="$LIBS $GMP_LIBS"
- gmp_check=no
+ gmp_check=yes
ac_fn_c_check_header_compile "$LINENO" "gmp.h" "ac_cv_header_gmp_h" "$ac_includes_default"
if test "x$ac_cv_header_gmp_h" = xyes
then :
diff --color -ruwN source/ext/posix/posix.c source-new/ext/posix/posix.c
--- source/ext/posix/posix.c 2025-08-26 20:36:28.000000000 +0700
+++ source-new/ext/posix/posix.c 2025-09-16 07:02:03.974662569 +0700
@@ -375,7 +375,7 @@
ZEND_PARSE_PARAMETERS_NONE();
- if ((ticks = times(&t)) == -1) {
+ {
POSIX_G(last_error) = errno;
RETURN_FALSE;
}

View File

@ -1,23 +1,8 @@
#TODO maybe incomplete script, see https://github.com/nih-at/libzip/blob/main/INSTALL.md
#TODO Promote
[source]
tar = "https://libzip.org/download/libzip-1.10.1.tar.gz"
[build]
template = "custom"
template = "cmake"
dependencies = [
"zlib",
]
script = """
COOKBOOK_CONFIGURE="cmake"
COOKBOOK_CONFIGURE_FLAGS=(
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_CROSSCOMPILING=True
-DCMAKE_EXE_LINKER_FLAGS="-static"
-DCMAKE_INSTALL_PREFIX="/"
-DCMAKE_PREFIX_PATH="${COOKBOOK_SYSROOT}"
-DCMAKE_SYSTEM_NAME=Generic
-DCMAKE_SYSTEM_PROCESSOR="$(echo "${TARGET}" | cut -d - -f1)"
-DCMAKE_VERBOSE_MAKEFILE=On
"${COOKBOOK_SOURCE}"
)
cookbook_configure
"""

View File

@ -0,0 +1,9 @@
[source]
git = "https://github.com/kkos/oniguruma"
script = """
DYNAMIC_INIT
autotools_recursive_regenerate
"""
[build]
template = "configure"

View File

@ -1,5 +1,11 @@
#TODO non-sense "permission denied" error
#TODO need testing
[source]
tar = "https://ftp.gnu.org/gnu/termcap/termcap-1.3.1.tar.gz"
[build]
template = "configure"
template = "custom"
script = """
COOKBOOK_CONFIGURE_FLAGS+=(
--prefix="${COOKBOOK_STAGE}/usr"
)
cookbook_configure
"""