unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#67864] [PATCH] gnu: Transmission: Update to 4.0.5.
@ 2023-12-17  6:33 Leo Famulari
  2023-12-25 17:27 ` Mathieu Othacehe
  0 siblings, 1 reply; 3+ messages in thread
From: Leo Famulari @ 2023-12-17  6:33 UTC (permalink / raw)
  To: 67864

* gnu/packages/bittorrent.scm (transmission): Update to 4.0.5.
[source]: Use 'transmission-4.0.5-fix-build.patch'.
* gnu/packages/patches/transmission-4.0.5-fix-build.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.

Change-Id: I8e9486dca07f01628e7886e7ac5757d511056cb7
---
 gnu/local.mk                                  |  1 +
 gnu/packages/bittorrent.scm                   |  5 +-
 .../transmission-4.0.5-fix-build.patch        | 98 +++++++++++++++++++
 3 files changed, 102 insertions(+), 2 deletions(-)
 create mode 100644 gnu/packages/patches/transmission-4.0.5-fix-build.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index c404d2f52f..7983be58a5 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2057,6 +2057,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/tofi-32bit-compat.patch			\
   %D%/packages/patches/tpetra-remove-duplicate-using.patch	\
   %D%/packages/patches/transcode-ffmpeg.patch	\
+  %D%/packages/patches/transmission-4.0.5-fix-build.patch	\
   %D%/packages/patches/trytond-add-egg-modules-to-path.patch	\
   %D%/packages/patches/trytond-add-guix_trytond_path.patch	\
   %D%/packages/patches/ttf2eot-cstddef.patch			\
diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm
index 8c032940d4..fd92a93763 100644
--- a/gnu/packages/bittorrent.scm
+++ b/gnu/packages/bittorrent.scm
@@ -87,15 +87,16 @@ (define-module (gnu packages bittorrent)
 (define-public transmission
   (package
     (name "transmission")
-    (version "4.0.4")
+    (version "4.0.5")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/transmission/transmission"
                                   "/releases/download/" version "/transmission-"
                                   version ".tar.xz"))
+              (patches (search-patches "transmission-4.0.5-fix-build.patch"))
               (sha256
                (base32
-                "19nm7f4x3zq610da5fl63vpycj4kv07np6ldm8czpgyziwqv9xqm"))))
+                "0mv3ds3bbp1fbmdlrjinmzvk46acpafydirh7h2014j7988zys7x"))))
     (build-system cmake-build-system)
     (outputs '("out"                      ; library and command-line interface
                "gui"))                    ; graphical user interface
diff --git a/gnu/packages/patches/transmission-4.0.5-fix-build.patch b/gnu/packages/patches/transmission-4.0.5-fix-build.patch
new file mode 100644
index 0000000000..606e8d2ab3
--- /dev/null
+++ b/gnu/packages/patches/transmission-4.0.5-fix-build.patch
@@ -0,0 +1,98 @@
+Fix the build of Transmission 4.0.5:
+
+https://github.com/transmission/transmission/issues/6392
+
+Patches copied from upstream pull request:
+
+https://github.com/transmission/transmission/pull/6393
+
+From 64b0933e713c725867ba5817bd197d668923161e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?C=C5=93ur?= <coeur@gmx.fr>
+Date: Sun, 17 Dec 2023 00:11:11 +0100
+Subject: [PATCH] build fix get_files2 behind IF_GTKMM4_10
+
+---
+ gtk/GtkCompat.h      | 6 ++++++
+ gtk/OptionsDialog.cc | 2 +-
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/gtk/GtkCompat.h b/gtk/GtkCompat.h
+index 34d1bbe22dd..6dde2a5ef8b 100644
+--- a/gtk/GtkCompat.h
++++ b/gtk/GtkCompat.h
+@@ -44,6 +44,12 @@
+ #define IF_GTKMM4(ThenValue, ElseValue) ElseValue
+ #endif
+ 
++#if GTKMM_CHECK_VERSION(4, 10, 0)
++#define IF_GTKMM4_10(ThenValue, ElseValue) ThenValue
++#else
++#define IF_GTKMM4_10(ThenValue, ElseValue) ElseValue
++#endif
++
+ #if GLIBMM_CHECK_VERSION(2, 68, 0)
+ #define IF_GLIBMM2_68(ThenValue, ElseValue) ThenValue
+ #else
+diff --git a/gtk/OptionsDialog.cc b/gtk/OptionsDialog.cc
+index 08198540c10..bff4286286a 100644
+--- a/gtk/OptionsDialog.cc
++++ b/gtk/OptionsDialog.cc
+@@ -338,7 +338,7 @@ void TorrentFileChooserDialog::onOpenDialogResponse(int response, Glib::RefPtr<S
+         bool const do_prompt = get_choice(std::string(ShowOptionsDialogChoice)) == "true";
+         bool const do_notify = false;
+ 
+-        auto const files = IF_GTKMM4(get_files2, get_files)();
++        auto const files = IF_GTKMM4_10(get_files2, get_files)();
+         g_assert(!files.empty());
+ 
+         /* remember this folder the next time we use this dialog */
+
+From 49ce9ab1d59347a529dcbfcc378b7423d13750e6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?C=C5=93ur?= <coeur@gmx.fr>
+Date: Sun, 17 Dec 2023 02:54:33 +0100
+Subject: [PATCH] code review: revert bd31d805003909bd5927f26a02eb60b78a82355b
+
+---
+ gtk/GtkCompat.h      |  6 ------
+ gtk/OptionsDialog.cc | 11 ++++++++++-
+ 2 files changed, 10 insertions(+), 7 deletions(-)
+
+diff --git a/gtk/GtkCompat.h b/gtk/GtkCompat.h
+index 6dde2a5ef8b..34d1bbe22dd 100644
+--- a/gtk/GtkCompat.h
++++ b/gtk/GtkCompat.h
+@@ -44,12 +44,6 @@
+ #define IF_GTKMM4(ThenValue, ElseValue) ElseValue
+ #endif
+ 
+-#if GTKMM_CHECK_VERSION(4, 10, 0)
+-#define IF_GTKMM4_10(ThenValue, ElseValue) ThenValue
+-#else
+-#define IF_GTKMM4_10(ThenValue, ElseValue) ElseValue
+-#endif
+-
+ #if GLIBMM_CHECK_VERSION(2, 68, 0)
+ #define IF_GLIBMM2_68(ThenValue, ElseValue) ThenValue
+ #else
+diff --git a/gtk/OptionsDialog.cc b/gtk/OptionsDialog.cc
+index bff4286286a..8c28fc76f98 100644
+--- a/gtk/OptionsDialog.cc
++++ b/gtk/OptionsDialog.cc
+@@ -338,7 +338,16 @@ void TorrentFileChooserDialog::onOpenDialogResponse(int response, Glib::RefPtr<S
+         bool const do_prompt = get_choice(std::string(ShowOptionsDialogChoice)) == "true";
+         bool const do_notify = false;
+ 
+-        auto const files = IF_GTKMM4_10(get_files2, get_files)();
++#if GTKMM_CHECK_VERSION(4, 0, 0)
++        auto files = std::vector<Glib::RefPtr<Gio::File>>();
++        auto files_model = get_files();
++        for (auto i = guint{ 0 }; i < files_model->get_n_items(); ++i)
++        {
++            files.push_back(gtr_ptr_dynamic_cast<Gio::File>(files_model->get_object(i)));
++        }
++#else
++        auto const files = get_files();
++#endif
+         g_assert(!files.empty());
+ 
+         /* remember this folder the next time we use this dialog */

base-commit: fe86819d8bde674766659c22b215d3a689a8026e
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [bug#67864] [PATCH] gnu: Transmission: Update to 4.0.5.
  2023-12-17  6:33 [bug#67864] [PATCH] gnu: Transmission: Update to 4.0.5 Leo Famulari
@ 2023-12-25 17:27 ` Mathieu Othacehe
  2023-12-29 19:59   ` bug#67864: " Leo Famulari
  0 siblings, 1 reply; 3+ messages in thread
From: Mathieu Othacehe @ 2023-12-25 17:27 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 67864


> * gnu/packages/bittorrent.scm (transmission): Update to 4.0.5.
> [source]: Use 'transmission-4.0.5-fix-build.patch'.
> * gnu/packages/patches/transmission-4.0.5-fix-build.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Add it.

Looks good!

Mathieu




^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#67864: [PATCH] gnu: Transmission: Update to 4.0.5.
  2023-12-25 17:27 ` Mathieu Othacehe
@ 2023-12-29 19:59   ` Leo Famulari
  0 siblings, 0 replies; 3+ messages in thread
From: Leo Famulari @ 2023-12-29 19:59 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 67864-done

On Mon, Dec 25, 2023 at 06:27:10PM +0100, Mathieu Othacehe wrote:
> 
> > * gnu/packages/bittorrent.scm (transmission): Update to 4.0.5.
> > [source]: Use 'transmission-4.0.5-fix-build.patch'.
> > * gnu/packages/patches/transmission-4.0.5-fix-build.patch: New file.
> > * gnu/local.mk (dist_patch_DATA): Add it.
> 
> Looks good!

Great, pushed as d263c49919235b81b318c45c99aa189be04c5f28




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-12-29 20:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-17  6:33 [bug#67864] [PATCH] gnu: Transmission: Update to 4.0.5 Leo Famulari
2023-12-25 17:27 ` Mathieu Othacehe
2023-12-29 19:59   ` bug#67864: " Leo Famulari

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).