commit 984ce28f54eb6c7bd73752b559e87a60b4b9a50f
Author: Richard Shaw <hobbes1069(a)gmail.com>
Date: Mon Mar 4 09:31:43 2019 -0600
Add patch for gcc 9 to fix bundled ffmpeg building, fixes RFBZ#5175.
avidemux-ffmpeg_gcc9.patch | 13 +++++++++++++
avidemux.spec | 14 ++++++++++++--
2 files changed, 25 insertions(+), 2 deletions(-)
---
diff --git a/avidemux-ffmpeg_gcc9.patch b/avidemux-ffmpeg_gcc9.patch
new file mode 100644
index 0000000..848458f
--- /dev/null
+++ b/avidemux-ffmpeg_gcc9.patch
@@ -0,0 +1,13 @@
+diff --git a/libavutil/mem.h b/libavutil/mem.h
+index 55ae573ac9..5fb1a02dd9 100644
+--- libavutil/mem.h
++++ libavutil/mem.h
+@@ -339,7 +339,7 @@ av_alloc_size(2, 3) void *av_realloc_array(void *ptr, size_t nmemb,
size_t size)
+ * @warning Unlike av_malloc(), the allocated memory is not guaranteed to be
+ * correctly aligned.
+ */
+-av_alloc_size(2, 3) int av_reallocp_array(void *ptr, size_t nmemb, size_t size);
++int av_reallocp_array(void *ptr, size_t nmemb, size_t size);
+
+ /**
+ * Reallocate the given buffer if it is not large enough, otherwise do nothing.
diff --git a/avidemux.spec b/avidemux.spec
index ceeef0f..b56bb45 100644
--- a/avidemux.spec
+++ b/avidemux.spec
@@ -5,7 +5,7 @@
Name: avidemux
Version: 2.7.1
-Release: 9%{?dist}
+Release: 10%{?dist}
Summary: Graphical video editing and transcoding tool
License: GPLv2+
@@ -13,6 +13,7 @@ URL:
http://www.avidemux.org
Source0:
http://downloads.sourceforge.net/%{name}/%{name}_%{version}.tar.gz
Source1: avidemux-qt.desktop
Source2: rpmfusion-avidemux-qt.appdata.xml
+Source100: avidemux-ffmpeg_gcc9.patch
# Don't try to build on arm, aarch64 or ppc
ExclusiveArch: i686 x86_64
@@ -127,10 +128,15 @@ rm -rf avidemux_plugins/ADM_audioDecoders/ADM_ad_ac3/ADM_liba52 \
avidemux_plugins/ADM_videoFilters6/ass/ADM_libass \
avidemux_plugins/ADM_muxers/muxerMp4v2/libmp4v2
+# Add patch to bundled ffmpeg for gcc 9
+#
+install -pm 0644 %{SOURCE100}
./avidemux_core/ffmpeg_package/patches/libavutil_mem_h.patch
+
+
%build
# Build avidemux_core
export LDFLAGS="-lc -Wl,--as-needed"
-rm -rf build_core && mkdir build_core && pushd build_core
+mkdir build_core && pushd build_core
%cmake3 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
../avidemux_core
%make_build V=1
@@ -245,6 +251,7 @@ install -pDm 0644 avidemux_icon.png \
# Fix library permissions
find %{buildroot}%{_libdir} -type f -name "*.so.*" -exec chmod 0755 {} \;
+
%check
appstream-util validate-relax --nonet \
%{buildroot}%{_datadir}/metainfo/*.appdata.xml
@@ -314,6 +321,9 @@ fi
%changelog
+* Mon Mar 04 2019 Richard Shaw <hobbes1069(a)gmail.com> - 2.7.1-10
+- Add patch for gcc 9 to fix bundled ffmpeg building, fixes RFBZ#5175.
+
* Mon Mar 04 2019 RPM Fusion Release Engineering <leigh123linux(a)gmail.com> -
2.7.1-9
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild