git: f4e4c4e33cc6 - main - graphics/scantpaper: Fix with Python 3.13

From: Christoph Moench-Tegeder <cmt_at_FreeBSD.org>
Date: Sun, 18 Oct 2026 21:32:02 UTC
The branch main has been updated by cmt:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f4e4c4e33cc6559b59743cda3b421b8751b85697

commit f4e4c4e33cc6559b59743cda3b421b8751b85697
Author:     Pattems <patrick@crandol.com>
AuthorDate: 2026-10-13 04:18:54 +0000
Commit:     Christoph Moench-Tegeder <cmt@FreeBSD.org>
CommitDate: 2026-10-18 21:30:49 +0000

    graphics/scantpaper: Fix with Python 3.13
    
    - The post-build target runs dev/compile_mo.py with a hardcoded
      python3.12, which is not installed when another Python version is
      the default, so the build fails.  Use ${PYTHON_CMD}.
    - The app window and document code import sqlite3 (packaged separately
      as databases/py-sqlite3), and imageview/basethread import
      typing_extensions, which upstream lists as a dependency.  Without
      them the scantpaper command and half of the modules fail to import.
      Add both to RUN_DEPENDS and bump PORTREVISION.
---
 graphics/scantpaper/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/graphics/scantpaper/Makefile b/graphics/scantpaper/Makefile
index 7a25a9d49d42..6ec8e9ec24a6 100644
--- a/graphics/scantpaper/Makefile
+++ b/graphics/scantpaper/Makefile
@@ -1,6 +1,7 @@
 PORTNAME=	scantpaper
 DISTVERSIONPREFIX=	v
 DISTVERSION=	3.0.24
+PORTREVISION=	1
 CATEGORIES=	graphics python
 
 MAINTAINER=	cmt@FreeBSD.org
@@ -21,6 +22,8 @@ RUN_DEPENDS=	unpaper:graphics/unpaper \
 		${PYTHON_PKGNAMEPREFIX}ocrmypdf>=15.4.3:textproc/py-ocrmypdf@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}python-iso639>0:textproc/py-python-iso639@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}sane>0:graphics/py-sane@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}typing-extensions>0:devel/py-typing-extensions@${PY_FLAVOR} \
 		${PY_PILLOW}
 
 USES=		compiler:c++17-lang gettext gnome magick:build,run python
@@ -33,7 +36,7 @@ NO_ARCH=	yes
 PLIST_SUB=	DISTVERSION=${DISTVERSION}
 
 post-build:
-	(cd ${WRKSRC} ; python3.12 dev/compile_mo.py --src po --out locale --domain scantpaper)
+	(cd ${WRKSRC} ; ${PYTHON_CMD} dev/compile_mo.py --src po --out locale --domain scantpaper)
 
 post-install:
 	${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/16x16/apps ${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps