This commit is contained in:
Jeremy Soller 2025-09-08 08:03:00 -06:00
commit d601dc2acb
No known key found for this signature in database
GPG Key ID: 670FDFB5428E05CA
8 changed files with 66 additions and 36 deletions

View File

@ -6,13 +6,10 @@ patches = ["redox.patch"]
[build]
template = "custom"
script = """
DYNAMIC_INIT
rsync -av --delete "${COOKBOOK_SOURCE}/" ./
# No configure provided
COOKBOOK_CONFIGURE="true"
COOKBOOK_CONFIGURE_FLAGS=""
export CPPFLAGS="${CPPFLAGS} -D_REDOX"
cookbook_configure
${COOKBOOK_MAKE}
${COOKBOOK_MAKE} install DESTDIR="${COOKBOOK_STAGE}" prefix="/usr"
"""

View File

@ -9,4 +9,5 @@ script = """
DYNAMIC_INIT
rsync -av --delete "${COOKBOOK_SOURCE}/" ./
${COOKBOOK_MAKE}
${COOKBOOK_MAKE} install DESTDIR="${COOKBOOK_STAGE}" prefix="/usr"
"""

View File

@ -0,0 +1,12 @@
[source]
tar = "https://download.samba.org/pub/rsync/src/rsync-3.4.1.tar.gz"
patches = ["redox.patch"]
[build]
template = "configure"
dependencies = [
"zstd",
"lz4",
"openssl1",
"xxhash",
]

View File

@ -0,0 +1,25 @@
diff -ruwN source/rsync.h source-new/rsync.h
--- source/rsync.h 2025-01-16 02:21:54.000000000 +0700
+++ source-new/rsync.h 2025-09-08 12:18:06.427647717 +0700
@@ -483,6 +483,21 @@
#include <sys/sysmacros.h>
#endif
+#ifdef __redox__
+
+// no sys/sysmacros.h, probably no problem
+#include <sys/types.h>
+#define major(dev) (0)
+#define minor(dev) (0)
+#define makedev(maj, min) (0)
+
+// no openat yet
+#undef O_NOFOLLOW
+#undef O_DIRECTORY
+#undef AT_FDCWD
+
+#endif
+
#ifdef MAKEDEV_TAKES_3_ARGS
#define MAKEDEV(devmajor,devminor) makedev(0,devmajor,devminor)
#else

View File

@ -1,4 +1,4 @@
#TODO: Can be built, but ends in breakpoint trap
#TODO compiling, not tested further
[source]
git = "https://github.com/willnode/go"
branch = "go-1.25-redox"

View File

@ -1,20 +1,22 @@
#TODO probably wrong script, see https://github.com/ziglang/zig/wiki/Building-Zig-From-Source
#TODO compiling, not tested further
[source]
tar = "https://ziglang.org/download/0.10.1/zig-0.10.1.tar.xz"
git = "https://github.com/willnode/zig"
branch = "zig-0.15-redox"
[build]
template = "custom"
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
DYNAMIC_INIT
rsync -av --delete "${COOKBOOK_SOURCE}"/* ./
export ZIG_HOST_TARGET_CFLAGS="$CFLAGS"
export ZIG_HOST_TARGET_LDFLAGS="$LDFLAGS"
export ZIG_HOST_TARGET_CC="${TARGET}-gcc"
export ZIG_HOST_TARGET_TRIPLE="${TARGET%%-*}-redox"
unset AR AS CC CXX LD LDFLAGS NM OBJCOPY OBJDUMP RANLIB READELF RUSTFLAGS STRIP
cc bootstrap.c -o ./bootstrap
./bootstrap
mkdir -p "${COOKBOOK_STAGE}"/usr/bin
cp ./zig2 "${COOKBOOK_STAGE}"/usr/bin/zig
"""

View File

@ -1,6 +1,11 @@
#TODO missing script for building, lacking build instructions
#TODO promote
[source]
git = "https://github.com/Cyan4973/xxHash"
rev = "bbb27a5efb85b92a0486cf361a8635715a53f6ba"
rev = "bab7e27f4c6ae4efbb83dd99ae8a554423571635" # 0.8.3-dev (cmake support)
[build]
template = "custom"
script = """
DYNAMIC_INIT
COOKBOOK_SOURCE="${COOKBOOK_SOURCE}"/build/cmake
cookbook_cmake
"""

View File

@ -1,12 +0,0 @@
#TODO make all dependencies work
[source]
tar = "https://download.samba.org/pub/rsync/src/rsync-3.2.7.tar.gz"
[build]
template = "configure"
dependencies = [
"zstd",
"zlib",
"lz4",
"popt",
"xxhash",
]