summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2023-05-22 20:51:14 +0200
committerUlrich Müller <ulm@gentoo.org>2023-05-22 23:29:50 +0200
commitc069bf22d48d425dd48d4b5d70cfcd7f1116ff80 (patch)
tree027144c1f0c4ddd84e62a4a2750da9baf2f357a8 /app-text/pdfpc
parentapp-misc/pdfpc: drop 4.5.0-r2 (diff)
downloadgentoo-c069bf22d48d425dd48d4b5d70cfcd7f1116ff80.tar.gz
gentoo-c069bf22d48d425dd48d4b5d70cfcd7f1116ff80.tar.bz2
gentoo-c069bf22d48d425dd48d4b5d70cfcd7f1116ff80.zip
Package move app-misc/pdfpc to app-text/pdfpc
app-text is more specific as category and contains most of the other document viewers. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'app-text/pdfpc')
-rw-r--r--app-text/pdfpc/Manifest1
-rw-r--r--app-text/pdfpc/files/pdfpc-4.6.0-no-movies.patch59
-rw-r--r--app-text/pdfpc/files/pdfpc-4.6.0-vala-0.56.7.patch31
-rw-r--r--app-text/pdfpc/metadata.xml21
-rw-r--r--app-text/pdfpc/pdfpc-4.6.0-r1.ebuild85
5 files changed, 197 insertions, 0 deletions
diff --git a/app-text/pdfpc/Manifest b/app-text/pdfpc/Manifest
new file mode 100644
index 000000000000..37d8526ade6b
--- /dev/null
+++ b/app-text/pdfpc/Manifest
@@ -0,0 +1 @@
+DIST pdfpc-4.6.0.tar.gz 7766521 BLAKE2B 3e8914333a0781d3d750ab71d58c8af1451ce5ab321ecc0639ddcf377cae9a0c62290696455516ce1d70f4ae3ffc5889fe910ced0399787e6a40c8ae76e1f75e SHA512 4ec69cbe21fb8bbb3e381229c391133f92e76b610e1fdf1cffa2c9fa9997ccc879eaef2a6837b34d1e635cdd07c4d0ce98de03fd7ece431a8f35493f0f7d7651
diff --git a/app-text/pdfpc/files/pdfpc-4.6.0-no-movies.patch b/app-text/pdfpc/files/pdfpc-4.6.0-no-movies.patch
new file mode 100644
index 000000000000..9767dc2a8093
--- /dev/null
+++ b/app-text/pdfpc/files/pdfpc-4.6.0-no-movies.patch
@@ -0,0 +1,59 @@
+https://github.com/pdfpc/pdfpc/issues/672
+https://bugs.gentoo.org/904241
+
+commit a6501085b3e94eb4a01db18fe9dc15d51fcde3a3
+Author: Evgeny Stambulchik <fnevgeny@gmail.com>
+Date: Sat, 11 Feb 2023 23:04:19 +0200
+
+ Skip MOVIE actions when configured with -DMOVIES
+
+--- a/src/classes/action/link_action.vala
++++ b/src/classes/action/link_action.vala
+@@ -47,6 +47,7 @@
+ this.action = mapping.action.copy();
+ }
+
++#if MOVIES
+ /**
+ * Find movie on the current slide by its filename; there seems to be
+ * no better way with the current Glib Poppler bindings.
+@@ -71,6 +72,7 @@
+
+ return null;
+ }
++#endif
+
+ /**
+ * Create from the LinkMapping if the link is an internal link to a named
+@@ -91,6 +93,7 @@
+ return new_obj as ActionMapping;
+ }
+ break;
++#if MOVIES
+ case Poppler.ActionType.MOVIE:
+ unowned var movie_action = (Poppler.ActionMovie*) mapping.action;
+ var movie = movie_action.movie;
+@@ -100,6 +103,7 @@
+ return new_obj as ActionMapping;
+ }
+ break;
++#endif
+ default:
+ break;
+ }
+@@ -167,6 +171,7 @@
+ this.controller.switch_to_slide_number(slide_number);
+
+ break;
++#if MOVIES
+ case Poppler.ActionType.MOVIE:
+ unowned var action = (Poppler.ActionMovie*) this.action;
+ var movie = action.movie;
+@@ -192,6 +197,7 @@
+ }
+ }
+ break;
++#endif
+ default:
+ return false;
+ }
diff --git a/app-text/pdfpc/files/pdfpc-4.6.0-vala-0.56.7.patch b/app-text/pdfpc/files/pdfpc-4.6.0-vala-0.56.7.patch
new file mode 100644
index 000000000000..9aff761b471f
--- /dev/null
+++ b/app-text/pdfpc/files/pdfpc-4.6.0-vala-0.56.7.patch
@@ -0,0 +1,31 @@
+https://github.com/pdfpc/pdfpc/issues/686
+https://bugs.gentoo.org/904970
+
+commit 18beaecbbcc066e0d4c889b3aa3ecaa7351f7768
+Author: Evgeny Stambulchik <fnevgeny@gmail.com>
+Date: Tue, 25 Apr 2023 16:11:25 +0300
+
+ Create Lists of nullable types
+
+--- a/src/classes/drawings/drawing_commands.vala
++++ b/src/classes/drawings/drawing_commands.vala
+@@ -54,8 +54,8 @@
+ }
+
+ public void clear() {
+- this.drawing_commands = new List<DrawingCommand>();
+- this.redo_commands = new List<DrawingCommand>();
++ this.drawing_commands = new List<DrawingCommand?>();
++ this.redo_commands = new List<DrawingCommand?>();
+ }
+
+ public void add_line(bool is_eraser,
+@@ -70,7 +70,7 @@
+
+ // After adding a new line you can no longer redo the old
+ // path.
+- this.redo_commands = new List<DrawingCommand>(); // clear
++ this.redo_commands = new List<DrawingCommand?>(); // clear
+
+ bool new_path = true;
+ double epsilon = 1e-4; // Less than 0.1 pixel for a 1000x1000 img
diff --git a/app-text/pdfpc/metadata.xml b/app-text/pdfpc/metadata.xml
new file mode 100644
index 000000000000..780c14d9b256
--- /dev/null
+++ b/app-text/pdfpc/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>ulm@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="gstreamer">
+ Compile support for movie playback (<pkg>media-libs/gstreamer</pkg>)
+ </flag>
+ <flag name="soup">
+ Compile support for REST server (<pkg>net-libs/libsoup</pkg>)
+ </flag>
+ <flag name="webkit">
+ Enable viewing Markdown notes (<pkg>net-libs/webkit-gtk</pkg>)
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="github">pdfpc/pdfpc</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-text/pdfpc/pdfpc-4.6.0-r1.ebuild b/app-text/pdfpc/pdfpc-4.6.0-r1.ebuild
new file mode 100644
index 000000000000..c497364380ee
--- /dev/null
+++ b/app-text/pdfpc/pdfpc-4.6.0-r1.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+VALA_MAX_API_VERSION="0.56" # append versions in sed line if increased
+
+#COMMIT_ID=""
+
+inherit cmake vala
+
+DESCRIPTION="Presenter console with multi-monitor support for PDF files"
+HOMEPAGE="https://pdfpc.github.io https://github.com/pdfpc/pdfpc"
+
+if [[ ${PV} == *9999 ]]; then
+ EGIT_REPO_URI="https://github.com/${PN}/${PN}.git"
+ inherit git-r3
+elif [[ ${PV} == *_p* ]]; then
+ SRC_URI="https://github.com/${PN}/${PN}/archive/${COMMIT_ID}.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}/${PN}-${COMMIT_ID}"
+else
+ SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+fi
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="+gstreamer soup webkit"
+
+RDEPEND="
+ app-text/discount:=
+ app-text/poppler:=[cairo]
+ dev-libs/glib:2
+ dev-libs/json-glib
+ dev-libs/libgee:0.8=
+ gnome-base/librsvg
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf:2
+ x11-libs/gtk+:3
+ x11-libs/libX11
+ x11-libs/pango
+ gstreamer? (
+ media-libs/gstreamer:1.0
+ media-libs/gst-plugins-base:1.0
+ media-libs/gst-plugins-good:1.0
+ media-plugins/gst-plugins-gtk:1.0=
+ media-plugins/gst-plugins-cairo:1.0=
+ )
+ soup? (
+ media-gfx/qrencode
+ net-libs/libsoup:2.4
+ )
+ webkit? ( net-libs/webkit-gtk:4= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="$(vala_depend)"
+
+PATCHES=(
+ "${FILESDIR}/${P}-no-movies.patch"
+ "${FILESDIR}/${P}-vala-0.56.7.patch"
+)
+
+DOCS=(
+ CHANGELOG.rst
+ FAQ.rst
+ README.rst
+ SUPPORT.rst
+)
+
+src_prepare() {
+ cmake_src_prepare
+ vala_setup
+ sed -i -e "/find_program/s/valac/& &-0.56 &-0.54 &-0.52 &-0.50/" \
+ cmake/vala/FindVala.cmake || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DMOVIES=$(usex gstreamer on off)
+ -DREST=$(usex soup on off)
+ -DMDVIEW=$(usex webkit on off)
+ -DCMAKE_VERBOSE_MAKEFILE=TRUE
+ )
+ cmake_src_configure
+}