Page MenuHomeFreeBSD

Command-Line Input

Authored By
ngie
Sun, Oct 19, 7:11 AM
Size
4 KB
Referenced Files
None
Subscribers
None

Command-Line Input

diff --git a/print/py-PyMuPDF/Makefile b/print/py-PyMuPDF/Makefile
index e0e3bd6a6afc..78f4f8dda5ad 100644
--- a/print/py-PyMuPDF/Makefile
+++ b/print/py-PyMuPDF/Makefile
@@ -1,6 +1,6 @@
PORTNAME= PyMuPDF
-PORTVERSION= 1.22.5
-PORTREVISION= 1
+PORTVERSION= 1.26.5
+DISTNAME= pymupdf-${PORTVERSION}
CATEGORIES= print python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -13,9 +13,17 @@ LICENSE= AGPLv3
LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= bash:shells/bash \
+ mupdf:graphics/mupdf \
+ ${PYTHON_PKGNAMEPREFIX}clang>0:devel/py-clang@${PY_FLAVOR} \
swig:devel/swig
+RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}clang>0:devel/py-clang@${PY_FLAVOR} \
+ mupdf:graphics/mupdf
USES= gmake python
-USE_PYTHON= autoplist concurrent distutils
+USE_PYTHON= autoplist concurrent pep517
+
+MAKE_ENV+= PYMUPDF_SETUP_LIBCLANG="clang" \
+ PYMUPDF_SETUP_MUPDF_BUILD="" \
+ PYMUPDF_SETUP_MUPDF_TGZ=""
.include <bsd.port.mk>
diff --git a/print/py-PyMuPDF/distinfo b/print/py-PyMuPDF/distinfo
index 6afed7c3ad0f..ad2275406b73 100644
--- a/print/py-PyMuPDF/distinfo
+++ b/print/py-PyMuPDF/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1687397187
-SHA256 (PyMuPDF-1.22.5.tar.gz) = 5ec8d5106752297529d0d68d46cfc4ce99914aabd99be843f1599a1842d63fe9
-SIZE (PyMuPDF-1.22.5.tar.gz) = 61638053
+TIMESTAMP = 1760817403
+SHA256 (pymupdf-1.26.5.tar.gz) = 8ef335e07f648492df240f2247854d0e7c0467afb9c4dc2376ec30978ec158c3
+SIZE (pymupdf-1.26.5.tar.gz) = 84319274
diff --git a/print/py-PyMuPDF/files/patch-mupdf-1.26.10-source_scripts_wrap_____main____.py b/print/py-PyMuPDF/files/patch-mupdf-1.26.10-source_scripts_wrap_____main____.py
new file mode 100644
index 000000000000..562013dacd5d
--- /dev/null
+++ b/print/py-PyMuPDF/files/patch-mupdf-1.26.10-source_scripts_wrap_____main____.py
@@ -0,0 +1,14 @@
+--- mupdf-1.26.10-source/scripts/wrap/__main__.py.orig 2025-10-19 06:40:25 UTC
++++ mupdf-1.26.10-source/scripts/wrap/__main__.py
+@@ -1077,7 +1077,10 @@ def _get_m_command( build_dirs, j=None, make=None, m_t
+ if make:
+ jlib.log('Overriding from $MUPDF_MAKE: {make=}.')
+ if not make:
+- if state.state_.openbsd:
++ if state.state_.freebsd:
++ make = 'CXX=c++ gmake'
++ jlib.log('FreeBSD, using: {make=}.')
++ elif state.state_.openbsd:
+ # Need to run gmake, not make. Also for some
+ # reason gmake on OpenBSD sets CC to clang, but
+ # CXX to g++, so need to force CXX=c++ too.
diff --git a/print/py-PyMuPDF/files/patch-mupdf-1.26.10-source_scripts_wrap_state.py b/print/py-PyMuPDF/files/patch-mupdf-1.26.10-source_scripts_wrap_state.py
new file mode 100644
index 000000000000..b16f7561f7e8
--- /dev/null
+++ b/print/py-PyMuPDF/files/patch-mupdf-1.26.10-source_scripts_wrap_state.py
@@ -0,0 +1,14 @@
+--- mupdf-1.26.10-source/scripts/wrap/state.py.orig 2025-10-19 06:47:10 UTC
++++ mupdf-1.26.10-source/scripts/wrap/state.py
+@@ -68,9 +68,10 @@ class State:
+ self.os_name = platform.system()
+ self.windows = (self.os_name == 'Windows' or self.os_name.startswith('CYGWIN'))
+ self.cygwin = self.os_name.startswith('CYGWIN')
+- self.openbsd = self.os_name == 'OpenBSD'
++ self.freebsd = self.os_name == 'FreeBSD'
+ self.linux = self.os_name == 'Linux'
+ self.macos = self.os_name == 'Darwin'
++ self.openbsd = self.os_name == 'OpenBSD'
+ self.pyodide = os.environ.get('OS') == 'pyodide'
+ self.have_done_build_0 = False
+
diff --git a/print/py-PyMuPDF/files/patch-setup.py b/print/py-PyMuPDF/files/patch-setup.py
new file mode 100644
index 000000000000..42c7b9c72f7a
--- /dev/null
+++ b/print/py-PyMuPDF/files/patch-setup.py
@@ -0,0 +1,20 @@
+--- setup.py.orig 2025-10-10 10:57:59 UTC
++++ setup.py
+@@ -726,7 +726,7 @@ def build():
+ log(f'Failed to get git information: {e}')
+ sha, comment, diff, branch = (None, None, None, None)
+ swig = PYMUPDF_SETUP_SWIG or 'swig'
+- swig_version_text = run(f'{swig} --version', capture=1)
++ swig_version_text = run(f'{swig} -version', capture=1)
+ m = re.search('\nSWIG Version ([^\n]+)', swig_version_text)
+ log(f'{swig_version_text=}')
+ assert m, f'Unrecognised {swig_version_text=}'
+@@ -1409,6 +1409,8 @@ else:
+ print(f'msys2: pip install of swig does not build; assuming `pacman -S swig`.')
+ elif openbsd:
+ print(f'OpenBSD: pip install of swig does not build; assuming `pkg_add swig`.')
++ elif freebsd:
++ pass
+ else:
+ ret.append( 'swig')
+ return ret

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
23963155
Default Alt Text
Command-Line Input (4 KB)

Event Timeline