diff --git a/recipes/archives/lz4/recipe.toml b/recipes/archives/lz4/recipe.toml index bd1763e5..1aacf826 100644 --- a/recipes/archives/lz4/recipe.toml +++ b/recipes/archives/lz4/recipe.toml @@ -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" """ diff --git a/recipes/archives/zstd/recipe.toml b/recipes/archives/zstd/recipe.toml index e42573e0..90684850 100644 --- a/recipes/archives/zstd/recipe.toml +++ b/recipes/archives/zstd/recipe.toml @@ -9,4 +9,5 @@ script = """ DYNAMIC_INIT rsync -av --delete "${COOKBOOK_SOURCE}/" ./ ${COOKBOOK_MAKE} +${COOKBOOK_MAKE} install DESTDIR="${COOKBOOK_STAGE}" prefix="/usr" """ diff --git a/recipes/net/rsync/recipe.toml b/recipes/net/rsync/recipe.toml new file mode 100644 index 00000000..4a967f27 --- /dev/null +++ b/recipes/net/rsync/recipe.toml @@ -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", +] diff --git a/recipes/net/rsync/redox.patch b/recipes/net/rsync/redox.patch new file mode 100644 index 00000000..07a929b0 --- /dev/null +++ b/recipes/net/rsync/redox.patch @@ -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 + #endif + ++#ifdef __redox__ ++ ++// no sys/sysmacros.h, probably no problem ++#include ++#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 diff --git a/recipes/wip/dev/lang/go/recipe.toml b/recipes/wip/dev/lang/go/recipe.toml index 97b80f53..20dd03b5 100644 --- a/recipes/wip/dev/lang/go/recipe.toml +++ b/recipes/wip/dev/lang/go/recipe.toml @@ -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" diff --git a/recipes/wip/dev/lang/zig/recipe.toml b/recipes/wip/dev/lang/zig/recipe.toml index 90ceedba..5c9d26f7 100644 --- a/recipes/wip/dev/lang/zig/recipe.toml +++ b/recipes/wip/dev/lang/zig/recipe.toml @@ -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 """ diff --git a/recipes/wip/libs/other/xxhash/recipe.toml b/recipes/wip/libs/other/xxhash/recipe.toml index 20f05653..902e1347 100644 --- a/recipes/wip/libs/other/xxhash/recipe.toml +++ b/recipes/wip/libs/other/xxhash/recipe.toml @@ -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 +""" diff --git a/recipes/wip/net/other/rsync/recipe.toml b/recipes/wip/net/other/rsync/recipe.toml deleted file mode 100644 index e5dcf210..00000000 --- a/recipes/wip/net/other/rsync/recipe.toml +++ /dev/null @@ -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", -]