Browse Source

mupdf update to 1.1.6.1

Signed-off-by: guibuilder_pel7x64builder0 <guibuilder@powerel.org>
master
guibuilder_pel7x64builder0 5 years ago
parent
commit
26d5309143
  1. 42
      SOURCES/0001-fix-build-on-big-endian.patch
  2. 10
      SOURCES/mupdf-gl.desktop
  3. 11
      SOURCES/mupdf.desktop
  4. 106
      SPECS/mupdf.spec

42
SOURCES/0001-fix-build-on-big-endian.patch

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
From 5fb79e6ccb805b3d94c8bb8eb0990d9944ae7602 Mon Sep 17 00:00:00 2001
Message-Id: <5fb79e6ccb805b3d94c8bb8eb0990d9944ae7602.1528041417.git.mjg@fedoraproject.org>
From ea2fba125c79be72d339b49aa83bde88103ce68c Mon Sep 17 00:00:00 2001
Message-Id: <ea2fba125c79be72d339b49aa83bde88103ce68c.1556708736.git.mjg@fedoraproject.org>
From: Michael J Gruber <mjg@fedoraproject.org>
Date: Sun, 3 Jun 2018 17:55:46 +0200
Subject: [PATCH] fix build on big endian
@ -13,11 +13,11 @@ again. @@ -13,11 +13,11 @@ again.

