Bug 236867 - [exp-run] print/freetype2: Update to 2.10.0
Summary: [exp-run] print/freetype2: Update to 2.10.0
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: Port Management Team
URL:
Keywords: patch
Depends on: 238225 238227
Blocks: 236868
  Show dependency treegraph
 
Reported: 2019-03-29 03:23 UTC by lightside
Modified: 2019-06-03 16:05 UTC (History)
3 users (show)

See Also:
kwm: maintainer-feedback-


Attachments
Proposed patch (since 468892 revision) (1.98 KB, patch)
2019-03-29 03:23 UTC, lightside
no flags Details | Diff
Proposed patch (since 468892 revision) (23.67 KB, patch)
2019-04-19 21:38 UTC, lightside
no flags Details | Diff
Proposed patch (since 468892 revision) (26.11 KB, patch)
2019-04-23 14:57 UTC, lightside
lightside: maintainer-approval? (gnome)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description lightside 2019-03-29 03:23:59 UTC
Created attachment 203230 [details]
Proposed patch (since 468892 revision)

Patch to update print/freetype2 port from 2.9.1 to 2.10.0 version.

Look following links for changes:
https://sourceforge.net/projects/freetype/files/freetype2/2.10.0
https://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/CHANGES?h=VER-2-10-0
ABI:
https://abi-laboratory.pro/tracker/timeline/freetype/

- Update path in files/pkg-message.in
- Adapt pkg-plist
Comment 1 Koop Mast freebsd_committer 2019-04-11 20:26:07 UTC
Submitter pointed out (via e-mail) that there are a few issues the current freetype2 releases.

https://savannah.nongnu.org/bugs/?group=freetype

bug #56092: [regression] Awesomenauts crash after upgrading to 2.10.0 
https://savannah.nongnu.org/bugs/?56092
bug #56067: PCF defaultChar changes in 2.10 causes FontConfig to mis-detect(?) charsets
https://savannah.nongnu.org/bugs/?56067

There is also:
http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=6986ddac1ece9404c9b640a512cbd99534205fda

There appears to be also a division by zero, not sure if this is a valid issue or not. So deny the current patch until upstream can sort out these issues.

Also I run LLVM/Clang v7.0 scan-build command for print/freetype2 port:
-8<--
% cd freetype2
% scan-build70 -no-failure-reports --use-cc=clang70 --use-c++=clang++70 -o
../scan70 make
-->--

It reported following warning:
-8<--
<..>/freetype2/work/freetype-2.10.0/src/base/ftbitmap.c:979:24: warning:
Division by zero
      if ( FT_LONG_MAX / new_pitch < (int)final_rows )
           ~~~~~~~~~~~~^~~~~~~~~~~
1 warning generated.
-->8- 

Which isn't present in freetype 2.9.1
Comment 2 lightside 2019-04-19 21:38:54 UTC
Created attachment 203809 [details]
Proposed patch (since 468892 revision)

