Update upstream recipe TOMLs, add orbutils patch and smallvil recipe

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-04-18 17:59:21 +01:00
parent 841773c3a7
commit 6566b29a13
24 changed files with 118 additions and 95 deletions
+1
View File
@@ -0,0 +1 @@
../../../local/patches/orbutils/redox.patch
+7
View File
@@ -21,8 +21,15 @@ DYNAMIC_INIT
#TODO: Should be CPPFLAGS but cookbook_meson isn't reading it
export CFLAGS+=" -DHAVE_PTHREAD=1 -I${COOKBOOK_SYSROOT}/include/libdrm"
export LLVM_CONFIG="${TARGET}-llvm-config"
if [ -x "${HOME}/.redoxer/${TARGET}/toolchain/bin/llvm-config" ]; then
export COOKBOOK_HOST_SYSROOT="${HOME}/.redoxer/${TARGET}/toolchain"
fi
export LDFLAGS+=" -lorbital"
mkdir -p .cookbook-tools
ln -sf "$(command -v "${LLVM_CONFIG}")" .cookbook-tools/llvm-config
export PATH="$(pwd)/.cookbook-tools:${PATH}"
if [ "${COOKBOOK_DYNAMIC}" == "1" ]; then
COOKBOOK_MESON_FLAGS+=(-Dshared-llvm=enabled)
else
+2 -9
View File
@@ -7,20 +7,13 @@ patches = ["redox.patch"]
template = "custom"
dependencies = [
"libpthread-stubs",
"libx11",
"libxau",
"libxcb",
"libxext",
"libxfixes",
"libxxf86vm",
"mesa-x11",
"x11proto",
"mesa",
"zlib",
]
script = """
DYNAMIC_INIT
cookbook_meson \
-Degl=yes \
-Dglx=yes \
-Dglx=no \
-Dtests=false
"""
+31 -1
View File
@@ -2,7 +2,37 @@
[source]
tar = "https://github.com/mm2/Little-CMS/releases/download/lcms2.15/lcms2-2.15.tar.gz"
[build]
template = "configure"
template = "custom"
script = """
DYNAMIC_INIT
export CFLAGS="${CFLAGS} -fPIC"
export CXXFLAGS="${CXXFLAGS} -fPIC"
COOKBOOK_CONFIGURE_FLAGS+=("--enable-shared" "--disable-static")
cookbook_configure
make -j${COOKBOOK_MAKE_JOBS}
if [ -d src/.libs ]; then
x86_64-unknown-redox-gcc -shared -Wl,-soname,liblcms2.so.2 \
-o src/.libs/liblcms2.so.2.15 \
src/*.o -lm -lpthread
ln -sf liblcms2.so.2.15 src/.libs/liblcms2.so.2
ln -sf liblcms2.so.2.15 src/.libs/liblcms2.so
fi
make install DESTDIR="${COOKBOOK_STAGE}"
if [ -f src/.libs/liblcms2.so.2.15 ]; then
mkdir -p "${COOKBOOK_STAGE}/usr/lib"
cp -f src/.libs/liblcms2.so.2.15 "${COOKBOOK_STAGE}/usr/lib/"
ln -sf liblcms2.so.2.15 "${COOKBOOK_STAGE}/usr/lib/liblcms2.so.2"
ln -sf liblcms2.so.2.15 "${COOKBOOK_STAGE}/usr/lib/liblcms2.so"
fi
for dir in "${COOKBOOK_STAGE}/lib" "${COOKBOOK_STAGE}/usr/lib"; do
[ -d "${dir}" ] || continue
find "${dir}" -type f -name '*.la' -exec rm -fv '{}' ';'
done
"""
dependencies = [
"libtiff",
]
+26 -17
View File
@@ -15,6 +15,12 @@ dependencies = [
script = """
DYNAMIC_INIT
if [ -d "${COOKBOOK_ROOT}/recipes/core/relibc/target/${TARGET}/stage/usr/include" ]; then
mkdir -p "${COOKBOOK_SYSROOT}/include" "${COOKBOOK_SYSROOT}/usr/include"
cp -a "${COOKBOOK_ROOT}/recipes/core/relibc/target/${TARGET}/stage/usr/include/." "${COOKBOOK_SYSROOT}/include/"
cp -a "${COOKBOOK_ROOT}/recipes/core/relibc/target/${TARGET}/stage/usr/include/." "${COOKBOOK_SYSROOT}/usr/include/"
fi
python - <<'PY'
import os
from pathlib import Path
@@ -28,15 +34,16 @@ meson_text = meson_text.replace(
\twayland_scanner_for_build = find_program(scanner_dep.get_variable(pkgconfig: 'wayland_scanner'))''',
'''\twayland_scanner_for_build = find_program('wayland-scanner', native: true)''',
)
meson_text = meson_text.replace(
"{ 'header': 'sys/signalfd.h', 'symbol': 'SFD_CLOEXEC' }",
"{ 'header': 'signal.h', 'symbol': 'SFD_CLOEXEC' }",
)
meson.write_text(meson_text)
event_loop = source_root / "src/event-loop.c"
event_text = event_loop.read_text()
event_text = event_text.replace(
'''#include <sys/epoll.h>
#include <sys/signalfd.h>
#include <sys/timerfd.h>''',
'''#include <sys/epoll.h>
#ifdef __redox__
#include <sys/types.h>
#ifndef SFD_CLOEXEC
@@ -63,22 +70,24 @@ int timerfd_settime(int fd, int flags, const struct itimerspec *new_value, struc
#else
#include <sys/signalfd.h>
#include <sys/timerfd.h>
#endif''',
'''#include <sys/epoll.h>
#include <sys/signalfd.h>
#include <sys/timerfd.h>''',
)
event_text = event_text.replace(
'''#include <sys/epoll.h>
#include <sys/signalfd.h>
#include <sys/timerfd.h>''',
'''#include <sys/epoll.h>
#ifdef __redox__
#include <sys/signalfd.h>
#include <sys/timerfd.h>
#else
#include <sys/signalfd.h>
#include <sys/timerfd.h>
#endif''',
)
if "TFD_TIMER_ABSTIME" not in event_text:
event_text = event_text.replace(
'''#ifndef TFD_NONBLOCK
#define TFD_NONBLOCK O_NONBLOCK
#endif
int timerfd_create''',
'''#ifndef TFD_NONBLOCK
#define TFD_NONBLOCK O_NONBLOCK
#endif
#ifndef TFD_TIMER_ABSTIME
#define TFD_TIMER_ABSTIME TIMER_ABSTIME
#endif
int timerfd_create''',
)
event_loop.write_text(event_text)
server = source_root / "src/wayland-server.c"
+2 -16
View File
@@ -14,25 +14,12 @@ diff --git a/src/meson.build b/src/meson.build
diff --git a/src/event-loop.c b/src/event-loop.c
--- a/src/event-loop.c
+++ b/src/event-loop.c
@@ -35,7 +35,32 @@
@@ -35,7 +35,9 @@
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/epoll.h>
+#ifdef __redox__
+#include <sys/types.h>
+#ifndef SFD_CLOEXEC
+#define SFD_CLOEXEC O_CLOEXEC
+#endif
+#ifndef SFD_NONBLOCK
+#define SFD_NONBLOCK O_NONBLOCK
+#endif
+struct signalfd_siginfo {
+ uint8_t pad[128];
+};
+int signalfd(int fd, const sigset_t *mask, int flags);
+#else
#include <sys/signalfd.h>
+#endif
+#include <sys/timerfd.h>
#ifdef __redox__
#ifndef TFD_CLOEXEC
#define TFD_CLOEXEC O_CLOEXEC
@@ -43,7 +30,6 @@ diff --git a/src/event-loop.c b/src/event-loop.c
int timerfd_create(int clockid, int flags);
int timerfd_settime(int fd, int flags, const struct itimerspec *new_value, struct itimerspec *old_value);
#else
#include <sys/timerfd.h>
#endif
#include <unistd.h>
#include "timespec-util.h"
+1
View File
@@ -0,0 +1 @@
../../../local/recipes/wayland/smallvil
-17
View File
@@ -1,17 +0,0 @@
#TODO: libwayland native build done, needs libinput for full input support
[source]
git = "https://github.com/jackpot51/smithay"
branch = "redox"
[build]
template = "cargo"
dependencies = [
"libevdev",
"libffi",
"libinput",
"libwayland",
"libxkbcommon",
]
cargopackages = [
"smallvil"
]
+1 -4
View File
@@ -1,9 +1,6 @@
[source]
tar = "https://www.x.org/releases/individual/lib/libX11-1.8.12.tar.xz"
blake3 = "5bf1c64733322b6a90d9bce8d2bd2d8117a4950955caa00d0cd7974d42571d1e"
script = """
autotools_recursive_regenerate
"""
[build]
dependencies = [
@@ -16,5 +13,5 @@ dependencies = [
template = "custom"
script = """
DYNAMIC_INIT
cookbook_configure --enable-malloc0returnsnull
cookbook_configure --enable-malloc0returnsnull --disable-dependency-tracking
"""
-3
View File
@@ -1,9 +1,6 @@
[source]
tar = "https://www.x.org/releases/individual/lib/libXau-1.0.12.tar.xz"
blake3 = "674bc71a888eec20f0e29989e4669df90309d4baacad058107cdf89d23803bcc"
script = """
autotools_recursive_regenerate
"""
[build]
dependencies = [
+18 -7
View File
@@ -1,9 +1,6 @@
[source]
tar = "https://www.x.org/releases/individual/xcb/libxcb-1.17.0.tar.xz"
blake3 = "3dce3b8adc257177dfec9b6b6cf55eeac13921520dd6c372fd8f9d867600337b"
script = """
autotools_recursive_regenerate
"""
[build]
dependencies = [
@@ -12,7 +9,21 @@ dependencies = [
"x11proto",
"xcb-proto",
]
template = "configure"
configureflags = [
"--disable-devel-docs",
]
template = "custom"
script = """
DYNAMIC_INIT
COOKBOOK_CONFIGURE_FLAGS+=("--disable-devel-docs")
cookbook_configure
if ! grep -q '^#define XCB_QUEUE_BUFFER_SIZE ' src/config.h; then
printf '\n#define XCB_QUEUE_BUFFER_SIZE 16384\n' >> src/config.h
fi
make -j${COOKBOOK_MAKE_JOBS}
make install DESTDIR="${COOKBOOK_STAGE}"
for dir in "${COOKBOOK_STAGE}/lib" "${COOKBOOK_STAGE}/usr/lib"; do
[ -d "${dir}" ] || continue
find "${dir}" -type f -name '*.la' -exec rm -fv '{}' ';'
done
"""
@@ -1,9 +1,6 @@
[source]
tar = "https://www.x.org/releases/individual/lib/libXcomposite-0.4.6.tar.xz"
blake3 = "7e02026864066869aefc1d688415b1e8c6ab0b639556f93b6f5e86063aa1bbac"
script = """
autotools_recursive_regenerate
"""
[build]
template = "custom"
-3
View File
@@ -1,9 +1,6 @@
[source]
tar = "https://www.x.org/releases/individual/lib/libXdamage-1.1.6.tar.xz"
blake3 = "d3d75f2656027288f87b9ddda8bf019862c63c6e4aeadd92f45870df6c2a7ce9"
script = """
autotools_recursive_regenerate
"""
[build]
template = "custom"
-3
View File
@@ -1,9 +1,6 @@
[source]
tar = "https://www.x.org/releases/individual/lib/libXext-1.3.6.tar.xz"
blake3 = "4c24887ba3913728f3c0be945006f6babbc2c44c8118d4b1ca5366294e3f4406"
script = """
autotools_recursive_regenerate
"""
[build]
dependencies = [
-3
View File
@@ -1,9 +1,6 @@
[source]
tar = "https://www.x.org/releases/individual/lib/libXfixes-6.0.1.tar.xz"
blake3 = "ccbae58717aa81f1ef52a2e6cbb7c57553a98b93f5a7a6f8a78e793a3a0c7f78"
script = """
autotools_recursive_regenerate
"""
[build]
dependencies = [
-3
View File
@@ -1,9 +1,6 @@
[source]
tar = "https://www.x.org/releases/individual/lib/libXi-1.8.2.tar.xz"
blake3 = "8f0acdd884dc928c6c8bc4b6bca1f4c67c726fdb03e30910c09bdb41fd841d3e"
script = """
autotools_recursive_regenerate
"""
[build]
dependencies = [
-3
View File
@@ -1,9 +1,6 @@
[source]
tar = "https://www.x.org/releases/individual/lib/libXmu-1.2.1.tar.xz"
blake3 = "466f7ab160c4e9f04866e9c895dbecb6a76ed1817ae16721d404c556d88f047e"
script = """
autotools_recursive_regenerate
"""
[build]
dependencies = [
-3
View File
@@ -1,9 +1,6 @@
[source]
tar = "https://www.x.org/releases/individual/lib/libXrandr-1.5.4.tar.xz"
blake3 = "c107a47d9c4329996d74d7a1ab8d254a2cf3aecea1575d7e146da9a06b762081"
script = """
autotools_recursive_regenerate
"""
[build]
dependencies = [
-3
View File
@@ -1,9 +1,6 @@
[source]
tar = "https://www.x.org/releases/individual/lib/libXrender-0.9.12.tar.xz"
blake3 = "900b431ad77835029a88fd0d874bbd0d748ff150b9e0c3841b3ce7a346cf396a"
script = """
autotools_recursive_regenerate
"""
[build]
dependencies = [
+1 -4
View File
@@ -1,8 +1,5 @@
[source]
tar = "https://www.x.org/releases/individual/lib/libxshmfence-1.3.tar.gz"
script = """
autotools_recursive_regenerate
"""
[build]
dependencies = [
@@ -11,5 +8,5 @@ dependencies = [
template = "custom"
script = """
DYNAMIC_INIT
cookbook_configure
cookbook_configure --disable-dependency-tracking
"""
-3
View File
@@ -1,9 +1,6 @@
[source]
tar = "https://www.x.org/releases/individual/lib/libXt-1.3.1.tar.xz"
blake3 = "fbf21683ce3e6d104529289254977bb08b355ecf7a36c763e8369acf85f15f24"
script = """
autotools_recursive_regenerate
"""
[build]
dependencies = [
-3
View File
@@ -1,9 +1,6 @@
[source]
tar = "https://www.x.org/releases/individual/lib/libXxf86vm-1.1.6.tar.xz"
blake3 = "cd99c05a03e81f8579a56272debd554b2a44c2ac8211f0170a39be86e03221bb"
script = """
autotools_recursive_regenerate
"""
[build]
dependencies = [
+17
View File
@@ -22,6 +22,23 @@ dev-dependencies = [
script = """
DYNAMIC_INIT
export CFLAGS+=" -DHAVE_PTHREAD=1 -I${COOKBOOK_SYSROOT}/include/libdrm"
export LLVM_CONFIG="${TARGET}-llvm-config"
if [ -x "${HOME}/.redoxer/${TARGET}/toolchain/bin/llvm-config" ]; then
export COOKBOOK_HOST_SYSROOT="${HOME}/.redoxer/${TARGET}/toolchain"
fi
mkdir -p .cookbook-tools
ln -sf "$(command -v "${LLVM_CONFIG}")" .cookbook-tools/llvm-config
export PATH="$(pwd)/.cookbook-tools:${PATH}"
if [ "${COOKBOOK_DYNAMIC}" == "1" ]; then
COOKBOOK_MESON_FLAGS+=(-Dshared-llvm=enabled)
else
COOKBOOK_MESON_FLAGS+=(-Dshared-llvm=disabled)
fi
cookbook_meson \
-Ddri-drivers-path=/usr/lib/dri \
-Degl=enabled \
+10 -3
View File
@@ -1,13 +1,20 @@
[source]
tar = "https://www.x.org/releases/individual/proto/xextproto-7.3.0.tar.bz2"
blake3 = "08cdd8b3838da9c99176778c925327aa35661d41d0e4d7458a378f14a42172c0"
script = """
autotools_recursive_regenerate
"""
[build]
template = "custom"
script = """
DYNAMIC_INIT
for f in config.sub config.guess; do
for dir in /usr/share/automake-* /usr/share/libtool/build-aux; do
if [ -f "${dir}/${f}" ]; then
cp "${dir}/${f}" "${COOKBOOK_SOURCE}/${f}"
break
fi
done
done
cookbook_configure
"""