# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ EAPI=6 inherit eutils autotools toolchain-funcs git-r3 DESCRIPTION="PDF and image viewer for the Linux framebuffer" HOMEPAGE="http://seasonofcode.com/pages/jfbview.html" EGIT_REPO_URI="https://github.com/jichu4n/${PN}.git" LICENSE="Apache License v2" SLOT="0" KEYWORDS="~amd64 ~arm ~x86" IUSE="+imgs +threads X" REQUIRED_USE="" RDEPEND=" sys-libs/ncurses:= media-libs/openjpeg:2= imgs? ( media-libs/imlib2 ) media-libs/jbig2dec:= virtual/jpeg:0 " DEPEND=" >=app-text/mupdf-1.10a:= ${RDEPEND} " S=${WORKDIR}/${P} src_prepare() { sed -e "s,-lmupdfthird,,g" -i Makefile || die "sed failed" use X || sed "37 a override CXXFLAGS += -DX_DISPLAY_MISSING=1" -i Makefile || die "sed failed" eapply_user } src_compile() { use imgs && emake verbose=yes || emake verbose=yes jfbpdf } src_install() { emake BINDIR="${D}" DOCDIR="${D}" MANDIR="${D}" install dobin ${PN} dobin jpdfcat dobin jpdfgrep dodoc README }