commit:     b59a9f9eb1f78c21195c2d1017ff1b124dd3ad80
Author:     Filip Kobierski <fkobi <AT> pm <DOT> me>
AuthorDate: Sat Aug 30 12:08:04 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Nov  7 01:46:15 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b59a9f9e

app-text/zathura: add USE={X,wayland} & some improvements

- require xvfb-run instead of virtx for testing
- remove "A " from DESCRIPTION
- migrate live repo to GitHub
- assign SRC_URI in one line
- add comment explaining SLOT
- add USE=X to avoid automagic
- add USE=wayland to close bug
- bump glib & girara versions
- move conditional DEPENDs to the bottom
- remove sqlite version limter (too old)
- add appstream-glib test BDEPEND
  - also move check to BDEPEND
- remove libcheck dependency (removed in 0.5.7)
- use meson_feature
- fix indentation
- remove generic src_install

Closes: https://bugs.gentoo.org/958021
Signed-off-by: Filip Kobierski <fkobi <AT> pm.me>
Part-of: https://github.com/gentoo/gentoo/pull/41617
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-text/zathura/zathura-9999.ebuild | 57 +++++++++++++++++-------------------
 1 file changed, 27 insertions(+), 30 deletions(-)

diff --git a/app-text/zathura/zathura-9999.ebuild 
b/app-text/zathura/zathura-9999.ebuild
index fab7991a51d8..df2c55974e3d 100644
--- a/app-text/zathura/zathura-9999.ebuild
+++ b/app-text/zathura/zathura-9999.ebuild
@@ -3,69 +3,66 @@
 
 EAPI=8
 
-inherit meson virtualx xdg
+inherit flag-o-matic meson xdg
 
-DESCRIPTION="A highly customizable and functional document viewer"
+DESCRIPTION="Highly customizable & functional document viewer"
 HOMEPAGE="https://pwmt.org/projects/zathura/";
 
 if [[ ${PV} == *9999 ]]; then
        inherit git-r3
        EGIT_REPO_URI="https://github.com/pwmt/zathura.git";
 else
-       SRC_URI="
-               https://github.com/pwmt/zathura/archive/${PV}.tar.gz -> 
${P}.tar.gz
-       "
+       SRC_URI="https://github.com/pwmt/zathura/archive/${PV}.tar.gz -> 
${P}.tar.gz"
        KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86 ~amd64-linux ~x86-linux"
 fi
 
 LICENSE="ZLIB"
-SLOT="0/6.7"
-IUSE="+man seccomp synctex test"
-
+SLOT="0/6.7" # plugin versions api.abi (see meson.build)
+IUSE="+man seccomp synctex test wayland X"
 RESTRICT="!test? ( test )"
+REQUIRED_USE="
+       test? ( X )
+       || ( wayland X )
+"
 
 RDEPEND="
        dev-libs/json-glib
-       man? ( dev-python/sphinx )
-       seccomp? ( sys-libs/libseccomp )
-       synctex? ( app-text/texlive-core )
+       dev-db/sqlite:3
+       >=dev-libs/girara-0.4.5-r1:=[X?]
+       >=dev-libs/glib-2.76:2
        sys-apps/file
        x11-libs/cairo
+       >=x11-libs/gtk+-3.24:3[wayland?,X?]
        x11-libs/pango
-       >=dev-db/sqlite-3.6.23:3
-       >=dev-libs/girara-0.4.3:=
-       >=dev-libs/glib-2.72:2
-       >=x11-libs/gtk+-3.24:3
+       man? ( dev-python/sphinx )
+       seccomp? ( sys-libs/libseccomp )
+       synctex? ( app-text/texlive-core )
 "
 DEPEND="
        ${RDEPEND}
        >=sys-kernel/linux-headers-5.13
-       test? (
-               dev-libs/check
-               >=x11-libs/gtk+-3.24:3[X]
-       )
 "
 BDEPEND="
        >=sys-devel/gettext-0.19.8
        virtual/pkgconfig
+       test? (
+               dev-libs/appstream-glib
+               x11-misc/xvfb-run
+       )
 "
 
 src_configure() {
+       # defang automagic dependencies
+       use X || append-flags -DGENTOO_GTK_HIDE_X11
+       use wayland || append-flags -DGENTOO_GTK_HIDE_WAYLAND
+
        local emesonargs=(
                -Dconvert-icon=disabled
                -Dlandlock=enabled
-               -Dmanpages=$(usex man enabled disabled)
-               -Dseccomp=$(usex seccomp enabled disabled)
-               -Dsynctex=$(usex synctex enabled disabled)
+               $(meson_feature man manpages)
+               $(meson_feature seccomp)
+               $(meson_feature synctex)
                $(meson_feature test tests)
        )
        meson_src_configure
 }
-
-src_test() {
-       virtx meson_src_test
-}
-
-src_install() {
-       meson_src_install
-}

Reply via email to