Compare commits

..

No commits in common. "rawhide" and "f35" have entirely different histories.
rawhide ... f35

5 changed files with 63 additions and 185 deletions

22
.gitignore vendored
View File

@ -27,25 +27,3 @@
/mupdf-1.20.0-rc1-source.tar.gz /mupdf-1.20.0-rc1-source.tar.gz
/mupdf-1.20.0-rc2-source.tar.gz /mupdf-1.20.0-rc2-source.tar.gz
/mupdf-1.20.0-source.tar.gz /mupdf-1.20.0-source.tar.gz
/mupdf-1.20.3-source.tar.gz
/mupdf-1.21.0-rc1-source.tar.gz
/mupdf-1.21.0-source.tar.gz
/mupdf-1.21.1-source.tar.gz
/mupdf-1.22.0-source.tar.gz
/mupdf-1.22.1-source.tar.gz
/mupdf-1.22.2-source.tar.gz
/mupdf-1.23.2-source.tar.gz
/mupdf-1.23.3-source.tar.gz
/mupdf-1.23.4-source.tar.gz
/mupdf-1.23.5-source.tar.gz
/mupdf-1.23.7-source.tar.gz
/mupdf-1.23.8-source.tar.gz
/mupdf-1.23.9-source.tar.gz
/mupdf-1.23.10-source.tar.gz
/mupdf-1.24.0-source.tar.gz
/mupdf-1.24.1-source.tar.gz
/mupdf-1.24.2-source.tar.gz
/mupdf-1.24.3-source.tar.gz
/mupdf-1.24.4-source.tar.gz
/mupdf-1.24.5-source.tar.gz
/mupdf-1.24.6-source.tar.gz

View File

@ -1,29 +0,0 @@
From 2fdf3e160fc2f30324d1ce9eaceedd3f0ea158bd Mon Sep 17 00:00:00 2001
Message-ID: <2fdf3e160fc2f30324d1ce9eaceedd3f0ea158bd.1717676942.git.mjg@fedoraproject.org>
From: Michael J Gruber <mjg@fedoraproject.org>
Date: Thu, 6 Jun 2024 14:27:12 +0200
Subject: [PATCH] Do not complain to your friendly local distribution manager
Artifex decided to rely on local forks for added functionality, so do
not complain to the distribution manager about lack of functionality in
unbundled builds.
---
platform/gl/gl-ui.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/platform/gl/gl-ui.c b/platform/gl/gl-ui.c
index d3dfb1de6..c0d9d72d7 100644
--- a/platform/gl/gl-ui.c
+++ b/platform/gl/gl-ui.c
@@ -449,8 +449,6 @@ void ui_init(int w, int h, const char *title)
#if defined(FREEGLUT) && (GLUT_API_VERSION >= 6)
glutKeyboardExtFunc(on_keyboard);
#else
- fz_warn(ctx, "This version of MuPDF has been built WITHOUT clipboard or unicode input support!");
- fz_warn(ctx, "Please file a complaint with your friendly local distribution manager.");
glutKeyboardFunc(on_keyboard);
#endif
glutSpecialFunc(on_special);
--
2.45.2.607.ge77ae43106

View File

@ -1,28 +0,0 @@
From e3423caf5820d97970068a243427c2bdc576fe26 Mon Sep 17 00:00:00 2001
Message-ID: <e3423caf5820d97970068a243427c2bdc576fe26.1710968212.git.mjg@fedoraproject.org>
From: Michael J Gruber <mjg@fedoraproject.org>
Date: Wed, 20 Mar 2024 21:55:23 +0100
Subject: [PATCH] add missing header for fz_archive
2eb4c51a4 ("Reduce document handler open functions to a single one.",
2024-01-08) introduced an additional fz_archive argument. Include the
header which defines the argument type.
---
include/mupdf/fitz/document.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/mupdf/fitz/document.h b/include/mupdf/fitz/document.h
index a23340768..a732fa5d8 100644
--- a/include/mupdf/fitz/document.h
+++ b/include/mupdf/fitz/document.h
@@ -32,6 +32,7 @@
#include "mupdf/fitz/link.h"
#include "mupdf/fitz/outline.h"
#include "mupdf/fitz/separation.h"
+#include "mupdf/fitz/archive.h"
typedef struct fz_document_handler fz_document_handler;
typedef struct fz_page fz_page;
--
2.44.0.458.ge6d7a2c32c

View File

