commit 7d610367f585ec505167023ac695856bb5106480
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Sun Jun 14 23:52:44 2020 +0100
Disable metainfo on rhel
HandBrake-no-metainfo.patch | 30 ++++++++++++++++++++++++++++++
HandBrake.spec | 14 +++++++++-----
2 files changed, 39 insertions(+), 5 deletions(-)
---
diff --git a/HandBrake-no-metainfo.patch b/HandBrake-no-metainfo.patch
new file mode 100644
index 0000000..0e7f589
--- /dev/null
+++ b/HandBrake-no-metainfo.patch
@@ -0,0 +1,30 @@
+From e7c9888197491747a98f413b9b3503e9fb42b26d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin(a)martin.st>
+Date: Mon, 25 May 2020 13:08:24 +0300
+Subject: [PATCH] gtk: Skip building the metainfo xml when targeting windows
+
+This file is only supposed to be used by desktop managers to get info
+about the app. On windows, the file is unused.
+
+Since 368576dc9aa94c792a309e227c9a893776d8cdd1, the translation step
+for this file requires gettext 0.20 or newer.
+---
+ gtk/src/Makefile.am | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/gtk/src/Makefile.am b/gtk/src/Makefile.am
+index 147df424e..f9e30458f 100644
+--- a/gtk/src/Makefile.am
++++ b/gtk/src/Makefile.am
+@@ -41,8 +41,10 @@ hb_menu = fr.handbrake.ghb.desktop
+
+ metainfodir = $(datarootdir)/metainfo
+ metainfo_in_files = fr.handbrake.ghb.metainfo.xml.in
++if MINGW
+ metainfo_DATA = $(metainfo_in_files:.xml.in=.xml)
+ dist_metainfo_DATA = $(metainfo_files)
++endif
+
+ EXTRA_DIST = \
+ $(metainfo_in_files)
+
diff --git a/HandBrake.spec b/HandBrake.spec
index f0d5dfe..05ebe38 100644
--- a/HandBrake.spec
+++ b/HandBrake.spec
@@ -47,12 +47,15 @@ Patch4: %{name}-no-libva.patch
Patch5: %{name}-qsv.patch
# Fix build on non-x86 (without nasm)
Patch6: %{name}-no-nasm.patch
+# rhel gettext is too old to support metainfo
+#
https://github.com/HandBrake/HandBrake/pull/2884
+Patch7: %{name}-no-metainfo.patch
BuildRequires: a52dec-devel >= 0.7.4
BuildRequires: cmake3
BuildRequires: dbus-glib-devel
BuildRequires: desktop-file-utils
-%if 0%{?fedora} || 0%{?rhel} >= 7
+%if 0%{?fedora}
BuildRequires: libappstream-glib
%endif
%{!?_without_ffmpeg:BuildRequires: ffmpeg-devel >= 3.5}
@@ -152,6 +155,9 @@ gpgv2 --keyring %{S:2} %{S:1} %{S:0}
%patch5 -p1
%endif
%patch6 -p1
+%if 0%{?rhel}
+%patch7 -p1
+%endif
mkdir -p download
%{?_without_ffmpeg:cp -p %{SOURCE10} download}
@@ -215,7 +221,7 @@ install -D -p -m 644 gtk/src/%{desktop_id}.svg \
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{desktop_id}.desktop
-%if 0%{?fedora} || 0%{?rhel} >= 7
+%if 0%{?fedora}
appstream-util validate-relax --nonet
%{buildroot}%{_metainfodir}/%{desktop_id}.metainfo.xml
%endif
@@ -241,10 +247,8 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null ||
:
%license COPYING
%doc AUTHORS.markdown NEWS.markdown README.markdown THANKS.markdown
%{_bindir}/ghb
-%if 0%{?fedora} || 0%{?rhel} >= 7
+%if 0%{?fedora}
%{_metainfodir}/%{desktop_id}.metainfo.xml
-%else
-%exclude %{_metainfodir}/%{desktop_id}.metainfo.xml
%endif
%{_datadir}/applications/%{desktop_id}.desktop
%{_datadir}/icons/hicolor/scalable/apps/%{desktop_id}.svg