commit 82a730fc8a18def65ee056af5127084764139fa12701f001af4899bb97177da6 Author: Paolo Stivanin Date: Tue Aug 6 14:03:39 2024 +0000 Accepting request 1191851 from home:jkuzilek:branches:Publishing Update to 1.24.8 OBS-URL: https://build.opensuse.org/request/show/1191851 OBS-URL: https://build.opensuse.org/package/show/Publishing/mupdf?expand=0&rev=130 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/mupdf-1.23.11-source.tar.gz b/mupdf-1.23.11-source.tar.gz new file mode 100644 index 0000000..eaf593b --- /dev/null +++ b/mupdf-1.23.11-source.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:478f2a167feae2a291c8b8bc5205f2ce2f09f09b574a6eb0525bfad95a3cfe66 +size 55319500 diff --git a/mupdf-1.24.8-source.tar.gz b/mupdf-1.24.8-source.tar.gz new file mode 100644 index 0000000..fd93224 --- /dev/null +++ b/mupdf-1.24.8-source.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a518d9be976cdb2006d45382d7ffb1b9b8d64bc3fd3cb73ca6270d752fa7f448 +size 54039703 diff --git a/mupdf-gl.desktop b/mupdf-gl.desktop new file mode 100644 index 0000000..4b6590f --- /dev/null +++ b/mupdf-gl.desktop @@ -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; diff --git a/mupdf-no-strip.patch b/mupdf-no-strip.patch new file mode 100644 index 0000000..3d7cde1 --- /dev/null +++ b/mupdf-no-strip.patch @@ -0,0 +1,11 @@ +--- mupdf-1.23.3-source/Makerules.orig 2023-09-20 07:55:15.822969071 +0200 ++++ mupdf-1.23.3-source/Makerules 2023-09-20 07:55:39.019862276 +0200 +@@ -93,7 +93,7 @@ + LDFLAGS += -g + else ifeq ($(build),release) + CFLAGS += -pipe -O2 -DNDEBUG +- LDFLAGS += $(LDREMOVEUNREACH) -Wl,-s ++ LDFLAGS += $(LDREMOVEUNREACH) + else ifeq ($(build),small) + CFLAGS += -pipe -Os -DNDEBUG + LDFLAGS += $(LDREMOVEUNREACH) -Wl,-s diff --git a/mupdf.changes b/mupdf.changes new file mode 100644 index 0000000..3661f1c --- /dev/null +++ b/mupdf.changes @@ -0,0 +1,1074 @@ +------------------------------------------------------------------- +Tue Aug 6 11:06:12 UTC 2024 - Jan Kužílek + +- Update to 1.24.8: + * Miscellaneous changes in support of PyMuPDF Pro. + * Update document handler API - better state handling, and support for files. + * Extend stream API to handle streams that are files, and to support autodeletion of files on close. + * Add "document as PDF" functionality. + * Changes to C# wrappers in support of MuPDF.net. +- Update to 1.24.7: + * Fix bug that affected WASM builds. +- Update to 1.24.6: + * Fix bug where redactions removed unrelated content. + * Fix Android builds. +- Update to 1.24.5: + * Fix pyodide builds. + * Add conversions between utf16 and utf8 in language bindings. +- Update to 1.24.4: + * Update to new logo/icon. + * Fix bugs relating to link destinations. + * Fix bug relating to code space ranges. +- Update to 1.24.3: + * Support single page SVG in document writer. + * Fix undo/redo issue when deleting a page. + * Several bug fixes for font subsetting upon saving document. + * Fix bug relating to bookmarks upon interactive font size change in epub. + * Fix font size bug when parsing html without a font size unit. +- Update to 1.24.2: + * Keep java redaction API in line with its C counterpart. + * Add option to remove line-art, images, etc. while keeping text by adding text option when applying redactions. + * Various bug fixes. +- Update to 1.24.1: + * Fix bug where text moved after sanitizing PDF page contents. + * Fix two memory leaks in the office format parser. +- Update to 1.24.0: + Error handling changes: + * You must call pdf_report_error in the final fz_catch. Any unreported errors will be automatically reported when a new error is raised, or when closing the fitz context. + New formats: + * Read Office (XML) files! We internally open and convert docx/pptx/xlsx documents to HTML to allow reading the plain text content. The exact layout will NOT be preserved. + * Optional compile time option to use libarchive for reading CBR and other archive formats. + * Read plain text documents. + * Read gzipped files directly. + * Open and read FDF files to support importing annotations or form data using the low-level PDF functions. There are no tools for this yet. + * Read CFB (Compound File Binary) format archives -- used for the Office formats. + * Write images as JPEG2000. + New tools and features: + * mutool bake (and associated functions) to bake appearance of annotations and forms into static content. + * Font subsetting flag to mutool clean (EXPERIMENTAL FEATURE). + * Option to use ObjStms when writing PDF files. + * Compression effort option when writing PDF files. + * Add option to control how line art is affected by redaction. Add more options to control how images are affected by redaction (remove-unless-invisible). + * Fix up q/Q gstate balance when cleaning content streams. + New functions and types: + * pdf_rearrange_pages to subset or re-order pages in a PDF file. + * fz_invert_bitmap to invert monochrome bitmaps. + * fz_compressed_image_type to query the format of a compressed image. + * fz_text_decoder to convert various legacy and CJK encodings into UTF-8. + * More helper functions to easily manipulate PDF objects in C. + * Add flag to control fz_place_story overflow behavior when the text doesn't fit into the box. + * New archive handlers can be added at runtime. + Major bug fixes and improvements: + * Support using Art, Bleed, Media, and Trim boxes for PDF page size. + * Support ActualText in PDF! No more strange text extraction when the file uses ActualText to patch over bad font encodings. + * Add special TrueType fallback encoding CMap for a specific flavor of broken PDF files that use an "identity" encoding without embedding the font. + * Limited "transfer function" support in PDF. Transfer functions are a deprecated legacy PDF feature that predates proper color management. They were intended to provide limited color management such as applying a gamma curve. Transfer functions have often been (ab)-used to invert images, and many PDF creators use them when writing softmask images. We have added support for this case only. + * Box drawing characters added to fonts for HTML and plain text documents. + * Write more compact PDF files (removed some unnecessary whitespace). + * Improved selection behavior for non-axis aligned text. + * Improved heuristics for detecting the logical and visual order of RTL text in PDF. + * Improved heuristics for inserting missing spaces in PDF text. + * Improved handling of CMYK JPEG files (which ones are inverted and which are not). + * Improved content type detection. Don't assume everything is PDF when we can't recognize it. + Removed deprecated functions: + * pdf_check_signature + +------------------------------------------------------------------- +Thu Feb 29 07:52:14 UTC 2024 - Paolo Stivanin + +- Update to 1.23.11: + * Add support to redact line art. + * Add new image redaction option to remove images that intrudes on redaction with clipping applied. + +------------------------------------------------------------------- +Mon Feb 12 08:49:32 UTC 2024 - Paolo Stivanin + +- Update to 1.23.10: + * Add fallback CMap to handle very broken fonts. + * Fix infinite loop in line dashing routine. + * Handle named destinations with non-ASCII characters. + +------------------------------------------------------------------- +Tue Jan 23 07:04:27 UTC 2024 - Paolo Stivanin + +- Update to 1.23.9: + * Fix text moving after redaction. + * Add use-cid-for-unknown-unicode option to stext device. + * Move previously private APIs into public headers so they can be used in python bindings. + * Add version numbers to shared library installation targets on Linux/OpenBSD. + * Avoid setuptools problems for python bindings in python 3.12. + * Fix makefile so python bindings build with tesseract. + +------------------------------------------------------------------- +Wed Dec 20 08:50:28 UTC 2023 - Paolo Stivanin + +- Update to 1.23.7: + * Fix rendering issue concerning group alpha. + * Fix unexpected HTML table rectangles on subsequent pages. + * Fix text extraction of control characters from PDF. + * Fix bug concerning Stories having page-break-after set. + * Ignore broken structure trees instead of reporting an error. + * Various fixes for pymupdf. + +------------------------------------------------------------------- +Tue Nov 28 07:04:21 UTC 2023 - Paolo Stivanin + +- Update to 1.23.6: + * Add new text file document handler. + * Add interface for rearranging pages. + * Fix double free bug in html parser. + * Use CropBox as origin for fitz space in PDF documents so that page bounding box origin is at the top left. + * Fix parsing of cmap with surrogate characters. + * Fix bug in story handling resetting. + * Various smaller fixes for pymupdf. + +------------------------------------------------------------------- +Wed Oct 11 08:05:24 UTC 2023 - Paolo Stivanin + +- Update to 1.23.4: + * Fix bug causing a crash when cleaning up Android draw device upon destroy. + * Fix bug where bitmaps were reused after being recycled in Android. + * Add fixed padding to ink annotation to avoid unselectable bboxes for tiny strokes. + * Add API for checking if an annotation has a Rect property. + * Fix bug where cycles in structure trees caused eternal loops. + * Fix bug where colorspaces were not retained for in-linee images during filtering. + * Change default to use CropBox rather than MediaBox. + +------------------------------------------------------------------- +Wed Sep 20 05:56:12 UTC 2023 - Paolo Stivanin + +- Update to 1.23.3: + New features: + + New WASM library with same API as mutool run and Java, for both browser and Node environments. + + Support CropBox, TrimBox, BleedBox, and ArtBox in PDF tools and viewers. + + PhotoShop PSD image support. + + mupdf-gl: Custom ICC display profile support. + + mutool poster: Option to split in RTL direction. + Fixes: + + EPUB: Fix table cell height calculations. + + EPUB: Inherit table cell background color from table row. + + EPUB: Support files with partial encryption (only read unencrypted parts). + + EPUB: Support files with incorrect directory prefixes. + + TIFF: Stability improvements. + + MOBI: Stability improvements. + + PDF: Support old style border dash patterns. + + PDF: Support GoToR links to remote PDF documents. + + PDF: Improve link parsing and creation. + + ZIP: Improve unicode file name handling. + + Fall back to unhinted fonts if hints are broken. + + Recognize document types by sniffing contents (don't need to rely on mimetype or file extension). + NEW APIs: + + More PDF document permission flags. + + Tweaked exception error logging. + + pdf_minimize_document to squeeze amount of memory used by an open document. + Incompatible changes: + + pdf_field_name renamed to pdf_load_field_name. + + mutool run: Changed many methods to match Java and new WASM library. + +------------------------------------------------------------------- +Tue Jun 20 07:03:54 UTC 2023 - Paolo Stivanin + +- Update to 1.22.2: + * Various bug fixes cherry-picked back from development work + required to fix PyMuPDF issues. + +------------------------------------------------------------------- +Fri May 12 12:16:22 UTC 2023 - Paolo Stivanin + +- Update to 1.22.1 (bsc#1216728, CVE-2023-31794): + * New command line "mutool recolor" to change colorspace of PDF files. + * New command line "mutool trim" to remove content outside mediabox. + * New flag to "mutool draw": -KK to remove all non-textual content. + * Support PDF page labels. + * Layout HTML tables with variable column widths. + * Added JPEG output format. JPEG should be used with care due to its + lossy nature (if in doubt, use PDF instead). + * Added PDF filter factories. + * Added PDF color filter. + * Added "culler" to sanitize filter. + * Added flags to control embedding fonts in output. + * New device methods for structured tags. + * Increased maximum allowed image size. + * Add magic flag to temporarily hide annotations when editing them. + * Support RD in Square and Circle annotations. + * Support dashed borders in annotations. + * Support cloudy borders in annotations. + * Improved layers in PDF files. + * Fix performance issue with large PDF files and outlines. + * Updated multi-threading examples. + * Moved WASM project into separate repository. + * Added Java and "mutool run" bindings for many more functions. + +------------------------------------------------------------------- +Tue Mar 7 17:34:03 UTC 2023 - Jan Engelhardt + +- Drop BuildRequires freeglut & lcms2, this is not used + and the build always relies on the bundled copy. + +------------------------------------------------------------------- +Mon Mar 6 21:11:06 UTC 2023 - Jan Engelhardt + +- Disable system gumbo, so it may be removed [boo#1208381]. + +------------------------------------------------------------------- +Sat Dec 17 17:35:13 UTC 2022 - Dirk Müller + +- update to 1.21.1: + * Garbage collection problem causing file bloat on clean + * Don't assume sorted objects in pdf_objcmp + * Don't layout empty documents + * Type 3 font char bboxes + * Added MOBI input format support + * Added Story API for creating PDF documents from formatted text + * Added API to create, edit, and delete links + * Support custom images for Stamp annotations + * Support interior color on Polygon annotations + * Support line endings on PolyLine annotations + * Improved SVG output + * C++/Python/C# binding: + * Changes to naming of wrapper functions and classes + * Added limited support for callbacks into Python, using SWIG Directors + +------------------------------------------------------------------- +Wed Aug 17 19:15:55 UTC 2022 - Dirk Müller + +- update to 1.20.3: + * return error, not success when unable to lock native device resource. + * Bug 705620: Start journal operation instead of pushing local xref. + * Ensure AndroidDrawDevice is destroyed, even upon exception. + * source/pdf/pdf-clean.c: fix segv from incorrect call to fz_drop_pixmap(). + * Bug 705681: Enclose code in begin/end operation. + * Guard against SEGVs when calling archive functions with NULL archive. + +------------------------------------------------------------------- +Mon Aug 1 21:28:07 UTC 2022 - Dirk Müller + +- update to 1.20.0 (bsc#1202858, CVE-2021-4216): + * Experimental C# bindings + * Cross compilation should no longer need a host compiler + * Major additions to JNI bindings + * New API to edit outline + * New API to resolve and create links + * New API to toggle individual layers in PDF + * Layer panel in mupdf-gl + * Layer option in mutool draw + * New API to add a Javascript console + * Console panel in mupdf-gl + * Text search API extended to be able to distinguish between separate search hits + * Command line tool improvements: + * all: Negative page numbers to index from the last page + * mutool draw: Add option to render document without text + * mutool draw and convert: Support DPI option in text and HTML output + * New hybrid HTML output format using "scripts/pdftohtml" script: + * Graphics in a background image + * Text on top + * Improved WASM viewer demo + * Support high DPI screens + * Progressive loading + * Update to zlib 1.2.12 for security fix + +------------------------------------------------------------------- +Fri Apr 22 20:56:48 UTC 2022 - Dirk Müller + +- update to 1.19.1: + * Updated zlib to 1.2.12 due to CVE-2018-25032 + +------------------------------------------------------------------- +Mon Oct 25 14:01:11 UTC 2021 - Andreas Stieger + +- update to 1.19.0 + * Remov support for Luratech JBIG2 and JPEG2000 decoders + * Add 'extract' library for more output options: DOCX, ODT + * Journal for undo and redo + * Snapshot for auto-save and restore + * Reflow document wrapper + * Rollover appearance for annotations and widgets + * Customize appearance of signed digital signatures + * Progress and cancel callbacks to OCR functions + * Create signature form fields + * Improved Font and format support + * developer visible improvements + +------------------------------------------------------------------- +Sun Oct 25 12:05:00 UTC 2020 - Hsiu-Ming Chang + +- Update to version 1.18.0 + + * mutool draw: bbox output format. + * mutool draw: structured text extraction in JSON format. + * mutool run: StructuredText.walk() + * mutool run: PDFPage.process() and PDFAnnotation.process() + + * mupdf-gl: Added IBM Common User Access shortcuts for copy & paste. + * mupdf-gl: Improved redaction UI. + + * java: Example desktop Java viewer. + * wasm: WebAssembly viewer that runs in a browser. + * html: Added HTML5 parser. + + * api: Dehyphenation option in structured text extraction, to improve searching for words that are hyphenated across lines. + * api: pdf_new_date, pdf_to_date, pdf_dict_put_date and pdf_dict_get_date. + * api: Added choice of image redaction algorithms: none, full, partial. + * api: Optional use of Tesseract to use OCR to extract text. + + * svg: Many small parsing fixes. + * svg: Parse inline CSS style attributes. + * svg: Text elements (simple text layout only). + + * High security redaction -- save redacted PDF as flattened bitmap, guaranteed to not leak any sensitive redacted information. + + * Experimental C++ bindings. + * Experimental Python bindings. + +------------------------------------------------------------------- +Fri Jun 19 08:24:38 UTC 2020 - Dan Čermák + +- Update to version 1.17.0 + + * api: Improved accessors for markup/ink/polygon annotation data. + * api: Chapter based API for faster EPUB loading. + * api: Add more documentation to header files. + * api: Improved digital signature signing and verification. + * api: Validate changes in a signed PDF file. + + * build: Moved windows build to VS2019 solution. + + * pdf: Redaction now works on images and links as well as text. + * pdf: Greek, Cyrillic, Chinese, Japanese, and Korean scripts in forms and annotations. + * pdf: File attachment annotations. + * pdf: Use CCITT Fax compression for 1-bit images when creating PDF files. + + * epub: More forgiving XHTML parsing. + * epub: Accelerator files to cache chapter data for faster EPUB loading. + * epub: Optimized memory use. + + * mutool run: Edit Markup, Ink, and Polygon annotation data. + * mutool run: Fill out form fields. + * viewer: Ask for confirmation before closing a PDF with unsaved changes. + * viewer: Embed and extract file attachment annotations. + + * library: Miscellaneous bugfixes. + * library: Fixes to store operation. + + * thirdparty: Updated Harfbuzz to 2.6.4. + * thirdparty: Updated jbig2dec to 0.18. + * thirdparty: Updated MuJS to 1.0.7. + * thirdparty: Updated OpenJPEG to 2.3.1. + * thirdparty: Updated cURL to 7.66.0 (windows only). + +------------------------------------------------------------------- +Fri Jun 12 08:32:08 UTC 2020 - Martin Pluskal + +- Fix building with gcc10 + +------------------------------------------------------------------- +Tue Sep 10 11:41:20 UTC 2019 - Christophe Giboudeaux + +- Use -ffat-lto-objects when building static libraries. + +------------------------------------------------------------------- +Wed Aug 14 23:38:39 UTC 2019 - Xaver Hellauer + +- Update to version 1.16.1 + * Changes in version 1.16.1: + * Bugfixes + * Changes in version 1.16.0: + * api: Major overhaul of color management architecture. + * api: Improved functions to verify/sign PDF documents. + * api: Number tree accessor function pdf_lookup_number. + * api: Parse and handle more options for PWG output. + * api: Removed obsolete gproof document type. + * api: User callbacks for warning and error messages. + * epub: Changed default page size to A5. + * epub: Draw embedded SVG documents in EPUB/XHTML. + * epub: New Noto fonts covering more unicode scripts. + * epub: Support small-caps font-variant. + * pdf: Add Redact annotation type and function to apply redactions. + * pdf: Add/remove/change encryption and password when saving PDF files. + * pdf: Improvements to text handling in PDF filter processor. + * pdf: MP and DP operators now call begin/end_layer device methods. + * pdf: New and improved progressive loading. + * svg: Draw external images in SVG documents. + * mutool show: Add 'form' selector to list PDF form fields. + * mutool sign: Sign PDF documents from the command line. + * mutool sign: Verify signatures in PDF documents from the command line. + * viewer: Option to save a script of user actions for replay with mutool run. + * viewer: Runtime toggle for ICC and spot rendering. + * viewer: Tooltip when hovering over a link in mupdf-gl. + * Changes in version 1.15.0: + * WebAssembly build target and examples. + * Improved forms API in both C and Java bindings. + * Improved forms JavaScript support. + * Create appearance streams for more form field types. + * Fixed many bugs in ICC color management. + * Fixed many memory leaks in error cleanup. + * Fixed bugs in pdfwrite output. + * Improved text extraction from LaTeX documents with math symbols. + * Improved trace device formatting. + * Support CBZ and CBT files larger than 2Gb. + * Show table of contents for FB2 and XHTML documents. + * Show embedded raster images in SVG and XHTML documents. + * Show FB2 cover page. + * Add option to save PDF files without encryption. + * Add inhibit-spaces option to stext device to turn off missing space detection. + * Simplified fz_try/fz_always/fz_catch macros. + * mupdf-gl improvements: + * Automatically open annotation editor when selecting an annotation. + * Full page color tinting option in mupdf-gl. + * Show/hide table of contents sections. + * Trigger a reload with sighup. + * Toggle spot color mode with 'e'. +- Remove merged patches: + * 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 + +------------------------------------------------------------------- +Thu Mar 14 21:30:03 UTC 2019 - Yunhe Guo + +- Update source download link so we can submit it to Factory + +------------------------------------------------------------------- +Mon Mar 11 14:26:01 UTC 2019 - Yunhe Guo + +- 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. + +------------------------------------------------------------------- +Mon Apr 23 14:10:10 UTC 2018 - jengelh@inai.de + +- Ensure neutrality of description. + +------------------------------------------------------------------- +Mon Apr 23 07:36:23 UTC 2018 - kbabioch@suse.com + +- Update to version 1.13: + - primarily a bugfix release. + - New "mutool sign" tool for showing and verifying digital signatures. + - Chinese, Japanese, Korean, Cyrillic, and Greek font support in mutool create. + - Improvements to annotation editing API. +- Dropped patches, which are included upstream now: + - CVE-2018-6192.patch + - CVE-2018-5686.patch + - CVE-2018-6187.patch + - CVE-2018-1000051.patch + - CVE-2017-17858.patch + - CVE-2018-6544.patch + - fix-openjpeg-flags.patch + +------------------------------------------------------------------- +Wed Feb 14 18:46:28 UTC 2018 - crrodriguez@opensuse.org + +-mupdf-no-strip.patch: fix debuginfo generation + +------------------------------------------------------------------- +Wed Feb 14 18:09:24 UTC 2018 - crrodriguez@opensuse.org + +- Remove xorg-x11-devel from buildrequires + +------------------------------------------------------------------- +Mon Feb 12 07:53:53 UTC 2018 - kbabioch@suse.com + +- Add CVE-2018-1000051.patch: Fix a Use After Free vulnerability in + fz_keep_key_storable that can potentially result in DoS / remote + code execution (CVE-2018-1000051 bsc#1080531) + +------------------------------------------------------------------- +Tue Feb 6 14:36:54 UTC 2018 - meissner@suse.com + +- use freetype2-devel explictily as buildrequires + +------------------------------------------------------------------- +Fri Feb 2 20:48:34 UTC 2018 - kbabioch@suse.com + +- CVE-2018-6192.patch: Use official fix from usptream (CVE-2018-6192 + boo#1077755) + +------------------------------------------------------------------- +Fri Feb 2 14:58:40 UTC 2018 - kbabioch@suse.com + +- Add CVE-2018-6544.patch to fix a DoS in pdf_load_obj_stm within in + pdf/pdf-xref.c (CVE-2018-6544 boo#1079100) + +- Add CVE-2018-6192.patch to fix a DoS in pdf_read_new_xref within + pdf/pdf-xref.c via crafted PDF file (CVE-2018-6192 boo#1077755) + +------------------------------------------------------------------- +Fri Feb 2 07:52:06 UTC 2018 - kbabioch@suse.com + +- Add CVE-2018-6187.patch to fix a heap buffer overflow in in pdf-write.c + in the do_pdf_save_document function (CVE-2018-6187 boo#1077407) + +------------------------------------------------------------------- +Tue Jan 23 09:12:22 UTC 2018 - kbabioch@suse.com + +- Add CVE-2017-17858.patch to fix an heap-based buffer overflow + CVE-2017-17858 bsc#1077161 + +------------------------------------------------------------------- +Mon Jan 22 12:20:48 UTC 2018 - idonmez@suse.com + +- Add CVE-2018-5686.patch to fix an infinite loop + CVE-2018-5686 bsc#1075936 + +------------------------------------------------------------------- +Sun Jan 14 03:11:32 UTC 2018 - avindra@opensuse.org + +- Update to version 1.12.0 + * Color Management: + + LCMS2 library for color management + + CMYK rendering with overprint simulation + + Spot color rendering + + Transparency rendering fixes + * Structured text output improvements: + + Reworked structured text API + + Faster text searching + + Highlight and copy text by selecting lines instead of by + area + + New semantic XHTML output format + + New layout preserving HTML output format + * Features and improvements: + + Improved non-AA rendering with new scan converter + + Improved LARGEFILE support + + Improved TIFF support + + Improved documentation + + PCLm output. + + PSD output. + + New "mutool trace" tool. + + New "mutool sign" tool (work in progress). + + Text redaction (work in progress). + + Lots of bug fixes. +- Strip "-source" from tarball name +- Switch to xz release (13mb smaller) +- rebase fix-openjpeg-flags.patch +- drop reproducible.patch + * fixed upstream in 081d4c72430e3077a05499c783d9fbe24361b368 +- Fixes CVE-2017-15369 (bsc#1063413), CVE-2017-15587 (bsc#1064027) + +------------------------------------------------------------------- +Fri Nov 10 08:15:18 UTC 2017 - aloisio@gmx.com + +- Update to version 1.11 + * This is primarily a bug fix release. + * PDF portfolio support with command line tool "mutool + portfolio". + * Add callbacks to load fallback fonts from the system. + * Use system fonts in Android to reduce install size. + * Flag to disable publisher styles in EPUB layout. + * Improved SVG output. + +- Refreshed fix-openjpeg-flags.patch and reproducible.patch + +- Dropped CVE-2017-5896.patch, bsc1023760.patch, + CVE-2016-10221.patch, CVE-2016-8728.patch, CVE-2017-7976.patch, + CVE-2016-10132.patch, CVE-2016-10133.patch, + CVE-2016-10141.patch, CVE-2017-5627.patch + and CVE-2017-5628.patch (merged or adapted upstream) + +------------------------------------------------------------------- +Thu Aug 3 08:23:47 UTC 2017 - idonmez@suse.com + +- Add CVE-2016-10221.patch, CVE-2016-8728.patch and + CVE-2017-7976.patch to fix CVE-2016-10221, CVE-2016-8728, + CVE-2016-8729 and CVE-2017-7976 + bsc#1032140 bsc#1039850 bsc#1052029 + +------------------------------------------------------------------- +Mon May 29 14:46:49 UTC 2017 - bwiedemann@suse.com + +- Add reproducible.patch to sort input files to make build reproducible + (boo#1041090) + +------------------------------------------------------------------- +Thu Apr 27 19:51:23 UTC 2017 - idonmez@suse.com + +- mupdf is not a terminal app boo#1036637 + +------------------------------------------------------------------- +Fri Feb 10 12:19:43 UTC 2017 - idonmez@suse.com + +- Add bsc1023760.patch to fix writing svg output to stdout if no + output specified bsc#1023760 + +------------------------------------------------------------------- +Fri Feb 10 10:56:31 UTC 2017 - idonmez@suse.com + +- Add CVE-2017-5896.patch to fix a heap overflow + CVE-2017-5896 bsc#1023761 bsc#1024679 + +------------------------------------------------------------------- +Mon Feb 6 12:51:00 UTC 2017 - idonmez@suse.com + +- Add CVE-2017-5627.patch and CVE-2017-5628.patch fixes + CVE-2017-5627 and CVE-2017-5628 bsc#1022503 bsc#1022504 + +------------------------------------------------------------------- +Tue Jan 24 11:57:17 UTC 2017 - idonmez@suse.com + +- Add CVE-2016-10132.patch, CVE-2016-10133.patch and + CVE-2016-10141.patch to fix CVE-2016-10132, CVE-2016-10133 and + CVE-2016-10141 bsc#1019877 + +------------------------------------------------------------------- +Tue Dec 20 12:20:07 UTC 2016 - idonmez@suse.com + +- Update to version 1.10a + * A bug with mutool and saving PDF files using the 'ascii' + option has been fixed. +- Add fix-openjpeg-flags.patch to stop defining OPJ_STATIC, + this is https://github.com/uclouvain/openjpeg/issues/802 + +------------------------------------------------------------------- +Thu Nov 24 14:56:53 UTC 2016 - idonmez@suse.com + +- Update to version 1.10 + * FictionBook (FB2) e-book support. + * Simple SVG parser (a small subset of SVG only). + * mutool convert: a new document conversion tool and interface. + * Multi-threaded rendering in mudraw. + * Updated base 14 fonts from URW. + * New CJK font with language specific variants. + * Hyperlink support in EPUB. + * Alpha channel is now optional in pixmaps. + * More aggressive purging of cached objects. + * Partial image decoding for lower memory use when banding. + * Reduced default set of built-in CMap tables to the minimum required. + * FZ_ENABLE_PDF, _XPS, _JS, to disable features at compile time. + * Function level linking. + * Dropped pdf object generation numbers from public interfaces. + * Simplified PDF page, xobject, and annotation internals. + * Closing and freeing devices and writers are now separate steps. + * Improved PDF annotation editing interface (still a work in progress). + * Document writer interface. + * Banded image writer interface. +- Drop CVE-2016-6265.patch and mupdf-fix-openjpeg2.patch, + both are fixed upstream. + +------------------------------------------------------------------- +Fri Jul 22 11:02:28 UTC 2016 - idonmez@suse.com + +- Add CVE-2016-6265.patch to fix a use-after-free bsc#990195 + +------------------------------------------------------------------- +Fri Apr 22 17:57:34 UTC 2016 - idonmez@suse.com + +- Update to version 1.9a + * Fix a regression in text extraction. + +------------------------------------------------------------------- +Tue Apr 19 09:42:15 UTC 2016 - idonmez@suse.com + +- Update to version 1.9 + * Bidirectional layout for Arabic and Hebrew scripts. + * Shaping complex scripts for EPUB text layout. + * Noto fallback fonts for EPUB layout. + * mutool create: + - Create new PDF files from scratch. + - Read an annotated content stream in a text file and write a + PDF file, automatically embedding font and image resources. + * mutool run: + - Run javascript scripts with MuPDF bindings. + - The interface is similar to the new Java interface. + * mutool draw: + - Optional multi-threaded operation (Windows and pthreads). + - Optional low memory mode (primarily for testing). + +------------------------------------------------------------------- +Mon Mar 21 18:57:22 UTC 2016 - idonmez@suse.com + +- Set to best anti-alias mode (8) by default. + +------------------------------------------------------------------- +Thu Nov 19 10:06:56 UTC 2015 - idonmez@suse.com + +- Ship mupdf-x11-curl as default mupdf. Drop non-curl version. +- Drop mujstest as it seems to be a test utility. + +------------------------------------------------------------------- +Thu Nov 12 13:02:09 UTC 2015 - idonmez@suse.com + +- Update to version 1.8 + * New URW fonts with greek and cyrillic. + * 64-bit file support. + * Updated FreeType to version 2.6.1. + * Various font substitution bug fixes. + * Fix setjmp/longjmp behaviour which could cause optimizing + compilers to misbehave. + * EPUB improvements: User style sheets, GIF images, Table of Contents, + CJK text, Page margins and many bug fixes. + +------------------------------------------------------------------- +Tue Aug 18 08:47:41 UTC 2015 - idonmez@suse.com + +- Update to version 1.7a + * Bug fixes: + + Fixed bug that allocated too much memory when packing paths. + + Fixed EPUB font scaling bug. + + Fixed EPUB file type handling in viewers. + + Improved tolerance for broken and unsupported CSS. + * New features: + + Added -z option to mutool clean. + +------------------------------------------------------------------- +Sun Apr 19 13:55:51 UTC 2015 - aloisio@gmx.com + +- Update to version 1.7 + Headline changes: + * New 'Indie dev' licensing options - contact sales@artifex.com + for more details. + * New HTML layout engine, and (DRM-free) EPUB viewer. + * Reduced memory usage - displaylists and internal PDF + representation take much less memory, reducing total memory + use on some files by over 60%. + Important API changes: + * Bound contexts have been removed; we now pass fz_contexts + explicitly. + * Reference counting of paths and text structures. + Features: + * Add mutool pages option. + * Tweaked rendering to prevent feature dropout in common cases. + * Viewer tweaks + * Better mouse wheel handling + * Shift-space support + * Mouse button control of presentation mode + Internal changes: + * Removal of bound contexts; fz_contexts now passed explicitly + everywhere. + * PDF filter revamp - simpler interface. + * Devices use derived structures rather than user pointer. + * Sparse PDF xrefs held in more compact form. + * New gsview viewer split out to its own repository. + Bug fixes: + * Improved handling of broken files. + * Fix BBoxes of Type 3 fonts. + * Updated fonts (including greek and cyrillic). + * Various memory leaks and crashes. + * And many more. + +------------------------------------------------------------------- +Wed Dec 31 00:10:35 UTC 2014 - trcs@gmx.com + +- update to version 1.6 + * Features: + + Color detection device (mudraw -T). + + Sepia mode full-page color tinting in X11 and win32 viewer + (keybinding: shift-C). + + Re-implement printf and strtod due to portability issue with + locales and number formatting. + + Add experimental 'gsview' project: a Windows Modern UI viewer. + + Improve XML parser interface. + * Bug fixes: + + CBZ page ordering + + ZIP64 support + + iOS and Android bug fixes + + Miscellaneous minor fixes + +------------------------------------------------------------------- +Tue Aug 26 07:03:44 UTC 2014 - gber@opensuse.org + +- update to version 1.5 + * This is a bugfix release: dozens of bugs have been found and + exterminated! + * A typo resulting in a potential stack overflow that could + corrupt files when saving edits to a PDF has been fixed. + Another bug which caused a significant slowdown has also been + fixed. + +------------------------------------------------------------------- +Fri May 30 18:06:41 UTC 2014 - gber@opensuse.org + +- fix source url + +------------------------------------------------------------------- +Fri May 30 09:16:58 UTC 2014 - gber@opensuse.org + +- update to version 1.4 + * Headline changes: + * CMYK rendering (mudraw PWG and PAM formats) + * TIFF viewer (with multi-page support). + * Added MuJS Javascript interpreter. + * MuJS is the default, V8 and JavaScriptCore are compile time + options. + * Javascript support has to be explicitly enabled with + pdf_enable_js. + * All viewers now have JavaScript enabled in the default + builds. + * Viewers: + * X11: Horizontal scroll wheel support. + * X11: Status bar display with warnings. + * Android: Digital signatures. + * iOS: Links, form filling, annotation editing, and javascript. + * iOS: Reflow mode. + * WinRT: Printing. + * WinRT: Improved zooming behaviour. + * Tools: + * mudraw: Banded rendering with -B /band-height/. + * mudraw: Select output format with -F /format/. + * mudraw: Write to stdout if you use '-' as the output file + name. + * mudraw: Add TGA output format. + * mudraw: Improved SVG output. + * mutool show: Write output to file instead of stdout with -o + /filename/. + * mutool clean: Clean content streams with -s option. + * Annotations: + * Improved font handling. + * Form fields. + * Free text. + * Sticky notes. + * Optimizations: + * glyph cache: Partial eviction. + * glyph cache: Run-length compressed glyphs. + * Smarter handling of subpixel metrics in text rendering. + * Optimized blitting functions. + * Optimized gradient mesh drawing. + * API changes and additions: + * fz_stream API reworked: replace "read" function with "next". + * "Rebind" functions to associate context bound objects with + another context: + fz_output, fz_stream, fz_device and fz_document. + * Introduce "document handlers" to detect and open different + file types. + * Must now call fz_register_document_handlers() to register + the defaults. + * May register your own handlers as well to work with + g fz_open_document. + * Hook to load system fonts: fz_install_load_system_font_funcs. + * PDF xref cache flushing functions (mark/clear/clear-to-mark). + * Add our own "printf" set of functions to format strings and + write to fz_output: + * Format %f as short as possible while preserving precision. + * Has %C for formatting a unicode character as UTF-8. + * Has %M to format fz_matrix. + * Has %R to format fz_rect. + * Has %q and %( to format strings with escaped characters. + * PDF process interface: allow PDF interpreter to do more than + just draw! + * Content stream state cleaning filter. + * Content stream rewriting filter. + * PDF digital signatures. + * Stroke states may now be stored on the stack. + * Improved fz_path internals. + * Gradient mesh drawing interface has been improved. + * Save files with incremental updates. +- drop obsolete mupdf-fix-array-overflow.patch +- switch to mujs instead of v8 + +------------------------------------------------------------------- +Fri Feb 14 10:04:23 UTC 2014 - gber@opensuse.org + +- add mupdf-fix-array-overflow.patch in order to fix a stack-based + buffer overflow in xps_parse_color() (bnc#863975) + +------------------------------------------------------------------- +Sat Jan 4 20:08:44 UTC 2014 - gber@opensuse.org + +- update to version 1.3 + * Windows RT viewer app for MuPDF. + * Library changes to support progressive loading (display PDF + files as they download). Windows/Linux/MacOS viewer supports + this using curl. + * Incremental updates to PDF files are now (optionally) preserved + on loading/saving. + * Prototype support for checking PDF Digital Signatures. + * Initial annotation support (strike-out, underline, highlight + and ink) (library and android builds only). + * Fix operation on Android API level 8. + * Android redraw optimisations. + * Android app now supports Google Cloud Print. + * Android app translated into many languages. + * Android support for more architectures. + * Improvements to store (avoid collisions causing unnecessary + evictions). + * Windows apps use Unicode filenames now. + * PDF function handling improved; functions can now be passed to + devices without 'sampling'. + * PDF image handling improved; images can now be passed to + devices without decompression. + * Indexed images are no longer uncompressed at load time, saving + memory. + * Caching of rendered tiles for speed. + * Improved text analysis mode, capable of spotting + columns/indents, right-to-left text etc. + * HTML output mode now includes image output. + * PDF password encoding handling improved. + * MuPDF now opens Jpeg, Tiff and PNG files directly. + * Bug preventing OpenXPS files from being opened fixed. + * Initial (feature incomplete) SVG and PDF output devices. + * PWG raster (mono/grey/RGB) and PCL (mono) output devices. + * Various performance improvements (including tilings and mesh + based shadings). + * Revamped directory structure to reflect recent changes. + * Various potential SEGV, SoftMask and rendering fixes. + * Many potential crashes in Jpeg2000 and JBIG2 images fixed. +- restore desktop file and icon which were dropped by upstream +- build with support for progressive rendering via libcurl + +------------------------------------------------------------------- +Wed Jun 12 16:58:48 UTC 2013 - dvaleev@suse.com + +- set ExclusiveArch: %{ix86} x86_64 %{arm}. v8 is available only + for those architectures + +------------------------------------------------------------------- +Mon Apr 29 13:13:20 UTC 2013 - gber@opensuse.org + +- fix broken setting of CFLAGS introduced by the previous change +------------------------------------------------------------------- +Sun Apr 28 10:28:56 UTC 2013 - dap.darkness@gmail.com + +- Fixed "ld: relocation R_X86_64_32 against `.rodata' can not + be used when making a shared object; recompile with -fPIC". + +------------------------------------------------------------------- +Fri Apr 5 17:31:25 UTC 2013 - gber@opensuse.org + +- update to version 1.2 + - Change licensing terms to GNU AGPL (from GNU GPL). + - Renamed 'mubusy' to 'mutool'. + - Add support for Javascript and forms handling. + - PDF 1.7 Extension Level 8 encryption implemented. + - Oversized and stroke text clipping implemented. + - Prototype transition support. + - Add fz_open_document_with_stream to allow non-file based + operation. + - Text searching API. + - Highlight and copy text selection API. + - Pass matrices and rectangles by reference for improved + performance. + - Change shadings to decompose at render times; massive memory + savings. + - Performance enhancements for color conversion and fax + decompression. + - ARM optimisations for color conversion and bitmap scaling. + - Bitmap subsampling stage introduced, with ARM optimisations. + - Type 3 fonts; glyphs are now handled as display lists. + - Scan converter performance improvements. + - Fix many SEGVs with out of spec files. + - Various rendering fixes. + +------------------------------------------------------------------- +Wed Jan 16 21:51:03 UTC 2013 - gber@opensuse.org + +- update to version 1.1 + - The command line tools have been combined into one tool that + does all: mubusy + - Rendering bugs fixed (text clipping, stroked text etc). + - Better handling of 'large' (uncachable) glyphs. + - Minor speed optimisations. + - Shading bug fixes. + - Move to using dynamically allocated parsing buffers (more + resilient). + - Support for UserUnits. + - Fix bugs with image predictors (including with 16 bit images). + - More resilient to out of spec files. + - Extract pdf writing capability into the library from pdfclean, + and expand on it to allow for linearisation. Bug fixes in the + garbage collection of unused objects. + - Improve pdf writing recognition of images. + - Improved font matching. + - Start to move away from macros to inline functions (helpful for + applications requiring certification). + - Many bugs fixed. + - Removal of all global variables: we now pass a context pointer + through the code freeing us from the use of globals within the + library. + - Multi-threaded operation: while MuPDF does not require a thread + library, hooks are in place so that if one is used, significant + speedups can be gained from using multiple cores to render. + - New error handling: a portable exception-like system is used to + allow neater handling of errors. This leads to more stability + and better resilience to broken files. + - Public/Private API: the API has undergone a significant + revision (required by some of the above changes, plus + renaming/revising for clarity and consistency), and has been + split into public and private headers. The plan is that the + public portion of the API should remain much more static in + future. + - Improved Text Extraction device: a cleaner API to the + experimental text extraction device, offering a list of styles, + and more cleanly delineated content. + - Documentation: All public header entry points/structures are + now documented and overviews of how to call the library to + render pages both in single and multi-threaded mode are given. + - A new scavenging memory manager; makes much better use of the + memory available by freeing cached items 'just in time'. + - Many, many, bugfixes. +- removed obsolete mupdf-use-xdg-open.patch and + mupdf-default-resolution.patch + +------------------------------------------------------------------- +Sun Jan 8 14:31:24 UTC 2012 - gber@opensuse.org + +- added mupdf-default-resolution.patch in order to change the + default resolution to 96 DPI which should be more reasonable for + most desktops + +------------------------------------------------------------------- +Fri Dec 2 18:03:34 UTC 2011 - gber@opensuse.org + +- hide from menu since mupdf must be called with a filename +- added mupdf-use-xdg-open.patch in order to use xdg-open for + launching a browser + +------------------------------------------------------------------- +Fri Dec 2 14:07:57 UTC 2011 - gber@opensuse.org + +- initial packaging + diff --git a/mupdf.desktop b/mupdf.desktop new file mode 100644 index 0000000..95035b7 --- /dev/null +++ b/mupdf.desktop @@ -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 diff --git a/mupdf.spec b/mupdf.spec new file mode 100644 index 0000000..d74a922 --- /dev/null +++ b/mupdf.spec @@ -0,0 +1,145 @@ +# +# spec file for package mupdf +# +# Copyright (c) 2024 SUSE LLC +# 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.24.8 +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/archive/%{name}-%{version}-source.tar.gz +Source1: %{name}.desktop +Source2: %{name}-gl.desktop +Patch0: mupdf-no-strip.patch +BuildRequires: Mesa-libGL-devel +BuildRequires: fdupes +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: zstd +BuildRequires: pkgconfig(glu) +BuildRequires: pkgconfig(harfbuzz) +BuildRequires: pkgconfig(openssl) +BuildRequires: pkgconfig(x11) +BuildRequires: pkgconfig(xext) +BuildRequires: pkgconfig(xi) +BuildRequires: pkgconfig(xrandr) +Provides: bundled(freeglut) = 3.0.0 +Provides: bundled(freeglut-art) = 3.0.0 +Provides: bundled(gumbo-parser) = 0.10.1 +Provides: bundled(lcms2) = 2.14 +Provides: bundled(lcms2-art) = 2.14 +Provides: bundled(mujs) = 1.3.2 +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 +%autosetup -p1 -n %{name}-%{version}-source + +for d in $(ls thirdparty | grep -v -e freeglut -e lcms2 -e mujs -e extract -e gumbo-parser) +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 +%global _lto_cflags %{_lto_cflags} -ffat-lto-objects +export XCFLAGS="%{optflags} -fcommon -fPIC -DJBIG_NO_MEMENTO -DTOFU -DTOFU_CJK" +%make_build 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} +%fdupes %{buildroot}%{_datadir} + +%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%{?ext_man} + +%files devel-static +%{_includedir}/%{name} +%{_libdir}/lib%{name}*.a + +%changelog