void-packages/srcpkgs/handbrake/template
2022-02-20 01:37:09 +01:00

55 lines
1.8 KiB
Bash

# Template file for 'handbrake'
pkgname=handbrake
version=1.5.1
revision=1
wrksrc="HandBrake-${version}"
build_style=gnu-configure
configure_args="--force --disable-gtk-update-checks --disable-df-fetch --harden
$(vopt_enable fdk_aac fdk-aac) $(vopt_enable nvenc)"
make_build_args="-C ${XBPS_TRIPLET}"
make_install_args="-C ${XBPS_TRIPLET}"
hostmakedepends="automake cmake gettext-devel glib-devel intltool libtool m4 meson nasm pkg-config python3"
makedepends="bzip2-devel ffmpeg-devel gst-plugins-base1-devel gtk+3-devel
jansson-devel lame-devel libass-devel libbluray-devel libdav1d-devel
libdvdnav-devel libdvdread-devel libgudev-devel libnuma-devel
libsamplerate-devel libtheora-devel libvorbis-devel libvpx-devel libxml2-devel
opus-devel speex-devel x264-devel x265-devel zimg-devel
$(vopt_if fdk_aac fdk-aac-devel)
$(vopt_if nvenc nv-codec-headers)"
depends="desktop-file-utils gst-plugins-good1 hicolor-icon-theme"
short_desc="Multithreaded video transcoder"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="GPL-2.0-only"
homepage="https://handbrake.fr/"
distfiles="https://github.com/HandBrake/HandBrake/releases/download/${version}/HandBrake-${version}-source.tar.bz2"
checksum=3999fe06d5309c819799a73a968a8ec3840e7840c2b64af8f5cdb7fd8c9430f0
nocross=yes
build_options="fdk_aac nvenc"
case "$XBPS_TARGET_MACHINE" in
x86_64*|i686*)
CFLAGS="-msse"
build_options_default="nvenc"
;;
esac
pre_configure() {
# use system libraries, don't download them
rm -rf contrib/
for module in fdk-aac ffmpeg libbluray libdav1d libdvdnav libdvdread nvenc \
x265 zimg; do
vsed -i "/MODULES += contrib\/${module}/d" make/include/main.defs
done
}
pre_build() {
unset AS LD
}
handbrake-cli_package() {
short_desc+=" - CLI utility"
pkg_install() {
vmove usr/bin/HandBrakeCLI
}
}