sys-process/glances: 3.1.4.1-r1 amd64 stable, bug #720368
[gentoo.git] / media-gfx / sxiv / sxiv-25.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit desktop xdg-utils gnome2-utils savedconfig toolchain-funcs
7
8 if [[ ${PV} == "9999" ]] ; then
9         EGIT_REPO_URI="https://github.com/muennich/sxiv.git"
10         inherit git-r3
11 else
12         SRC_URI="https://github.com/muennich/sxiv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
13         KEYWORDS="amd64 ~ppc64 x86"
14 fi
15
16 DESCRIPTION="Simple (or small or suckless) X Image Viewer"
17 HOMEPAGE="https://github.com/muennich/sxiv/"
18
19 LICENSE="GPL-2"
20 SLOT="0"
21 IUSE="exif gif +jpeg +png"
22
23 RDEPEND="
24         exif? ( media-libs/libexif )
25         gif? ( media-libs/giflib:0= )
26         media-libs/imlib2[X,gif?,jpeg?,png?]
27         x11-libs/libX11
28         x11-libs/libXft
29 "
30 DEPEND="${RDEPEND}"
31
32 PATCHES=( "${FILESDIR}"/${P}-makefile.patch )
33
34 src_prepare() {
35         restore_config config.h
36         default
37 }
38
39 src_compile() {
40         emake V=1 CC="$(tc-getCC)" HAVE_LIBEXIF=$(usex exif 1 0) HAVE_GIFLIB=$(usex gif 1 0)
41 }
42
43 src_install() {
44         emake DESTDIR="${ED}" PREFIX=/usr install
45         emake -C icon DESTDIR="${ED}" PREFIX=/usr install
46         dodoc README.md
47         domenu sxiv.desktop
48
49         save_config config.h
50 }
51
52 pkg_preinst() {
53         gnome2_icon_savelist
54 }
55
56 pkg_postinst() {
57         xdg_desktop_database_update
58         gnome2_icon_cache_update
59 }
60
61 pkg_postrm() {
62         xdg_desktop_database_update
63         gnome2_icon_cache_update
64 }