commit:     f3206dd137fa5caa52756078819bf5a194aab502
Author:     Nickolas Raymond Kaczynski <nrk <AT> disroot <DOT> org>
AuthorDate: Thu Sep 23 06:44:42 2021 +0000
Commit:     Nickolas Raymond Kaczynski <nrk <AT> disroot <DOT> org>
CommitDate: Thu Sep 23 06:46:32 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=f3206dd1

media-gfx/nsxiv: add inotify, deafult enable gif

Package-Manager: Portage-3.0.22, Repoman-3.0.3
Signed-off-by: Nickolas Raymond Kaczynski <nrk <AT> disroot.org>

 media-gfx/nsxiv/nsxiv-27.1.ebuild | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/media-gfx/nsxiv/nsxiv-27.1.ebuild 
b/media-gfx/nsxiv/nsxiv-27.1.ebuild
index d6b554f39..f53c57016 100644
--- a/media-gfx/nsxiv/nsxiv-27.1.ebuild
+++ b/media-gfx/nsxiv/nsxiv-27.1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-inherit desktop xdg-utils savedconfig toolchain-funcs
+inherit desktop xdg-utils savedconfig toolchain-funcs linux-info
 
 if [[ ${PV} == "9999" ]] ; then
        EGIT_REPO_URI="https://github.com/nsxiv/nsxiv.git";
@@ -18,7 +18,7 @@ HOMEPAGE="https://github.com/nsxiv/nsxiv";
 
 LICENSE="GPL-2"
 SLOT="0"
-IUSE="exif gif +jpeg +png webp tiff"
+IUSE="exif +gif +jpeg +png webp tiff +inotify"
 
 RDEPEND="
        exif? ( media-libs/libexif )
@@ -29,6 +29,17 @@ RDEPEND="
 "
 DEPEND="${RDEPEND}"
 
+pkg_setup() {
+       if use inotify; then
+               nsxiv_autoreload="inotify"
+               CONFIG_CHECK+=" ~INOTIFY_USER"
+               ERROR_INOTIFY_USER="${P} requires inotify in-kernel support."
+               linux-info_pkg_setup
+       else
+               nsxiv_autoreload="nop"
+       fi
+}
+
 src_prepare() {
        default
 
@@ -44,7 +55,10 @@ src_configure() {
 }
 
 src_compile() {
-       emake CC="$(tc-getCC)" HAVE_LIBEXIF=$(usex exif 1 0) HAVE_LIBGIF=$(usex 
gif 1 0)
+       emake CC="$(tc-getCC)" \
+               HAVE_LIBEXIF=$(usex exif 1 0) \
+               HAVE_LIBGIF=$(usex gif 1 0) \
+               AUTORELOAD="${nsxiv_autoreload}"
 }
 
 src_install() {

Reply via email to