From: Simon South <simon@simonsouth.net>
To: 44595@debbugs.gnu.org, leo.prikler@student.tugraz.at
Cc: simon@simonsouth.net
Subject: [bug#44595] [PATCH] gnu: transmission: Fix localization of transmission-gtk.
Date: Fri, 27 Nov 2020 16:35:46 -0500 [thread overview]
Message-ID: <20201127213546.10507-1-simon@simonsouth.net> (raw)
In-Reply-To: <87wny67aj8.fsf@simonsouth.net>
* gnu/packages/bittorrent.scm (transmission)[source]: Add patch to make
Transmission honor the "localedir" option to its configure script.
[arguments]<configure-flags>: Use "localedir" to set the "gui" output as the
location for (GTK-specific) localization data.
[arguments]<phases>: Update "move-gui" to remove a now-superfluous call to
"mkdir" and omit "share/locale" from the list of directories needing to be
moved between outputs.
* gnu/packages/patches/transmission-honor-localedir.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
gnu/local.mk | 1 +
gnu/packages/bittorrent.scm | 12 ++++---
.../transmission-honor-localedir.patch | 34 +++++++++++++++++++
3 files changed, 43 insertions(+), 4 deletions(-)
create mode 100644 gnu/packages/patches/transmission-honor-localedir.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 289f510c11..fe94bcfc2e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1656,6 +1656,7 @@ dist_patch_DATA = \
%D%/packages/patches/tipp10-remove-license-code.patch \
%D%/packages/patches/tk-find-library.patch \
%D%/packages/patches/transcode-ffmpeg.patch \
+ %D%/packages/patches/transmission-honor-localedir.patch \
%D%/packages/patches/ttf2eot-cstddef.patch \
%D%/packages/patches/tup-unbundle-dependencies.patch \
%D%/packages/patches/tuxpaint-stamps-path.patch \
diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm
index ab44caa06a..08e61d7ba2 100644
--- a/gnu/packages/bittorrent.scm
+++ b/gnu/packages/bittorrent.scm
@@ -75,12 +75,17 @@
version ".tar.xz"))
(sha256
(base32
- "1wjmn96zrvmk8j1yz2ysmqd7a2x6ilvnwwapcvfzgxs2wwpnai4i"))))
+ "1wjmn96zrvmk8j1yz2ysmqd7a2x6ilvnwwapcvfzgxs2wwpnai4i"))
+ (patches (search-patches "transmission-honor-localedir.patch"))))
(build-system glib-or-gtk-build-system)
(outputs '("out" ; library and command-line interface
"gui")) ; graphical user interface
(arguments
- '(#:glib-or-gtk-wrap-excluded-outputs '("out")
+ '(#:configure-flags
+ (list (string-append "--localedir="
+ (assoc-ref %outputs "gui")
+ "/share/locale"))
+ #:glib-or-gtk-wrap-excluded-outputs '("out")
#:phases
(modify-phases %standard-phases
(add-after 'install 'move-gui
@@ -93,12 +98,11 @@
(rename-file (string-append out "/bin/transmission-gtk")
(string-append gui "/bin/transmission-gtk"))
- (mkdir (string-append gui "/share"))
(for-each
(lambda (dir)
(rename-file (string-append out "/share/" dir)
(string-append gui "/share/" dir)))
- '("appdata" "applications" "icons" "locale" "pixmaps"))
+ '("appdata" "applications" "icons" "pixmaps"))
(mkdir-p (string-append gui "/share/man/man1"))
(rename-file
diff --git a/gnu/packages/patches/transmission-honor-localedir.patch b/gnu/packages/patches/transmission-honor-localedir.patch
new file mode 100644
index 0000000000..70c66bfb2b
--- /dev/null
+++ b/gnu/packages/patches/transmission-honor-localedir.patch
@@ -0,0 +1,34 @@
+This patch modifies Transmission so it honors the "localedir" option
+passed to its configure script, allowing GTK-specific localization
+data to be placed in the package's "gui" output.
+
+Without this patch, localization of transmission-gtk can break as the
+application will expect to find this data in the package's default
+output (as a result of the call to bindtextdomain in gtk/main.c).
+
+diff --git a/configure b/configure
+index a29e24f..3ae8ef4 100755
+--- a/configure
++++ b/configure
+@@ -21305,7 +21305,7 @@ $as_echo "$LINGUAS" >&6; }
+ sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+ < $srcdir/po/POTFILES.in > po/POTFILES
+
+- transmissionlocaledir='${prefix}/${DATADIRNAME}/locale'
++ transmissionlocaledir='${localedir}'
+
+ fi
+
+diff --git a/configure.ac b/configure.ac
+index 57d3cae..ab62093 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -563,7 +563,7 @@ if test "x$enable_nls" = "xyes" ; then
+ AC_SUBST(GETTEXT_PACKAGE)
+ AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
+ AM_GLIB_GNU_GETTEXT
+- transmissionlocaledir='${prefix}/${DATADIRNAME}/locale'
++ transmissionlocaledir='${localedir}'
+ AC_SUBST(transmissionlocaledir)
+ fi
+ AC_SUBST(INTLLIBS)
--
2.29.2
next prev parent reply other threads:[~2020-11-27 21:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-12 16:23 [bug#44595] [PATCH 0/1] gnu: transmission: Move remaining GUI-related files to "gui" output Simon South
2020-11-12 16:27 ` [bug#44595] [PATCH 1/1] " Simon South
2020-11-18 22:47 ` bug#44595: " Ludovic Courtès
2020-11-22 0:03 ` [bug#44595] " Leo Prikler
2020-11-22 13:31 ` Simon South
2020-11-27 21:30 ` Simon South
2020-11-27 21:35 ` Simon South [this message]
2020-11-27 22:35 ` Leo Prikler
2020-11-28 4:42 ` Leo Famulari
2020-11-28 18:03 ` Simon South
2020-11-29 1:11 ` Leo Famulari
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201127213546.10507-1-simon@simonsouth.net \
--to=simon@simonsouth.net \
--cc=44595@debbugs.gnu.org \
--cc=leo.prikler@student.tugraz.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).