summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej Barć <xgqt@gentoo.org>2022-06-26 18:23:31 +0200
committerMaciej Barć <xgqt@gentoo.org>2022-06-26 18:24:18 +0200
commitbd0432ba613f02b3d6bcef7f7be42d4ff7dd4d32 (patch)
tree546df67e322c70a3aa1e8bf72c5afc3e0c008d8f /app-emacs/pdf-tools
parentapp-emacs/tablist: new package; add version 1.0 (diff)
downloadgentoo-bd0432ba613f02b3d6bcef7f7be42d4ff7dd4d32.tar.gz
gentoo-bd0432ba613f02b3d6bcef7f7be42d4ff7dd4d32.tar.bz2
gentoo-bd0432ba613f02b3d6bcef7f7be42d4ff7dd4d32.zip
app-emacs/pdf-tools: new package; add version 1.0.0_pre20220619
2022.06.19 snapshot Signed-off-by: Maciej Barć <xgqt@gentoo.org>
Diffstat (limited to 'app-emacs/pdf-tools')
-rw-r--r--app-emacs/pdf-tools/Manifest1
-rw-r--r--app-emacs/pdf-tools/files/50pdf-tools-gentoo.el2
-rw-r--r--app-emacs/pdf-tools/metadata.xml25
-rw-r--r--app-emacs/pdf-tools/pdf-tools-1.0.0_pre20220619.ebuild66
4 files changed, 94 insertions, 0 deletions
diff --git a/app-emacs/pdf-tools/Manifest b/app-emacs/pdf-tools/Manifest
new file mode 100644
index 000000000000..9209c7b44bff
--- /dev/null
+++ b/app-emacs/pdf-tools/Manifest
@@ -0,0 +1 @@
+DIST pdf-tools-1.0.0_pre20220619.tar.gz 459416 BLAKE2B 79a7c7a59faf9c11047bfb6218a8055cb9c757b928e52ff59ffb910e5aedb95ca7efe1dda1ae821d98a687fc6e700d8194311fc850f534f425534a1572bd34b5 SHA512 74ca8c05ad238c07ca1b6d6a594889d048220bb984b78b83e7af4c59eedfa7a35a03e153aa4d1296781f910eb0b3a68a5148876a30ad0f6e9fdecf831ff58f8e
diff --git a/app-emacs/pdf-tools/files/50pdf-tools-gentoo.el b/app-emacs/pdf-tools/files/50pdf-tools-gentoo.el
new file mode 100644
index 000000000000..69d6945dcd0a
--- /dev/null
+++ b/app-emacs/pdf-tools/files/50pdf-tools-gentoo.el
@@ -0,0 +1,2 @@
+(add-to-list 'load-path "@SITELISP@")
+(load "pdf-tools-autoloads" nil t)
diff --git a/app-emacs/pdf-tools/metadata.xml b/app-emacs/pdf-tools/metadata.xml
new file mode 100644
index 000000000000..daf7018f9de6
--- /dev/null
+++ b/app-emacs/pdf-tools/metadata.xml
@@ -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>
diff --git a/app-emacs/pdf-tools/pdf-tools-1.0.0_pre20220619.ebuild b/app-emacs/pdf-tools/pdf-tools-1.0.0_pre20220619.ebuild
new file mode 100644
index 000000000000..b4dfd41e3c9f
--- /dev/null
+++ b/app-emacs/pdf-tools/pdf-tools-1.0.0_pre20220619.ebuild
@@ -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
+}