Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/freetype/
Date: Sun, 01 May 2022 18:20:39
Message-Id: 1651429221.bf92f3f25553793f14f04017295a1068df06c54c.polynomial-c@gentoo
1 commit: bf92f3f25553793f14f04017295a1068df06c54c
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Sun May 1 18:19:02 2022 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Sun May 1 18:20:21 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf92f3f2
7
8 media-libs/freetype: Removed old
9
10 Bug: https://bugs.gentoo.org/840224
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 media-libs/freetype/Manifest | 3 -
14 media-libs/freetype/freetype-2.11.1.ebuild | 244 ---------------------------
15 media-libs/freetype/freetype-2.12.0.ebuild | 258 -----------------------------
16 3 files changed, 505 deletions(-)
17
18 diff --git a/media-libs/freetype/Manifest b/media-libs/freetype/Manifest
19 index c051945d09e0..8cc5622db110 100644
20 --- a/media-libs/freetype/Manifest
21 +++ b/media-libs/freetype/Manifest
22 @@ -1,9 +1,6 @@
23 -DIST freetype-2.11.1.tar.xz 2270728 BLAKE2B 15cc03e7b8ba93b2f240b0eee3f1cc07bca77d9ef67a1971d44d6c061a0dff2b13737fa417f7f2dc4e7e6df660223325931f69a107a6b2eaf14425fc71b7ca7b SHA512 0848678482fbe20603a866f02da82c91122014d6f815ba4f1d9c03601c32e3ceb781f721c2b4427b6117d7c9742018af8dbb26566faf018595c70b50f8db3f08
24 DIST freetype-2.12.0.tar.xz 2340352 BLAKE2B 09227c883e52b4e4aefd68d8e4bfaf36eed0c4d92d22d6f5f88e2a69a94be6040ecff7285ca92f30cd9ce71a4af0ffa74141f3263f7a75e29d87b8a4fe27bf08 SHA512 d2426b46ef56268f5030951840a73be9a626129c6fc6ad2ab06e572c9325d0192f47b007798c2ffa3608fe50e296ad129ac41312b1fd3f8864d7e55e8c237c54
25 DIST freetype-2.12.1.tar.xz 2471916 BLAKE2B c4737dc0c6e44e0a911545d604fdb2e8e8b3f5185d3f5dfe4e4561ee2d75b3e5a31afcbb2089306fec4b31ba10324a6ec6499c3735b2b7591c71e96fee4ed278 SHA512 6482de1748dc2cc01e033d21a3b492dadb1f039d13d9179685fdcf985e24d7f587cbca4c27ed8a7fdb7d9ad59612642ac5f4db062443154753295363f45c052f
26 -DIST freetype-doc-2.11.1.tar.xz 2038348 BLAKE2B 2248d16bb12b29294226a67a10328c61b064c8e0ad7fb5f004c2e6da1237175f03d51a48d5df03a3de3bbe935307e573014c079c31468c9f59416bc4e9057a9c SHA512 c5e19d98425491682edc58230c48390925cc4b466169f655cf3b8575ba787a70feecdeb7a16224b132dcc32f17b041483d84056cda8e3132d98b531e46a26c36
27 DIST freetype-doc-2.12.0.tar.xz 2038684 BLAKE2B ac5197f1a31a4c29a218c0a35af4658a289afbea9ad6b5a200dd0518d63a1b647467b3c460b72863a4048269c249ca2fbc83146ba3de6594e00bfa88a701d979 SHA512 49d2ab0f39bafefe18da5bdc28aa11103caa2c130767179945e10183b7efe79b1ee6319e101dd86b7aacd2975d4b206edaf42129dd2516c2424a1d9954c946c6
28 DIST freetype-doc-2.12.1.tar.xz 2038632 BLAKE2B 81225caf1a2c586a8a282a22eaaf23412270d19002bc5b07e94d946d41d089f798724982e354d1701488de37c35bf68f36de88796565f0ebaa3f9fb35c51f532 SHA512 276b91b93e375096bc0f9fa76408a6ea9fa89d4d06e9c9179f88d27d41df3f3bc0ce6939ea7a3fd7c93cb694e78fd6bfb154e969188279e2bca82dcc3afd108d
29 -DIST ft2demos-2.11.1.tar.xz 257240 BLAKE2B 1d620af52e76d1152a0a6aeeb0036d2423e498e371b75c01c408cc0974845abfe2f3f562ad638ca5640ec1b24023d7a47e1688743ca738c2bb1ceea6ee05cfcf SHA512 93d68daefa8a49b4fc987a7356133299fe2a8e012415ea09ad7616ececcfd978fdf9fc7a2d855f7488f51a497d019acb89ef5774484babae66357b3083a883c5
30 DIST ft2demos-2.12.0.tar.xz 263612 BLAKE2B d0cc154084a28a965798ba34c00368d70163d748f52fe360a6bd920bc9b6b962492efe05b7206b9bc4c4fd4770aa7db4279a287d6ba65a81daf7fc2b7a679a96 SHA512 70176ad89eab0121e9f5610f777da7e2f8478e24fbe9aded7f7fc3d7685019d40a0d0d6b586f3499f8589a2923082e3a9bc8ddc66482b8898642230bff5eaae2
31 DIST ft2demos-2.12.1.tar.xz 263656 BLAKE2B fd48dc68bd832e7532e9fae869a19699ab3337e599118bb9f1b76c3bcdcecec3cd3f55f7387508d29baf85b8de4a549aaa0e8af34d988743b1737458e255bdcf SHA512 cd9356152a64d807c75b797d005ca1dd0bde69cc2fadedec101d125cb54b2aaff1f7afa2f20839caba7db66325df7c11ed4883b7e906110356b28d9900caaae7
32
33 diff --git a/media-libs/freetype/freetype-2.11.1.ebuild b/media-libs/freetype/freetype-2.11.1.ebuild
34 deleted file mode 100644
35 index e2ef9bdbfa37..000000000000
36 --- a/media-libs/freetype/freetype-2.11.1.ebuild
37 +++ /dev/null
38 @@ -1,244 +0,0 @@
39 -# Copyright 1999-2022 Gentoo Authors
40 -# Distributed under the terms of the GNU General Public License v2
41 -
42 -EAPI=8
43 -
44 -inherit flag-o-matic libtool multilib-build multilib-minimal toolchain-funcs
45 -
46 -DESCRIPTION="High-quality and portable font engine"
47 -HOMEPAGE="https://www.freetype.org/"
48 -IUSE="X +adobe-cff brotli bzip2 +cleartype-hinting debug fontforge harfbuzz infinality +png static-libs utils"
49 -
50 -if [[ "${PV}" != 9999 ]] ; then
51 - SRC_URI="mirror://sourceforge/freetype/${P/_/}.tar.xz
52 - mirror://nongnu/freetype/${P/_/}.tar.xz
53 - utils? ( mirror://sourceforge/freetype/ft2demos-${PV}.tar.xz
54 - mirror://nongnu/freetype/ft2demos-${PV}.tar.xz )
55 - doc? ( mirror://sourceforge/freetype/${PN}-doc-${PV}.tar.xz
56 - mirror://nongnu/freetype/${PN}-doc-${PV}.tar.xz )"
57 - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
58 - IUSE+=" doc"
59 -else
60 - inherit autotools git-r3
61 -fi
62 -
63 -LICENSE="|| ( FTL GPL-2+ )"
64 -SLOT="2"
65 -
66 -RDEPEND="
67 - >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
68 - brotli? ( app-arch/brotli[${MULTILIB_USEDEP}] )
69 - bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
70 - harfbuzz? ( >=media-libs/harfbuzz-1.3.0[truetype,${MULTILIB_USEDEP}] )
71 - png? ( >=media-libs/libpng-1.2.51:0=[${MULTILIB_USEDEP}] )
72 - utils? (
73 - X? (
74 - >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
75 - >=x11-libs/libXau-1.0.7-r1[${MULTILIB_USEDEP}]
76 - >=x11-libs/libXdmcp-1.1.1-r1[${MULTILIB_USEDEP}]
77 - )
78 - )"
79 -DEPEND="${RDEPEND}"
80 -BDEPEND="
81 - virtual/pkgconfig
82 -"
83 -
84 -_egit_repo_handler() {
85 - if [[ "${PV}" == 9999 ]] ; then
86 - local phase="${1}"
87 - case ${phase} in
88 - fetch|unpack)
89 - :;
90 - ;;
91 - *)
92 - die "Please use this function with either \"fetch\" or \"unpack\""
93 - ;;
94 - esac
95 -
96 - local EGIT_REPO_URI
97 - EGIT_REPO_URI="https://gitlab.freedesktop.org/freetype/freetype.git"
98 - git-r3_src_${phase}
99 - if use utils ; then
100 - EGIT_REPO_URI="https://gitlab.freedesktop.org/freetype/freetype-demos.git"
101 - local EGIT_CHECKOUT_DIR="${WORKDIR}/ft2demos-${PV}"
102 - git-r3_src_${phase}
103 - fi
104 - else
105 - default
106 - fi
107 -}
108 -
109 -src_fetch() {
110 - _egit_repo_handler ${EBUILD_PHASE}
111 -}
112 -
113 -src_unpack() {
114 - _egit_repo_handler ${EBUILD_PHASE}
115 -
116 - if [[ "${PV}" == 9999 ]] ; then
117 - # Need to copy stuff from dlg subproject (#758902)
118 - local dlg_inc_dir="${S}/subprojects/dlg/include/dlg"
119 - local dlg_src_dir="${S}/subprojects/dlg/src/dlg"
120 - local dlg_dest_dir="${S}/include"
121 - mkdir -p "${dlg_dest_dir}/dlg" || die
122 - cp "${dlg_inc_dir}"/{dlg,output}.h "${dlg_dest_dir}/dlg" || die
123 - cp "${dlg_src_dir}"/* "${dlg_dest_dir}" || die
124 - fi
125 -}
126 -
127 -src_prepare() {
128 - if [[ "${PV}" == 9999 ]] ; then
129 - # Do NOT automagically mess with submodules!!!
130 - sed '/setup: copy_submodule/d' -i builds/toplevel.mk || die
131 - # inspired by shipped autogen.sh script
132 - eval $(sed -n \
133 - -e 's/^#define *\(FREETYPE_MAJOR\) *\([0-9][0-9]*\).*/\1=\2/p' \
134 - -e 's/^#define *\(FREETYPE_MINOR\) *\([0-9][0-9]*\).*/\1=\2/p' \
135 - -e 's/^#define *\(FREETYPE_PATCH\) *\([0-9][0-9]*\).*/\1=\2/p' \
136 - include/freetype/freetype.h || die)
137 - FREETYPE="${FREETYPE_MAJOR}.${FREETYPE_MINOR}"
138 - [[ "${FREETYPE_PATCH}" != 0 ]] && FREETYPE+=".${FREETYPE_PATCH}"
139 - pushd builds/unix &>/dev/null || die
140 - sed -e "s;@VERSION@;${FREETYPE};" \
141 - < configure.raw > configure.ac || die
142 - # eautoheader produces broken ftconfig.in
143 - AT_NOEAUTOHEADER="yes" AT_M4DIR="." eautoreconf
144 - unset FREETYPE_MAJOR FREETYPE_MINOR FREETYPE_PATCH FREETYPE
145 - popd &>/dev/null || die
146 - fi
147 -
148 - default
149 -
150 - # This is the same as the 01 patch from infinality
151 - sed '/AUX_MODULES += \(gx\|ot\)valid/s@^# @@' -i modules.cfg || die
152 -
153 - enable_option() {
154 - sed -i -e "/#define $1/ { s:/\* ::; s: \*/:: }" \
155 - include/${PN}/config/ftoption.h \
156 - || die "unable to enable option $1"
157 - }
158 -
159 - disable_option() {
160 - sed -i -e "/#define $1/ { s:^:/* :; s:$: */: }" \
161 - include/${PN}/config/ftoption.h \
162 - || die "unable to disable option $1"
163 - }
164 -
165 - # Will be the new default for >=freetype-2.7.0
166 - disable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING 2"
167 -
168 - if use infinality && use cleartype-hinting ; then
169 - enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 )"
170 - elif use infinality ; then
171 - enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING 1"
172 - elif use cleartype-hinting ; then
173 - enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING 2"
174 - fi
175 -
176 - # Can be disabled with FREETYPE_PROPERTIES="pcf:no-long-family-names=1"
177 - # via environment (new since v2.8)
178 - enable_option PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
179 -
180 - # See https://freetype.org/patents.html (expired!)
181 - enable_option FT_CONFIG_OPTION_SUBPIXEL_RENDERING
182 -
183 - if ! use adobe-cff ; then
184 - enable_option CFF_CONFIG_OPTION_OLD_ENGINE
185 - fi
186 -
187 - if use debug ; then
188 - enable_option FT_DEBUG_LEVEL_TRACE
189 - enable_option FT_DEBUG_MEMORY
190 - fi
191 -
192 - if use utils ; then
193 - cd "${WORKDIR}/ft2demos-${PV}" || die
194 - # Disable tests needing X11 when USE="-X". (bug #177597)
195 - if ! use X ; then
196 - sed -i -e "/EXES\ +=\ ftdiff/ s:^:#:" Makefile || die
197 - fi
198 - cd "${S}" || die
199 - fi
200 -
201 - # we need non-/bin/sh to run configure
202 - if [[ -n ${CONFIG_SHELL} ]] ; then
203 - sed -i -e "1s:^#![[:space:]]*/bin/sh:#!${CONFIG_SHELL}:" \
204 - "${S}"/builds/unix/configure || die
205 - fi
206 -
207 - elibtoolize --patch-only
208 -}
209 -
210 -multilib_src_configure() {
211 - append-flags -fno-strict-aliasing
212 - type -P gmake &> /dev/null && export GNUMAKE=gmake
213 -
214 - local myeconfargs=(
215 - --disable-freetype-config
216 - --enable-shared
217 - --with-zlib
218 - $(use_with brotli)
219 - $(use_with bzip2)
220 - $(use_with harfbuzz)
221 - $(use_with png)
222 - $(use_enable static-libs static)
223 -
224 - # avoid using libpng-config
225 - LIBPNG_CFLAGS="$($(tc-getPKG_CONFIG) --cflags libpng)"
226 - LIBPNG_LDFLAGS="$($(tc-getPKG_CONFIG) --libs libpng)"
227 - )
228 -
229 - case ${CHOST} in
230 - mingw*|*-mingw*) ;;
231 - # Workaround windows mis-detection: bug #654712
232 - # Have to do it for both ${CHOST}-windres and windres
233 - *) myeconfargs+=( ac_cv_prog_RC= ac_cv_prog_ac_ct_RC= ) ;;
234 - esac
235 -
236 - export CC_BUILD="$(tc-getBUILD_CC)"
237 -
238 - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
239 -}
240 -
241 -multilib_src_compile() {
242 - default
243 -
244 - if multilib_is_native_abi && use utils ; then
245 - einfo "Building utils"
246 - # fix for Prefix, bug #339334
247 - emake \
248 - X11_PATH="${EPREFIX}/usr/$(get_libdir)" \
249 - FT2DEMOS=1 TOP_DIR_2="${WORKDIR}/ft2demos-${PV}"
250 - fi
251 -}
252 -
253 -multilib_src_install() {
254 - default
255 -
256 - if multilib_is_native_abi && use utils ; then
257 - einfo "Installing utils"
258 - emake DESTDIR="${D}" FT2DEMOS=1 \
259 - TOP_DIR_2="${WORKDIR}/ft2demos-${PV}" install
260 - fi
261 -}
262 -
263 -multilib_src_install_all() {
264 - if use fontforge ; then
265 - # Probably fontforge needs less but this way makes things simplier...
266 - einfo "Installing internal headers required for fontforge"
267 - local header
268 - find src/truetype include/freetype/internal -name '*.h' | \
269 - while read header ; do
270 - mkdir -p "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
271 - cp ${header} "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
272 - done
273 - fi
274 -
275 - dodoc docs/{CHANGES,CUSTOMIZE,DEBUG,INSTALL.UNIX,*.txt,PROBLEMS,TODO}
276 - if [[ "${PV}" != 9999 ]] && use doc ; then
277 - docinto html
278 - dodoc -r docs/*
279 - fi
280 -
281 - find "${ED}" -type f -name '*.la' -delete || die
282 -}
283
284 diff --git a/media-libs/freetype/freetype-2.12.0.ebuild b/media-libs/freetype/freetype-2.12.0.ebuild
285 deleted file mode 100644
286 index 6dddbb78b16f..000000000000
287 --- a/media-libs/freetype/freetype-2.12.0.ebuild
288 +++ /dev/null
289 @@ -1,258 +0,0 @@
290 -# Copyright 1999-2022 Gentoo Authors
291 -# Distributed under the terms of the GNU General Public License v2
292 -
293 -EAPI=8
294 -
295 -inherit autotools flag-o-matic libtool multilib-build multilib-minimal toolchain-funcs
296 -
297 -DESCRIPTION="High-quality and portable font engine"
298 -HOMEPAGE="https://www.freetype.org/"
299 -IUSE="X +adobe-cff brotli bzip2 +cleartype-hinting debug fontforge harfbuzz infinality +png static-libs svg utils"
300 -
301 -if [[ "${PV}" != 9999 ]] ; then
302 - SRC_URI="mirror://sourceforge/freetype/${P/_/}.tar.xz
303 - mirror://nongnu/freetype/${P/_/}.tar.xz
304 - utils? ( mirror://sourceforge/freetype/ft2demos-${PV}.tar.xz
305 - mirror://nongnu/freetype/ft2demos-${PV}.tar.xz )
306 - doc? ( mirror://sourceforge/freetype/${PN}-doc-${PV}.tar.xz
307 - mirror://nongnu/freetype/${PN}-doc-${PV}.tar.xz )"
308 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
309 - IUSE+=" doc"
310 -else
311 - inherit git-r3
312 -fi
313 -
314 -LICENSE="|| ( FTL GPL-2+ )"
315 -SLOT="2"
316 -
317 -RDEPEND="
318 - >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
319 - brotli? ( app-arch/brotli[${MULTILIB_USEDEP}] )
320 - bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
321 - harfbuzz? ( >=media-libs/harfbuzz-1.3.0[truetype,${MULTILIB_USEDEP}] )
322 - png? ( >=media-libs/libpng-1.2.51:0=[${MULTILIB_USEDEP}] )
323 - utils? (
324 - svg? ( >=gnome-base/librsvg-2.46.0[${MULTILIB_USEDEP}] )
325 - X? ( >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] )
326 - )
327 -"
328 -DEPEND="${RDEPEND}"
329 -BDEPEND="
330 - virtual/pkgconfig
331 -"
332 -
333 -PATCHES=(
334 - "${FILESDIR}/${PN}-2.12.0-librsvg_automagic.patch"
335 -)
336 -
337 -_egit_repo_handler() {
338 - if [[ "${PV}" == 9999 ]] ; then
339 - local phase="${1}"
340 - case ${phase} in
341 - fetch|unpack)
342 - :;
343 - ;;
344 - *)
345 - die "Please use this function with either \"fetch\" or \"unpack\""
346 - ;;
347 - esac
348 -
349 - local EGIT_REPO_URI
350 - EGIT_REPO_URI="https://gitlab.freedesktop.org/freetype/freetype.git"
351 - git-r3_src_${phase}
352 - if use utils ; then
353 - EGIT_REPO_URI="https://gitlab.freedesktop.org/freetype/freetype-demos.git"
354 - local EGIT_CHECKOUT_DIR="${WORKDIR}/ft2demos-${PV}"
355 - git-r3_src_${phase}
356 - fi
357 - else
358 - default
359 - fi
360 -}
361 -
362 -pkg_pretend() {
363 - if use svg && ! use utils ; then
364 - einfo "The \"svg\" USE flag only has effect when the \"utils\" USE flag is also enabled."
365 - fi
366 -}
367 -
368 -src_fetch() {
369 - _egit_repo_handler ${EBUILD_PHASE}
370 -}
371 -
372 -src_unpack() {
373 - _egit_repo_handler ${EBUILD_PHASE}
374 -
375 - if [[ "${PV}" == 9999 ]] ; then
376 - # Need to copy stuff from dlg subproject (#758902)
377 - local dlg_inc_dir="${S}/subprojects/dlg/include/dlg"
378 - local dlg_src_dir="${S}/subprojects/dlg/src/dlg"
379 - local dlg_dest_dir="${S}/include"
380 - mkdir -p "${dlg_dest_dir}/dlg" || die
381 - cp "${dlg_inc_dir}"/{dlg,output}.h "${dlg_dest_dir}/dlg" || die
382 - cp "${dlg_src_dir}"/* "${dlg_dest_dir}" || die
383 - fi
384 -}
385 -
386 -src_prepare() {
387 - if [[ "${PV}" == 9999 ]] ; then
388 - # Do NOT automagically mess with submodules!!!
389 - sed '/setup: copy_submodule/d' -i builds/toplevel.mk || die
390 - # inspired by shipped autogen.sh script
391 - eval $(sed -n \
392 - -e 's/^#define *\(FREETYPE_MAJOR\) *\([0-9][0-9]*\).*/\1=\2/p' \
393 - -e 's/^#define *\(FREETYPE_MINOR\) *\([0-9][0-9]*\).*/\1=\2/p' \
394 - -e 's/^#define *\(FREETYPE_PATCH\) *\([0-9][0-9]*\).*/\1=\2/p' \
395 - include/freetype/freetype.h || die)
396 - FREETYPE="${FREETYPE_MAJOR}.${FREETYPE_MINOR}"
397 - [[ "${FREETYPE_PATCH}" != 0 ]] && FREETYPE+=".${FREETYPE_PATCH}"
398 - pushd builds/unix &>/dev/null || die
399 - sed -e "s;@VERSION@;${FREETYPE};" \
400 - < configure.raw > configure.ac || die
401 - # eautoheader produces broken ftconfig.in
402 - AT_NOEAUTOHEADER="yes" AT_M4DIR="." eautoreconf
403 - unset FREETYPE_MAJOR FREETYPE_MINOR FREETYPE_PATCH FREETYPE
404 - popd &>/dev/null || die
405 - fi
406 -
407 - default
408 -
409 - pushd builds/unix &>/dev/null || die
410 - # eautoheader produces broken ftconfig.in
411 - AT_NOEAUTOHEADER="yes" AT_M4DIR="." eautoreconf
412 - popd &>/dev/null || die
413 -
414 - # This is the same as the 01 patch from infinality
415 - sed '/AUX_MODULES += \(gx\|ot\)valid/s@^# @@' -i modules.cfg || die
416 -
417 - enable_option() {
418 - sed -i -e "/#define $1/ { s:/\* ::; s: \*/:: }" \
419 - include/${PN}/config/ftoption.h \
420 - || die "unable to enable option $1"
421 - }
422 -
423 - disable_option() {
424 - sed -i -e "/#define $1/ { s:^:/* :; s:$: */: }" \
425 - include/${PN}/config/ftoption.h \
426 - || die "unable to disable option $1"
427 - }
428 -
429 - # Will be the new default for >=freetype-2.7.0
430 - disable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING 2"
431 -
432 - if use infinality && use cleartype-hinting ; then
433 - enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 )"
434 - elif use infinality ; then
435 - enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING 1"
436 - elif use cleartype-hinting ; then
437 - enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING 2"
438 - fi
439 -
440 - # Can be disabled with FREETYPE_PROPERTIES="pcf:no-long-family-names=1"
441 - # via environment (new since v2.8)
442 - enable_option PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
443 -
444 - # See https://freetype.org/patents.html (expired!)
445 - enable_option FT_CONFIG_OPTION_SUBPIXEL_RENDERING
446 -
447 - if ! use adobe-cff ; then
448 - enable_option CFF_CONFIG_OPTION_OLD_ENGINE
449 - fi
450 -
451 - if use debug ; then
452 - enable_option FT_DEBUG_LEVEL_TRACE
453 - enable_option FT_DEBUG_MEMORY
454 - fi
455 -
456 - if use utils ; then
457 - cd "${WORKDIR}/ft2demos-${PV}" || die
458 - # Disable tests needing X11 when USE="-X". (bug #177597)
459 - if ! use X ; then
460 - sed -i -e "/EXES\ +=\ ftdiff/ s:^:#:" Makefile || die
461 - fi
462 - cd "${S}" || die
463 - fi
464 -
465 - # we need non-/bin/sh to run configure
466 - if [[ -n ${CONFIG_SHELL} ]] ; then
467 - sed -i -e "1s:^#![[:space:]]*/bin/sh:#!${CONFIG_SHELL}:" \
468 - "${S}"/builds/unix/configure || die
469 - fi
470 -
471 - elibtoolize --patch-only
472 -}
473 -
474 -multilib_src_configure() {
475 - append-flags -fno-strict-aliasing
476 - type -P gmake &> /dev/null && export GNUMAKE=gmake
477 -
478 - local myeconfargs=(
479 - --disable-freetype-config
480 - --enable-shared
481 - --with-zlib
482 - $(use_with brotli)
483 - $(use_with bzip2)
484 - $(use_with harfbuzz)
485 - $(use_with png)
486 - $(use_enable static-libs static)
487 - $(usex utils $(use_with svg librsvg) --without-librsvg)
488 -
489 - # avoid using libpng-config
490 - LIBPNG_CFLAGS="$($(tc-getPKG_CONFIG) --cflags libpng)"
491 - LIBPNG_LDFLAGS="$($(tc-getPKG_CONFIG) --libs libpng)"
492 - )
493 -
494 - case ${CHOST} in
495 - mingw*|*-mingw*) ;;
496 - # Workaround windows mis-detection: bug #654712
497 - # Have to do it for both ${CHOST}-windres and windres
498 - *) myeconfargs+=( ac_cv_prog_RC= ac_cv_prog_ac_ct_RC= ) ;;
499 - esac
500 -
501 - export CC_BUILD="$(tc-getBUILD_CC)"
502 -
503 - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
504 -}
505 -
506 -multilib_src_compile() {
507 - default
508 -
509 - if multilib_is_native_abi && use utils ; then
510 - einfo "Building utils"
511 - # fix for Prefix, bug #339334
512 - emake \
513 - X11_PATH="${EPREFIX}/usr/$(get_libdir)" \
514 - FT2DEMOS=1 TOP_DIR_2="${WORKDIR}/ft2demos-${PV}"
515 - fi
516 -}
517 -
518 -multilib_src_install() {
519 - default
520 -
521 - if multilib_is_native_abi && use utils ; then
522 - einfo "Installing utils"
523 - emake DESTDIR="${D}" FT2DEMOS=1 \
524 - TOP_DIR_2="${WORKDIR}/ft2demos-${PV}" install
525 - fi
526 -}
527 -
528 -multilib_src_install_all() {
529 - if use fontforge ; then
530 - # Probably fontforge needs less but this way makes things simplier...
531 - einfo "Installing internal headers required for fontforge"
532 - local header
533 - find src/truetype include/freetype/internal -name '*.h' | \
534 - while read header ; do
535 - mkdir -p "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
536 - cp ${header} "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
537 - done
538 - fi
539 -
540 - dodoc docs/{CHANGES,CUSTOMIZE,DEBUG,INSTALL.UNIX,*.txt,PROBLEMS,TODO}
541 - if [[ "${PV}" != 9999 ]] && use doc ; then
542 - docinto html
543 - dodoc -r docs/*
544 - fi
545 -
546 - find "${ED}" -type f -name '*.la' -delete || die
547 -}