void-packages/srcpkgs/handbrake/template
Đoàn Trần Công Danh 200bed5c06 srcpkgs/h*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

56 lines
1.8 KiB
Bash

# Template file for 'handbrake'
pkgname=handbrake
version=1.3.3
revision=3
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
$(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=218a37d95f48b5e7cf285363d3ab16c314d97627a7a710cab3758902ae877f85
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; 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
}
}