commit:     e7a978de40f3e9cd1d05bb33434ab632d7e7bc3f
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 16 10:37:26 2024 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sun Jun 16 10:39:14 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e7a978de

app-dicts/gwaei: Migrate to yelp

Stop using dead gnome-doc-utils

Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>

 app-dicts/gwaei/files/gwaei-3.6.2-yelp.patch | 53 +++++++++++++++++
 app-dicts/gwaei/gwaei-3.6.2-r1.ebuild        | 86 ++++++++++++++++++++++++++++
 2 files changed, 139 insertions(+)

diff --git a/app-dicts/gwaei/files/gwaei-3.6.2-yelp.patch 
b/app-dicts/gwaei/files/gwaei-3.6.2-yelp.patch
new file mode 100644
index 000000000000..a5515561fd59
--- /dev/null
+++ b/app-dicts/gwaei/files/gwaei-3.6.2-yelp.patch
@@ -0,0 +1,53 @@
+---
+ autogen.sh                 |    1 -
+ configure.ac               |    4 +---
+ src/gwaei/help/Makefile.am |    5 +++--
+ 3 files changed, 4 insertions(+), 6 deletions(-)
+
+--- gwaei.git.orig/configure.ac
++++ gwaei.git/configure.ac
+@@ -73,8 +73,6 @@ AM_CONDITIONAL([WITH_MECAB], [test x$mec
+ 
+ AC_CHECK_LIB(m, sqrt)
+ 
+-GNOME_DOC_INIT(,,[:]) 
+-
+ PKG_CHECK_MODULES(LIBWAEI, glib-2.0           >= $GLIB_REQUIRED_VERSION
+                            gobject-2.0        >= $GLIB_REQUIRED_VERSION
+                            gio-2.0            >= $GIO_REQUIRED_VERSION
+@@ -103,7 +101,7 @@ if test x$gnome = xtrue; then
+                            libcurl            >= $LIBCURL_REQUIRED_VERSION )
+   AC_SUBST(GWAEI_CFLAGS)
+   AC_SUBST(GWAEI_LIBS)
+-  GNOME_DOC_INIT
++  YELP_HELP_INIT
+ fi
+ 
+ if test x$hunspell = xtrue; then
+--- gwaei.git.orig/src/gwaei/help/Makefile.am
++++ gwaei.git/src/gwaei/help/Makefile.am
+@@ -2,10 +2,12 @@ PACKAGE = @PACKAGE@
+ VERSION = @VERSION@
+ datadir = @datadir@
+ 
+-include $(top_srcdir)/gnome-doc-utils.make
++@YELP_HELP_RULES@
+ dist-hook: doc-dist-hook
+-DOC_MODULE = gwaei
++HELP_MODULE = gwaei
++HELP_ID = gwaei
+ 
++HELP_FILES=glossary.xml gwaei.xml
+ cglossarydir = $(datadir)/gnome/help/$(PACKAGE)/C
+ cglossary_DATA = C/glossary.xml
+ EXTRA_DIST = C/glossary.xml
+--- gwaei.git.orig/autogen.sh
++++ gwaei.git/autogen.sh
+@@ -6,7 +6,6 @@ touch ChangeLog
+ libtoolize --force
+ glib-gettextize --copy --force
+ intltoolize --copy --force --automake
+-gnome-doc-prepare --copy --force
+ aclocal -I m4 --force
+ autoheader -f
+ automake --copy --force --add-missing

diff --git a/app-dicts/gwaei/gwaei-3.6.2-r1.ebuild 
b/app-dicts/gwaei/gwaei-3.6.2-r1.ebuild
new file mode 100644
index 000000000000..0939ac61c424
--- /dev/null
+++ b/app-dicts/gwaei/gwaei-3.6.2-r1.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools gnome2-utils xdg
+
+DESCRIPTION="Japanese-English Dictionary for GNOME"
+HOMEPAGE="https://github.com/zakkudo/gwaei";
+SRC_URI="https://downloads.sourceforge.net/gwaei/${P}.tar.xz";
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~riscv ~x86"
+IUSE="gtk hunspell nls mecab test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       >=net-misc/curl-7.20.0
+       >=dev-libs/glib-2.31
+       gtk? (
+               x11-libs/gtk+:3
+               app-text/yelp-tools
+       )
+       hunspell? ( app-text/hunspell )
+       nls? ( virtual/libintl )
+       mecab? ( app-text/mecab )"
+DEPEND="${RDEPEND}
+       gtk? (
+               x11-themes/gnome-icon-theme-symbolic
+               app-text/yelp-tools
+       )"
+BDEPEND="
+       app-text/rarian
+       dev-util/intltool
+       virtual/pkgconfig
+       nls? ( >=sys-devel/gettext-0.17 )
+       test? (
+               app-text/docbook-xml-dtd:4.1.2
+               app-text/scrollkeeper-dtd
+       )"
+
+PATCHES=(
+       # Migrate away from gnome-doc-utils (from Debian)
+       "${FILESDIR}/${P}-yelp.patch"
+)
+
+src_prepare() {
+       default
+       eautoreconf
+}
+
+src_configure() {
+       econf \
+               --disable-static \
+               $(use_with gtk gnome) \
+               $(use_enable nls) \
+               $(use_with hunspell) \
+               $(use_with mecab)
+}
+
+src_install() {
+       default
+       find "${ED}" -name '*.la' -delete || die
+}
+
+pkg_preinst() {
+       if use gtk; then
+               gnome2_schemas_savelist
+               xdg_pkg_preinst
+       fi
+}
+
+pkg_postinst() {
+       if use gtk; then
+               gnome2_schemas_update
+               xdg_pkg_postinst
+       fi
+}
+
+pkg_postrm() {
+       if use gtk; then
+               gnome2_schemas_update
+               xdg_pkg_postrm
+       fi
+}

Reply via email to