mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-20 03:44:18 +08:00
Merge branch 'master' of https://gitlab.redox-os.org/redox-os/cookbook
This commit is contained in:
commit
d601dc2acb
@ -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"
|
||||
"""
|
||||
|
||||
@ -9,4 +9,5 @@ script = """
|
||||
DYNAMIC_INIT
|
||||
rsync -av --delete "${COOKBOOK_SOURCE}/" ./
|
||||
${COOKBOOK_MAKE}
|
||||
${COOKBOOK_MAKE} install DESTDIR="${COOKBOOK_STAGE}" prefix="/usr"
|
||||
"""
|
||||
|
||||
12
recipes/net/rsync/recipe.toml
Normal file
12
recipes/net/rsync/recipe.toml
Normal 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",
|
||||
]
|
||||
25
recipes/net/rsync/redox.patch
Normal file
25
recipes/net/rsync/redox.patch
Normal 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
|
||||
@ -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"
|
||||
|
||||
@ -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
|
||||
"""
|
||||
|
||||
@ -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
|
||||
"""
|
||||
|
||||
@ -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",
|
||||
]
|
||||
Loading…
Reference in New Issue
Block a user