Gentoo Archives: gentoo-commits

From: NP Hardass <np-hardass@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/wine-d3d9/files/, app-emulation/wine-d3d9/
Date: Sat, 30 Sep 2017 19:35:23
Message-Id: 1506800105.100da0ef6553e87ba8997dbdbc61e6991e9019f5.np-hardass@gentoo
1 commit: 100da0ef6553e87ba8997dbdbc61e6991e9019f5
2 Author: NP-Hardass <NP-Hardass <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 30 19:11:43 2017 +0000
4 Commit: NP Hardass <np-hardass <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 30 19:35:05 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=100da0ef
7
8 app-emulation/wine-d3d9: Backport freetype-2.8.1 support
9
10 Bug: https://bugs.gentoo.org/631376
11 Bug: https://bugs.gentoo.org/631676
12 Package-Manager: Portage-2.3.10, Repoman-2.3.3
13
14 app-emulation/wine-d3d9/Manifest | 2 +-
15 app-emulation/wine-d3d9/files/builtin_ms_va_list.c | 9 ----
16 app-emulation/wine-d3d9/files/pr66838.c | 36 -------------
17 app-emulation/wine-d3d9/files/pr69140.c | 37 --------------
18 .../wine-d3d9/files/wine-1.5.26-winegcc.patch | 59 ----------------------
19 .../wine-d3d9/files/wine-1.6-memset-O3.patch | 21 --------
20 .../files/wine-1.9.5-multilib-portage.patch | 31 ------------
21 .../files/wine-2.0-multislot-apploader.patch | 14 -----
22 app-emulation/wine-d3d9/wine-d3d9-2.0.ebuild | 39 +++++++++-----
23 app-emulation/wine-d3d9/wine-d3d9-2.1.ebuild | 39 +++++++++-----
24 app-emulation/wine-d3d9/wine-d3d9-2.10.ebuild | 39 +++++++++-----
25 app-emulation/wine-d3d9/wine-d3d9-2.11.ebuild | 39 +++++++++-----
26 app-emulation/wine-d3d9/wine-d3d9-2.12.ebuild | 39 +++++++++-----
27 app-emulation/wine-d3d9/wine-d3d9-2.13.ebuild | 39 +++++++++-----
28 app-emulation/wine-d3d9/wine-d3d9-2.14.ebuild | 39 +++++++++-----
29 app-emulation/wine-d3d9/wine-d3d9-2.15.ebuild | 39 +++++++++-----
30 app-emulation/wine-d3d9/wine-d3d9-2.16.ebuild | 39 +++++++++-----
31 app-emulation/wine-d3d9/wine-d3d9-2.17.ebuild | 39 +++++++++-----
32 app-emulation/wine-d3d9/wine-d3d9-2.2.ebuild | 39 +++++++++-----
33 app-emulation/wine-d3d9/wine-d3d9-2.3.ebuild | 39 +++++++++-----
34 app-emulation/wine-d3d9/wine-d3d9-2.4.ebuild | 39 +++++++++-----
35 app-emulation/wine-d3d9/wine-d3d9-2.5.ebuild | 39 +++++++++-----
36 app-emulation/wine-d3d9/wine-d3d9-2.6.ebuild | 39 +++++++++-----
37 app-emulation/wine-d3d9/wine-d3d9-2.7.ebuild | 39 +++++++++-----
38 app-emulation/wine-d3d9/wine-d3d9-2.8.ebuild | 39 +++++++++-----
39 app-emulation/wine-d3d9/wine-d3d9-2.9.ebuild | 39 +++++++++-----
40 app-emulation/wine-d3d9/wine-d3d9-9999.ebuild | 36 ++++++++-----
41 27 files changed, 511 insertions(+), 436 deletions(-)
42
43 diff --git a/app-emulation/wine-d3d9/Manifest b/app-emulation/wine-d3d9/Manifest
44 index f6e6ee9fabb..92a378efcd0 100644
45 --- a/app-emulation/wine-d3d9/Manifest
46 +++ b/app-emulation/wine-d3d9/Manifest
47 @@ -1,3 +1,4 @@
48 +DIST gentoo-wine-patches-20170830.tar.xz 58456 SHA256 fb7781d0ae360cbc3860c2d2e81527a1b903da824c01f5d5040e95aaf99a3970 SHA512 5e5159e3252b246bba0ef7fdba345db3ab1071c5b8b8b625f98eda18779d4024c5b76bdbf49ce7bd5c6b01b422807adf76820beddb2b4a6ee9e67d13052cc575 WHIRLPOOL a79be264bab3fcdeee06fef47efd28e6e1125254ac7f82300cb6ba2591ef69cd76b5fed8f778b1849a0659e680e9fc785f0273d55cb2ed95648a74dffa5e22d2
49 DIST wine-2.0.tar.bz2 23662707 SHA256 9756f5a2129b6a83ba701e546173cbff86caa671b0af73eb8f72c03b20c066c6 SHA512 b0a57ba8202d9fc396e5bfb7a7718d6bababbed8f3351e7fdc36afa37f35a871e04903757618f73427aeb71a52b2d323977d79e48f8b38d636f23fd404441186 WHIRLPOOL fa9f774d87dae73c7d1f3b86dc3b03ea27065eb6140f1cac13c82fe16f7ebff8f8365ed447220cf5c2788b9f4aae7c482e4f9e2e69f47e5435209e148f5dbdfe
50 DIST wine-2.1.tar.xz 18887032 SHA256 bfb9abf63691c93df28d9599aaa866dc2b4e27209b3b7b546df8a37d7d9d1e6e SHA512 03d678ee6e89c2804813f2827255fcf59e96ca9a45b7d8ac441cfc84f835e5e5689c70a79a41a04c631e1add7807fa4a5758acef3bd7aadfb2e92e68958c6ef6 WHIRLPOOL 063d935f1ff0922100641f2f53cdac23d2993a83182d45e028e485fd7d0a13bc5cfb77bca76550b1537b3f42fecacef7fd64785adbf6425af823f56f96973b54
51 DIST wine-2.10.tar.xz 19209580 SHA256 488df7ffd2e81da455bf428fc9eb784bb4273a890334500895665711bd52f179 SHA512 8807e16a571bf45d99097ad5fdfb9fe755f6dbe84010a330fed82f1d48c76b7f19589bfc0e5dde0b9e49a608fd0501db3f7e3e129e4d9d34bcae03bc51a73139 WHIRLPOOL e9a8248aac31593fbac28a3d8d4e62bfce14a7c41cc416ebfca8606518d28efd31b32196133da211f75f48bd228bd5d21fcbbc0479293e813ed99b258b37126e
52 @@ -34,4 +35,3 @@ DIST wine-d3d9-2.6.tar.gz 48702 SHA256 06ed18f2d5fff04613ea1401c37ad70e163135c15
53 DIST wine-d3d9-2.7.tar.gz 48708 SHA256 df6ed1e50d8af0624b8f4f658705f75102094f6e17fec53ec8461991ce5dca2a SHA512 d258e81a942f905255a637aa80dd647878691caa79adc52fd79f66ce1320d42d7d36ea776876d6a26a2c711a168da4c64f27fa8744ca6d8318c5526f8a8af75a WHIRLPOOL 2d62cab5e3b14eaf29ecc96ac97555f48845a78c751040a850750d3b19fbc64efb3f3589dd3475a03cb1e3dff3e200528dabd2952b1ee8d0520a5db0d7db154b
54 DIST wine-d3d9-2.8.tar.gz 48700 SHA256 c67de9fee6e97859896aa2326fbc245e8b0f7393a1c6341126607b03afebc964 SHA512 bb933b51d0022ce616331f2550faedeff3058007525b4519833b925c57999ab08b08380b8967d48ad7c56458e812342428388a5eac2ed8fcdd8cfbfee74a8e8c WHIRLPOOL 52c8538e3f4b3be3412ee544efebae69c3de781255e12298d544f47523aba3afaadbffa8dedc463c207b0ae8a0a92599beca17017f266648b9b229847990ae2e
55 DIST wine-d3d9-2.9.tar.gz 48693 SHA256 32b847adf74c293e858800248aa1b164688f98cde89ca4d2cd0808fae7f94340 SHA512 89d06587481f7702b6884c83627a27c7b38a078e2b333bea2612a58840695211c19ab4ca02669c983580f95ae42ef114020f6b6bbb1a17d72449c0ed2212dc49 WHIRLPOOL e32b261f6e87580eec2c2ee57848b08b2487d1f280b8b257403e0722ec1b44cb31dcb240d89757599be2c3c6d958c48f92510bc625e5c05fc08116d13c303168
56 -DIST wine-desktop-common-20150204.tar.gz 99491 SHA256 444ad6b52b5290ec7d160e2cc40e4ba0910b4c4983dba1ceb054b81b09b24b5e SHA512 1f3d7022c5cff87ed3b8fd3b7cd14397c6f23b98fe6a7c583ac0d2f439ff29d943f57375f23687aa6519ff1d84ff07624a9a712d6f19fa207fd26d01edcb6688 WHIRLPOOL e9810b2952d25c05d831000e00e423de86809ec31b9a033fd4c64a70709da7338a9afc9e632e678f49c789a8a3702fbd0113226770cdb806623f2de371a16f54
57
58 diff --git a/app-emulation/wine-d3d9/files/builtin_ms_va_list.c b/app-emulation/wine-d3d9/files/builtin_ms_va_list.c
59 deleted file mode 100644
60 index f36fc2609a0..00000000000
61 --- a/app-emulation/wine-d3d9/files/builtin_ms_va_list.c
62 +++ /dev/null
63 @@ -1,9 +0,0 @@
64 -/* Taken from Wine's configure script. LGPL 2.1+ */
65 -
66 -#include <stdarg.h>
67 -
68 -int main(void)
69 -{
70 - void func(__builtin_ms_va_list *args);
71 - return 0;
72 -}
73
74 diff --git a/app-emulation/wine-d3d9/files/pr66838.c b/app-emulation/wine-d3d9/files/pr66838.c
75 deleted file mode 100644
76 index cd616859427..00000000000
77 --- a/app-emulation/wine-d3d9/files/pr66838.c
78 +++ /dev/null
79 @@ -1,36 +0,0 @@
80 -/* From gcc svn, /branches/gcc-5-branch/gcc/testsuite/gcc.target/i386/pr66838.c */
81 -/* Copyrighted and distributed under the same terms as gcc */
82 -
83 -void abort (void);
84 -
85 -char global;
86 -
87 -__attribute__((sysv_abi, noinline, noclone))
88 -void sysv_abi_func(char const *desc, void *local)
89 -{
90 - register int esi asm ("esi");
91 - register int edi asm ("edi");
92 -
93 - if (local != &global)
94 - abort ();
95 -
96 - /* Clobber some of the extra SYSV ABI registers. */
97 - asm volatile ("movl\t%2, %0\n\tmovl\t%2, %1"
98 - : "=r" (esi), "=r" (edi)
99 - : "i" (0xdeadbeef));
100 -}
101 -
102 -__attribute__((ms_abi, noinline, noclone))
103 -void ms_abi_func ()
104 -{
105 - sysv_abi_func ("1st call", &global);
106 - sysv_abi_func ("2nd call", &global);
107 - sysv_abi_func ("3rd call", &global);
108 -}
109 -
110 -int
111 -main(void)
112 -{
113 - ms_abi_func();
114 - return 0;
115 -}
116
117 diff --git a/app-emulation/wine-d3d9/files/pr69140.c b/app-emulation/wine-d3d9/files/pr69140.c
118 deleted file mode 100644
119 index 7c9e001f301..00000000000
120 --- a/app-emulation/wine-d3d9/files/pr69140.c
121 +++ /dev/null
122 @@ -1,37 +0,0 @@
123 -/* { dg-do compile { target lp64 } } */
124 -/* { dg-options "-O2 -mincoming-stack-boundary=3" } */
125 -
126 -typedef struct {
127 - unsigned int buf[4];
128 - unsigned char in[64];
129 -} MD4_CTX;
130 -
131 -static void
132 -MD4Transform (unsigned int buf[4], const unsigned int in[16])
133 -{
134 - unsigned int a, b, c, d;
135 - (b) += ((((c)) & ((d))) | ((~(c)) & ((a)))) + (in[7]);
136 - (a) += ((((b)) & ((c))) | ((~(b)) & ((d)))) + (in[8]);
137 - (d) += ((((a)) & ((b))) | ((~(a)) & ((c)))) + (in[9]);
138 - buf[3] += d;
139 -}
140 -
141 -void __attribute__((ms_abi))
142 -MD4Update (MD4_CTX *ctx, const unsigned char *buf)
143 -{
144 - MD4Transform( ctx->buf, (unsigned int *)ctx->in);
145 - MD4Transform( ctx->buf, (unsigned int *)ctx->in);
146 -}
147 -
148 -int
149 -main(void)
150 -{
151 - MD4_CTX ctx_test =
152 - {
153 - { 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476 },
154 - { 0, 0 }
155 - };
156 - unsigned char buf[64];
157 -
158 - MD4Update(&ctx_test, (const unsigned char *) &buf);
159 -}
160
161 diff --git a/app-emulation/wine-d3d9/files/wine-1.5.26-winegcc.patch b/app-emulation/wine-d3d9/files/wine-1.5.26-winegcc.patch
162 deleted file mode 100644
163 index 2045e343401..00000000000
164 --- a/app-emulation/wine-d3d9/files/wine-1.5.26-winegcc.patch
165 +++ /dev/null
166 @@ -1,59 +0,0 @@
167 -http://bugs.gentoo.org/260726
168 -
169 -diff --git a/tools/winebuild/main.c b/tools/winebuild/main.c
170 -index 16b4165..5c77267 100644
171 ---- a/tools/winebuild/main.c
172 -+++ b/tools/winebuild/main.c
173 -@@ -48,10 +48,13 @@ int link_ext_symbols = 0;
174 - int force_pointer_size = 0;
175 - int unwind_tables = 0;
176 -
177 -+#undef FORCE_POINTER_SIZE
178 - #ifdef __i386__
179 - enum target_cpu target_cpu = CPU_x86;
180 -+#define FORCE_POINTER_SIZE
181 - #elif defined(__x86_64__)
182 - enum target_cpu target_cpu = CPU_x86_64;
183 -+#define FORCE_POINTER_SIZE
184 - #elif defined(__powerpc__)
185 - enum target_cpu target_cpu = CPU_POWERPC;
186 - #elif defined(__arm__)
187 -@@ -611,6 +614,10 @@ int main(int argc, char **argv)
188 - signal( SIGTERM, exit_on_signal );
189 - signal( SIGINT, exit_on_signal );
190 -
191 -+#ifdef FORCE_POINTER_SIZE
192 -+ force_pointer_size = sizeof(size_t);
193 -+#endif
194 -+
195 - output_file = stdout;
196 - argv = parse_options( argc, argv, spec );
197 -
198 -diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
199 -index 06aa200..c44d2e3 100644
200 ---- a/tools/winegcc/winegcc.c
201 -+++ b/tools/winegcc/winegcc.c
202 -@@ -213,10 +213,13 @@ struct options
203 - strarray* files;
204 - };
205 -
206 -+#undef FORCE_POINTER_SIZE
207 - #ifdef __i386__
208 - static const enum target_cpu build_cpu = CPU_x86;
209 -+#define FORCE_POINTER_SIZE
210 - #elif defined(__x86_64__)
211 - static const enum target_cpu build_cpu = CPU_x86_64;
212 -+#define FORCE_POINTER_SIZE
213 - #elif defined(__powerpc__)
214 - static const enum target_cpu build_cpu = CPU_POWERPC;
215 - #elif defined(__arm__)
216 -@@ -1258,6 +1261,9 @@ int main(int argc, char **argv)
217 - opts.linker_args = strarray_alloc();
218 - opts.compiler_args = strarray_alloc();
219 - opts.winebuild_args = strarray_alloc();
220 -+#ifdef FORCE_POINTER_SIZE
221 -+ opts.force_pointer_size = sizeof(size_t);
222 -+#endif
223 -
224 - /* determine the processor type */
225 - if (strendswith(argv[0], "winecpp")) opts.processor = proc_cpp;
226
227 diff --git a/app-emulation/wine-d3d9/files/wine-1.6-memset-O3.patch b/app-emulation/wine-d3d9/files/wine-1.6-memset-O3.patch
228 deleted file mode 100644
229 index 75372f86914..00000000000
230 --- a/app-emulation/wine-d3d9/files/wine-1.6-memset-O3.patch
231 +++ /dev/null
232 @@ -1,21 +0,0 @@
233 -Avoid "undefined reference to `memset'" error when building with
234 -USE=custom-cflags and -O3 in CFLAGS with gcc-4.8.
235 -
236 -See:
237 -
238 -http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56888
239 -http://bugs.winehq.org/show_bug.cgi?id=33521
240 -https://bugs.gentoo.org/show_bug.cgi?id=480508
241 -
242 -diff --git a/configure.ac b/configure.ac
243 -index d8033cf..fe7cc7d 100644
244 ---- a/configure.ac
245 -+++ b/configure.ac
246 -@@ -1767,6 +1767,7 @@ then
247 -
248 - dnl Check for some compiler flags
249 - WINE_TRY_CFLAGS([-fno-builtin],[AC_SUBST(BUILTINFLAG,"-fno-builtin")])
250 -+ WINE_TRY_CFLAGS([-fno-tree-loop-distribute-patterns])
251 - WINE_TRY_CFLAGS([-fno-strict-aliasing])
252 - dnl clang needs to be told to fail on unknown options
253 - saved_CFLAGS=$CFLAGS
254
255 diff --git a/app-emulation/wine-d3d9/files/wine-1.9.5-multilib-portage.patch b/app-emulation/wine-d3d9/files/wine-1.9.5-multilib-portage.patch
256 deleted file mode 100644
257 index c19d0d8a0b0..00000000000
258 --- a/app-emulation/wine-d3d9/files/wine-1.9.5-multilib-portage.patch
259 +++ /dev/null
260 @@ -1,31 +0,0 @@
261 -https://bugs.gentoo.org/show_bug.cgi?id=395615
262 -
263 -Explicitly add the required -m32/m64 to *FLAGS; this overrides any
264 -arch-specific -m* flags that may have been appended by multilib-portage.
265 -
266 -Even though -m32/m64 is now added to *FLAGS, -m32/m64 still has to be
267 -explicitly added to CC and CXX due to wine's build system. For example,
268 -winegcc saves the build-time value of CC and uses it at runtime.
269 -
270 ---- a/configure.ac 2016-03-05 20:53:50.574628728 -0500
271 -+++ b/configure.ac 2016-03-05 20:57:54.945617833 -0500
272 -@@ -141,6 +141,9 @@
273 - then
274 - CC="$CC -m32"
275 - CXX="$CXX -m32"
276 -+ CFLAGS="$CFLAGS -m32"
277 -+ LDFLAGS="$LDFLAGS -m32"
278 -+ CXXFLAGS="$CXXFLAGS -m32"
279 - AC_MSG_CHECKING([whether $CC works])
280 - AC_LINK_IFELSE([AC_LANG_PROGRAM()],AC_MSG_RESULT([yes]),
281 - [AC_MSG_RESULT([no])
282 -@@ -160,6 +163,9 @@
283 - fi
284 - CC="$CC -m64"
285 - CXX="$CXX -m64"
286 -+ CFLAGS="$CFLAGS -m64"
287 -+ LDFLAGS="$LDFLAGS -m64"
288 -+ CXXFLAGS="$CXXFLAGS -m64"
289 - host_cpu="x86_64"
290 - notice_platform="64-bit "
291 - AC_SUBST(TARGETFLAGS,"-m64")
292
293 diff --git a/app-emulation/wine-d3d9/files/wine-2.0-multislot-apploader.patch b/app-emulation/wine-d3d9/files/wine-2.0-multislot-apploader.patch
294 deleted file mode 100644
295 index b336c4f51e8..00000000000
296 --- a/app-emulation/wine-d3d9/files/wine-2.0-multislot-apploader.patch
297 +++ /dev/null
298 @@ -1,14 +0,0 @@
299 -diff --git a/tools/wineapploader.in b/tools/wineapploader.in
300 -index f48d552..14001a0 100755
301 ---- a/tools/wineapploader.in
302 -+++ b/tools/wineapploader.in
303 -@@ -20,7 +20,8 @@
304 - #
305 -
306 - # determine the app Winelib library name
307 --appname=`basename "$0" .exe`.exe
308 -+appname=${0##*/}
309 -+appname="${appname%%-*}.exe"
310 -
311 - # first try explicit WINELOADER
312 - if [ -x "$WINELOADER" ]; then exec "$WINELOADER" "$appname" "$@"; fi
313
314 diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.0.ebuild b/app-emulation/wine-d3d9/wine-d3d9-2.0.ebuild
315 index 5861b1952dc..768fae6fbaf 100644
316 --- a/app-emulation/wine-d3d9/wine-d3d9-2.0.ebuild
317 +++ b/app-emulation/wine-d3d9/wine-d3d9-2.0.ebuild
318 @@ -12,7 +12,7 @@ MY_PN="${PN%%-*}"
319 MY_P="${MY_PN}-${PV}"
320
321 if [[ ${PV} == "9999" ]] ; then
322 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
323 + EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
324 EGIT_BRANCH="master"
325 inherit git-r3
326 SRC_URI=""
327 @@ -26,13 +26,13 @@ S="${WORKDIR}/${MY_P}"
328
329 D3D9_P="wine-d3d9-${PV}"
330 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
331 -WDC_V="20150204"
332 -WINE_DESKTOP_COMMON_P="wine-desktop-common-${WDC_V}"
333 +GWP_V="20170830"
334 +PATCHDIR="${WORKDIR}/gentoo-wine-patches"
335
336 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine patchset"
337 HOMEPAGE="https://www.winehq.org/"
338 SRC_URI="${SRC_URI}
339 - https://github.com/NP-Hardass/wine-desktop-common/archive/${WDC_V}.tar.gz -> ${WINE_DESKTOP_COMMON_P}.tar.gz
340 + https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
341 "
342
343 if [[ ${PV} == "9999" ]] ; then
344 @@ -146,6 +146,7 @@ RDEPEND="${COMMON_DEPEND}
345
346 # tools/make_requests requires perl
347 DEPEND="${COMMON_DEPEND}
348 + dev-util/patchbin
349 sys-devel/flex
350 >=sys-kernel/linux-headers-2.6
351 virtual/pkgconfig
352 @@ -173,7 +174,7 @@ wine_compiler_check() {
353 # bug #549768
354 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
355 ebegin "Checking for gcc-5 ms_abi compiler bug"
356 - $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
357 + $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
358 # Run in subshell to prevent "Aborted" message
359 ( "${T}"/pr66838 || false ) >/dev/null 2>&1
360 if ! eend $?; then
361 @@ -189,7 +190,7 @@ wine_compiler_check() {
362 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
363 ebegin "Checking for gcc-5-3 stack realignment compiler bug"
364 # Compile in subshell to prevent "Aborted" message
365 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${FILESDIR}"/pr69140.c -o "${T}"/pr69140 ) >/dev/null 2>&1
366 + ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
367 if ! eend $?; then
368 eerror "Wine cannot be built with this version of gcc-5.3"
369 eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
370 @@ -205,7 +206,7 @@ wine_compiler_check() {
371 if use abi_x86_64; then
372 ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
373 # Compile in subshell to prevent "Aborted" message
374 - ( $(tc-getCC) -O2 "${FILESDIR}"/builtin_ms_va_list.c -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
375 + ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
376 if ! eend $?; then
377 eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
378 eerror
379 @@ -317,12 +318,25 @@ src_unpack() {
380 }
381
382 src_prepare() {
383 +
384 + eapply_bin(){
385 + local patch
386 + for patch in ${PATCHES_BIN[@]}; do
387 + patchbin --nogit < "${patch}" || die
388 + done
389 + }
390 +
391 local md5="$(md5sum server/protocol.def)"
392 local PATCHES=(
393 - "${FILESDIR}"/${MY_PN}-1.5.26-winegcc.patch #260726
394 - "${FILESDIR}"/${MY_PN}-1.9.5-multilib-portage.patch #395615
395 - "${FILESDIR}"/${MY_PN}-1.6-memset-O3.patch #480508
396 - "${FILESDIR}"/${MY_PN}-2.0-multislot-apploader.patch
397 + "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
398 + "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
399 + "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
400 + "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
401 + "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
402 + "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
403 + )
404 + local PATCHES_BIN=(
405 + "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
406 )
407 if use d3d9; then
408 PATCHES+=( "${D3D9_DIR}/d3d9-helper.patch" )
409 @@ -330,6 +344,7 @@ src_prepare() {
410 fi
411
412 default
413 + eapply_bin
414 eautoreconf
415
416 # Modification of the server protocol requires regenerating the server requests
417 @@ -346,7 +361,7 @@ src_prepare() {
418 sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
419
420 # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
421 - cp "${WORKDIR}/${WINE_DESKTOP_COMMON_P}/icons/oic_winlogo.ico" dlls/user32/resources/ || die
422 + cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
423
424 l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
425 }
426
427 diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.1.ebuild b/app-emulation/wine-d3d9/wine-d3d9-2.1.ebuild
428 index 6e3bde0a930..280c1174f31 100644
429 --- a/app-emulation/wine-d3d9/wine-d3d9-2.1.ebuild
430 +++ b/app-emulation/wine-d3d9/wine-d3d9-2.1.ebuild
431 @@ -12,7 +12,7 @@ MY_PN="${PN%%-*}"
432 MY_P="${MY_PN}-${PV}"
433
434 if [[ ${PV} == "9999" ]] ; then
435 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
436 + EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
437 EGIT_BRANCH="master"
438 inherit git-r3
439 SRC_URI=""
440 @@ -26,13 +26,13 @@ S="${WORKDIR}/${MY_P}"
441
442 D3D9_P="wine-d3d9-${PV}"
443 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
444 -WDC_V="20150204"
445 -WINE_DESKTOP_COMMON_P="wine-desktop-common-${WDC_V}"
446 +GWP_V="20170830"
447 +PATCHDIR="${WORKDIR}/gentoo-wine-patches"
448
449 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine patchset"
450 HOMEPAGE="https://www.winehq.org/"
451 SRC_URI="${SRC_URI}
452 - https://github.com/NP-Hardass/wine-desktop-common/archive/${WDC_V}.tar.gz -> ${WINE_DESKTOP_COMMON_P}.tar.gz
453 + https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
454 "
455
456 if [[ ${PV} == "9999" ]] ; then
457 @@ -146,6 +146,7 @@ RDEPEND="${COMMON_DEPEND}
458
459 # tools/make_requests requires perl
460 DEPEND="${COMMON_DEPEND}
461 + dev-util/patchbin
462 sys-devel/flex
463 >=sys-kernel/linux-headers-2.6
464 virtual/pkgconfig
465 @@ -173,7 +174,7 @@ wine_compiler_check() {
466 # bug #549768
467 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
468 ebegin "Checking for gcc-5 ms_abi compiler bug"
469 - $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
470 + $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
471 # Run in subshell to prevent "Aborted" message
472 ( "${T}"/pr66838 || false ) >/dev/null 2>&1
473 if ! eend $?; then
474 @@ -189,7 +190,7 @@ wine_compiler_check() {
475 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
476 ebegin "Checking for gcc-5-3 stack realignment compiler bug"
477 # Compile in subshell to prevent "Aborted" message
478 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${FILESDIR}"/pr69140.c -o "${T}"/pr69140 ) >/dev/null 2>&1
479 + ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
480 if ! eend $?; then
481 eerror "Wine cannot be built with this version of gcc-5.3"
482 eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
483 @@ -205,7 +206,7 @@ wine_compiler_check() {
484 if use abi_x86_64; then
485 ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
486 # Compile in subshell to prevent "Aborted" message
487 - ( $(tc-getCC) -O2 "${FILESDIR}"/builtin_ms_va_list.c -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
488 + ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
489 if ! eend $?; then
490 eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
491 eerror
492 @@ -317,12 +318,25 @@ src_unpack() {
493 }
494
495 src_prepare() {
496 +
497 + eapply_bin(){
498 + local patch
499 + for patch in ${PATCHES_BIN[@]}; do
500 + patchbin --nogit < "${patch}" || die
501 + done
502 + }
503 +
504 local md5="$(md5sum server/protocol.def)"
505 local PATCHES=(
506 - "${FILESDIR}"/${MY_PN}-1.5.26-winegcc.patch #260726
507 - "${FILESDIR}"/${MY_PN}-1.9.5-multilib-portage.patch #395615
508 - "${FILESDIR}"/${MY_PN}-1.6-memset-O3.patch #480508
509 - "${FILESDIR}"/${MY_PN}-2.0-multislot-apploader.patch
510 + "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
511 + "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
512 + "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
513 + "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
514 + "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
515 + "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
516 + )
517 + local PATCHES_BIN=(
518 + "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
519 )
520 if use d3d9; then
521 PATCHES+=( "${D3D9_DIR}/d3d9-helper.patch" )
522 @@ -330,6 +344,7 @@ src_prepare() {
523 fi
524
525 default
526 + eapply_bin
527 eautoreconf
528
529 # Modification of the server protocol requires regenerating the server requests
530 @@ -346,7 +361,7 @@ src_prepare() {
531 sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
532
533 # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
534 - cp "${WORKDIR}/${WINE_DESKTOP_COMMON_P}/icons/oic_winlogo.ico" dlls/user32/resources/ || die
535 + cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
536
537 l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
538 }
539
540 diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.10.ebuild b/app-emulation/wine-d3d9/wine-d3d9-2.10.ebuild
541 index a307eff70a4..2b18410a845 100644
542 --- a/app-emulation/wine-d3d9/wine-d3d9-2.10.ebuild
543 +++ b/app-emulation/wine-d3d9/wine-d3d9-2.10.ebuild
544 @@ -12,7 +12,7 @@ MY_PN="${PN%%-*}"
545 MY_P="${MY_PN}-${PV}"
546
547 if [[ ${PV} == "9999" ]] ; then
548 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
549 + EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
550 EGIT_BRANCH="master"
551 inherit git-r3
552 SRC_URI=""
553 @@ -26,13 +26,13 @@ S="${WORKDIR}/${MY_P}"
554
555 D3D9_P="wine-d3d9-${PV}"
556 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
557 -WDC_V="20150204"
558 -WINE_DESKTOP_COMMON_P="wine-desktop-common-${WDC_V}"
559 +GWP_V="20170830"
560 +PATCHDIR="${WORKDIR}/gentoo-wine-patches"
561
562 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine patchset"
563 HOMEPAGE="https://www.winehq.org/"
564 SRC_URI="${SRC_URI}
565 - https://github.com/NP-Hardass/wine-desktop-common/archive/${WDC_V}.tar.gz -> ${WINE_DESKTOP_COMMON_P}.tar.gz
566 + https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
567 "
568
569 if [[ ${PV} == "9999" ]] ; then
570 @@ -147,6 +147,7 @@ RDEPEND="${COMMON_DEPEND}
571
572 # tools/make_requests requires perl
573 DEPEND="${COMMON_DEPEND}
574 + dev-util/patchbin
575 sys-devel/flex
576 >=sys-kernel/linux-headers-2.6
577 virtual/pkgconfig
578 @@ -174,7 +175,7 @@ wine_compiler_check() {
579 # bug #549768
580 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
581 ebegin "Checking for gcc-5 ms_abi compiler bug"
582 - $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
583 + $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
584 # Run in subshell to prevent "Aborted" message
585 ( "${T}"/pr66838 || false ) >/dev/null 2>&1
586 if ! eend $?; then
587 @@ -190,7 +191,7 @@ wine_compiler_check() {
588 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
589 ebegin "Checking for gcc-5-3 stack realignment compiler bug"
590 # Compile in subshell to prevent "Aborted" message
591 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${FILESDIR}"/pr69140.c -o "${T}"/pr69140 ) >/dev/null 2>&1
592 + ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
593 if ! eend $?; then
594 eerror "Wine cannot be built with this version of gcc-5.3"
595 eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
596 @@ -206,7 +207,7 @@ wine_compiler_check() {
597 if use abi_x86_64; then
598 ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
599 # Compile in subshell to prevent "Aborted" message
600 - ( $(tc-getCC) -O2 "${FILESDIR}"/builtin_ms_va_list.c -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
601 + ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
602 if ! eend $?; then
603 eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
604 eerror
605 @@ -318,12 +319,25 @@ src_unpack() {
606 }
607
608 src_prepare() {
609 +
610 + eapply_bin(){
611 + local patch
612 + for patch in ${PATCHES_BIN[@]}; do
613 + patchbin --nogit < "${patch}" || die
614 + done
615 + }
616 +
617 local md5="$(md5sum server/protocol.def)"
618 local PATCHES=(
619 - "${FILESDIR}"/${MY_PN}-1.5.26-winegcc.patch #260726
620 - "${FILESDIR}"/${MY_PN}-1.9.5-multilib-portage.patch #395615
621 - "${FILESDIR}"/${MY_PN}-1.6-memset-O3.patch #480508
622 - "${FILESDIR}"/${MY_PN}-2.0-multislot-apploader.patch
623 + "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
624 + "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
625 + "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
626 + "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
627 + "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
628 + "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
629 + )
630 + local PATCHES_BIN=(
631 + "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
632 )
633 if use d3d9; then
634 PATCHES+=( "${D3D9_DIR}/d3d9-helper.patch" )
635 @@ -331,6 +345,7 @@ src_prepare() {
636 fi
637
638 default
639 + eapply_bin
640 eautoreconf
641
642 # Modification of the server protocol requires regenerating the server requests
643 @@ -347,7 +362,7 @@ src_prepare() {
644 sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
645
646 # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
647 - cp "${WORKDIR}/${WINE_DESKTOP_COMMON_P}/icons/oic_winlogo.ico" dlls/user32/resources/ || die
648 + cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
649
650 l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
651 }
652
653 diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.11.ebuild b/app-emulation/wine-d3d9/wine-d3d9-2.11.ebuild
654 index a307eff70a4..2b18410a845 100644
655 --- a/app-emulation/wine-d3d9/wine-d3d9-2.11.ebuild
656 +++ b/app-emulation/wine-d3d9/wine-d3d9-2.11.ebuild
657 @@ -12,7 +12,7 @@ MY_PN="${PN%%-*}"
658 MY_P="${MY_PN}-${PV}"
659
660 if [[ ${PV} == "9999" ]] ; then
661 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
662 + EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
663 EGIT_BRANCH="master"
664 inherit git-r3
665 SRC_URI=""
666 @@ -26,13 +26,13 @@ S="${WORKDIR}/${MY_P}"
667
668 D3D9_P="wine-d3d9-${PV}"
669 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
670 -WDC_V="20150204"
671 -WINE_DESKTOP_COMMON_P="wine-desktop-common-${WDC_V}"
672 +GWP_V="20170830"
673 +PATCHDIR="${WORKDIR}/gentoo-wine-patches"
674
675 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine patchset"
676 HOMEPAGE="https://www.winehq.org/"
677 SRC_URI="${SRC_URI}
678 - https://github.com/NP-Hardass/wine-desktop-common/archive/${WDC_V}.tar.gz -> ${WINE_DESKTOP_COMMON_P}.tar.gz
679 + https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
680 "
681
682 if [[ ${PV} == "9999" ]] ; then
683 @@ -147,6 +147,7 @@ RDEPEND="${COMMON_DEPEND}
684
685 # tools/make_requests requires perl
686 DEPEND="${COMMON_DEPEND}
687 + dev-util/patchbin
688 sys-devel/flex
689 >=sys-kernel/linux-headers-2.6
690 virtual/pkgconfig
691 @@ -174,7 +175,7 @@ wine_compiler_check() {
692 # bug #549768
693 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
694 ebegin "Checking for gcc-5 ms_abi compiler bug"
695 - $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
696 + $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
697 # Run in subshell to prevent "Aborted" message
698 ( "${T}"/pr66838 || false ) >/dev/null 2>&1
699 if ! eend $?; then
700 @@ -190,7 +191,7 @@ wine_compiler_check() {
701 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
702 ebegin "Checking for gcc-5-3 stack realignment compiler bug"
703 # Compile in subshell to prevent "Aborted" message
704 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${FILESDIR}"/pr69140.c -o "${T}"/pr69140 ) >/dev/null 2>&1
705 + ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
706 if ! eend $?; then
707 eerror "Wine cannot be built with this version of gcc-5.3"
708 eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
709 @@ -206,7 +207,7 @@ wine_compiler_check() {
710 if use abi_x86_64; then
711 ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
712 # Compile in subshell to prevent "Aborted" message
713 - ( $(tc-getCC) -O2 "${FILESDIR}"/builtin_ms_va_list.c -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
714 + ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
715 if ! eend $?; then
716 eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
717 eerror
718 @@ -318,12 +319,25 @@ src_unpack() {
719 }
720
721 src_prepare() {
722 +
723 + eapply_bin(){
724 + local patch
725 + for patch in ${PATCHES_BIN[@]}; do
726 + patchbin --nogit < "${patch}" || die
727 + done
728 + }
729 +
730 local md5="$(md5sum server/protocol.def)"
731 local PATCHES=(
732 - "${FILESDIR}"/${MY_PN}-1.5.26-winegcc.patch #260726
733 - "${FILESDIR}"/${MY_PN}-1.9.5-multilib-portage.patch #395615
734 - "${FILESDIR}"/${MY_PN}-1.6-memset-O3.patch #480508
735 - "${FILESDIR}"/${MY_PN}-2.0-multislot-apploader.patch
736 + "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
737 + "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
738 + "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
739 + "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
740 + "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
741 + "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
742 + )
743 + local PATCHES_BIN=(
744 + "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
745 )
746 if use d3d9; then
747 PATCHES+=( "${D3D9_DIR}/d3d9-helper.patch" )
748 @@ -331,6 +345,7 @@ src_prepare() {
749 fi
750
751 default
752 + eapply_bin
753 eautoreconf
754
755 # Modification of the server protocol requires regenerating the server requests
756 @@ -347,7 +362,7 @@ src_prepare() {
757 sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
758
759 # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
760 - cp "${WORKDIR}/${WINE_DESKTOP_COMMON_P}/icons/oic_winlogo.ico" dlls/user32/resources/ || die
761 + cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
762
763 l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
764 }
765
766 diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.12.ebuild b/app-emulation/wine-d3d9/wine-d3d9-2.12.ebuild
767 index a307eff70a4..2b18410a845 100644
768 --- a/app-emulation/wine-d3d9/wine-d3d9-2.12.ebuild
769 +++ b/app-emulation/wine-d3d9/wine-d3d9-2.12.ebuild
770 @@ -12,7 +12,7 @@ MY_PN="${PN%%-*}"
771 MY_P="${MY_PN}-${PV}"
772
773 if [[ ${PV} == "9999" ]] ; then
774 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
775 + EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
776 EGIT_BRANCH="master"
777 inherit git-r3
778 SRC_URI=""
779 @@ -26,13 +26,13 @@ S="${WORKDIR}/${MY_P}"
780
781 D3D9_P="wine-d3d9-${PV}"
782 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
783 -WDC_V="20150204"
784 -WINE_DESKTOP_COMMON_P="wine-desktop-common-${WDC_V}"
785 +GWP_V="20170830"
786 +PATCHDIR="${WORKDIR}/gentoo-wine-patches"
787
788 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine patchset"
789 HOMEPAGE="https://www.winehq.org/"
790 SRC_URI="${SRC_URI}
791 - https://github.com/NP-Hardass/wine-desktop-common/archive/${WDC_V}.tar.gz -> ${WINE_DESKTOP_COMMON_P}.tar.gz
792 + https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
793 "
794
795 if [[ ${PV} == "9999" ]] ; then
796 @@ -147,6 +147,7 @@ RDEPEND="${COMMON_DEPEND}
797
798 # tools/make_requests requires perl
799 DEPEND="${COMMON_DEPEND}
800 + dev-util/patchbin
801 sys-devel/flex
802 >=sys-kernel/linux-headers-2.6
803 virtual/pkgconfig
804 @@ -174,7 +175,7 @@ wine_compiler_check() {
805 # bug #549768
806 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
807 ebegin "Checking for gcc-5 ms_abi compiler bug"
808 - $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
809 + $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
810 # Run in subshell to prevent "Aborted" message
811 ( "${T}"/pr66838 || false ) >/dev/null 2>&1
812 if ! eend $?; then
813 @@ -190,7 +191,7 @@ wine_compiler_check() {
814 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
815 ebegin "Checking for gcc-5-3 stack realignment compiler bug"
816 # Compile in subshell to prevent "Aborted" message
817 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${FILESDIR}"/pr69140.c -o "${T}"/pr69140 ) >/dev/null 2>&1
818 + ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
819 if ! eend $?; then
820 eerror "Wine cannot be built with this version of gcc-5.3"
821 eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
822 @@ -206,7 +207,7 @@ wine_compiler_check() {
823 if use abi_x86_64; then
824 ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
825 # Compile in subshell to prevent "Aborted" message
826 - ( $(tc-getCC) -O2 "${FILESDIR}"/builtin_ms_va_list.c -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
827 + ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
828 if ! eend $?; then
829 eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
830 eerror
831 @@ -318,12 +319,25 @@ src_unpack() {
832 }
833
834 src_prepare() {
835 +
836 + eapply_bin(){
837 + local patch
838 + for patch in ${PATCHES_BIN[@]}; do
839 + patchbin --nogit < "${patch}" || die
840 + done
841 + }
842 +
843 local md5="$(md5sum server/protocol.def)"
844 local PATCHES=(
845 - "${FILESDIR}"/${MY_PN}-1.5.26-winegcc.patch #260726
846 - "${FILESDIR}"/${MY_PN}-1.9.5-multilib-portage.patch #395615
847 - "${FILESDIR}"/${MY_PN}-1.6-memset-O3.patch #480508
848 - "${FILESDIR}"/${MY_PN}-2.0-multislot-apploader.patch
849 + "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
850 + "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
851 + "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
852 + "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
853 + "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
854 + "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
855 + )
856 + local PATCHES_BIN=(
857 + "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
858 )
859 if use d3d9; then
860 PATCHES+=( "${D3D9_DIR}/d3d9-helper.patch" )
861 @@ -331,6 +345,7 @@ src_prepare() {
862 fi
863
864 default
865 + eapply_bin
866 eautoreconf
867
868 # Modification of the server protocol requires regenerating the server requests
869 @@ -347,7 +362,7 @@ src_prepare() {
870 sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
871
872 # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
873 - cp "${WORKDIR}/${WINE_DESKTOP_COMMON_P}/icons/oic_winlogo.ico" dlls/user32/resources/ || die
874 + cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
875
876 l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
877 }
878
879 diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.13.ebuild b/app-emulation/wine-d3d9/wine-d3d9-2.13.ebuild
880 index a307eff70a4..2b18410a845 100644
881 --- a/app-emulation/wine-d3d9/wine-d3d9-2.13.ebuild
882 +++ b/app-emulation/wine-d3d9/wine-d3d9-2.13.ebuild
883 @@ -12,7 +12,7 @@ MY_PN="${PN%%-*}"
884 MY_P="${MY_PN}-${PV}"
885
886 if [[ ${PV} == "9999" ]] ; then
887 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
888 + EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
889 EGIT_BRANCH="master"
890 inherit git-r3
891 SRC_URI=""
892 @@ -26,13 +26,13 @@ S="${WORKDIR}/${MY_P}"
893
894 D3D9_P="wine-d3d9-${PV}"
895 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
896 -WDC_V="20150204"
897 -WINE_DESKTOP_COMMON_P="wine-desktop-common-${WDC_V}"
898 +GWP_V="20170830"
899 +PATCHDIR="${WORKDIR}/gentoo-wine-patches"
900
901 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine patchset"
902 HOMEPAGE="https://www.winehq.org/"
903 SRC_URI="${SRC_URI}
904 - https://github.com/NP-Hardass/wine-desktop-common/archive/${WDC_V}.tar.gz -> ${WINE_DESKTOP_COMMON_P}.tar.gz
905 + https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
906 "
907
908 if [[ ${PV} == "9999" ]] ; then
909 @@ -147,6 +147,7 @@ RDEPEND="${COMMON_DEPEND}
910
911 # tools/make_requests requires perl
912 DEPEND="${COMMON_DEPEND}
913 + dev-util/patchbin
914 sys-devel/flex
915 >=sys-kernel/linux-headers-2.6
916 virtual/pkgconfig
917 @@ -174,7 +175,7 @@ wine_compiler_check() {
918 # bug #549768
919 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
920 ebegin "Checking for gcc-5 ms_abi compiler bug"
921 - $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
922 + $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
923 # Run in subshell to prevent "Aborted" message
924 ( "${T}"/pr66838 || false ) >/dev/null 2>&1
925 if ! eend $?; then
926 @@ -190,7 +191,7 @@ wine_compiler_check() {
927 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
928 ebegin "Checking for gcc-5-3 stack realignment compiler bug"
929 # Compile in subshell to prevent "Aborted" message
930 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${FILESDIR}"/pr69140.c -o "${T}"/pr69140 ) >/dev/null 2>&1
931 + ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
932 if ! eend $?; then
933 eerror "Wine cannot be built with this version of gcc-5.3"
934 eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
935 @@ -206,7 +207,7 @@ wine_compiler_check() {
936 if use abi_x86_64; then
937 ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
938 # Compile in subshell to prevent "Aborted" message
939 - ( $(tc-getCC) -O2 "${FILESDIR}"/builtin_ms_va_list.c -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
940 + ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
941 if ! eend $?; then
942 eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
943 eerror
944 @@ -318,12 +319,25 @@ src_unpack() {
945 }
946
947 src_prepare() {
948 +
949 + eapply_bin(){
950 + local patch
951 + for patch in ${PATCHES_BIN[@]}; do
952 + patchbin --nogit < "${patch}" || die
953 + done
954 + }
955 +
956 local md5="$(md5sum server/protocol.def)"
957 local PATCHES=(
958 - "${FILESDIR}"/${MY_PN}-1.5.26-winegcc.patch #260726
959 - "${FILESDIR}"/${MY_PN}-1.9.5-multilib-portage.patch #395615
960 - "${FILESDIR}"/${MY_PN}-1.6-memset-O3.patch #480508
961 - "${FILESDIR}"/${MY_PN}-2.0-multislot-apploader.patch
962 + "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
963 + "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
964 + "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
965 + "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
966 + "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
967 + "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
968 + )
969 + local PATCHES_BIN=(
970 + "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
971 )
972 if use d3d9; then
973 PATCHES+=( "${D3D9_DIR}/d3d9-helper.patch" )
974 @@ -331,6 +345,7 @@ src_prepare() {
975 fi
976
977 default
978 + eapply_bin
979 eautoreconf
980
981 # Modification of the server protocol requires regenerating the server requests
982 @@ -347,7 +362,7 @@ src_prepare() {
983 sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
984
985 # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
986 - cp "${WORKDIR}/${WINE_DESKTOP_COMMON_P}/icons/oic_winlogo.ico" dlls/user32/resources/ || die
987 + cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
988
989 l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
990 }
991
992 diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.14.ebuild b/app-emulation/wine-d3d9/wine-d3d9-2.14.ebuild
993 index 8191c3108bb..89a37ab4450 100644
994 --- a/app-emulation/wine-d3d9/wine-d3d9-2.14.ebuild
995 +++ b/app-emulation/wine-d3d9/wine-d3d9-2.14.ebuild
996 @@ -12,7 +12,7 @@ MY_PN="${PN%%-*}"
997 MY_P="${MY_PN}-${PV}"
998
999 if [[ ${PV} == "9999" ]] ; then
1000 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
1001 + EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
1002 EGIT_BRANCH="master"
1003 inherit git-r3
1004 SRC_URI=""
1005 @@ -26,13 +26,13 @@ S="${WORKDIR}/${MY_P}"
1006
1007 D3D9_P="wine-d3d9-${PV}"
1008 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
1009 -WDC_V="20150204"
1010 -WINE_DESKTOP_COMMON_P="wine-desktop-common-${WDC_V}"
1011 +GWP_V="20170830"
1012 +PATCHDIR="${WORKDIR}/gentoo-wine-patches"
1013
1014 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine patchset"
1015 HOMEPAGE="https://www.winehq.org/"
1016 SRC_URI="${SRC_URI}
1017 - https://github.com/NP-Hardass/wine-desktop-common/archive/${WDC_V}.tar.gz -> ${WINE_DESKTOP_COMMON_P}.tar.gz
1018 + https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
1019 "
1020
1021 if [[ ${PV} == "9999" ]] ; then
1022 @@ -147,6 +147,7 @@ RDEPEND="${COMMON_DEPEND}
1023
1024 # tools/make_requests requires perl
1025 DEPEND="${COMMON_DEPEND}
1026 + dev-util/patchbin
1027 sys-devel/flex
1028 >=sys-kernel/linux-headers-2.6
1029 virtual/pkgconfig
1030 @@ -174,7 +175,7 @@ wine_compiler_check() {
1031 # bug #549768
1032 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
1033 ebegin "Checking for gcc-5 ms_abi compiler bug"
1034 - $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
1035 + $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
1036 # Run in subshell to prevent "Aborted" message
1037 ( "${T}"/pr66838 || false ) >/dev/null 2>&1
1038 if ! eend $?; then
1039 @@ -190,7 +191,7 @@ wine_compiler_check() {
1040 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
1041 ebegin "Checking for gcc-5-3 stack realignment compiler bug"
1042 # Compile in subshell to prevent "Aborted" message
1043 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${FILESDIR}"/pr69140.c -o "${T}"/pr69140 ) >/dev/null 2>&1
1044 + ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
1045 if ! eend $?; then
1046 eerror "Wine cannot be built with this version of gcc-5.3"
1047 eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
1048 @@ -206,7 +207,7 @@ wine_compiler_check() {
1049 if use abi_x86_64; then
1050 ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
1051 # Compile in subshell to prevent "Aborted" message
1052 - ( $(tc-getCC) -O2 "${FILESDIR}"/builtin_ms_va_list.c -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
1053 + ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
1054 if ! eend $?; then
1055 eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
1056 eerror
1057 @@ -318,12 +319,25 @@ src_unpack() {
1058 }
1059
1060 src_prepare() {
1061 +
1062 + eapply_bin(){
1063 + local patch
1064 + for patch in ${PATCHES_BIN[@]}; do
1065 + patchbin --nogit < "${patch}" || die
1066 + done
1067 + }
1068 +
1069 local md5="$(md5sum server/protocol.def)"
1070 local PATCHES=(
1071 - "${FILESDIR}"/${MY_PN}-1.5.26-winegcc.patch #260726
1072 - "${FILESDIR}"/${MY_PN}-1.9.5-multilib-portage.patch #395615
1073 - "${FILESDIR}"/${MY_PN}-1.6-memset-O3.patch #480508
1074 - "${FILESDIR}"/${MY_PN}-2.0-multislot-apploader.patch
1075 + "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
1076 + "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
1077 + "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
1078 + "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
1079 + "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
1080 + "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
1081 + )
1082 + local PATCHES_BIN=(
1083 + "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
1084 )
1085 if use d3d9; then
1086 PATCHES+=( "${D3D9_DIR}/d3d9-helper.patch" )
1087 @@ -331,6 +345,7 @@ src_prepare() {
1088 fi
1089
1090 default
1091 + eapply_bin
1092 eautoreconf
1093
1094 # Modification of the server protocol requires regenerating the server requests
1095 @@ -347,7 +362,7 @@ src_prepare() {
1096 sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
1097
1098 # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
1099 - cp "${WORKDIR}/${WINE_DESKTOP_COMMON_P}/icons/oic_winlogo.ico" dlls/user32/resources/ || die
1100 + cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
1101
1102 l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
1103 }
1104
1105 diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.15.ebuild b/app-emulation/wine-d3d9/wine-d3d9-2.15.ebuild
1106 index 8191c3108bb..89a37ab4450 100644
1107 --- a/app-emulation/wine-d3d9/wine-d3d9-2.15.ebuild
1108 +++ b/app-emulation/wine-d3d9/wine-d3d9-2.15.ebuild
1109 @@ -12,7 +12,7 @@ MY_PN="${PN%%-*}"
1110 MY_P="${MY_PN}-${PV}"
1111
1112 if [[ ${PV} == "9999" ]] ; then
1113 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
1114 + EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
1115 EGIT_BRANCH="master"
1116 inherit git-r3
1117 SRC_URI=""
1118 @@ -26,13 +26,13 @@ S="${WORKDIR}/${MY_P}"
1119
1120 D3D9_P="wine-d3d9-${PV}"
1121 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
1122 -WDC_V="20150204"
1123 -WINE_DESKTOP_COMMON_P="wine-desktop-common-${WDC_V}"
1124 +GWP_V="20170830"
1125 +PATCHDIR="${WORKDIR}/gentoo-wine-patches"
1126
1127 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine patchset"
1128 HOMEPAGE="https://www.winehq.org/"
1129 SRC_URI="${SRC_URI}
1130 - https://github.com/NP-Hardass/wine-desktop-common/archive/${WDC_V}.tar.gz -> ${WINE_DESKTOP_COMMON_P}.tar.gz
1131 + https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
1132 "
1133
1134 if [[ ${PV} == "9999" ]] ; then
1135 @@ -147,6 +147,7 @@ RDEPEND="${COMMON_DEPEND}
1136
1137 # tools/make_requests requires perl
1138 DEPEND="${COMMON_DEPEND}
1139 + dev-util/patchbin
1140 sys-devel/flex
1141 >=sys-kernel/linux-headers-2.6
1142 virtual/pkgconfig
1143 @@ -174,7 +175,7 @@ wine_compiler_check() {
1144 # bug #549768
1145 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
1146 ebegin "Checking for gcc-5 ms_abi compiler bug"
1147 - $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
1148 + $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
1149 # Run in subshell to prevent "Aborted" message
1150 ( "${T}"/pr66838 || false ) >/dev/null 2>&1
1151 if ! eend $?; then
1152 @@ -190,7 +191,7 @@ wine_compiler_check() {
1153 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
1154 ebegin "Checking for gcc-5-3 stack realignment compiler bug"
1155 # Compile in subshell to prevent "Aborted" message
1156 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${FILESDIR}"/pr69140.c -o "${T}"/pr69140 ) >/dev/null 2>&1
1157 + ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
1158 if ! eend $?; then
1159 eerror "Wine cannot be built with this version of gcc-5.3"
1160 eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
1161 @@ -206,7 +207,7 @@ wine_compiler_check() {
1162 if use abi_x86_64; then
1163 ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
1164 # Compile in subshell to prevent "Aborted" message
1165 - ( $(tc-getCC) -O2 "${FILESDIR}"/builtin_ms_va_list.c -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
1166 + ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
1167 if ! eend $?; then
1168 eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
1169 eerror
1170 @@ -318,12 +319,25 @@ src_unpack() {
1171 }
1172
1173 src_prepare() {
1174 +
1175 + eapply_bin(){
1176 + local patch
1177 + for patch in ${PATCHES_BIN[@]}; do
1178 + patchbin --nogit < "${patch}" || die
1179 + done
1180 + }
1181 +
1182 local md5="$(md5sum server/protocol.def)"
1183 local PATCHES=(
1184 - "${FILESDIR}"/${MY_PN}-1.5.26-winegcc.patch #260726
1185 - "${FILESDIR}"/${MY_PN}-1.9.5-multilib-portage.patch #395615
1186 - "${FILESDIR}"/${MY_PN}-1.6-memset-O3.patch #480508
1187 - "${FILESDIR}"/${MY_PN}-2.0-multislot-apploader.patch
1188 + "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
1189 + "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
1190 + "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
1191 + "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
1192 + "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
1193 + "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
1194 + )
1195 + local PATCHES_BIN=(
1196 + "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
1197 )
1198 if use d3d9; then
1199 PATCHES+=( "${D3D9_DIR}/d3d9-helper.patch" )
1200 @@ -331,6 +345,7 @@ src_prepare() {
1201 fi
1202
1203 default
1204 + eapply_bin
1205 eautoreconf
1206
1207 # Modification of the server protocol requires regenerating the server requests
1208 @@ -347,7 +362,7 @@ src_prepare() {
1209 sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
1210
1211 # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
1212 - cp "${WORKDIR}/${WINE_DESKTOP_COMMON_P}/icons/oic_winlogo.ico" dlls/user32/resources/ || die
1213 + cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
1214
1215 l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
1216 }
1217
1218 diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.16.ebuild b/app-emulation/wine-d3d9/wine-d3d9-2.16.ebuild
1219 index 8191c3108bb..89a37ab4450 100644
1220 --- a/app-emulation/wine-d3d9/wine-d3d9-2.16.ebuild
1221 +++ b/app-emulation/wine-d3d9/wine-d3d9-2.16.ebuild
1222 @@ -12,7 +12,7 @@ MY_PN="${PN%%-*}"
1223 MY_P="${MY_PN}-${PV}"
1224
1225 if [[ ${PV} == "9999" ]] ; then
1226 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
1227 + EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
1228 EGIT_BRANCH="master"
1229 inherit git-r3
1230 SRC_URI=""
1231 @@ -26,13 +26,13 @@ S="${WORKDIR}/${MY_P}"
1232
1233 D3D9_P="wine-d3d9-${PV}"
1234 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
1235 -WDC_V="20150204"
1236 -WINE_DESKTOP_COMMON_P="wine-desktop-common-${WDC_V}"
1237 +GWP_V="20170830"
1238 +PATCHDIR="${WORKDIR}/gentoo-wine-patches"
1239
1240 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine patchset"
1241 HOMEPAGE="https://www.winehq.org/"
1242 SRC_URI="${SRC_URI}
1243 - https://github.com/NP-Hardass/wine-desktop-common/archive/${WDC_V}.tar.gz -> ${WINE_DESKTOP_COMMON_P}.tar.gz
1244 + https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
1245 "
1246
1247 if [[ ${PV} == "9999" ]] ; then
1248 @@ -147,6 +147,7 @@ RDEPEND="${COMMON_DEPEND}
1249
1250 # tools/make_requests requires perl
1251 DEPEND="${COMMON_DEPEND}
1252 + dev-util/patchbin
1253 sys-devel/flex
1254 >=sys-kernel/linux-headers-2.6
1255 virtual/pkgconfig
1256 @@ -174,7 +175,7 @@ wine_compiler_check() {
1257 # bug #549768
1258 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
1259 ebegin "Checking for gcc-5 ms_abi compiler bug"
1260 - $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
1261 + $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
1262 # Run in subshell to prevent "Aborted" message
1263 ( "${T}"/pr66838 || false ) >/dev/null 2>&1
1264 if ! eend $?; then
1265 @@ -190,7 +191,7 @@ wine_compiler_check() {
1266 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
1267 ebegin "Checking for gcc-5-3 stack realignment compiler bug"
1268 # Compile in subshell to prevent "Aborted" message
1269 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${FILESDIR}"/pr69140.c -o "${T}"/pr69140 ) >/dev/null 2>&1
1270 + ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
1271 if ! eend $?; then
1272 eerror "Wine cannot be built with this version of gcc-5.3"
1273 eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
1274 @@ -206,7 +207,7 @@ wine_compiler_check() {
1275 if use abi_x86_64; then
1276 ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
1277 # Compile in subshell to prevent "Aborted" message
1278 - ( $(tc-getCC) -O2 "${FILESDIR}"/builtin_ms_va_list.c -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
1279 + ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
1280 if ! eend $?; then
1281 eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
1282 eerror
1283 @@ -318,12 +319,25 @@ src_unpack() {
1284 }
1285
1286 src_prepare() {
1287 +
1288 + eapply_bin(){
1289 + local patch
1290 + for patch in ${PATCHES_BIN[@]}; do
1291 + patchbin --nogit < "${patch}" || die
1292 + done
1293 + }
1294 +
1295 local md5="$(md5sum server/protocol.def)"
1296 local PATCHES=(
1297 - "${FILESDIR}"/${MY_PN}-1.5.26-winegcc.patch #260726
1298 - "${FILESDIR}"/${MY_PN}-1.9.5-multilib-portage.patch #395615
1299 - "${FILESDIR}"/${MY_PN}-1.6-memset-O3.patch #480508
1300 - "${FILESDIR}"/${MY_PN}-2.0-multislot-apploader.patch
1301 + "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
1302 + "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
1303 + "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
1304 + "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
1305 + "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
1306 + "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
1307 + )
1308 + local PATCHES_BIN=(
1309 + "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
1310 )
1311 if use d3d9; then
1312 PATCHES+=( "${D3D9_DIR}/d3d9-helper.patch" )
1313 @@ -331,6 +345,7 @@ src_prepare() {
1314 fi
1315
1316 default
1317 + eapply_bin
1318 eautoreconf
1319
1320 # Modification of the server protocol requires regenerating the server requests
1321 @@ -347,7 +362,7 @@ src_prepare() {
1322 sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
1323
1324 # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
1325 - cp "${WORKDIR}/${WINE_DESKTOP_COMMON_P}/icons/oic_winlogo.ico" dlls/user32/resources/ || die
1326 + cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
1327
1328 l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
1329 }
1330
1331 diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.17.ebuild b/app-emulation/wine-d3d9/wine-d3d9-2.17.ebuild
1332 index 8191c3108bb..89a37ab4450 100644
1333 --- a/app-emulation/wine-d3d9/wine-d3d9-2.17.ebuild
1334 +++ b/app-emulation/wine-d3d9/wine-d3d9-2.17.ebuild
1335 @@ -12,7 +12,7 @@ MY_PN="${PN%%-*}"
1336 MY_P="${MY_PN}-${PV}"
1337
1338 if [[ ${PV} == "9999" ]] ; then
1339 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
1340 + EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
1341 EGIT_BRANCH="master"
1342 inherit git-r3
1343 SRC_URI=""
1344 @@ -26,13 +26,13 @@ S="${WORKDIR}/${MY_P}"
1345
1346 D3D9_P="wine-d3d9-${PV}"
1347 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
1348 -WDC_V="20150204"
1349 -WINE_DESKTOP_COMMON_P="wine-desktop-common-${WDC_V}"
1350 +GWP_V="20170830"
1351 +PATCHDIR="${WORKDIR}/gentoo-wine-patches"
1352
1353 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine patchset"
1354 HOMEPAGE="https://www.winehq.org/"
1355 SRC_URI="${SRC_URI}
1356 - https://github.com/NP-Hardass/wine-desktop-common/archive/${WDC_V}.tar.gz -> ${WINE_DESKTOP_COMMON_P}.tar.gz
1357 + https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
1358 "
1359
1360 if [[ ${PV} == "9999" ]] ; then
1361 @@ -147,6 +147,7 @@ RDEPEND="${COMMON_DEPEND}
1362
1363 # tools/make_requests requires perl
1364 DEPEND="${COMMON_DEPEND}
1365 + dev-util/patchbin
1366 sys-devel/flex
1367 >=sys-kernel/linux-headers-2.6
1368 virtual/pkgconfig
1369 @@ -174,7 +175,7 @@ wine_compiler_check() {
1370 # bug #549768
1371 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
1372 ebegin "Checking for gcc-5 ms_abi compiler bug"
1373 - $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
1374 + $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
1375 # Run in subshell to prevent "Aborted" message
1376 ( "${T}"/pr66838 || false ) >/dev/null 2>&1
1377 if ! eend $?; then
1378 @@ -190,7 +191,7 @@ wine_compiler_check() {
1379 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
1380 ebegin "Checking for gcc-5-3 stack realignment compiler bug"
1381 # Compile in subshell to prevent "Aborted" message
1382 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${FILESDIR}"/pr69140.c -o "${T}"/pr69140 ) >/dev/null 2>&1
1383 + ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
1384 if ! eend $?; then
1385 eerror "Wine cannot be built with this version of gcc-5.3"
1386 eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
1387 @@ -206,7 +207,7 @@ wine_compiler_check() {
1388 if use abi_x86_64; then
1389 ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
1390 # Compile in subshell to prevent "Aborted" message
1391 - ( $(tc-getCC) -O2 "${FILESDIR}"/builtin_ms_va_list.c -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
1392 + ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
1393 if ! eend $?; then
1394 eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
1395 eerror
1396 @@ -318,12 +319,25 @@ src_unpack() {
1397 }
1398
1399 src_prepare() {
1400 +
1401 + eapply_bin(){
1402 + local patch
1403 + for patch in ${PATCHES_BIN[@]}; do
1404 + patchbin --nogit < "${patch}" || die
1405 + done
1406 + }
1407 +
1408 local md5="$(md5sum server/protocol.def)"
1409 local PATCHES=(
1410 - "${FILESDIR}"/${MY_PN}-1.5.26-winegcc.patch #260726
1411 - "${FILESDIR}"/${MY_PN}-1.9.5-multilib-portage.patch #395615
1412 - "${FILESDIR}"/${MY_PN}-1.6-memset-O3.patch #480508
1413 - "${FILESDIR}"/${MY_PN}-2.0-multislot-apploader.patch
1414 + "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
1415 + "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
1416 + "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
1417 + "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
1418 + "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
1419 + "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
1420 + )
1421 + local PATCHES_BIN=(
1422 + "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
1423 )
1424 if use d3d9; then
1425 PATCHES+=( "${D3D9_DIR}/d3d9-helper.patch" )
1426 @@ -331,6 +345,7 @@ src_prepare() {
1427 fi
1428
1429 default
1430 + eapply_bin
1431 eautoreconf
1432
1433 # Modification of the server protocol requires regenerating the server requests
1434 @@ -347,7 +362,7 @@ src_prepare() {
1435 sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
1436
1437 # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
1438 - cp "${WORKDIR}/${WINE_DESKTOP_COMMON_P}/icons/oic_winlogo.ico" dlls/user32/resources/ || die
1439 + cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
1440
1441 l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
1442 }
1443
1444 diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.2.ebuild b/app-emulation/wine-d3d9/wine-d3d9-2.2.ebuild
1445 index 6e3bde0a930..280c1174f31 100644
1446 --- a/app-emulation/wine-d3d9/wine-d3d9-2.2.ebuild
1447 +++ b/app-emulation/wine-d3d9/wine-d3d9-2.2.ebuild
1448 @@ -12,7 +12,7 @@ MY_PN="${PN%%-*}"
1449 MY_P="${MY_PN}-${PV}"
1450
1451 if [[ ${PV} == "9999" ]] ; then
1452 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
1453 + EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
1454 EGIT_BRANCH="master"
1455 inherit git-r3
1456 SRC_URI=""
1457 @@ -26,13 +26,13 @@ S="${WORKDIR}/${MY_P}"
1458
1459 D3D9_P="wine-d3d9-${PV}"
1460 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
1461 -WDC_V="20150204"
1462 -WINE_DESKTOP_COMMON_P="wine-desktop-common-${WDC_V}"
1463 +GWP_V="20170830"
1464 +PATCHDIR="${WORKDIR}/gentoo-wine-patches"
1465
1466 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine patchset"
1467 HOMEPAGE="https://www.winehq.org/"
1468 SRC_URI="${SRC_URI}
1469 - https://github.com/NP-Hardass/wine-desktop-common/archive/${WDC_V}.tar.gz -> ${WINE_DESKTOP_COMMON_P}.tar.gz
1470 + https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
1471 "
1472
1473 if [[ ${PV} == "9999" ]] ; then
1474 @@ -146,6 +146,7 @@ RDEPEND="${COMMON_DEPEND}
1475
1476 # tools/make_requests requires perl
1477 DEPEND="${COMMON_DEPEND}
1478 + dev-util/patchbin
1479 sys-devel/flex
1480 >=sys-kernel/linux-headers-2.6
1481 virtual/pkgconfig
1482 @@ -173,7 +174,7 @@ wine_compiler_check() {
1483 # bug #549768
1484 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
1485 ebegin "Checking for gcc-5 ms_abi compiler bug"
1486 - $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
1487 + $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
1488 # Run in subshell to prevent "Aborted" message
1489 ( "${T}"/pr66838 || false ) >/dev/null 2>&1
1490 if ! eend $?; then
1491 @@ -189,7 +190,7 @@ wine_compiler_check() {
1492 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
1493 ebegin "Checking for gcc-5-3 stack realignment compiler bug"
1494 # Compile in subshell to prevent "Aborted" message
1495 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${FILESDIR}"/pr69140.c -o "${T}"/pr69140 ) >/dev/null 2>&1
1496 + ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
1497 if ! eend $?; then
1498 eerror "Wine cannot be built with this version of gcc-5.3"
1499 eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
1500 @@ -205,7 +206,7 @@ wine_compiler_check() {
1501 if use abi_x86_64; then
1502 ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
1503 # Compile in subshell to prevent "Aborted" message
1504 - ( $(tc-getCC) -O2 "${FILESDIR}"/builtin_ms_va_list.c -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
1505 + ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
1506 if ! eend $?; then
1507 eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
1508 eerror
1509 @@ -317,12 +318,25 @@ src_unpack() {
1510 }
1511
1512 src_prepare() {
1513 +
1514 + eapply_bin(){
1515 + local patch
1516 + for patch in ${PATCHES_BIN[@]}; do
1517 + patchbin --nogit < "${patch}" || die
1518 + done
1519 + }
1520 +
1521 local md5="$(md5sum server/protocol.def)"
1522 local PATCHES=(
1523 - "${FILESDIR}"/${MY_PN}-1.5.26-winegcc.patch #260726
1524 - "${FILESDIR}"/${MY_PN}-1.9.5-multilib-portage.patch #395615
1525 - "${FILESDIR}"/${MY_PN}-1.6-memset-O3.patch #480508
1526 - "${FILESDIR}"/${MY_PN}-2.0-multislot-apploader.patch
1527 + "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
1528 + "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
1529 + "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
1530 + "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
1531 + "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
1532 + "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
1533 + )
1534 + local PATCHES_BIN=(
1535 + "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
1536 )
1537 if use d3d9; then
1538 PATCHES+=( "${D3D9_DIR}/d3d9-helper.patch" )
1539 @@ -330,6 +344,7 @@ src_prepare() {
1540 fi
1541
1542 default
1543 + eapply_bin
1544 eautoreconf
1545
1546 # Modification of the server protocol requires regenerating the server requests
1547 @@ -346,7 +361,7 @@ src_prepare() {
1548 sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
1549
1550 # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
1551 - cp "${WORKDIR}/${WINE_DESKTOP_COMMON_P}/icons/oic_winlogo.ico" dlls/user32/resources/ || die
1552 + cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
1553
1554 l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
1555 }
1556
1557 diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.3.ebuild b/app-emulation/wine-d3d9/wine-d3d9-2.3.ebuild
1558 index 6e3bde0a930..280c1174f31 100644
1559 --- a/app-emulation/wine-d3d9/wine-d3d9-2.3.ebuild
1560 +++ b/app-emulation/wine-d3d9/wine-d3d9-2.3.ebuild
1561 @@ -12,7 +12,7 @@ MY_PN="${PN%%-*}"
1562 MY_P="${MY_PN}-${PV}"
1563
1564 if [[ ${PV} == "9999" ]] ; then
1565 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
1566 + EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
1567 EGIT_BRANCH="master"
1568 inherit git-r3
1569 SRC_URI=""
1570 @@ -26,13 +26,13 @@ S="${WORKDIR}/${MY_P}"
1571
1572 D3D9_P="wine-d3d9-${PV}"
1573 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
1574 -WDC_V="20150204"
1575 -WINE_DESKTOP_COMMON_P="wine-desktop-common-${WDC_V}"
1576 +GWP_V="20170830"
1577 +PATCHDIR="${WORKDIR}/gentoo-wine-patches"
1578
1579 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine patchset"
1580 HOMEPAGE="https://www.winehq.org/"
1581 SRC_URI="${SRC_URI}
1582 - https://github.com/NP-Hardass/wine-desktop-common/archive/${WDC_V}.tar.gz -> ${WINE_DESKTOP_COMMON_P}.tar.gz
1583 + https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
1584 "
1585
1586 if [[ ${PV} == "9999" ]] ; then
1587 @@ -146,6 +146,7 @@ RDEPEND="${COMMON_DEPEND}
1588
1589 # tools/make_requests requires perl
1590 DEPEND="${COMMON_DEPEND}
1591 + dev-util/patchbin
1592 sys-devel/flex
1593 >=sys-kernel/linux-headers-2.6
1594 virtual/pkgconfig
1595 @@ -173,7 +174,7 @@ wine_compiler_check() {
1596 # bug #549768
1597 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
1598 ebegin "Checking for gcc-5 ms_abi compiler bug"
1599 - $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
1600 + $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
1601 # Run in subshell to prevent "Aborted" message
1602 ( "${T}"/pr66838 || false ) >/dev/null 2>&1
1603 if ! eend $?; then
1604 @@ -189,7 +190,7 @@ wine_compiler_check() {
1605 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
1606 ebegin "Checking for gcc-5-3 stack realignment compiler bug"
1607 # Compile in subshell to prevent "Aborted" message
1608 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${FILESDIR}"/pr69140.c -o "${T}"/pr69140 ) >/dev/null 2>&1
1609 + ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
1610 if ! eend $?; then
1611 eerror "Wine cannot be built with this version of gcc-5.3"
1612 eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
1613 @@ -205,7 +206,7 @@ wine_compiler_check() {
1614 if use abi_x86_64; then
1615 ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
1616 # Compile in subshell to prevent "Aborted" message
1617 - ( $(tc-getCC) -O2 "${FILESDIR}"/builtin_ms_va_list.c -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
1618 + ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
1619 if ! eend $?; then
1620 eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
1621 eerror
1622 @@ -317,12 +318,25 @@ src_unpack() {
1623 }
1624
1625 src_prepare() {
1626 +
1627 + eapply_bin(){
1628 + local patch
1629 + for patch in ${PATCHES_BIN[@]}; do
1630 + patchbin --nogit < "${patch}" || die
1631 + done
1632 + }
1633 +
1634 local md5="$(md5sum server/protocol.def)"
1635 local PATCHES=(
1636 - "${FILESDIR}"/${MY_PN}-1.5.26-winegcc.patch #260726
1637 - "${FILESDIR}"/${MY_PN}-1.9.5-multilib-portage.patch #395615
1638 - "${FILESDIR}"/${MY_PN}-1.6-memset-O3.patch #480508
1639 - "${FILESDIR}"/${MY_PN}-2.0-multislot-apploader.patch
1640 + "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
1641 + "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
1642 + "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
1643 + "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
1644 + "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
1645 + "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
1646 + )
1647 + local PATCHES_BIN=(
1648 + "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
1649 )
1650 if use d3d9; then
1651 PATCHES+=( "${D3D9_DIR}/d3d9-helper.patch" )
1652 @@ -330,6 +344,7 @@ src_prepare() {
1653 fi
1654
1655 default
1656 + eapply_bin
1657 eautoreconf
1658
1659 # Modification of the server protocol requires regenerating the server requests
1660 @@ -346,7 +361,7 @@ src_prepare() {
1661 sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
1662
1663 # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
1664 - cp "${WORKDIR}/${WINE_DESKTOP_COMMON_P}/icons/oic_winlogo.ico" dlls/user32/resources/ || die
1665 + cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
1666
1667 l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
1668 }
1669
1670 diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.4.ebuild b/app-emulation/wine-d3d9/wine-d3d9-2.4.ebuild
1671 index 6a8e7d81079..6dcd268b951 100644
1672 --- a/app-emulation/wine-d3d9/wine-d3d9-2.4.ebuild
1673 +++ b/app-emulation/wine-d3d9/wine-d3d9-2.4.ebuild
1674 @@ -12,7 +12,7 @@ MY_PN="${PN%%-*}"
1675 MY_P="${MY_PN}-${PV}"
1676
1677 if [[ ${PV} == "9999" ]] ; then
1678 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
1679 + EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
1680 EGIT_BRANCH="master"
1681 inherit git-r3
1682 SRC_URI=""
1683 @@ -26,13 +26,13 @@ S="${WORKDIR}/${MY_P}"
1684
1685 D3D9_P="wine-d3d9-${PV}"
1686 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
1687 -WDC_V="20150204"
1688 -WINE_DESKTOP_COMMON_P="wine-desktop-common-${WDC_V}"
1689 +GWP_V="20170830"
1690 +PATCHDIR="${WORKDIR}/gentoo-wine-patches"
1691
1692 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine patchset"
1693 HOMEPAGE="https://www.winehq.org/"
1694 SRC_URI="${SRC_URI}
1695 - https://github.com/NP-Hardass/wine-desktop-common/archive/${WDC_V}.tar.gz -> ${WINE_DESKTOP_COMMON_P}.tar.gz
1696 + https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
1697 "
1698
1699 if [[ ${PV} == "9999" ]] ; then
1700 @@ -146,6 +146,7 @@ RDEPEND="${COMMON_DEPEND}
1701
1702 # tools/make_requests requires perl
1703 DEPEND="${COMMON_DEPEND}
1704 + dev-util/patchbin
1705 sys-devel/flex
1706 >=sys-kernel/linux-headers-2.6
1707 virtual/pkgconfig
1708 @@ -173,7 +174,7 @@ wine_compiler_check() {
1709 # bug #549768
1710 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
1711 ebegin "Checking for gcc-5 ms_abi compiler bug"
1712 - $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
1713 + $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
1714 # Run in subshell to prevent "Aborted" message
1715 ( "${T}"/pr66838 || false ) >/dev/null 2>&1
1716 if ! eend $?; then
1717 @@ -189,7 +190,7 @@ wine_compiler_check() {
1718 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
1719 ebegin "Checking for gcc-5-3 stack realignment compiler bug"
1720 # Compile in subshell to prevent "Aborted" message
1721 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${FILESDIR}"/pr69140.c -o "${T}"/pr69140 ) >/dev/null 2>&1
1722 + ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
1723 if ! eend $?; then
1724 eerror "Wine cannot be built with this version of gcc-5.3"
1725 eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
1726 @@ -205,7 +206,7 @@ wine_compiler_check() {
1727 if use abi_x86_64; then
1728 ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
1729 # Compile in subshell to prevent "Aborted" message
1730 - ( $(tc-getCC) -O2 "${FILESDIR}"/builtin_ms_va_list.c -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
1731 + ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
1732 if ! eend $?; then
1733 eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
1734 eerror
1735 @@ -317,12 +318,25 @@ src_unpack() {
1736 }
1737
1738 src_prepare() {
1739 +
1740 + eapply_bin(){
1741 + local patch
1742 + for patch in ${PATCHES_BIN[@]}; do
1743 + patchbin --nogit < "${patch}" || die
1744 + done
1745 + }
1746 +
1747 local md5="$(md5sum server/protocol.def)"
1748 local PATCHES=(
1749 - "${FILESDIR}"/${MY_PN}-1.5.26-winegcc.patch #260726
1750 - "${FILESDIR}"/${MY_PN}-1.9.5-multilib-portage.patch #395615
1751 - "${FILESDIR}"/${MY_PN}-1.6-memset-O3.patch #480508
1752 - "${FILESDIR}"/${MY_PN}-2.0-multislot-apploader.patch
1753 + "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
1754 + "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
1755 + "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
1756 + "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
1757 + "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
1758 + "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
1759 + )
1760 + local PATCHES_BIN=(
1761 + "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
1762 )
1763 if use d3d9; then
1764 PATCHES+=( "${D3D9_DIR}/d3d9-helper.patch" )
1765 @@ -330,6 +344,7 @@ src_prepare() {
1766 fi
1767
1768 default
1769 + eapply_bin
1770 eautoreconf
1771
1772 # Modification of the server protocol requires regenerating the server requests
1773 @@ -346,7 +361,7 @@ src_prepare() {
1774 sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
1775
1776 # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
1777 - cp "${WORKDIR}/${WINE_DESKTOP_COMMON_P}/icons/oic_winlogo.ico" dlls/user32/resources/ || die
1778 + cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
1779
1780 l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
1781 }
1782
1783 diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.5.ebuild b/app-emulation/wine-d3d9/wine-d3d9-2.5.ebuild
1784 index 6a8e7d81079..6dcd268b951 100644
1785 --- a/app-emulation/wine-d3d9/wine-d3d9-2.5.ebuild
1786 +++ b/app-emulation/wine-d3d9/wine-d3d9-2.5.ebuild
1787 @@ -12,7 +12,7 @@ MY_PN="${PN%%-*}"
1788 MY_P="${MY_PN}-${PV}"
1789
1790 if [[ ${PV} == "9999" ]] ; then
1791 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
1792 + EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
1793 EGIT_BRANCH="master"
1794 inherit git-r3
1795 SRC_URI=""
1796 @@ -26,13 +26,13 @@ S="${WORKDIR}/${MY_P}"
1797
1798 D3D9_P="wine-d3d9-${PV}"
1799 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
1800 -WDC_V="20150204"
1801 -WINE_DESKTOP_COMMON_P="wine-desktop-common-${WDC_V}"
1802 +GWP_V="20170830"
1803 +PATCHDIR="${WORKDIR}/gentoo-wine-patches"
1804
1805 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine patchset"
1806 HOMEPAGE="https://www.winehq.org/"
1807 SRC_URI="${SRC_URI}
1808 - https://github.com/NP-Hardass/wine-desktop-common/archive/${WDC_V}.tar.gz -> ${WINE_DESKTOP_COMMON_P}.tar.gz
1809 + https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
1810 "
1811
1812 if [[ ${PV} == "9999" ]] ; then
1813 @@ -146,6 +146,7 @@ RDEPEND="${COMMON_DEPEND}
1814
1815 # tools/make_requests requires perl
1816 DEPEND="${COMMON_DEPEND}
1817 + dev-util/patchbin
1818 sys-devel/flex
1819 >=sys-kernel/linux-headers-2.6
1820 virtual/pkgconfig
1821 @@ -173,7 +174,7 @@ wine_compiler_check() {
1822 # bug #549768
1823 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
1824 ebegin "Checking for gcc-5 ms_abi compiler bug"
1825 - $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
1826 + $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
1827 # Run in subshell to prevent "Aborted" message
1828 ( "${T}"/pr66838 || false ) >/dev/null 2>&1
1829 if ! eend $?; then
1830 @@ -189,7 +190,7 @@ wine_compiler_check() {
1831 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
1832 ebegin "Checking for gcc-5-3 stack realignment compiler bug"
1833 # Compile in subshell to prevent "Aborted" message
1834 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${FILESDIR}"/pr69140.c -o "${T}"/pr69140 ) >/dev/null 2>&1
1835 + ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
1836 if ! eend $?; then
1837 eerror "Wine cannot be built with this version of gcc-5.3"
1838 eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
1839 @@ -205,7 +206,7 @@ wine_compiler_check() {
1840 if use abi_x86_64; then
1841 ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
1842 # Compile in subshell to prevent "Aborted" message
1843 - ( $(tc-getCC) -O2 "${FILESDIR}"/builtin_ms_va_list.c -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
1844 + ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
1845 if ! eend $?; then
1846 eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
1847 eerror
1848 @@ -317,12 +318,25 @@ src_unpack() {
1849 }
1850
1851 src_prepare() {
1852 +
1853 + eapply_bin(){
1854 + local patch
1855 + for patch in ${PATCHES_BIN[@]}; do
1856 + patchbin --nogit < "${patch}" || die
1857 + done
1858 + }
1859 +
1860 local md5="$(md5sum server/protocol.def)"
1861 local PATCHES=(
1862 - "${FILESDIR}"/${MY_PN}-1.5.26-winegcc.patch #260726
1863 - "${FILESDIR}"/${MY_PN}-1.9.5-multilib-portage.patch #395615
1864 - "${FILESDIR}"/${MY_PN}-1.6-memset-O3.patch #480508
1865 - "${FILESDIR}"/${MY_PN}-2.0-multislot-apploader.patch
1866 + "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
1867 + "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
1868 + "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
1869 + "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
1870 + "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
1871 + "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
1872 + )
1873 + local PATCHES_BIN=(
1874 + "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
1875 )
1876 if use d3d9; then
1877 PATCHES+=( "${D3D9_DIR}/d3d9-helper.patch" )
1878 @@ -330,6 +344,7 @@ src_prepare() {
1879 fi
1880
1881 default
1882 + eapply_bin
1883 eautoreconf
1884
1885 # Modification of the server protocol requires regenerating the server requests
1886 @@ -346,7 +361,7 @@ src_prepare() {
1887 sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
1888
1889 # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
1890 - cp "${WORKDIR}/${WINE_DESKTOP_COMMON_P}/icons/oic_winlogo.ico" dlls/user32/resources/ || die
1891 + cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
1892
1893 l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
1894 }
1895
1896 diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.6.ebuild b/app-emulation/wine-d3d9/wine-d3d9-2.6.ebuild
1897 index 6a8e7d81079..6dcd268b951 100644
1898 --- a/app-emulation/wine-d3d9/wine-d3d9-2.6.ebuild
1899 +++ b/app-emulation/wine-d3d9/wine-d3d9-2.6.ebuild
1900 @@ -12,7 +12,7 @@ MY_PN="${PN%%-*}"
1901 MY_P="${MY_PN}-${PV}"
1902
1903 if [[ ${PV} == "9999" ]] ; then
1904 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
1905 + EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
1906 EGIT_BRANCH="master"
1907 inherit git-r3
1908 SRC_URI=""
1909 @@ -26,13 +26,13 @@ S="${WORKDIR}/${MY_P}"
1910
1911 D3D9_P="wine-d3d9-${PV}"
1912 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
1913 -WDC_V="20150204"
1914 -WINE_DESKTOP_COMMON_P="wine-desktop-common-${WDC_V}"
1915 +GWP_V="20170830"
1916 +PATCHDIR="${WORKDIR}/gentoo-wine-patches"
1917
1918 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine patchset"
1919 HOMEPAGE="https://www.winehq.org/"
1920 SRC_URI="${SRC_URI}
1921 - https://github.com/NP-Hardass/wine-desktop-common/archive/${WDC_V}.tar.gz -> ${WINE_DESKTOP_COMMON_P}.tar.gz
1922 + https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
1923 "
1924
1925 if [[ ${PV} == "9999" ]] ; then
1926 @@ -146,6 +146,7 @@ RDEPEND="${COMMON_DEPEND}
1927
1928 # tools/make_requests requires perl
1929 DEPEND="${COMMON_DEPEND}
1930 + dev-util/patchbin
1931 sys-devel/flex
1932 >=sys-kernel/linux-headers-2.6
1933 virtual/pkgconfig
1934 @@ -173,7 +174,7 @@ wine_compiler_check() {
1935 # bug #549768
1936 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
1937 ebegin "Checking for gcc-5 ms_abi compiler bug"
1938 - $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
1939 + $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
1940 # Run in subshell to prevent "Aborted" message
1941 ( "${T}"/pr66838 || false ) >/dev/null 2>&1
1942 if ! eend $?; then
1943 @@ -189,7 +190,7 @@ wine_compiler_check() {
1944 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
1945 ebegin "Checking for gcc-5-3 stack realignment compiler bug"
1946 # Compile in subshell to prevent "Aborted" message
1947 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${FILESDIR}"/pr69140.c -o "${T}"/pr69140 ) >/dev/null 2>&1
1948 + ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
1949 if ! eend $?; then
1950 eerror "Wine cannot be built with this version of gcc-5.3"
1951 eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
1952 @@ -205,7 +206,7 @@ wine_compiler_check() {
1953 if use abi_x86_64; then
1954 ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
1955 # Compile in subshell to prevent "Aborted" message
1956 - ( $(tc-getCC) -O2 "${FILESDIR}"/builtin_ms_va_list.c -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
1957 + ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
1958 if ! eend $?; then
1959 eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
1960 eerror
1961 @@ -317,12 +318,25 @@ src_unpack() {
1962 }
1963
1964 src_prepare() {
1965 +
1966 + eapply_bin(){
1967 + local patch
1968 + for patch in ${PATCHES_BIN[@]}; do
1969 + patchbin --nogit < "${patch}" || die
1970 + done
1971 + }
1972 +
1973 local md5="$(md5sum server/protocol.def)"
1974 local PATCHES=(
1975 - "${FILESDIR}"/${MY_PN}-1.5.26-winegcc.patch #260726
1976 - "${FILESDIR}"/${MY_PN}-1.9.5-multilib-portage.patch #395615
1977 - "${FILESDIR}"/${MY_PN}-1.6-memset-O3.patch #480508
1978 - "${FILESDIR}"/${MY_PN}-2.0-multislot-apploader.patch
1979 + "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
1980 + "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
1981 + "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
1982 + "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
1983 + "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
1984 + "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
1985 + )
1986 + local PATCHES_BIN=(
1987 + "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
1988 )
1989 if use d3d9; then
1990 PATCHES+=( "${D3D9_DIR}/d3d9-helper.patch" )
1991 @@ -330,6 +344,7 @@ src_prepare() {
1992 fi
1993
1994 default
1995 + eapply_bin
1996 eautoreconf
1997
1998 # Modification of the server protocol requires regenerating the server requests
1999 @@ -346,7 +361,7 @@ src_prepare() {
2000 sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
2001
2002 # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
2003 - cp "${WORKDIR}/${WINE_DESKTOP_COMMON_P}/icons/oic_winlogo.ico" dlls/user32/resources/ || die
2004 + cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
2005
2006 l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
2007 }
2008
2009 diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.7.ebuild b/app-emulation/wine-d3d9/wine-d3d9-2.7.ebuild
2010 index 6a8e7d81079..6dcd268b951 100644
2011 --- a/app-emulation/wine-d3d9/wine-d3d9-2.7.ebuild
2012 +++ b/app-emulation/wine-d3d9/wine-d3d9-2.7.ebuild
2013 @@ -12,7 +12,7 @@ MY_PN="${PN%%-*}"
2014 MY_P="${MY_PN}-${PV}"
2015
2016 if [[ ${PV} == "9999" ]] ; then
2017 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
2018 + EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
2019 EGIT_BRANCH="master"
2020 inherit git-r3
2021 SRC_URI=""
2022 @@ -26,13 +26,13 @@ S="${WORKDIR}/${MY_P}"
2023
2024 D3D9_P="wine-d3d9-${PV}"
2025 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
2026 -WDC_V="20150204"
2027 -WINE_DESKTOP_COMMON_P="wine-desktop-common-${WDC_V}"
2028 +GWP_V="20170830"
2029 +PATCHDIR="${WORKDIR}/gentoo-wine-patches"
2030
2031 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine patchset"
2032 HOMEPAGE="https://www.winehq.org/"
2033 SRC_URI="${SRC_URI}
2034 - https://github.com/NP-Hardass/wine-desktop-common/archive/${WDC_V}.tar.gz -> ${WINE_DESKTOP_COMMON_P}.tar.gz
2035 + https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
2036 "
2037
2038 if [[ ${PV} == "9999" ]] ; then
2039 @@ -146,6 +146,7 @@ RDEPEND="${COMMON_DEPEND}
2040
2041 # tools/make_requests requires perl
2042 DEPEND="${COMMON_DEPEND}
2043 + dev-util/patchbin
2044 sys-devel/flex
2045 >=sys-kernel/linux-headers-2.6
2046 virtual/pkgconfig
2047 @@ -173,7 +174,7 @@ wine_compiler_check() {
2048 # bug #549768
2049 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
2050 ebegin "Checking for gcc-5 ms_abi compiler bug"
2051 - $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
2052 + $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
2053 # Run in subshell to prevent "Aborted" message
2054 ( "${T}"/pr66838 || false ) >/dev/null 2>&1
2055 if ! eend $?; then
2056 @@ -189,7 +190,7 @@ wine_compiler_check() {
2057 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
2058 ebegin "Checking for gcc-5-3 stack realignment compiler bug"
2059 # Compile in subshell to prevent "Aborted" message
2060 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${FILESDIR}"/pr69140.c -o "${T}"/pr69140 ) >/dev/null 2>&1
2061 + ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
2062 if ! eend $?; then
2063 eerror "Wine cannot be built with this version of gcc-5.3"
2064 eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
2065 @@ -205,7 +206,7 @@ wine_compiler_check() {
2066 if use abi_x86_64; then
2067 ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
2068 # Compile in subshell to prevent "Aborted" message
2069 - ( $(tc-getCC) -O2 "${FILESDIR}"/builtin_ms_va_list.c -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
2070 + ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
2071 if ! eend $?; then
2072 eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
2073 eerror
2074 @@ -317,12 +318,25 @@ src_unpack() {
2075 }
2076
2077 src_prepare() {
2078 +
2079 + eapply_bin(){
2080 + local patch
2081 + for patch in ${PATCHES_BIN[@]}; do
2082 + patchbin --nogit < "${patch}" || die
2083 + done
2084 + }
2085 +
2086 local md5="$(md5sum server/protocol.def)"
2087 local PATCHES=(
2088 - "${FILESDIR}"/${MY_PN}-1.5.26-winegcc.patch #260726
2089 - "${FILESDIR}"/${MY_PN}-1.9.5-multilib-portage.patch #395615
2090 - "${FILESDIR}"/${MY_PN}-1.6-memset-O3.patch #480508
2091 - "${FILESDIR}"/${MY_PN}-2.0-multislot-apploader.patch
2092 + "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
2093 + "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
2094 + "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
2095 + "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
2096 + "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
2097 + "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
2098 + )
2099 + local PATCHES_BIN=(
2100 + "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
2101 )
2102 if use d3d9; then
2103 PATCHES+=( "${D3D9_DIR}/d3d9-helper.patch" )
2104 @@ -330,6 +344,7 @@ src_prepare() {
2105 fi
2106
2107 default
2108 + eapply_bin
2109 eautoreconf
2110
2111 # Modification of the server protocol requires regenerating the server requests
2112 @@ -346,7 +361,7 @@ src_prepare() {
2113 sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
2114
2115 # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
2116 - cp "${WORKDIR}/${WINE_DESKTOP_COMMON_P}/icons/oic_winlogo.ico" dlls/user32/resources/ || die
2117 + cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
2118
2119 l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
2120 }
2121
2122 diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.8.ebuild b/app-emulation/wine-d3d9/wine-d3d9-2.8.ebuild
2123 index 6a8e7d81079..6dcd268b951 100644
2124 --- a/app-emulation/wine-d3d9/wine-d3d9-2.8.ebuild
2125 +++ b/app-emulation/wine-d3d9/wine-d3d9-2.8.ebuild
2126 @@ -12,7 +12,7 @@ MY_PN="${PN%%-*}"
2127 MY_P="${MY_PN}-${PV}"
2128
2129 if [[ ${PV} == "9999" ]] ; then
2130 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
2131 + EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
2132 EGIT_BRANCH="master"
2133 inherit git-r3
2134 SRC_URI=""
2135 @@ -26,13 +26,13 @@ S="${WORKDIR}/${MY_P}"
2136
2137 D3D9_P="wine-d3d9-${PV}"
2138 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
2139 -WDC_V="20150204"
2140 -WINE_DESKTOP_COMMON_P="wine-desktop-common-${WDC_V}"
2141 +GWP_V="20170830"
2142 +PATCHDIR="${WORKDIR}/gentoo-wine-patches"
2143
2144 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine patchset"
2145 HOMEPAGE="https://www.winehq.org/"
2146 SRC_URI="${SRC_URI}
2147 - https://github.com/NP-Hardass/wine-desktop-common/archive/${WDC_V}.tar.gz -> ${WINE_DESKTOP_COMMON_P}.tar.gz
2148 + https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
2149 "
2150
2151 if [[ ${PV} == "9999" ]] ; then
2152 @@ -146,6 +146,7 @@ RDEPEND="${COMMON_DEPEND}
2153
2154 # tools/make_requests requires perl
2155 DEPEND="${COMMON_DEPEND}
2156 + dev-util/patchbin
2157 sys-devel/flex
2158 >=sys-kernel/linux-headers-2.6
2159 virtual/pkgconfig
2160 @@ -173,7 +174,7 @@ wine_compiler_check() {
2161 # bug #549768
2162 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
2163 ebegin "Checking for gcc-5 ms_abi compiler bug"
2164 - $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
2165 + $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
2166 # Run in subshell to prevent "Aborted" message
2167 ( "${T}"/pr66838 || false ) >/dev/null 2>&1
2168 if ! eend $?; then
2169 @@ -189,7 +190,7 @@ wine_compiler_check() {
2170 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
2171 ebegin "Checking for gcc-5-3 stack realignment compiler bug"
2172 # Compile in subshell to prevent "Aborted" message
2173 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${FILESDIR}"/pr69140.c -o "${T}"/pr69140 ) >/dev/null 2>&1
2174 + ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
2175 if ! eend $?; then
2176 eerror "Wine cannot be built with this version of gcc-5.3"
2177 eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
2178 @@ -205,7 +206,7 @@ wine_compiler_check() {
2179 if use abi_x86_64; then
2180 ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
2181 # Compile in subshell to prevent "Aborted" message
2182 - ( $(tc-getCC) -O2 "${FILESDIR}"/builtin_ms_va_list.c -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
2183 + ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
2184 if ! eend $?; then
2185 eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
2186 eerror
2187 @@ -317,12 +318,25 @@ src_unpack() {
2188 }
2189
2190 src_prepare() {
2191 +
2192 + eapply_bin(){
2193 + local patch
2194 + for patch in ${PATCHES_BIN[@]}; do
2195 + patchbin --nogit < "${patch}" || die
2196 + done
2197 + }
2198 +
2199 local md5="$(md5sum server/protocol.def)"
2200 local PATCHES=(
2201 - "${FILESDIR}"/${MY_PN}-1.5.26-winegcc.patch #260726
2202 - "${FILESDIR}"/${MY_PN}-1.9.5-multilib-portage.patch #395615
2203 - "${FILESDIR}"/${MY_PN}-1.6-memset-O3.patch #480508
2204 - "${FILESDIR}"/${MY_PN}-2.0-multislot-apploader.patch
2205 + "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
2206 + "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
2207 + "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
2208 + "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
2209 + "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
2210 + "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
2211 + )
2212 + local PATCHES_BIN=(
2213 + "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
2214 )
2215 if use d3d9; then
2216 PATCHES+=( "${D3D9_DIR}/d3d9-helper.patch" )
2217 @@ -330,6 +344,7 @@ src_prepare() {
2218 fi
2219
2220 default
2221 + eapply_bin
2222 eautoreconf
2223
2224 # Modification of the server protocol requires regenerating the server requests
2225 @@ -346,7 +361,7 @@ src_prepare() {
2226 sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
2227
2228 # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
2229 - cp "${WORKDIR}/${WINE_DESKTOP_COMMON_P}/icons/oic_winlogo.ico" dlls/user32/resources/ || die
2230 + cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
2231
2232 l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
2233 }
2234
2235 diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.9.ebuild b/app-emulation/wine-d3d9/wine-d3d9-2.9.ebuild
2236 index a307eff70a4..2b18410a845 100644
2237 --- a/app-emulation/wine-d3d9/wine-d3d9-2.9.ebuild
2238 +++ b/app-emulation/wine-d3d9/wine-d3d9-2.9.ebuild
2239 @@ -12,7 +12,7 @@ MY_PN="${PN%%-*}"
2240 MY_P="${MY_PN}-${PV}"
2241
2242 if [[ ${PV} == "9999" ]] ; then
2243 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
2244 + EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
2245 EGIT_BRANCH="master"
2246 inherit git-r3
2247 SRC_URI=""
2248 @@ -26,13 +26,13 @@ S="${WORKDIR}/${MY_P}"
2249
2250 D3D9_P="wine-d3d9-${PV}"
2251 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
2252 -WDC_V="20150204"
2253 -WINE_DESKTOP_COMMON_P="wine-desktop-common-${WDC_V}"
2254 +GWP_V="20170830"
2255 +PATCHDIR="${WORKDIR}/gentoo-wine-patches"
2256
2257 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine patchset"
2258 HOMEPAGE="https://www.winehq.org/"
2259 SRC_URI="${SRC_URI}
2260 - https://github.com/NP-Hardass/wine-desktop-common/archive/${WDC_V}.tar.gz -> ${WINE_DESKTOP_COMMON_P}.tar.gz
2261 + https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
2262 "
2263
2264 if [[ ${PV} == "9999" ]] ; then
2265 @@ -147,6 +147,7 @@ RDEPEND="${COMMON_DEPEND}
2266
2267 # tools/make_requests requires perl
2268 DEPEND="${COMMON_DEPEND}
2269 + dev-util/patchbin
2270 sys-devel/flex
2271 >=sys-kernel/linux-headers-2.6
2272 virtual/pkgconfig
2273 @@ -174,7 +175,7 @@ wine_compiler_check() {
2274 # bug #549768
2275 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
2276 ebegin "Checking for gcc-5 ms_abi compiler bug"
2277 - $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
2278 + $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
2279 # Run in subshell to prevent "Aborted" message
2280 ( "${T}"/pr66838 || false ) >/dev/null 2>&1
2281 if ! eend $?; then
2282 @@ -190,7 +191,7 @@ wine_compiler_check() {
2283 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
2284 ebegin "Checking for gcc-5-3 stack realignment compiler bug"
2285 # Compile in subshell to prevent "Aborted" message
2286 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${FILESDIR}"/pr69140.c -o "${T}"/pr69140 ) >/dev/null 2>&1
2287 + ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
2288 if ! eend $?; then
2289 eerror "Wine cannot be built with this version of gcc-5.3"
2290 eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
2291 @@ -206,7 +207,7 @@ wine_compiler_check() {
2292 if use abi_x86_64; then
2293 ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
2294 # Compile in subshell to prevent "Aborted" message
2295 - ( $(tc-getCC) -O2 "${FILESDIR}"/builtin_ms_va_list.c -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
2296 + ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
2297 if ! eend $?; then
2298 eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
2299 eerror
2300 @@ -318,12 +319,25 @@ src_unpack() {
2301 }
2302
2303 src_prepare() {
2304 +
2305 + eapply_bin(){
2306 + local patch
2307 + for patch in ${PATCHES_BIN[@]}; do
2308 + patchbin --nogit < "${patch}" || die
2309 + done
2310 + }
2311 +
2312 local md5="$(md5sum server/protocol.def)"
2313 local PATCHES=(
2314 - "${FILESDIR}"/${MY_PN}-1.5.26-winegcc.patch #260726
2315 - "${FILESDIR}"/${MY_PN}-1.9.5-multilib-portage.patch #395615
2316 - "${FILESDIR}"/${MY_PN}-1.6-memset-O3.patch #480508
2317 - "${FILESDIR}"/${MY_PN}-2.0-multislot-apploader.patch
2318 + "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
2319 + "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
2320 + "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
2321 + "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
2322 + "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
2323 + "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
2324 + )
2325 + local PATCHES_BIN=(
2326 + "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
2327 )
2328 if use d3d9; then
2329 PATCHES+=( "${D3D9_DIR}/d3d9-helper.patch" )
2330 @@ -331,6 +345,7 @@ src_prepare() {
2331 fi
2332
2333 default
2334 + eapply_bin
2335 eautoreconf
2336
2337 # Modification of the server protocol requires regenerating the server requests
2338 @@ -347,7 +362,7 @@ src_prepare() {
2339 sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
2340
2341 # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
2342 - cp "${WORKDIR}/${WINE_DESKTOP_COMMON_P}/icons/oic_winlogo.ico" dlls/user32/resources/ || die
2343 + cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
2344
2345 l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
2346 }
2347
2348 diff --git a/app-emulation/wine-d3d9/wine-d3d9-9999.ebuild b/app-emulation/wine-d3d9/wine-d3d9-9999.ebuild
2349 index 8191c3108bb..e4c7ac02109 100644
2350 --- a/app-emulation/wine-d3d9/wine-d3d9-9999.ebuild
2351 +++ b/app-emulation/wine-d3d9/wine-d3d9-9999.ebuild
2352 @@ -12,7 +12,7 @@ MY_PN="${PN%%-*}"
2353 MY_P="${MY_PN}-${PV}"
2354
2355 if [[ ${PV} == "9999" ]] ; then
2356 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
2357 + EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
2358 EGIT_BRANCH="master"
2359 inherit git-r3
2360 SRC_URI=""
2361 @@ -26,13 +26,13 @@ S="${WORKDIR}/${MY_P}"
2362
2363 D3D9_P="wine-d3d9-${PV}"
2364 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
2365 -WDC_V="20150204"
2366 -WINE_DESKTOP_COMMON_P="wine-desktop-common-${WDC_V}"
2367 +GWP_V="20170830"
2368 +PATCHDIR="${WORKDIR}/gentoo-wine-patches"
2369
2370 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine patchset"
2371 HOMEPAGE="https://www.winehq.org/"
2372 SRC_URI="${SRC_URI}
2373 - https://github.com/NP-Hardass/wine-desktop-common/archive/${WDC_V}.tar.gz -> ${WINE_DESKTOP_COMMON_P}.tar.gz
2374 + https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
2375 "
2376
2377 if [[ ${PV} == "9999" ]] ; then
2378 @@ -147,6 +147,7 @@ RDEPEND="${COMMON_DEPEND}
2379
2380 # tools/make_requests requires perl
2381 DEPEND="${COMMON_DEPEND}
2382 + dev-util/patchbin
2383 sys-devel/flex
2384 >=sys-kernel/linux-headers-2.6
2385 virtual/pkgconfig
2386 @@ -174,7 +175,7 @@ wine_compiler_check() {
2387 # bug #549768
2388 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
2389 ebegin "Checking for gcc-5 ms_abi compiler bug"
2390 - $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
2391 + $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
2392 # Run in subshell to prevent "Aborted" message
2393 ( "${T}"/pr66838 || false ) >/dev/null 2>&1
2394 if ! eend $?; then
2395 @@ -190,7 +191,7 @@ wine_compiler_check() {
2396 if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
2397 ebegin "Checking for gcc-5-3 stack realignment compiler bug"
2398 # Compile in subshell to prevent "Aborted" message
2399 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${FILESDIR}"/pr69140.c -o "${T}"/pr69140 ) >/dev/null 2>&1
2400 + ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
2401 if ! eend $?; then
2402 eerror "Wine cannot be built with this version of gcc-5.3"
2403 eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
2404 @@ -206,7 +207,7 @@ wine_compiler_check() {
2405 if use abi_x86_64; then
2406 ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
2407 # Compile in subshell to prevent "Aborted" message
2408 - ( $(tc-getCC) -O2 "${FILESDIR}"/builtin_ms_va_list.c -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
2409 + ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
2410 if ! eend $?; then
2411 eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
2412 eerror
2413 @@ -318,12 +319,22 @@ src_unpack() {
2414 }
2415
2416 src_prepare() {
2417 +
2418 + eapply_bin(){
2419 + local patch
2420 + for patch in ${PATCHES_BIN[@]}; do
2421 + patchbin --nogit < "${patch}" || die
2422 + done
2423 + }
2424 +
2425 local md5="$(md5sum server/protocol.def)"
2426 local PATCHES=(
2427 - "${FILESDIR}"/${MY_PN}-1.5.26-winegcc.patch #260726
2428 - "${FILESDIR}"/${MY_PN}-1.9.5-multilib-portage.patch #395615
2429 - "${FILESDIR}"/${MY_PN}-1.6-memset-O3.patch #480508
2430 - "${FILESDIR}"/${MY_PN}-2.0-multislot-apploader.patch
2431 + "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
2432 + "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
2433 + "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
2434 + "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
2435 + )
2436 + local PATCHES_BIN=(
2437 )
2438 if use d3d9; then
2439 PATCHES+=( "${D3D9_DIR}/d3d9-helper.patch" )
2440 @@ -331,6 +342,7 @@ src_prepare() {
2441 fi
2442
2443 default
2444 + eapply_bin
2445 eautoreconf
2446
2447 # Modification of the server protocol requires regenerating the server requests
2448 @@ -347,7 +359,7 @@ src_prepare() {
2449 sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
2450
2451 # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
2452 - cp "${WORKDIR}/${WINE_DESKTOP_COMMON_P}/icons/oic_winlogo.ico" dlls/user32/resources/ || die
2453 + cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
2454
2455 l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
2456 }