[PATCH gnome-team 0/2] Fix zathura build

  • Done
  • quality assurance status badge
Details
3 participants
  • Christopher Baines
  • Maxim Cournoyer
  • Vivien Kraus
Owner
unassigned
Submitted by
Vivien Kraus
Severity
normal

Debbugs page

Vivien Kraus wrote 12 months ago
(address . guix-patches@gnu.org)
cover.1710328294.git.vivien@planete-kraus.eu
Dear Guix,

The updated girara is too recent for zathura. However, I isolated the patch
to make it work.

What do you think?

Best regards,

Vivien

Vivien Kraus (2):
gnu: zathura: Update to 0.5.4.
gnu: zathura: Update style.

gnu/local.mk | 1 +
.../zathura-use-struct-initializers.patch | 68 +++++++++++++++++++
gnu/packages/pdf.scm | 43 ++++++------
3 files changed, 92 insertions(+), 20 deletions(-)
create mode 100644 gnu/packages/patches/zathura-use-struct-initializers.patch


base-commit: 2ee54513196bad8e663e78ac695b6ffa0da49051
--
2.41.0
Vivien Kraus wrote 12 months ago
[PATCH gnome-team 1/2] gnu: zathura: Update to 0.5.4.
(address . 69772@debbugs.gnu.org)
258d6c6f003e51bea84b34904f44d7753902a817.1710328294.git.vivien@planete-kraus.eu
* gnu/packages/pdf.scm (zathura): Update to 0.5.4.
* gnu/packages/patches/zathura-use-struct-initializers.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it here.
* gnu/packages/pdf.scm (zathura): Use it here.

Change-Id: I5975d993b92a1a77ed35df2206acb93219138cff
---
gnu/local.mk | 1 +
.../zathura-use-struct-initializers.patch | 68 +++++++++++++++++++
gnu/packages/pdf.scm | 5 +-
3 files changed, 72 insertions(+), 2 deletions(-)
create mode 100644 gnu/packages/patches/zathura-use-struct-initializers.patch

