* update mupdf to 1.24.0-1

This commit is contained in:
Alexander Baldeck 2024-04-09 19:40:46 +02:00
parent 3679a269e3
commit 04603eddf0
2 changed files with 17 additions and 45 deletions

View File

@ -8,11 +8,8 @@
# Contributor: xduugu
pkgbase=mupdf
pkgname=(libmupdf mupdf mupdf-gl mupdf-tools)
case "${CARCH}" in
powerpc64*|riscv64|x86_64) pkgname+=('python-mupdf') ;;
esac
pkgver=1.23.11
pkgname=(libmupdf mupdf mupdf-gl mupdf-tools python-mupdf)
pkgver=1.24.0
pkgrel=1
pkgdesc='Lightweight PDF and XPS viewer'
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
@ -38,42 +35,27 @@ makedepends=(
'openjpeg2'
'openssl'
'python'
'swig'
'tesseract'
'zlib'
)
makedepends_powerpc64=(
'swig'
)
makedepends_powerpc64le=(
'swig'
)
makedepends_x86_64=(
'swig'
)
makedepends_riscv64=(
'swig'
)
options=('staticlibs')
source=(
"https://mupdf.com/downloads/archive/$pkgbase-${pkgver/_/}-source.tar.gz"
$pkgbase.desktop
$pkgbase.xpm
$pkgbase-1.23.9-no_venv.patch
$pkgbase-1.23.9-cpp_ldflags.patch
$pkgbase-1.23.9-install_targets.patch
)
sha256sums=('478f2a167feae2a291c8b8bc5205f2ce2f09f09b574a6eb0525bfad95a3cfe66'
sha256sums=('52f63003a6f4d89f234e9edfb4b4c83d216b83aaeb323cfda6047cb754599ae0'
'ccff66979249bd4ab4ba8918660f194eb90eb0ae231b16e36a6cecdcf471883f'
'a435f44425f5432c074dee745d8fbaeb879038ec1f1ec64f037c74662f09aca8'
'fed5ccebf5c8d3a4f4b777ce058f647cde673826b465c777994fc436dc1dca5a'
'152222c0bc066404d9e38be7abbba20748b0a4bbc9cb30403d19e3b176ab257f'
'87fd0544112ca8e8396dd3eb989907c110bad35de02ea425677b99a5d2532666')
'ceb2b16a12bf193d514969f995dfca4c2d12d489c2690928db2db4afe09f6c8c')
prepare() {
cd $pkgbase-${pkgver/_/}-source
# do not use a venv for building language bindings
patch -Np1 -i ../$pkgbase-1.23.9-no_venv.patch
# use our LDFLAGS when building the C++ bindings to have full RELRO
patch -Np1 -i ../$pkgbase-1.23.9-cpp_ldflags.patch
# alter install-shared-* targets to not call one another (which fails on installing headers twice) and install libmupdfcpp.so with soname postfix
@ -105,14 +87,8 @@ prepare() {
build() {
cd $pkgbase-${pkgver/_/}-source
# Avoid python on powerpc
case "${CARCH}" in
powerpc) _enable_python="" ;;
*) _enable_python="python" ;;
esac
# Enforce -j1 to avoid concurrency issue during build
make -j1 shared=yes build=release libs apps c++ ${_enable_python}
make -j1 VENV_FLAG= shared=yes build=release libs apps c++ python
}
package_libmupdf() {
@ -130,13 +106,9 @@ package_libmupdf() {
'tesseract'
'zlib'
)
provides=(
'libmupdf.so'
'libmupdfcpp.so'
)
cd $pkgbase-${pkgver/_/}-source
make prefix=/usr DESTDIR="$pkgdir" install-shared-c install-shared-c++
make prefix=/usr DESTDIR="$pkgdir" SO_INSTALL_MODE=755 install-shared-c install-shared-c++
}
package_python-mupdf() {
@ -149,7 +121,7 @@ package_python-mupdf() {
)
cd $pkgbase-${pkgver/_/}-source
make prefix=/usr DESTDIR="$pkgdir" install-shared-python
make prefix=/usr DESTDIR="$pkgdir" SO_INSTALL_MODE=755 install-shared-python
}
package_mupdf() {

View File

@ -1,35 +1,35 @@
diff -ruN a/Makefile b/Makefile
--- a/Makefile 2024-01-10 16:00:05.000000000 +0100
+++ b/Makefile 2024-01-26 14:43:38.813699706 +0100
@@ -617,24 +617,22 @@
--- a/Makefile 2024-03-19 16:31:58.000000000 +0100
+++ b/Makefile 2024-03-21 16:22:41.092197215 +0100
@@ -637,24 +637,22 @@
false
endif
-install-shared-c: install-shared-check shared install-headers
- install -d $(DESTDIR)$(libdir)
- install -m 644 $(OUT)/libmupdf.$(SO)$(SO_VERSION) $(DESTDIR)$(libdir)/
- install -m $(SO_INSTALL_MODE) $(OUT)/libmupdf.$(SO)$(SO_VERSION) $(DESTDIR)$(libdir)/
+install-shared-c: install-shared-check install-headers
+ install -vDm 755 $(OUT)/libmupdf.$(SO)$(SO_VERSION) -t $(DESTDIR)$(libdir)/
+ install -vDm $(SO_INSTALL_MODE) $(OUT)/libmupdf.$(SO)$(SO_VERSION) -t $(DESTDIR)$(libdir)/
ifneq ($(OS),OpenBSD)
ln -sf libmupdf.$(SO)$(SO_VERSION) $(DESTDIR)$(libdir)/libmupdf.$(SO)
endif
-install-shared-c++: install-shared-c c++
- install -m 644 platform/c++/include/mupdf/*.h $(DESTDIR)$(incdir)/mupdf
- install -m 644 $(OUT)/libmupdfcpp.$(SO)$(SO_VERSION) $(DESTDIR)$(libdir)/
- install -m $(SO_INSTALL_MODE) $(OUT)/libmupdfcpp.$(SO)$(SO_VERSION) $(DESTDIR)$(libdir)/
+install-shared-c++: install-shared-check
+ install -vDm 644 platform/c++/include/mupdf/*.h -t $(DESTDIR)$(incdir)/mupdf
+ install -vDm 755 $(OUT)/libmupdfcpp.$(SO) $(DESTDIR)$(libdir)/libmupdfcpp.$(SO)$(SO_VERSION)
+ install -vDm $(SO_INSTALL_MODE) $(OUT)/libmupdfcpp.$(SO)$(SO_VERSION) -t $(DESTDIR)$(libdir)/
ifneq ($(OS),OpenBSD)
ln -sf libmupdfcpp.$(SO)$(SO_VERSION) $(DESTDIR)$(libdir)/libmupdfcpp.$(SO)
endif
-install-shared-python: install-shared-c++ python
- install -d $(DESTDIR)$(pydir)/mupdf
- install -m 644 $(OUT)/_mupdf.$(SO) $(DESTDIR)$(pydir)/mupdf
- install -m $(SO_INSTALL_MODE) $(OUT)/_mupdf.$(SO) $(DESTDIR)$(pydir)/mupdf
- install -m 644 $(OUT)/mupdf.py $(DESTDIR)$(pydir)/mupdf/__init__.py
+install-shared-python:
+ install -vDm 755 $(OUT)/_mupdf.$(SO) -t $(DESTDIR)$(pydir)/mupdf/
+ install -vDm $(SO_INSTALL_MODE) $(OUT)/_mupdf.$(SO) -t $(DESTDIR)$(pydir)/mupdf
+ install -vDm 644 $(OUT)/mupdf.py $(DESTDIR)$(pydir)/mupdf/__init__.py
else