Date: Monday, January 9, 2023 @ 12:28:15
  Author: dvzrv
Revision: 1382097

upgpkg: waylock 0.6.1-1: Upgrade to 0.6.1.

Remove patch and custom commits required for zig 0.10.0 (now included).
Minor style fixes.

Modified:
  waylock/trunk/PKGBUILD
Deleted:
  waylock/trunk/zig_0.10.0.patch

------------------+
 PKGBUILD         |   29 ++++++----------
 zig_0.10.0.patch |   94 -----------------------------------------------------
 2 files changed, 12 insertions(+), 111 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2023-01-09 10:38:23 UTC (rev 1382096)
+++ PKGBUILD    2023-01-09 12:28:15 UTC (rev 1382097)
@@ -1,9 +1,9 @@
 # Maintainer: David Runge <[email protected]>
 
 pkgname=waylock
-pkgver=0.5.0
-_commit=0bb019937c9a5d21cb205526493559deedfdeace  # refs/tags/v0.5.0^{}
-pkgrel=2
+pkgver=0.6.1
+_commit=02d107e1f8a2c265da8063a72cb62beba82bb76d  # refs/tags/v0.6.1
+pkgrel=1
 pkgdesc="A simple screenlocker for wayland compositors"
 arch=(x86_64)
 url="https://github.com/ifreund/waylock";
@@ -11,30 +11,21 @@
 depends=(gcc-libs glibc)
 makedepends=(chrpath git libxkbcommon pam scdoc wayland wayland-protocols zig)
 source=(
-  git+https://github.com/ifreund/waylock#commit=$_commit?signed
+  git+https://github.com/ifreund/waylock#tag=$_commit?signed
   git+https://github.com/ifreund/zig-wayland
   git+https://github.com/ifreund/zig-xkbcommon
-  zig_0.10.0.patch
 )
 sha256sums=('SKIP'
             'SKIP'
-            'SKIP'
-            'b123ddf515e2fccff1c4fa20193e2a946a3bda8807f15a1445fbbbc04255b142')
+            'SKIP')
 validpgpkeys=('5FBDF84DD2278DB2B8AD8A5286DED400DDFD7A11') # Isaac Freund 
