aboutsummaryrefslogtreecommitdiff
path: root/python/python3-PyMuPDF
diff options
context:
space:
mode:
Diffstat (limited to 'python/python3-PyMuPDF')
-rw-r--r--python/python3-PyMuPDF/README6
-rw-r--r--python/python3-PyMuPDF/python3-PyMuPDF.SlackBuild80
-rw-r--r--python/python3-PyMuPDF/python3-PyMuPDF.info14
3 files changed, 51 insertions, 49 deletions
diff --git a/python/python3-PyMuPDF/README b/python/python3-PyMuPDF/README
index 9a35043dd8..2ff839af0c 100644
--- a/python/python3-PyMuPDF/README
+++ b/python/python3-PyMuPDF/README
@@ -1,3 +1,5 @@
+python3-PyMuPDF (python bindings for mupdf)
+
PyMuPDF adds Python bindings and abstractions to MuPDF, a lightweight
PDF, XPS, and eBook viewer, renderer, and toolkit. Both PyMuPDF and
MuPDF are maintained and developed by Artifex Software, Inc.
@@ -22,3 +24,7 @@ To enable Tesseract OCR functions in PyMuPDF, the software must be
installed and the system environment variable TESSDATA_PREFIX must
be defined as follows:
export TESSDATA_PREFIX=/usr/share/tessdata
+
+Note: this is not the latest version of PyMuPDF. It is the latest
+version that will build on Slackware 15.0. Please don't ask for an
+upgrade unless you include a patch in your email.
diff --git a/python/python3-PyMuPDF/python3-PyMuPDF.SlackBuild b/python/python3-PyMuPDF/python3-PyMuPDF.SlackBuild
index 89c74cdaab..7ca63578da 100644
--- a/python/python3-PyMuPDF/python3-PyMuPDF.SlackBuild
+++ b/python/python3-PyMuPDF/python3-PyMuPDF.SlackBuild
@@ -2,30 +2,28 @@
# Slackware build script for python3-PyMuPDF
-# Copyright 2023-2024, Alexander Verbovetsky, Moscow, Russia
-# All rights reserved.
-#
-# Redistribution and use of this script, with or without modification, is
-# permitted provided that the following conditions are met:
-#
-# 1. Redistributions of this script must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# Originally written by Alexander Verbovetsky.
+# Modified and now maintained by B. Watson (urchlay@slackware.uk).
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# 20251109 bkw:
+# - take over maintenance.
+# - relicense as WTFPL (with permission from Alexander).
+# - update for v1.24.11, which is the newest version I could get
+# to build on 15.0. I suspect we'd need a newer swig for later
+# versions.
+# - simplify script.
+
+# Note to self: the PyMuPDF and mupdf version numbers are not kept in
+# sync. Look at changes.txt in the PyMuPDF tarball to find the correct
+# version of mupdf (and set MUVER to that).
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=python3-PyMuPDF
-VERSION=${VERSION:-1.24.10}
+SRCNAM=PyMuPDF
+VERSION=${VERSION:-1.24.11}
+MUVER=${MUVER:-1.24.10}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -52,32 +50,30 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf ${PRGNAM:8}-$VERSION mupdf*
-tar xvf $CWD/mupdf-*-source.tar.lz
-mv mupdf* mupdf
-tar xvf $CWD/${PRGNAM:8}-$VERSION.tar.gz
-cd ${PRGNAM:8}-$VERSION
-chown -R root:root . ../mupdf
-find -L . ../mupdf \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-
-sed -i -e "s/ret.append([ ]*'libclang'[ ]*)/pass/" \
- -e "s/ret.append([ ]*'swig'[ ]*)/pass/" \
- setup.py
-
-export PYMUPDF_SETUP_MUPDF_BUILD=../mupdf
+rm -rf $PRGNAM-$VERSION
+mkdir -p $PRGNAM-$VERSION
+cd $PRGNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+tar xvf $CWD/mupdf-$MUVER-source.tar.lz
+chown -R root:root .
+find . ! -type l -a \
+ \( -perm /111 -a ! -perm 755 -a -exec chmod -f 755 {} + \) -o \
+ \( ! -perm /111 -a ! -perm 644 -a -exec chmod -f 644 {} + \)
+
+cd $SRCNAM-$VERSION
+
+sed -i.bak "s/ret.append([ ]*'\\(libclang\\|swig\\)'[ ]*)/pass/" setup.py
+
+export PYMUPDF_SETUP_MUPDF_BUILD=../mupdf-$MUVER-source
python3 -m build --wheel --no-isolation
python3 -m installer --destdir "$PKG" dist/*.whl
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+strip $PKG/usr/lib*/python3*/site-packages/pymupdf/* &>/dev/null || true
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a README* changes.txt docs $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a README* changes.txt docs $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
diff --git a/python/python3-PyMuPDF/python3-PyMuPDF.info b/python/python3-PyMuPDF/python3-PyMuPDF.info
index 63351da70c..84c30fe451 100644
--- a/python/python3-PyMuPDF/python3-PyMuPDF.info
+++ b/python/python3-PyMuPDF/python3-PyMuPDF.info
@@ -1,12 +1,12 @@
PRGNAM="python3-PyMuPDF"
-VERSION="1.24.10"
+VERSION="1.24.11"
HOMEPAGE="https://github.com/pymupdf/PyMuPDF"
-DOWNLOAD="https://github.com/pymupdf/PyMuPDF/archive/1.24.10/PyMuPDF-1.24.10.tar.gz \
- https://mupdf.com/downloads/archive/mupdf-1.24.9-source.tar.lz"
-MD5SUM="f25c2be01fb95165ad74f329c070b5cf \
- 72bb7fcb940cacd28e640ea86f081895"
+DOWNLOAD="https://github.com/pymupdf/PyMuPDF/archive/1.24.11/PyMuPDF-1.24.11.tar.gz \
+ https://mupdf.com/downloads/archive/mupdf-1.24.10-source.tar.lz"
+MD5SUM="a40719a5d773b6f781c5647d1449fc93 \
+ 9634ed1444943a62796c68ec25507619"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="python3-psutil %README%"
-MAINTAINER="orphaned - no maintainer"
-EMAIL="NOEMAIL"
+MAINTAINER="B. Watson"
+EMAIL="urchlay@slackware.uk"