Archived
1
0
Fork 0

gnu: Transmission: Update to 4.0.3.

* gnu/packages/bittorrent.scm: Update to 4.0.3.
[build-system]: Use cmake-build-system.
[source]: Remove obsolete patch.
[inputs]: Add gtkmm, glib:bin, and python.
[arguments]: Run the test suite. Import the glib-or-gtk-build-system and wrap
the 'gui' build output.  Remove #:configure-flags. Adjust the 'move-gui' phase
to upstream changes.
* gnu/packages/patches/transmission-honor-localedir.patch: Delete file.
* gnu/local.mk (dist_patch_DATA): Remove it.
This commit is contained in:
Leo Famulari 2023-04-24 13:10:37 -04:00
parent 17ab8ac7d1
commit 8b3ae46ae3
No known key found for this signature in database
GPG key ID: 2646FA30BACA7F08
3 changed files with 49 additions and 75 deletions

View file

@ -1956,7 +1956,6 @@ dist_patch_DATA = \
%D%/packages/patches/tootle-reason-phrase.patch \ %D%/packages/patches/tootle-reason-phrase.patch \
%D%/packages/patches/transcode-ffmpeg.patch \ %D%/packages/patches/transcode-ffmpeg.patch \
%D%/packages/patches/transfig-gcc10-fno-common.patch \ %D%/packages/patches/transfig-gcc10-fno-common.patch \
%D%/packages/patches/transmission-honor-localedir.patch \
%D%/packages/patches/trytond-add-egg-modules-to-path.patch \ %D%/packages/patches/trytond-add-egg-modules-to-path.patch \
%D%/packages/patches/trytond-add-guix_trytond_path.patch \ %D%/packages/patches/trytond-add-guix_trytond_path.patch \
%D%/packages/patches/ttf2eot-cstddef.patch \ %D%/packages/patches/ttf2eot-cstddef.patch \

View file

@ -81,7 +81,7 @@
(define-public transmission (define-public transmission
(package (package
(name "transmission") (name "transmission")
(version "3.00") (version "4.0.3")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "https://github.com/transmission/transmission" (uri (string-append "https://github.com/transmission/transmission"
@ -89,51 +89,60 @@
version ".tar.xz")) version ".tar.xz"))
(sha256 (sha256
(base32 (base32
"1wjmn96zrvmk8j1yz2ysmqd7a2x6ilvnwwapcvfzgxs2wwpnai4i")) "0njlmpcdsxwx8vwdk9dvsby51l6f6awks9d0mgvi9fs2ivaizc5n"))))
(patches (search-patches "transmission-honor-localedir.patch")))) (build-system cmake-build-system)
(build-system glib-or-gtk-build-system)
(outputs '("out" ; library and command-line interface (outputs '("out" ; library and command-line interface
"gui")) ; graphical user interface "gui")) ; graphical user interface
(arguments (arguments
'(#:configure-flags (list
(list (string-append "--localedir=" #:imported-modules `((guix build glib-or-gtk-build-system)
(assoc-ref %outputs "gui") ,@%cmake-build-system-modules)
"/share/locale")) #:modules '(((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
;; Some tests segfault when using libevent 2.12 without internet (guix build cmake-build-system)
;; connection. This has been reported mainstream but not fixed yet: (guix build utils))
;; https://github.com/transmission/transmission/issues/1437. #:phases
#:tests? #f #~(modify-phases %standard-phases
#:glib-or-gtk-wrap-excluded-outputs '("out")
#:phases
(modify-phases %standard-phases
;; Avoid embedding kernel version for reproducible build ;; Avoid embedding kernel version for reproducible build
(add-after 'unpack 'remove-kernel-version (add-after 'unpack 'remove-kernel-version
(lambda _ (lambda _
(substitute* "third-party/miniupnpc/updateminiupnpcstrings.sh" (substitute* "third-party/miniupnpc/updateminiupnpcstrings.sh"
(("OS_VERSION=`uname -r`") "OS_VERSION=Guix")))) (("OS_VERSION=`uname -r`") "OS_VERSION=Guix"))))
(add-after 'install 'move-gui (replace 'check
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
;; Move the GUI to its own output, so that "out" doesn't (if tests?
;; depend on GTK+. ;; XXX this test fails...
(let ((out (assoc-ref outputs "out")) (invoke "ctest" "-E" "usesBootstrapFile"
(gui (assoc-ref outputs "gui"))) "-j" (if parallel-tests?
(mkdir-p (string-append gui "/bin")) (number->string (parallel-job-count))
(rename-file (string-append out "/bin/transmission-gtk") "1"))
(string-append gui "/bin/transmission-gtk")) (format #t "test suite not run~%"))))
(add-after 'install 'move-gui
(lambda* (#:key outputs #:allow-other-keys)
(mkdir-p (string-append #$output:gui "/bin"))
(mkdir-p (string-append #$output:gui "/share/man/man1"))
(rename-file (string-append #$output "/bin/transmission-gtk")
(string-append #$output:gui "/bin/transmission-gtk"))
(for-each (for-each
(lambda (dir) (lambda (dir)
(rename-file (string-append out "/share/" dir) (rename-file (string-append #$output "/share/" dir)
(string-append gui "/share/" dir))) (string-append #$output:gui "/share/" dir)))
'("appdata" "applications" "icons" "pixmaps")) '("applications" "icons" "metainfo" "transmission"))
(rename-file
(mkdir-p (string-append gui "/share/man/man1")) (string-append #$output "/share/man/man1/transmission-gtk.1")
(rename-file (string-append #$output:gui "/share/man/man1/transmission-gtk.1"))))
(string-append out "/share/man/man1/transmission-gtk.1") (add-after 'move-gui 'glib-or-gtk-wrap
(string-append gui "/share/man/man1/transmission-gtk.1")) (lambda* (#:key outputs #:allow-other-keys #:rest args)
#t)))))) (apply (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)
(inputs #:glib-or-gtk-wrap-excluded-outputs (list "out")
(list libevent curl openssl zlib gtk+ libappindicator)) args))))))
(inputs (list curl
(list glib "bin")
gtkmm
libappindicator
libevent
openssl
python
zlib))
(native-inputs (native-inputs
(list intltool pkg-config)) (list intltool pkg-config))
(home-page "https://transmissionbt.com/") (home-page "https://transmissionbt.com/")

View file

@ -1,34 +0,0 @@
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)