Gentoo Archives: gentoo-commits

From: Haelwenn Monnier <contact@×××××××××.me>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:master commit in: media-gfx/nsxiv/
Date: Fri, 17 Sep 2021 01:57:32
Message-Id: 1631837829.d22db6606219ff0101fff0c0609d8de86eff95e0.lanodan@gentoo
1 commit: d22db6606219ff0101fff0c0609d8de86eff95e0
2 Author: Nickolas Raymond Kaczynski <nrk <AT> disroot <DOT> org>
3 AuthorDate: Fri Sep 17 00:17:09 2021 +0000
4 Commit: Haelwenn Monnier <contact <AT> hacktivis <DOT> me>
5 CommitDate: Fri Sep 17 00:17:09 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=d22db660
7
8 media-gfx/nsxiv: add new package
9
10 Package-Manager: Portage-3.0.22, Repoman-3.0.3
11 Signed-off-by: Nickolas Raymond Kaczynski <nrk <AT> disroot.org>
12
13 media-gfx/nsxiv/Manifest | 1 +
14 media-gfx/nsxiv/metadata.xml | 10 ++++++
15 media-gfx/nsxiv/nsxiv-27.1.ebuild | 67 +++++++++++++++++++++++++++++++++++++++
16 3 files changed, 78 insertions(+)
17
18 diff --git a/media-gfx/nsxiv/Manifest b/media-gfx/nsxiv/Manifest
19 new file mode 100644
20 index 000000000..6cc70600c
21 --- /dev/null
22 +++ b/media-gfx/nsxiv/Manifest
23 @@ -0,0 +1 @@
24 +DIST nsxiv-27.1.tar.gz 54242 BLAKE2B baed35787874b02e0051e0b19b2cb9670a66ce01de1ca3446a8ca5f99fcebd785232a5b3715f0f3dd733314096e3a46a6ebcc8960417abfc1a6e5e09224f15d2 SHA512 08a250a43a92a08258e2a6e871d6d5f596206af344fe3896505c0e85bdf556d02f13b1dbc9b365ce7c597770425d0e3635878b3fceb37f324957674ccc1b1eb0
25
26 diff --git a/media-gfx/nsxiv/metadata.xml b/media-gfx/nsxiv/metadata.xml
27 new file mode 100644
28 index 000000000..fb509378e
29 --- /dev/null
30 +++ b/media-gfx/nsxiv/metadata.xml
31 @@ -0,0 +1,10 @@
32 +<?xml version="1.0" encoding="UTF-8"?>
33 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
34 +<pkgmetadata>
35 + <maintainer type="person">
36 + <email>nrk@×××××××.org</email>
37 + </maintainer>
38 + <upstream>
39 + <remote-id type="github">nsxiv/nsxiv</remote-id>
40 + </upstream>
41 +</pkgmetadata>
42
43 diff --git a/media-gfx/nsxiv/nsxiv-27.1.ebuild b/media-gfx/nsxiv/nsxiv-27.1.ebuild
44 new file mode 100644
45 index 000000000..d6b554f39
46 --- /dev/null
47 +++ b/media-gfx/nsxiv/nsxiv-27.1.ebuild
48 @@ -0,0 +1,67 @@
49 +# Copyright 1999-2021 Gentoo Authors
50 +# Distributed under the terms of the GNU General Public License v2
51 +
52 +EAPI=7
53 +
54 +inherit desktop xdg-utils savedconfig toolchain-funcs
55 +
56 +if [[ ${PV} == "9999" ]] ; then
57 + EGIT_REPO_URI="https://github.com/nsxiv/nsxiv.git"
58 + inherit git-r3
59 +else
60 + SRC_URI="https://github.com/nsxiv/nsxiv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
61 + KEYWORDS="~amd64"
62 +fi
63 +
64 +DESCRIPTION="Neo (or New or Not) Simple (or Small or Suckless) X Image Viewer"
65 +HOMEPAGE="https://github.com/nsxiv/nsxiv"
66 +
67 +LICENSE="GPL-2"
68 +SLOT="0"
69 +IUSE="exif gif +jpeg +png webp tiff"
70 +
71 +RDEPEND="
72 + exif? ( media-libs/libexif )
73 + gif? ( media-libs/giflib:0= )
74 + media-libs/imlib2[X,gif?,jpeg?,png?,webp?,tiff?]
75 + x11-libs/libX11
76 + x11-libs/libXft
77 +"
78 +DEPEND="${RDEPEND}"
79 +
80 +src_prepare() {
81 + default
82 +
83 + restore_config config.h
84 +}
85 +
86 +src_configure() {
87 + sed -i \
88 + -e '/-include config.mk/d' \
89 + -e '/\$(OBJS): / s|config.mk||' \
90 + -e '/^install: / s|: all|:|' \
91 + Makefile || die "sed failed"
92 +}
93 +
94 +src_compile() {
95 + emake CC="$(tc-getCC)" HAVE_LIBEXIF=$(usex exif 1 0) HAVE_LIBGIF=$(usex gif 1 0)
96 +}
97 +
98 +src_install() {
99 + emake DESTDIR="${ED}" PREFIX=/usr install
100 + emake -C icon DESTDIR="${ED}" PREFIX=/usr install
101 + dodoc README.md
102 + domenu nsxiv.desktop
103 +
104 + save_config config.h
105 +}
106 +
107 +pkg_postinst() {
108 + xdg_desktop_database_update
109 + xdg_icon_cache_update
110 +}
111 +
112 +pkg_postrm() {
113 + xdg_desktop_database_update
114 + xdg_icon_cache_update
115 +}