From nobody Fri Jun 5 20:03:08 2026 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gXC6N28Cjz6gR8p for ; Fri, 05 Jun 2026 20:03:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gXC6N1BFBz3KRr for ; Fri, 05 Jun 2026 20:03:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780689788; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AIxfbX0GTKEneMiBb5wYaBmNGJSmWm2Mi8vDShGJthg=; b=Wzyq57oa8+5iY5/sObR+luG8MZWGjfWoIMyCzriuaZCKmqQKt/ASg22TKih13/167uoehC 6Piu448YJSs2jGQs7QI9ipqnAtCGYM3WovbEImJCVZ5V/iN1O/QWormgO2Uu666ojiJjlS yF8Q0Bdc+ApaR2/Cr4xXKy+pkP7fsF+EfkyfCfJA5GoSTFvtz9uLK4PPkIDZjVdw3GQIhV dn0cV4V3hX9gY1monTfBpf5wue99Q02JOEiyQO1EiSqPw4ZySUk2ogv/jThnx7TBH8QvnK pNNG7hCffVyPw6wI5aHa0/6h94fO4YbJJOnGXZu/R/GXOLeJfW/BuT5Sf7e9GQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780689788; a=rsa-sha256; cv=none; b=J/1MGavitiPKa42mJNM9uqDrLGp0o6/RGSFi3z7r59Rv7sECPyqaBNwNdMCc8xM/Nof3LN Ig0/gdaAJWJgTBC42mvUkb8Ri1MHC35bKZoXhWfP/51wNFsd+oeichzG2D4rGlNzeo+3Mn aFQKe0Pjl5MhL8IaLYtIGDADNNxmj/33X+ea58yR2J+E9aFNmEXI4/UySB5KF65WS1YOT4 c7EQbaKHpEUqPsfliVixMbWylJ12ARxiXPSKDPTOZxIJug7jvyZkvpFjZCmDHJ7uiRJ4Vc pLm4eQFnuycprR0W0/JgvIEX8SRU7XJvbuIgDWT9xBh8a2R9bmXjijG84osjlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780689788; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AIxfbX0GTKEneMiBb5wYaBmNGJSmWm2Mi8vDShGJthg=; b=lo4JY6UNzgYT/iJhxM52BpohNyNzgYZePlYgeZ1pd84XOF+Gu5SfwklXhfpAv+aEkZ7WTc 6iIgJqzw2uyzpuO8qVyCHeQCzMM4ASO4wMQycm3TOxsNE+dsV3UBO8rdievrQ8aSNevlV9 +g+WuXd8YfpoTG2R0aBupMFqrUgMweay6desi/rDik2AzyA3B0BasDKt6CE+iqtup6Nv5G ZkBmlCCBhsNsgifiGgnD7cwhyx5JcBMtSPGOH+YRWKpfJzUPI4wIm5G2xacyHgS9P1bx/P fWVwz9mxc+X0z/VPtbb4wHE64Nukautilz+C84sSYZ/b6yHxXf8Xam3ZhMpd8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gXC6N0fsBzlDq for ; Fri, 05 Jun 2026 20:03:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 368b8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 05 Jun 2026 20:03:08 +0000 To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Cc: Christian Ullrich From: Kurt Jaeger Subject: git: 72e62f44217f - main - textproc/dblatex: fix build with python 3.12 (and probably newer versions) List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pi X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 72e62f44217ffa80f8845512b4ea09c34e0fbc5f Auto-Submitted: auto-generated Date: Fri, 05 Jun 2026 20:03:08 +0000 Message-Id: <6a232b7c.368b8.618da6c3@gitrepo.freebsd.org> The branch main has been updated by pi: URL: https://cgit.FreeBSD.org/ports/commit/?id=72e62f44217ffa80f8845512b4ea09c34e0fbc5f commit 72e62f44217ffa80f8845512b4ea09c34e0fbc5f Author: Christian Ullrich AuthorDate: 2026-06-05 19:58:38 +0000 Commit: Kurt Jaeger CommitDate: 2026-06-05 20:02:59 +0000 textproc/dblatex: fix build with python 3.12 (and probably newer versions) Patches used: - https://sourceforge.net/p/dblatex/patches/12/ by Miro HronĨok - https://sourceforge.net/p/dblatex/patches/13/ by Michael J Gruber PR: 291803 Reported-by: D'Arcy J.M. Cain Obtained-from: https://sourceforge.net/projects/dblatex/ Author: Christian Ullrich --- .../dblatex/files/patch-lib_dbtexmf_core_dbtex.py | 36 ++++++++++++++++++++ .../patch-lib_dbtexmf_dblatex_grubber_plugins.py | 38 ++++++++++++++++++++++ .../dblatex/files/patch-lib_dbtexmf_xslt_xslt.py | 36 ++++++++++++++++++++ 3 files changed, 110 insertions(+) diff --git a/textproc/dblatex/files/patch-lib_dbtexmf_core_dbtex.py b/textproc/dblatex/files/patch-lib_dbtexmf_core_dbtex.py new file mode 100644 index 000000000000..c28d09d6b0a6 --- /dev/null +++ b/textproc/dblatex/files/patch-lib_dbtexmf_core_dbtex.py @@ -0,0 +1,36 @@ +--- lib/dbtexmf/core/dbtex.py.orig 2025-12-19 19:39:32 UTC ++++ lib/dbtexmf/core/dbtex.py +@@ -15,7 +15,8 @@ import glob + except ImportError: + from urllib.request import pathname2url + import glob +-import imp ++import importlib.machinery ++import importlib.util + from optparse import OptionParser + from io import open + +@@ -540,15 +541,14 @@ class DbTexCommand: + + def load_plugin(self, pathname): + moddir, modname = os.path.split(pathname) +- try: +- filemod, path, descr = imp.find_module(modname, [moddir]) +- except ImportError: +- try: +- filemod, path, descr = imp.find_module(modname) +- except ImportError: +- failed_exit("Error: '%s' module not found" % modname) +- mod = imp.load_module(modname, filemod, path, descr) +- filemod.close() ++ spec = importlib.machinery.PathFinder.find_spec(modname, [moddir]) ++ if not spec: ++ spec = importlib.machinery.PathFinder.find_spec(modname) ++ if not spec: ++ failed_exit("Error: '%s' module not found" % modname) ++ mod = importlib.util.module_from_spec(spec) ++ spec.loader.exec_module(mod) ++ sys.modules[modname] = mod + return mod + + def run_setup(self, options): diff --git a/textproc/dblatex/files/patch-lib_dbtexmf_dblatex_grubber_plugins.py b/textproc/dblatex/files/patch-lib_dbtexmf_dblatex_grubber_plugins.py new file mode 100644 index 000000000000..ac232a848b87 --- /dev/null +++ b/textproc/dblatex/files/patch-lib_dbtexmf_dblatex_grubber_plugins.py @@ -0,0 +1,38 @@ +--- lib/dbtexmf/dblatex/grubber/plugins.py.orig 2025-12-19 19:39:46 UTC ++++ lib/dbtexmf/dblatex/grubber/plugins.py +@@ -4,7 +4,8 @@ All the modules must be derived from the TexModule cla + Mechanisms to dynamically load extra modules to help the LaTeX compilation. + All the modules must be derived from the TexModule class. + """ +-import imp ++import importlib.machinery ++import importlib.util + + from os.path import * + from dbtexmf.dblatex.grubber.msg import _, msg +@@ -108,17 +109,16 @@ class Plugins (object): + """ + if name in self.modules: + return 2 +- try: +- file, path, descr = imp.find_module(name, [""]) +- except ImportError: ++ spec = importlib.machinery.PathFinder.find_spec(name, [""]) ++ if not spec: + if not self.path: + return 0 +- try: +- file, path, descr = imp.find_module(name, self.path) +- except ImportError: +- return 0 +- module = imp.load_module(name, file, path, descr) +- file.close() ++ spec = importlib.machinery.PathFinder.find_spec(name, self.path) ++ if not spec: ++ return 0 ++ module = importlib.util.module_from_spec(spec) ++ spec.loader.exec_module(module) ++ sys.modules[name] = module + self.modules[name] = module + return 1 + diff --git a/textproc/dblatex/files/patch-lib_dbtexmf_xslt_xslt.py b/textproc/dblatex/files/patch-lib_dbtexmf_xslt_xslt.py new file mode 100644 index 000000000000..a04eac49e36f --- /dev/null +++ b/textproc/dblatex/files/patch-lib_dbtexmf_xslt_xslt.py @@ -0,0 +1,36 @@ +--- lib/dbtexmf/xslt/xslt.py.orig 2025-12-19 19:39:14 UTC ++++ lib/dbtexmf/xslt/xslt.py +@@ -2,20 +2,22 @@ import os + # Very simple plugin loader for Xslt classes + # + import os +-import imp ++import importlib.machinery ++import importlib.util + import glob ++import sys + + def load(modname): +- try: +- file, path, descr = imp.find_module(modname, [""]) +- except ImportError: +- try: +- file, path, descr = imp.find_module(modname, +- [os.path.dirname(__file__)]) +- except ImportError: +- raise ValueError("Xslt '%s' not found" % modname) +- mod = imp.load_module(modname, file, path, descr) +- file.close() ++ spec = importlib.machinery.PathFinder.find_spec(modname, [""]) ++ if not spec: ++ spec = importlib.machinery.PathFinder.find_spec(modname, ++ [os.path.dirname(__file__)]) ++ if not spec: ++ raise ValueError("Xslt '%s' not found" % modname) ++ ++ mod = importlib.util.module_from_spec(spec) ++ spec.loader.exec_module(mod) ++ sys.modules[modname] = mod + o = mod.Xslt() + return o +