From 6566b29a135fbfc5881488d36e8a7157bed59f4d Mon Sep 17 00:00:00 2001 From: Vasilito Date: Sat, 18 Apr 2026 17:59:21 +0100 Subject: [PATCH] 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 --- .../recipes}/wayland/smallvil/recipe.toml | 2 +- recipes/gui/orbutils/redox.patch | 1 + recipes/libs/mesa/recipe.toml | 7 +++ recipes/wip/libs/gnome/libepoxy/recipe.toml | 11 +---- recipes/wip/libs/other/liblcms/recipe.toml | 32 +++++++++++++- recipes/wip/wayland/libwayland/recipe.toml | 43 +++++++++++-------- recipes/wip/wayland/libwayland/redox.patch | 18 +------- recipes/wip/wayland/smallvil | 1 + recipes/wip/x11/libx11/recipe.toml | 5 +-- recipes/wip/x11/libxau/recipe.toml | 3 -- recipes/wip/x11/libxcb/recipe.toml | 25 ++++++++--- recipes/wip/x11/libxcomposite/recipe.toml | 3 -- recipes/wip/x11/libxdamage/recipe.toml | 3 -- recipes/wip/x11/libxext/recipe.toml | 3 -- recipes/wip/x11/libxfixes/recipe.toml | 3 -- recipes/wip/x11/libxi/recipe.toml | 3 -- recipes/wip/x11/libxmu/recipe.toml | 3 -- recipes/wip/x11/libxrandr/recipe.toml | 3 -- recipes/wip/x11/libxrender/recipe.toml | 3 -- recipes/wip/x11/libxshmfence/recipe.toml | 5 +-- recipes/wip/x11/libxt/recipe.toml | 3 -- recipes/wip/x11/libxxf86vm/recipe.toml | 3 -- recipes/wip/x11/mesa-x11/recipe.toml | 17 ++++++++ recipes/wip/x11/xextproto/recipe.toml | 13 ++++-- 24 files changed, 118 insertions(+), 95 deletions(-) rename {recipes/wip => local/recipes}/wayland/smallvil/recipe.toml (66%) create mode 120000 recipes/gui/orbutils/redox.patch create mode 120000 recipes/wip/wayland/smallvil diff --git a/recipes/wip/wayland/smallvil/recipe.toml b/local/recipes/wayland/smallvil/recipe.toml similarity index 66% rename from recipes/wip/wayland/smallvil/recipe.toml rename to local/recipes/wayland/smallvil/recipe.toml index 35c229c4..6808b6e5 100644 --- a/recipes/wip/wayland/smallvil/recipe.toml +++ b/local/recipes/wayland/smallvil/recipe.toml @@ -1,4 +1,4 @@ -#TODO: libwayland native build done, needs libinput for full input support +#TODO: historical bounded validation compositor reference only; no longer part of the active forward desktop workflow [source] git = "https://github.com/jackpot51/smithay" branch = "redox" diff --git a/recipes/gui/orbutils/redox.patch b/recipes/gui/orbutils/redox.patch new file mode 120000 index 00000000..e5d6e307 --- /dev/null +++ b/recipes/gui/orbutils/redox.patch @@ -0,0 +1 @@ +../../../local/patches/orbutils/redox.patch \ No newline at end of file diff --git a/recipes/libs/mesa/recipe.toml b/recipes/libs/mesa/recipe.toml index 3e8f803a..ec229c28 100644 --- a/recipes/libs/mesa/recipe.toml +++ b/recipes/libs/mesa/recipe.toml @@ -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 diff --git a/recipes/wip/libs/gnome/libepoxy/recipe.toml b/recipes/wip/libs/gnome/libepoxy/recipe.toml index d77fc9cb..334655d1 100644 --- a/recipes/wip/libs/gnome/libepoxy/recipe.toml +++ b/recipes/wip/libs/gnome/libepoxy/recipe.toml @@ -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 """ diff --git a/recipes/wip/libs/other/liblcms/recipe.toml b/recipes/wip/libs/other/liblcms/recipe.toml index ac36be80..f95306cd 100644 --- a/recipes/wip/libs/other/liblcms/recipe.toml +++ b/recipes/wip/libs/other/liblcms/recipe.toml @@ -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", ] diff --git a/recipes/wip/wayland/libwayland/recipe.toml b/recipes/wip/wayland/libwayland/recipe.toml index 6b033a62..c77142dc 100644 --- a/recipes/wip/wayland/libwayland/recipe.toml +++ b/recipes/wip/wayland/libwayland/recipe.toml @@ -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 -#include -#include ''', - '''#include #ifdef __redox__ #include #ifndef SFD_CLOEXEC @@ -63,22 +70,24 @@ int timerfd_settime(int fd, int flags, const struct itimerspec *new_value, struc #else #include #include +#endif''', + '''#include +#include +#include ''', +) +event_text = event_text.replace( + '''#include +#include +#include ''', + '''#include +#ifdef __redox__ +#include +#include +#else +#include +#include #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" diff --git a/recipes/wip/wayland/libwayland/redox.patch b/recipes/wip/wayland/libwayland/redox.patch index 19399e52..c93e1404 100644 --- a/recipes/wip/wayland/libwayland/redox.patch +++ b/recipes/wip/wayland/libwayland/redox.patch @@ -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 #include #include -+#ifdef __redox__ -+#include -+#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 -+#endif ++#include #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 #endif #include #include "timespec-util.h" diff --git a/recipes/wip/wayland/smallvil b/recipes/wip/wayland/smallvil new file mode 120000 index 00000000..0652632c --- /dev/null +++ b/recipes/wip/wayland/smallvil @@ -0,0 +1 @@ +../../../local/recipes/wayland/smallvil \ No newline at end of file diff --git a/recipes/wip/x11/libx11/recipe.toml b/recipes/wip/x11/libx11/recipe.toml index a56da978..c5016f2a 100644 --- a/recipes/wip/x11/libx11/recipe.toml +++ b/recipes/wip/x11/libx11/recipe.toml @@ -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 """ diff --git a/recipes/wip/x11/libxau/recipe.toml b/recipes/wip/x11/libxau/recipe.toml index 7fb9f3b7..b314471d 100644 --- a/recipes/wip/x11/libxau/recipe.toml +++ b/recipes/wip/x11/libxau/recipe.toml @@ -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 = [ diff --git a/recipes/wip/x11/libxcb/recipe.toml b/recipes/wip/x11/libxcb/recipe.toml index bf7ec506..fa187f95 100644 --- a/recipes/wip/x11/libxcb/recipe.toml +++ b/recipes/wip/x11/libxcb/recipe.toml @@ -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 +""" diff --git a/recipes/wip/x11/libxcomposite/recipe.toml b/recipes/wip/x11/libxcomposite/recipe.toml index be721c6b..23ed6150 100644 --- a/recipes/wip/x11/libxcomposite/recipe.toml +++ b/recipes/wip/x11/libxcomposite/recipe.toml @@ -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" diff --git a/recipes/wip/x11/libxdamage/recipe.toml b/recipes/wip/x11/libxdamage/recipe.toml index e06e65b3..6c5290e1 100644 --- a/recipes/wip/x11/libxdamage/recipe.toml +++ b/recipes/wip/x11/libxdamage/recipe.toml @@ -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" diff --git a/recipes/wip/x11/libxext/recipe.toml b/recipes/wip/x11/libxext/recipe.toml index ca922859..6dd5c437 100644 --- a/recipes/wip/x11/libxext/recipe.toml +++ b/recipes/wip/x11/libxext/recipe.toml @@ -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 = [ diff --git a/recipes/wip/x11/libxfixes/recipe.toml b/recipes/wip/x11/libxfixes/recipe.toml index 9d3d4040..bdeb8447 100644 --- a/recipes/wip/x11/libxfixes/recipe.toml +++ b/recipes/wip/x11/libxfixes/recipe.toml @@ -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 = [ diff --git a/recipes/wip/x11/libxi/recipe.toml b/recipes/wip/x11/libxi/recipe.toml index 5218a767..ef17d49f 100644 --- a/recipes/wip/x11/libxi/recipe.toml +++ b/recipes/wip/x11/libxi/recipe.toml @@ -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 = [ diff --git a/recipes/wip/x11/libxmu/recipe.toml b/recipes/wip/x11/libxmu/recipe.toml index afea2422..05a409cc 100644 --- a/recipes/wip/x11/libxmu/recipe.toml +++ b/recipes/wip/x11/libxmu/recipe.toml @@ -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 = [ diff --git a/recipes/wip/x11/libxrandr/recipe.toml b/recipes/wip/x11/libxrandr/recipe.toml index ce7f2ba8..3018122c 100644 --- a/recipes/wip/x11/libxrandr/recipe.toml +++ b/recipes/wip/x11/libxrandr/recipe.toml @@ -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 = [ diff --git a/recipes/wip/x11/libxrender/recipe.toml b/recipes/wip/x11/libxrender/recipe.toml index 4442e6a1..d7864d4a 100644 --- a/recipes/wip/x11/libxrender/recipe.toml +++ b/recipes/wip/x11/libxrender/recipe.toml @@ -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 = [ diff --git a/recipes/wip/x11/libxshmfence/recipe.toml b/recipes/wip/x11/libxshmfence/recipe.toml index 00e41e2c..0b6b8202 100644 --- a/recipes/wip/x11/libxshmfence/recipe.toml +++ b/recipes/wip/x11/libxshmfence/recipe.toml @@ -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 """ diff --git a/recipes/wip/x11/libxt/recipe.toml b/recipes/wip/x11/libxt/recipe.toml index 27cf2924..dcd90301 100644 --- a/recipes/wip/x11/libxt/recipe.toml +++ b/recipes/wip/x11/libxt/recipe.toml @@ -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 = [ diff --git a/recipes/wip/x11/libxxf86vm/recipe.toml b/recipes/wip/x11/libxxf86vm/recipe.toml index ecdd0215..b8edbcef 100644 --- a/recipes/wip/x11/libxxf86vm/recipe.toml +++ b/recipes/wip/x11/libxxf86vm/recipe.toml @@ -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 = [ diff --git a/recipes/wip/x11/mesa-x11/recipe.toml b/recipes/wip/x11/mesa-x11/recipe.toml index dfb07c14..99b0d4ec 100644 --- a/recipes/wip/x11/mesa-x11/recipe.toml +++ b/recipes/wip/x11/mesa-x11/recipe.toml @@ -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 \ diff --git a/recipes/wip/x11/xextproto/recipe.toml b/recipes/wip/x11/xextproto/recipe.toml index 9be61748..44993945 100644 --- a/recipes/wip/x11/xextproto/recipe.toml +++ b/recipes/wip/x11/xextproto/recipe.toml @@ -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 """