1 |
commit: 838c92297214d6330844df0b15ba61c33c27c430 |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Sep 30 15:48:24 2016 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 30 20:16:13 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=838c9229 |
7 |
|
8 |
media-libs/freetype: avoid redefining TT_CONFIG_OPTION_SUBPIXEL_HINTING |
9 |
|
10 |
Adjust the enable_option function to remvoe comments instead of appending an |
11 |
additional line. This should resolve a build failure in sys-boot/grub. |
12 |
|
13 |
Also allow both cleartype and infinality to be enabled simultaneously, as |
14 |
documented in ftoption.h. |
15 |
|
16 |
Bug: https://bugs.gentoo.org/595558 |
17 |
Package-Manager: portage-2.3.1_p4_p550764 |
18 |
|
19 |
.../{freetype-2.7-r1.ebuild => freetype-2.7-r2.ebuild} | 17 ++++++++--------- |
20 |
1 file changed, 8 insertions(+), 9 deletions(-) |
21 |
|
22 |
diff --git a/media-libs/freetype/freetype-2.7-r1.ebuild b/media-libs/freetype/freetype-2.7-r2.ebuild |
23 |
similarity index 93% |
24 |
rename from media-libs/freetype/freetype-2.7-r1.ebuild |
25 |
rename to media-libs/freetype/freetype-2.7-r2.ebuild |
26 |
index c7c0aaf..8650a68 100644 |
27 |
--- a/media-libs/freetype/freetype-2.7-r1.ebuild |
28 |
+++ b/media-libs/freetype/freetype-2.7-r2.ebuild |
29 |
@@ -41,8 +41,6 @@ RDEPEND="${CDEPEND} |
30 |
abi_x86_32? ( utils? ( !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] ) )" |
31 |
PDEPEND="infinality? ( media-libs/fontconfig-infinality )" |
32 |
|
33 |
-REQUIRED_USE="?? ( cleartype_hinting infinality )" |
34 |
- |
35 |
PATCHES=( |
36 |
# This is the same as the 01 patch from infinality |
37 |
"${FILESDIR}"/${PN}-2.7-enable-valid.patch |
38 |
@@ -52,27 +50,28 @@ PATCHES=( |
39 |
|
40 |
src_prepare() { |
41 |
enable_option() { |
42 |
- sed -i -e "/#define $1/a #define $1" \ |
43 |
+ sed -i -e "/#define $1/ { s:/\* ::; s: \*/:: }" \ |
44 |
include/${PN}/config/ftoption.h \ |
45 |
|| die "unable to enable option $1" |
46 |
} |
47 |
|
48 |
disable_option() { |
49 |
- sed -i -e "/#define $1/ { s:^:/*:; s:$:*/: }" \ |
50 |
+ sed -i -e "/#define $1/ { s:^:/* :; s:$: */: }" \ |
51 |
include/${PN}/config/ftoption.h \ |
52 |
|| die "unable to disable option $1" |
53 |
} |
54 |
|
55 |
default |
56 |
|
57 |
- if use infinality; then |
58 |
- # FT_CONFIG_OPTION_SUBPIXEL_RENDERING is already enabled in freetype-2.4.11 |
59 |
+ # Will be the new default for >=freetype-2.7.0 |
60 |
+ disable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING 2" |
61 |
+ |
62 |
+ if use infinality && use cleartype_hinting; then |
63 |
+ enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 )" |
64 |
+ elif use infinality; then |
65 |
enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING 1" |
66 |
elif use cleartype_hinting; then |
67 |
- # Will be the new default for >=freetype-2.7.0 |
68 |
enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING 2" |
69 |
- else |
70 |
- disable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING 2" |
71 |
fi |
72 |
|
73 |
if ! use bindist; then |