Files
mupdf/mupdf.spec
Martin Pluskal aa442929d8 Accepting request 684259 from home:guoyunhe:branches:Publishing
- Add build dependencies:
  * liblcms2-devel
  * Mesa-libGL-devel
  * freeglut-devel
  * pkgconfig(openssl)
  * pkgconfig(xi)
  * pkgconfig(xrandr)
- Change COPYING to %licnese instead of %doc
- Update mupdf-no-strip.patch
- Add patches from Fedora project:
  * mupdf-CVE-2018-16647.patch
  * mupdf-CVE-2018-16648.patch
  * mupdf-CVE-2018-18662.patch
  * 0001-Fix-699840-Use-saved-sig_widget-pointer-to-sign-sign.patch
  * 0001-Write-placeholder-appearance-streams-for-digital-sig.patch
  * 0001-fix-build-on-big-endian.patch
- Update to version 1.14:
  * New features:
    * Added "Source Han Serif" CJK fallback font.
    * Added more scripts to the Noto fallback fonts.
    * Multi-page PNM support.
    * "mutool show" now supports a path syntax for selecting objects to show.
  * Build system simplifications:
    * Auto-generated CMap, ICC, and JS source files are checked in to git.
    * Embedded CMap resources are now generated by a python script.
    * Embedded font resources are linked directly if using GNU ld or windows.
    * Namegen tool replaced by use of C macros.
    * Simplified Makefile.
  * Annotation editing:
    * New annotation editing mode in mupdf-gl.
    * Can create, edit, and delete most annotation types.
    * Can create appearance streams for most annotation types.
    * Can create appearance streams for Tx form fields.
    * Can create appearance streams for Ch form fields.
  * Form filling in mupdf-gl:
    * Can click buttons, checkboxes, and radioboxes.
    * Can fill out text fields using dialog box.
    * Can select choice options using dialog box.
    * Can verify and sign digital signatures.
  * Improved UI for mupdf-gl:
    * Password dialog.
    * Error dialog.
    * Open/save file dialog.
    * Snap selection to words or lines by holding control or control+shift.
    * Save and restore current location, bookmarks, and navigation history.
  * Bug fixes:
    * Improved CJK character fallback handling in EPUB.
  * API changes:
    * Pass rectangle and matrix structs by value.
    * Replaced PDF_NAME_Xxx macros with PDF_NAME(Xxx).
    * Added PDF_TRUE, PDF_FALSE, and PDF_NULL constant pdf_obj* macros.
    * Added helper functions: pdf_dict_get_int, etc.
    * Removed 'doc' argument in pdf_new_int, etc.
    * Quads instead of rects when highlighting and searching text.
    * mutool run: Pass arguments to script in scriptArgs global.

OBS-URL: https://build.opensuse.org/request/show/684259
OBS-URL: https://build.opensuse.org/package/show/Publishing/mupdf?expand=0&rev=81
2019-03-12 13:41:52 +00:00

151 lines
4.8 KiB
RPMSpec

#
# spec file for package mupdf
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2011 Guido Berhoerster.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: mupdf
Version: 1.14.0
Release: 0
Summary: PDF and XPS Viewer and Parser and Rendering Library
License: AGPL-3.0-or-later
Group: Productivity/Office/Other
Url: https://mupdf.com/
Source0: https://mupdf.com/downloads/mupdf-%{version}-source.tar.xz
Source1: %{name}.desktop
Source2: %{name}-gl.desktop
Patch0: mupdf-no-strip.patch
Patch1: mupdf-CVE-2018-16647.patch
Patch2: mupdf-CVE-2018-16648.patch
Patch3: mupdf-CVE-2018-18662.patch
Patch4: 0001-Fix-699840-Use-saved-sig_widget-pointer-to-sign-sign.patch
Patch5: 0001-Write-placeholder-appearance-streams-for-digital-sig.patch
Patch6: 0001-fix-build-on-big-endian.patch
BuildRequires: Mesa-libGL-devel
BuildRequires: freeglut-devel
BuildRequires: freetype2-devel
BuildRequires: gcc-c++
BuildRequires: jbig2dec-devel
BuildRequires: libcurl-devel
BuildRequires: libjpeg-devel
BuildRequires: openjpeg2-devel
BuildRequires: pkgconfig
BuildRequires: update-desktop-files
BuildRequires: zlib-devel
BuildRequires: pkgconfig(harfbuzz)
BuildRequires: pkgconfig(lcms2)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(xi)
BuildRequires: pkgconfig(xrandr)
Requires: xdg-utils
%description
MuPDF is a PDF and XPS viewer and parser/rendering library.
The renderer in MuPDF is tailored for anti-aliased graphics. It
renders text with metrics and spacing accurate to within fractions of
a pixel for reproducing the look of a printed page on screen.
MuPDF supports PDF 1.7 with transparency, encryption, hyperlinks,
annotations and search. MuPDF can also read XPS documents
(OpenXPS/ECMA-388).
%package devel-static
Summary: Development Files for mupdf
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
%description devel-static
This package contains development files needed for developing applications
based on mupdf.
%prep
%setup -q -n %{name}-%{version}-source
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1 -d thirdparty/lcms2
for d in $(ls thirdparty | grep -v -e freeglut -e lcms2 -e mujs)
do
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 frok
USE_SYSTEM_CURL := yes
"
%build
export XCFLAGS="%{optflags} -fPIC -DJBIG_NO_MEMENTO -DTOFU -DTOFU_CJK"
make %{?_smp_mflags} build=release verbose=yes
%install
%make_install build=release prefix=%{_prefix} libdir=%{_libdir}
rm -rf %{buildroot}%{_datadir}/doc/%{name}
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}
%suse_update_desktop_file mupdf
%if 0%{?suse_version} <= 1320
%post
%desktop_database_post
%postun
%desktop_database_postun
%endif
%files
%doc README CHANGES docs/*
%license COPYING
%{_bindir}/*
%{_datadir}/applications/mupdf*.desktop
%{_datadir}/icons/hicolor
%{_datadir}/icons/hicolor/scalable
%{_datadir}/icons/hicolor/scalable/apps
%{_datadir}/icons/hicolor/scalable/apps/*
%{_mandir}/man1/*.1.gz
%files devel-static
%{_includedir}/%{name}
%{_libdir}/lib%{name}*.a
%changelog