Signed-off-by: Michael J Gruber <mjg@fedoraproject.org>
---
src/cmsmd5.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
src/cmsmd5.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/cmsmd5.c b/src/cmsmd5.c
index 4b8f7f9..dd0925a 100644
index d3017ab..75caacb 100644
--- a/src/cmsmd5.c
+++ b/src/cmsmd5.c
@@ -29,7 +29,7 @@
@ -38,7 +38,7 @@ index 4b8f7f9..dd0925a 100644 @@ -38,7 +38,7 @@ index 4b8f7f9..dd0925a 100644
#endif
@@ -172,7 +172,7 @@ cmsHANDLE MD5alloc(cmsContext ContextID)
@@ -169,7 +169,7 @@ cmsHANDLE MD5alloc(cmsContext ContextID)
static
@ -47,7 +47,7 @@ index 4b8f7f9..dd0925a 100644 @@ -47,7 +47,7 @@ index 4b8f7f9..dd0925a 100644
{
_cmsMD5* ctx = (_cmsMD5*) Handle;
cmsUInt32Number t;
@@ -196,7 +196,7 @@ void MD5add(cmsHANDLE Handle, cmsUInt8Number* buf, cmsUInt32Number len)
@@ -193,7 +193,7 @@ void MD5add(cmsHANDLE Handle, cmsUInt8Number* buf, cmsUInt32Number len)
}
memmove(p, buf, t);
@ -56,7 +56,7 @@ index 4b8f7f9..dd0925a 100644 @@ -56,7 +56,7 @@ index 4b8f7f9..dd0925a 100644
MD5_Transform(ctx->buf, (cmsUInt32Number *) ctx->in);
buf += t;
@@ -205,7 +205,7 @@ void MD5add(cmsHANDLE Handle, cmsUInt8Number* buf, cmsUInt32Number len)
@@ -202,7 +202,7 @@ void MD5add(cmsHANDLE Handle, cmsUInt8Number* buf, cmsUInt32Number len)
while (len >= 64) {
memmove(ctx->in, buf, 64);
@ -65,16 +65,7 @@ index 4b8f7f9..dd0925a 100644 @@ -65,16 +65,7 @@ index 4b8f7f9..dd0925a 100644
MD5_Transform(ctx->buf, (cmsUInt32Number *) ctx->in);
buf += 64;
len -= 64;
@@ -216,7 +216,7 @@ void MD5add(cmsHANDLE Handle, cmsUInt8Number* buf, cmsUInt32Number len)
// Destroy the object and return the checksum
static
-void MD5finish(cmsProfileID* ProfileID, cmsHANDLE Handle)
+void MD5finish(cmsContext ContextID, cmsProfileID* ProfileID, cmsHANDLE Handle)
{
_cmsMD5* ctx = (_cmsMD5*) Handle;
cmsUInt32Number count;
@@ -232,21 +232,21 @@ void MD5finish(cmsProfileID* ProfileID, cmsHANDLE Handle)
@@ -229,21 +229,21 @@ void MD5finish(cmsContext ContextID, cmsProfileID* ProfileID, cmsHANDLE Handle)
if (count < 8) {
memset(p, 0, count);
@ -98,8 +89,8 @@ index 4b8f7f9..dd0925a 100644 @@ -98,8 +89,8 @@ index 4b8f7f9..dd0925a 100644
+ byteReverse(ContextID, (cmsUInt8Number *) ctx->buf, 4);
memmove(ProfileID ->ID8, ctx->buf, 16);
_cmsFree(ctx ->ContextID, ctx);
@@ -291,7 +291,7 @@ cmsBool CMSEXPORT cmsMD5computeID(cmsContext ContextID, cmsHPROFILE hProfile)
_cmsFree(ContextID, ctx);
@@ -288,7 +288,7 @@ cmsBool CMSEXPORT cmsMD5computeID(cmsContext ContextID, cmsHPROFILE hProfile)
if (MD5 == NULL) goto Error;
// Add all bytes
@ -108,15 +99,6 @@ index 4b8f7f9..dd0925a 100644 @@ -108,15 +99,6 @@ index 4b8f7f9..dd0925a 100644
// Temp storage is no longer needed
_cmsFree(ContextID, Mem);
@@ -300,7 +300,7 @@ cmsBool CMSEXPORT cmsMD5computeID(cmsContext ContextID, cmsHPROFILE hProfile)
memmove(Icc, &Keep, sizeof(_cmsICCPROFILE));
// And store the ID
- MD5finish(&Icc ->ProfileID, MD5);
+ MD5finish(ContextID, &Icc ->ProfileID, MD5);
return TRUE;
Error:
--
2.18.0.rc0.294.g786209a621
2.21.0.1043.g4a4bfeb487


10
SOURCES/mupdf-gl.desktop

@ -0,0 +1,10 @@ @@ -0,0 +1,10 @@
[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;
MimeType=application/pdf;application/x-pdf;

11
SOURCES/mupdf.desktop

@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
[Desktop Entry]
Name=Mupdf
GenericName=PDF file viewer
Comment=Lightweight PDF file viewer written on portable C
Exec=mupdf-x11 %f
Icon=mupdf
Terminal=false
Type=Application
Categories=Viewer;Graphics;
MimeType=application/pdf;application/x-pdf;
NoDisplay=true

106
SPECS/mupdf.spec

@ -1,28 +1,27 @@ @@ -1,28 +1,27 @@
Name: mupdf
Version: 1.13.0
Release: 8%{?dist}
Version: 1.16.1
Release: 1%{?dist}
Summary: A lightweight PDF viewer and toolkit
Group: Applications/Publishing
License: AGPLv3+
URL: http://mupdf.com/
Source0: http://mupdf.com/downloads/%{name}-%{version}-source.tar.gz
Source0: http://mupdf.com/downloads/archive/%{name}-%{version}-source.tar.gz
Source1: %{name}.desktop
BuildRequires: gcc make binutils desktop-file-utils coreutils
Source2: %{name}-gl.desktop
BuildRequires: gcc make binutils desktop-file-utils coreutils pkgconfig
BuildRequires: openjpeg2-devel jbig2dec-devel desktop-file-utils
BuildRequires: libjpeg-devel freetype-devel libXext-devel curl-devel
BuildRequires: harfbuzz-devel
BuildRequires: harfbuzz-devel openssl-devel mesa-libEGL-devel
BuildRequires: mesa-libGL-devel mesa-libGLU-devel libXi-devel libXrandr-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.9
# We need to build against the Artifex fork of freeglut so that we are unicode safe.
Provides: bundled(freeglut)-devel) = 3.0.0
Patch0: %{name}-1.13-openjpeg.patch
Patch1: 0001-fix-build-on-big-endian.patch
Patch2: 0001-Fix-699271-skip-space-correctly.patch
# https://acidwords.com/posts/2016-07-26-hacking-mupdf-custom-background-colors.html
Patch3: mupdf-inverted-colors.patch
Provides: bundled(freeglut-devel) = 3.0.0
# 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.0.5
Patch0: 0001-fix-build-on-big-endian.patch

%description
MuPDF is a lightweight PDF viewer and toolkit written in portable C.
@ -41,7 +40,6 @@ searchable text, and rendering pages to image files is provided. @@ -41,7 +40,6 @@ searchable text, and rendering pages to image files is provided.

%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Provides: %{name}-static = %{version}-%{release}

@ -51,44 +49,49 @@ applications that use mupdf and static libraries @@ -51,44 +49,49 @@ applications that use mupdf and static libraries

%prep
%setup -q -n %{name}-%{version}-source
for d in $(ls thirdparty | grep -v -e freeglut -e lcms2)
for d in $(ls thirdparty | grep -v -e freeglut -e lcms2 -e mujs)
do
rm -rf thirdparty/$d
done
%patch0 -p1
%patch1 -p1 -d thirdparty/lcms2
%patch2 -p1
%patch3 -p1
%patch0 -p1 -d thirdparty/lcms2
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 frok
USE_SYSTEM_CURL := yes
"

%build
export XCFLAGS="%{optflags} -fPIC -DJBIG_NO_MEMENTO -DTOFU -DTOFU_CJK"

make %{?_smp_mflags} build=debug verbose=yes
%install
make DESTDIR=%{buildroot} install prefix=%{_prefix} libdir=%{_libdir} build=debug verbose=yes HAVE_GLUT=yes
make DESTDIR=%{buildroot} install prefix=%{_prefix} libdir=%{_libdir} build=debug verbose=yes
## 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}


%post
update-desktop-database &> /dev/null || :

%postun
update-desktop-database &> /dev/null || :

%files
%license COPYING
%doc README CHANGES docs/*
%{_bindir}/*
%{_datadir}/applications/mupdf.desktop
%{_datadir}/applications/mupdf*.desktop
%{_datadir}/icons/hicolor/*/apps/*
%{_mandir}/man1/*.1.gz

@ -97,6 +100,55 @@ update-desktop-database &> /dev/null || : @@ -97,6 +100,55 @@ update-desktop-database &> /dev/null || :
%{_libdir}/lib%{name}*.a

%changelog
* Fri Aug 16 2019 Michael J Gruber <mjg@fedoraproject.org> - 1.16.1-1
- rebase to 1.16.1

* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.15.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Tue May 07 2019 Michael J Gruber <mjg@fedoraproject.org> - 1.15.0-1
- rebase to 1.15.0

* Mon Apr 29 2019 Michael J Gruber <mjg@fedoraproject.org> - 1.15rc1-1
- rc1 test

* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.14.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Thu Nov 15 2018 Michael J Gruber <mjg@fedoraproject.org> - 1.14.0-7
- work around missing mesa EGl dependency

* Thu Nov 15 2018 Michael J Gruber <mjg@fedoraproject.org> - 1.14.0-6
- signature handling fix needs more patches than claimed

* Thu Nov 15 2018 Michael J Gruber <mjg@fedoraproject.org> - 1.14.0-5
- fix signature handling

* Thu Nov 15 2018 Michael J Gruber <mjg@fedoraproject.org> - 1.14.0-4
- bz #1644444 #1644445

* Thu Nov 15 2018 Michael J Gruber <mjg@fedoraproject.org> - 1.14.0-3
- bz #1626481 #1626484

* Thu Nov 15 2018 Michael J Gruber <mjg@fedoraproject.org> - 1.14.0-2
- bz #1626483 #1626484

* Thu Nov 15 2018 Michael J Gruber <mjg@fedoraproject.org> - 1.14.0-1
- rebase to 1.14.0

* Mon Oct 01 2018 Michael J Gruber <mjg@fedoraproject.org> - 1.14rc1-3
- mupdf-gl desktop entry

* Mon Oct 01 2018 Michael J Gruber <mjg@fedoraproject.org> - 1.14rc1-2
- enable libcrypto

* Wed Sep 26 2018 Michael J Gruber <mjg@fedoraproject.org> - 1.14rc1-1
- rc test
- adjust to new build system setup

* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.13.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Sun Jun 10 2018 Michael J Gruber <mjg@fedoraproject.org> - 1.13.0-8
- CVE-2018-10289 (rh bz #1573050) (gs bz #699271)


Loading…
Cancel
Save