# Copyright 2025 illogician # Distributed under the terms of the GNU General Public License v2 EAPI=8 inherit flag-o-matic gnome2 meson xdg-utils DESCRIPTION="A generic document reader" HOMEPAGE="https://github.com/linuxmint/xreader" SRC_URI="https://github.com/linuxmint/xreader/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" IUSE="comics djvu dvi t1lib epub +pdf pixbuf +ps +tiff +xps +gtk_unix_print +keyring +previewer +thumbnailer docs +help_files +introspection +enable_dbus wayland" LICENSE="GPL-2" SLOT="0" KEYWORDS="amd64 arm arm64 x86" DEPEND=" x11-libs/cairo dev-libs/gobject-introspection dev-libs/Ice app-text/djvu dev-libs/mathjax gui-libs/gtk x11-libs/xapp dev-libs/libxml2 dev-util/gtk-doc dev-util/itstool pdf? ( app-text/poppler ) ps? ( app-text/libspectre ) dvi? ( app-text/libspectre dev-libs/kpathsea ) introspection? ( gui-libs/gtk[introspection] ) keyring? ( app-crypt/libsecret ) djvu? ( app-text/djvu ) comics? ( app-arch/libarchive ) epub? ( net-libs/webkit-gtk:4.1 ) xps? ( app-text/libgxps ) " RDEPEND="${DEPEND}" BDEPEND="${RDEPEND}" src_unpack() { default } src_configure() { xdg_environment_reset eapply ${FILESDIR}/meson.build.patch use !wayland && eapply ${FILESDIR}/ev-document-misc.h.patch local emesonargs=( $(meson_use comics) $(meson_use djvu) $(meson_use dvi) $(meson_use t1lib) $(meson_use epub) $(meson_use pdf) $(meson_use pixbuf) $(meson_use ps) $(meson_use tiff) $(meson_use xps) $(meson_use gtk_unix_print) $(meson_use keyring) $(meson_use previewer) $(meson_use thumbnailer) $(meson_use docs) $(meson_use help_files) $(meson_use introspection) $(meson_use enable_dbus) ) meson_src_configure } src_compile() { meson_src_compile } src_install() { meson_src_install } pkg_postinst() { gnome2_pkg_postinst xdg_desktop_database_update xdg_icon_cache_update } pkg_postrm() { xdg_desktop_database_update xdg_icon_cache_update }