(In reply to comment #1)
> Submitter pointed out (via e-mail) that there are a few issues the current
> freetype2 releases.
Looks like, there are fixes for mentioned bug reports:
> bug #56092: [regression] Awesomenauts crash after upgrading to 2.10.0
> https://savannah.nongnu.org/bugs/?56092
[smooth] Fix segfault in direct mode (#56092).
http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=1f271751a39e5bc9c639adc213183ed5e58a9401

> bug #56067: PCF defaultChar changes in 2.10 causes FontConfig to mis-detect(?)
> charsets
> https://savannah.nongnu.org/bugs/?56067
[pcf] Fix handling of undefined glyph (#56067).
http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=c149f7397e484c97f45fb75fa1c7fdda2fc646cd

> So deny the current patch until upstream can sort out these issues.
I guess, possible to wait for next (e.g. 2.10.1) release or apply mentioned fixes for 2.10.0 release version.

Attached new patch with applied fixes.
This is how files/patch-2.10.0.diff was created:
-8<--
% git clone https://git.savannah.gnu.org/git/freetype/freetype2.git
<..>
% git clone freetype2 freetype2-devel
% cd freetype2-devel
% git checkout -b devel VER-2-10-0
<..>
% git cherry-pick 6986ddac1ece9404c9b640a512cbd99534205fda
<..>
% git checkout ChangeLog
Updated 1 path from the index
% git commit --no-edit
[devel 2e59841ea] [cff] Fix boundary checks.
<..>
% git cherry-pick 1f271751a39e5bc9c639adc213183ed5e58a9401
<..>
% git checkout VER-2-10-0 ChangeLog
Updated 1 path from 25a3e55ed
% git commit --no-edit
[devel f502783f6] [smooth] Fix segfault in direct mode (#56092).
<..>
% git cherry-pick c149f7397e484c97f45fb75fa1c7fdda2fc646cd
<..>
% git checkout VER-2-10-0 ChangeLog docs/CHANGES
Updated 2 paths from 25a3e55ed
% git commit --no-edit
[devel 12c204893] [pcf] Fix handling of undefined glyph (#56067).
<..>
% git show -s --format="# %s%n# http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=%H" 6986ddac1ece9404c9b640a512cbd99534205fda 1f271751a39e5bc9c639adc213183ed5e58a9401 c149f7397e484c97f45fb75fa1c7fdda2fc646cd > ../patch-2.10.0.diff
% echo >> ../patch-2.10.0.diff
% git diff --no-color --no-prefix VER-2-10-0 HEAD | sed -e '/^index/d ; /^deleted/d' >> ../patch-2.10.0.diff
% git checkout master
<..>
% git branch -D devel
<..>
-->8-

Remove local freetype2-devel repository (including freetype2 directory, if needed):
% cd .. && rm -rf freetype2-devel

Then move patch-2.10.0.diff to files directory of the print/freetype2 port (and recreate patch(es) with `make makepatch` command, if needed).
Comment 3 lightside 2019-04-23 14:57:21 UTC
Created attachment 203925 [details]
Proposed patch (since 468892 revision)

(In reply to comment #1)
> There appears to be also a division by zero, not sure if this is a valid issue
> or not.
This issue was fixed by Werner Lemberg in following commit:
http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=4166c453601e856fa61e8994085f240d8771e980

Attached new patch. Also added some fixes from other commits:
* src/sfnt/ttcmap.c (tt_get_glyph_name): Pacify compiler (#56061).
http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=885b4c2475f3272afd4115c97c150266cd815406
Fix return value of `FT_Set_Named_Instance' (#56186).
http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=af400438b7da3f07afadc3a5b3a6b982b2bdb84e
Comment 4 Koop Mast freebsd_committer 2019-04-28 21:35:17 UTC
Currently test the patch locally.

Hm looks like all the issues reported where fixed?
Comment 5 lightside 2019-04-29 08:22:06 UTC
(In reply to comment #4)
> Hm looks like all the issues reported where fixed?
Yes, if check response messages in related bug reports.

I proposed to include changes from corresponding commits (with the same bug report numbers) in attachment #203925 [details] (see comment #2), except changes for ChangeLog and docs/CHANGES files (related to merging process and changes from other commits). Looks like, these fixes are planned for 2.10.1 release.
Comment 7 commit-hook freebsd_committer 2019-06-03 16:03:09 UTC
A commit references this bug:

Author: swills
Date: Mon Jun  3 16:02:06 UTC 2019
New revision: 503401
URL: https://svnweb.freebsd.org/changeset/ports/503401

Log:
  print/freetype2: Update to 2.10.0

  PR:		236867
  Submitted by:	lightside <lightside@gmx.com>
  Exp-run by:	antoine@
  Reviewed by:	kwm

Changes:
  head/print/freetype2/Makefile
  head/print/freetype2/distinfo
  head/print/freetype2/files/patch-2.10.0.diff
  head/print/freetype2/files/pkg-message.in
  head/print/freetype2/pkg-plist
Comment 8 Steve Wills freebsd_committer 2019-06-03 16:05:24 UTC
Committed, thanks!