@ -1,41 +1,38 @@
# Desired jbig2dec header files and library version
# Apparantly, jbig2dec complains even about newer versions.
# Please update if needed.
%global jbig2dec_version 0.19
Name: mupdf Name: mupdf
%global libname libmupdf Version: 1.20.0
Version: 1.24.6 %global upversion 1.20.0
%global pypiname mupdf
# upstream prerelease versions tags need to be translated to Fedorian
%global upversion %{version}
%global soname 24.6
Release: %autorelease Release: %autorelease
Summary: A lightweight PDF viewer and toolkit Summary: A lightweight PDF viewer and toolkit
License: AGPL-3.0-or-later License: AGPLv3+
URL: http://mupdf.com/ URL: http://mupdf.com/
Source0: http://mupdf.com/downloads/archive/%{name}-%{upversion}-source.tar.gz Source0: http://mupdf.com/downloads/archive/%{name}-%{upversion}-source.tar.gz
Source1: %{name}.desktop Source1: %{name}.desktop
Source2: %{name}-gl.desktop Source2: %{name}-gl.desktop
# Upstreamable patches:
# https://bugs.ghostscript.com/show_bug.cgi?id=707682
Patch: 0001-add-missing-header-for-fz_archive.patch
# Fedora specific patches:
# Do not bug me if Artifex relies on local fork
Patch: 0001-Do-not-complain-to-your-friendly-local-distribution-.patch
BuildRequires: gcc gcc-c++ make binutils desktop-file-utils coreutils pkgconfig BuildRequires: gcc gcc-c++ make binutils desktop-file-utils coreutils pkgconfig
BuildRequires: openjpeg2-devel desktop-file-utils BuildRequires: openjpeg2-devel desktop-file-utils
BuildRequires: libjpeg-devel freetype-devel libXext-devel curl-devel BuildRequires: libjpeg-devel freetype-devel libXext-devel curl-devel
BuildRequires: harfbuzz-devel openssl-devel mesa-libEGL-devel BuildRequires: harfbuzz-devel openssl-devel mesa-libEGL-devel
BuildRequires: mesa-libGL-devel mesa-libGLU-devel libXi-devel libXrandr-devel BuildRequires: mesa-libGL-devel mesa-libGLU-devel libXi-devel libXrandr-devel
BuildRequires: gumbo-parser-devel leptonica-devel tesseract-devel BuildRequires: gumbo-parser-devel leptonica-devel tesseract-devel
BuildRequires: freeglut-devel BuildRequires: jbig2dec-devel = %{jbig2dec_version}
BuildRequires: jbig2dec-devel BuildRequires: jbig2dec-libs = %{jbig2dec_version}
BuildRequires: swig python3-clang python3-devel Requires: jbig2dec-libs = %{jbig2dec_version}
# We need to build against the Artifex fork of lcms2 so that we are thread safe # We need to build against the Artifex fork of lcms2 so that we are thread safe
# (see bug #1553915). Artifex make sure to rebase against upstream, who refuse # (see bug #1553915). Artifex make sure to rebase against upstream, who refuse
# to integrate Artifex's changes. # to integrate Artifex's changes.
Provides: bundled(lcms2-devel) = 2.14~rc1^60.gab4547b Provides: bundled(lcms2-devel) = 2.12^85.g558b336
# We need to build against the Artifex fork of freeglut so that we are unicode safe.
Provides: bundled(freeglut-devel) = 3.0.0^11.g13ae6aa
# muPDF needs the muJS sources for the build even if we build against the system # muPDF needs the muJS sources for the build even if we build against the system
# version so bundling them is the safer choice. # version so bundling them is the safer choice.
Provides: bundled(mujs-devel) = 1.3.3 Provides: bundled(mujs-devel) = 1.2.0
# muPDF builds only against in-tree extract which is versioned along with ghostpdl. # muPDF builds only against in-tree extract which is versioned along with ghostpdl.
Provides: bundled(extract) = 10.01.2^1.ged5acb1 Provides: bundled(extract) = 9.56.0~rc1^4.g10c442d
%description %description
MuPDF is a lightweight PDF viewer and toolkit written in portable C. MuPDF is a lightweight PDF viewer and toolkit written in portable C.
@ -53,77 +50,54 @@ bookmarks, encrypting PDF files, extracting fonts, images, and
searchable text, and rendering pages to image files is provided. searchable text, and rendering pages to image files is provided.
%package devel %package devel
Summary: C Development files for %{name} Summary: Development files for %{name}
Requires: %{name}-libs%{_isa} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
Provides: %{name}-static = %{version}-%{release}
%description devel %description devel
The mupdf-devel package contains library and header files for developing The mupdf-devel package contains header files for developing
C applications that use the mupdf library. applications that use mupdf and static libraries
%package libs
Summary: C Library files for %{name}
%description libs
The mupdf-libs package contains the mupdf C library files.
%package cpp-devel
Summary: C++ Development files for %{name}
Requires: %{name}-cpp-libs%{_isa} = %{version}-%{release}
%description cpp-devel
The mupdf-cpp-devel package contains library and header files for developing
C++ applications that use the mupdf library.
%package cpp-libs
Summary: C++ Library files for %{name}
%description cpp-libs
The mupdf-cpp-libs package contains the mupdf C++ library files.
%package -n python3-%{pypiname}
Summary: Python bindings for %{name}
%description -n python3-%{pypiname}
The python3-%{pypiname} package contains low level mupdf python bindings.
%prep %prep
%autosetup -p1 -n %{name}-%{upversion}-source %setup -q -n %{name}-%{upversion}-source
for d in $(ls thirdparty | grep -v -e extract -e lcms2 -e mujs) for d in $(ls thirdparty | grep -v -e extract -e freeglut -e lcms2 -e mujs)
do do
rm -rf thirdparty/$d rm -rf thirdparty/$d
done done
echo > user.make "\ echo > user.make "\
USE_SYSTEM_LIBS := yes USE_SYSTEM_FREETYPE := yes
USE_SYSTEM_HARFBUZZ := yes
USE_SYSTEM_JBIG2DEC := yes
USE_SYSTEM_JPEGXR := yes # not used without HAVE_JPEGXR
USE_SYSTEM_LCMS2 := no # need lcms2-art fork
USE_SYSTEM_LIBJPEG := yes
USE_SYSTEM_MUJS := no # build needs source anyways USE_SYSTEM_MUJS := no # build needs source anyways
USE_SYSTEM_OPENJPEG := yes
USE_SYSTEM_ZLIB := yes
USE_SYSTEM_GLUT := no # need freeglut2-art fork
USE_SYSTEM_CURL := yes
USE_SYSTEM_GUMBO := yes
USE_TESSERACT := yes USE_TESSERACT := yes
VENV_FLAG := USE_SYSTEM_LEPTONICA := yes
build := debug USE_SYSTEM_TESSERACT := yes
shared := yes
verbose := yes
" "
# c++ and python install targets rebuild unconditionally. Avoid multiple rebuilds:
sed -i -e '/^install-shared-c++:/s/ c++//' Makefile
sed -i -e '/^install-shared-python:/s/ python//' Makefile
%build %build
export XCFLAGS="%{optflags} -fPIC -DJBIG_NO_MEMENTO -DTOFU -DTOFU_CJK_EXT" export XCFLAGS="%{optflags} -fPIC -DJBIG_NO_MEMENTO -DTOFU -DTOFU_CJK_EXT"
make %{?_smp_mflags} c++ python
make %{?_smp_mflags} build=debug verbose=yes
%install %install
make DESTDIR=%{buildroot} install install-shared-c install-shared-c++ install-shared-python prefix=%{_prefix} libdir=%{_libdir} pydir=%{python3_sitearch} SO_INSTALL_MODE=755 make DESTDIR=%{buildroot} install prefix=%{_prefix} libdir=%{_libdir} build=debug verbose=yes
# wheel bundles too much, so build & install with make and generate metadata here: ## handle docs on our own
MUPDF_SETUP_VERSION=%{version} %{__python3} setup.py dist_info
mkdir -p %{buildroot}/%{python3_sitearch}/%{pypiname}-%{version}.dist-info
install -p -m644 mupdf-*.dist-info/METADATA/PKG-INFO %{buildroot}/%{python3_sitearch}/%{pypiname}-%{version}.dist-info/METADATA
# handle docs on our own
rm -rf %{buildroot}/%{_docdir} rm -rf %{buildroot}/%{_docdir}
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1} desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1}
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE2} desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE2}
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/scalable/apps mkdir -p %{buildroot}%{_datadir}/icons/hicolor/scalable/apps
install -p -m644 docs/logo/mupdf-logo.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/mupdf.svg install -p -m644 docs/logo/mupdf-logo.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/mupdf.svg
install -p -m644 docs/logo/mupdf-logo.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/mupdf-gl.svg install -p -m644 docs/logo/mupdf-logo.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/mupdf-gl.svg
## fix strange permissons
chmod 0644 %{buildroot}%{_libdir}/*.a
find %{buildroot}/%{_mandir} -type f -exec chmod 0644 {} \; find %{buildroot}/%{_mandir} -type f -exec chmod 0644 {} \;
find %{buildroot}/%{_includedir} -type f -exec chmod 0644 {} \; find %{buildroot}/%{_includedir} -type f -exec chmod 0644 {} \;
cd %{buildroot}/%{_bindir} && ln -s %{name}-x11 %{name} cd %{buildroot}/%{_bindir} && ln -s %{name}-x11 %{name}
@ -138,24 +112,7 @@ cd %{buildroot}/%{_bindir} && ln -s %{name}-x11 %{name}
%files devel %files devel
%{_includedir}/%{name} %{_includedir}/%{name}
%{_libdir}/%{libname}.so %{_libdir}/lib%{name}*.a
%files libs
%license COPYING
%{_libdir}/%{libname}.so.%{soname}
%files cpp-devel
%{_includedir}/%{name}
%{_libdir}/%{libname}cpp.so
%files cpp-libs
%license COPYING
%{_libdir}/%{libname}cpp.so.%{soname}
%files -n python3-%{pypiname}
%license COPYING
%{python3_sitearch}/%{pypiname}/
%{python3_sitearch}/%{pypiname}-%{version}.dist-info/
%changelog %changelog
%autochangelog %autochangelog

View File

@ -1 +1 @@
SHA512 (mupdf-1.24.6-source.tar.gz) = 251a347cc98c837070f01abfc9463a16867e22d06a015967e3e6f4a886c2599c0027641fc36e3f6f50602e088fe9338325007988dcf00f935b2a7dde48615020 SHA512 (mupdf-1.20.0-source.tar.gz) = 6837299c589ece9cc443b027433fa3eee545f5155aeb6359b7a43da239d2e99195e9ae3950ddec6cb6ebae77bc877573c6f89a90754c58723d7e87d9739ed1f4