dev-cpp/pangomm: stable 2.42.1 for hppa, bug #717144
[gentoo.git] / media-gfx / pqiv / pqiv-2.11.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 inherit linux-info toolchain-funcs xdg-utils
6
7 if [[ ${PV} == 9999 ]]; then
8         EGIT_REPO_URI="https://github.com/phillipberndt/pqiv.git"
9         inherit git-r3
10 else
11         SRC_URI="https://github.com/phillipberndt/pqiv/archive/${PV}.tar.gz -> ${P}.tar.gz"
12         KEYWORDS="amd64 x86"
13 fi
14
15 DESCRIPTION="powerful GTK 3 based command-line image viewer with a minimal UI"
16 HOMEPAGE="https://github.com/phillipberndt/pqiv http://www.pberndt.com/Programme/Linux/pqiv/"
17
18 LICENSE="GPL-2"
19 SLOT="0"
20 IUSE="archive ffmpeg imagemagick kernel_linux pdf postscript webp"
21
22 RDEPEND="
23         >=dev-libs/glib-2.32:2
24         >=x11-libs/cairo-1.6
25         x11-libs/gtk+:3
26         archive? ( app-arch/libarchive:0= )
27         ffmpeg? ( media-video/ffmpeg:0= )
28         imagemagick? ( media-gfx/imagemagick:0= )
29         pdf? ( app-text/poppler:0= )
30         postscript? ( app-text/libspectre:0= )
31         webp? ( media-libs/libwebp:0= )
32 "
33 DEPEND="${RDEPEND}
34         virtual/pkgconfig"
35
36 doecho() {
37         echo "$@"
38         "$@" || die
39 }
40
41 pkg_setup() {
42         if use kernel_linux; then
43                 CONFIG_CHECK="~INOTIFY_USER"
44                 linux-info_pkg_setup
45         fi
46 }
47
48 src_configure() {
49         local backends="gdkpixbuf"
50         use archive && backends+=",archive,archive_cbx"
51         use ffmpeg && backends+=",libav"
52         use imagemagick && backends+=",wand"
53         use pdf && backends+=",poppler"
54         use postscript && backends+=",spectre"
55         use webp && backends+=",webp"
56
57         doecho ./configure \
58                 --backends-build=shared \
59                 --backends=${backends} \
60                 --prefix="${EPREFIX}/usr" \
61                 --libdir="${EPREFIX}/usr/$(get_libdir)" \
62                 --destdir="${ED}"
63 }
64
65 src_compile() {
66         tc-export CC
67         emake VERBOSE=1 CFLAGS="${CFLAGS}"
68 }
69
70 pkg_postinst() {
71         xdg_desktop_database_update
72 }
73
74 pkg_postrm() {
75         xdg_desktop_database_update
76 }