summaryrefslogtreecommitdiff
blob: 2af2744adf5d96d6f613ec6d3700d7a6ccf32658 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

inherit eutils cmake-utils gnome2-utils

DESCRIPTION="Alf's PDF Viewer Like Vim"
HOMEPAGE="https://naihe2010.github.com/apvlv/"
SRC_URI="https://github.com/naihe2010/apvlv/archive/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="debug djvu html"

RDEPEND="
	>=app-text/poppler-0.18:=[cairo,xpdf-headers(+)]
	dev-libs/glib:2
	x11-libs/gtk+:3
	djvu? ( app-text/djvu:= )
	html? ( net-libs/webkit-gtk:3= )
"
DEPEND="${RDEPEND}
	virtual/pkgconfig
"

src_prepare() {
	# preserve cflags
	epatch "${FILESDIR}/${PN}-0.1.5-cflags.patch"
}

src_configure() {
	local mycmakeargs=(
		-DSYSCONFDIR=/etc/${PN}
		-DDOCDIR=/usr/share/${PN}
		-DMANDIR=/usr/share/man
		$(cmake-utils_use html APVLV_WITH_HTML)
		-DAPVLV_WITH_UMD=OFF
		-DAPVLV_WITH_TXT=ON
		$(cmake-utils_use djvu APVLV_WITH_DJVU)
		$(cmake-utils_use debug APVLV_ENABLE_DEBUG)
	)
	cmake-utils_src_configure
}

src_install() {
	cmake-utils_src_install
	dodoc AUTHORS NEWS README THANKS TODO
	newicon -s 32 icons/pdf.png ${PN}.png
}

pkg_preinst() {
	gnome2_icon_savelist
}

pkg_postinst() {
	gnome2_icon_cache_update
}

pkg_postrm() {
	gnome2_icon_cache_update
}