Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package okular for openSUSE:Factory checked 
in at 2023-03-30 22:50:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/okular (Old)
 and      /work/SRC/openSUSE:Factory/.okular.new.31432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "okular"

Thu Mar 30 22:50:38 2023 rev:159 rq:1075077 version:22.12.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/okular/okular.changes    2023-03-03 
22:27:17.947103690 +0100
+++ /work/SRC/openSUSE:Factory/.okular.new.31432/okular.changes 2023-03-30 
22:50:40.568385065 +0200
@@ -1,0 +2,6 @@
+Tue Mar 28 22:24:30 UTC 2023 - Christophe Marin <christo...@krop.fr>
+
+- Add Discount 3 compatibility patch:
+  * 0001-Compile-with-discount-3.patch
+
+-------------------------------------------------------------------

New:
----
  0001-Compile-with-discount-3.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ okular.spec ++++++
--- /var/tmp/diff_new_pack.YDdi2n/_old  2023-03-30 22:50:41.148388168 +0200
+++ /var/tmp/diff_new_pack.YDdi2n/_new  2023-03-30 22:50:41.156388211 +0200
@@ -31,6 +31,8 @@
 Source1:        
https://download.kde.org/stable/release-service/%{version}/src/%{name}-%{version}.tar.xz.sig
 Source2:        applications.keyring
 %endif
+# PATCH-FIX-UPSTREAM
+Patch0:         0001-Compile-with-discount-3.patch
 %if 0
 # PATCH-FEATURE-OPENSUSE
 # PATCH-NEEDS-REBASE DISABLED as of 2021-04-10: needs rework (underlying code 
changed)

++++++ 0001-Compile-with-discount-3.patch ++++++
>From f1f638c2c51a6ef699dee22f6e90aff67beff8ec Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aa...@kde.org>
Date: Wed, 1 Feb 2023 22:01:52 +0100
Subject: [PATCH] Compile with discount 3

---
 generators/markdown/converter.cpp | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/generators/markdown/converter.cpp 
b/generators/markdown/converter.cpp
index 20d3c725f..3c8546b32 100644
--- a/generators/markdown/converter.cpp
+++ b/generators/markdown/converter.cpp
@@ -93,6 +93,8 @@ QTextDocument *Converter::convertOpenFile()
 {
     rewind(m_markdownFile);
 
+#if defined(MKD_NOLINKS)
+    // on discount 2 MKD_NOLINKS is a define
     MMIOT *markdownHandle = mkd_in(m_markdownFile, 0);
 
     int flags = MKD_FENCEDCODE | MKD_GITHUBTAGS | MKD_AUTOLINK | MKD_TOC | 
MKD_IDANCHOR;
@@ -103,6 +105,21 @@ QTextDocument *Converter::convertOpenFile()
         Q_EMIT error(i18n("Failed to compile the Markdown document."), -1);
         return nullptr;
     }
+#else
+    // on discount 3 MKD_NOLINKS is an enum value
+    MMIOT *markdownHandle = mkd_in(m_markdownFile, nullptr);
+
+    mkd_flag_t *flags = mkd_flags();
+    mkd_set_flag_bitmap(flags, MKD_FENCEDCODE | MKD_GITHUBTAGS | MKD_AUTOLINK 
| MKD_TOC | MKD_IDANCHOR);
+    if (!m_isFancyPantsEnabled) {
+        mkd_set_flag_num(flags, MKD_NOPANTS);
+    }
+    if (!mkd_compile(markdownHandle, flags)) {
+        Q_EMIT error(i18n("Failed to compile the Markdown document."), -1);
+        return nullptr;
+    }
+    mkd_free_flags(flags);
+#endif
 
     char *htmlDocument;
     const int size = mkd_document(markdownHandle, &htmlDocument);
-- 
2.40.0

Reply via email to