From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1487970-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id BBF8E15800F
	for <garchives@archives.gentoo.org>; Sat, 18 Feb 2023 13:06:32 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id E8537E0874;
	Sat, 18 Feb 2023 13:06:31 +0000 (UTC)
Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 8E6FEE0871
	for <gentoo-commits@lists.gentoo.org>; Sat, 18 Feb 2023 13:06:31 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 89D31335D58
	for <gentoo-commits@lists.gentoo.org>; Sat, 18 Feb 2023 13:06:30 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id BF7428AB
	for <gentoo-commits@lists.gentoo.org>; Sat, 18 Feb 2023 13:06:28 +0000 (UTC)
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" <asturm@gentoo.org>
Message-ID: <1676725573.cdddaea7a802a570a60e749b5179c0760d36e3fd.asturm@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-apps/okular/files/, kde-apps/okular/
X-VCS-Repository: repo/gentoo
X-VCS-Files: kde-apps/okular/files/okular-22.12.2-discount-3.patch kde-apps/okular/okular-22.12.2.ebuild
X-VCS-Directories: kde-apps/okular/ kde-apps/okular/files/
X-VCS-Committer: asturm
X-VCS-Committer-Name: Andreas Sturmlechner
X-VCS-Revision: cdddaea7a802a570a60e749b5179c0760d36e3fd
X-VCS-Branch: master
Date: Sat, 18 Feb 2023 13:06:28 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 72ab371a-c43c-4143-b0d6-1972667ac2f5
X-Archives-Hash: 98f09007cb1ab4aa4bab746724cf6436

commit:     cdddaea7a802a570a60e749b5179c0760d36e3fd
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 18 10:44:02 2023 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Feb 18 13:06:13 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cdddaea7

kde-apps/okular: Fix build with >=app-text/discount-3

Closes: https://bugs.gentoo.org/892633
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../okular/files/okular-22.12.2-discount-3.patch   | 47 ++++++++++++++++++++++
 kde-apps/okular/okular-22.12.2.ebuild              |  1 +
 2 files changed, 48 insertions(+)

diff --git a/kde-apps/okular/files/okular-22.12.2-discount-3.patch b/kde-apps/okular/files/okular-22.12.2-discount-3.patch
new file mode 100644
index 000000000000..e9fef2679adb
--- /dev/null
+++ b/kde-apps/okular/files/okular-22.12.2-discount-3.patch
@@ -0,0 +1,47 @@
+From f1f638c2c51a6ef699dee22f6e90aff67beff8ec Mon Sep 17 00:00:00 2001
+From: Albert Astals Cid <aacid@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);
+-- 
+GitLab
+

diff --git a/kde-apps/okular/okular-22.12.2.ebuild b/kde-apps/okular/okular-22.12.2.ebuild
index b53a5f62b2fd..02e1c3eb56af 100644
--- a/kde-apps/okular/okular-22.12.2.ebuild
+++ b/kde-apps/okular/okular-22.12.2.ebuild
@@ -72,6 +72,7 @@ RDEPEND="${DEPEND}
 PATCHES=(
 	"${FILESDIR}/${PN}-21.11.80-tests.patch" # bug 734138
 	"${FILESDIR}/${PN}-20.08.2-hide-mobile-app.patch" # avoid same-name entry
+	"${FILESDIR}/${PN}-22.12.2-discount-3.patch" # bug 892633
 )
 
 src_configure() {