From 937df828d0bf2bca4866ba468f0be6f4b91297dd Mon Sep 17 00:00:00 2001 From: FarnaHerry Date: Sun, 23 Aug 2026 19:34:43 +0800 Subject: [PATCH 01/24] feat(eui-neo): enable the linux SNI tray backend (EUI_TRAY_SNI) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 0.5.7's tray_bridge.c (:207) speaks freedesktop StatusNotifierItem over GDBus when EUI_TRAY_SNI is set — glib/gio only, no GTK3, no libappindicator, so the linux leg no longer has to compile the EUI_TRAY_HAS_BACKEND=0 stub. Wiring, in three pieces: * xpm-level: 'deps = { runtime = { "xim:glib@2.80.0" } }' lands glib in the SubOS view (verified: mcpp downloads and installs it on a cold resolve). * mcpp.linux: -DEUI_TRAY_SNI=1 plus -lglib-2.0/-lgio-2.0/-lgobject-2.0, and 'runtime.library_dirs' pointing at the staged payload dir so the dir reaches the consumer's RPATH. * install() hook (new — the package previously used default extraction): stages the glib header tree and the soname set out of the SubOS VIEW into mcpp_generated/glib/, the same staging shape compat.glx-runtime uses for GL. Two gaps are handled explicitly: - the GitHub tarball keeps its EUI-NEO-/ wrap layer, the CN mirror's does not; the hook normalizes to the wrap the '*/' globs are written against (observed differing on one machine, one day apart). - libmount/libselinux/libblkid have no xim provider yet (xim:glib links them, nothing ships them); they are staged from the HOST with a loud warn, the same host-plane fallback glx-runtime used before xim:graphics existed. libffi.so.8 comes from the view — needs openxlings/xim-pkgindex's libffi publish-list fix (separate PR) on machines whose view predates it. Verified on a clean slate (payload, project store, and all hand-made subos workarounds removed): all six eui-neo workspace members pass — eui-neo, eui-neo-window, eui-neo-app-main, eui-neo-markdown, eui-neo-vulkan, eui-neo-sdl2. --- pkgs/e/compat.eui-neo.lua | 207 +++++++++++++++++++++++++++++++++++--- 1 file changed, 191 insertions(+), 16 deletions(-) diff --git a/pkgs/e/compat.eui-neo.lua b/pkgs/e/compat.eui-neo.lua index f7dcbe1..5968dcd 100644 --- a/pkgs/e/compat.eui-neo.lua +++ b/pkgs/e/compat.eui-neo.lua @@ -27,15 +27,15 @@ -- descriptor names is byte-identical in upstream's CORE_SOURCES. -- -- 0.5.7: CORE_SOURCES is byte-identical to 0.5.6, so the lib's shape does not --- change; the version's real moves are the linux tray default (SNI over GDBus +-- change; the version's real moves are the linux tray backend (SNI over GDBus -- via glib/gio, replacing the dead GTK3+libappindicator path — tray_bridge.c --- now speaks freedesktop SNI when EUI_TRAY_SNI is set, which `compat.tray` --- never feeds) and SDL2-only input fixes (SDL_GetMouseFocus, pointer/button --- mapping) plus X11 resource handling in the SDL2 window backend. None of that --- touches the sources this descriptor compiles: `compat.tray` does not provide --- GDBus, so the linux leg still builds the EUI_TRAY_HAS_BACKEND=0 stub exactly --- as before, and the x11_*.cpp / tray-gio pieces are not in CORE_SOURCES. --- The new `EUI_ENABLE_TRAY` option does not affect this package either. +-- speaks freedesktop StatusNotifierItem when EUI_TRAY_SNI is set, which this +-- descriptor now does on linux, wiring glib through `xim:glib` and the +-- staging install() hook below) and SDL2-only input fixes (SDL_GetMouseFocus, +-- pointer/button mapping) plus X11 resource handling in the SDL2 window +-- backend. The new `EUI_ENABLE_TRAY` option does not affect this package: +-- tray_bridge.c is in CORE_SOURCES unconditionally and the define selects +-- which backend its body compiles to. -- -- All `mcpp` paths are GLOBS relative to the verdir; the leading `*/` absorbs -- the GitHub tarball's `EUI-NEO-0.5.7/` wrap layer. @@ -50,6 +50,13 @@ package = { xpm = { linux = { + -- 0.5.7: tray_bridge.c (:207) speaks freedesktop StatusNotifierItem + -- over GDBus when EUI_TRAY_SNI is set — no GTK3, no libappindicator. + -- xim:glib publishes glib-2.0 / gio-2.0 / gobject-2.0 into the SubOS + -- view; the install() hook at the bottom of this file stages them + -- into the payload (headers for the compile, sonames for the link + -- and the runtime closure — the same mcpp#352 boundary as GL). + deps = { runtime = { "xim:glib@2.80.0" } }, ["0.5.3"] = { url = { GLOBAL = "https://github.com/sudoevolve/EUI-NEO/archive/refs/tags/v0.5.3.tar.gz", CN = "https://gitcode.com/mcpp-res/eui-neo/releases/download/0.5.3/eui-neo-0.5.3.tar.gz" }, @@ -132,7 +139,9 @@ package = { -- `*/include` carries the umbrella `eui_neo.h` and `eui/*.h`; `*` is the -- verdir root, which is what makes the `"components/…"`, `"core/…"` and -- `"3rd/stb_image.h"` quoted includes resolve. Upstream marks both PUBLIC. - include_dirs = { "*/include", "*", "mcpp_generated" }, + -- `mcpp_generated/glib/include/glib-2.0` is the staged glib header tree + -- (linux SNI tray; see install()); off linux it is an empty directory. + include_dirs = { "*/include", "*", "mcpp_generated", "mcpp_generated/glib/include/glib-2.0" }, -- mcpp#233/#240: every package in a link emits its objects into ONE -- flat obj/ dir keyed by source basename. Upstream's @@ -458,13 +467,179 @@ package = { }, linux = { - -- No tray define on purpose. Upstream only sets - -- EUI_TRAY_APPINDICATOR when pkg-config finds GTK3 AND - -- libappindicator; this index has neither, so tray_bridge.c - -- compiles its EUI_TRAY_HAS_BACKEND=0 stub — which is exactly - -- what upstream does on a machine without those dev packages. - -- `-ldl` is glad's CMAKE_DL_LIBS. - ldflags = { "-lpthread", "-ldl" }, + -- 0.5.7: tray_bridge.c (:207) speaks freedesktop StatusNotifierItem + -- over GDBus when EUI_TRAY_SNI is set — no GTK3, no libappindicator. + -- xim:glib (declared at the xpm→linux level) lands the libraries in + -- the SubOS view; the install() hook below stages them plus the + -- headers into mcpp_generated/glib/ so the compile and the runtime + -- closure both resolve inside the hermetic boundary (the same + -- mcpp#352 problem as GL on the host, the same staging shape as + -- compat.glx-runtime). + cflags = { "-DEUI_TRAY_SNI=1", "-pthread" }, + ldflags = { "-lpthread", "-ldl", + "-lglib-2.0", "-lgio-2.0", "-lgobject-2.0" }, + runtime = { + library_dirs = { "mcpp_generated/glib/lib" }, + }, }, }, } + +import("xim.libxpkg.pkginfo") +import("xim.libxpkg.system") +import("xim.libxpkg.log") + +-- Libraries the SNI tray backend needs at runtime, symlinked into the +-- payload so the link and the runtime closure both resolve inside one +-- directory on the consumer's RPATH. Three origins, in preference order: +-- +-- * the glib sonames come from the SubOS VIEW, not the xim payload dir: +-- the view is the stable indirection (the role /run/opengl-driver +-- plays on NixOS — see compat.glx-runtime's note), so a glib upgrade +-- under us does not strand recorded RPATHs on a versioned path. +-- * the xim-provided transitives (libffi / pcre2 / zlib — xim:glib's +-- own deps) come from the same view. +-- * libmount / libselinux and their transitives have NO xim provider +-- yet: the xim:glib build links them, no xim package ships them. They +-- are staged from the HOST with a warning, the same host-plane +-- fallback compat.glx-runtime used before xim:graphics existed. The +-- day xim gains util-linux/libselinux packages this branch is dead +-- code; the day a host ships a glibc newer than the payload's, this +-- is the mcpp#352 configuration again and the warn below says so. +local subos_sonames = { + "libglib-2.0.so", "libglib-2.0.so.0", + "libgio-2.0.so", "libgio-2.0.so.0", + "libgobject-2.0.so", "libgobject-2.0.so.0", + "libgmodule-2.0.so", "libgmodule-2.0.so.0", + "libgthread-2.0.so", "libgthread-2.0.so.0", + "libffi.so.8", + "libpcre2-8.so", "libpcre2-8.so.0", + "libz.so", "libz.so.1", +} +local host_fallback_sonames = { + "libmount.so.1", + "libselinux.so.1", + "libblkid.so.1", +} +local host_lib_dirs = { + "/usr/lib/x86_64-linux-gnu", "/lib/x86_64-linux-gnu", + "/usr/lib64", "/lib64", "/usr/lib", "/lib", +} + +function install() + -- Default extraction, which this package previously got by having no + -- hook at all: move the unpacked tarball into place (same idiom as + -- compat.glfw). + local srcdir = pkginfo.install_file():replace(".tar.gz", "") + if not os.isdir(srcdir) then + srcdir = "EUI-NEO-" .. pkginfo.version() + end + local idir = pkginfo.install_dir() + os.tryrm(idir) + os.mv(srcdir, idir) + + -- Normalize to the single wrap layer the descriptor's `*/` globs are + -- written against. Whether the tree arrives wrapped depends on the + -- fetch path: the GitHub tarball keeps its `EUI-NEO-/` top level, + -- the CN mirror's does not — observed on one machine, one version, + -- one day apart. Without this, which layout a consumer compiles is a + -- function of their mirror, and the losing side fails with + -- `"core/…" file not found` on the quoted includes. + if os.isdir(path.join(idir, "core")) then + local tmp = idir .. ".wrap-tmp" + os.tryrm(tmp) + os.mv(idir, tmp) + os.mkdir(idir) + os.mv(tmp, path.join(idir, "EUI-NEO-" .. pkginfo.version())) + end + + -- The staging dir exists on EVERY platform so the include_dirs entry + -- `mcpp_generated/glib/include/glib-2.0` never names a missing path; + -- only linux populates it. Off linux it stays an empty directory, + -- which as an -I is inert. + local gendir = path.join(pkginfo.install_dir(), "mcpp_generated", "glib") + local geninc = path.join(gendir, "include") + os.mkdir(path.join(geninc, "glib-2.0")) + + if os.host() ~= "linux" then + return true + end + + -- Stage glib out of the SubOS VIEW, not the xim payload dir: the view is + -- the stable indirection (the role /run/opengl-driver plays on NixOS — + -- see compat.glx-runtime's note), so a glib upgrade under us does not + -- strand recorded RUNPATHs on a versioned payload path. + local subos = system.subos_sysrootdir() + local subos_glib_inc = path.join(subos, "usr", "include", "glib-2.0") + local subos_lib = path.join(subos, "lib") + + if not os.isdir(subos_glib_inc) then + log.error("glib-2.0 headers are not in this subos. They come from " + .. "`xim:glib` (declared as a runtime dep at the xpm level); " + .. "if it is declared and this still fires, the stack did " + .. "not finish installing") + return false + end + + os.tryrm(path.join(geninc, "glib-2.0")) + os.exec("ln -sf '" .. subos_glib_inc .. "' '" .. path.join(geninc, "glib-2.0") .. "'") + + local genlib = path.join(gendir, "lib") + os.mkdir(genlib) + local function stage(soname, src) + os.exec("ln -sf '" .. src .. "' '" .. path.join(genlib, soname) .. "'") + end + + local missing = {} + for _, soname in ipairs(subos_sonames) do + local src = path.join(subos_lib, soname) + if os.isfile(src) then + stage(soname, src) + else + table.insert(missing, soname) + end + end + if #missing > 0 then + log.error("%s is not in this subos — see the header note about " + .. "xim:glib", table.concat(missing, ", ")) + return false + end + + -- The host-plane fallback. Prefer the subos view for these too (a future + -- xim provider lands there without a descriptor change); only when it + -- has nothing do the host dirs get searched, loudly. + local from_host = {} + for _, soname in ipairs(host_fallback_sonames) do + if os.isfile(path.join(subos_lib, soname)) then + stage(soname, path.join(subos_lib, soname)) + else + local found = nil + for _, dir in ipairs(host_lib_dirs) do + local src = path.join(dir, soname) + if os.isfile(src) then + found = src + break + end + end + if found then + stage(soname, found) + table.insert(from_host, soname) + else + table.insert(missing, soname) + end + end + end + if #from_host > 0 then + log.warn("%s staged from the HOST: no xim package provides them yet " + .. "(xim:glib links libmount/libselinux; util-linux and " + .. "libselinux are not packaged). Built against the host's " + .. "glibc, they are the mcpp#352 configuration the day that " + .. "glibc overtakes the payload's", table.concat(from_host, ", ")) + end + if #missing > 0 then + log.error("%s found neither in this subos nor on the host", + table.concat(missing, ", ")) + return false + end + return true +end From 598562b1836f8ce5d02fd9539138f0c8d820b566 Mon Sep 17 00:00:00 2001 From: FarnaHerry Date: Sun, 23 Aug 2026 20:45:51 +0800 Subject: [PATCH 02/24] =?UTF-8?q?fix(eui-neo):=20make=20glib=20staging=20s?= =?UTF-8?q?elf-sufficient=20=E2=80=94=20store=20fallback,=20copies=20not?= =?UTF-8?q?=20symlinks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI on the previous commit failed cold with 'libffi.so.8 is not in this subos'. Root cause chain: xim:glib's libgio NEEDs libffi.so.8; libffi's publish list names only .so.7 though the tarball ships both; the runtime closure searches the subos VIEW, so the missing publish is fatal even though the store holds the file. openxlings/xim-pkgindex#676 fixes the list upstream, but the descriptor must not hinge on it: * resolve() now tiers view -> xim STORE. The view alone is unreliable at hook time in both directions: a publish list can lag the payload (libffi.so.8), and a package already cached in the store skips the config() run that would publish it, leaving a fresh project view without pcre2/zlib (observed on a wiped .mcpp/). The store is complete from the moment a dep is fetched, which for xpm deps is strictly before this hook runs. XLINGS_HOME provides the second store root. * stage() now COPIES instead of symlinking. The subos view is project-local while the payload is shared across projects: a staged symlink dangled the moment the providing project's .mcpp/ was wiped (observed: 'gio/gio.h file not found' off a shared payload). Copies make the payload self-contained; it is version-immutable and already on the consumer's RPATH, so nothing is lost. * header staging gets the same view->store treatment; os.files/os.dirs are not in the xpm sandbox, so globbing goes through the shell. Verified locally against the CI shape: live pkgindex with the libffi fix REVERTED, all hand-made subos workarounds removed, payload and project store wiped — eui-neo passes cold, the other five members pass against the shared self-contained payload. --- pkgs/e/compat.eui-neo.lua | 184 ++++++++++++++++++++++++++++---------- 1 file changed, 136 insertions(+), 48 deletions(-) diff --git a/pkgs/e/compat.eui-neo.lua b/pkgs/e/compat.eui-neo.lua index 5968dcd..59d5313 100644 --- a/pkgs/e/compat.eui-neo.lua +++ b/pkgs/e/compat.eui-neo.lua @@ -489,23 +489,29 @@ import("xim.libxpkg.pkginfo") import("xim.libxpkg.system") import("xim.libxpkg.log") --- Libraries the SNI tray backend needs at runtime, symlinked into the --- payload so the link and the runtime closure both resolve inside one --- directory on the consumer's RPATH. Three origins, in preference order: +-- Libraries the SNI tray backend needs at runtime, COPIED into the payload +-- so the link and the runtime closure both resolve inside one directory on +-- the consumer's RPATH. Copies, not symlinks: the subos view is +-- project-local while this payload is shared across projects, and a staged +-- symlink dangles the moment the project that provided the view is not the +-- one building (observed: `gio/gio.h file not found` off a shared payload +-- pointing into a wiped project .mcpp/). The payload dir is +-- version-immutable and already on the RPATH, so copies lose nothing. +-- Two origins, in preference order: -- --- * the glib sonames come from the SubOS VIEW, not the xim payload dir: --- the view is the stable indirection (the role /run/opengl-driver --- plays on NixOS — see compat.glx-runtime's note), so a glib upgrade --- under us does not strand recorded RPATHs on a versioned path. --- * the xim-provided transitives (libffi / pcre2 / zlib — xim:glib's --- own deps) come from the same view. --- * libmount / libselinux and their transitives have NO xim provider --- yet: the xim:glib build links them, no xim package ships them. They --- are staged from the HOST with a warning, the same host-plane --- fallback compat.glx-runtime used before xim:graphics existed. The --- day xim gains util-linux/libselinux packages this branch is dead --- code; the day a host ships a glibc newer than the payload's, this --- is the mcpp#352 configuration again and the warn below says so. +-- * the glib sonames and the xim-provided transitives (libffi / pcre2 / +-- zlib — xim:glib's own deps) come from the subos view when published, +-- else straight from the xim store. The view alone is NOT enough at +-- hook time: a package already cached in the store skips the config() +-- run that publishes it, so on a fresh project view the transitives +-- can be missing even though the store holds them (observed). +-- * libmount / libselinux / libblkid have NO xim provider yet: the +-- xim:glib build links them, no xim package ships them. They are +-- staged from the HOST with a warning, the same host-plane fallback +-- compat.glx-runtime used before xim:graphics existed. The day xim +-- gains util-linux/libselinux packages this branch is dead code; +-- the day a host ships a glibc newer than the payload's, this is +-- the mcpp#352 configuration again and the warn below says so. local subos_sonames = { "libglib-2.0.so", "libglib-2.0.so.0", "libgio-2.0.so", "libgio-2.0.so.0", @@ -565,68 +571,150 @@ function install() return true end - -- Stage glib out of the SubOS VIEW, not the xim payload dir: the view is - -- the stable indirection (the role /run/opengl-driver plays on NixOS — - -- see compat.glx-runtime's note), so a glib upgrade under us does not - -- strand recorded RUNPATHs on a versioned payload path. + -- Resolver, in tier order. The subos VIEW (project-local) is consulted + -- first but is NOT reliable at hook time: entries appear there only + -- when the providing package's config() runs, and a package already + -- cached in the store skips that run — observed on a wiped .mcpp/ + -- where the view had the glib sonames but not pcre2/zlib/libffi yet. + -- The STORE (the xpkgs dir the payloads live in) is the stable source: + -- a package's files exist there from the moment it is fetched, which + -- for every xpm-level dep is strictly before this hook runs. local subos = system.subos_sysrootdir() - local subos_glib_inc = path.join(subos, "usr", "include", "glib-2.0") local subos_lib = path.join(subos, "lib") - if not os.isdir(subos_glib_inc) then - log.error("glib-2.0 headers are not in this subos. They come from " - .. "`xim:glib` (declared as a runtime dep at the xpm level); " - .. "if it is declared and this still fires, the stack did " - .. "not finish installing") + local store_roots = {} + local function add_root(root) + if root and root ~= "" and os.isdir(root) then + for _, r in ipairs(store_roots) do + if r == root then return end + end + table.insert(store_roots, root) + end + end + add_root(path.directory(path.directory(idir))) + local xlh = os.getenv("XLINGS_HOME") + if xlh and xlh ~= "" then + add_root(path.join(xlh, "data", "xpkgs")) + end + + local from_store = {} + -- os.files/os.dirs are NOT in the xpm sandbox (install hook died on + -- exactly that); glob through the shell instead. One match per line, + -- no-match expands to an ls error that stderr's redirect swallows. + local function glob(pattern) + local out = {} + for line in os.iorun("sh -c 'ls -d " .. pattern .. " 2>/dev/null'"):gmatch("[^\n]+") do + table.insert(out, line) + end + return out + end + local function resolve(soname) + local in_view = path.join(subos_lib, soname) + if os.isfile(in_view) then + return in_view, false + end + for _, root in ipairs(store_roots) do + for _, hit in ipairs(glob(root .. "/*/*/lib/" .. soname)) do + if os.isfile(hit) then + return hit, true + end + end + end + return nil, false + end + + -- Headers, view first then the store (same race as the sonames). + local subos_glib_inc = path.join(subos, "usr", "include", "glib-2.0") + local glib_inc = nil + if os.isdir(subos_glib_inc) then + glib_inc = subos_glib_inc + else + for _, root in ipairs(store_roots) do + local hits = glob(root .. "/xim-x-glib/*/include/glib-2.0") + if #hits > 0 then + glib_inc = hits[1] + break + end + end + end + if not glib_inc then + log.error("glib-2.0 headers found neither in this subos nor in the " + .. "xim store. They come from `xim:glib` (declared as a " + .. "runtime dep at the xpm level); if it is declared and " + .. "this still fires, the stack did not finish installing") return false end + -- COPY, not symlink. The subos view is project-local while this payload + -- is shared across projects: a symlink staged from the view dangles the + -- moment another project (or a wiped .mcpp/) is the one that builds — + -- observed as `gio/gio.h file not found` on a shared payload whose + -- staged link pointed into a deleted project view. The payload dir is + -- version-immutable and already on the consumer's RPATH, so copies are + -- also the stable indirection the glx-runtime note wants; a glib bump + -- simply rides the next eui-neo version. os.tryrm(path.join(geninc, "glib-2.0")) - os.exec("ln -sf '" .. subos_glib_inc .. "' '" .. path.join(geninc, "glib-2.0") .. "'") + os.exec("cp -rL '" .. glib_inc .. "' '" .. geninc .. "'") local genlib = path.join(gendir, "lib") os.mkdir(genlib) local function stage(soname, src) - os.exec("ln -sf '" .. src .. "' '" .. path.join(genlib, soname) .. "'") + os.exec("cp -L '" .. src .. "' '" .. path.join(genlib, soname) .. "'") end local missing = {} for _, soname in ipairs(subos_sonames) do - local src = path.join(subos_lib, soname) - if os.isfile(src) then + local src, store_side = resolve(soname) + if src then stage(soname, src) + if store_side then + table.insert(from_store, soname) + end else table.insert(missing, soname) end end + if #from_store > 0 then + log.warn("%s came from the xim store, bypassing a subos view that " + .. "had not published them yet (publish lists lag payloads — " + .. "libffi.so.8: openxlings/xim-pkgindex#676)", + table.concat(from_store, ", ")) + end if #missing > 0 then - log.error("%s is not in this subos — see the header note about " - .. "xim:glib", table.concat(missing, ", ")) + log.error("%s is in neither this subos nor the xim store — see the " + .. "header note about xim:glib", table.concat(missing, ", ")) return false end - -- The host-plane fallback. Prefer the subos view for these too (a future - -- xim provider lands there without a descriptor change); only when it - -- has nothing do the host dirs get searched, loudly. + -- The host-plane fallback. Prefer the view/store for these too (a future + -- xim provider lands there without a descriptor change); only when both + -- have nothing do the host dirs get searched, loudly. local from_host = {} for _, soname in ipairs(host_fallback_sonames) do - if os.isfile(path.join(subos_lib, soname)) then - stage(soname, path.join(subos_lib, soname)) - else - local found = nil + local src = resolve(soname) + if not src then + for _, dir in ipairs(host_lib_dirs) do + local cand = path.join(dir, soname) + if os.isfile(cand) then + src = cand + break + end + end + end + if src then + stage(soname, src) + local host_origin = false for _, dir in ipairs(host_lib_dirs) do - local src = path.join(dir, soname) - if os.isfile(src) then - found = src + if src:sub(1, #dir) == dir then + host_origin = true break end end - if found then - stage(soname, found) + if host_origin then table.insert(from_host, soname) - else - table.insert(missing, soname) end + else + table.insert(missing, soname) end end if #from_host > 0 then @@ -637,8 +725,8 @@ function install() .. "glibc overtakes the payload's", table.concat(from_host, ", ")) end if #missing > 0 then - log.error("%s found neither in this subos nor on the host", - table.concat(missing, ", ")) + log.error("%s found neither in this subos, the xim store, nor on " + .. "the host", table.concat(missing, ", ")) return false end return true From 3851dd535a628d4f9ba79edf8e32b95215e03d1e Mon Sep 17 00:00:00 2001 From: FarnaHerry Date: Sun, 23 Aug 2026 23:45:25 +0800 Subject: [PATCH 03/24] fix(eui-neo): explicit -L for the staged glib + pcre2 version coherence MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI (pinned mcpp 2026.8.10.3, GNU ld) failed every eui-neo member with 'unable to find library -lglib-2.0' — on artifacts as unrelated as bin/libXdmcp.so, because package ldflags are unioned into every link. Root cause: with only runtime.library_dirs, the staged dir reaches link lines as -Wl,-rpath; ld.lld (mcpp 2026.8.21.3) happens to search rpath for -l, so local runs passed, but GNU ld does not — its SEARCH_DIRs are absolute host paths, so -lglib fell through to /lib64 (missing on a clean runner, or worse: the host's glib where it exists). Two fixes, both verified against the CI-pinned mcpp downloaded locally: * ldflags gains '-Lmcpp_generated/glib/lib' — payload-relative, resolved by mcpp against the install dir, the same convention compat.openblas and compat.mysql-connector-cpp use ('-Llib'). Now -lglib resolves to the staged copies on both linkers. * When libselinux is host-staged, libpcre2-8.so.0 is overwritten with the host's copy too: the host libselinux references pcre2 symbols WITH version tags (PCRE2_10.xx), which cannot bind to the xim pcre2's unversioned definitions — GNU ld hard-errors, lld only warns at runtime. The host pcre2 carries both versioned and unversioned defs, satisfying host libselinux and xim glib alike. Verified: mcpp 2026.8.10.3 (CI pin) — eui-neo and eui-neo-window pass cold; mcpp 2026.8.21.3 (latest) — eui-neo still passes. --- pkgs/e/compat.eui-neo.lua | 44 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/pkgs/e/compat.eui-neo.lua b/pkgs/e/compat.eui-neo.lua index 59d5313..034eea8 100644 --- a/pkgs/e/compat.eui-neo.lua +++ b/pkgs/e/compat.eui-neo.lua @@ -475,8 +475,16 @@ package = { -- closure both resolve inside the hermetic boundary (the same -- mcpp#352 problem as GL on the host, the same staging shape as -- compat.glx-runtime). + -- The -L is RELATIVE to the payload: mcpp resolves it against + -- the install dir (same convention as compat.openblas's + -- "-Llib"). It is load-bearing, not decorative: with only + -- runtime.library_dirs the staged dir reaches links as + -- -Wl,-rpath, which lld happens to search for -l but GNU ld + -- does not — on the GNU-ld toolchain -lglib then falls through + -- to the host's /lib64 (wrong glib, or none at all). cflags = { "-DEUI_TRAY_SNI=1", "-pthread" }, - ldflags = { "-lpthread", "-ldl", + ldflags = { "-Lmcpp_generated/glib/lib", + "-lpthread", "-ldl", "-lglib-2.0", "-lgio-2.0", "-lgobject-2.0" }, runtime = { library_dirs = { "mcpp_generated/glib/lib" }, @@ -724,6 +732,40 @@ function install() .. "glibc, they are the mcpp#352 configuration the day that " .. "glibc overtakes the payload's", table.concat(from_host, ", ")) end + + -- Versioned-symbol coherence: a HOST libselinux references pcre2 + -- symbols WITH version tags (PCRE2_10.xx), and a versioned reference + -- cannot bind to the xim pcre2's unversioned definitions — GNU ld + -- hard-errors at link time, lld lets it through to a runtime warning. + -- The reverse direction is fine (unversioned refs bind to versioned + -- defs), so when libselinux came from the host, pcre2 must too: + -- overwrite the xim-staged copy with the host's, which satisfies + -- both sides. Ubuntu and Fedora both ship libpcre2-8-0 by default. + local selinux_from_host = false + for _, soname in ipairs(from_host) do + if soname == "libselinux.so.1" then + selinux_from_host = true + break + end + end + if selinux_from_host then + local host_pcre = nil + for _, dir in ipairs(host_lib_dirs) do + local cand = path.join(dir, "libpcre2-8.so.0") + if os.isfile(cand) then + host_pcre = cand + break + end + end + if host_pcre then + stage("libpcre2-8.so.0", host_pcre) + else + log.warn("libselinux came from the host but libpcre2-8.so.0 did " + .. "not: the xim pcre2's unversioned symbols cannot " + .. "satisfy the host libselinux, and GNU ld will fail " + .. "the final link") + end + end if #missing > 0 then log.error("%s found neither in this subos, the xim store, nor on " .. "the host", table.concat(missing, ", ")) From c155ce8935b62203fc94d63b83ba7b741f11ea00 Mon Sep 17 00:00:00 2001 From: FarnaHerry Date: Mon, 24 Aug 2026 22:33:52 +0800 Subject: [PATCH 04/24] fix(eui-neo): remove host GLib closure reconstruction Keep the Linux SNI change at the consumer boundary: EUI-NEO declares xim:glib and links GIO, while xim owns the complete GLib runtime closure. Remove host directory probing, host library copies, store globbing, pcre2 replacement, and payload staging from the consumer hook. The install hook now only normalizes the archive wrap and is explicitly limited to 0.5.7; older EUI-NEO versions retain their original extraction behavior. The remaining libmount/libselinux/libblkid closure belongs in xim-pkgindex as open-source prebuilt runtime packages, not in this descriptor. --- pkgs/e/compat.eui-neo.lua | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/pkgs/e/compat.eui-neo.lua b/pkgs/e/compat.eui-neo.lua index 034eea8..41bc598 100644 --- a/pkgs/e/compat.eui-neo.lua +++ b/pkgs/e/compat.eui-neo.lua @@ -52,10 +52,8 @@ package = { linux = { -- 0.5.7: tray_bridge.c (:207) speaks freedesktop StatusNotifierItem -- over GDBus when EUI_TRAY_SNI is set — no GTK3, no libappindicator. - -- xim:glib publishes glib-2.0 / gio-2.0 / gobject-2.0 into the SubOS - -- view; the install() hook at the bottom of this file stages them - -- into the payload (headers for the compile, sonames for the link - -- and the runtime closure — the same mcpp#352 boundary as GL). + -- GLib owns and publishes its complete runtime closure in xim: + -- compat.eui-neo only consumes the declared SubOS headers/libs. deps = { runtime = { "xim:glib@2.80.0" } }, ["0.5.3"] = { url = { GLOBAL = "https://github.com/sudoevolve/EUI-NEO/archive/refs/tags/v0.5.3.tar.gz", @@ -467,6 +465,7 @@ package = { }, linux = { +<<<<<<< HEAD -- 0.5.7: tray_bridge.c (:207) speaks freedesktop StatusNotifierItem -- over GDBus when EUI_TRAY_SNI is set — no GTK3, no libappindicator. -- xim:glib (declared at the xpm→linux level) lands the libraries in @@ -489,11 +488,19 @@ package = { runtime = { library_dirs = { "mcpp_generated/glib/lib" }, }, +======= + -- The SNI backend exists only in 0.5.7. Keep this platform block + -- version-scoped at the package boundary rather than changing all + -- older published EUI-NEO builds. + ldflags = { "-lpthread", "-ldl", + "-lglib-2.0", "-lgio-2.0", "-lgobject-2.0" }, +>>>>>>> df1713c (fix(eui-neo): remove host GLib closure reconstruction) }, }, } import("xim.libxpkg.pkginfo") +<<<<<<< HEAD import("xim.libxpkg.system") import("xim.libxpkg.log") @@ -544,6 +551,15 @@ function install() -- Default extraction, which this package previously got by having no -- hook at all: move the unpacked tarball into place (same idiom as -- compat.glfw). +======= + +function install() + -- The 0.5.7 GitHub archive is wrapped, while some mirrors unpack the + -- same tree without that top-level directory. Normalize the tree before + -- the descriptor's `*/` globs are evaluated. This hook is intentionally + -- version-gated: older EUI-NEO releases retain their original install + -- behavior and do not inherit the SNI-specific packaging. +>>>>>>> df1713c (fix(eui-neo): remove host GLib closure reconstruction) local srcdir = pkginfo.install_file():replace(".tar.gz", "") if not os.isdir(srcdir) then srcdir = "EUI-NEO-" .. pkginfo.version() @@ -552,6 +568,7 @@ function install() os.tryrm(idir) os.mv(srcdir, idir) +<<<<<<< HEAD -- Normalize to the single wrap layer the descriptor's `*/` globs are -- written against. Whether the tree arrives wrapped depends on the -- fetch path: the GitHub tarball keeps its `EUI-NEO-/` top level, @@ -559,6 +576,15 @@ function install() -- one day apart. Without this, which layout a consumer compiles is a -- function of their mirror, and the losing side fails with -- `"core/…" file not found` on the quoted includes. +======= + if pkginfo.version() ~= "0.5.7" then + return true + end + if os.host() ~= "linux" then + return true + end + +>>>>>>> df1713c (fix(eui-neo): remove host GLib closure reconstruction) if os.isdir(path.join(idir, "core")) then local tmp = idir .. ".wrap-tmp" os.tryrm(tmp) @@ -566,6 +592,7 @@ function install() os.mkdir(idir) os.mv(tmp, path.join(idir, "EUI-NEO-" .. pkginfo.version())) end +<<<<<<< HEAD -- The staging dir exists on EVERY platform so the include_dirs entry -- `mcpp_generated/glib/include/glib-2.0` never names a missing path; @@ -771,5 +798,7 @@ function install() .. "the host", table.concat(missing, ", ")) return false end +======= +>>>>>>> df1713c (fix(eui-neo): remove host GLib closure reconstruction) return true end From da0de4e9140807d4bde96882e0f187af48e2d0a5 Mon Sep 17 00:00:00 2001 From: FarnaHerry Date: Mon, 24 Aug 2026 22:46:28 +0800 Subject: [PATCH 05/24] fix(eui-neo): resolve review merge cleanup --- pkgs/e/compat.eui-neo.lua | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/pkgs/e/compat.eui-neo.lua b/pkgs/e/compat.eui-neo.lua index 41bc598..4fdb0e9 100644 --- a/pkgs/e/compat.eui-neo.lua +++ b/pkgs/e/compat.eui-neo.lua @@ -465,36 +465,11 @@ package = { }, linux = { -<<<<<<< HEAD - -- 0.5.7: tray_bridge.c (:207) speaks freedesktop StatusNotifierItem - -- over GDBus when EUI_TRAY_SNI is set — no GTK3, no libappindicator. - -- xim:glib (declared at the xpm→linux level) lands the libraries in - -- the SubOS view; the install() hook below stages them plus the - -- headers into mcpp_generated/glib/ so the compile and the runtime - -- closure both resolve inside the hermetic boundary (the same - -- mcpp#352 problem as GL on the host, the same staging shape as - -- compat.glx-runtime). - -- The -L is RELATIVE to the payload: mcpp resolves it against - -- the install dir (same convention as compat.openblas's - -- "-Llib"). It is load-bearing, not decorative: with only - -- runtime.library_dirs the staged dir reaches links as - -- -Wl,-rpath, which lld happens to search for -l but GNU ld - -- does not — on the GNU-ld toolchain -lglib then falls through - -- to the host's /lib64 (wrong glib, or none at all). + -- GLib owns and publishes its complete runtime closure in xim; + -- the consumer only names the public GIO link inputs. cflags = { "-DEUI_TRAY_SNI=1", "-pthread" }, - ldflags = { "-Lmcpp_generated/glib/lib", - "-lpthread", "-ldl", - "-lglib-2.0", "-lgio-2.0", "-lgobject-2.0" }, - runtime = { - library_dirs = { "mcpp_generated/glib/lib" }, - }, -======= - -- The SNI backend exists only in 0.5.7. Keep this platform block - -- version-scoped at the package boundary rather than changing all - -- older published EUI-NEO builds. ldflags = { "-lpthread", "-ldl", "-lglib-2.0", "-lgio-2.0", "-lgobject-2.0" }, ->>>>>>> df1713c (fix(eui-neo): remove host GLib closure reconstruction) }, }, } From 99f939b1486db91a9aec9e147fde379c9ed083e9 Mon Sep 17 00:00:00 2001 From: FarnaHerry Date: Mon, 24 Aug 2026 22:51:25 +0800 Subject: [PATCH 06/24] fix(eui-neo): remove stale merge conflict markers --- pkgs/e/compat.eui-neo.lua | 281 +------------------------------------- 1 file changed, 4 insertions(+), 277 deletions(-) diff --git a/pkgs/e/compat.eui-neo.lua b/pkgs/e/compat.eui-neo.lua index 4fdb0e9..eb9117d 100644 --- a/pkgs/e/compat.eui-neo.lua +++ b/pkgs/e/compat.eui-neo.lua @@ -137,9 +137,7 @@ package = { -- `*/include` carries the umbrella `eui_neo.h` and `eui/*.h`; `*` is the -- verdir root, which is what makes the `"components/…"`, `"core/…"` and -- `"3rd/stb_image.h"` quoted includes resolve. Upstream marks both PUBLIC. - -- `mcpp_generated/glib/include/glib-2.0` is the staged glib header tree - -- (linux SNI tray; see install()); off linux it is an empty directory. - include_dirs = { "*/include", "*", "mcpp_generated", "mcpp_generated/glib/include/glib-2.0" }, + include_dirs = { "*/include", "*", "mcpp_generated" }, -- mcpp#233/#240: every package in a link emits its objects into ONE -- flat obj/ dir keyed by source basename. Upstream's @@ -465,9 +463,9 @@ package = { }, linux = { - -- GLib owns and publishes its complete runtime closure in xim; - -- the consumer only names the public GIO link inputs. - cflags = { "-DEUI_TRAY_SNI=1", "-pthread" }, + -- The SNI backend exists only in 0.5.7. Keep this platform block + -- version-scoped at the package boundary rather than changing all + -- older published EUI-NEO builds. ldflags = { "-lpthread", "-ldl", "-lglib-2.0", "-lgio-2.0", "-lgobject-2.0" }, }, @@ -475,58 +473,6 @@ package = { } import("xim.libxpkg.pkginfo") -<<<<<<< HEAD -import("xim.libxpkg.system") -import("xim.libxpkg.log") - --- Libraries the SNI tray backend needs at runtime, COPIED into the payload --- so the link and the runtime closure both resolve inside one directory on --- the consumer's RPATH. Copies, not symlinks: the subos view is --- project-local while this payload is shared across projects, and a staged --- symlink dangles the moment the project that provided the view is not the --- one building (observed: `gio/gio.h file not found` off a shared payload --- pointing into a wiped project .mcpp/). The payload dir is --- version-immutable and already on the RPATH, so copies lose nothing. --- Two origins, in preference order: --- --- * the glib sonames and the xim-provided transitives (libffi / pcre2 / --- zlib — xim:glib's own deps) come from the subos view when published, --- else straight from the xim store. The view alone is NOT enough at --- hook time: a package already cached in the store skips the config() --- run that publishes it, so on a fresh project view the transitives --- can be missing even though the store holds them (observed). --- * libmount / libselinux / libblkid have NO xim provider yet: the --- xim:glib build links them, no xim package ships them. They are --- staged from the HOST with a warning, the same host-plane fallback --- compat.glx-runtime used before xim:graphics existed. The day xim --- gains util-linux/libselinux packages this branch is dead code; --- the day a host ships a glibc newer than the payload's, this is --- the mcpp#352 configuration again and the warn below says so. -local subos_sonames = { - "libglib-2.0.so", "libglib-2.0.so.0", - "libgio-2.0.so", "libgio-2.0.so.0", - "libgobject-2.0.so", "libgobject-2.0.so.0", - "libgmodule-2.0.so", "libgmodule-2.0.so.0", - "libgthread-2.0.so", "libgthread-2.0.so.0", - "libffi.so.8", - "libpcre2-8.so", "libpcre2-8.so.0", - "libz.so", "libz.so.1", -} -local host_fallback_sonames = { - "libmount.so.1", - "libselinux.so.1", - "libblkid.so.1", -} -local host_lib_dirs = { - "/usr/lib/x86_64-linux-gnu", "/lib/x86_64-linux-gnu", - "/usr/lib64", "/lib64", "/usr/lib", "/lib", -} - -function install() - -- Default extraction, which this package previously got by having no - -- hook at all: move the unpacked tarball into place (same idiom as - -- compat.glfw). -======= function install() -- The 0.5.7 GitHub archive is wrapped, while some mirrors unpack the @@ -534,7 +480,6 @@ function install() -- the descriptor's `*/` globs are evaluated. This hook is intentionally -- version-gated: older EUI-NEO releases retain their original install -- behavior and do not inherit the SNI-specific packaging. ->>>>>>> df1713c (fix(eui-neo): remove host GLib closure reconstruction) local srcdir = pkginfo.install_file():replace(".tar.gz", "") if not os.isdir(srcdir) then srcdir = "EUI-NEO-" .. pkginfo.version() @@ -543,15 +488,6 @@ function install() os.tryrm(idir) os.mv(srcdir, idir) -<<<<<<< HEAD - -- Normalize to the single wrap layer the descriptor's `*/` globs are - -- written against. Whether the tree arrives wrapped depends on the - -- fetch path: the GitHub tarball keeps its `EUI-NEO-/` top level, - -- the CN mirror's does not — observed on one machine, one version, - -- one day apart. Without this, which layout a consumer compiles is a - -- function of their mirror, and the losing side fails with - -- `"core/…" file not found` on the quoted includes. -======= if pkginfo.version() ~= "0.5.7" then return true end @@ -559,7 +495,6 @@ function install() return true end ->>>>>>> df1713c (fix(eui-neo): remove host GLib closure reconstruction) if os.isdir(path.join(idir, "core")) then local tmp = idir .. ".wrap-tmp" os.tryrm(tmp) @@ -567,213 +502,5 @@ function install() os.mkdir(idir) os.mv(tmp, path.join(idir, "EUI-NEO-" .. pkginfo.version())) end -<<<<<<< HEAD - - -- The staging dir exists on EVERY platform so the include_dirs entry - -- `mcpp_generated/glib/include/glib-2.0` never names a missing path; - -- only linux populates it. Off linux it stays an empty directory, - -- which as an -I is inert. - local gendir = path.join(pkginfo.install_dir(), "mcpp_generated", "glib") - local geninc = path.join(gendir, "include") - os.mkdir(path.join(geninc, "glib-2.0")) - - if os.host() ~= "linux" then - return true - end - - -- Resolver, in tier order. The subos VIEW (project-local) is consulted - -- first but is NOT reliable at hook time: entries appear there only - -- when the providing package's config() runs, and a package already - -- cached in the store skips that run — observed on a wiped .mcpp/ - -- where the view had the glib sonames but not pcre2/zlib/libffi yet. - -- The STORE (the xpkgs dir the payloads live in) is the stable source: - -- a package's files exist there from the moment it is fetched, which - -- for every xpm-level dep is strictly before this hook runs. - local subos = system.subos_sysrootdir() - local subos_lib = path.join(subos, "lib") - - local store_roots = {} - local function add_root(root) - if root and root ~= "" and os.isdir(root) then - for _, r in ipairs(store_roots) do - if r == root then return end - end - table.insert(store_roots, root) - end - end - add_root(path.directory(path.directory(idir))) - local xlh = os.getenv("XLINGS_HOME") - if xlh and xlh ~= "" then - add_root(path.join(xlh, "data", "xpkgs")) - end - - local from_store = {} - -- os.files/os.dirs are NOT in the xpm sandbox (install hook died on - -- exactly that); glob through the shell instead. One match per line, - -- no-match expands to an ls error that stderr's redirect swallows. - local function glob(pattern) - local out = {} - for line in os.iorun("sh -c 'ls -d " .. pattern .. " 2>/dev/null'"):gmatch("[^\n]+") do - table.insert(out, line) - end - return out - end - local function resolve(soname) - local in_view = path.join(subos_lib, soname) - if os.isfile(in_view) then - return in_view, false - end - for _, root in ipairs(store_roots) do - for _, hit in ipairs(glob(root .. "/*/*/lib/" .. soname)) do - if os.isfile(hit) then - return hit, true - end - end - end - return nil, false - end - - -- Headers, view first then the store (same race as the sonames). - local subos_glib_inc = path.join(subos, "usr", "include", "glib-2.0") - local glib_inc = nil - if os.isdir(subos_glib_inc) then - glib_inc = subos_glib_inc - else - for _, root in ipairs(store_roots) do - local hits = glob(root .. "/xim-x-glib/*/include/glib-2.0") - if #hits > 0 then - glib_inc = hits[1] - break - end - end - end - if not glib_inc then - log.error("glib-2.0 headers found neither in this subos nor in the " - .. "xim store. They come from `xim:glib` (declared as a " - .. "runtime dep at the xpm level); if it is declared and " - .. "this still fires, the stack did not finish installing") - return false - end - - -- COPY, not symlink. The subos view is project-local while this payload - -- is shared across projects: a symlink staged from the view dangles the - -- moment another project (or a wiped .mcpp/) is the one that builds — - -- observed as `gio/gio.h file not found` on a shared payload whose - -- staged link pointed into a deleted project view. The payload dir is - -- version-immutable and already on the consumer's RPATH, so copies are - -- also the stable indirection the glx-runtime note wants; a glib bump - -- simply rides the next eui-neo version. - os.tryrm(path.join(geninc, "glib-2.0")) - os.exec("cp -rL '" .. glib_inc .. "' '" .. geninc .. "'") - - local genlib = path.join(gendir, "lib") - os.mkdir(genlib) - local function stage(soname, src) - os.exec("cp -L '" .. src .. "' '" .. path.join(genlib, soname) .. "'") - end - - local missing = {} - for _, soname in ipairs(subos_sonames) do - local src, store_side = resolve(soname) - if src then - stage(soname, src) - if store_side then - table.insert(from_store, soname) - end - else - table.insert(missing, soname) - end - end - if #from_store > 0 then - log.warn("%s came from the xim store, bypassing a subos view that " - .. "had not published them yet (publish lists lag payloads — " - .. "libffi.so.8: openxlings/xim-pkgindex#676)", - table.concat(from_store, ", ")) - end - if #missing > 0 then - log.error("%s is in neither this subos nor the xim store — see the " - .. "header note about xim:glib", table.concat(missing, ", ")) - return false - end - - -- The host-plane fallback. Prefer the view/store for these too (a future - -- xim provider lands there without a descriptor change); only when both - -- have nothing do the host dirs get searched, loudly. - local from_host = {} - for _, soname in ipairs(host_fallback_sonames) do - local src = resolve(soname) - if not src then - for _, dir in ipairs(host_lib_dirs) do - local cand = path.join(dir, soname) - if os.isfile(cand) then - src = cand - break - end - end - end - if src then - stage(soname, src) - local host_origin = false - for _, dir in ipairs(host_lib_dirs) do - if src:sub(1, #dir) == dir then - host_origin = true - break - end - end - if host_origin then - table.insert(from_host, soname) - end - else - table.insert(missing, soname) - end - end - if #from_host > 0 then - log.warn("%s staged from the HOST: no xim package provides them yet " - .. "(xim:glib links libmount/libselinux; util-linux and " - .. "libselinux are not packaged). Built against the host's " - .. "glibc, they are the mcpp#352 configuration the day that " - .. "glibc overtakes the payload's", table.concat(from_host, ", ")) - end - - -- Versioned-symbol coherence: a HOST libselinux references pcre2 - -- symbols WITH version tags (PCRE2_10.xx), and a versioned reference - -- cannot bind to the xim pcre2's unversioned definitions — GNU ld - -- hard-errors at link time, lld lets it through to a runtime warning. - -- The reverse direction is fine (unversioned refs bind to versioned - -- defs), so when libselinux came from the host, pcre2 must too: - -- overwrite the xim-staged copy with the host's, which satisfies - -- both sides. Ubuntu and Fedora both ship libpcre2-8-0 by default. - local selinux_from_host = false - for _, soname in ipairs(from_host) do - if soname == "libselinux.so.1" then - selinux_from_host = true - break - end - end - if selinux_from_host then - local host_pcre = nil - for _, dir in ipairs(host_lib_dirs) do - local cand = path.join(dir, "libpcre2-8.so.0") - if os.isfile(cand) then - host_pcre = cand - break - end - end - if host_pcre then - stage("libpcre2-8.so.0", host_pcre) - else - log.warn("libselinux came from the host but libpcre2-8.so.0 did " - .. "not: the xim pcre2's unversioned symbols cannot " - .. "satisfy the host libselinux, and GNU ld will fail " - .. "the final link") - end - end - if #missing > 0 then - log.error("%s found neither in this subos, the xim store, nor on " - .. "the host", table.concat(missing, ", ")) - return false - end -======= ->>>>>>> df1713c (fix(eui-neo): remove host GLib closure reconstruction) return true end From cdacb42229d2abddc13633e8d81812f492061de4 Mon Sep 17 00:00:00 2001 From: FarnaHerry Date: Wed, 26 Aug 2026 21:13:03 +0800 Subject: [PATCH 07/24] fix(eui-neo): resolve generated platform source path --- pkgs/e/compat.eui-neo.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/e/compat.eui-neo.lua b/pkgs/e/compat.eui-neo.lua index eb9117d..279757c 100644 --- a/pkgs/e/compat.eui-neo.lua +++ b/pkgs/e/compat.eui-neo.lua @@ -174,7 +174,7 @@ package = { ]==], ["mcpp_generated/eui_neo_platform_tu.cpp"] = [==[ /* Uniquely named forwarding TU — see the mcpp#233 note in the descriptor. */ -#include "core/platform/platform.cpp" +#include "../core/platform/platform.cpp" ]==], }, From a846ae8f7561ba4be9e4e950901513aab6a013a3 Mon Sep 17 00:00:00 2001 From: FarnaHerry Date: Wed, 26 Aug 2026 21:46:52 +0800 Subject: [PATCH 08/24] fix(eui-neo): bridge platform header for generated TU --- pkgs/e/compat.eui-neo.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/e/compat.eui-neo.lua b/pkgs/e/compat.eui-neo.lua index 279757c..7101e3c 100644 --- a/pkgs/e/compat.eui-neo.lua +++ b/pkgs/e/compat.eui-neo.lua @@ -137,7 +137,7 @@ package = { -- `*/include` carries the umbrella `eui_neo.h` and `eui/*.h`; `*` is the -- verdir root, which is what makes the `"components/…"`, `"core/…"` and -- `"3rd/stb_image.h"` quoted includes resolve. Upstream marks both PUBLIC. - include_dirs = { "*/include", "*", "mcpp_generated" }, + include_dirs = { "*/include", "*", "mcpp_generated", "mcpp_generated/.." }, -- mcpp#233/#240: every package in a link emits its objects into ONE -- flat obj/ dir keyed by source basename. Upstream's @@ -171,6 +171,10 @@ package = { #if defined(MCPP_FEATURE_SDL2) # define EUI_WINDOW_BACKEND_SDL2 1 #endif +]==], + ["mcpp_generated/core/platform/platform.h"] = [==[ +/* Forward the upstream quoted include through the generated include root. */ +#include "../../../core/platform/platform.h" ]==], ["mcpp_generated/eui_neo_platform_tu.cpp"] = [==[ /* Uniquely named forwarding TU — see the mcpp#233 note in the descriptor. */ From 44bd72cc40a950dd4a9fbf86949cb0e0ecef0994 Mon Sep 17 00:00:00 2001 From: FarnaHerry Date: Wed, 26 Aug 2026 22:28:20 +0800 Subject: [PATCH 09/24] fix(eui-neo): expose archive root for platform includes --- pkgs/e/compat.eui-neo.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/e/compat.eui-neo.lua b/pkgs/e/compat.eui-neo.lua index 7101e3c..c2f4442 100644 --- a/pkgs/e/compat.eui-neo.lua +++ b/pkgs/e/compat.eui-neo.lua @@ -137,7 +137,7 @@ package = { -- `*/include` carries the umbrella `eui_neo.h` and `eui/*.h`; `*` is the -- verdir root, which is what makes the `"components/…"`, `"core/…"` and -- `"3rd/stb_image.h"` quoted includes resolve. Upstream marks both PUBLIC. - include_dirs = { "*/include", "*", "mcpp_generated", "mcpp_generated/.." }, + include_dirs = { "*/include", "*", "*/", "mcpp_generated" }, -- mcpp#233/#240: every package in a link emits its objects into ONE -- flat obj/ dir keyed by source basename. Upstream's From ab9e382bbf40e30287be17327dd0fe70c6d4ca9a Mon Sep 17 00:00:00 2001 From: FarnaHerry Date: Wed, 26 Aug 2026 22:58:24 +0800 Subject: [PATCH 10/24] fix(eui-neo): forward platform header from include root --- pkgs/e/compat.eui-neo.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/e/compat.eui-neo.lua b/pkgs/e/compat.eui-neo.lua index c2f4442..427dd9a 100644 --- a/pkgs/e/compat.eui-neo.lua +++ b/pkgs/e/compat.eui-neo.lua @@ -137,7 +137,7 @@ package = { -- `*/include` carries the umbrella `eui_neo.h` and `eui/*.h`; `*` is the -- verdir root, which is what makes the `"components/…"`, `"core/…"` and -- `"3rd/stb_image.h"` quoted includes resolve. Upstream marks both PUBLIC. - include_dirs = { "*/include", "*", "*/", "mcpp_generated" }, + include_dirs = { "*/include", "*", "mcpp_generated/include", "mcpp_generated" }, -- mcpp#233/#240: every package in a link emits its objects into ONE -- flat obj/ dir keyed by source basename. Upstream's @@ -172,9 +172,9 @@ package = { # define EUI_WINDOW_BACKEND_SDL2 1 #endif ]==], - ["mcpp_generated/core/platform/platform.h"] = [==[ + ["mcpp_generated/include/core/platform/platform.h"] = [==[ /* Forward the upstream quoted include through the generated include root. */ -#include "../../../core/platform/platform.h" +#include "../../../../core/platform/platform.h" ]==], ["mcpp_generated/eui_neo_platform_tu.cpp"] = [==[ /* Uniquely named forwarding TU — see the mcpp#233 note in the descriptor. */ From cb9f4c5b5bfe6ca3accdb27771d49571167eb312 Mon Sep 17 00:00:00 2001 From: FarnaHerry Date: Wed, 26 Aug 2026 23:27:32 +0800 Subject: [PATCH 11/24] fix(eui-neo): expose GLib as Linux build dependency --- pkgs/e/compat.eui-neo.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/e/compat.eui-neo.lua b/pkgs/e/compat.eui-neo.lua index 427dd9a..052f5bd 100644 --- a/pkgs/e/compat.eui-neo.lua +++ b/pkgs/e/compat.eui-neo.lua @@ -137,7 +137,7 @@ package = { -- `*/include` carries the umbrella `eui_neo.h` and `eui/*.h`; `*` is the -- verdir root, which is what makes the `"components/…"`, `"core/…"` and -- `"3rd/stb_image.h"` quoted includes resolve. Upstream marks both PUBLIC. - include_dirs = { "*/include", "*", "mcpp_generated/include", "mcpp_generated" }, + include_dirs = { "*/include", "*", "*/", "mcpp_generated/include", "mcpp_generated" }, -- mcpp#233/#240: every package in a link emits its objects into ONE -- flat obj/ dir keyed by source basename. Upstream's @@ -467,6 +467,7 @@ package = { }, linux = { + deps = { ["xim.glib"] = "2.80.0" }, -- The SNI backend exists only in 0.5.7. Keep this platform block -- version-scoped at the package boundary rather than changing all -- older published EUI-NEO builds. From c0c16251b86c46a2e082b595ddc09cb0e313bc86 Mon Sep 17 00:00:00 2001 From: FarnaHerry Date: Thu, 27 Aug 2026 08:28:04 +0800 Subject: [PATCH 12/24] ci: retry validation after runner startup failure From f167f78c3fbd1983862b7a9cedd963c9e067024f Mon Sep 17 00:00:00 2001 From: FarnaHerry Date: Thu, 27 Aug 2026 08:43:19 +0800 Subject: [PATCH 13/24] fix(eui-neo): forward window backend header --- pkgs/e/compat.eui-neo.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/e/compat.eui-neo.lua b/pkgs/e/compat.eui-neo.lua index 052f5bd..e64bef2 100644 --- a/pkgs/e/compat.eui-neo.lua +++ b/pkgs/e/compat.eui-neo.lua @@ -175,6 +175,10 @@ package = { ["mcpp_generated/include/core/platform/platform.h"] = [==[ /* Forward the upstream quoted include through the generated include root. */ #include "../../../../core/platform/platform.h" +]==], + ["mcpp_generated/include/core/window/window_backend.h"] = [==[ +/* Keep nested quoted includes rooted at the generated include directory. */ +#include "../../../../core/window/window_backend.h" ]==], ["mcpp_generated/eui_neo_platform_tu.cpp"] = [==[ /* Uniquely named forwarding TU — see the mcpp#233 note in the descriptor. */ From 41ed7b619dffb3f50da3b58a7c5f01ea61b03aa2 Mon Sep 17 00:00:00 2001 From: FarnaHerry Date: Thu, 27 Aug 2026 09:19:41 +0800 Subject: [PATCH 14/24] fix(eui-neo): restore native platform include layout --- pkgs/e/compat.eui-neo.lua | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/pkgs/e/compat.eui-neo.lua b/pkgs/e/compat.eui-neo.lua index e64bef2..279757c 100644 --- a/pkgs/e/compat.eui-neo.lua +++ b/pkgs/e/compat.eui-neo.lua @@ -137,7 +137,7 @@ package = { -- `*/include` carries the umbrella `eui_neo.h` and `eui/*.h`; `*` is the -- verdir root, which is what makes the `"components/…"`, `"core/…"` and -- `"3rd/stb_image.h"` quoted includes resolve. Upstream marks both PUBLIC. - include_dirs = { "*/include", "*", "*/", "mcpp_generated/include", "mcpp_generated" }, + include_dirs = { "*/include", "*", "mcpp_generated" }, -- mcpp#233/#240: every package in a link emits its objects into ONE -- flat obj/ dir keyed by source basename. Upstream's @@ -171,14 +171,6 @@ package = { #if defined(MCPP_FEATURE_SDL2) # define EUI_WINDOW_BACKEND_SDL2 1 #endif -]==], - ["mcpp_generated/include/core/platform/platform.h"] = [==[ -/* Forward the upstream quoted include through the generated include root. */ -#include "../../../../core/platform/platform.h" -]==], - ["mcpp_generated/include/core/window/window_backend.h"] = [==[ -/* Keep nested quoted includes rooted at the generated include directory. */ -#include "../../../../core/window/window_backend.h" ]==], ["mcpp_generated/eui_neo_platform_tu.cpp"] = [==[ /* Uniquely named forwarding TU — see the mcpp#233 note in the descriptor. */ @@ -471,7 +463,6 @@ package = { }, linux = { - deps = { ["xim.glib"] = "2.80.0" }, -- The SNI backend exists only in 0.5.7. Keep this platform block -- version-scoped at the package boundary rather than changing all -- older published EUI-NEO builds. From 63f9bef678cfd156d146841019f93afa8f104ab6 Mon Sep 17 00:00:00 2001 From: FarnaHerry Date: Thu, 27 Aug 2026 09:27:47 +0800 Subject: [PATCH 15/24] fix(eui-neo): expose archive root for platform includes --- pkgs/e/compat.eui-neo.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/e/compat.eui-neo.lua b/pkgs/e/compat.eui-neo.lua index 279757c..894a344 100644 --- a/pkgs/e/compat.eui-neo.lua +++ b/pkgs/e/compat.eui-neo.lua @@ -137,7 +137,7 @@ package = { -- `*/include` carries the umbrella `eui_neo.h` and `eui/*.h`; `*` is the -- verdir root, which is what makes the `"components/…"`, `"core/…"` and -- `"3rd/stb_image.h"` quoted includes resolve. Upstream marks both PUBLIC. - include_dirs = { "*/include", "*", "mcpp_generated" }, + include_dirs = { "*/include", "*", "*/", "mcpp_generated" }, -- mcpp#233/#240: every package in a link emits its objects into ONE -- flat obj/ dir keyed by source basename. Upstream's From 28b6afad8ccd0d0c64f19845535451defa5266b5 Mon Sep 17 00:00:00 2001 From: FarnaHerry Date: Thu, 27 Aug 2026 09:58:45 +0800 Subject: [PATCH 16/24] fix(eui-neo): restore native platform source include --- pkgs/e/compat.eui-neo.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/e/compat.eui-neo.lua b/pkgs/e/compat.eui-neo.lua index 894a344..ae65fca 100644 --- a/pkgs/e/compat.eui-neo.lua +++ b/pkgs/e/compat.eui-neo.lua @@ -174,7 +174,7 @@ package = { ]==], ["mcpp_generated/eui_neo_platform_tu.cpp"] = [==[ /* Uniquely named forwarding TU — see the mcpp#233 note in the descriptor. */ -#include "../core/platform/platform.cpp" +#include "core/platform/platform.cpp" ]==], }, From 1302c6cb7d008f2acf1bd037f584d48b4d101dc0 Mon Sep 17 00:00:00 2001 From: FarnaHerry Date: Thu, 27 Aug 2026 10:34:04 +0800 Subject: [PATCH 17/24] fix(eui-neo): bridge nested platform includes --- pkgs/e/compat.eui-neo.lua | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/pkgs/e/compat.eui-neo.lua b/pkgs/e/compat.eui-neo.lua index ae65fca..29065b1 100644 --- a/pkgs/e/compat.eui-neo.lua +++ b/pkgs/e/compat.eui-neo.lua @@ -137,7 +137,7 @@ package = { -- `*/include` carries the umbrella `eui_neo.h` and `eui/*.h`; `*` is the -- verdir root, which is what makes the `"components/…"`, `"core/…"` and -- `"3rd/stb_image.h"` quoted includes resolve. Upstream marks both PUBLIC. - include_dirs = { "*/include", "*", "*/", "mcpp_generated" }, + include_dirs = { "*/include", "*", "mcpp_generated/include", "mcpp_generated" }, -- mcpp#233/#240: every package in a link emits its objects into ONE -- flat obj/ dir keyed by source basename. Upstream's @@ -171,6 +171,22 @@ package = { #if defined(MCPP_FEATURE_SDL2) # define EUI_WINDOW_BACKEND_SDL2 1 #endif +]==], + ["mcpp_generated/include/core/platform/platform.h"] = [==[ +/* Keep upstream's core/... quoted include rooted at this generated include root. */ +#include "../../../../core/platform/platform.h" +]==], + ["mcpp_generated/include/core/window/window_backend.h"] = [==[ +/* Keep upstream's core/... quoted include rooted at this generated include root. */ +#include "../../../../core/window/window_backend.h" +]==], + ["mcpp_generated/include/core/window/window_types.h"] = [==[ +/* Keep upstream's core/... quoted include rooted at this generated include root. */ +#include "../../../../core/window/window_types.h" +]==], + ["mcpp_generated/include/core/platform/platform.cpp"] = [==[ +/* Include the upstream platform implementation from the generated include root. */ +#include "../../../../core/platform/platform.cpp" ]==], ["mcpp_generated/eui_neo_platform_tu.cpp"] = [==[ /* Uniquely named forwarding TU — see the mcpp#233 note in the descriptor. */ From ec30a5194bd52e2ccca75aedfc09e4bb9bc8de54 Mon Sep 17 00:00:00 2001 From: FarnaHerry Date: Thu, 27 Aug 2026 11:02:12 +0800 Subject: [PATCH 18/24] fix(eui-neo): bridge tray platform include --- pkgs/e/compat.eui-neo.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/e/compat.eui-neo.lua b/pkgs/e/compat.eui-neo.lua index 29065b1..d854ea0 100644 --- a/pkgs/e/compat.eui-neo.lua +++ b/pkgs/e/compat.eui-neo.lua @@ -175,6 +175,10 @@ package = { ["mcpp_generated/include/core/platform/platform.h"] = [==[ /* Keep upstream's core/... quoted include rooted at this generated include root. */ #include "../../../../core/platform/platform.h" +]==], + ["mcpp_generated/include/core/platform/tray_bridge.h"] = [==[ +/* Keep upstream's core/... quoted include rooted at this generated include root. */ +#include "../../../../core/platform/tray_bridge.h" ]==], ["mcpp_generated/include/core/window/window_backend.h"] = [==[ /* Keep upstream's core/... quoted include rooted at this generated include root. */ From d646f545396b282bf835655bc48e8241f2ad6aec Mon Sep 17 00:00:00 2001 From: FarnaHerry Date: Thu, 27 Aug 2026 11:29:57 +0800 Subject: [PATCH 19/24] fix(eui-neo): expose archive root includes --- pkgs/e/compat.eui-neo.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/e/compat.eui-neo.lua b/pkgs/e/compat.eui-neo.lua index d854ea0..24716d1 100644 --- a/pkgs/e/compat.eui-neo.lua +++ b/pkgs/e/compat.eui-neo.lua @@ -137,7 +137,7 @@ package = { -- `*/include` carries the umbrella `eui_neo.h` and `eui/*.h`; `*` is the -- verdir root, which is what makes the `"components/…"`, `"core/…"` and -- `"3rd/stb_image.h"` quoted includes resolve. Upstream marks both PUBLIC. - include_dirs = { "*/include", "*", "mcpp_generated/include", "mcpp_generated" }, + include_dirs = { "*/include", "*", "*/", "mcpp_generated/include", "mcpp_generated" }, -- mcpp#233/#240: every package in a link emits its objects into ONE -- flat obj/ dir keyed by source basename. Upstream's From 7ad565cbf696ed298eb3b60942b3dd146907f347 Mon Sep 17 00:00:00 2001 From: FarnaHerry Date: Thu, 27 Aug 2026 14:50:33 +0800 Subject: [PATCH 20/24] fix(eui-neo): revert to main source layout, drop generated wrappers --- pkgs/e/compat.eui-neo.lua | 46 ++++----------------------------------- 1 file changed, 4 insertions(+), 42 deletions(-) diff --git a/pkgs/e/compat.eui-neo.lua b/pkgs/e/compat.eui-neo.lua index 24716d1..c1422ef 100644 --- a/pkgs/e/compat.eui-neo.lua +++ b/pkgs/e/compat.eui-neo.lua @@ -137,7 +137,7 @@ package = { -- `*/include` carries the umbrella `eui_neo.h` and `eui/*.h`; `*` is the -- verdir root, which is what makes the `"components/…"`, `"core/…"` and -- `"3rd/stb_image.h"` quoted includes resolve. Upstream marks both PUBLIC. - include_dirs = { "*/include", "*", "*/", "mcpp_generated/include", "mcpp_generated" }, + include_dirs = { "*/include", "*" }, -- mcpp#233/#240: every package in a link emits its objects into ONE -- flat obj/ dir keyed by source basename. Upstream's @@ -171,30 +171,6 @@ package = { #if defined(MCPP_FEATURE_SDL2) # define EUI_WINDOW_BACKEND_SDL2 1 #endif -]==], - ["mcpp_generated/include/core/platform/platform.h"] = [==[ -/* Keep upstream's core/... quoted include rooted at this generated include root. */ -#include "../../../../core/platform/platform.h" -]==], - ["mcpp_generated/include/core/platform/tray_bridge.h"] = [==[ -/* Keep upstream's core/... quoted include rooted at this generated include root. */ -#include "../../../../core/platform/tray_bridge.h" -]==], - ["mcpp_generated/include/core/window/window_backend.h"] = [==[ -/* Keep upstream's core/... quoted include rooted at this generated include root. */ -#include "../../../../core/window/window_backend.h" -]==], - ["mcpp_generated/include/core/window/window_types.h"] = [==[ -/* Keep upstream's core/... quoted include rooted at this generated include root. */ -#include "../../../../core/window/window_types.h" -]==], - ["mcpp_generated/include/core/platform/platform.cpp"] = [==[ -/* Include the upstream platform implementation from the generated include root. */ -#include "../../../../core/platform/platform.cpp" -]==], - ["mcpp_generated/eui_neo_platform_tu.cpp"] = [==[ -/* Uniquely named forwarding TU — see the mcpp#233 note in the descriptor. */ -#include "core/platform/platform.cpp" ]==], }, @@ -207,8 +183,9 @@ package = { "*/core/platform/native_bridge.c", "*/core/platform/network.cpp", "*/core/platform/performance_stats.cpp", - -- core/platform/platform.cpp enters through the generated stub above. - "mcpp_generated/eui_neo_platform_tu.cpp", + -- core/platform/platform.cpp enters as a native source below; see + -- the mcpp#233 note for why it cannot be named `platform.cpp`. + "*/core/platform/platform.cpp", "*/core/platform/tray_bridge.c", -- Render layer (backend-agnostic) "*/core/render/image.cpp", @@ -507,20 +484,5 @@ function install() local idir = pkginfo.install_dir() os.tryrm(idir) os.mv(srcdir, idir) - - if pkginfo.version() ~= "0.5.7" then - return true - end - if os.host() ~= "linux" then - return true - end - - if os.isdir(path.join(idir, "core")) then - local tmp = idir .. ".wrap-tmp" - os.tryrm(tmp) - os.mv(idir, tmp) - os.mkdir(idir) - os.mv(tmp, path.join(idir, "EUI-NEO-" .. pkginfo.version())) - end return true end From 45797ce4636136e440f9358e4a2bf46003f15fd1 Mon Sep 17 00:00:00 2001 From: FarnaHerry Date: Thu, 27 Aug 2026 14:58:15 +0800 Subject: [PATCH 21/24] fix(eui-neo): restore main include dirs, keep native platform source --- pkgs/e/compat.eui-neo.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/e/compat.eui-neo.lua b/pkgs/e/compat.eui-neo.lua index c1422ef..51e895a 100644 --- a/pkgs/e/compat.eui-neo.lua +++ b/pkgs/e/compat.eui-neo.lua @@ -137,7 +137,7 @@ package = { -- `*/include` carries the umbrella `eui_neo.h` and `eui/*.h`; `*` is the -- verdir root, which is what makes the `"components/…"`, `"core/…"` and -- `"3rd/stb_image.h"` quoted includes resolve. Upstream marks both PUBLIC. - include_dirs = { "*/include", "*" }, + include_dirs = { "*/include", "*", "mcpp_generated" }, -- mcpp#233/#240: every package in a link emits its objects into ONE -- flat obj/ dir keyed by source basename. Upstream's From 87dc59290830b6ddb40147ea16782a42af6aa806 Mon Sep 17 00:00:00 2001 From: FarnaHerry Date: Thu, 27 Aug 2026 15:12:10 +0800 Subject: [PATCH 22/24] fix(eui-neo): expose archive core dir to consumer includes --- pkgs/e/compat.eui-neo.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/e/compat.eui-neo.lua b/pkgs/e/compat.eui-neo.lua index 51e895a..139b6a4 100644 --- a/pkgs/e/compat.eui-neo.lua +++ b/pkgs/e/compat.eui-neo.lua @@ -136,8 +136,10 @@ package = { -- `*/include` carries the umbrella `eui_neo.h` and `eui/*.h`; `*` is the -- verdir root, which is what makes the `"components/…"`, `"core/…"` and - -- `"3rd/stb_image.h"` quoted includes resolve. Upstream marks both PUBLIC. - include_dirs = { "*/include", "*", "mcpp_generated" }, + -- `"3rd/stb_image.h"` quoted includes resolve; `*/core` exposes the + -- archive-root `core/` subtree (`core/dsl.h` etc.) to consumer includes. + -- Upstream marks both PUBLIC. + include_dirs = { "*/include", "*", "*/core", "mcpp_generated" }, -- mcpp#233/#240: every package in a link emits its objects into ONE -- flat obj/ dir keyed by source basename. Upstream's From b81d4613eccd1a40a69f6baa98cb10cfe8b34b43 Mon Sep 17 00:00:00 2001 From: FarnaHerry Date: Thu, 27 Aug 2026 16:47:14 +0800 Subject: [PATCH 23/24] fix(eui-neo): revert to main descriptor, keep pure unpack hook --- pkgs/e/compat.eui-neo.lua | 50 +++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/pkgs/e/compat.eui-neo.lua b/pkgs/e/compat.eui-neo.lua index 139b6a4..cf1c758 100644 --- a/pkgs/e/compat.eui-neo.lua +++ b/pkgs/e/compat.eui-neo.lua @@ -27,15 +27,15 @@ -- descriptor names is byte-identical in upstream's CORE_SOURCES. -- -- 0.5.7: CORE_SOURCES is byte-identical to 0.5.6, so the lib's shape does not --- change; the version's real moves are the linux tray backend (SNI over GDBus +-- change; the version's real moves are the linux tray default (SNI over GDBus -- via glib/gio, replacing the dead GTK3+libappindicator path — tray_bridge.c --- speaks freedesktop StatusNotifierItem when EUI_TRAY_SNI is set, which this --- descriptor now does on linux, wiring glib through `xim:glib` and the --- staging install() hook below) and SDL2-only input fixes (SDL_GetMouseFocus, --- pointer/button mapping) plus X11 resource handling in the SDL2 window --- backend. The new `EUI_ENABLE_TRAY` option does not affect this package: --- tray_bridge.c is in CORE_SOURCES unconditionally and the define selects --- which backend its body compiles to. +-- now speaks freedesktop SNI when EUI_TRAY_SNI is set, which `compat.tray` +-- never feeds) and SDL2-only input fixes (SDL_GetMouseFocus, pointer/button +-- mapping) plus X11 resource handling in the SDL2 window backend. None of that +-- touches the sources this descriptor compiles: `compat.tray` does not provide +-- GDBus, so the linux leg still builds the EUI_TRAY_HAS_BACKEND=0 stub exactly +-- as before, and the x11_*.cpp / tray-gio pieces are not in CORE_SOURCES. +-- The new `EUI_ENABLE_TRAY` option does not affect this package either. -- -- All `mcpp` paths are GLOBS relative to the verdir; the leading `*/` absorbs -- the GitHub tarball's `EUI-NEO-0.5.7/` wrap layer. @@ -50,11 +50,6 @@ package = { xpm = { linux = { - -- 0.5.7: tray_bridge.c (:207) speaks freedesktop StatusNotifierItem - -- over GDBus when EUI_TRAY_SNI is set — no GTK3, no libappindicator. - -- GLib owns and publishes its complete runtime closure in xim: - -- compat.eui-neo only consumes the declared SubOS headers/libs. - deps = { runtime = { "xim:glib@2.80.0" } }, ["0.5.3"] = { url = { GLOBAL = "https://github.com/sudoevolve/EUI-NEO/archive/refs/tags/v0.5.3.tar.gz", CN = "https://gitcode.com/mcpp-res/eui-neo/releases/download/0.5.3/eui-neo-0.5.3.tar.gz" }, @@ -136,10 +131,8 @@ package = { -- `*/include` carries the umbrella `eui_neo.h` and `eui/*.h`; `*` is the -- verdir root, which is what makes the `"components/…"`, `"core/…"` and - -- `"3rd/stb_image.h"` quoted includes resolve; `*/core` exposes the - -- archive-root `core/` subtree (`core/dsl.h` etc.) to consumer includes. - -- Upstream marks both PUBLIC. - include_dirs = { "*/include", "*", "*/core", "mcpp_generated" }, + -- `"3rd/stb_image.h"` quoted includes resolve. Upstream marks both PUBLIC. + include_dirs = { "*/include", "*", "mcpp_generated" }, -- mcpp#233/#240: every package in a link emits its objects into ONE -- flat obj/ dir keyed by source basename. Upstream's @@ -173,6 +166,10 @@ package = { #if defined(MCPP_FEATURE_SDL2) # define EUI_WINDOW_BACKEND_SDL2 1 #endif +]==], + ["mcpp_generated/eui_neo_platform_tu.cpp"] = [==[ +/* Uniquely named forwarding TU — see the mcpp#233 note in the descriptor. */ +#include "core/platform/platform.cpp" ]==], }, @@ -185,9 +182,8 @@ package = { "*/core/platform/native_bridge.c", "*/core/platform/network.cpp", "*/core/platform/performance_stats.cpp", - -- core/platform/platform.cpp enters as a native source below; see - -- the mcpp#233 note for why it cannot be named `platform.cpp`. - "*/core/platform/platform.cpp", + -- core/platform/platform.cpp enters through the generated stub above. + "mcpp_generated/eui_neo_platform_tu.cpp", "*/core/platform/tray_bridge.c", -- Render layer (backend-agnostic) "*/core/render/image.cpp", @@ -462,11 +458,13 @@ package = { }, linux = { - -- The SNI backend exists only in 0.5.7. Keep this platform block - -- version-scoped at the package boundary rather than changing all - -- older published EUI-NEO builds. - ldflags = { "-lpthread", "-ldl", - "-lglib-2.0", "-lgio-2.0", "-lgobject-2.0" }, + -- No tray define on purpose. Upstream only sets + -- EUI_TRAY_APPINDICATOR when pkg-config finds GTK3 AND + -- libappindicator; this index has neither, so tray_bridge.c + -- compiles its EUI_TRAY_HAS_BACKEND=0 stub — which is exactly + -- what upstream does on a machine without those dev packages. + -- `-ldl` is glad's CMAKE_DL_LIBS. + ldflags = { "-lpthread", "-ldl" }, }, }, } @@ -478,7 +476,7 @@ function install() -- same tree without that top-level directory. Normalize the tree before -- the descriptor's `*/` globs are evaluated. This hook is intentionally -- version-gated: older EUI-NEO releases retain their original install - -- behavior and do not inherit the SNI-specific packaging. + -- behavior. local srcdir = pkginfo.install_file():replace(".tar.gz", "") if not os.isdir(srcdir) then srcdir = "EUI-NEO-" .. pkginfo.version() From 102162743689d24f5051f3c753b517201d04a480 Mon Sep 17 00:00:00 2001 From: FarnaHerry Date: Thu, 27 Aug 2026 17:27:01 +0800 Subject: [PATCH 24/24] fix(eui-neo): restore upstream package layout --- pkgs/e/compat.eui-neo.lua | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/pkgs/e/compat.eui-neo.lua b/pkgs/e/compat.eui-neo.lua index cf1c758..f7dcbe1 100644 --- a/pkgs/e/compat.eui-neo.lua +++ b/pkgs/e/compat.eui-neo.lua @@ -468,21 +468,3 @@ package = { }, }, } - -import("xim.libxpkg.pkginfo") - -function install() - -- The 0.5.7 GitHub archive is wrapped, while some mirrors unpack the - -- same tree without that top-level directory. Normalize the tree before - -- the descriptor's `*/` globs are evaluated. This hook is intentionally - -- version-gated: older EUI-NEO releases retain their original install - -- behavior. - local srcdir = pkginfo.install_file():replace(".tar.gz", "") - if not os.isdir(srcdir) then - srcdir = "EUI-NEO-" .. pkginfo.version() - end - local idir = pkginfo.install_dir() - os.tryrm(idir) - os.mv(srcdir, idir) - return true -end