summaryrefslogtreecommitdiff
blob: 24ab3cda2530533194c295036b9be1eb8b02d746 (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
# Copyright 2022-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit xdg cmake desktop

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

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

RDEPEND="
	app-text/ebook-tools
	>=app-text/poppler-0.5.0:=[cairo,xpdf-headers(+)]
	dev-libs/glib:2
	dev-libs/libxml2
	net-libs/webkit-gtk:4=
	x11-libs/cairo
	x11-libs/gdk-pixbuf:2
	x11-libs/gtk+:3
	x11-libs/pango
	djvu? ( app-text/djvu )
"

DEPEND="${RDEPEND}
	app-text/ghostscript-gpl
	media-libs/freetype
"
BDEPEND="
	virtual/pkgconfig
"

PATCHES=(
	"${FILESDIR}"/${P}-cmake-cxxflags.patch
	"${FILESDIR}"/${P}-icon.patch
)
src_prepare() {
	cmake_src_prepare
}
src_configure() {
	local mycmakeargs=(
		-DAPVLV_WITH_DJVU=$(usex djvu)
		-DAPVLV_ENABLE_DEBUG=$(usex debug)
		-DAPVLV_WITH_TXT=ON
		-DDOCDIR="/usr/share/doc/${PF}"
	)
	cmake_src_configure
}
src_install() {
	cmake_src_install
	newicon -s 32 icons/pdf.png ${PN}.png
}