public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Michael J Gruber <mjg@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/mupdf] rawhide: record upstream PR
Date: Sat, 15 Aug 2026 19:39:10 GMT	[thread overview]
Message-ID: <178682275059.1.13608441585765008645.rpms-mupdf-fe810c817db2@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/mupdf
            Branch : rawhide
            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=rawhide

            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

                 reply	other threads:[~2026-08-15 19:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178682275059.1.13608441585765008645.rpms-mupdf-fe810c817db2@fedoraproject.org \
    --to=mjg@fedoraproject.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox