From 84ac8c8fb0fad629bdf74c64b7f2f4d7faef2766 Mon Sep 17 00:00:00 2001 From: cinerea0 Date: Mon, 11 Sep 2023 11:44:36 -0400 Subject: [PATCH] New package: gtkgreet-0.7 --- srcpkgs/gtkgreet/patches/32-bit.patch | 31 +++++++++++++++++++ .../patches/update-deprecated-constant.patch | 17 ++++++++++ srcpkgs/gtkgreet/template | 14 +++++++++ 3 files changed, 62 insertions(+) create mode 100644 srcpkgs/gtkgreet/patches/32-bit.patch create mode 100644 srcpkgs/gtkgreet/patches/update-deprecated-constant.patch create mode 100644 srcpkgs/gtkgreet/template diff --git a/srcpkgs/gtkgreet/patches/32-bit.patch b/srcpkgs/gtkgreet/patches/32-bit.patch new file mode 100644 index 00000000000000..f3221b7d8b914d --- /dev/null +++ b/srcpkgs/gtkgreet/patches/32-bit.patch @@ -0,0 +1,31 @@ +# Upstream: https://git.sr.ht/~kennylevinsen/gtkgreet/commit/3471aaaaee4619fd4aded85803b27b4a8dff41a6 +diff --git a/gtkgreet/proto.c b/gtkgreet/proto.c +index 92619494a7..a527e85552 100644 +--- a/gtkgreet/proto.c ++++ b/gtkgreet/proto.c +@@ -21,9 +21,13 @@ struct header { + + static int write_req(int fd, struct json_object* req) { + const char* reqstr = json_object_get_string(req); +- uint32_t len = strlen(reqstr); +- char* headerp = (char*)&len; +- ssize_t off = 0; ++ size_t len = strlen(reqstr); ++ if (len > 0xFFFFFFFF) { ++ goto error; ++ } ++ uint32_t header = len; ++ char* headerp = (char*)&header; ++ uint32_t off = 0; + + while (off < 4) { + ssize_t n = write(fd, &headerp[off], 4-off); +@@ -51,7 +55,7 @@ static struct json_object* read_resp(int fd) { + struct json_object* resp = NULL; + char *respstr = NULL; + uint32_t len; +- ssize_t off = 0; ++ uint32_t off = 0; + + while (off < 4) { + char* headerp = (char*)&len; diff --git a/srcpkgs/gtkgreet/patches/update-deprecated-constant.patch b/srcpkgs/gtkgreet/patches/update-deprecated-constant.patch new file mode 100644 index 00000000000000..322b621738ec8e --- /dev/null +++ b/srcpkgs/gtkgreet/patches/update-deprecated-constant.patch @@ -0,0 +1,17 @@ +From 725846edf6a22f495fdbb2972bb559563a90262b Mon Sep 17 00:00:00 2001 +From: Hugo Osvaldo Barrera +Date: Thu, 3 Nov 2022 12:45:49 +0100 +Subject: [PATCH] Update reference to deprecated constant +diff --git a/gtkgreet/gtkgreet.c b/gtkgreet/gtkgreet.c +index addad5a..1cbed1d 100644 +--- a/gtkgreet/gtkgreet.c ++++ b/gtkgreet/gtkgreet.c +@@ -93,7 +93,7 @@ static int gtkgreet_update_clocks_handler(gpointer data) { + + struct GtkGreet* create_gtkgreet() { + gtkgreet = calloc(1, sizeof(struct GtkGreet)); +- gtkgreet->app = gtk_application_new("wtf.kl.gtkgreet", G_APPLICATION_FLAGS_NONE); ++ gtkgreet->app = gtk_application_new("wtf.kl.gtkgreet", G_APPLICATION_DEFAULT_FLAGS); + gtkgreet->windows = g_array_new(FALSE, TRUE, sizeof(struct Window*)); + gtkgreet->question_cnt = 1; + return gtkgreet; diff --git a/srcpkgs/gtkgreet/template b/srcpkgs/gtkgreet/template new file mode 100644 index 00000000000000..46614d487617a0 --- /dev/null +++ b/srcpkgs/gtkgreet/template @@ -0,0 +1,14 @@ +# Template file for 'gtkgreet' +pkgname=gtkgreet +version=0.7 +revision=1 +build_style=meson +hostmakedepends="pkg-config scdoc" +makedepends="gtk+3-devel gtk-layer-shell-devel json-c-devel" +depends="greetd" +short_desc="Gtk greeter for greetd" +maintainer="cinerea0 " +license="GPL-3.0-or-later" +homepage="https://git.sr.ht/~kennylevinsen/gtkgreet" +distfiles="https://git.sr.ht/~kennylevinsen/gtkgreet/archive/${version}.tar.gz" +checksum=eb4ba0e1e4f9cf888ce7b932b923f97521c2277032628cfc06bb86fecbad9373