Toggle diff (111 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 5546e33465..64f52c2501 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2224,6 +2224,7 @@ dist_patch_DATA = \
%D%/packages/patches/xygrib-fix-finding-data.patch \
%D%/packages/patches/xygrib-newer-proj.patch \
%D%/packages/patches/yggdrasil-extra-config.patch \
+ %D%/packages/patches/zathura-use-struct-initializers.patch \
%D%/packages/patches/zig-0.9-riscv-support.patch \
%D%/packages/patches/zig-do-not-link-against-librt.patch \
%D%/packages/patches/zig-use-baseline-cpu-by-default.patch \
diff --git a/gnu/packages/patches/zathura-use-struct-initializers.patch b/gnu/packages/patches/zathura-use-struct-initializers.patch
new file mode 100644
index 0000000000..9a808a4bc3
--- /dev/null
+++ b/gnu/packages/patches/zathura-use-struct-initializers.patch
@@ -0,0 +1,68 @@
+From c05328185292d6f6a4459024cdb563c63bfad230 Mon Sep 17 00:00:00 2001
+Message-ID: <c05328185292d6f6a4459024cdb563c63bfad230.1710315308.git.vivien@planete-kraus.eu>
+From: Sebastian Ramacher <sebastian@ramacher.at>
+Date: Mon, 29 Jan 2024 21:05:22 +0100
+Subject: [PATCH] Use struct initializers
+
+---
+ zathura/page-widget.c | 4 ++--
+ zathura/shortcuts.c | 12 +++++-------
+ 2 files changed, 7 insertions(+), 9 deletions(-)
+
+diff --git a/zathura/page-widget.c b/zathura/page-widget.c
+index 216381e..ac85dcf 100644
+--- a/zathura/page-widget.c
++++ b/zathura/page-widget.c
+@@ -1426,8 +1426,8 @@ cb_menu_image_save(GtkMenuItem* item, ZathuraPage* page)
+ }
+
+ /* set command */
+- char* export_command = g_strdup_printf(":export image-p%d-%d ", page_id, image_id);
+- girara_argument_t argument = { 0, export_command };
++ char* export_command = g_strdup_printf(":export image-p%d-%d ", page_id, image_id);
++ girara_argument_t argument = {.n = 0, .data = export_command};
+ sc_focus_inputbar(priv->zathura->ui.session, &argument, NULL, 0);
+ g_free(export_command);
+
+diff --git a/zathura/shortcuts.c b/zathura/shortcuts.c
+index 8836cd2..35b5990 100644
+--- a/zathura/shortcuts.c
++++ b/zathura/shortcuts.c
+@@ -513,7 +513,7 @@ sc_rotate(girara_session_t* session, girara_argument_t* argument,
+ zathura_document_set_rotation(zathura->document, (rotation + angle * t) % 360);
+
+ /* update scale */
+- girara_argument_t new_argument = { zathura_document_get_adjust_mode(zathura->document), NULL };
++ girara_argument_t new_argument = {.n = zathura_document_get_adjust_mode(zathura->document), .data = NULL};
+ sc_adjust_window(zathura->ui.session, &new_argument, NULL, 0);
+
+ /* render all pages again */
+@@ -1372,7 +1372,7 @@ sc_toggle_presentation(girara_session_t* session, girara_argument_t*
+ zathura->shortcut.toggle_presentation_mode.zoom = zathura_document_get_zoom(zathura->document);
+
+ /* adjust window */
+- girara_argument_t argument = { ZATHURA_ADJUST_BESTFIT, NULL };
++ girara_argument_t argument = {.n = ZATHURA_ADJUST_BESTFIT, .data = NULL};
+ sc_adjust_window(session, &argument, NULL, 0);
+
+ /* hide status and inputbar */
+@@ -1390,13 +1390,11 @@ sc_toggle_presentation(girara_session_t* session, girara_argument_t*
+ return false;
+ }
+
+-bool
+-sc_quit(girara_session_t* session, girara_argument_t* UNUSED(argument),
+- girara_event_t* UNUSED(event), unsigned int UNUSED(t))
+-{
++bool sc_quit(girara_session_t* session, girara_argument_t* UNUSED(argument), girara_event_t* UNUSED(event),
++ unsigned int UNUSED(t)) {
+ g_return_val_if_fail(session != NULL, false);
+
+- girara_argument_t arg = { GIRARA_HIDE, NULL };
++ girara_argument_t arg = {.n = GIRARA_HIDE, .data = NULL};
+ girara_isc_completion(session, &arg, NULL, 0);
+
+ cb_destroy(NULL, NULL);
+--
+2.41.0
+
diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index f32403b954..6b09cbb5db 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -716,7 +716,7 @@ (define-public zathura-pdf-poppler
(define-public zathura
(package
(name "zathura")
- (version "0.5.2")
+ (version "0.5.4")
(source (origin
(method url-fetch)
(uri
@@ -724,7 +724,8 @@ (define-public zathura
version ".tar.xz"))
(sha256
(base32
- "15314m9chmh5jkrd9vk2h2gwcwkcffv2kjcxkd4v3wmckz5sfjy6"))))
+ "0ckgamf98sydq543arp865jg1afwzhpzcsbhv6zrch2dm5x7y0x3"))
+ (patches (search-patches "zathura-use-struct-initializers.patch"))))
(native-inputs
(list pkg-config
gettext-minimal
--
2.41.0
Vivien Kraus wrote 12 months ago
[PATCH gnome-team 2/2] gnu: zathura: Update style.
(address . 69772@debbugs.gnu.org)
c10e134dff104766ee2a416996f4de1437349572.1710328294.git.vivien@planete-kraus.eu
* gnu/packages/pdf.scm (zathura) [arguments]: Convert to list of
G-Expressions.
(zathura): Reorder fields.

Change-Id: Icb1e983570c6ba3d391c2ee49c1b102246c8080f
---
gnu/packages/pdf.scm | 38 ++++++++++++++++++++------------------
1 file changed, 20 insertions(+), 18 deletions(-)

Toggle diff (58 lines)
diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index 6b09cbb5db..b922ac7cf5 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -726,6 +726,26 @@ (define-public zathura
(base32
"0ckgamf98sydq543arp865jg1afwzhpzcsbhv6zrch2dm5x7y0x3"))
(patches (search-patches "zathura-use-struct-initializers.patch"))))
+ (build-system meson-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'check 'start-xserver
+ ;; Tests require a running X server.
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((display ":1"))
+ (setenv "DISPLAY" display)
+
+ ;; On busy machines, tests may take longer than
+ ;; the default of four seconds.
+ (setenv "CK_DEFAULT_TIMEOUT" "20")
+
+ ;; Don't fail due to missing '/etc/machine-id'.
+ (setenv "DBUS_FATAL_WARNINGS" "0")
+ (zero? (system (string-append
+ (search-input-file inputs "/bin/Xvfb")
+ " " display " &")))))))))
(native-inputs
(list pkg-config
gettext-minimal
@@ -747,24 +767,6 @@ (define-public zathura
(list (search-path-specification
(variable "ZATHURA_PLUGINS_PATH")
(files '("lib/zathura")))))
- (build-system meson-build-system)
- (arguments
- `(#:phases (modify-phases %standard-phases
- (add-before 'check 'start-xserver
- ;; Tests require a running X server.
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((display ":1"))
- (setenv "DISPLAY" display)
-
- ;; On busy machines, tests may take longer than
- ;; the default of four seconds.
- (setenv "CK_DEFAULT_TIMEOUT" "20")
-
- ;; Don't fail due to missing '/etc/machine-id'.
- (setenv "DBUS_FATAL_WARNINGS" "0")
- (zero? (system (string-append
- (search-input-file inputs "/bin/Xvfb")
- " " display " &")))))))))
(home-page "https://pwmt.org/projects/zathura/")
(synopsis "Lightweight keyboard-driven PDF viewer")
(description "Zathura is a customizable document viewer. It provides a
--
2.41.0
Christopher Baines wrote 12 months ago
Re: [bug#69772] [PATCH gnome-team 0/2] Fix zathura build
(name . Vivien Kraus)(address . vivien@planete-kraus.eu)
8734sqsagt.fsf@cbaines.net
Vivien Kraus via Guix-patches via <guix-patches@gnu.org> writes:

Toggle quote (7 lines)
> Dear Guix,
>
> The updated girara is too recent for zathura. However, I isolated the patch
> to make it work.
>
> What do you think?

Sounds good to me, I've pushed this to gnome-team as
7ba325f21b8d58a5409986a0f3f92ef81f721712.

Chris
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmX1fQJfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XfERw//WzttQq2mXHkojrPt2+XnT/HBmeiJv/Td
ZbRWJNcvQv55a9s+63yF3nM4ys5BXK+tt8/rZGD2aN02c1K0lipFjVU1kIaCI9pW
/8XaiCvxI0FAQ0QplkIv/kA1l1YfG5jIL97I/fc7M3ekP86qHQHbmt7bl+V28MbU
2D3TlIogOjNYuLsf6nySHiJf101nDncZ7KaFsVEL5KPiqZGq87ezvP17lIWjeRpg
rjI+YEpwFougtbKS3bqBC4o3vIM8IcAEVocYE7HjlLPYA62iPa1UVgw6LotR6F6M
Az37h0aMRJJl7c+NuQiVIpLuHxD3BxdyJPxnpF2o9xoswgrVMobCYapjvS++Vduj
7y+IZ3pmjl1t2B2DtPT0wmd3rZ5E0MXgz4fXiSZLJHP20lWjehbiCM268rUbiJMZ
KQDc9m3buJQAPRAv7GuP6vIOVupfME1xWp4hU37nnrfhSBYYHVzj+Fkh/9KQ6/Ra
aSWCwFFLoW7/erKrlVEAo/boVBCN0DuDLzkKmzjLK6yTjok33Ov4YcV+nPNt3dE2
fUMMUjLw+5oGbWlzca5085DbyJypiWolRN4DXoGYzOdR2LT8RHJG/xd2R8I5lTAI
9vHGzZ0H86UE5zYw8jiNphBMprdldOGtqFQ+0znzr/FQTVqjXfCYDoitHpvbLaP/
ReRlQvPxM9Q=
=/U1q
-----END PGP SIGNATURE-----

Maxim Cournoyer wrote 12 months ago
Re: [PATCH gnome-team 1/2] gnu: zathura: Update to 0.5.4.
(name . Vivien Kraus)(address . vivien@planete-kraus.eu)
878r2hprmu.fsf@gmail.com
Hi,

Vivien Kraus <vivien@planete-kraus.eu> writes:

Toggle quote (37 lines)
> * gnu/packages/pdf.scm (zathura): Update to 0.5.4.
> * gnu/packages/patches/zathura-use-struct-initializers.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Register it here.
> * gnu/packages/pdf.scm (zathura): Use it here.
>
> Change-Id: I5975d993b92a1a77ed35df2206acb93219138cff
> ---
> gnu/local.mk | 1 +
> .../zathura-use-struct-initializers.patch | 68 +++++++++++++++++++
> gnu/packages/pdf.scm | 5 +-
> 3 files changed, 72 insertions(+), 2 deletions(-)
> create mode 100644 gnu/packages/patches/zathura-use-struct-initializers.patch
>
> diff --git a/gnu/local.mk b/gnu/local.mk
> index 5546e33465..64f52c2501 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -2224,6 +2224,7 @@ dist_patch_DATA = \
> %D%/packages/patches/xygrib-fix-finding-data.patch \
> %D%/packages/patches/xygrib-newer-proj.patch \
> %D%/packages/patches/yggdrasil-extra-config.patch \
> + %D%/packages/patches/zathura-use-struct-initializers.patch \
> %D%/packages/patches/zig-0.9-riscv-support.patch \
> %D%/packages/patches/zig-do-not-link-against-librt.patch \
> %D%/packages/patches/zig-use-baseline-cpu-by-default.patch \
> diff --git a/gnu/packages/patches/zathura-use-struct-initializers.patch b/gnu/packages/patches/zathura-use-struct-initializers.patch
> new file mode 100644
> index 0000000000..9a808a4bc3
> --- /dev/null
> +++ b/gnu/packages/patches/zathura-use-struct-initializers.patch
> @@ -0,0 +1,68 @@
> +From c05328185292d6f6a4459024cdb563c63bfad230 Mon Sep 17 00:00:00 2001
> +Message-ID: <c05328185292d6f6a4459024cdb563c63bfad230.1710315308.git.vivien@planete-kraus.eu>
> +From: Sebastian Ramacher <sebastian@ramacher.at>
> +Date: Mon, 29 Jan 2024 21:05:22 +0100
> +Subject: [PATCH] Use struct initializers

Is this patch from upstream? It's hard to tell. I'd leave a note with
the URL from where it was retrieved.

Otherwise it LGTM.

--
Thanks,
Maxim
?
Your comment

This issue is archived.

To comment on this conversation send an email to 69772@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 69772
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help