mupdf 1.22.2-1 (x86_64;aarch64;znver1) 2023-17521
-9999

Status rejected
Submitter benbullard79 [@T] cox.net
Platform rolling
Repository main
URL https://abf.openmandriva.org/build_lists/347455
Packages
lib64mupdf-devel-1.22.2-1.x86_64.binary
mupdf-1.22.2-1.x86_64.source
mupdf-1.22.2-1.x86_64.binary
mupdf-debuginfo-1.22.2-1.x86_64.debuginfo
mupdf-debugsource-1.22.2-1.x86_64.binary
lib64mupdf-devel-1.22.2-1.aarch64.binary
mupdf-1.22.2-1.aarch64.source
mupdf-1.22.2-1.aarch64.binary
mupdf-debuginfo-1.22.2-1.aarch64.debuginfo
mupdf-debugsource-1.22.2-1.aarch64.binary
lib64mupdf-devel-1.22.2-1.znver1.binary
mupdf-1.22.2-1.znver1.source
mupdf-1.22.2-1.znver1.binary
mupdf-debuginfo-1.22.2-1.znver1.debuginfo
mupdf-debugsource-1.22.2-1.znver1.binary
Build Date 2023-06-27 12:53:28 +0000 UTC
Last Updated 2023-06-30 14:13:40.473068855 +0000 UTC
$ git show --format=fuller --patch-with-stat --summary 6648b8e98be1a1640b07c66254533f5cb708270d

commit 6648b8e98be1a1640b07c66254533f5cb708270d
Author:     mandian <mandian@users.noreply.github.com>
AuthorDate: Tue Jun 27 11:53:32 2023 +0100
Commit:     mandian <mandian@users.noreply.github.com>
CommitDate: Tue Jun 27 11:53:32 2023 +0100

    1.22.2
---
 .abf.yml         |   2 +-
 mupdf-gl.desktop |  11 ++++
 mupdf.desktop    |   4 +-
 mupdf.spec       | 150 +++++++++++++++++++++++++++++++++++--------------------
 4 files changed, 110 insertions(+), 57 deletions(-)
 create mode 100644 mupdf-gl.desktop

diff --git a/.abf.yml b/.abf.yml
index 4a2e70d..f7d382f 100644
--- a/.abf.yml
+++ b/.abf.yml
@@ -1,2 +1,2 @@
 sources:
-  mupdf-1.22.1-source.tar.lz: bfae0e17c7829a89225ebfe02e31ac79c962662e
+  mupdf-1.22.2-source.tar.gz: f4bed6f9f00606e4709406282900513b548c17cc
diff --git a/mupdf-gl.desktop b/mupdf-gl.desktop
new file mode 100644
index 0000000..78ff495
--- /dev/null
+++ b/mupdf-gl.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Name=Mupdf-GL
+GenericName=PDF file viewer
+Comment=Lightweight PDF file viewer written on portable C
+Exec=mupdf-gl %f
+Icon=mupdf-gl
+Terminal=false
+Type=Application
+Categories=Viewer;Graphics;Office;Viewer;
+MimeType=application/pdf;application/x-pdf;application/x-cbz;
+
diff --git a/mupdf.desktop b/mupdf.desktop
index 41b5d8d..ce3d6d1 100644
--- a/mupdf.desktop
+++ b/mupdf.desktop
@@ -2,10 +2,10 @@
 Name=Mupdf
 GenericName=PDF file viewer
 Comment=Lightweight PDF file viewer written on portable C
-Exec=mupdf %f
+Exec=mupdf-x11 %f
 Icon=mupdf
 Terminal=false
 Type=Application
-Categories=Viewer;Graphics;
+Categories=Viewer;Graphics;Office;Viewer;
 MimeType=application/pdf;application/x-pdf;application/x-cbz;
 NoDisplay=true
diff --git a/mupdf.spec b/mupdf.spec
index a6eb822..02b9b9a 100644
--- a/mupdf.spec
+++ b/mupdf.spec
@@ -1,31 +1,39 @@
 %define	devname	%mklibname -d %{name}
-%define debug_package %{nil}
+
+%bcond_with extract
+%bcond_with gumbo-parser
+%bcond_without lcms2
+%bcond_with	mujs
+%bcond_without jpegxr
 
 Name:		mupdf
-Version:	1.22.1
+Version:	1.22.2
 Release:	1
 Summary:	Lightweight PDF viewer and toolkit written in portable C
 License:	GPLv3
 Group:		Office
 URL:		http://mupdf.com/
-Source0:	https://mupdf.com/downloads/archive/mupdf-%{version}-source.tar.lz
+Source0:	https://mupdf.com/downloads/archive/mupdf-%{version}-source.tar.gz
 Source10:	mupdf.desktop
+Source11:	mupdf-gl.desktop
 Patch0:		mupdf-1.21.0-compile.patch
-BuildRequires:	pkgconfig(x11)
-BuildRequires:	pkgconfig(xext)
-BuildRequires:	pkgconfig(zlib)
-BuildRequires:	pkgconfig(libcurl)
-BuildRequires:	pkgconfig(lcms2)
-BuildRequires:	pkgconfig(lcms2mt)
-BuildRequires:	pkgconfig(glut)
+
+BuildRequires:	imagemagick
+BuildRequires:	jxrlib-devel
 BuildRequires:	pkgconfig(glu)
-BuildRequires:	pkgconfig(mujs)
-BuildRequires:	jpeg-devel
+BuildRequires:	pkgconfig(glut)
 BuildRequires:	pkgconfig(freetype2)
 BuildRequires:	pkgconfig(harfbuzz)
-BuildRequires:	jbig2dec-devel
-BuildRequires:	openjpeg2-devel
-BuildRequires:	desktop-file-utils
+BuildRequires:	pkgconfig(jbig2dec)
+BuildRequires:	pkgconfig(lcms2)
+BuildRequires:	pkgconfig(lcms2mt)
+BuildRequires:	pkgconfig(libcurl)
+BuildRequires:	pkgconfig(libjpeg)
+BuildRequires:	pkgconfig(libopenjp2)
+BuildRequires:	pkgconfig(mujs)
+BuildRequires:	pkgconfig(x11)
+BuildRequires:	pkgconfig(xext)
+BuildRequires:	pkgconfig(zlib)
 BuildRequires:	lzip
 
 %description
@@ -46,6 +54,17 @@ the PDF document.  Example code for navigating interactive links and
 bookmarks, encrypting PDF files, extracting fonts, images, and
 searchable text, and rendering pages to image files is provided.
 
