commit:     28b1318d4915d68e7e081e5b96a46d73beccf062
Author:     Ronny (tastytea) Gutbrod <gentoo <AT> tastytea <DOT> de>
AuthorDate: Thu May 21 18:52:43 2020 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Tue Jun 16 06:02:51 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28b1318d

media-gfx/viewnior: Update metainfo location; Revbump.

 - Use xdg for icon cache update.
 - EAPI 7.

Closes: https://bugs.gentoo.org/724402
Signed-off-by: Ronny (tastytea) Gutbrod <gentoo <AT> tastytea.de>
Closes: https://github.com/gentoo/gentoo/pull/15905
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 .../viewnior-0.17-update_metadata_location.patch   | 42 +++++++++++++++++
 media-gfx/viewnior/viewnior-1.7-r2.ebuild          | 52 ++++++++++++++++++++++
 2 files changed, 94 insertions(+)

diff --git 
a/media-gfx/viewnior/files/viewnior-0.17-update_metadata_location.patch 
b/media-gfx/viewnior/files/viewnior-0.17-update_metadata_location.patch
new file mode 100644
index 00000000000..492186059d9
--- /dev/null
+++ b/media-gfx/viewnior/files/viewnior-0.17-update_metadata_location.patch
@@ -0,0 +1,42 @@
+From f338c37881a860952aa10cc437bc72fa0b49a823 Mon Sep 17 00:00:00 2001
+From: tastytea <[email protected]>
+Date: Thu, 21 May 2020 20:07:45 +0200
+Subject: [PATCH] Rename appdata.xml to metainfo.xml and change install dir.
+
+The new name is used since AppStream 0.9.8 (2016-08-10) and the new
+location is used since AppStream 0.9.4 (2016-04-18).
+---
+ data/meson.build                                     | 6 +++---
+ data/{viewnior.appdata.xml => viewnior.metainfo.xml} | 0
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+ rename data/{viewnior.appdata.xml => viewnior.metainfo.xml} (100%)
+
+diff --git a/data/meson.build b/data/meson.build
+index 55070fc..05d734e 100644
+--- a/data/meson.build
++++ b/data/meson.build
+@@ -17,8 +17,8 @@ install_data(
+ )
+ 
+ install_data(
+-  'viewnior.appdata.xml',
+-  install_dir: join_paths(datadir, 'appdata')
++  'viewnior.metainfo.xml',
++  install_dir: join_paths(datadir, 'metainfo')
+ )
+ 
+ desktop = i18n.merge_file(
+@@ -39,4 +39,4 @@ if desktop_file_validate.found()
+       desktop.full_path()
+     ]
+   )
+-endif
+\ No newline at end of file
++endif
+diff --git a/data/viewnior.appdata.xml b/data/viewnior.metainfo.xml
+similarity index 100%
+rename from data/viewnior.appdata.xml
+rename to data/viewnior.metainfo.xml
+-- 
+2.26.2
+

diff --git a/media-gfx/viewnior/viewnior-1.7-r2.ebuild 
b/media-gfx/viewnior/viewnior-1.7-r2.ebuild
new file mode 100644
index 00000000000..60e6b46a431
--- /dev/null
+++ b/media-gfx/viewnior/viewnior-1.7-r2.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit meson xdg
+
+DESCRIPTION="Fast and simple image viewer"
+HOMEPAGE="
+       https://siyanpanayotov.com/project/viewnior/
+       https://github.com/hellosiyan/Viewnior
+"
+SRC_URI="https://github.com/hellosiyan/${PN^}/archive/${P}.tar.gz";
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+       dev-libs/glib:2
+       media-gfx/exiv2:0=
+       x11-libs/gtk+:2
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       dev-util/glib-utils
+       virtual/pkgconfig
+"
+
+S="${WORKDIR}/${PN^}-${P}"
+
+PATCHES=(
+       "${FILESDIR}/0.17-Replace-calls-to-getenv-with-g_getenv.patch"
+       "${FILESDIR}/viewnior-0.17-update_metadata_location.patch"
+)
+
+src_prepare() {
+       xdg_src_prepare
+
+       # That script would update icon cache and desktop database.
+       sed -i "s/meson.add_install_script('meson_post_install.py')//" 
meson.build \
+               || die 'Failed to remove post-install-script invocation from 
meson.build'
+       # Don't let meson compress the manpage.
+       sed -i "s/subdir('man')//" meson.build \
+               || die 'Failed to remove manpage compression from meson.build'
+}
+
+src_install() {
+       meson_src_install
+       doman man/viewnior.1
+}

Reply via email to