New release (#1087287)
This commit is contained in:
parent
fae027ba62
commit
4dc10c710f
|
@ -4,3 +4,4 @@
|
||||||
/mupdf-0.9-source.tar.gz
|
/mupdf-0.9-source.tar.gz
|
||||||
/mupdf-1.0-source.tar.gz
|
/mupdf-1.0-source.tar.gz
|
||||||
/mupdf-1.1-source.tar.gz
|
/mupdf-1.1-source.tar.gz
|
||||||
|
/mupdf-1.4-source.tar.gz
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
--- a/fitz/image_jpx.c
|
|
||||||
+++ b/fitz/image_jpx.c
|
|
||||||
@@ -50,8 +50,11 @@ fz_load_jpx(fz_context *ctx, unsigned char *data, int size, fz_colorspace *defcs
|
|
||||||
evtmgr.info_handler = fz_opj_info_callback;
|
|
||||||
|
|
||||||
opj_set_default_decoder_parameters(¶ms);
|
|
||||||
+
|
|
||||||
+#ifdef OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG
|
|
||||||
if (indexed)
|
|
||||||
params.flags |= OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG;
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
info = opj_create_decompress(format);
|
|
||||||
opj_set_event_mgr((opj_common_ptr)info, &evtmgr, ctx);
|
|
|
@ -1,102 +0,0 @@
|
||||||
diff --git a/xps/xps_common.c b/xps/xps_common.c
|
|
||||||
index eddef1b..31c2a5e 100644
|
|
||||||
--- a/xps/xps_common.c
|
|
||||||
+++ b/xps/xps_common.c
|
|
||||||
@@ -89,7 +89,7 @@ xps_begin_opacity(xps_document *doc, fz_matrix ctm, fz_rect area,
|
|
||||||
if (scb_color_att)
|
|
||||||
{
|
|
||||||
fz_colorspace *colorspace;
|
|
||||||
- float samples[32];
|
|
||||||
+ float samples[FZ_MAX_COLORS];
|
|
||||||
xps_parse_color(doc, base_uri, scb_color_att, &colorspace, samples);
|
|
||||||
opacity = opacity * samples[0];
|
|
||||||
}
|
|
||||||
@@ -208,12 +208,13 @@ void
|
|
||||||
xps_parse_color(xps_document *doc, char *base_uri, char *string,
|
|
||||||
fz_colorspace **csp, float *samples)
|
|
||||||
{
|
|
||||||
+ fz_context *ctx = doc->ctx;
|
|
||||||
char *p;
|
|
||||||
int i, n;
|
|
||||||
char buf[1024];
|
|
||||||
char *profile;
|
|
||||||
|
|
||||||
- *csp = fz_device_rgb;
|
|
||||||
+ *csp = fz_device_rgb;
|
|
||||||
|
|
||||||
samples[0] = 1;
|
|
||||||
samples[1] = 0;
|
|
||||||
@@ -259,7 +260,7 @@ xps_parse_color(xps_document *doc, char *base_uri, char *string,
|
|
||||||
profile = strchr(buf, ' ');
|
|
||||||
if (!profile)
|
|
||||||
{
|
|
||||||
- fz_warn(doc->ctx, "cannot find icc profile uri in '%s'", string);
|
|
||||||
+ fz_warn(ctx, "cannot find icc profile uri in '%s'", string);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -267,15 +268,20 @@ xps_parse_color(xps_document *doc, char *base_uri, char *string,
|
|
||||||
p = strchr(profile, ' ');
|
|
||||||
if (!p)
|
|
||||||
{
|
|
||||||
- fz_warn(doc->ctx, "cannot find component values in '%s'", profile);
|
|
||||||
+ fz_warn(ctx, "cannot find component values in '%s'", profile);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
*p++ = 0;
|
|
||||||
n = count_commas(p) + 1;
|
|
||||||
+ if (n > FZ_MAX_COLORS)
|
|
||||||
+ {
|
|
||||||
+ fz_warn(ctx, "ignoring %d color components (max %d allowed)", n - FZ_MAX_COLORS, FZ_MAX_COLORS);
|
|
||||||
+ n = FZ_MAX_COLORS;
|
|
||||||
+ }
|
|
||||||
i = 0;
|
|
||||||
- while (i < n)
|
|
||||||
- {
|
|
||||||
+ while (i < n)
|
|
||||||
+ {
|
|
||||||
samples[i++] = fz_atof(p);
|
|
||||||
p = strchr(p, ',');
|
|
||||||
if (!p)
|
|
||||||
@@ -292,10 +298,10 @@ xps_parse_color(xps_document *doc, char *base_uri, char *string,
|
|
||||||
/* TODO: load ICC profile */
|
|
||||||
switch (n)
|
|
||||||
{
|
|
||||||
- case 2: *csp = fz_device_gray; break;
|
|
||||||
- case 4: *csp = fz_device_rgb; break;
|
|
||||||
- case 5: *csp = fz_device_cmyk; break;
|
|
||||||
- default: *csp = fz_device_gray; break;
|
|
||||||
+ case 2: *csp = fz_device_gray; break;
|
|
||||||
+ case 4: *csp = fz_device_rgb; break;
|
|
||||||
+ case 5: *csp = fz_device_cmyk; break;
|
|
||||||
+ default: *csp = fz_device_gray; break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
diff --git a/xps/xps_glyphs.c b/xps/xps_glyphs.c
|
|
||||||
index 6b26201..5a4faf0 100644
|
|
||||||
--- a/xps/xps_glyphs.c
|
|
||||||
+++ b/xps/xps_glyphs.c
|
|
||||||
@@ -587,7 +587,7 @@ xps_parse_glyphs(xps_document *doc, fz_matrix ctm,
|
|
||||||
|
|
||||||
if (fill_att)
|
|
||||||
{
|
|
||||||
- float samples[32];
|
|
||||||
+ float samples[FZ_MAX_COLORS];
|
|
||||||
fz_colorspace *colorspace;
|
|
||||||
|
|
||||||
xps_parse_color(doc, base_uri, fill_att, &colorspace, samples);
|
|
||||||
diff --git a/xps/xps_path.c b/xps/xps_path.c
|
|
||||||
index 8650fbb..84fe14f 100644
|
|
||||||
--- a/xps/xps_path.c
|
|
||||||
+++ b/xps/xps_path.c
|
|
||||||
@@ -825,7 +825,7 @@ xps_parse_path(xps_document *doc, fz_matrix ctm, char *base_uri, xps_resource *d
|
|
||||||
|
|
||||||
fz_stroke_state *stroke = NULL;
|
|
||||||
fz_matrix transform;
|
|
||||||
- float samples[32];
|
|
||||||
+ float samples[FZ_MAX_COLORS];
|
|
||||||
fz_colorspace *colorspace;
|
|
||||||
fz_path *path;
|
|
||||||
fz_path *stroke_path = NULL;
|
|
45
mupdf.spec
45
mupdf.spec
|
@ -1,16 +1,13 @@
|
||||||
Name: mupdf
|
Name: mupdf
|
||||||
Version: 1.1
|
Version: 1.4
|
||||||
Release: 5%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: A lightweight PDF viewer and toolkit
|
Summary: A lightweight PDF viewer and toolkit
|
||||||
Group: Applications/Publishing
|
Group: Applications/Publishing
|
||||||
License: GPLv3
|
License: GPLv3
|
||||||
URL: http://mupdf.com/
|
URL: http://mupdf.com/
|
||||||
Source0: http://mupdf.com/download/%{name}-%{version}-source.tar.gz
|
Source0: http://mupdf.com/download/%{name}-%{version}-source.tar.gz
|
||||||
Source1: %{name}.desktop
|
Source1: %{name}.desktop
|
||||||
## http://bugs.ghostscript.com/show_bug.cgi?format=multiple&id=693010
|
BuildRequires: openjpeg2-devel jbig2dec-devel desktop-file-utils
|
||||||
Patch0: %{name}-upstream.patch
|
|
||||||
Patch1: %{name}-xps_fix.patch
|
|
||||||
BuildRequires: openjpeg-devel jbig2dec-devel desktop-file-utils
|
|
||||||
BuildRequires: libjpeg-devel freetype-devel libXext-devel
|
BuildRequires: libjpeg-devel freetype-devel libXext-devel
|
||||||
|
|
||||||
%description
|
%description
|
||||||
|
@ -40,25 +37,20 @@ applications that use mupdf and static libraries
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}-source
|
%setup -q -n %{name}-%{version}-source
|
||||||
%patch0 -p1
|
|
||||||
%patch1 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="%{optflags}"
|
export CFLAGS="%{optflags}"
|
||||||
make -j1
|
make %{?_smp_mflags} verbose=1
|
||||||
## %{?_smp_mflags} verbose=1
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make DESTDIR=%{buildroot} install prefix=%{buildroot}/usr libdir=%{buildroot}%{_libdir}
|
make DESTDIR=%{buildroot} install prefix=%{_prefix} libdir=%{_libdir}
|
||||||
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1}
|
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1}
|
||||||
install -D -m644 debian/%{name}.xpm %{buildroot}/%{_datadir}/pixmaps/%{name}.xpm
|
install -D -m644 platform/debian/%{name}.xpm %{buildroot}/%{_datadir}/pixmaps/%{name}.xpm
|
||||||
## filename conflict with poppler
|
|
||||||
### mv %{buildroot}%{_bindir}/pdfinfo %{buildroot}%{_bindir}/pdfinfo-mupdf
|
|
||||||
## fix strange permissons
|
## fix strange permissons
|
||||||
chmod 0644 %{buildroot}/%{_includedir}/*.h
|
|
||||||
chmod 0644 %{buildroot}%{_libdir}/*.a
|
chmod 0644 %{buildroot}%{_libdir}/*.a
|
||||||
find %{buildroot}/%{_mandir} -type f -exec chmod 0644 {} \;
|
find %{buildroot}/%{_mandir} -type f -exec chmod 0644 {} \;
|
||||||
|
find %{buildroot}/%{_docdir} -type f -exec chmod 0644 {} \;
|
||||||
|
find %{buildroot}/%{_includedir} -type f -exec chmod 0644 {} \;
|
||||||
%post
|
%post
|
||||||
update-desktop-database &> /dev/null || :
|
update-desktop-database &> /dev/null || :
|
||||||
|
|
||||||
|
@ -68,27 +60,22 @@ update-desktop-database &> /dev/null || :
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc COPYING README
|
%doc COPYING README
|
||||||
%{_bindir}/mupdf
|
%{_bindir}/*
|
||||||
%{_bindir}/mudraw
|
|
||||||
%{_bindir}/mubusy
|
|
||||||
%{_datadir}/applications/mupdf.desktop
|
%{_datadir}/applications/mupdf.desktop
|
||||||
%{_mandir}/man1/mudraw.1.gz
|
%{_mandir}/man1/*.1.gz
|
||||||
%{_mandir}/man1/mubusy.1.gz
|
|
||||||
%{_mandir}/man1/mupdf.1.gz
|
|
||||||
%{_datadir}/pixmaps/mupdf.xpm
|
%{_datadir}/pixmaps/mupdf.xpm
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%{_includedir}/fitz.h
|
%{_includedir}/%{name}
|
||||||
%{_includedir}/memento.h
|
%{_libdir}/lib%{name}.a
|
||||||
%{_includedir}/mucbz.h
|
|
||||||
%{_includedir}/mupdf.h
|
%Changelog
|
||||||
%{_includedir}/muxps.h
|
* Tue May 6 2014 Pavel Zhukov <pavel@landgraf-desktop.zhukoff.net> - 1.4-1
|
||||||
%{_libdir}/libfitz.a
|
- New release 1.4 (#1087287)
|
||||||
|
|
||||||
%changelog
|
|
||||||
* Fri Jan 24 2014 Pavel Zhukov <landgraf@fedoraproject.org> - 1.1-5
|
* Fri Jan 24 2014 Pavel Zhukov <landgraf@fedoraproject.org> - 1.1-5
|
||||||
- Fix stack overflow (#1056699)
|
- Fix stack overflow (#1056699)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue