[packages/mupdf] - updated to 1.24.2 (new soname)

qboosh qboosh at pld-linux.org
Thu May 16 19:44:36 CEST 2024


commit d809011061fd35bf8baecb80decf829a5c2fed46
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu May 16 19:25:23 2024 +0200

    - updated to 1.24.2 (new soname)

 mupdf-soname.patch | 11 ---------
 mupdf.spec         | 67 ++++++++++++++++++++++++++++++++----------------------
 2 files changed, 40 insertions(+), 38 deletions(-)
---
diff --git a/mupdf.spec b/mupdf.spec
index 3956149..b289e1f 100644
--- a/mupdf.spec
+++ b/mupdf.spec
@@ -1,28 +1,29 @@
 #
 # Conditional build:
 %bcond_without	static_libs	# static library
+%bcond_without	tesseract	# OCR support via Tesseract
 
 Summary:	MuPDF - lightweight PDF, XPS and CBZ viewer and parser/rendering library
 Summary(pl.UTF-8):	MuPDF - lekka przeglądarka PDF, XPS, CBZ
 Name:		mupdf
-Version:	1.23.10
+Version:	1.24.2
 Release:	1
 License:	AGPL v3+
 Group:		Applications/Text
+#Source0Download: https://www.mupdf.com/releases
 Source0:	https://www.mupdf.com/downloads/archive/%{name}-%{version}-source.tar.lz
-# Source0-md5:	01388f28be12c2f449c777c361262a4c
-Patch0:		%{name}-soname.patch
-Patch1:		%{name}-flags.patch
+# Source0-md5:	d8f835e414202946d1c6c8192dd4315d
+Patch0:		%{name}-flags.patch
 URL:		https://www.mupdf.com/
 BuildRequires:	OpenGL-glut-devel
 BuildRequires:	curl-devel >= 7.66.0
 BuildRequires:	freetype-devel >= 1:2.13.0
 BuildRequires:	gumbo-parser-devel >= 0.10.1
 BuildRequires:	harfbuzz-devel >= 6.0.0
-BuildRequires:	jbig2dec-devel >= 0.18
+BuildRequires:	jbig2dec-devel >= 0.20
+%{?with_tesseract:BuildRequires:	leptonlib-devel >= 1.84.1}
 BuildRequires:	libjpeg-devel
 BuildRequires:	libstdc++-devel
-BuildRequires:	libtool
 BuildRequires:	lzip
 BuildRequires:	mujs-devel >= 1.3.3
 BuildRequires:	openjpeg2-devel >= 2.5.0
@@ -32,17 +33,12 @@ BuildRequires:	python3-furo
 BuildRequires:	python3-rst2pdf
 BuildRequires:	sphinx-pdg
 BuildRequires:	tar >= 1:1.22
+%{?with_tesseract:BuildRequires:	tesseract-devel >= 5.3.4}
 BuildRequires:	xorg-lib-libX11-devel
 BuildRequires:	xorg-lib-libXext-devel
 BuildRequires:	zlib-devel >= 1.2.13
 Requires:	%{name}-libs = %{version}-%{release}
 Requires:	curl-libs >= 7.66.0
-Requires:	freetype >= 1:2.13.0
-Requires:	gumbo-parser >= 0.10.1
-Requires:	harfbuzz >= 6.0.0
-Requires:	jbig2dec >= 0.18
-Requires:	openjpeg2 >= 2.5.0
-Requires:	zlib >= 1.2.13
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -56,10 +52,14 @@ Summary:	Shared MuPDF libraries
 Summary(pl.UTF-8):	Biblioteki współdzielone MuPDF
 Group:		Libraries
 Requires:	freetype >= 1:2.13.0
-Requires:	jbig2dec >= 0.18
+Requires:	gumbo-parser >= 0.10.1
+Requires:	harfbuzz >= 6.0.0
+Requires:	jbig2dec >= 0.20
+%{?with_tesseract:Requires:	leptonlib >= 1.84.1}
 Requires:	mujs >= 1.3.3
-Requires:	openjpeg2
+Requires:	openjpeg2 >= 2.5.0
 Requires:	openssl >= 1.1.0
+%{?with_tesseract:Requires:	tesseract >= 5.3.4}
 Requires:	zlib >= 1.2.13
 
 %description libs
@@ -74,12 +74,14 @@ Summary(pl.UTF-8):	Pliki nagłówkowe bibliotek MuPDF
 Group:		Development/Libraries
 Requires:	%{name}-libs = %{version}-%{release}
 Requires:	freetype-devel >= 1:2.13.0
-Requires:	jbig2dec-devel >= 0.18
+Requires:	jbig2dec-devel >= 0.20
+%{?with_tesseract:Requires:	leptonlib-devel >= 1.84.1}
 Requires:	libjpeg-devel
 Requires:	libstdc++-devel
 Requires:	mujs-devel >= 1.3.3
 Requires:	openjpeg2-devel >= 2.5.0
 Requires:	openssl-devel >= 1.1.0
+%{?with_tesseract:Requires:	tesseract-devel >= 5.3.4}
 Requires:	zlib-devel >= 1.2.13
 
 %description devel
@@ -103,22 +105,24 @@ Statyczne biblioteki MuPDF.
 %prep
 %setup -q -n %{name}-%{version}-source
 %patch0 -p1
-%patch1 -p1
 
 # use system libs instead:
 # curl 7.66.0
 # freetype 2.13.0
 # gumbo-parser 0.10.1
 # harfbuzz 6.0.0
-# jbig2dec 0.18
-# libjpeg 9
-# mujs 1.3.3
-# openjpeg 2.5.0
+# jbig2dec 0.20
+# leptonica 1.84.1
+# libjpeg 9e
+# mujs 1.3.2
+# openjpeg 2.4.0
+# tesseract 5.3.4
 # zlib 1.2.13
-%{__rm} -r thirdparty/{curl,freetype,gumbo-parser,harfbuzz,jbig2dec,libjpeg,mujs,openjpeg,zlib}
+%{__rm} -r thirdparty/{curl,freetype,gumbo-parser,harfbuzz,jbig2dec,leptonica,libjpeg,mujs,openjpeg,tesseract,zlib}
 # but keep:
+# extract - ?, system library not supported
 # freeglut - 3.0.0 + some additional keyboard and clipboard APIs
-# lcms2 - "art" fork with tread safety
+# lcms2 - 2.14.art: "art" fork with tread safety
 
 %build
 %if %{with static_libs}
@@ -132,6 +136,7 @@ LDFLAGS="%{rpmldflags}" \
 	USE_SYSTEM_MUJS=yes \
 	build=release \
 	libdir=%{_libdir} \
+	%{?with_tesseract:tesseract=yes} \
 	verbose=yes
 %endif
 
@@ -144,8 +149,9 @@ LDFLAGS="%{rpmldflags}" \
 	USE_SYSTEM_LIBS=yes \
 	USE_SYSTEM_MUJS=yes \
 	build=release \
-	shared=yes \
 	libdir=%{_libdir} \
+	shared=yes \
+	%{?with_tesseract:tesseract=yes} \
 	verbose=yes
 
 sphinx-build -M html docs/src build/docs
@@ -160,7 +166,8 @@ rm -rf $RPM_BUILD_ROOT
 	USE_SYSTEM_MUJS=yes \
 	build=release \
 	prefix=%{_prefix} \
-	libdir=%{_libdir}
+	libdir=%{_libdir} \
+	%{?with_tesseract:tesseract=yes}
 %endif
 
 %{__make} install \
@@ -168,9 +175,14 @@ rm -rf $RPM_BUILD_ROOT
 	USE_SYSTEM_LIBS=yes \
 	USE_SYSTEM_MUJS=yes \
 	build=release \
-	shared=yes \
 	prefix=%{_prefix} \
-	libdir=%{_libdir}
+	libdir=%{_libdir} \
+	shared=yes \
+	%{?with_tesseract:tesseract=yes}
+
+# missing in make install
+chmod 755 $RPM_BUILD_ROOT%{_libdir}/libmupdf.so.*.*
+ln -sf $(basename $RPM_BUILD_ROOT%{_libdir}/libmupdf.so.*.*) $RPM_BUILD_ROOT%{_libdir}/libmupdf.so
 
 # packaged as %doc
 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mupdf
@@ -194,10 +206,11 @@ rm -rf $RPM_BUILD_ROOT
 
 %files libs
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libmupdf.so
+%attr(755,root,root) %{_libdir}/libmupdf.so.*.*
 
 %files devel
 %defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libmupdf.so
 %{_includedir}/mupdf
 
 %if %{with static_libs}
diff --git a/mupdf-soname.patch b/mupdf-soname.patch
deleted file mode 100644
index 0dbe6e9..0000000
--- a/mupdf-soname.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- mupdf-1.18.0-source/Makefile.orig	2020-10-07 12:35:03.000000000 +0200
-+++ mupdf-1.18.0-source/Makefile	2021-07-17 07:21:34.738610164 +0200
-@@ -76,7 +76,7 @@
- 	$(LINK_CMD)
- 
- $(OUT)/%.$(SO)$(SO_VERSION):
--	$(LINK_CMD) $(LIB_LDFLAGS) $(THIRD_LIBS) $(LIBCRYPTO_LIBS)
-+	$(LINK_CMD) $(LIB_LDFLAGS) $(THIRD_LIBS) $(LIBCRYPTO_LIBS) -Wl,-soname,$(shell basename $@)
- ifneq ($(SO_VERSION),)
- 	ln -sf $(notdir $@) $(patsubst %$(SO_VERSION), %, $@)
- endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mupdf.git/commitdiff/d809011061fd35bf8baecb80decf829a5c2fed46



More information about the pld-cvs-commit mailing list