diff options
author | ArTourter <artourter@gmail.com> | 2025-01-05 19:13:17 +0000 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2025-01-06 22:26:04 +0700 |
commit | 65cd4001afe27c27789ffb187c1ed0041f62352b (patch) | |
tree | abbcfd9d58985dbc2252dae6f881f1b7d51d7946 /office | |
parent | 2c768a8fc946a9a5d9858c93d5c9e8332689d1ee (diff) |
office/pdfpc: Updated for version 4.7.0
Change in requirement.
webkit2gtk4.1 is now required
Signed-off-by: ArTourter <artourter@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'office')
-rw-r--r-- | office/pdfpc/08e66b9d432e9598c1ee9a78b2355728036ae1a1.patch | 99 | ||||
-rw-r--r-- | office/pdfpc/18beaecbbcc066e0d4c889b3aa3ecaa7351f7768.patch | 33 | ||||
-rw-r--r-- | office/pdfpc/pdfpc.SlackBuild | 13 | ||||
-rw-r--r-- | office/pdfpc/pdfpc.info | 8 |
4 files changed, 7 insertions, 146 deletions
diff --git a/office/pdfpc/08e66b9d432e9598c1ee9a78b2355728036ae1a1.patch b/office/pdfpc/08e66b9d432e9598c1ee9a78b2355728036ae1a1.patch deleted file mode 100644 index 4522c796b5..0000000000 --- a/office/pdfpc/08e66b9d432e9598c1ee9a78b2355728036ae1a1.patch +++ /dev/null @@ -1,99 +0,0 @@ -From 08e66b9d432e9598c1ee9a78b2355728036ae1a1 Mon Sep 17 00:00:00 2001 -From: Michal Sojka <michal.sojka@cvut.cz> -Date: Wed, 17 Apr 2024 20:42:20 +0200 -Subject: [PATCH] Allow compiling with markdown3 - -Currently compilation fails with: - - /build/src/classes/renderer/markdown.c:191:20: error: variable or field 'flags' declared void - -According to comment [1], markdown3 introduces backward -incompatibility with respect to document flags. - -This commit adds conditionally compiled code that allows building -pdfpc with both markdown versions 2 and 3. - -The used cmake operator VERSION_GREATER_EQUAL requires cmake 3.7 so we -bump minimal cmake version requirement. - -Fixes #682 - -[1]: https://github.com/pdfpc/pdfpc/issues/682#issuecomment-1931300154 ---- - CMakeLists.txt | 2 +- - src/CMakeLists.txt | 4 ++++ - src/classes/renderer/markdown.vala | 5 +++++ - src/libmarkdown.vapi | 14 ++++++++++++++ - 4 files changed, 24 insertions(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 605128ab..01062146 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,5 +1,5 @@ - project("pdfpc" C) --cmake_minimum_required(VERSION 3.0) -+cmake_minimum_required(VERSION 3.7) - - list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/vala) - -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index c2b15491..43f1b1eb 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -32,6 +32,10 @@ if (MDVIEW OR REST) - pkg_check_modules(MARKDOWN REQUIRED libmarkdown) - endif () - -+if ("${MARKDOWN_VERSION}" VERSION_GREATER_EQUAL 3) -+ set(EXTRA_VALA_OPTIONS ${EXTRA_VALA_OPTIONS} -D MARKDOWN3) -+endif () -+ - if (MDVIEW) - pkg_check_modules(WEBKIT REQUIRED webkit2gtk-4.0) - set(MDVIEW_PACKAGES webkit2gtk-4.0) -diff --git a/src/classes/renderer/markdown.vala b/src/classes/renderer/markdown.vala -index 3964af82..ac1e3eea 100644 ---- a/src/classes/renderer/markdown.vala -+++ b/src/classes/renderer/markdown.vala -@@ -23,7 +23,12 @@ - namespace pdfpc.Renderer { - public class MD { - public static string render(string? text = "", bool plain_text = false) { -+#if MARKDOWN3 -+ var flags = new Markdown.DocumentFlags(); -+ flags.set(Markdown.DocumentFlag.NO_EXT); -+#else - Markdown.DocumentFlags flags = Markdown.DocumentFlags.NO_EXT; -+#endif - - string html; - if (text != "" && plain_text) { -diff --git a/src/libmarkdown.vapi b/src/libmarkdown.vapi -index f762f173..e90c8660 100644 ---- a/src/libmarkdown.vapi -+++ b/src/libmarkdown.vapi -@@ -95,9 +95,23 @@ namespace Markdown - public void ref_prefix (string prefix); - } - -+#if MARKDOWN3 -+ [Compact] -+ [CCode (cname = "mkd_flag_t", free_function = "mkd_free_flags")] -+ public class DocumentFlags { -+ [CCode (cname = "mkd_flags")] -+ public DocumentFlags(); -+ [CCode (cname = "mkd_set_flag_num")] -+ public void set (DocumentFlag flag); -+ } -+ -+ [CCode (cprefix = "MKD_")] -+ public enum DocumentFlag -+#else - [Flags] - [CCode (cname = "mkd_flag_t", cprefix = "MKD_")] - public enum DocumentFlags -+#endif - { - NOLINKS, - NOIMAGE, diff --git a/office/pdfpc/18beaecbbcc066e0d4c889b3aa3ecaa7351f7768.patch b/office/pdfpc/18beaecbbcc066e0d4c889b3aa3ecaa7351f7768.patch deleted file mode 100644 index 62fe29de5d..0000000000 --- a/office/pdfpc/18beaecbbcc066e0d4c889b3aa3ecaa7351f7768.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 18beaecbbcc066e0d4c889b3aa3ecaa7351f7768 Mon Sep 17 00:00:00 2001 -From: Evgeny Stambulchik <fnevgeny@gmail.com> -Date: Tue, 25 Apr 2023 16:11:25 +0300 -Subject: [PATCH] Create Lists of nullable types - ---- - src/classes/drawings/drawing_commands.vala | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/classes/drawings/drawing_commands.vala b/src/classes/drawings/drawing_commands.vala -index 77e56e6d..c305a8c5 100644 ---- a/src/classes/drawings/drawing_commands.vala -+++ b/src/classes/drawings/drawing_commands.vala -@@ -54,8 +54,8 @@ namespace pdfpc { - } - - 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 @@ namespace pdfpc { - - // 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/office/pdfpc/pdfpc.SlackBuild b/office/pdfpc/pdfpc.SlackBuild index 29134fc368..ff8056b62f 100644 --- a/office/pdfpc/pdfpc.SlackBuild +++ b/office/pdfpc/pdfpc.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for pdfpc -# Copyright 2018-2024 Gregory J. L. Tourte <artourter@gmail.com> +# Copyright 2018-2025 Gregory J. L. Tourte <artourter@gmail.com> # Copyright 2013 Markus Hutmacher <email removed> # # Redistribution and use of this script, with or without modification, is @@ -26,8 +26,8 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=pdfpc -VERSION=${VERSION:-4.6.0} -BUILD=${BUILD:-2} +VERSION=${VERSION:-4.7.0} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -53,16 +53,12 @@ OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" else SLKCFLAGS="-O2" - LIBDIRSUFFIX="" fi set -e @@ -79,9 +75,6 @@ find -L . \ -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} + -patch -p 1 < $CWD/08e66b9d432e9598c1ee9a78b2355728036ae1a1.patch -patch -p 1 < $CWD/18beaecbbcc066e0d4c889b3aa3ecaa7351f7768.patch - mkdir -p build cd build cmake \ diff --git a/office/pdfpc/pdfpc.info b/office/pdfpc/pdfpc.info index b75136d847..9c89e7530c 100644 --- a/office/pdfpc/pdfpc.info +++ b/office/pdfpc/pdfpc.info @@ -1,10 +1,10 @@ PRGNAM="pdfpc" -VERSION="4.6.0" +VERSION="4.7.0" HOMEPAGE="https://pdfpc.github.io/" -DOWNLOAD="https://github.com/pdfpc/pdfpc/archive/v4.6.0/pdfpc-4.6.0.tar.gz" -MD5SUM="6a497c624452232fcd059c55a8a5242f" +DOWNLOAD="https://github.com/pdfpc/pdfpc/archive/v4.7.0/pdfpc-4.7.0.tar.gz" +MD5SUM="0085b77cc5fdd44841812b80d32d0f15" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="discount webkit2gtk" +REQUIRES="discount webkit2gtk4.1" MAINTAINER="ArTourter" EMAIL="artourter@gmail.com" |