public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/mupdf] f45: record upstream PR
@ 2026-08-15 20:36 Michael J Gruber
0 siblings, 0 replies; only message in thread
From: Michael J Gruber @ 2026-08-15 20:36 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/mupdf
Branch : f45
Commit : fe810c817db2e3e2fde1bdf15b8fc102ce5df87d
Author : Michael J Gruber <mjg@fedoraproject.org>
Date : 2026-07-31T15:33:55+02:00
Stats : +36/-15 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/mupdf/c/fe810c817db2e3e2fde1bdf15b8fc102ce5df87d?branch=f45
Log:
record upstream PR
[skip changelog]
---
diff --git a/0001-Replace-removed-Python-2-C-API-macros-for-SWIG-4.5.0.patch b/0001-Replace-removed-Python-2-C-API-macros-for-SWIG-4.5.0.patch
new file mode 100644
index 0000000..3269fb0
--- /dev/null
+++ b/0001-Replace-removed-Python-2-C-API-macros-for-SWIG-4.5.0.patch
@@ -0,0 +1,32 @@
+From fb114020a353ee0d61931d7a04e160d41c8d889f Mon Sep 17 00:00:00 2001
+Message-ID: <fb114020a353ee0d61931d7a04e160d41c8d889f.1785422567.git.mjg@fedoraproject.org>
+From: Michael J Gruber <mjg@fedoraproject.org>
+Date: Thu, 30 Jul 2026 16:40:24 +0200
+Subject: [PATCH] Replace removed Python 2 C API macros for SWIG 4.5.0
+ compatibility
+
+SWIG was carrying thus macros before version 4.5.0, but they were never
+necessary in Python 3. Stop using for compatibility with upcoming SWIG
+4.5.0.
+
+Suggested-by: Jitka Plesnikova <jplesnik@redhat.com>
+---
+ scripts/wrap/swig.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scripts/wrap/swig.py b/scripts/wrap/swig.py
+index 0c421d3b3..8c9029a53 100644
+--- a/scripts/wrap/swig.py
++++ b/scripts/wrap/swig.py
+@@ -740,7 +740,7 @@ def build_swig(
+ {
+ message += "Traceback (from traceback.format_tb()):\\n";
+ PyObject* traceback_dict = PyModule_GetDict(traceback);
+- PyObject* format_tb = PyDict_GetItem(traceback_dict, PyString_FromString("format_tb"));
++ PyObject* format_tb = PyDict_GetItem(traceback_dict, PyUnicode_FromString("format_tb"));
+ PyObject* ret = PyObject_CallFunctionObjArgs(format_tb, trace, NULL);
+ PyObject* iter = PyObject_GetIter(ret);
+ for(;;)
+--
+2.55.0.607.ge54b5b6513
+
diff --git a/mupdf-swig45.patch b/mupdf-swig45.patch
deleted file mode 100644
index 53ca2f1..0000000
--- a/mupdf-swig45.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -up mupdf-1.27.2-source/scripts/wrap/swig.py.swig45 mupdf-1.27.2-source/scripts/wrap/swig.py
---- mupdf-1.27.2-source/scripts/wrap/swig.py.swig45 2026-07-28 09:53:02.845224055 +0200
-+++ mupdf-1.27.2-source/scripts/wrap/swig.py 2026-07-28 09:53:02.851224187 +0200
-@@ -738,7 +738,7 @@ def build_swig(
- {
- message += "Traceback (from traceback.format_tb()):\\n";
- PyObject* traceback_dict = PyModule_GetDict(traceback);
-- PyObject* format_tb = PyDict_GetItem(traceback_dict, PyString_FromString("format_tb"));
-+ PyObject* format_tb = PyDict_GetItem(traceback_dict, PyUnicode_FromString("format_tb"));
- PyObject* ret = PyObject_CallFunctionObjArgs(format_tb, trace, NULL);
- PyObject* iter = PyObject_GetIter(ret);
- for(;;)
diff --git a/mupdf.spec b/mupdf.spec
index 8f48d52..bfcfb99 100644
--- a/mupdf.spec
+++ b/mupdf.spec
@@ -44,11 +44,12 @@ Patch: 0001-do-not-use-CXXFLAGS-with-swig.patch
# Be more helpful with the new warning in 1.26.x
# https://github.com/ArtifexSoftware/mupdf/pull/74
Patch: 0001-pdf_font-report-font-name-in-warning.patch
-# Upstreamable:
-Patch: 0001-mupdfwrap_test-adjust-to-mupdf-1.27.x.patch
# Replace removed Python 2 C API macros with Python 3 equivalents
# for compatibility with SWIG 4.5.0
-Patch: mupdf-swig45.patch
+# https://github.com/ArtifexSoftware/mupdf/pull/102
+Patch: 0001-Replace-removed-Python-2-C-API-macros-for-SWIG-4.5.0.patch
+# Upstreamable:
+Patch: 0001-mupdfwrap_test-adjust-to-mupdf-1.27.x.patch
BuildRequires: gcc gcc-c++ make binutils desktop-file-utils coreutils pkgconfig
BuildRequires: openjpeg2-devel desktop-file-utils
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-15 20:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-15 20:36 [rpms/mupdf] f45: record upstream PR Michael J Gruber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox