1 |
commit: de097e37dfa73706c033420fc8bdd147d2975788 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon May 7 07:03:03 2018 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon May 7 07:03:03 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de097e37 |
7 |
|
8 |
games-engines/scummvm: Added improved freetype_pkgconfig patch |
9 |
|
10 |
which should be ready for upstream inclusion. |
11 |
|
12 |
Bug: https://bugs.gentoo.org/655032 |
13 |
Package-Manager: Portage-2.3.36, Repoman-2.3.9 |
14 |
|
15 |
.../files/scummvm-2.0.0-freetype_pkgconfig.patch | 117 +++++++++++++++------ |
16 |
games-engines/scummvm/scummvm-2.0.0.ebuild | 1 + |
17 |
2 files changed, 84 insertions(+), 34 deletions(-) |
18 |
|
19 |
diff --git a/games-engines/scummvm/files/scummvm-2.0.0-freetype_pkgconfig.patch b/games-engines/scummvm/files/scummvm-2.0.0-freetype_pkgconfig.patch |
20 |
index 669cffc945c..ca5c5e89271 100644 |
21 |
--- a/games-engines/scummvm/files/scummvm-2.0.0-freetype_pkgconfig.patch |
22 |
+++ b/games-engines/scummvm/files/scummvm-2.0.0-freetype_pkgconfig.patch |
23 |
@@ -1,50 +1,99 @@ |
24 |
-From 86c7fd67e5ab2e721de8493d162d7605b1b08823 Mon Sep 17 00:00:00 2001 |
25 |
+From 48a3f5bcba1837517e3d9d029ebe5e8fbd3f0966 Mon Sep 17 00:00:00 2001 |
26 |
From: Lars Wendler <polynomial-c@g.o> |
27 |
-Date: Sun, 6 May 2018 10:22:48 +0200 |
28 |
-Subject: [PATCH] Use pkg-config to find freetype if freetype-config is not |
29 |
- available |
30 |
+Date: Sun, 6 May 2018 20:55:29 +0200 |
31 |
+Subject: [PATCH] Prefer pkg-config over freetype-config if possible |
32 |
|
33 |
+As of freetype-2.9.1 the freetype-config script no longer gets installed |
34 |
+by default. |
35 |
--- |
36 |
- configure | 17 +++++++++++------ |
37 |
- 1 file changed, 11 insertions(+), 6 deletions(-) |
38 |
+ configure | 56 ++++++++++++++++++++++++++++++++++++------------------- |
39 |
+ 1 file changed, 37 insertions(+), 19 deletions(-) |
40 |
|
41 |
diff --git a/configure b/configure |
42 |
-index 8e2a387acc..e3c15a9a2a 100755 |
43 |
+index 8e2a387acc..210951e343 100755 |
44 |
--- a/configure |
45 |
+++ b/configure |
46 |
-@@ -4674,7 +4674,13 @@ if test "$_freetype2" != "no"; then |
47 |
- find_freetypeconfig |
48 |
- |
49 |
- if test -z "$_freetypeconfig"; then |
50 |
+@@ -204,6 +204,7 @@ _sparklepath= |
51 |
+ _sdlconfig=sdl2-config |
52 |
+ _libcurlconfig=curl-config |
53 |
+ _freetypeconfig=freetype-config |
54 |
++_freetype_found="false" |
55 |
+ _sdlpath="$PATH" |
56 |
+ _freetypepath="$PATH" |
57 |
+ _libcurlpath="$PATH" |
58 |
+@@ -4668,28 +4669,45 @@ echo "$_libunity" |
59 |
+ # |
60 |
+ # Check for FreeType2 to be present |
61 |
+ # |
62 |
+-if test "$_freetype2" != "no"; then |
63 |
+- |
64 |
+- # Look for the freetype-config script |
65 |
+- find_freetypeconfig |
66 |
+- |
67 |
+- if test -z "$_freetypeconfig"; then |
68 |
- _freetype2=no |
69 |
-+ if pkg-config --exists freetype2; then |
70 |
-+ FREETYPE2_LIBS=`pkg-config --libs freetype2` |
71 |
-+ FREETYPE2_CFLAGS=`pkg-config --cflags freetype2` |
72 |
-+ _freetype2=yes |
73 |
-+ else |
74 |
-+ _freetype2=no |
75 |
-+ fi |
76 |
++find_freetype() { |
77 |
++ # Wrapper function which tries to find freetype |
78 |
++ # either by callimg freetype-config or by using |
79 |
++ # pkg-config. |
80 |
++ # As of freetype-2.9.1 the freetype-config file |
81 |
++ # no longer gets installed by default. |
82 |
++ |
83 |
++ if pkg-config --exists freetype2; then |
84 |
++ FREETYPE2_LIBS=`pkg-config --libs freetype2` |
85 |
++ FREETYPE2_CFLAGS=`pkg-config --cflags freetype2` |
86 |
++ FREETYPE2_STATIC_LIBS=`pkg-config --static --libs freetype2` |
87 |
++ _freetype_found="true" |
88 |
else |
89 |
- # Since 2.3.12, freetype-config prepends $SYSROOT to everything. |
90 |
- # This means we can't pass it a --prefix that includes $SYSROOT. |
91 |
-@@ -4714,13 +4720,12 @@ EOF |
92 |
+- # Since 2.3.12, freetype-config prepends $SYSROOT to everything. |
93 |
+- # This means we can't pass it a --prefix that includes $SYSROOT. |
94 |
+- freetypeprefix="$_freetypepath" |
95 |
+- if test -n "$SYSROOT" -a "$SYSROOT" != "/"; then |
96 |
+- teststring=VeryImplausibleSysrootX1Y2Z3 |
97 |
+- if ( env SYSROOT=/$teststring "$_freetypeconfig" --cflags | grep $teststring 2> /dev/null > /dev/null ); then |
98 |
+- echo "Adapting FreeType prefix to SYSROOT" >> "$TMPLOG" |
99 |
+- freetypeprefix="${freetypeprefix##$SYSROOT}" |
100 |
++ # Look for the freetype-config script |
101 |
++ find_freetypeconfig |
102 |
++ if test -n "$_freetypeconfig"; then |
103 |
++ # Since 2.3.12, freetype-config prepends $SYSROOT to everything. |
104 |
++ # This means we can't pass it a --prefix that includes $SYSROOT. |
105 |
++ freetypeprefix="$_freetypepath" |
106 |
++ if test -n "$SYSROOT" -a "$SYSROOT" != "/"; then |
107 |
++ teststring=VeryImplausibleSysrootX1Y2Z3 |
108 |
++ if ( env SYSROOT=/$teststring "$_freetypeconfig" --cflags | grep $teststring 2> /dev/null > /dev/null ); then |
109 |
++ echo "Adapting FreeType prefix to SYSROOT" >> "$TMPLOG" |
110 |
++ freetypeprefix="${freetypeprefix##$SYSROOT}" |
111 |
++ fi |
112 |
fi |
113 |
- cc_check_clean |
114 |
++ FREETYPE2_LIBS=`$_freetypeconfig --prefix="$freetypeprefix" --libs` |
115 |
++ FREETYPE2_CFLAGS=`$_freetypeconfig --prefix="$freetypeprefix" --cflags` |
116 |
++ FREETYPE2_STATIC_LIBS=`$_freetypeconfig --prefix="$freetypeprefix" --static --libs 2>/dev/null` |
117 |
++ _freetype_found="true" |
118 |
fi |
119 |
-- |
120 |
-- if test "$_freetype2" = "yes"; then |
121 |
-- append_var LIBS "$FREETYPE2_LIBS" |
122 |
-- append_var INCLUDES "$FREETYPE2_CFLAGS" |
123 |
-- fi |
124 |
- fi |
125 |
- |
126 |
-+ if test "$_freetype2" = "yes"; then |
127 |
-+ append_var LIBS "$FREETYPE2_LIBS" |
128 |
-+ append_var INCLUDES "$FREETYPE2_CFLAGS" |
129 |
+ fi |
130 |
- fi |
131 |
++} |
132 |
+ |
133 |
+- FREETYPE2_LIBS=`$_freetypeconfig --prefix="$freetypeprefix" --libs` |
134 |
+- FREETYPE2_CFLAGS=`$_freetypeconfig --prefix="$freetypeprefix" --cflags` |
135 |
+- |
136 |
++if test "$_freetype2" != "no"; then |
137 |
++ find_freetype |
138 |
++ if test $_freetype_found != true; then |
139 |
++ _freetype2=no |
140 |
++ else |
141 |
+ if test "$_freetype2" = "auto"; then |
142 |
+ _freetype2=no |
143 |
|
144 |
- echocheck "FreeType2" |
145 |
+@@ -4709,7 +4727,7 @@ EOF |
146 |
+ # required flags for static linking. We abuse this to detect |
147 |
+ # FreeType2 builds which are static themselves. |
148 |
+ if test "$_freetype2" != "yes"; then |
149 |
+- FREETYPE2_LIBS=`$_freetypeconfig --prefix="$_freetypepath" --static --libs 2>/dev/null` |
150 |
++ FREETYPE2_LIBS="$FREETYPE2_STATIC_LIBS" |
151 |
+ cc_check_no_clean $FREETYPE2_CFLAGS $FREETYPE2_LIBS && _freetype2=yes |
152 |
+ fi |
153 |
+ cc_check_clean |
154 |
-- |
155 |
2.17.0 |
156 |
|
157 |
|
158 |
diff --git a/games-engines/scummvm/scummvm-2.0.0.ebuild b/games-engines/scummvm/scummvm-2.0.0.ebuild |
159 |
index 0df104f23aa..b4df47b76af 100644 |
160 |
--- a/games-engines/scummvm/scummvm-2.0.0.ebuild |
161 |
+++ b/games-engines/scummvm/scummvm-2.0.0.ebuild |
162 |
@@ -30,6 +30,7 @@ RDEPEND=">=media-libs/libsdl2-2.0.0[sound,joystick,video] |
163 |
fluidsynth? ( media-sound/fluidsynth )" |
164 |
DEPEND="${RDEPEND} |
165 |
app-arch/xz-utils |
166 |
+ truetype? ( virtual/pkgconfig ) |
167 |
x86? ( dev-lang/nasm )" |
168 |
|
169 |
S="${WORKDIR}/${P/_/}" |