<[email protected]>
 
 prepare() {
   cd $pkgname
   git submodule init
-  git config submodule."deps/zig-wayland".url "${srcdir}/zig-wayland"
-  git config submodule."deps/zig-xkbcommon".url "${srcdir}/zig-xkbcommon"
+  git config submodule."deps/zig-wayland".url "$srcdir/zig-wayland"
+  git config submodule."deps/zig-xkbcommon".url "$srcdir/zig-xkbcommon"
   git -c protocol.file.allow=always submodule update
-
-  # zig 0.10.0 compatibility
-  patch -Np1 < ../zig_0.10.0.patch
-  cd deps/zig-wayland
-  git checkout 71d21959b4671a848f1d198f6bb919f54d541f41
-  cd ../zig-xkbcommon
-  git checkout bfd1f97c277c32fddb77dee45979d2f472595d19
 }
 
 build() {
@@ -44,7 +35,11 @@
 }
 
 package() {
-  depends+=(libpam.so libwayland-client.so libxkbcommon.so)
+  depends+=(
+    pam libpam.so
+    wayland libwayland-client.so
+    libxkbcommon libxkbcommon.so
+  )
 
   cd $pkgname
   mv -v build/* "$pkgdir"

Deleted: zig_0.10.0.patch
===================================================================
--- zig_0.10.0.patch    2023-01-09 10:38:23 UTC (rev 1382096)
+++ zig_0.10.0.patch    2023-01-09 12:28:15 UTC (rev 1382097)
@@ -1,94 +0,0 @@
-From 3f4ab22d6c3e8f995ab5971d8c337d926fb0a172 Mon Sep 17 00:00:00 2001
-From: Isaac Freund <[email protected]>
-Date: Thu, 29 Sep 2022 11:16:26 +0200
-Subject: [PATCH] build: update to zig master
-
----
- build.zig          |  2 +-
- deps/zig-wayland   |  2 +-
- deps/zig-xkbcommon |  2 +-
- src/Lock.zig       | 21 ++-------------------
- src/auth.zig       |  4 ++--
- src/pam.zig        |  2 +-
- 6 files changed, 8 insertions(+), 25 deletions(-)
-
-diff --git a/build.zig b/build.zig
-index b9bd8d0..adddb19 100644
---- a/build.zig
-+++ b/build.zig
-@@ -91,7 +91,7 @@ pub fn build(b: *zbs.Builder) !void {
-
-     waylock.addPackage(.{
-         .name = "wayland",
--        .path = .{ .generated = &scanner.result },
-+        .source = .{ .generated = &scanner.result },
-     });
-     waylock.step.dependOn(&scanner.step);
-     waylock.addPackagePath("xkbcommon", 
"deps/zig-xkbcommon/src/xkbcommon.zig");
-diff --git a/src/Lock.zig b/src/Lock.zig
-index 0a34ceb..aaa810e 100644
---- a/src/Lock.zig
-+++ b/src/Lock.zig
-@@ -443,25 +443,8 @@ fn create_buffers(shm: *wl.Shm, options: Options) 
![3]*wl.Buffer {
-
- fn shm_fd_create() !os.fd_t {
-     switch (builtin.target.os.tag) {
--        .linux => {
--            return os.memfd_createZ("waylock-shm", os.linux.MFD_CLOEXEC);
--        },
--        .freebsd => {
--            // TODO upstream this to the zig standard library
--            const freebsd = struct {
--                const MFD_CLOEXEC = 1;
--                extern fn memfd_create(name: [*:0]const u8, flags: c_uint) 
c_int;
--            };
--
--            const ret = freebsd.memfd_create("waylock-shm", 
freebsd.MFD_CLOEXEC);
--            switch (os.errno(ret)) {
--                .SUCCESS => return ret,
--                .BADF => unreachable,
--                .INVAL => unreachable,
--                .NFILE => return error.SystemFdQuotaExceeded,
--                .MFILE => return error.ProcessFdQuotaExceeded,
--                else => |err| return os.unexpectedErrno(err),
--            }
-+        .linux, .freebsd => {
-+            return os.memfd_createZ("waylock-shm", os.linux.MFD.CLOEXEC);
-         },
-         else => @compileError("Target OS not supported"),
-     }
-diff --git a/src/auth.zig b/src/auth.zig
-index 4c7da08..94ca6b2 100644
---- a/src/auth.zig
-+++ b/src/auth.zig
-@@ -102,7 +102,7 @@ pub fn run(conn: Connection) noreturn {
-
-             const end_result = pamh.end(setcred_result);
-             if (end_result != .success) {
--                log.err("PAM deinitialization failed: {s}", .{end_result});
-+                log.err("PAM deinitialization failed: {s}", 
.{end_result.description()});
-             }
-
-             os.exit(0);
-@@ -117,7 +117,7 @@ pub fn run(conn: Connection) noreturn {
-             if (auth_result == .abort) {
-                 const end_result = pamh.end(auth_result);
-                 if (end_result != .success) {
--                    log.err("PAM deinitialization failed: {s}", 
.{end_result});
-+                    log.err("PAM deinitialization failed: {s}", 
.{end_result.description()});
-                 }
-                 os.exit(1);
-             }
-diff --git a/src/pam.zig b/src/pam.zig
-index 0e3693e..8b7f144 100644
---- a/src/pam.zig
-+++ b/src/pam.zig
-@@ -41,7 +41,7 @@ pub const Response = extern struct {
- };
-
- pub const Conv = extern struct {
--    conv: fn (
-+    conv: *const fn (
-         num_msg: c_int,
-         /// Note: This matches the Linux-PAM API, apparently Solaris PAM 
differs
-         /// in how the msg argument is used.

Reply via email to