app-crypt/gcr: fix desktop files
authorMart Raudsepp <leio@gentoo.org>
Wed, 25 Dec 2019 20:49:24 +0000 (22:49 +0200)
committerMart Raudsepp <leio@gentoo.org>
Wed, 25 Dec 2019 20:50:28 +0000 (22:50 +0200)
Closes: https://bugs.gentoo.org/702040
Package-Manager: Portage-2.3.79, Repoman-2.3.12
Signed-off-by: Mart Raudsepp <leio@gentoo.org>
app-crypt/gcr/files/3.34.0-fix-desktop-files.patch [new file with mode: 0644]
app-crypt/gcr/gcr-3.34.0-r1.ebuild [moved from app-crypt/gcr/gcr-3.34.0.ebuild with 95% similarity]

diff --git a/app-crypt/gcr/files/3.34.0-fix-desktop-files.patch b/app-crypt/gcr/files/3.34.0-fix-desktop-files.patch
new file mode 100644 (file)
index 0000000..0678937
--- /dev/null
@@ -0,0 +1,61 @@
+From a69dc44e11270ce092babfa57fe3aab31da9619c Mon Sep 17 00:00:00 2001
+From: Daiki Ueno <dueno@src.gnome.org>
+Date: Mon, 21 Oct 2019 12:02:05 +0200
+Subject: [PATCH] build: Use sed for .desktop variables substitution
+
+We can't do that with configure, as it leaves ${exec_prefix}.
+---
+ configure.ac   | 2 --
+ ui/Makefile.am | 6 ++++++
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 1ba43d6..6286f16 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -423,8 +423,6 @@ gcr/gcr-version.h
+ po/Makefile.in
+ ui/gcr.pc
+ ui/gcr-ui.pc
+-ui/gcr-prompter.desktop.in
+-ui/gcr-viewer.desktop.in
+ ui/icons/16x16/Makefile
+ ui/icons/22x22/Makefile
+ ui/icons/24x24/Makefile
+diff --git a/ui/Makefile.am b/ui/Makefile.am
+index 29c33e7..7594621 100644
+--- a/ui/Makefile.am
++++ b/ui/Makefile.am
+@@ -209,6 +209,8 @@ gcr_viewer_LDADD = \
+ viewer_desktop_in_in = ui/gcr-viewer.desktop.in.in
+ viewer_desktop_in = $(viewer_desktop_in_in:.desktop.in.in=.desktop.in)
+ viewer_desktop = $(viewer_desktop_in:.desktop.in=.desktop)
++$(viewer_desktop_in): $(viewer_desktop_in_in)
++      $(AM_V_GEN) sed 's|@bindir[@]|$(bindir)|g' $< > $@
+ $(viewer_desktop): $(viewer_desktop_in)
+       $(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
+@@ -231,9 +233,12 @@ gcr_prompter_LDADD = \
+ prompter_desktop_in_in = ui/gcr-prompter.desktop.in.in
+ prompter_desktop_in = $(prompter_desktop_in_in:.desktop.in.in=.desktop.in)
+ prompter_desktop = $(prompter_desktop_in:.desktop.in=.desktop)
++$(prompter_desktop_in): $(prompter_desktop_in_in)
++      $(AM_V_GEN) sed 's|@libexecdir[@]|$(libexecdir)|g' $< > $@
+ $(prompter_desktop): $(prompter_desktop_in)
+       $(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
++desktop_in_in_files = $(viewer_desktop_in_in) $(prompter_desktop_in_in)
+ desktop_in_files = $(desktop_in_in_files:.desktop.in.in=.desktop.in)
+ desktopdir = $(datadir)/applications
+ desktop_DATA = \
+@@ -247,6 +252,7 @@ EXTRA_DIST += \
+       ui/gcr.gresource.xml \
+       $(ui_RESOURCES) \
+       $(mime_DATA) \
++      $(desktop_in_in_files) \
+       ui/fixtures
+ CLEANFILES += \
+-- 
+2.24.1
+
similarity index 95%
rename from app-crypt/gcr/gcr-3.34.0.ebuild
rename to app-crypt/gcr/gcr-3.34.0-r1.ebuild
index c6e3d16d6c3ae7a6c8b1e34e1583fed5071f57a3..3c984e3e1e38fc0ff9b48dc98922caee4070b640 100644 (file)
@@ -4,6 +4,7 @@
 EAPI=6
 VALA_USE_DEPEND="vapigen"
 PYTHON_COMPAT=( python3_{6,7,8} )
+GNOME2_EAUTORECONF="yes"
 
 inherit gnome2 python-any-r1 vala virtualx
 
@@ -46,6 +47,10 @@ DEPEND="${COMMON_DEPEND}
 #      dev-libs/gobject-introspection-common
 #      dev-libs/vala-common
 
+PATCHES=(
+       "${FILESDIR}"/${PV}-fix-desktop-files.patch
+)
+
 pkg_setup() {
        python-any-r1_pkg_setup
 }