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