summaryrefslogtreecommitdiff
blob: 5899dc63eacc8c6d2a6d09b8f76cd078aa93f1bf (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
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit toolchain-funcs xdg

DESCRIPTION="Graphical PDF viewer which aims to superficially resemble less(1)"
HOMEPAGE="https://github.com/moosotc/llpp"
SRC_URI="https://github.com/moosotc/llpp/archive/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="public-domain"
SLOT="0"
KEYWORDS="~amd64 ~ppc x86"
IUSE="+ocamlopt"

RDEPEND=">=app-text/mupdf-1.17.0:0=
	app-arch/bzip2
	media-libs/fontconfig:1.0
	media-libs/freetype:2
	media-libs/jbig2dec:=
	media-libs/openjpeg:2
	sys-libs/zlib
	virtual/jpeg:0
	x11-libs/libX11
	x11-libs/libXau
	x11-libs/libXdmcp
	x11-misc/xsel
"
DEPEND="${RDEPEND}
	dev-ml/lablgl:=[glut,ocamlopt?]"
BDEPEND="
	app-text/asciidoc
	>=dev-lang/ocaml-4.09[ocamlopt?]
	virtual/pkgconfig
"

RESTRICT="!ocamlopt? ( strip )"

src_prepare() {
	default

	# use custom makefile from archlinux with minor changes
	cp "${FILESDIR}"/${P}-makefile "${S}"/Makefile || die

	# re-add desktop file removed upstream
	cp "${FILESDIR}"/llpp.desktop "${S}"/misc || die

	# remove empty interface definition
	rm "${S}"/main.mli || die
}

src_compile() {
	emake -j1 VERSION=${PV} CC="$(tc-getCC)" LIBDIR="/usr/$(get_libdir)"
}

src_install() {
	emake DESTDIR="${ED}" PREFIX="/usr" install
	dodoc README Thanks
}