+%files
+%license COPYING
+%doc README
+%{_bindir}/*
+%{_datadir}/applications/%{name}*.desktop
+%{_iconsdir}/hicolor/*/apps/*
+%{_datadir}/pixmaps/%{name}*.xpm
+%{_mandir}/man1/*.1.*
+
+#---------------------------------------------------------------------------
+
 %package -n	%{devname}
 Summary:	Development files for %{name}
 Group:		Development/C
@@ -55,52 +74,75 @@ Provides:	lib%{name} = %{version}-%{release}
 The %{devname} package contains header files for developing
 applications that use MuPDF toolkit.
 
+%files -n %{devname}
+%doc %{_docdir}/mupdf
+%{_libdir}/libmupdf.a
+%{_libdir}/libmupdf-third.a
+%{_includedir}/mupdf
+
+#---------------------------------------------------------------------------
+
 %prep
 %autosetup -n %{name}-%{version}-source -p1
 
-%build
-cd thirdparty
-# Force system libs
-#curl
-#extract
-#freeglut
-#freetype
-#gumbo-parser
-#harfbuzz
-#jbig2dec
-#lcms2
-#leptonica
-#libjpeg
-#mujs
-#openjpeg
-#README
-#tesseract
-#tesseract.txt
-#zlib
-rm -rf curl freeglut freetype harfbuzz jbig2dec lcms2 leptonica libjpeg openjpeg tesseract zlib
-cd ..
+# Force system libs except:
+#	extract
+#	gumbo-parser
+#	mujs
+rm -rf thirdparty/{curl,freeglut,freetype,harfbuzz,jbig2dec,lcms2,leptonica,libjpeg,openjpeg,tesseract,zlib}
 
+%build
 %setup_compile_flags
-%make -j1 verbose=yes USE_SYSTEM_LIBS=yes USE_SYSTEM_LCMS2=yes SYS_LCMS2_CFLAGS="-llcms2mt" USE_SYSTEM_GUMBO=no LD=ld.bfd
+export XCFLAGS="%{optflags} -fPIC"
+%make \
+	build=debug \
+	verbose=yes \
+	USE_SYSTEM_LIBS=yes \
+	USE_SYSTEM_EXTRACT=%{?with_extract:yes}%{!?with_extract:no} \
+	USE_SYSTEM_GUMBO=%{?with_gumbo-parser:yes}%{!?with_gumbo-parser:no} \
+	USE_SYSTEM_JPEGXR=%{?with_jpegxr:yes}%{!?with_jpegxr:no} \
+	USE_SYSTEM_LCMS2=%{?with_lcms2:yes}%{!?with_lcms2:no} \
+	USE_SYSTEM_MUJS=%{?with_mujs:yes}%{!?with_mujs:no} \
+	SYS_LCMS2_CFLAGS="-llcms2mt" \
+	LD=ld.bfd
 
 %install
-%make_install prefix=%{_prefix} libdir=%{_libdir} USE_SYSTEM_LIBS=yes USE_SYSTEM_LCMS2=yes USE_SYSTEM_GUMBO=no LD=ld.bfd
+%make_install \
+	prefix=%{_prefix} \
+	libdir=%{_libdir} \
+	build=debug \
+	verbose=yes \
+	USE_SYSTEM_LIBS=yes \
+	USE_SYSTEM_EXTRACT=%{?with_extract:yes}%{!?with_extract:no} \
+	USE_SYSTEM_GUMBO=%{?with_gumbo-parser:yes}%{!?with_gumbo-parser:no} \
+	USE_SYSTEM_JPEGXR=%{?with_jpegxr:yes}%{!?with_jpegxr:no} \
+	USE_SYSTEM_LCMS2=%{?with_lcms2:yes}%{!?with_lcms2:no} \
+	USE_SYSTEM_MUJS=%{?with_mujs:yes}%{!?with_mujs:no} \
+	SYS_LCMS2_CFLAGS="-llcms2mt" \
+	LD=ld.bfd
 
-desktop-file-install \
-	 --dir=%{buildroot}%{_datadir}/applications/ %{SOURCE10}
+# icons
+for d in 16 32 48 64 72 128 256
+do
+	install -dm 0755 %{buildroot}%{_iconsdir}/hicolor/${d}x${d}/apps/
+	convert -background none -size "${d}x${d}" docs/logo/mupdf-logo.svg \
+		%{buildroot}%{_iconsdir}/hicolor/${d}x${d}/apps/%{name}.png
+	cp -a %{buildroot}%{_iconsdir}/hicolor/${d}x${d}/apps/%{name}.png \
+		%{buildroot}%{_iconsdir}/hicolor/${d}x${d}/apps/%{name}-gl.png
+done
+install -dm 0755 %{buildroot}%{_datadir}/pixmaps/
+convert -size 32x32 docs/logo/mupdf-logo.svg %{buildroot}%{_datadir}/pixmaps/%{name}.xpm
+cp -a %{buildroot}%{_datadir}/pixmaps/%{name}.xpm %{buildroot}%{_datadir}/pixmaps/%{name}-gl.xpm
+install -dm 0755 %{buildroot}%{_iconsdir}/hicolor/scalable/apps
+install -pm 0644 docs/logo/mupdf-logo.svg %{buildroot}%{_iconsdir}/hicolor/scalable/apps/%{name}.svg
+install -pm 0644 docs/logo/mupdf-logo.svg %{buildroot}%{_iconsdir}/hicolor/scalable/apps/%{name}-gl.svg
 
-%files
-%doc COPYING README
-%{_bindir}/mutool
-%{_bindir}/muraster
-%{_bindir}/mupdf-x11
-%{_bindir}/mupdf-x11-curl
-%{_bindir}/mupdf-gl
-%{_mandir}/man1/*
-%{_datadir}/applications/%{name}.desktop
+# .desktop(s)
+desktop-file-install --dir=%{buildroot}%{_datadir}/applications/ %{SOURCE10}
+desktop-file-install --dir=%{buildroot}%{_datadir}/applications/ %{SOURCE11}
+
+# add symlink for mupdf
+pushd %{buildroot}/%{_bindir}
+ln -s %{name}-x11 %{name}
+popd
 
-%files -n %{devname}
-%{_libdir}/libmupdf.a
-%{_libdir}/libmupdf-third.a
-%{_includedir}/mupdf
-%doc %{_docdir}/mupdf
Not Available

benbullard79 [@T] cox.netNo Comment.292d 17hrs
benbullard79 [@T] cox.netNo Comment.292d 17hrs