commit:     4506ae48b4e9014489f02ca253102b4f00a6b29e
Author:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 15 23:20:04 2022 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Sat Jan 15 23:20:25 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4506ae48

gnome-extra/gucharmap: various packaging fixes

* Always install user help, not only with USE=gtk-doc; add missing
  itstool dep for it
* Add missing docbook-xml-dtd dependency
* Drop USE=debug which ends up only adding -ggdb3 to CFLAGS
* Move gettext files back to have an API suffix to avoid conflicts
  with old SLOT
* Drop redundant VALA_USE_DEPEND=vapigen
* Include upstream patch for meson-0.60 compatibility
* Be explicit with meson options
* Reorder dependencies back to gnome <AT> g.o style

Closes: https://bugs.gentoo.org/753449
Package-Manager: Portage-3.0.20, Repoman-3.0.2
Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>

 .../files/14.0.1-fix-file-conflicts.patch          | 26 ++++++++
 .../gucharmap/files/14.0.1-install-user-help.patch | 28 ++++++++
 .../gucharmap/files/14.0.1-meson-0.60-fix.patch    | 32 +++++++++
 gnome-extra/gucharmap/gucharmap-14.0.1-r1.ebuild   | 75 ++++++++++++++++++++++
 4 files changed, 161 insertions(+)

diff --git a/gnome-extra/gucharmap/files/14.0.1-fix-file-conflicts.patch 
b/gnome-extra/gucharmap/files/14.0.1-fix-file-conflicts.patch
new file mode 100644
index 000000000000..55a346271880
--- /dev/null
+++ b/gnome-extra/gucharmap/files/14.0.1-fix-file-conflicts.patch
@@ -0,0 +1,26 @@
+From 92b5a40d2d84e1989cdd091a10660e14e66c4daf Mon Sep 17 00:00:00 2001
+From: Mart Raudsepp <m...@leio.tech>
+Date: Sun, 16 Jan 2022 01:03:08 +0200
+Subject: [PATCH 3/3] build: Use API version in gettext domain
+
+Avoids file conficts with other API versions being installed on the system.
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 00cfbeec..db44e1dd 100644
+--- a/meson.build
++++ b/meson.build
+@@ -78,7 +78,7 @@ libgucharmap_gtk4_soversion = '0'
+ 
+ # i18n
+ 
+-gucharmap_gettext_domain = gucharmap_name
++gucharmap_gettext_domain = libgucharmap_gtk3_api_name
+ po_dir = meson.current_source_dir() / 'po'
+ 
+ # Directories
+-- 
+2.32.0
+

diff --git a/gnome-extra/gucharmap/files/14.0.1-install-user-help.patch 
b/gnome-extra/gucharmap/files/14.0.1-install-user-help.patch
new file mode 100644
index 000000000000..42507f865685
--- /dev/null
+++ b/gnome-extra/gucharmap/files/14.0.1-install-user-help.patch
@@ -0,0 +1,28 @@
+From 3193fe41561e6ddd99c1f5148089aa51c88236aa Mon Sep 17 00:00:00 2001
+From: Mart Raudsepp <m...@leio.tech>
+Date: Sun, 16 Jan 2022 01:00:43 +0200
+Subject: [PATCH 2/3] build: Always build and install user help
+
+We need a separate knob for gtk-doc that wouldn't affect user help
+being installed. Just remove the docs option check for user help to
+always installed it for us.
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 9529f5d1..00cfbeec 100644
+--- a/meson.build
++++ b/meson.build
+@@ -262,7 +262,7 @@ if get_option('docs')
+   subdir('docs' / 'reference')
+ endif
+ 
+-if get_option('docs') and get_option('charmap')
++if get_option('charmap')
+   subdir('help')
+ endif
+ 
+-- 
+2.32.0
+

