handbrake: properly handle enabling/disabling nvenc
This commit is contained in:
parent
8ada354e33
commit
89bc7d8a17
2 changed files with 24 additions and 5 deletions
15
srcpkgs/handbrake/patches/allow-disable-nvenc.patch
Normal file
15
srcpkgs/handbrake/patches/allow-disable-nvenc.patch
Normal file
|
@ -0,0 +1,15 @@
|
|||
This adds the option to disable nvenc, as for some reason it's not there.
|
||||
It cannot be enabled on non-x86 platforms, yet the buildsystem forces it
|
||||
for everything that is not freebsd and mac, which is wrong.
|
||||
|
||||
--- make/configure.py
|
||||
+++ make/configure.py
|
||||
@@ -1328,7 +1328,7 @@ def createCLI():
|
||||
|
||||
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( '--disable-nvenc', dest="enable_nvenc", action='store_false' )
|
||||
|
||||
cli.add_option_group( grp )
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
# Template file for 'handbrake'
|
||||
pkgname=handbrake
|
||||
version=1.2.1
|
||||
revision=1
|
||||
revision=2
|
||||
archs="i686* x86_64* ppc64*"
|
||||
wrksrc="HandBrake-${version}"
|
||||
build_style=configure
|
||||
configure_args="--prefix=/usr --force --disable-gtk-update-checks
|
||||
$(vopt_enable fdk_aac fdk-aac)"
|
||||
$(vopt_enable fdk_aac fdk-aac) $(vopt_enable nvenc)"
|
||||
make_build_args="-C build"
|
||||
make_install_args="-C build"
|
||||
hostmakedepends="automake libtool cmake pkg-config intltool
|
||||
|
@ -16,7 +16,8 @@ makedepends="zlib-devel bzip2-devel libnotify-devel gtk+3-devel ncurses-devel
|
|||
fribidi-devel libass-devel fontconfig-devel libxml2-devel libogg-devel
|
||||
libdvdnav-devel libdvdread-devel libtheora-devel lame-devel jansson-devel
|
||||
libsamplerate-devel libbluray-devel librsvg-devel libvpx-devel ffmpeg-devel
|
||||
opus-devel speex-devel nv-codec-headers $(vopt_if fdk_aac fdk-aac-devel)"
|
||||
opus-devel speex-devel $(vopt_if nvenc nv-codec-headers)
|
||||
$(vopt_if fdk_aac fdk-aac-devel)"
|
||||
depends="gst-plugins-good1 desktop-file-utils hicolor-icon-theme"
|
||||
short_desc="Multithreaded video transcoder"
|
||||
maintainer="Rasmus Thomsen <rasmus.thomsen@protonmail.com>"
|
||||
|
@ -25,10 +26,13 @@ homepage="https://handbrake.fr/"
|
|||
distfiles="https://download2.handbrake.fr/${version}/HandBrake-${version}-source.tar.bz2"
|
||||
checksum=00316eec7bb29b88b8dd11b14581c99c35fd7a315f5bc8cc7f1eb144b2fa783d
|
||||
|
||||
build_options="fdk_aac"
|
||||
build_options="fdk_aac nvenc"
|
||||
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
x86_64*|i686*) CFLAGS="-msse";;
|
||||
x86_64*|i686*)
|
||||
CFLAGS="-msse"
|
||||
build_options_default="nvenc"
|
||||
;;
|
||||
esac
|
||||
|
||||
pre_configure() {
|
||||
|
|
Loading…
Reference in a new issue