Compare commits

...

50 Commits

Author SHA1 Message Date
Fedora Release Engineering
51a10479a1 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-18 18:56:45 +00:00
Michael J Gruber
92788bb368 rebase to 1.24.5 (rhbz#2290729)
- various bugfixes all across the board
2024-07-10 11:58:58 +02:00
Michael J Gruber
e64cf232b8 Create stable wheel dirs during build
We always create stable dirs in the package, but during build we picked
up the autogenerated version which is %{version} amended by a time
stamp. This is unstable (not nice) and works 23/7 only because of how
upstream tries to make this PEP 440 proof. Consequently, we get "random"
build failures.

Make it %{version} which is stable and foolproof.
2024-06-20 15:50:53 +02:00
Sandro Mani
586b6b4497 Rebuild for tesseract-5.4.1 2024-06-13 22:39:24 +02:00
Python Maint
a0f0307827 Rebuilt for Python 3.13 2024-06-09 13:43:25 +02:00
Michael J Gruber
203565db57 Shut off Artifex' suggestion to complain to distribution managers.
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.
2024-06-06 14:37:32 +02:00
Michael J Gruber
3fe290308b rebase to 1.24.2
- Fix dashing of lines that move out of clip.
- Fix sanitize filter behaviour for empty clip paths.
- Fix errors when filtering type3 font.
2024-05-29 13:41:43 +02:00
Yaakov Selkowitz
f8f4f11dbf Fix flatpak build
The Makfile sets pydir based on sysconfig platlib, which does
not match %python3_sitearch when building for flatpaks in /app.
2024-04-15 23:11:32 -04:00
Michael J Gruber
1b21376ab8 rebase to 1.24.1 (rhbz#2272640)
- fix text movement on sanitisation
2024-04-03 16:06:42 +02:00
Michael J Gruber
e6ad02431f fix FTBFS of (at least) qpdfview 2024-03-22 10:40:41 +01:00
Michael J Gruber
3997f669ec rebase to 1.24.0 (rhbz#2270341)
- support more formats (office xml, text, gzipped)
- `mutool bake` command
- redaction options for line art and images
- Art, Bleed, Media, and Trim boxes for PDF page sizes
- various fixes and improvements

In addition, all patches are upstreamed!
2024-03-20 12:59:41 +01:00
Tom Stellard
7fd9be4f47 Fix build with llvm18
MJG: deal with both llvm17 and llvm18 cursor kinds
2024-03-19 11:49:39 +01:00
Michael J Gruber
5d42051044 avoid multiple rebuilds
c++ and python install targets rebuild unconditionally. Avoid this by
patching out the make dependencies. This *requires making c++ and python
in %build* (as we do).
2024-03-19 09:42:53 +01:00
Michael J Gruber
5a16f4829d reduce jbig2dec requirements
jbig2dec checks versions at runtime (lib) against buildtime versions
(headers) and requires an exact match.

It is part of jbig2dec maintenance to coordinate bumps with dependent
packages (in side-tags), so remove extra checks in dependent packages.
2024-03-08 21:14:29 +01:00
Ralf Corsépius
47f70ead1e Rebuild for gumbo-parse-0.12.1 2024-03-01 09:08:13 +01:00
Michael J Gruber
f76d98de93 streamline make invocation
USE_SYSTEM_LIBS implies and enforces most of the other switches, so
strip those defines which would be ignored anyways.

Also, set build type once in user.make to make sure we do not rebuild
during install. (We never did, but who knows ...)
2024-02-20 10:44:38 +01:00
Michael J Gruber
04ffbdbac6 build python bindings 2024-02-20 10:42:13 +01:00
Michael J Gruber
c26739b7fc build C and C++ libraries 2024-02-16 18:24:35 +01:00
Michael J Gruber
8895ace52c Make so executable
to make elf depgen happy on *el at least up to 9.
2024-02-16 15:38:47 +01:00
Michael J Gruber
94de866cf7 rebase to 1.23.10 (rhbz#2257282)
- minor fixes
2024-02-06 21:48:33 +01:00
Michael J Gruber
c0776ae59c switch to shared libraries
The new "rebased" PyMuPDF bindings require shared mupdf libraries rather
than static ones. In addition, this results in smaller executables.

So, now that upstream not only supports but requires shared libraries,
switch to them.

- do not bundle freeglut any more
2024-02-06 20:38:29 +01:00
Michael J Gruber
7d849742b8 rebase to 1.23.9 (rhbz#2257282)
- fixes around redaction feature

still static
2024-02-06 20:38:29 +01:00
Michael J Gruber
22442eed03 rebase to 1.23.8 (rhbz#2257282)
- fixes and adjustments for shared library builds

We still build static for now and will rebase our shared work onto
this one. In particular, we have an official SONAME now, hooray!
2024-02-06 20:38:29 +01:00
Michael J Gruber
176b40a08f set jbig2dec version dependent on fedora version
jbig2dec has a special runtime dependency check which prevents upwards
compatibility. Set the version dependent on a release macro so that we
can build and test easily across releases independent of jbig2dec
versions.
2024-02-06 20:38:23 +01:00
Sandro Mani
ed9990919d Rebuild (tesseract) 2024-01-28 11:33:16 +01:00
Fedora Release Engineering
6591e30e65 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-25 08:23:46 +00:00
Michael J Gruber
edeb7e2334 fix time type on i686 2024-01-19 15:58:06 +01:00
Michael J Gruber
5537d883ed Switch spec to tabs
Tabs are more reliable and common, so switch manual "tabs" (multiple
spaces) to proper tabs.

[skip changelog]
2024-01-06 13:41:21 +01:00
Michael J Gruber
1129d9b8cf rebuild against fixed leptonica 2023-12-27 15:42:53 +01:00
Michael J Gruber
b6cb9a1f3a adjust to changed leptonica lib name
In version 1.8.0, leptonica changed their lib/autotools name from lept
to leptonica for consistency. Adjust for the new name (merge only to
branches with leptonica >= 1.8.0).
2023-12-26 19:36:03 +01:00
Michael J Gruber
b7dac2a662 rebase to 1.23.7 (rhbz#2249851)
- various bug fixes
2023-12-02 17:23:42 +01:00
Michael J Gruber
effcc4c06a rebase to 1.23.5 (rhbz#2243150)
- Use CropBox as origin for fitz space in PDF documents.
- Various fixes.
2023-11-07 13:55:16 +01:00
Michael J Gruber
04d985a25a rebase to 1.23.4 (rhbz#2243150)
- default to use CropBox rather than MediaBox
- minor bugfixes
2023-10-11 11:44:20 +02:00
Sandro Mani
ea4cfc0cda Rebuild (tesseract) 2023-10-07 23:54:14 +02:00
Michael J Gruber
0c0d3fff6a fix mutool draw mask endianness on s390x (rhbz#2241203) 2023-10-01 18:32:46 +02:00
Michael J Gruber
73e8612ae4 rebase to 1.23.3 (rhbz#2233551)
- Support CropBox, TrimBox, BleedBox, and ArtBox in PDF tools and viewers.
- PhotoShop PSD image support.
- mutool poster: Option to split in RTL direction.
- mutool run: changed many methods to match Java and new WASM library.
2023-09-05 16:21:47 +02:00
Fedora Release Engineering
83dbea0a32 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-20 16:05:30 +00:00
Sandro Mani
f44c448663 Rebuild (tesseract) 2023-07-14 12:46:30 +02:00
Michael J Gruber
dcf091aa6b rebase to 1.22.2 (rhbz#2215574)
- Various bugfixes
2023-06-22 14:53:58 +02:00
Michael J Gruber
411196da99 rebase to 1.22.1 (rhbz#2186766)
- Fix redaction of unmasked images.
2023-05-11 20:56:29 +02:00
Michael J Gruber
f30d70d816 rebase to 1.22.0 (rhbz#2186766)
- Adds new command line tools (mutool recolor and trim) and output
  format (JPEG).
- Overall improvements and enhancements.

There are no known incompatibilities with 1.21.
2023-04-15 13:51:25 +02:00
Sandro Mani
acdbd1badc Rebuild (tesseract) 2023-04-06 23:28:23 +02:00
Fedora Release Engineering
59b615c537 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 21:00:38 +00:00
Sandro Mani
57d5651c80 Rebuild (tesseract) 2022-12-23 21:59:57 +01:00
Sandro Mani
dae2ea6f54 Rebuild (leptonica) 2022-12-21 15:42:11 +01:00
Michael J Gruber
15f1cc451a fix png_write_band (rhbz#2154545)
... (gsbz#706227)
2022-12-20 15:14:34 +01:00
Michael J Gruber
4383cdfe1f SPDX migration 2022-12-17 11:42:04 +01:00
Michael J Gruber
910cfdca95 rebase to 1.21.1 (rhbz#2152708) 2022-12-13 11:36:39 +01:00
Michael J Gruber
1bccd68af3 rebase to 1.21.0 (rhbz#2140776) 2022-11-11 13:59:27 +01:00
Michael J Gruber
110373e8d9 rebase to 1.21.0-rc1 2022-10-27 20:48:13 +02:00
5 changed files with 184 additions and 63 deletions

21
.gitignore vendored
View File

@ -28,3 +28,24 @@
/mupdf-1.20.0-rc2-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

@ -0,0 +1,29 @@
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

@ -0,0 +1,28 @@
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,103 +1,129 @@
# 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
Version: 1.20.3
%global upversion 1.20.3
Release: %autorelease
Summary: A lightweight PDF viewer and toolkit
License: AGPLv3+
URL: http://mupdf.com/
Source0: http://mupdf.com/downloads/archive/%{name}-%{upversion}-source.tar.gz
Source1: %{name}.desktop
Source2: %{name}-gl.desktop
BuildRequires: gcc gcc-c++ make binutils desktop-file-utils coreutils pkgconfig
BuildRequires: openjpeg2-devel desktop-file-utils
BuildRequires: libjpeg-devel freetype-devel libXext-devel curl-devel
BuildRequires: harfbuzz-devel openssl-devel mesa-libEGL-devel
BuildRequires: mesa-libGL-devel mesa-libGLU-devel libXi-devel libXrandr-devel
BuildRequires: gumbo-parser-devel leptonica-devel tesseract-devel
BuildRequires: jbig2dec-devel = %{jbig2dec_version}
BuildRequires: jbig2dec-libs = %{jbig2dec_version}
Requires: jbig2dec-libs = %{jbig2dec_version}
Name: mupdf
%global libname libmupdf
Version: 1.24.6
%global pypiname mupdf
# upstream prerelease versions tags need to be translated to Fedorian
%global upversion %{version}
%global soname 24.6
Release: %autorelease
Summary: A lightweight PDF viewer and toolkit
License: AGPL-3.0-or-later
URL: http://mupdf.com/
Source0: http://mupdf.com/downloads/archive/%{name}-%{upversion}-source.tar.gz
Source1: %{name}.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: openjpeg2-devel desktop-file-utils
BuildRequires: libjpeg-devel freetype-devel libXext-devel curl-devel
BuildRequires: harfbuzz-devel openssl-devel mesa-libEGL-devel
BuildRequires: mesa-libGL-devel mesa-libGLU-devel libXi-devel libXrandr-devel
BuildRequires: gumbo-parser-devel leptonica-devel tesseract-devel
BuildRequires: freeglut-devel
BuildRequires: jbig2dec-devel
BuildRequires: swig python3-clang python3-devel
# 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
# to integrate Artifex's changes.
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
Provides: bundled(lcms2-devel) = 2.14~rc1^60.gab4547b
# muPDF needs the muJS sources for the build even if we build against the system
# version so bundling them is the safer choice.
Provides: bundled(mujs-devel) = 1.2.0
Provides: bundled(mujs-devel) = 1.3.3
# muPDF builds only against in-tree extract which is versioned along with ghostpdl.
Provides: bundled(extract) = 9.56.0^4.g10c442d
Provides: bundled(extract) = 10.01.2^1.ged5acb1
%description
MuPDF is a lightweight PDF viewer and toolkit written in portable C.
The renderer in MuPDF is tailored for high quality anti-aliased
graphics. MuPDF renders text with metrics and spacing accurate to
graphics. MuPDF renders text with metrics and spacing accurate to
within fractions of a pixel for the highest fidelity in reproducing
the look of a printed page on screen.
MuPDF has a small footprint. A binary that includes the standard
Roman fonts is only one megabyte. A build with full CJK support
MuPDF has a small footprint. A binary that includes the standard
Roman fonts is only one megabyte. A build with full CJK support
(including an Asian font) is approximately seven megabytes.
MuPDF has support for all non-interactive PDF 1.7 features, and the
toolkit provides a simple API for accessing the internal structures of
the PDF document. Example code for navigating interactive links and
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.
%package devel
Summary: Development files for %{name}
Requires: %{name} = %{version}-%{release}
Provides: %{name}-static = %{version}-%{release}
Summary: C Development files for %{name}
Requires: %{name}-libs%{_isa} = %{version}-%{release}
%description devel
The mupdf-devel package contains header files for developing
applications that use mupdf and static libraries
The mupdf-devel package contains library and header files for developing
C applications that use the mupdf library.
%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
%setup -q -n %{name}-%{upversion}-source
for d in $(ls thirdparty | grep -v -e extract -e freeglut -e lcms2 -e mujs)
%autosetup -p1 -n %{name}-%{upversion}-source
for d in $(ls thirdparty | grep -v -e extract -e lcms2 -e mujs)
do
rm -rf thirdparty/$d
rm -rf thirdparty/$d
done
echo > user.make "\
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_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_SYSTEM_LEPTONICA := yes
USE_SYSTEM_TESSERACT := yes
USE_SYSTEM_LIBS := yes
USE_SYSTEM_MUJS := no # build needs source anyways
USE_TESSERACT := yes
VENV_FLAG :=
build := debug
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
export XCFLAGS="%{optflags} -fPIC -DJBIG_NO_MEMENTO -DTOFU -DTOFU_CJK_EXT"
make %{?_smp_mflags} c++ python
make %{?_smp_mflags} build=debug verbose=yes
%install
make DESTDIR=%{buildroot} install prefix=%{_prefix} libdir=%{_libdir} build=debug verbose=yes
## handle docs on our own
make DESTDIR=%{buildroot} install install-shared-c install-shared-c++ install-shared-python prefix=%{_prefix} libdir=%{_libdir} pydir=%{python3_sitearch} SO_INSTALL_MODE=755
# wheel bundles too much, so build & install with make and generate metadata here:
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}
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1}
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE2}
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-gl.svg
## fix strange permissons
chmod 0644 %{buildroot}%{_libdir}/*.a
find %{buildroot}/%{_mandir} -type f -exec chmod 0644 {} \;
find %{buildroot}/%{_includedir} -type f -exec chmod 0644 {} \;
cd %{buildroot}/%{_bindir} && ln -s %{name}-x11 %{name}
@ -112,7 +138,24 @@ cd %{buildroot}/%{_bindir} && ln -s %{name}-x11 %{name}
%files devel
%{_includedir}/%{name}
%{_libdir}/lib%{name}*.a
%{_libdir}/%{libname}.so
%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
%autochangelog

View File

@ -1 +1 @@
SHA512 (mupdf-1.20.3-source.tar.gz) = ed3fe09971223c500fb85558bb3f8c4a605c82fca3cd2217cdf4758e44bdfe3ef4106c95037d7a8ea536117414e5acbfa14aa736bfb7e33e591050c12c07a0ee
SHA512 (mupdf-1.24.6-source.tar.gz) = 251a347cc98c837070f01abfc9463a16867e22d06a015967e3e6f4a886c2599c0027641fc36e3f6f50602e088fe9338325007988dcf00f935b2a7dde48615020