summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Feletto2021-06-05 23:02:55 +0200
committerAndrea Feletto2021-06-05 23:02:55 +0200
commitbf575d1f790b2abfe44df1cc523a83548c20eb24 (patch)
tree123e557193d72a8efa4b9335fbb527c76216020e
parent9708abdaf3b300fdbbdfb38ff696fe02cec0d652 (diff)
downloadaur-bf575d1f790b2abfe44df1cc523a83548c20eb24.tar.gz
river now targets zig 0.8.0
-rw-r--r--.SRCINFO34
-rw-r--r--PKGBUILD76
-rw-r--r--libc.patch56
3 files changed, 34 insertions, 132 deletions
diff --git a/.SRCINFO b/.SRCINFO
index cdbdec72709b..8c52aee1e473 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,35 +1,25 @@
pkgbase = river-git
pkgdesc = A dynamic tiling wayland compositor.
- pkgver = r610.c8b1017
+ pkgver = r623.0e9dc08
pkgrel = 1
url = https://github.com/ifreund/river
arch = x86_64
license = GPL3
- makedepends = git
- makedepends = pkg-config
- makedepends = scdoc
- makedepends = wayland-protocols
- makedepends = zig
- depends = libevdev
- depends = libxkbcommon
- depends = pixman
+ depends = zig>=0.8.0
+ depends = mesa>=21.1.2
depends = wayland
+ depends = wayland-protocols
depends = wlroots
+ depends = libxkbcommon
+ depends = libevdev
+ depends = pixman
+ depends = xorg-xwayland
+ depends = scdoc
provides = river
+ provides = riverctl
+ provides = rivertile
conflicts = river
- source = git+https://github.com/ifreund/river.git
- source = git+https://github.com/ifreund/zig-pixman.git
- source = git+https://github.com/ifreund/zig-wayland.git
- source = git+https://github.com/swaywm/zig-wlroots.git
- source = git+https://github.com/ifreund/zig-xkbcommon.git
- source = libc.patch
+ source = git+https://github.com/ifreund/river
sha256sums = SKIP
- sha256sums = SKIP
- sha256sums = SKIP
- sha256sums = SKIP
- sha256sums = SKIP
- sha256sums = 8f17827bca6c320a9f4c722af4d56d77884a8965999629c050baee19136df38e
pkgname = river-git
- backup = etc/river/init
-
diff --git a/PKGBUILD b/PKGBUILD
index a5c6f1a915f4..ff4174a37f2a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,69 +1,37 @@
-# Maintainer: Daurnimator <daurnimator@archlinux.org>
-pkgname="river-git"
-pkgver=r610.c8b1017
+# Maintainer: Andrea Feletto <andrea@andreafeletto.com>
+# Contributor: Daurnimator <daurnimator@archlinux.org>
+
+pkgname=river-git
+_pkgname=${pkgname%-*}
+pkgver=r623.0e9dc08
pkgrel=1
pkgdesc='A dynamic tiling wayland compositor.'
arch=('x86_64')
url='https://github.com/ifreund/river'
license=('GPL3')
-depends=('libevdev' 'libxkbcommon' 'pixman' 'wayland' 'wlroots')
-makedepends=('git' 'pkg-config' 'scdoc' 'wayland-protocols' 'zig')
-provides=('river')
+depends=(
+ 'zig>=0.8.0' 'mesa>=21.1.2' 'wayland' 'wayland-protocols' 'wlroots'
+ 'libxkbcommon' 'libevdev' 'pixman' 'xorg-xwayland' 'scdoc'
+)
+provides=('river' 'riverctl' 'rivertile')
conflicts=('river')
-source=('git+https://github.com/ifreund/river.git'
- 'git+https://github.com/ifreund/zig-pixman.git'
- 'git+https://github.com/ifreund/zig-wayland.git'
- 'git+https://github.com/swaywm/zig-wlroots.git'
- 'git+https://github.com/ifreund/zig-xkbcommon.git'
- 'libc.patch')
-sha256sums=('SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- '8f17827bca6c320a9f4c722af4d56d77884a8965999629c050baee19136df38e')
-
-pkgver() {
- cd river
- printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
-}
+source=("git+$url")
+sha256sums=('SKIP')
prepare() {
- cd river
- git submodule init
- git config submodule.deps/zig-pixman.url "${srcdir}/zig-pixman"
- git config submodule.deps/zig-wayland.url "${srcdir}/zig-wayland"
- git config submodule.deps/zig-wlroots.url "${srcdir}/zig-wlroots"
- git config submodule.deps/zig-xkbcommon.url "${srcdir}/zig-xkbcommon"
- git submodule update
-
- # Workaround https://github.com/ziglang/zig/issues/8144
- # See https://github.com/ifreund/river/issues/232#issuecomment-794067079
- zig libc > libc-paths
- patch -p1 < ../libc.patch
+ cd "$_pkgname"
+ git submodule update --init
}
-build() {
- cd river
- zig build \
- --search-prefix "/usr" \
- -Dtarget=x86_64-linux-gnu \
- -Drelease-safe \
- -Dxwayland \
- -Dman-pages
+pkgver() {
+ cd "$_pkgname"
+ printf 'r%s.%s' "$(git rev-list --count HEAD)" \
+ "$(git rev-parse --short HEAD)"
}
package() {
- backup=('etc/river/init')
-
- cd river
- DESTDIR="${pkgdir}" zig build \
- --prefix "/usr" \
- --search-prefix "/usr" \
- -Dtarget=x86_64-linux-gnu \
- -Drelease-safe \
- -Dxwayland \
- -Dman-pages \
- install
+ cd "$_pkgname"
+ DESTDIR="$pkgdir" zig build install -Drelease-safe -Dxwayland \
+ --prefix '/usr'
}
diff --git a/libc.patch b/libc.patch
deleted file mode 100644
index 111c6bd5bfd4..000000000000
--- a/libc.patch
+++ /dev/null
@@ -1,56 +0,0 @@
---- a/build.zig
-+++ b/build.zig
-@@ -89,6 +89,7 @@ pub fn build(b: *zbs.Builder) !void {
- riverctl.step.dependOn(&scanner.step);
- riverctl.addPackage(scanner.getPkg());
- riverctl.linkLibC();
-+ riverctl.setLibCFile("libc-paths");
- riverctl.linkSystemLibrary("wayland-client");
-
- scanner.addCSource(riverctl);
-@@ -104,6 +105,7 @@ pub fn build(b: *zbs.Builder) !void {
- rivertile.step.dependOn(&scanner.step);
- rivertile.addPackage(scanner.getPkg());
- rivertile.linkLibC();
-+ rivertile.setLibCFile("libc-paths");
- rivertile.linkSystemLibrary("wayland-client");
-
- scanner.addCSource(rivertile);
-@@ -180,6 +182,7 @@ fn addServerDeps(exe: *zbs.LibExeObjStep, scanner: *ScanProtocolsStep) void {
- exe.step.dependOn(&scanner.step);
-
- exe.linkLibC();
-+ exe.setLibCFile("libc-paths");
- exe.linkSystemLibrary("libevdev");
-
- exe.addPackage(wayland);
---- a/deps/zig-wayland/build.zig
-+++ b/deps/zig-wayland/build.zig
-@@ -17,6 +17,7 @@ pub fn build(b: *zbs.Builder) void {
- exe.addPackage(scanner.getPkg());
- scanner.addCSource(exe);
- exe.linkLibC();
-+ exe.setLibCFile("../../libc-paths");
- exe.linkSystemLibrary("wayland-client");
-
- exe.install();
-@@ -40,6 +41,7 @@ pub fn build(b: *zbs.Builder) void {
- ref_all.addPackage(scanner.getPkg());
- scanner.addCSource(ref_all);
- ref_all.linkLibC();
-+ ref_all.setLibCFile("../../libc-paths");
- ref_all.linkSystemLibrary("wayland-client");
- ref_all.linkSystemLibrary("wayland-server");
- ref_all.linkSystemLibrary("wayland-egl");
-@@ -117,8 +119,10 @@ pub const ScanProtocolsStep = struct {
- /// Add the necessary C source to the compilation unit.
- /// Once https://github.com/ziglang/zig/issues/131 we can remove this.
- pub fn addCSource(self: *ScanProtocolsStep, obj: *zbs.LibExeObjStep) void {
-- for (self.protocol_paths.items) |path|
-+ for (self.protocol_paths.items) |path| {
-+ obj.addIncludeDir("/usr/include");
- obj.addCSourceFile(self.getCodePath(path), &[_][]const u8{"-std=c99"});
-+ }
- }
-
- pub fn getPkg(self: *ScanProtocolsStep) zbs.Pkg {