diff --git a/gnome-extra/gucharmap/files/14.0.1-meson-0.60-fix.patch 
b/gnome-extra/gucharmap/files/14.0.1-meson-0.60-fix.patch
new file mode 100644
index 000000000000..682f52a960c4
--- /dev/null
+++ b/gnome-extra/gucharmap/files/14.0.1-meson-0.60-fix.patch
@@ -0,0 +1,32 @@
+From 7e748fcf7e7459e3a0368f4d057d241adc71936b Mon Sep 17 00:00:00 2001
+From: Christian Persch <c...@src.gnome.org>
+Date: Wed, 15 Dec 2021 00:03:33 +0100
+Subject: [PATCH 1/3] build: Fix build with meson 0.60
+
+---
+ data/meson.build | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/data/meson.build b/data/meson.build
+index 11e4e8a6..4bd50014 100644
+--- a/data/meson.build
++++ b/data/meson.build
+@@ -18,7 +18,6 @@
+ metainfodir = gucharmap_prefix / gucharmap_datadir / 'metainfo'
+ 
+ i18n.merge_file(
+-  'gucharmap.metainfo.xml',
+   input: 'gucharmap.metainfo.xml.in',
+   output: '@BASENAME@',
+   po_dir: po_dir,
+@@ -42,7 +41,6 @@ desktop_in = configure_file(
+ )
+ 
+ i18n.merge_file(
+-  'gucharmap.desktop',
+   input: desktop_in,
+   output: '@BASENAME@',
+   type: 'desktop',
+-- 
+2.32.0
+

diff --git a/gnome-extra/gucharmap/gucharmap-14.0.1-r1.ebuild 
b/gnome-extra/gucharmap/gucharmap-14.0.1-r1.ebuild
new file mode 100644
index 000000000000..b276ab3b6f18
--- /dev/null
+++ b/gnome-extra/gucharmap/gucharmap-14.0.1-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python3_{8..10} )
+VALA_MIN_API_VERSION="0.26"
+
+inherit gnome2-utils meson python-any-r1 vala xdg
+
+DESCRIPTION="Unicode character map viewer and library"
+HOMEPAGE="https://wiki.gnome.org/Apps/Gucharmap";
+SRC_URI="https://gitlab.gnome.org/GNOME/${PN}/-/archive/${PV}/${P}.tar.gz";
+
+LICENSE="GPL-3+"
+SLOT="2.90"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+
+UNICODE_VERSION="14.0"
+
+IUSE="+introspection gtk-doc vala"
+REQUIRED_USE="vala? ( introspection )"
+
+RDEPEND="media-libs/freetype:2
+       >=dev-libs/glib-2.32:2
+       >=x11-libs/gtk+-3.22:3[introspection?]
+       >=dev-libs/libpcre2-10.21:=
+       =app-i18n/unicode-data-${UNICODE_VERSION}*
+       >=x11-libs/pango-1.42.4-r2[introspection?]
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       ${PYTHON_DEPS}
+       app-text/docbook-xml-dtd:4.1.2
+       dev-util/itstool
+       >=sys-devel/gettext-0.19.8
+       virtual/pkgconfig
+       gtk-doc? ( >=dev-util/gtk-doc-1 )
+       introspection? ( >=dev-libs/gobject-introspection-1.54:= )
+       vala? ( $(vala_depend) )
+"
+
+PATCHES=(
+       "${FILESDIR}"/${PV}-meson-0.60-fix.patch
+       "${FILESDIR}"/14.0.1-install-user-help.patch
+       "${FILESDIR}"/14.0.1-fix-file-conflicts.patch
+)
+
+src_prepare() {
+       use vala && vala_src_prepare
+       xdg_src_prepare
+}
+
+src_configure() {
+       local emesonargs=(
+               -Dcharmap=true
+               -Ddbg=false # in 14.0.1 all this does is pass -ggdb3
+               $(meson_use gtk-doc docs)
+               $(meson_use introspection gir)
+               -Dgtk3=true
+               -Ducd_path="${EPREFIX}/usr/share/unicode-data"
+               $(meson_use vala vapi)
+       )
+
+       meson_src_configure
+}
+
+pkg_postinst() {
+       xdg_pkg_postinst
+       gnome2_schemas_update
+}
+
+pkg_postrm() {
+       xdg_pkg_postrm
+       gnome2_schemas_update
+}

Reply via email to