python/python3-PyMuPDF: Updated for version 1.24.2.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Alexander Verbovetsky 2024-04-25 18:50:09 +09:00 committed by Willy Sudiarto Raharjo
parent 9aec077536
commit b1164db918
No known key found for this signature in database
GPG key ID: 3F617144D7238786
3 changed files with 24 additions and 21 deletions

View file

@ -12,8 +12,13 @@ can also be handled like documents: .png, .jpg, .bmp, .tiff, etc.
krop (available on SBo) can use PyMuPDF for both rendering and cropping.
To be on the safe side, keep the version of python3-PyMuPDF in sync with
the mupdf version.
Mupdf is not a dependency because all of the necessary code is built
into PyMuPDF.
Optional autodetected dependencies are python-fonttools, tesseract, and
Optional runtime dependencies are python3-fonttools, tesseract, and
python3-pymupdf_fonts.
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

View file

@ -25,7 +25,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=python3-PyMuPDF
VERSION=${VERSION:-1.23.26}
VERSION=${VERSION:-1.24.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -52,27 +52,23 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf ${PRGNAM:8}-$VERSION
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 .
find -L . \
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/"libclang", "swig", //' pyproject.toml
sed -i -e "s/ret.append([ ]*'libclang'[ ]*)/pass/" \
-e "s/ret.append([ ]*'swig'[ ]*)/pass/" \
setup.py
mv src_classic/fitz_old.i src_classic/fitz.i
sed -i "s/fitz_old/fitz/g" setup.py \
src_classic/__init__.py src_classic/utils.py
export PYMUPDF_SETUP_MUPDF_BUILD=
export PYMUPDF_SETUP_IMPLEMENTATIONS=a
export PYMUPDF_INCLUDES=/usr/include:/usr/include/mupdf:/usr/include/freetype2
export TESSDATA_PREFIX=/usr/share/tessdata
export PYMUPDF_SETUP_MUPDF_BUILD=../mupdf
python3 -m build --wheel --no-isolation
python3 -m installer --destdir "$PKG" dist/*.whl

View file

@ -1,10 +1,12 @@
PRGNAM="python3-PyMuPDF"
VERSION="1.23.26"
VERSION="1.24.2"
HOMEPAGE="https://github.com/pymupdf/PyMuPDF"
DOWNLOAD="https://github.com/pymupdf/PyMuPDF/archive/1.23.26/PyMuPDF-1.23.26.tar.gz"
MD5SUM="3dd25058cbee9f45e823806901b804e8"
DOWNLOAD="https://github.com/pymupdf/PyMuPDF/archive/1.24.2/PyMuPDF-1.24.2.tar.gz \
https://mupdf.com/downloads/archive/mupdf-1.24.1-source.tar.lz"
MD5SUM="f78d847b251d46d60ba9ef0a22ba9293 \
9bc87d3dd7acbd6f958b65353c73ebc5"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="mupdf python3-psutil %README%"
REQUIRES="python3-psutil %README%"
MAINTAINER="Alexander Verbovetsky"
EMAIL="alik@ejik.org"