In our two zig ports (www/superhtml and wayland/river) we missed a crucial
detail about zig default settings:
https://zig.guide/build-system/cross-compilation/
"[...] As Zig compiles for your specific CPU by default, these binaries may not
run on other computers with slightly different CPU architectures. It may be
useful to instead specify a specific baseline CPU model for greater
compatibility. [...]"
That means that at least on my system, the packaged binary for wayland/river
won't run. For www/superhtml, setting a more generic -Dcpu fixed the problem -
so I propose to apply it to wayland/river as well.
While here, I'm making another attempt at proposing --verbose and disabling
--color, to make the build output more palatable. Also the build should consider
${MAKE_JOBS}.
Tested on amd64 and arm64. ok?
Index: Makefile
===================================================================
RCS file: /cvs/ports/wayland/river/Makefile,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 Makefile
--- Makefile 14 Jun 2026 06:17:39 -0000 1.1.1.1
+++ Makefile 5 Jul 2026 08:19:27 -0000
@@ -11,6 +11,7 @@ DIST_TUPLE += codeberg ziglang translate
57c559cf581b1fcad90494eda219f98abeb155ce .
DIST_TUPLE += github Vexu arocc \
5f5a050569a95ecc40a426f0c3666ae7ef987ede .
+REVISION = 0
CATEGORIES = wayland
@@ -55,11 +56,16 @@ ZIG_PKGDIR = ${WRKBUILD}/zig-packages
MAKE_ENV += ZIG_GLOBAL_CACHE_DIR=${WRKBUILD}/zig-global-cache \
ZIG_LOCAL_CACHE_DIR=${WRKBUILD}/zig-local-cache
+ZIG_CPU = ${ARCH:S/amd64/x86_64/:S/arm64/generic/}
# --system disables all network access; zig will error if a package is
# missing from ZIG_PKGDIR instead of silently fetching it.
ZIG_FLAGS = --system ${ZIG_PKGDIR} \
--global-cache-dir ${WRKBUILD}/zig-global-cache \
--cache-dir ${WRKBUILD}/zig-local-cache \
+ --color off \
+ --verbose \
+ -j${MAKE_JOBS} \
+ -Dcpu=${ZIG_CPU} \
-Doptimize=ReleaseSafe \
-Dllvm=true \
-Dpie=true \