From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id uINVLVFzwV+rUAAA0tVLHw (envelope-from ) for ; Fri, 27 Nov 2020 21:44:49 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id MIsqKVFzwV9CAgAAB5/wlQ (envelope-from ) for ; Fri, 27 Nov 2020 21:44:49 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 52A0C940148 for ; Fri, 27 Nov 2020 21:44:49 +0000 (UTC) Received: from localhost ([::1]:58698 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kilXs-00076J-79 for larch@yhetil.org; Fri, 27 Nov 2020 16:44:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36672) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kilVD-0006TF-O2 for guix-patches@gnu.org; Fri, 27 Nov 2020 16:42:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34819) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kilVC-00061s-M7 for guix-patches@gnu.org; Fri, 27 Nov 2020 16:42:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kilVC-0007Eb-HF for guix-patches@gnu.org; Fri, 27 Nov 2020 16:42:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#44595] [PATCH] gnu: transmission: Fix localization of transmission-gtk. Resent-From: Simon South Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 27 Nov 2020 21:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44595 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 44595@debbugs.gnu.org, leo.prikler@student.tugraz.at Cc: simon@simonsouth.net Received: via spool by 44595-submit@debbugs.gnu.org id=B44595.160651330327784 (code B ref 44595); Fri, 27 Nov 2020 21:42:02 +0000 Received: (at 44595) by debbugs.gnu.org; 27 Nov 2020 21:41:43 +0000 Received: from localhost ([127.0.0.1]:46365 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kilUp-0007E0-Db for submit@debbugs.gnu.org; Fri, 27 Nov 2020 16:41:43 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:53784) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kilUi-0007Dg-KC for 44595@debbugs.gnu.org; Fri, 27 Nov 2020 16:41:37 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id A649AC54A4; Fri, 27 Nov 2020 21:41:26 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo04-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo04-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HxFbDS0SlLk3; Fri, 27 Nov 2020 21:41:26 +0000 (UTC) Received: from localhost.localdomain (unknown [108.162.141.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 1BFF4C5429; Fri, 27 Nov 2020 21:41:21 +0000 (UTC) From: Simon South Date: Fri, 27 Nov 2020 16:35:46 -0500 Message-Id: <20201127213546.10507-1-simon@simonsouth.net> X-Mailer: git-send-email 2.25.2 In-Reply-To: <87wny67aj8.fsf@simonsouth.net> References: <87wny67aj8.fsf@simonsouth.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 2.73 X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-TUID: owpVgnO382IR * gnu/packages/bittorrent.scm (transmission)[source]: Add patch to make Transmission honor the "localedir" option to its configure script. [arguments]: Use "localedir" to set the "gui" output as the location for (GTK-specific) localization data. [arguments]: 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