mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
gnu: handbrake: Upgrade to 1.3.0.
* gnu/packages/patches/handbrake-opt-in-nvenc.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. * gnu/packages/video.scm (handbrake)[source]: Upgrade to 1.3.0. Remove patch. [native-inputs]: Remove cmake and curl. [inputs]: Add dav1d and numactl. [arguments]: Add "--disable-nvenc" to configure flags in place of patch. Adjust "bootstrap" phase in response to upstream changes. Add "patch-SHELL" and "relax-reqs" phases.
This commit is contained in:
parent
32c06affca
commit
dc3e62a494
3 changed files with 28 additions and 27 deletions
|
@ -962,7 +962,6 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/gtkglext-disable-disable-deprecated.patch \
|
%D%/packages/patches/gtkglext-disable-disable-deprecated.patch \
|
||||||
%D%/packages/patches/gtksourceview-2-add-default-directory.patch \
|
%D%/packages/patches/gtksourceview-2-add-default-directory.patch \
|
||||||
%D%/packages/patches/gzdoom-search-in-installed-share.patch \
|
%D%/packages/patches/gzdoom-search-in-installed-share.patch \
|
||||||
%D%/packages/patches/handbrake-opt-in-nvenc.patch \
|
|
||||||
%D%/packages/patches/haskell-mode-unused-variables.patch \
|
%D%/packages/patches/haskell-mode-unused-variables.patch \
|
||||||
%D%/packages/patches/haskell-mode-make-check.patch \
|
%D%/packages/patches/haskell-mode-make-check.patch \
|
||||||
%D%/packages/patches/hdf4-architectures.patch \
|
%D%/packages/patches/hdf4-architectures.patch \
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
Require opt-in for NVEnc support. Otherwise the default is true with no way
|
|
||||||
to disable it.
|
|
||||||
|
|
||||||
--- HandBrake-1.2.0/make/configure.py.orig 1969-12-31 18:00:00.000000000 -0600
|
|
||||||
+++ HandBrake-1.2.0/make/configure.py 2019-01-22 23:22:46.186959060 -0600
|
|
||||||
@@ -1320,7 +1320,7 @@
|
|
||||||
grp.add_option( '--disable-ffmpeg-aac', dest="enable_ffmpeg_aac", action='store_false' )
|
|
||||||
|
|
||||||
h = IfHost( 'enable Nvidia NVEnc video encoder', '*-*-*', none=optparse.SUPPRESS_HELP ).value
|
|
||||||
- grp.add_option( '--enable-nvenc', dest="enable_nvenc", default=not (host.match( '*-*-darwin*' ) or host.match( '*-*-freebsd*' )), action='store_true', help=h )
|
|
||||||
+ grp.add_option( '--enable-nvenc', dest="enable_nvenc", default=False, action='store_true', help=h )
|
|
||||||
|
|
||||||
|
|
||||||
cli.add_option_group( grp )
|
|
|
@ -2636,39 +2636,36 @@ (define-public mps-youtube
|
||||||
(define-public handbrake
|
(define-public handbrake
|
||||||
(package
|
(package
|
||||||
(name "handbrake")
|
(name "handbrake")
|
||||||
(version "1.2.2")
|
(version "1.3.0")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append "https://download.handbrake.fr/releases/"
|
(uri (string-append "https://download.handbrake.fr/releases/"
|
||||||
version "/HandBrake-" version "-source.tar.bz2"))
|
version "/HandBrake-" version "-source.tar.bz2"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0k2yaqy7zi06k8mkp9az2mn9dlgj3a1339vacakfh2nn2zsics6z"))
|
"15hxncswmaj62hb40fxixsa6d519zb712z9xbdq979q4rasjxa59"))
|
||||||
(modules '((guix build utils)))
|
(modules '((guix build utils)))
|
||||||
(snippet
|
(snippet
|
||||||
;; Remove "contrib" and source not necessary for
|
;; Remove "contrib" and source not necessary for
|
||||||
;; building/running under a GNU environment.
|
;; building/running under a GNU environment.
|
||||||
'(begin
|
'(begin
|
||||||
(for-each delete-file-recursively
|
(for-each delete-file-recursively
|
||||||
'("contrib" "macosx" "win"))
|
'("contrib" "macosx" "win")) ; 540KiB, 11MiB, 5.9MiB resp.
|
||||||
(substitute* "make/include/main.defs"
|
(substitute* "make/include/main.defs"
|
||||||
;; Disable unconditional inclusion of "contrib" libraries
|
;; Disable unconditional inclusion of "contrib" libraries
|
||||||
;; (ffmpeg, libvpx, libdvdread, libdvdnav, and libbluray),
|
;; (ffmpeg, libvpx, libdvdread, libdvdnav, and libbluray),
|
||||||
;; which would lead to fetching and building of these
|
;; which would lead to fetching and building of these
|
||||||
;; libraries. Use our own instead.
|
;; libraries. Use our own instead.
|
||||||
(("MODULES \\+= contrib") "# MODULES += contrib"))
|
(("MODULES \\+= contrib") "# MODULES += contrib"))
|
||||||
#t))
|
#t))))
|
||||||
(patches (search-patches "handbrake-opt-in-nvenc.patch"))))
|
|
||||||
(build-system glib-or-gtk-build-system)
|
(build-system glib-or-gtk-build-system)
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("automake" ,automake) ;gui subpackage must be bootstrapped
|
`(("automake" ,automake) ; GUI subpackage must be bootstrapped
|
||||||
("autoconf" ,autoconf)
|
("autoconf" ,autoconf)
|
||||||
("cmake" ,cmake-minimal) ;TODO: could probably strip check from make/configure.py
|
|
||||||
("curl" ,curl) ;not actually used, but tested for
|
|
||||||
("intltool" ,intltool)
|
("intltool" ,intltool)
|
||||||
("libtool" ,libtool)
|
("libtool" ,libtool)
|
||||||
("pkg-config" ,pkg-config)
|
("pkg-config" ,pkg-config)
|
||||||
("python" ,python-2))) ;for configuration
|
("python" ,python-2))) ; For configuration
|
||||||
(inputs
|
(inputs
|
||||||
`(("bzip2" ,bzip2)
|
`(("bzip2" ,bzip2)
|
||||||
("dbus-glib" ,dbus-glib)
|
("dbus-glib" ,dbus-glib)
|
||||||
|
@ -2683,11 +2680,13 @@ (define-public handbrake
|
||||||
("lame" ,lame)
|
("lame" ,lame)
|
||||||
("libass" ,libass)
|
("libass" ,libass)
|
||||||
("libbluray" ,libbluray)
|
("libbluray" ,libbluray)
|
||||||
|
("libdav1d" ,dav1d)
|
||||||
("libdvdnav" ,libdvdnav)
|
("libdvdnav" ,libdvdnav)
|
||||||
("libdvdread" ,libdvdread)
|
("libdvdread" ,libdvdread)
|
||||||
("libgudev" ,libgudev)
|
("libgudev" ,libgudev)
|
||||||
("libmpeg2" ,libmpeg2)
|
("libmpeg2" ,libmpeg2)
|
||||||
("libnotify" ,libnotify)
|
("libnotify" ,libnotify)
|
||||||
|
("libnuma" ,numactl)
|
||||||
("libogg" ,libogg)
|
("libogg" ,libogg)
|
||||||
("libopus" ,opus)
|
("libopus" ,opus)
|
||||||
("libsamplerate" ,libsamplerate)
|
("libsamplerate" ,libsamplerate)
|
||||||
|
@ -2703,6 +2702,7 @@ (define-public handbrake
|
||||||
`(#:tests? #f ;tests require Ruby and claim to be unsupported
|
`(#:tests? #f ;tests require Ruby and claim to be unsupported
|
||||||
#:configure-flags
|
#:configure-flags
|
||||||
(list "--disable-gtk-update-checks"
|
(list "--disable-gtk-update-checks"
|
||||||
|
"--disable-nvenc"
|
||||||
(string-append "CPPFLAGS=-I"
|
(string-append "CPPFLAGS=-I"
|
||||||
(assoc-ref %build-inputs "libxml2")
|
(assoc-ref %build-inputs "libxml2")
|
||||||
"/include/libxml2")
|
"/include/libxml2")
|
||||||
|
@ -2713,11 +2713,27 @@ (define-public handbrake
|
||||||
;; Run bootstrap ahead of time so that shebangs get patched.
|
;; Run bootstrap ahead of time so that shebangs get patched.
|
||||||
(lambda _
|
(lambda _
|
||||||
(setenv "CONFIG_SHELL" (which "sh"))
|
(setenv "CONFIG_SHELL" (which "sh"))
|
||||||
(setenv "NOCONFIGURE" "1")
|
|
||||||
;; Patch the Makefile so that it doesn't bootstrap again.
|
;; Patch the Makefile so that it doesn't bootstrap again.
|
||||||
(substitute* "gtk/module.rules"
|
(substitute* "gtk/module.rules"
|
||||||
((".*autogen\\.sh.*") ""))
|
((".*autoreconf.*") ""))
|
||||||
(invoke "sh" "./gtk/autogen.sh")))
|
(with-directory-excursion "gtk"
|
||||||
|
(invoke "autoreconf" "-fiv"))))
|
||||||
|
(add-before 'configure 'patch-SHELL
|
||||||
|
(lambda _
|
||||||
|
(substitute* "gtk/po/Makefile.in.in"
|
||||||
|
(("SHELL = /bin/sh") "SHELL = @SHELL@"))
|
||||||
|
#t))
|
||||||
|
(add-before 'configure 'relax-reqs
|
||||||
|
(lambda _
|
||||||
|
(substitute* "make/configure.py"
|
||||||
|
;; cmake is checked for so that it can be used to build
|
||||||
|
;; contrib/harfbuzz and contrib/x265, but we get these as
|
||||||
|
;; inputs, so don't abort if it's not found. Similarly, meson
|
||||||
|
;; and ninja are only needed for contrib/libdav1d, and nasm
|
||||||
|
;; only for libvpx
|
||||||
|
(("((cmake|meson|ninja|nasm) *=.*abort=)True" _ &)
|
||||||
|
(string-append & "False")))
|
||||||
|
#t))
|
||||||
(replace 'configure
|
(replace 'configure
|
||||||
(lambda* (#:key outputs configure-flags #:allow-other-keys)
|
(lambda* (#:key outputs configure-flags #:allow-other-keys)
|
||||||
;; 'configure' is not an autoconf-generated script, and
|
;; 'configure' is not an autoconf-generated script, and
|
||||||
|
|
Loading…
Reference in a new issue