summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2023-05-22 20:54:25 +0200
committerUlrich Müller <ulm@gentoo.org>2023-05-22 23:29:51 +0200
commit39eb41deb8fb2b686bd820445f185c3745903872 (patch)
tree54c95036878eda390ad3c011c49fced954147aa2 /app-text/pdfpc
parentPackage move app-misc/pdfpc to app-text/pdfpc (diff)
downloadgentoo-39eb41deb8fb2b686bd820445f185c3745903872.tar.gz
gentoo-39eb41deb8fb2b686bd820445f185c3745903872.tar.bz2
gentoo-39eb41deb8fb2b686bd820445f185c3745903872.zip
app-text/pdfpc: Migrate to webkit-gtk:4.1
Closes: https://bugs.gentoo.org/893674 Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'app-text/pdfpc')
-rw-r--r--app-text/pdfpc/files/pdfpc-4.6.0-webkit2gtk-4.1.patch22
-rw-r--r--app-text/pdfpc/pdfpc-4.6.0-r2.ebuild92
2 files changed, 114 insertions, 0 deletions
diff --git a/app-text/pdfpc/files/pdfpc-4.6.0-webkit2gtk-4.1.patch b/app-text/pdfpc/files/pdfpc-4.6.0-webkit2gtk-4.1.patch
new file mode 100644
index 000000000000..2428314dd2fe
--- /dev/null
+++ b/app-text/pdfpc/files/pdfpc-4.6.0-webkit2gtk-4.1.patch
@@ -0,0 +1,22 @@
+--- pdfpc-4.6.0/src/CMakeLists.txt
++++ pdfpc-4.6.0/src/CMakeLists.txt
+@@ -30,8 +30,8 @@
+ endif ()
+
+ if (MDVIEW)
+- pkg_check_modules(WEBKIT REQUIRED webkit2gtk-4.0)
+- set(MDVIEW_PACKAGES webkit2gtk-4.0)
++ pkg_check_modules(WEBKIT REQUIRED webkit2gtk-4.1)
++ set(MDVIEW_PACKAGES webkit2gtk-4.1)
+ set(EXTRA_VALA_OPTIONS ${EXTRA_VALA_OPTIONS} -D MDVIEW)
+ endif ()
+
+@@ -136,7 +136,7 @@
+ vala_precompile(VALA_C
+ ${VALA_SRC}
+ PACKAGES
+- webkit2gtk-4.0
++ webkit2gtk-4.1
+ json-glib-1.0
+ gio-2.0
+ gee-0.8
diff --git a/app-text/pdfpc/pdfpc-4.6.0-r2.ebuild b/app-text/pdfpc/pdfpc-4.6.0-r2.ebuild
new file mode 100644
index 000000000000..889520d13a25
--- /dev/null
+++ b/app-text/pdfpc/pdfpc-4.6.0-r2.ebuild
@@ -0,0 +1,92 @@
+# 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=
+ )
+ webkit? ( net-libs/webkit-gtk:4.1= )
+ !webkit? ( soup? (
+ media-gfx/qrencode
+ net-libs/libsoup:2.4
+ ) )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="$(vala_depend)"
+
+DOCS=(
+ CHANGELOG.rst
+ FAQ.rst
+ README.rst
+ SUPPORT.rst
+)
+
+src_prepare() {
+ eapply "${FILESDIR}/${P}-no-movies.patch"
+ eapply "${FILESDIR}/${P}-vala-0.56.7.patch"
+ use webkit && eapply "${FILESDIR}/${P}-webkit2gtk-4.1.patch"
+
+ 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)
+ -DMDVIEW=$(usex webkit on off)
+ -DCMAKE_VERBOSE_MAKEFILE=TRUE
+ )
+
+ if use webkit; then
+ use soup && ewarn \
+ "USE flag \"webkit\" overrides \"soup\"; disabling REST support."
+ mycmakeargs+=( -DREST=off )
+ else
+ mycmakeargs+=( -DREST=$(usex soup on off) )
+ fi
+
+ cmake_src_configure
+}