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/patches/revert-translate-c.patch b/srcpkgs/river/patches/revert-translate-c.patch new file mode 100644 index 00000000000000..f00c9ec8eff86b --- /dev/null +++ b/srcpkgs/river/patches/revert-translate-c.patch @@ -0,0 +1,166 @@ +diff --git a/build.zig b/build.zig +index 664f1af..17db013 100644 +--- a/build.zig ++++ b/build.zig +@@ -11,7 +11,6 @@ const manifest = @import("build.zig.zon"); + const version = manifest.version; + + const Scanner = @import("wayland").Scanner; +-const Translator = @import("translate_c").Translator; + + pub fn build(b: *Build) !void { + const target = b.standardTargetOptions(.{}); +@@ -150,15 +149,6 @@ pub fn build(b: *Build) !void { + const flags = b.createModule(.{ .root_source_file = b.path("common/flags.zig") }); + const slotmap = b.createModule(.{ .root_source_file = b.path("common/slotmap.zig") }); + +- const translate_c: Translator = .init(b.dependency("translate_c", .{}), .{ +- .name = "c", +- .c_source_file = b.path("river/c.h"), +- .target = target, +- .optimize = optimize, +- }); +- translate_c.linkSystemLibrary("libevdev", .{}); +- translate_c.linkSystemLibrary("libinput", .{}); +- + { + const river = b.addExecutable(.{ + .name = "river", +@@ -186,7 +176,6 @@ pub fn build(b: *Build) !void { + river.root_module.addImport("wlroots", wlroots); + river.root_module.addImport("flags", flags); + river.root_module.addImport("slotmap", slotmap); +- river.root_module.addImport("c", translate_c.mod); + + river.root_module.addCSourceFile(.{ + .file = b.path("river/wlroots_log_wrapper.c"), +diff --git a/build.zig.zon b/build.zig.zon +index 15fb9db..1e3b06c 100644 +--- a/build.zig.zon ++++ b/build.zig.zon +@@ -27,10 +27,6 @@ + .url = "https://codeberg.org/ifreund/zig-xkbcommon/archive/v0.4.0.tar.gz", + .hash = "xkbcommon-0.4.0-VDqIe0i2AgDRsok2GpMFYJ8SVhQS10_PI2M_CnHXsJJZ", + }, +- .translate_c = .{ +- .url = "git+https://codeberg.org/ifreund/translate-c?ref=fix-shift-assign#fdf30e6298cd1184ae6da5602aff0cb5d4cde4cb", +- .hash = "translate_c-0.0.0-Q_BUWrT0BgDOFSyiz0UVBIpBe3-CiEqx9ej2EecgKcBD", +- }, + }, + .fingerprint = 0xf5e3672b8e8d6efc, + } +diff --git a/river/InputDevice.zig b/river/InputDevice.zig +index 060e595..3b04875 100644 +--- a/river/InputDevice.zig ++++ b/river/InputDevice.zig +@@ -10,7 +10,7 @@ const wlr = @import("wlroots"); + const wl = @import("wayland").server.wl; + const river = @import("wayland").server.river; + +-const c = @import("c"); ++const c = @import("c.zig").c; + const server = &@import("main.zig").server; + const util = @import("util.zig"); + +diff --git a/river/LibinputAccelConfig.zig b/river/LibinputAccelConfig.zig +index 2553572..ec1a182 100644 +--- a/river/LibinputAccelConfig.zig ++++ b/river/LibinputAccelConfig.zig +@@ -9,7 +9,7 @@ const wayland = @import("wayland"); + const wl = wayland.server.wl; + const river = wayland.server.river; + +-const c = @import("c"); ++const c = @import("c.zig").c; + const server = &@import("main.zig").server; + const util = @import("util.zig"); + +diff --git a/river/LibinputConfig.zig b/river/LibinputConfig.zig +index fb20a22..b194a3f 100644 +--- a/river/LibinputConfig.zig ++++ b/river/LibinputConfig.zig +@@ -8,7 +8,7 @@ const assert = std.debug.assert; + const wl = @import("wayland").server.wl; + const river = @import("wayland").server.river; + +-const c = @import("c"); ++const c = @import("c.zig").c; + const server = &@import("main.zig").server; + + const LibinputAccelConfig = @import("LibinputAccelConfig.zig"); +diff --git a/river/LibinputDevice.zig b/river/LibinputDevice.zig +index 183d7ee..c6d716d 100644 +--- a/river/LibinputDevice.zig ++++ b/river/LibinputDevice.zig +@@ -10,7 +10,7 @@ const wlr = @import("wlroots"); + const wl = @import("wayland").server.wl; + const river = @import("wayland").server.river; + +-const c = @import("c"); ++const c = @import("c.zig").c; + const server = &@import("main.zig").server; + const util = @import("util.zig"); + +diff --git a/river/PointerBinding.zig b/river/PointerBinding.zig +index 5a645ef..d1d3d50 100644 +--- a/river/PointerBinding.zig ++++ b/river/PointerBinding.zig +@@ -10,7 +10,7 @@ const wayland = @import("wayland"); + const wl = wayland.server.wl; + const river = wayland.server.river; + +-const c = @import("c"); ++const c = @import("c.zig").c; + const server = &@import("main.zig").server; + const util = @import("util.zig"); + +diff --git a/river/Server.zig b/river/Server.zig +index 9fb6846..31f9a6d 100644 +--- a/river/Server.zig ++++ b/river/Server.zig +@@ -13,6 +13,7 @@ const wayland = @import("wayland"); + const wl = wayland.server.wl; + const wp = wayland.server.wp; + ++const c = @import("c.zig").c; + const util = @import("util.zig"); + + const IdleInhibitManager = @import("IdleInhibitManager.zig"); +diff --git a/river/c.h b/river/c.h +deleted file mode 100644 +index a13f2b0..0000000 +--- a/river/c.h ++++ /dev/null +@@ -1,6 +0,0 @@ +-// SPDX-FileCopyrightText: © 2020 The River Developers +-// SPDX-License-Identifier: GPL-3.0-only +- +-#include +-#include +-#include +diff --git a/river/c.zig b/river/c.zig +new file mode 100644 +index 0000000..aead518 +--- /dev/null ++++ b/river/c.zig +@@ -0,0 +1,8 @@ ++// SPDX-FileCopyrightText: © 2020 The River Developers ++// SPDX-License-Identifier: GPL-3.0-only ++ ++pub const c = @cImport({ ++ @cInclude("linux/input-event-codes.h"); ++ @cInclude("libevdev/libevdev.h"); ++ @cInclude("libinput.h"); ++}); +diff --git a/river/main.zig b/river/main.zig +index 9a55121..195fa06 100644 +--- a/river/main.zig ++++ b/river/main.zig +@@ -14,6 +14,7 @@ const builtin = @import("builtin"); + const wlr = @import("wlroots"); + const flags = @import("flags"); + ++const c = @import("c.zig").c; + const util = @import("util.zig"); + const process = @import("process.zig"); + diff --git a/srcpkgs/river/template b/srcpkgs/river/template index c61fce973e913a..63622d9fd206dc 100644 --- a/srcpkgs/river/template +++ b/srcpkgs/river/template @@ -1,12 +1,12 @@ # Template file for 'river' pkgname=river -version=0.3.7 +version=0.4.4 revision=1 archs="~i686* ~armv6l* ~armv7l*" build_style=zig-build configure_args="$(vopt_if xwayland -Dxwayland) -Dpie" 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" @@ -14,7 +14,7 @@ maintainer="Orphaned " license="GPL-3.0-only" homepage="https://codeberg.org/river/river" distfiles="https://codeberg.org/river/river/releases/download/v${version}/river-${version}.tar.gz" -checksum=a6007ff0ad1cd46b2229661c28e4602aa6fe160872293f0749c17fa95b78a873 +checksum=db30370dd4bcaa7ac183a7a1a6a17e93854a933904e61310679705c13bad8763 build_options="xwayland" build_options_default="xwayland" @@ -22,5 +22,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/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