ffmpeg: added new build options: x265, v4l2, vaapi and vdpau.

x265, vaapi and vdpau are enabled on x86.
v4l2 is enabled everywhere.

The v4l2 option has been added due to popular demand.
This commit is contained in:
Juan RP 2015-09-27 07:56:46 +02:00
parent ec19baa4e8
commit 53021e8b3d
1 changed files with 12 additions and 8 deletions

View File

@ -1,7 +1,7 @@
# Template file for 'ffmpeg'
pkgname=ffmpeg
version=2.8
revision=1
revision=2
short_desc="Decoding, encoding and streaming software"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="GPL-3"
@ -14,17 +14,18 @@ makedepends="zlib-devel bzip2-devel freetype-devel alsa-lib-devel libXfixes-deve
libXext-devel libXvMC-devel faac-devel faad2-devel lame-devel libtheora-devel
gnutls-devel libvorbis-devel x264-devel xvidcore-devel jack-devel SDL-devel
libcdio-paranoia-devel libvpx-devel librtmp-devel freetype-devel libmodplug-devel
speex-devel celt-devel harfbuzz-devel libass-devel opus-devel pulseaudio-devel ocl-icd-devel"
speex-devel celt-devel harfbuzz-devel libass-devel opus-devel pulseaudio-devel
ocl-icd-devel $(vopt_if x265 x265-devel) $(vopt_if vaapi libva-devel)
$(vopt_if vdpau libvdpau-devel) $(vopt_if v4l2 v4l-utils-devel)"
build_options="x265 v4l2 vaapi vdpau"
build_options_default="v4l2"
case "$XBPS_TARGET_MACHINE" in
# XXX x265 cannot be cross compiled
i686*|x86_64*) makedepends+=" x265-devel libva-devel libvdpau-devel";;
i686*|x86_64*) build_options_default+=" x265 vaapi vdpau";;
esac
do_configure() {
case "$XBPS_TARGET_MACHINE" in
i686*|x86_64*) _args="--enable-libx265 --enable-vdpau --enable-vaapi";;
esac
if [ "$CROSS_BUILD" ]; then
case "$XBPS_TARGET_MACHINE" in
arm*) _arch="arm";;
@ -47,7 +48,10 @@ do_configure() {
--enable-libspeex --enable-libcelt --enable-libass \
--disable-libopencore_amrnb --disable-libopencore_amrwb \
--disable-libschroedinger --disable-libopenjpeg \
--enable-postproc --enable-opencl ${_args}
--enable-postproc --enable-opencl ${_args} \
$(vopt_if x265 '--enable-libx265' '--disable-libx265') \
$(vopt_if v4l2 '--enable-libv4l2' '--disable-libv4l2') \
$(vopt_enable vaapi) $(vopt_enable vdpau)
}
do_build() {
rm ${XBPS_WRAPPERDIR}/strip