commit a245dc22e2f4adeb2c0d43c322e0ffd5754c14cb
Author: sagitter <sagitter(a)fedoraproject.org>
Date: Sat Jul 9 11:40:53 2016 +0200
Fix compatibility with ffmpeg-3.0 and GCC-6.1.1.
lives-ffmpeg-3-0.patch | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++
lives.spec | 27 ++++++++++++++--
2 files changed, 111 insertions(+), 2 deletions(-)
---
diff --git a/lives-ffmpeg-3-0.patch b/lives-ffmpeg-3-0.patch
new file mode 100644
index 0000000..0bbf18b
--- /dev/null
+++ b/lives-ffmpeg-3-0.patch
@@ -0,0 +1,86 @@
+--- lives-plugins/weed-plugins/toonz.cpp
++++ lives-plugins/weed-plugins/toonz.cpp
+@@ -38,7 +38,8 @@
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+-
++#include <array>
++#include <random>
+
+ #ifdef HAVE_SYSTEM_WEED
+ #include <weed/weed.h>
+
+--- configure.ac
++++ configure.ac
+@@ -524,10 +524,12 @@
+ AM_CONDITIONAL(HAVE_AV_CODEC_SET_PKT_TIMEBASE,$HAVE_AV_CODEC_SET_PKT_TIMEBASE)
+ AM_CONDITIONAL(HAVE_AVFORMAT_NEW_STREAM,$HAVE_AVFORMAT_NEW_STREAM)
+ AM_CONDITIONAL(HAVE_AVPACKET_UNREF,$HAVE_AVPACKET_UNREF)
++AM_CONDITIONAL(HAVE_AVFRAME_UNREF,$HAVE_AVFRAME_UNREF)
+ AM_CONDITIONAL(HAVE_AVFORMAT_FIND_STREAM_INFO,$HAVE_AVFORMAT_FIND_STREAM_INFO)
+ AM_CONDITIONAL(HAVE_AVFORMAT_CLOSE_INPUT,$HAVE_AVFORMAT_CLOSE_INPUT)
+ AM_CONDITIONAL(HAVE_AVFORMAT_INTERNAL_H,$HAVE_AVFORMAT_INTERNAL_H)
+ AM_CONDITIONAL(HAVE_AV_SET_PTS_INFO,$HAVE_AV_SET_PTS_INFO)
++AM_CONDITIONAL(HAVE_AVPRIV_SET_PTS_INFO,$HAVE_AVPRIV_SET_PTS_INFO)
+
+ HAVE_OPENCV=false
+
+--- lives-plugins/plugins/decoders/Makefile.am
++++ lives-plugins/plugins/decoders/Makefile.am
+@@ -78,8 +78,20 @@
+ libav_cflags += -DHAVE_AVCODEC_ALLOC_CONTEXT3=1
+ endif
+
++if HAVE_AV_CODEC_SET_PKT_TIMEBASE
++libav_cflags += -DHAVE_AV_CODEC_SET_PKT_TIMEBASE=1
++endif
++
+ if HAVE_AVFORMAT_NEW_STREAM
+ libav_cflags += -DHAVE_AVFORMAT_NEW_STREAM=1
++endif
++
++if HAVE_AVPACKET_UNREF
++libav_cflags += -DHAVE_AVPACKET_UNREF=1
++endif
++
++if HAVE_AVFRAME_UNREF
++libav_cflags += -DHAVE_AVFRAME_UNREF=1
+ endif
+
+ if HAVE_AVFORMAT_FIND_STREAM_INFO
+@@ -97,6 +109,12 @@
+ if HAVE_AV_SET_PTS_INFO
+ libav_cflags += -DHAVE_AV_SET_PTS_INFO=1
+ endif
++
++if HAVE_AVPRIV_SET_PTS_INFO
++libav_cflags += -DHAVE_AVPRIV_SET_PTS_INFO=1
++endif
++
++
+
+ flv_libs = flv_decoder.la
+ FLVDEC_LIBS = @LIBAVCODEC_LIBS@ @LIBAVFORMAT_LIBS@
+
+--- lives-plugins/plugins/decoders/libav_helper.h
++++ lives-plugins/plugins/decoders/libav_helper.h
+@@ -62,8 +62,8 @@
+
+
+ #if !HAVE_AV_SET_PTS_INFO
+-#if HAVE_AVFORMAT_INTERNAL_H
+
++#if HAVE_AVFORMAT_INTERNAL_H && HAVE_AVPRIV_SET_PTS_INFO
+ #include <avformat/internal.h>
+ #define av_set_pts_info(a,b,c,d) avpriv_set_pts_info(a,b,c,d)
+
+@@ -77,7 +77,7 @@
+
+
+
+-static UNUSED void av_set_pts_info(AVStream *s, int pts_wrap_bits,
++static UNUSED void av_set_pts_info(AVStream *s, int pts_wrap_bits,
+ unsigned int pts_num, unsigned int pts_den) {
+ AVRational new_tb;
+ if (av_reduce(&new_tb.num, &new_tb.den, pts_num, pts_den, INT_MAX)) {
diff --git a/lives.spec b/lives.spec
index 88588bb..9619861 100644
--- a/lives.spec
+++ b/lives.spec
@@ -1,6 +1,6 @@
Name: lives
Version: 2.6.3
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Video editor and VJ tool
License: GPLv3+ and LGPLv3+
URL:
http://lives-video.com
@@ -8,6 +8,9 @@ Source0:
http://lives-video.com/releases/LiVES-%{version}.tar.bz2
## Appdata file downloaded from
http://sourceforge.net/p/lives/code/HEAD/tree/trunk/LiVES.appdata.xml
Source1: LiVES.appdata.xml
+# Fix compatibility with ffmpeg-3.0
+Patch0: lives-ffmpeg-3-0.patch
+
BuildRequires: pkgconfig(jack)
BuildRequires: pkgconfig(sdl)
BuildRequires: pkgconfig(libpulse)
@@ -34,7 +37,7 @@ BuildRequires: pkgconfig(mjpegtools)
BuildRequires: ladspa-devel
BuildRequires: GLee-devel
BuildRequires: x264-libs
-BuildRequires: gettext
+BuildRequires: gettext-devel
BuildRequires: doxygen
BuildRequires: chrpath, desktop-file-utils
BuildRequires: bison
@@ -43,6 +46,11 @@ BuildRequires: ffmpeg-devel
BuildRequires: bzip2-devel
BuildRequires: libappstream-glib
+# Packages for re-configuration
+%if 0%{?fedora} > 24
+BuildRequires: autoconf, automake, libtool
+%endif
+
Requires: mplayer
Requires: mencoder
Requires: sox
@@ -73,12 +81,24 @@ It is small in size, yet it has many advanced features.
%prep
%setup -q
+%if 0%{?fedora} > 24
+%patch0 -p0
+%endif
+
+# Fix to compile with GCC-6.1.1
+%if 0%{?fedora} > 23
+sed -e 's|toonz.cpp||g' -i lives-plugins/weed-plugins/Makefile.am
+%endif
+
##Remove spurious executable permissions
for i in `find . -type f \( -name "*.c" -o -name "*.h" -o -name
"*.txt" \)`; do
chmod a-x $i
done
%build
+%if 0%{?fedora} > 24
+autoreconf -ivf
+%endif
%configure --disable-silent-rules --enable-shared --enable-static \
--enable-largefile --enable-threads --disable-rpath --enable-profiling \
--enable-doxygen --disable-projectM --disable-libvisual
@@ -153,6 +173,9 @@ appstream-util validate-relax --nonet
%{buildroot}%{_datadir}/appdata/*.appdata.
%{_datadir}/appdata/LiVES.appdata.xml
%changelog
+* Fri Jul 08 2016 Antonio Trande <sagitterATfedoraproject.org> - 2.6.3-2
+- Fix compatibility with ffmpeg-3.0
+
* Mon May 09 2016 Antonio Trande <sagitterATfedoraproject.org> - 2.6.3-1
- Update to 2.6.3