Bug 200154 - [maintainer patch] graphics/zathura-pdf-mupdf compatible to mupdf 1.7
Summary: [maintainer patch] graphics/zathura-pdf-mupdf compatible to mupdf 1.7
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Jan Beich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-12 17:21 UTC by Zsolt Udvari
Modified: 2015-05-13 00:37 UTC (History)
0 users

See Also:
uzsolt: maintainer-feedback+


Attachments
patch (14.04 KB, patch)
2015-05-12 17:21 UTC, Zsolt Udvari
uzsolt: maintainer-approval+
Details | Diff
updated patch (12.24 KB, patch)
2015-05-12 18:39 UTC, Zsolt Udvari
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zsolt Udvari 2015-05-12 17:21:58 UTC
Created attachment 156713 [details]
patch

The graphics/mupdf's API has changed.
The patches based on https://git.pwmt.org/?p=zathura-pdf-mupdf.git;a=commitdiff;h=f96dd48825c049bbccb2e25a814c49d03fedf86c

Poudriere log: http://uzsolt.hu/freebsd/poudriere/logs/amd64/zathura-pdf-mupdf-0.2.7_3.log

The pathes will outdated if newer zathura-pdf-mupdf will release.
Comment 1 Jan Beich freebsd_committer 2015-05-12 17:59:10 UTC
Comment on attachment 156713 [details]
patch

Having the change as a single files/patch-mupdf17 maybe better here from maintenance POV e.g., if you later want to import more commits. Doing so is allowed by Porter's Handbook:

  A patch may modify multiple files if the changes are related and the patch is named appropriately. For example, patch-add-missing-stdlib.h.

https://www.freebsd.org/doc/en/books/porters-handbook/slow-patch.html#slow-patch-rules

Ignore if you prefer flattenned changes by "make makepatch".

>+--- utils.c.orig	2015-05-12 17:02:07 UTC
>++++ utils.c
>+@@ -17,9 +17,9 @@ mupdf_page_extract_text(mupdf_document_t
>+     text_device = fz_new_text_device(mupdf_page->ctx, mupdf_page->sheet, mupdf_page->text);
>+     fz_matrix ctm;
>+     fz_scale(&ctm, 1.0, 1.0);
>+-    fz_run_page(mupdf_document->document, mupdf_page->page, text_device, &ctm, NULL);
>++    fz_run_page(mupdf_document->ctx, mupdf_page->page, text_device, &ctm, NULL);

Why does the line differ from upstream commit? mupdf_document->ctx vs. mupdf_page->ctx

>+   } fz_always (mupdf_document->ctx) {
>+-    fz_free_device(text_device);
>++    fz_drop_device(mupdf_page->ctx, text_device);
>+   } fz_catch(mupdf_document->ctx) {
>+   }
>+
Comment 2 Zsolt Udvari 2015-05-12 18:39:39 UTC
Created attachment 156723 [details]
updated patch

Updated patch.
The source code's patches go into one file.
Fix mistake.
Comment 3 commit-hook freebsd_committer 2015-05-13 00:35:33 UTC
A commit references this bug:

Author: jbeich
Date: Wed May 13 00:34:41 UTC 2015
New revision: 386187
URL: https://svnweb.freebsd.org/changeset/ports/386187

Log:
  graphics/zathura-pdf-mupdf: chase mupdf API after r385232

  PR:		200154
  Reported by:	pkg-fallout
  Submitted by:	Zsolt Udvari <udvzsolt@gmail.com> (maintainer)

Changes:
  head/graphics/zathura-pdf-mupdf/Makefile
  head/graphics/zathura-pdf-mupdf/files/
  head/graphics/zathura-pdf-mupdf/files/patch-mupdf-17
Comment 4 Jan Beich freebsd_committer 2015-05-13 00:37:11 UTC
Thanks. Committed.