app-emacs/pdf-tools: new package; add version 1.0.0_pre20220619

2022.06.19 snapshot

Signed-off-by: Maciej Barć <xgqt@gentoo.org>
This commit is contained in:
Maciej Barć
2022-06-26 18:24:18 +02:00
parent f392fef573
commit bd0432ba61
4 changed files with 94 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
DIST pdf-tools-1.0.0_pre20220619.tar.gz 459416 BLAKE2B 79a7c7a59faf9c11047bfb6218a8055cb9c757b928e52ff59ffb910e5aedb95ca7efe1dda1ae821d98a687fc6e700d8194311fc850f534f425534a1572bd34b5 SHA512 74ca8c05ad238c07ca1b6d6a594889d048220bb984b78b83e7af4c59eedfa7a35a03e153aa4d1296781f910eb0b3a68a5148876a30ad0f6e9fdecf831ff58f8e
@@ -0,0 +1,2 @@
(add-to-list 'load-path "@SITELISP@")
(load "pdf-tools-autoloads" nil t)
+25
View File
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>gnu-emacs@gentoo.org</email>
<name>Gentoo GNU Emacs project</name>
</maintainer>
<longdescription>
PDF Tools is, among other things, a replacement of DocView for PDF files.
The key difference is that pages are not pre-rendered by e.g. ghostscript
and stored in the file-system, but rather created on-demand and stored in
memory. This rendering is performed by a special library named, for
whatever reason, poppler, running inside a server program. This program is
called epdfinfo and its job is to successively read requests from Emacs and
produce the proper results, i.e. the PNG image of a PDF page. Actually,
displaying PDF files is just one part of pdf-tools. Since poppler can
provide us with all kinds of information about a document and is also able
to modify it, there is a lot more we can do with it.
</longdescription>
<upstream>
<bugs-to>https://github.com/vedang/pdf-tools/issues/</bugs-to>
<remote-id type="github">vedang/pdf-tools</remote-id>
</upstream>
</pkgmetadata>
@@ -0,0 +1,66 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
H=fe42da60ad68e806af1677210249caccd7b99451
NEED_EMACS=25.1 # Needs Emacs >=25.1 because of the "let-alist" function.
inherit autotools elisp
DESCRIPTION="Emacs Lisp support library for PDF documents"
HOMEPAGE="https://github.com/vedang/pdf-tools/"
SRC_URI="https://github.com/vedang/${PN}/archive/${H}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}"/${PN}-${H}
LICENSE="GPL-3+"
KEYWORDS="~amd64 ~x86"
SLOT="0"
# Cask is a hard dependency for tests; it is ran by helper functions too.
RESTRICT="test"
BDEPEND="app-emacs/tablist"
DEPEND="
app-text/poppler:=[cairo,png]
dev-libs/glib:2=
media-libs/freetype:2=
media-libs/harfbuzz:=
media-libs/libpng:=
x11-libs/cairo:=
"
RDEPEND="
${DEPEND}
${BDEPEND}
"
DOCS=( NEWS README.org )
SITEFILE="50${PN}-gentoo.el"
src_prepare() {
elisp_src_prepare
cd server || die
eautoreconf
}
src_configure() {
cd server || die
econf
}
src_compile() {
BYTECOMPFLAGS="-L lisp" elisp-compile lisp/*.el
elisp-make-autoload-file lisp/${PN}-autoloads.el lisp
emake -C server
}
src_install() {
elisp-install ${PN} lisp/*.el*
elisp-site-file-install "${FILESDIR}"/${SITEFILE}
emake -C server DESTDIR="${D}" install
einstalldocs
}