diff --git a/common/build-style/zig-build.sh b/common/build-style/zig-build.sh index 5c334b1e1e5110..c888a9b5eb7ff4 100644 --- a/common/build-style/zig-build.sh +++ b/common/build-style/zig-build.sh @@ -1,5 +1,5 @@ do_build() { - local zig_target zig_cpu + local zig_target zig_cpu zig_search_prefix # TODO: This duplication between build-profiles and cross-profiles # is totally unnecessary. It would be nice if there was some way to @@ -7,9 +7,11 @@ do_build() { if [ "$CROSS_BUILD" ]; then zig_target="${XBPS_CROSS_ZIG_TARGET}" zig_cpu="${XBPS_CROSS_ZIG_CPU}" + zig_search_prefix=/ else zig_target="${XBPS_ZIG_TARGET}" zig_cpu="${XBPS_ZIG_CPU}" + zig_search_prefix=/usr fi # Inform zig of the required libc include paths. @@ -30,8 +32,8 @@ do_build() { # prefix used by the zig build system. DESTDIR="zig-out" zig build \ -j"${XBPS_MAKEJOBS}" \ - --sysroot "${XBPS_CROSS_BASE}" \ - --search-prefix "${XBPS_CROSS_BASE}/usr" \ + --sysroot "${XBPS_CROSS_BASE:-/}" \ + --search-prefix "${zig_search_prefix}" \ --prefix /usr \ --global-cache-dir /host/zig \ --libc xbps_zig_libc.txt \ diff --git a/srcpkgs/linuxwave/template b/srcpkgs/linuxwave/template index 7af1d8db42ba9a..09f8e8a670efcf 100644 --- a/srcpkgs/linuxwave/template +++ b/srcpkgs/linuxwave/template @@ -1,15 +1,16 @@ # Template file for 'linuxwave' pkgname=linuxwave -version=0.2.0 +version=0.4.0 revision=1 build_style=zig-build +configure_args="-Dpie" short_desc="Generate music from the entropy of Linux" maintainer="tranzystorekk " license="MIT" homepage="https://orhun.dev/linuxwave/" changelog="https://raw.githubusercontent.com/orhun/linuxwave/main/CHANGELOG.md" -distfiles="https://github.com/orhun/linuxwave/releases/download/v${version}/v${version}.tar.gz" -checksum=593b05809f68c830c95a3176fbec358306aff19238ca2ecdacfbeaabfefdab83 +distfiles="https://github.com/orhun/linuxwave/archive/refs/tags/v${version}.tar.gz" +checksum=be5a2c9e5c59e3b241f9065cd922aace8595fbe2123843a6e3a43757b86f5ffe post_install() { vlicense LICENSE diff --git a/srcpkgs/river-classic/template b/srcpkgs/river-classic/template new file mode 100644 index 00000000000000..38bb023f35e649 --- /dev/null +++ b/srcpkgs/river-classic/template @@ -0,0 +1,27 @@ +# Template file for 'river-classic' +pkgname=river-classic +version=0.3.17 +revision=1 +build_style=zig-build +configure_args="-Dpie -Dllvm $(vopt_if xwayland -Dxwayland)" +hostmakedepends="pkg-config scdoc" +makedepends="libevdev-devel libxkbcommon-devel pixman-devel wayland-devel wlroots0.20-devel" +depends="$(vopt_if xwayland xorg-server-xwayland)" +short_desc="Dynamic tiling Wayland compositor with flexible runtime configuration" +maintainer="tranzystorekk " +license="GPL-3.0-or-later" +homepage="https://codeberg.org/river/river-classic" +changelog="https://codeberg.org/river/river-classic/releases" +distfiles="https://codeberg.org/river/river-classic/releases/download/v${version}/river-classic-${version}.tar.gz" +checksum=ecd5e632a417b1d79e23180bf0073c8d8f849180ebb9138e5fa71ec8bfe15fdd +conflicts="river>=0" +nocross="translate-c complains about compiler_rt for wrong target" + +build_options="xwayland" +build_options_default="xwayland" +desc_option_xwayland="Enable Xwayland support" + +post_install() { + vinstall contrib/river.desktop 644 usr/share/wayland-sessions + vsconf example/init +} diff --git a/srcpkgs/river/INSTALL.msg b/srcpkgs/river/INSTALL.msg new file mode 100644 index 00000000000000..8e44f2ab48eee4 --- /dev/null +++ b/srcpkgs/river/INSTALL.msg @@ -0,0 +1,11 @@ +With the 0.4 release, river no longer provides a Wayland window manager. +Instead, you need to use a separate window manager that implements river's protocol. + +A forked 0.3 package providing the legacy self-contained experience is also available: river-classic + +You can find packaged window managers for river by running: + +xbps-query -Rp provides -s river-wm + +More info: https://isaacfreund.com/blog/river-window-management/ +River WM list: https://codeberg.org/river/wiki/src/branch/main/pages/wm-list.md diff --git a/srcpkgs/river/template b/srcpkgs/river/template index c61fce973e913a..79d4f53ef316c0 100644 --- a/srcpkgs/river/template +++ b/srcpkgs/river/template @@ -1,20 +1,21 @@ # Template file for 'river' pkgname=river -version=0.3.7 +version=0.4.5 revision=1 -archs="~i686* ~armv6l* ~armv7l*" build_style=zig-build -configure_args="$(vopt_if xwayland -Dxwayland) -Dpie" +configure_args="-Dpie -Dllvm $(vopt_if xwayland -Dxwayland)" hostmakedepends="pkg-config wayland-devel scdoc" -makedepends="wlroots0.18-devel libevdev-devel pixman-devel +makedepends="wlroots0.20-devel libevdev-devel pixman-devel wayland-protocols libxkbcommon-devel wayland-devel" depends="$(vopt_if xwayland xorg-server-xwayland)" short_desc="Dynamic tiling Wayland compositor" maintainer="Orphaned " license="GPL-3.0-only" homepage="https://codeberg.org/river/river" +changelog="https://codeberg.org/river/river/releases" distfiles="https://codeberg.org/river/river/releases/download/v${version}/river-${version}.tar.gz" -checksum=a6007ff0ad1cd46b2229661c28e4602aa6fe160872293f0749c17fa95b78a873 +checksum=91d77f58bd20c7cfbd6656000474967635f9ddaa9779824c3684270e34f28147 +nocross="translate-c complains about compiler_rt for wrong target" build_options="xwayland" build_options_default="xwayland" @@ -22,5 +23,4 @@ desc_option_xwayland="Enable Xwayland support" post_install() { vinstall contrib/river.desktop 644 usr/share/wayland-sessions - vsconf example/init } diff --git a/srcpkgs/waylock/patches/use-translate-c.patch b/srcpkgs/waylock/patches/use-translate-c.patch new file mode 100644 index 00000000000000..ad9b394ccc76b3 --- /dev/null +++ b/srcpkgs/waylock/patches/use-translate-c.patch @@ -0,0 +1,54 @@ +diff --git a/build.zig b/build.zig +index cdbe456..d13ad6a 100644 +--- a/build.zig ++++ b/build.zig +@@ -91,6 +91,12 @@ pub fn build(b: *Build) !void { + const wayland = b.createModule(.{ .root_source_file = scanner.result }); + const xkbcommon = b.dependency("xkbcommon", .{}).module("xkbcommon"); + ++ const translate_c = b.addTranslateC(.{ ++ .root_source_file = b.path("src/c.h"), ++ .target = target, ++ .optimize = optimize, ++ }); ++ + const waylock = b.addExecutable(.{ + .name = "waylock", + .root_module = b.createModule(.{ +@@ -99,6 +105,12 @@ pub fn build(b: *Build) !void { + .optimize = optimize, + .link_libc = true, + .strip = strip, ++ .imports = &.{ ++ .{ ++ .name = "c", ++ .module = translate_c.createModule(), ++ }, ++ }, + }), + .use_llvm = use_llvm, + .use_lld = use_llvm, +diff --git a/src/auth.zig b/src/auth.zig +index 83fa68f..1ad06fe 100644 +--- a/src/auth.zig ++++ b/src/auth.zig +@@ -8,10 +8,7 @@ const process = std.process; + const fatal = process.fatal; + const system = std.posix.system; + +-const c = @cImport({ +- @cInclude("unistd.h"); // getuid() +- @cInclude("pwd.h"); // getpwuid() +-}); ++const c = @import("c"); + + const pam = @import("pam.zig"); + +diff --git a/src/c.h b/src/c.h +new file mode 100644 +index 0000000..5d84a42 +--- /dev/null ++++ b/src/c.h +@@ -0,0 +1,2 @@ ++#include ++#include diff --git a/srcpkgs/waylock/template b/srcpkgs/waylock/template index de1d55799f9533..38d74e531fabe0 100644 --- a/srcpkgs/waylock/template +++ b/srcpkgs/waylock/template @@ -1,9 +1,9 @@ # Template file for 'waylock' pkgname=waylock -version=1.3.0 +version=1.6.0 revision=1 build_style=zig-build -configure_args="-Dpie" +configure_args="-Dpie -Dllvm" hostmakedepends="pkg-config wayland-devel scdoc" makedepends="libxkbcommon-devel pam-devel wayland-protocols wayland-devel" short_desc="Simple screenlocker for wayland compositors" @@ -11,7 +11,7 @@ maintainer="Orphaned " license="ISC" homepage="https://codeberg.org/ifreund/waylock" distfiles="https://codeberg.org/ifreund/waylock/releases/download/v${version}/waylock-${version}.tar.gz" -checksum=b7ec04c1dc0c6adb47045b4f604cb35988e9ca93bd4f3317fcc91bfac7bf075a +checksum=b27ba39bbdb8f9a99fbb9a454a13e456ecdc6a0e8cc3145eb08f4f623a191e94 post_install() { vlicense LICENSE diff --git a/srcpkgs/zig/template b/srcpkgs/zig/template index c70e908c3842be..07d6acf88ad7da 100644 --- a/srcpkgs/zig/template +++ b/srcpkgs/zig/template @@ -1,25 +1,23 @@ # Template file for 'zig' pkgname=zig -version=0.13.0 +version=0.16.0 revision=1 archs="x86_64* aarch64*" build_style=cmake -configure_args="-DZIG_TARGET_MCPU=baseline" -make_cmd=make +configure_args="-DZIG_TARGET_MCPU=baseline -DZIG_PIE=ON" +_llvmver=21 # we add xml2, zstd, zlib and ncurses # because our lld is static-only and requires those to work -makedepends="clang18-devel llvm18-devel lld18-devel libxml2-devel libzstd-devel ncurses-devel zlib-devel" +makedepends="clang${_llvmver}-devel llvm${_llvmver}-devel lld${_llvmver}-devel + libxml2-devel libzstd-devel ncurses-devel zlib-devel" short_desc="Programming language designed for robustness, optimality, and clarity" maintainer="Orphaned " license="MIT" homepage="https://ziglang.org" distfiles="https://ziglang.org/download/${version}/zig-${version}.tar.xz" -checksum=06c73596beeccb71cc073805bdb9c0e05764128f16478fa53bf17dfabc1d4318 -nopie=yes +checksum=43186959edc87d5c7a1be7b7d2a25efffd22ce5807c7af99067f86f99641bfdf nocross=yes -export CMAKE_GENERATOR="Unix Makefiles" - post_install() { vlicense LICENSE } diff --git a/srcpkgs/zls/template b/srcpkgs/zls/template index 887475ed8d2eab..7937121b187cb2 100644 --- a/srcpkgs/zls/template +++ b/srcpkgs/zls/template @@ -1,23 +1,19 @@ # Template file for 'zls' pkgname=zls -version=0.13.0 +version=0.16.0 revision=1 build_style=zig-build -configure_args="-Dpie" short_desc="Zig language server" maintainer="Orphaned " license="MIT" homepage="https://github.com/zigtools/zls" -_tracy_gitrev="37aff70dfa50cf6307b3fee6074d627dc2929143" -distfiles="https://github.com/zigtools/zls/archive/refs/tags/${version}.tar.gz - https://github.com/wolfpld/tracy/archive/${_tracy_gitrev}.tar.gz" -checksum="2e8046b6b0de765a4bf4bb828345e2badc8b828bc257dc931d0f56b147684d9f - c24ce6179df7efb8a114fe409d197e26e4b937c6fc1258bea15840b15b1f79ff" -skip_extraction="${_tracy_gitrev}.tar.gz" +distfiles="https://github.com/zigtools/zls/archive/refs/tags/${version}.tar.gz" +checksum=e7c5936f5b3a057ce851be0876e4e259b5c4d02f9aae038cd24a5d6b586b029f -post_extract() { - vsrcextract -C src/tracy ${_tracy_gitrev}.tar.gz -} +case "${XBPS_TARGET_MACHINE}" in + armv[67]*) nopie=yes ;; + *) configure_args+=" -Dpie" ;; +esac post_install() { vlicense LICENSE