From c698ba36133d460df46b9784953cedd44cfb60a7 Mon Sep 17 00:00:00 2001 From: Alessio Sergi Date: Fri, 10 Jun 2016 18:28:28 +0200 Subject: [PATCH] ffmpeg: add faac and fdk_aac build options (off) "The licenses of libfaac and libfdk_aac are not compatible with the GPL, so the GPL does not permit distribution of binaries containing code licensed under these licenses when GPL-licensed code is also included. Therefore these encoders have been designated as "non-free", and you cannot download a pre-built ffmpeg that supports them. This can be resolved by compiling ffmpeg yourself." See https://trac.ffmpeg.org/wiki/Encode/AAC. --- common/options.description | 2 ++ srcpkgs/ffmpeg/template | 11 ++++++----- srcpkgs/handbrake/template | 26 +++++++++++++------------- 3 files changed, 21 insertions(+), 18 deletions(-) diff --git a/common/options.description b/common/options.description index b3fee84e07f..1b2a0af229c 100644 --- a/common/options.description +++ b/common/options.description @@ -11,6 +11,8 @@ desc_option_dri2="Enable support for the DRI2 extension" desc_option_dri="Enable support for the DRI extension" desc_option_efi="Enable support for EFI" desc_option_expat="Enable support for XML via expat" +desc_option_faac="Enable support for FAAC codec" +desc_option_fdk_aac="Enable support for Fraunhofer FDK AAC codec" desc_option_framebuffer="Enable support for the Framebuffer" desc_option_gdk_pixbuf="Enable support to use transparency via gdk-pixbuf" desc_option_geoclue2="Enable support for geolocation (v2)" diff --git a/srcpkgs/ffmpeg/template b/srcpkgs/ffmpeg/template index 5f6632be857..7ae2fafadf7 100644 --- a/srcpkgs/ffmpeg/template +++ b/srcpkgs/ffmpeg/template @@ -1,7 +1,7 @@ # Template file for 'ffmpeg' pkgname=ffmpeg version=2.8.7 -revision=1 +revision=2 short_desc="Decoding, encoding and streaming software" maintainer="Juan RP " license="GPL-3" @@ -11,15 +11,15 @@ checksum=8777ce4a335640fdd13680ba423ef6da330ff5071bfbe27cdbb452379167efe5 hostmakedepends="pkg-config perl yasm" makedepends="zlib-devel bzip2-devel freetype-devel alsa-lib-devel libXfixes-devel - libXext-devel libXvMC-devel faac-devel faad2-devel lame-devel libtheora-devel + libXext-devel libXvMC-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 $(vopt_if x265 x265-devel) $(vopt_if vaapi libva-devel) $(vopt_if vdpau libvdpau-devel) $(vopt_if v4l2 v4l-utils-devel) libbs2b-devel - libvidstab-devel" + libvidstab-devel $(vopt_if faac faac-devel) $(vopt_if fdk_aac fdk-aac-devel)" -build_options="x265 v4l2 vaapi vdpau nonfree_possible" +build_options="x265 v4l2 vaapi vdpau faac fdk_aac" build_options_default="v4l2" case "$XBPS_TARGET_MACHINE" in @@ -48,7 +48,8 @@ do_configure() { --enable-libpulse --enable-libfreetype --enable-libmodplug \ --enable-libspeex --enable-libcelt --enable-libass \ --enable-libopus --enable-librtmp --enable-libmodplug \ - $(vopt_if nonfree_possible --enable-libfaac\ --enable-nonfree) \ + $(vopt_if faac '--enable-nonfree --enable-libfaac') \ + $(vopt_if fdk_aac '--enable-nonfree --enable-libfdk-aac') \ --disable-libopencore_amrnb --disable-libopencore_amrwb \ --disable-libschroedinger --disable-libopenjpeg \ --enable-postproc --enable-opencl ${_args} \ diff --git a/srcpkgs/handbrake/template b/srcpkgs/handbrake/template index 0dbd0615a20..576d03d37aa 100644 --- a/srcpkgs/handbrake/template +++ b/srcpkgs/handbrake/template @@ -2,36 +2,36 @@ only_for_archs="i686 i686-musl x86_64 x86_64-musl" pkgname=handbrake -version=0.10.2 -revision=2 +version=0.10.5 +revision=1 wrksrc="HandBrake-${version}" +build_options="fdk_aac" hostmakedepends="automake libtool cmake pkg-config intltool - python yasm wget m4 gettext-devel" + python yasm wget m4 gettext-devel glib-devel" makedepends="zlib-devel bzip2-devel libnotify-devel gtk+3-devel ncurses-devel - gst-plugins-base1-devel webkitgtk-devel libgudev-devel x264-devel + gst-plugins-base1-devel webkitgtk-devel libgudev-devel x264-devel x265-devel dbus-glib-devel fribidi-devel libass-devel fontconfig-devel libxml2-devel libogg-devel libdvdnav-devel libdvdread-devel libtheora-devel lame-devel - libsamplerate-devel libbluray-devel librsvg-devel" + libsamplerate-devel libbluray-devel librsvg-devel libvpx-devel ffmpeg-devel + $(vopt_if fdk_aac fdk-aac-devel)" depends="gst-plugins-good1 desktop-file-utils hicolor-icon-theme" short_desc="Multithreaded video transcoder" maintainer="Juan RP " license="GPL-2" homepage="http://handbrake.fr/" distfiles="https://handbrake.fr/rotation.php?file=HandBrake-${version}.tar.bz2>HandBrake-${version}.tar.bz2" -checksum=4cc3828393b26a982dbe00febd700c5090d3443c1d45492e0b373e02da73c699 +checksum=fb9230dd121b456f6829d1d25ac8bbf76e503b51c4efc70f0a7fd2bb8607e2f0 CFLAGS="-msse" pre_configure() { - # Use more system libs - sed -i \ - -e '/MODULES += contrib\/libbluray/d' \ - -e '/MODULES += contrib\/libdvdnav/d' \ - -e '/MODULES += contrib\/libdvdread/d' \ - make/include/main.defs + # use system libraries in place of bundled ones + for module in ffmpeg libvpx libdvdread libdvdnav libbluray x265 fdk-aac; do + sed -i "/MODULES += contrib\/${module}/d" make/include/main.defs + done } do_configure() { - ./configure --prefix=/usr --force --disable-gtk-update-checks + ./configure --prefix=/usr --force --disable-gtk-update-checks $(vopt_enable fdk_aac fdk-aac) } do_build() { unset AS LD