Use cmake and remove patches for zstd

This commit is contained in:
Wildan M 2026-06-07 03:32:27 +07:00
parent 9dac14c07f
commit dd9f6f9fc8
No known key found for this signature in database
GPG Key ID: 01AC53185C679C79
2 changed files with 3 additions and 21 deletions

View File

@ -1,15 +0,0 @@
diff -ruwN source/programs/platform.h source-new/programs/platform.h
--- source/programs/platform.h 2025-02-19 07:04:24.000000000 +0700
+++ source-new/programs/platform.h 2025-07-21 22:52:07.716447723 +0700
@@ -109,6 +109,11 @@
#endif /* PLATFORM_POSIX_VERSION */
+#if defined(__redox__)
+/* TODO: AT_FDCWD && utimensat must be defined to conform _POSIX_VERSION */
+# define PLATFORM_POSIX_VERSION 1
+#endif
+
#if PLATFORM_POSIX_VERSION > 1
/* glibc < 2.26 may not expose struct timespec def without this.
* See issue #1920. */

View File

@ -1,17 +1,14 @@
[source] [source]
tar = "https://github.com/facebook/zstd/releases/download/v1.5.7/zstd-1.5.7.tar.gz" tar = "https://github.com/facebook/zstd/releases/download/v1.5.7/zstd-1.5.7.tar.gz"
blake3 = "730dca31244abd219e995f03a55d95b2cfb4b3e16cda055a79fa6f30a4f0e1db" blake3 = "730dca31244abd219e995f03a55d95b2cfb4b3e16cda055a79fa6f30a4f0e1db"
patches = [
"01_redox.patch"
]
[build] [build]
template = "custom" template = "custom"
script = """ script = """
DYNAMIC_STATIC_INIT DYNAMIC_STATIC_INIT
rsync -av --delete "${COOKBOOK_SOURCE}/" ./
# TODO: fPIC is the default on linux but not on redox and # TODO: fPIC is the default on linux but not on redox and
# required by llvm21 as zstd statically linked there # required by llvm21 as zstd statically linked there
export CPPFLAGS="$CPPFLAGS -fPIC" export CPPFLAGS="$CPPFLAGS -fPIC"
${COOKBOOK_MAKE} COOKBOOK_SOURCE="$COOKBOOK_SOURCE/build/cmake"
${COOKBOOK_MAKE} install DESTDIR="${COOKBOOK_STAGE}" prefix="/usr" cookbook_cmake
""" """