Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/fontforge/files/, media-gfx/fontforge/
Date: Sun, 29 Mar 2020 18:15:58
Message-Id: 1585505338.f1024636277d2d1ab20b126f590a30a3457cd992.floppym@gentoo
1 commit: f1024636277d2d1ab20b126f590a30a3457cd992
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Sun Mar 29 18:03:11 2020 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Sun Mar 29 18:08:58 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f1024636
7
8 media-gfx/fontforge: bump to 20200314
9
10 Thanks to Mike Lothian for the cmake port.
11
12 Closes: https://bugs.gentoo.org/714612
13 Package-Manager: Portage-2.3.96_p4, Repoman-2.3.22_p1
14 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
15
16 media-gfx/fontforge/Manifest | 1 +
17 media-gfx/fontforge/files/20200314-tilepath.patch | 31 ++++++
18 media-gfx/fontforge/fontforge-20200314.ebuild | 111 ++++++++++++++++++++++
19 media-gfx/fontforge/metadata.xml | 1 +
20 4 files changed, 144 insertions(+)
21
22 diff --git a/media-gfx/fontforge/Manifest b/media-gfx/fontforge/Manifest
23 index 50996083639..eab92735ad6 100644
24 --- a/media-gfx/fontforge/Manifest
25 +++ b/media-gfx/fontforge/Manifest
26 @@ -1,3 +1,4 @@
27 DIST fontforge-20190317.tar.gz 22762120 BLAKE2B 5cb85d2fb9a2a08fe64548f2667c026e916dd0239d17d8f8d7d2fe8ecb51f2106cf3dc6e6298014c0deadffbfe91925327b483ed4750a171fb621aea8bdee60b SHA512 55f9b0f7cafb1aa5a1461dbf39b52ca6b69a2baa6b761c8c28f86a0bb99e090d9ecc981294f51dadd9297b5ebd3036f01cb4f17b9a97a737eb567b4ae6522f20
28 DIST fontforge-20190801.tar.gz 20766334 BLAKE2B c3206e77da4a966b9e513c41c90e19522f3d1aad990cd3035d7c8a8cc009239811743c12c02df3b02fd91fa5a7738913dba43df14523a738a2232cd2d1a91700 SHA512 78f3e1e94e38e26dcf52c6a0e038753033dc47052b7492f0ac0aaf1b8962e4e4bbf07c2550ef6014ea7290a6429bf669acb0691735efe0aee368480b4b7e6236
29 +DIST fontforge-20200314.tar.xz 13850076 BLAKE2B 5e6ae3b7940a5b3b08811abdfc9d151f231e6d457b219eb0c666e1b831db815b696f345eda0d4d423b7e340f56fca67205734ae19903b3815381080d34b5e95c SHA512 09f5dc93f87ca63668d72d108690604489d6b3cec7eedff1c07ad6d1ce5eae442ab60e79e71ae8b99e9808f3551011788025a86ffc3a9738518d99761d849975
30 DIST fontforge-dist-20170731.tar.xz 13985256 BLAKE2B 7bc49a3b7747de419e4fafb445062873cf9bf56aa73fd7499509b787a1c0fd6c47b0b5d7bfeb2a69d9237f9f66f989af968b0d00e9d5e57030906394f042f29c SHA512 26f7a40714460716a24dd0229fdb027f3766bcc48db64b8993436ddcb6277898f9f3b67ad4fc0be515b2b38e01370d1c7d9ee3c6ece1be862b7d8c9882411f11
31
32 diff --git a/media-gfx/fontforge/files/20200314-tilepath.patch b/media-gfx/fontforge/files/20200314-tilepath.patch
33 new file mode 100644
34 index 00000000000..1e0d077532a
35 --- /dev/null
36 +++ b/media-gfx/fontforge/files/20200314-tilepath.patch
37 @@ -0,0 +1,31 @@
38 +From 43e6087ec9bdbb23b8bb61c07efe6490fab23d73 Mon Sep 17 00:00:00 2001
39 +From: skef <6175836+skef@××××××××××××××××××××.com>
40 +Date: Thu, 19 Mar 2020 17:16:20 -0700
41 +Subject: [PATCH] Tilepath fix (#4231)
42 +
43 +---
44 + fontforgeexe/tilepath.c | 4 ++--
45 + 1 file changed, 2 insertions(+), 2 deletions(-)
46 +
47 +diff --git a/fontforgeexe/tilepath.c b/fontforgeexe/tilepath.c
48 +index b329b54098..2575058eb4 100644
49 +--- a/fontforgeexe/tilepath.c
50 ++++ b/fontforgeexe/tilepath.c
51 +@@ -571,7 +571,7 @@ static void AdjustPoint(TD *td,Spline *spline,bigreal t, FitPoint *to) {
52 + } else {
53 + bigreal s=(dy1*dx2/dy2-dx1);
54 + if ( s>-.00001 && s<.00001 ) { /* essentially parallel */
55 +- to->p.x = x1; to->y = y1;
56 ++ to->p.x = x1; to->p.y = y1;
57 + } else {
58 + bigreal t1 = (x1-x2- dx2/dy2*(y1-y2))/s;
59 + to->p.x = x1 + dx1*t1;
60 +@@ -610,7 +610,7 @@ static SplinePoint *TDMakePoint(TD *td,Spline *old,real t) {
61 +
62 + AdjustPoint(td,old,t,&fp);
63 + new = chunkalloc(sizeof(SplinePoint));
64 +- new->me.x = tp.p.x; new->me.y = tp.p.y;
65 ++ new->me.x = fp.p.x; new->me.y = fp.p.y;
66 + new->nextcp = new->me;
67 + new->prevcp = new->me;
68 + new->nonextcp = new->noprevcp = true;
69
70 diff --git a/media-gfx/fontforge/fontforge-20200314.ebuild b/media-gfx/fontforge/fontforge-20200314.ebuild
71 new file mode 100644
72 index 00000000000..6ff768243ee
73 --- /dev/null
74 +++ b/media-gfx/fontforge/fontforge-20200314.ebuild
75 @@ -0,0 +1,111 @@
76 +# Copyright 2004-2020 Gentoo Authors
77 +# Distributed under the terms of the GNU General Public License v2
78 +
79 +EAPI=7
80 +PYTHON_COMPAT=( python3_{6,7,8} )
81 +
82 +inherit python-single-r1 xdg cmake
83 +
84 +DESCRIPTION="postscript font editor and converter"
85 +HOMEPAGE="https://fontforge.org/"
86 +SRC_URI="https://github.com/fontforge/fontforge/releases/download/${PV}/fontforge-${PV}.tar.xz"
87 +
88 +LICENSE="BSD GPL-3+"
89 +SLOT="0"
90 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
91 +IUSE="doc truetype-debugger gif gtk jpeg png +python readline test tiff svg unicode woff2 X"
92 +RESTRICT="!test? ( test )"
93 +
94 +REQUIRED_USE="
95 + python? ( ${PYTHON_REQUIRED_USE} )
96 + test? ( png python )
97 +"
98 +
99 +RDEPEND="
100 + dev-libs/glib:2
101 + dev-libs/libltdl:0
102 + dev-libs/libxml2:2=
103 + >=media-libs/freetype-2.3.7:2=
104 + gif? ( media-libs/giflib:0= )
105 + jpeg? ( virtual/jpeg:0 )
106 + png? ( media-libs/libpng:0= )
107 + tiff? ( media-libs/tiff:0= )
108 + truetype-debugger? ( >=media-libs/freetype-2.3.8:2[fontforge,-bindist(-)] )
109 + gtk? ( >=x11-libs/gtk+-3.10:3 )
110 + !gtk? (
111 + X? (
112 + >=x11-libs/cairo-1.6:0=
113 + >=x11-libs/pango-1.10:0=[X]
114 + x11-libs/libX11:0=
115 + x11-libs/libXi:0=
116 + )
117 + )
118 + python? ( ${PYTHON_DEPS} )
119 + readline? ( sys-libs/readline:0= )
120 + unicode? ( media-libs/libuninameslist:0= )
121 + woff2? ( media-libs/woff2:0= )
122 +"
123 +DEPEND="${RDEPEND}
124 + !gtk? ( X? ( x11-base/xorg-proto ) )
125 +"
126 +BDEPEND="
127 + sys-devel/gettext
128 + doc? ( dev-python/sphinx )
129 + python? ( ${PYTHON_DEPS} )
130 + test? ( ${RDEPEND} )
131 +"
132 +
133 +PATCHES=(
134 + "${FILESDIR}"/20170731-gethex-unaligned.patch
135 + "${FILESDIR}"/20200314-tilepath.patch
136 +)
137 +
138 +pkg_setup() {
139 + :
140 +}
141 +
142 +src_configure() {
143 + local mycmakeargs=(
144 + -DENABLE_DOCS=$(usex doc ON OFF)
145 + -DENABLE_LIBGIF=$(usex gif ON OFF)
146 + -DENABLE_LIBJPEG=$(usex jpeg ON OFF)
147 + -DENABLE_LIBPNG=$(usex png ON OFF)
148 + -DENABLE_LIBREADLINE=$(usex readline ON OFF)
149 + -DENABLE_LIBSPIRO=OFF # No package in Gentoo
150 + -DENABLE_LIBTIFF=$(usex tiff ON OFF)
151 + -DENABLE_LIBUNINAMESLIST=$(usex unicode ON OFF)
152 + -DENABLE_MAINTAINER_TOOLS=OFF
153 + -DENABLE_PYTHON_EXTENSION=$(usex python ON OFF)
154 + -DENABLE_PYTHON_SCRIPTING=$(usex python ON OFF)
155 + -DENABLE_TILE_PATH=ON
156 + -DENABLE_WOFF2=$(usex woff2 ON OFF)
157 + )
158 +
159 + if use gtk || use X; then
160 + mycmakeargs+=(
161 + -DENABLE_GUI=ON
162 + # Prefer GTK over X11 if both USE flage are enabled
163 + -DENABLE_X11=$(usex gtk OFF ON)
164 + )
165 + else
166 + mycmakeargs+=( -DENABLE_GUI=OFF )
167 + fi
168 +
169 + if use python; then
170 + python_setup
171 + mycmakeargs+=( -DPython3_EXECUTABLE="${PYTHON}" )
172 + fi
173 +
174 + if use truetype-debugger ; then
175 + mycmakeargs+=( -DENABLE_FREETYPE_DEBUGGER="${EPREFIX}/usr/include/freetype2/internal4fontforge" )
176 + fi
177 +
178 + cmake_src_configure
179 +}
180 +
181 +src_install() {
182 + cmake_src_install
183 + docompress -x /usr/share/doc/${PF}/html
184 + einstalldocs
185 + find "${ED}" -name '*.la' -type f -delete || die
186 +}
187
188 diff --git a/media-gfx/fontforge/metadata.xml b/media-gfx/fontforge/metadata.xml
189 index f200b938cf1..b37524e7333 100644
190 --- a/media-gfx/fontforge/metadata.xml
191 +++ b/media-gfx/fontforge/metadata.xml
192 @@ -17,6 +17,7 @@
193 </longdescription>
194 <use>
195 <flag name="truetype-debugger">Enable truetype debugger in fontforge</flag>
196 + <flag name="woff2">Enable support for WOFF2 format</flag>
197 </use>
198 <upstream>
199 <remote-id type="github">troydhanson/uthash</remote-id>