1 |
commit: b13a5b220f570eae01cfce790f924c78dcff12ae |
2 |
Author: NP-Hardass <NP-Hardass <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Apr 10 17:16:21 2017 +0000 |
4 |
Commit: NP Hardass <np-hardass <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Apr 10 17:22:01 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b13a5b22 |
7 |
|
8 |
app-emulation/wine-any: Wine, freedom of user for any flags, multislot |
9 |
|
10 |
Imported from wine-a-holics overlay |
11 |
|
12 |
Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
13 |
|
14 |
app-emulation/wine-any/Manifest | 16 + |
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 |
.../wine-any/files/wine-1.7.12-osmesa-check.patch | 38 ++ |
21 |
.../files/wine-1.9.5-multilib-portage.patch | 31 ++ |
22 |
.../files/wine-2.0-multislot-apploader.patch | 14 + |
23 |
app-emulation/wine-any/metadata.xml | 49 ++ |
24 |
app-emulation/wine-any/wine-any-2.0.ebuild | 615 +++++++++++++++++++++ |
25 |
app-emulation/wine-any/wine-any-2.1.ebuild | 615 +++++++++++++++++++++ |
26 |
app-emulation/wine-any/wine-any-2.2.ebuild | 615 +++++++++++++++++++++ |
27 |
app-emulation/wine-any/wine-any-2.3.ebuild | 615 +++++++++++++++++++++ |
28 |
app-emulation/wine-any/wine-any-2.4.ebuild | 615 +++++++++++++++++++++ |
29 |
app-emulation/wine-any/wine-any-9999.ebuild | 615 +++++++++++++++++++++ |
30 |
16 files changed, 4000 insertions(+) |
31 |
|
32 |
diff --git a/app-emulation/wine-any/Manifest b/app-emulation/wine-any/Manifest |
33 |
new file mode 100644 |
34 |
index 00000000000..f080b63ddd9 |
35 |
--- /dev/null |
36 |
+++ b/app-emulation/wine-any/Manifest |
37 |
@@ -0,0 +1,16 @@ |
38 |
+DIST wine-2.0.tar.bz2 23662707 SHA256 9756f5a2129b6a83ba701e546173cbff86caa671b0af73eb8f72c03b20c066c6 SHA512 b0a57ba8202d9fc396e5bfb7a7718d6bababbed8f3351e7fdc36afa37f35a871e04903757618f73427aeb71a52b2d323977d79e48f8b38d636f23fd404441186 WHIRLPOOL fa9f774d87dae73c7d1f3b86dc3b03ea27065eb6140f1cac13c82fe16f7ebff8f8365ed447220cf5c2788b9f4aae7c482e4f9e2e69f47e5435209e148f5dbdfe |
39 |
+DIST wine-2.1.tar.xz 18887032 SHA256 bfb9abf63691c93df28d9599aaa866dc2b4e27209b3b7b546df8a37d7d9d1e6e SHA512 03d678ee6e89c2804813f2827255fcf59e96ca9a45b7d8ac441cfc84f835e5e5689c70a79a41a04c631e1add7807fa4a5758acef3bd7aadfb2e92e68958c6ef6 WHIRLPOOL 063d935f1ff0922100641f2f53cdac23d2993a83182d45e028e485fd7d0a13bc5cfb77bca76550b1537b3f42fecacef7fd64785adbf6425af823f56f96973b54 |
40 |
+DIST wine-2.2.tar.xz 18916364 SHA256 64cb57e1d8aa07f5c89ef26743b494f2d3ef9c0f4e50d3ee896a93535f7751f4 SHA512 0700868244d397c1442948716321e5ff030c667edce464570f76aa4340199489a422872aa3975bc0a57b8285c9d59fc04e223a4bde094169fc6db460acb626c4 WHIRLPOOL ffc3d357a76592651b589c6ac6608720d0258474890faf8fe3e20ac29cdd1496d569721256f9389d347bf2734a556099154fd18ef1b56f45bb46c4c15771d6ca |
41 |
+DIST wine-2.3.tar.xz 18931732 SHA256 afc95c7a87cc8f0730b462c50a5dfc9c462eb02c6bf5874b4fa99946f49e067e SHA512 bea78e8468555ff9e08dedf3918da5ea82721549c43984869989bbdafeea00e454820ff9558aa29925c97a165a9b01e5cd1fd397f133833c58824984a6686171 WHIRLPOOL 1f5ec8e5c32d124277e4c71d95726d3a5337575757c3029567c77165d65fcfec2ddf33d3863b4bf55c9eff7c3582c1ec7dbd76d84ed8bbbe89dd16db6b0128c1 |
42 |
+DIST wine-2.4.tar.xz 18953748 SHA256 87b5df07e4781fecce2f92415a4717208ea253a20a0df8b36b9f90b69b72748e SHA512 15ae7e97dc72a8636b2c15c93803ed430fa456d673add61457cf3e479e769559c682b40949b5d38828f6681f13183e560fcb4a2eb0f0ba25e6eade46f7d3d7c0 WHIRLPOOL 558ab7b7517ad5e03366b4db974047eba776585e958a5b71bb2e93993e21bc725ea7a8bcf2a4354f34ca38c94ba99ccd15f2f8b5e4b58066bf339d3517eec56c |
43 |
+DIST wine-d3d9-2.0.tar.gz 48373 SHA256 7bfac23706723c6d51a7a95e416e47fb2678cd4d0945b990f74eba2b059e6206 SHA512 a9e2d1c9f2784128e4c53a8dc923070a5057b5ff3d83c2b536a2d2df0bc8433ac92b8ab1c3cdf34158c0e7bfe497ddb5974605fbc1736a92307639d59450c7a1 WHIRLPOOL 53044c0a4b7159c3af75fc935d1ac45030e80dbfd70d787f64885ddc025cfcd62f724c3256e389a7fde680670e594101955f52301cf6b9bbf23ebc64552790c2 |
44 |
+DIST wine-d3d9-2.1.tar.gz 48385 SHA256 9fd80e3e2ea905272c42dbc14679e94c8e2f955101ae098c84060d4c62ffc9c6 SHA512 9234d8227412d940a6befcf79433f1d5ab0634d5e829f3771ffeea235af05be29ffc40438818b1976c77d1e2e79da8a67c4dab2b7d2e822b502fb6e4a1a7f8b7 WHIRLPOOL 790e482850a13c5bf0967e900620c36d71c4d6673106f8f5c2848550ed574d326d3945d9906de88d847bb5644a520aab7fe6d460b3c3afd49a396798dd253392 |
45 |
+DIST wine-d3d9-2.2.tar.gz 48387 SHA256 203ed60980ec584c09b413266728e3a93e2d980dbff9b4f65375a4e9744b5042 SHA512 6e9e031b51afc8ec200bbd252ff0d768c29af23907f782409834de593f896afb128f86fe012c95dc18e5f3c7267f170eb343d2a2c53d639933a337f0c1e04fab WHIRLPOOL 6b32c0dfd3068e87d94bbcd83718dd75a14b36d69b151e9257e04793d2d3ae78ce7da10b80cbc824ccefb6c11666241593f91963ddee6a58301f95bbde35285d |
46 |
+DIST wine-d3d9-2.3.tar.gz 48510 SHA256 fc17488a782def19fc02bf967128ab43236db49509e31771361a60fa3d17dd60 SHA512 58449f6b7ed7fd8182e2cce92e1d1195bf64a567c1cc92fd3f46af195e7e4039c3b2a128be9d3572d9067be6c1bb020f417c6d558bb551c60096c107067177b8 WHIRLPOOL f648a921cf4cd257a3a7dfbd3abf45d58c07782f329ec11c3a1eff3afe32e8040adb351d4a60e1b1f78c7cae0379f23468764ad162a101179d0f5b0e2c6d9413 |
47 |
+DIST wine-d3d9-2.4.tar.gz 48502 SHA256 4c7084e733d95545b894b152b2c6c9564dfb8df594cfeb1512dad80743b39ae0 SHA512 623b1720b8cd79ab6ad2a177b9beb174f31e6fc402d6885fa2006223c855919c6f5d4267c64212ecf8cf1746430c9715c506343fb740828fc99910f916b10ebe WHIRLPOOL 9c0ea34dedc2e39ce36f1539a6d761ba07429b316a1f7fad49067eec5c28a5c60b33b3d2473cbf66b009d9772c1fb123414bfa201eb8df3e61f8efc38aa1f3fa |
48 |
+DIST wine-desktop-common-20150204.tar.gz 99491 SHA256 444ad6b52b5290ec7d160e2cc40e4ba0910b4c4983dba1ceb054b81b09b24b5e SHA512 1f3d7022c5cff87ed3b8fd3b7cd14397c6f23b98fe6a7c583ac0d2f439ff29d943f57375f23687aa6519ff1d84ff07624a9a712d6f19fa207fd26d01edcb6688 WHIRLPOOL e9810b2952d25c05d831000e00e423de86809ec31b9a033fd4c64a70709da7338a9afc9e632e678f49c789a8a3702fbd0113226770cdb806623f2de371a16f54 |
49 |
+DIST wine-staging-2.0.tar.gz 10182575 SHA256 22a43cb50c1fff9c6f233a965247056e3321533aa73a6419aa34a22de7180039 SHA512 51412299259d6e92c8993543d5fdb3239ebe31e0d1d715e0a9e8ce94b3139c0567b08ff1600d41be94f12427cbfccc2f6b6b2ed030535445c95618aaf6578580 WHIRLPOOL 9879174bc3a7c8ece156c822b7a7b870908e51335702a78e6f04ea1496125a2018a879bfc53d1302e4825138d22af526308ba7f656d683a535be44d4515f1bac |
50 |
+DIST wine-staging-2.1.tar.gz 10101781 SHA256 1d193be2734ea495df2cae1dc54ce89204ca68699979174b0bd726d2e5e0576b SHA512 c64c48b265f0779c621a643ddbd2d12aaa548e4bff3b2b728280cdb9613214989911ee8ba5e46c7770f5f6430014a5da1c98e95d5008c1174bd14bf9ce5250db WHIRLPOOL ecf970ef436089bbcd0088e1608b22e808d54560e905c7d8046b3e21508166a595c3ef7b69819c45e4b13183bd9134a2bd7016d29c4da52985701d392eb35a0a |
51 |
+DIST wine-staging-2.2.tar.gz 10078327 SHA256 9d3cbf7e5f12c623d275457b910a158e0b176fcf50c09a5f8425864de604bc1d SHA512 8ad3f8ba4c6439a9ec4884a55018a67c9e2c2384830074646aac7b70cb9f4f5a20f760247ab42dc3d2f697cdac7ea5322be8ed12c435cb0bc185ac08fdd4dd91 WHIRLPOOL a34c19aaace64307de56d935cb0cef17d7c066c39b83c51e70ea76a20083f928bea55fe38d62b7a8250b0a9e8f00e0d2b744f43fcab433069ffb96625d955303 |
52 |
+DIST wine-staging-2.3.tar.gz 10071742 SHA256 9a81be606836fab6203857f7937ff97575947f75d52c80fb5489418efb8b87e1 SHA512 8e8af1e36cc69c63ec3542f0ec4db18b6d8c16b5c9077eb211297f3a886519da71bcf72934bf8d6d72e44c7c9f765e1d00203d0d75cab8544f69f9b0c10a7133 WHIRLPOOL 50738a6e20890748d7eb01152244d34b259759f61b3587ba39815dc066fc8e2b66ce182e1ddbc912f50076a3599aa060ec6a94eeaab4513ce3a776711929b9b1 |
53 |
+DIST wine-staging-2.4.tar.gz 10067020 SHA256 709cab12c0ebf7cf9504fd4a67eb851272309e00066ad81f184b0f55c63e9deb SHA512 55d11851697836b582ba54696cadc812ef6b14872440f5c3ed6fbe30a05abcb8abe2ab31a11ea4daeb354854c7c0e6549401d4b26b26621808bdeb89aeb206f9 WHIRLPOOL 8d344b7e6e89322c8dbbe6fd211851c90a45a33b514c182609cc60dc21939f791abc71d8665cd66e5c5161f159fe24c4772b99405833e3d11985a644e1335eaf |
54 |
|
55 |
diff --git a/app-emulation/wine-any/files/builtin_ms_va_list.c b/app-emulation/wine-any/files/builtin_ms_va_list.c |
56 |
new file mode 100644 |
57 |
index 00000000000..f36fc2609a0 |
58 |
--- /dev/null |
59 |
+++ b/app-emulation/wine-any/files/builtin_ms_va_list.c |
60 |
@@ -0,0 +1,9 @@ |
61 |
+/* Taken from Wine's configure script. LGPL 2.1+ */ |
62 |
+ |
63 |
+#include <stdarg.h> |
64 |
+ |
65 |
+int main(void) |
66 |
+{ |
67 |
+ void func(__builtin_ms_va_list *args); |
68 |
+ return 0; |
69 |
+} |
70 |
|
71 |
diff --git a/app-emulation/wine-any/files/pr66838.c b/app-emulation/wine-any/files/pr66838.c |
72 |
new file mode 100644 |
73 |
index 00000000000..cd616859427 |
74 |
--- /dev/null |
75 |
+++ b/app-emulation/wine-any/files/pr66838.c |
76 |
@@ -0,0 +1,36 @@ |
77 |
+/* From gcc svn, /branches/gcc-5-branch/gcc/testsuite/gcc.target/i386/pr66838.c */ |
78 |
+/* Copyrighted and distributed under the same terms as gcc */ |
79 |
+ |
80 |
+void abort (void); |
81 |
+ |
82 |
+char global; |
83 |
+ |
84 |
+__attribute__((sysv_abi, noinline, noclone)) |
85 |
+void sysv_abi_func(char const *desc, void *local) |
86 |
+{ |
87 |
+ register int esi asm ("esi"); |
88 |
+ register int edi asm ("edi"); |
89 |
+ |
90 |
+ if (local != &global) |
91 |
+ abort (); |
92 |
+ |
93 |
+ /* Clobber some of the extra SYSV ABI registers. */ |
94 |
+ asm volatile ("movl\t%2, %0\n\tmovl\t%2, %1" |
95 |
+ : "=r" (esi), "=r" (edi) |
96 |
+ : "i" (0xdeadbeef)); |
97 |
+} |
98 |
+ |
99 |
+__attribute__((ms_abi, noinline, noclone)) |
100 |
+void ms_abi_func () |
101 |
+{ |
102 |
+ sysv_abi_func ("1st call", &global); |
103 |
+ sysv_abi_func ("2nd call", &global); |
104 |
+ sysv_abi_func ("3rd call", &global); |
105 |
+} |
106 |
+ |
107 |
+int |
108 |
+main(void) |
109 |
+{ |
110 |
+ ms_abi_func(); |
111 |
+ return 0; |
112 |
+} |
113 |
|
114 |
diff --git a/app-emulation/wine-any/files/pr69140.c b/app-emulation/wine-any/files/pr69140.c |
115 |
new file mode 100644 |
116 |
index 00000000000..7c9e001f301 |
117 |
--- /dev/null |
118 |
+++ b/app-emulation/wine-any/files/pr69140.c |
119 |
@@ -0,0 +1,37 @@ |
120 |
+/* { dg-do compile { target lp64 } } */ |
121 |
+/* { dg-options "-O2 -mincoming-stack-boundary=3" } */ |
122 |
+ |
123 |
+typedef struct { |
124 |
+ unsigned int buf[4]; |
125 |
+ unsigned char in[64]; |
126 |
+} MD4_CTX; |
127 |
+ |
128 |
+static void |
129 |
+MD4Transform (unsigned int buf[4], const unsigned int in[16]) |
130 |
+{ |
131 |
+ unsigned int a, b, c, d; |
132 |
+ (b) += ((((c)) & ((d))) | ((~(c)) & ((a)))) + (in[7]); |
133 |
+ (a) += ((((b)) & ((c))) | ((~(b)) & ((d)))) + (in[8]); |
134 |
+ (d) += ((((a)) & ((b))) | ((~(a)) & ((c)))) + (in[9]); |
135 |
+ buf[3] += d; |
136 |
+} |
137 |
+ |
138 |
+void __attribute__((ms_abi)) |
139 |
+MD4Update (MD4_CTX *ctx, const unsigned char *buf) |
140 |
+{ |
141 |
+ MD4Transform( ctx->buf, (unsigned int *)ctx->in); |
142 |
+ MD4Transform( ctx->buf, (unsigned int *)ctx->in); |
143 |
+} |
144 |
+ |
145 |
+int |
146 |
+main(void) |
147 |
+{ |
148 |
+ MD4_CTX ctx_test = |
149 |
+ { |
150 |
+ { 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476 }, |
151 |
+ { 0, 0 } |
152 |
+ }; |
153 |
+ unsigned char buf[64]; |
154 |
+ |
155 |
+ MD4Update(&ctx_test, (const unsigned char *) &buf); |
156 |
+} |
157 |
|
158 |
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 |
159 |
new file mode 100644 |
160 |
index 00000000000..2045e343401 |
161 |
--- /dev/null |
162 |
+++ b/app-emulation/wine-any/files/wine-1.5.26-winegcc.patch |
163 |
@@ -0,0 +1,59 @@ |
164 |
+http://bugs.gentoo.org/260726 |
165 |
+ |
166 |
+diff --git a/tools/winebuild/main.c b/tools/winebuild/main.c |
167 |
+index 16b4165..5c77267 100644 |
168 |
+--- a/tools/winebuild/main.c |
169 |
++++ b/tools/winebuild/main.c |
170 |
+@@ -48,10 +48,13 @@ int link_ext_symbols = 0; |
171 |
+ int force_pointer_size = 0; |
172 |
+ int unwind_tables = 0; |
173 |
+ |
174 |
++#undef FORCE_POINTER_SIZE |
175 |
+ #ifdef __i386__ |
176 |
+ enum target_cpu target_cpu = CPU_x86; |
177 |
++#define FORCE_POINTER_SIZE |
178 |
+ #elif defined(__x86_64__) |
179 |
+ enum target_cpu target_cpu = CPU_x86_64; |
180 |
++#define FORCE_POINTER_SIZE |
181 |
+ #elif defined(__powerpc__) |
182 |
+ enum target_cpu target_cpu = CPU_POWERPC; |
183 |
+ #elif defined(__arm__) |
184 |
+@@ -611,6 +614,10 @@ int main(int argc, char **argv) |
185 |
+ signal( SIGTERM, exit_on_signal ); |
186 |
+ signal( SIGINT, exit_on_signal ); |
187 |
+ |
188 |
++#ifdef FORCE_POINTER_SIZE |
189 |
++ force_pointer_size = sizeof(size_t); |
190 |
++#endif |
191 |
++ |
192 |
+ output_file = stdout; |
193 |
+ argv = parse_options( argc, argv, spec ); |
194 |
+ |
195 |
+diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c |
196 |
+index 06aa200..c44d2e3 100644 |
197 |
+--- a/tools/winegcc/winegcc.c |
198 |
++++ b/tools/winegcc/winegcc.c |
199 |
+@@ -213,10 +213,13 @@ struct options |
200 |
+ strarray* files; |
201 |
+ }; |
202 |
+ |
203 |
++#undef FORCE_POINTER_SIZE |
204 |
+ #ifdef __i386__ |
205 |
+ static const enum target_cpu build_cpu = CPU_x86; |
206 |
++#define FORCE_POINTER_SIZE |
207 |
+ #elif defined(__x86_64__) |
208 |
+ static const enum target_cpu build_cpu = CPU_x86_64; |
209 |
++#define FORCE_POINTER_SIZE |
210 |
+ #elif defined(__powerpc__) |
211 |
+ static const enum target_cpu build_cpu = CPU_POWERPC; |
212 |
+ #elif defined(__arm__) |
213 |
+@@ -1258,6 +1261,9 @@ int main(int argc, char **argv) |
214 |
+ opts.linker_args = strarray_alloc(); |
215 |
+ opts.compiler_args = strarray_alloc(); |
216 |
+ opts.winebuild_args = strarray_alloc(); |
217 |
++#ifdef FORCE_POINTER_SIZE |
218 |
++ opts.force_pointer_size = sizeof(size_t); |
219 |
++#endif |
220 |
+ |
221 |
+ /* determine the processor type */ |
222 |
+ if (strendswith(argv[0], "winecpp")) opts.processor = proc_cpp; |
223 |
|
224 |
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 |
225 |
new file mode 100644 |
226 |
index 00000000000..75372f86914 |
227 |
--- /dev/null |
228 |
+++ b/app-emulation/wine-any/files/wine-1.6-memset-O3.patch |
229 |
@@ -0,0 +1,21 @@ |
230 |
+Avoid "undefined reference to `memset'" error when building with |
231 |
+USE=custom-cflags and -O3 in CFLAGS with gcc-4.8. |
232 |
+ |
233 |
+See: |
234 |
+ |
235 |
+http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56888 |
236 |
+http://bugs.winehq.org/show_bug.cgi?id=33521 |
237 |
+https://bugs.gentoo.org/show_bug.cgi?id=480508 |
238 |
+ |
239 |
+diff --git a/configure.ac b/configure.ac |
240 |
+index d8033cf..fe7cc7d 100644 |
241 |
+--- a/configure.ac |
242 |
++++ b/configure.ac |
243 |
+@@ -1767,6 +1767,7 @@ then |
244 |
+ |
245 |
+ dnl Check for some compiler flags |
246 |
+ WINE_TRY_CFLAGS([-fno-builtin],[AC_SUBST(BUILTINFLAG,"-fno-builtin")]) |
247 |
++ WINE_TRY_CFLAGS([-fno-tree-loop-distribute-patterns]) |
248 |
+ WINE_TRY_CFLAGS([-fno-strict-aliasing]) |
249 |
+ dnl clang needs to be told to fail on unknown options |
250 |
+ saved_CFLAGS=$CFLAGS |
251 |
|
252 |
diff --git a/app-emulation/wine-any/files/wine-1.7.12-osmesa-check.patch b/app-emulation/wine-any/files/wine-1.7.12-osmesa-check.patch |
253 |
new file mode 100644 |
254 |
index 00000000000..7cafcd4e6dc |
255 |
--- /dev/null |
256 |
+++ b/app-emulation/wine-any/files/wine-1.7.12-osmesa-check.patch |
257 |
@@ -0,0 +1,38 @@ |
258 |
+From 6932b9a17c4f64c13f7060895d46334bc7022430 Mon Sep 17 00:00:00 2001 |
259 |
+From: Alexandre Rostovtsev <tetromino@g.o> |
260 |
+Date: Tue, 7 Aug 2012 01:29:01 -0400 |
261 |
+Subject: [PATCH] Do not check for libGL symbols when checking libOSMesa |
262 |
+ |
263 |
+If mesa had been built with shared glapi, glAccum is not available in |
264 |
+libOSMesa without explicitly linking to libGL. In addition, in |
265 |
+mesa-8.0.x and earlier, libOSMesa needs to be explicitly linked to |
266 |
+libglapi if mesa was built with shared glapi, see |
267 |
+https://bugs.gentoo.org/show_bug.cgi?id=399813 |
268 |
+And in mesa-8.1.x, libOSMesa in addition needs libdl, libpthread, and |
269 |
+libstdc++, see https://bugs.gentoo.org/show_bug.cgi?id=431832 |
270 |
+--- |
271 |
+ configure.ac | 8 +++++++- |
272 |
+ 1 file changed, 7 insertions(+), 1 deletion(-) |
273 |
+ |
274 |
+diff --git a/configure.ac b/configure.ac |
275 |
+index de807d2..a2e8684 100644 |
276 |
+--- a/configure.ac |
277 |
++++ b/configure.ac |
278 |
+@@ -1233,7 +1233,13 @@ This probably prevents linking to OpenGL. Try deleting the file and restarting c |
279 |
+ |
280 |
+ if test "x$with_osmesa" != "xno" |
281 |
+ then |
282 |
+- WINE_CHECK_SONAME(OSMesa,glAccum,,,[$X_LIBS -lm $X_EXTRA_LIBS]) |
283 |
++ WINE_CHECK_SONAME(OSMesa,OSMesaCreateContext,,,[$X_LIBS -lm $X_EXTRA_LIBS]) |
284 |
++ if test "x$ac_cv_lib_soname_OSMesa" = "x"; then |
285 |
++ osmesa_save_CC=$CC |
286 |
++ CC=$CXX |
287 |
++ WINE_CHECK_SONAME(OSMesa,OSMesaCreateContext,,,[-lglapi -lpthread -ldl $X_LIBS -lm $X_EXTRA_LIBS]) |
288 |
++ CC=$osmesa_save_CC |
289 |
++ fi |
290 |
+ WINE_NOTICE_WITH(osmesa,[test "x$ac_cv_lib_soname_OSMesa" = "x"], |
291 |
+ [libOSMesa ${notice_platform}development files not found (or too old), OpenGL rendering in bitmaps won't be supported.]) |
292 |
+ fi |
293 |
+-- |
294 |
+1.8.5.3 |
295 |
+ |
296 |
|
297 |
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 |
298 |
new file mode 100644 |
299 |
index 00000000000..c19d0d8a0b0 |
300 |
--- /dev/null |
301 |
+++ b/app-emulation/wine-any/files/wine-1.9.5-multilib-portage.patch |
302 |
@@ -0,0 +1,31 @@ |
303 |
+https://bugs.gentoo.org/show_bug.cgi?id=395615 |
304 |
+ |
305 |
+Explicitly add the required -m32/m64 to *FLAGS; this overrides any |
306 |
+arch-specific -m* flags that may have been appended by multilib-portage. |
307 |
+ |
308 |
+Even though -m32/m64 is now added to *FLAGS, -m32/m64 still has to be |
309 |
+explicitly added to CC and CXX due to wine's build system. For example, |
310 |
+winegcc saves the build-time value of CC and uses it at runtime. |
311 |
+ |
312 |
+--- a/configure.ac 2016-03-05 20:53:50.574628728 -0500 |
313 |
++++ b/configure.ac 2016-03-05 20:57:54.945617833 -0500 |
314 |
+@@ -141,6 +141,9 @@ |
315 |
+ then |
316 |
+ CC="$CC -m32" |
317 |
+ CXX="$CXX -m32" |
318 |
++ CFLAGS="$CFLAGS -m32" |
319 |
++ LDFLAGS="$LDFLAGS -m32" |
320 |
++ CXXFLAGS="$CXXFLAGS -m32" |
321 |
+ AC_MSG_CHECKING([whether $CC works]) |
322 |
+ AC_LINK_IFELSE([AC_LANG_PROGRAM()],AC_MSG_RESULT([yes]), |
323 |
+ [AC_MSG_RESULT([no]) |
324 |
+@@ -160,6 +163,9 @@ |
325 |
+ fi |
326 |
+ CC="$CC -m64" |
327 |
+ CXX="$CXX -m64" |
328 |
++ CFLAGS="$CFLAGS -m64" |
329 |
++ LDFLAGS="$LDFLAGS -m64" |
330 |
++ CXXFLAGS="$CXXFLAGS -m64" |
331 |
+ host_cpu="x86_64" |
332 |
+ notice_platform="64-bit " |
333 |
+ AC_SUBST(TARGETFLAGS,"-m64") |
334 |
|
335 |
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 |
336 |
new file mode 100644 |
337 |
index 00000000000..b336c4f51e8 |
338 |
--- /dev/null |
339 |
+++ b/app-emulation/wine-any/files/wine-2.0-multislot-apploader.patch |
340 |
@@ -0,0 +1,14 @@ |
341 |
+diff --git a/tools/wineapploader.in b/tools/wineapploader.in |
342 |
+index f48d552..14001a0 100755 |
343 |
+--- a/tools/wineapploader.in |
344 |
++++ b/tools/wineapploader.in |
345 |
+@@ -20,7 +20,8 @@ |
346 |
+ # |
347 |
+ |
348 |
+ # determine the app Winelib library name |
349 |
+-appname=`basename "$0" .exe`.exe |
350 |
++appname=${0##*/} |
351 |
++appname="${appname%%-*}.exe" |
352 |
+ |
353 |
+ # first try explicit WINELOADER |
354 |
+ if [ -x "$WINELOADER" ]; then exec "$WINELOADER" "$appname" "$@"; fi |
355 |
|
356 |
diff --git a/app-emulation/wine-any/metadata.xml b/app-emulation/wine-any/metadata.xml |
357 |
new file mode 100644 |
358 |
index 00000000000..4cceb34cd62 |
359 |
--- /dev/null |
360 |
+++ b/app-emulation/wine-any/metadata.xml |
361 |
@@ -0,0 +1,49 @@ |
362 |
+<?xml version="1.0" encoding="UTF-8"?> |
363 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
364 |
+<pkgmetadata> |
365 |
+ <maintainer type="project"> |
366 |
+ <email>wine@g.o</email> |
367 |
+ <name>Wine</name> |
368 |
+ </maintainer> |
369 |
+ <maintainer type="person"> |
370 |
+ <description>Only CC on bugs that involve USE="d3d9"</description> |
371 |
+ <email>commendsarnex@×××××.com</email> |
372 |
+ <name>Nick Sarnie</name> |
373 |
+ </maintainer> |
374 |
+ <longdescription> |
375 |
+Wine is an Open Source implementation of the Windows API on top of X and Unix. |
376 |
+ |
377 |
+Think of Wine as a compatibility layer for running Windows programs. Wine does not require Microsoft Windows, as it is a completely free alternative implementation of the Windows API consisting of 100% non-Microsoft code, however Wine can optionally use native Windows DLLs if they are available. Wine provides both a development toolkit for porting Windows source code to Unix as well as a program loader, allowing many unmodified Windows programs to run on x86-based Unixes, including Linux, FreeBSD, and Solaris. |
378 |
+ </longdescription> |
379 |
+ <use> |
380 |
+ <flag name="capi">Enable ISDN support via CAPI</flag> |
381 |
+ <flag name="custom-cflags">Bypass strip-flags; use at your own peril</flag> |
382 |
+ <flag name="d3d9">Apply highly experimental patches for Gallium Nine support. |
383 |
+ This patch may break some applications.</flag> |
384 |
+ <flag name="dos">Pull in <pkg>games-emulation/dosbox</pkg> to run DOS applications</flag> |
385 |
+ <flag name="gecko">Add support for the Gecko engine when using iexplore</flag> |
386 |
+ <flag name="gstreamer">Use <pkg>media-libs/gstreamer</pkg> to provide DirectShow functionality;</flag> |
387 |
+ <flag name="mono">Add support for .NET using Wine's Mono add-on</flag> |
388 |
+ <flag name="netapi">Use libnetapi from <pkg>net-fs/samba</pkg> to support Windows networks in netapi32.dll</flag> |
389 |
+ <flag name="opencl">Enable OpenCL support</flag> |
390 |
+ <flag name="osmesa">Add support for OpenGL in bitmaps using libOSMesa</flag> |
391 |
+ <flag name="pcap">Support packet capture software (e.g. wireshark)</flag> |
392 |
+ <flag name="perl">Install helpers written in perl (winedump/winemaker)</flag> |
393 |
+ <flag name="pipelight">Apply Wine-Staging patches for Pipelight/Silverlight support</flag> |
394 |
+ <flag name="prelink">Run prelink on DLLs during build; |
395 |
+ For versions before wine-1.7.55 or hardened, do not disable if you do not know what this means as it can break things at runtime</flag> |
396 |
+ <flag name="realtime">Pull in <pkg>sys-auth/rtkit</pkg> for low-latency pulseaudio support</flag> |
397 |
+ <flag name="run-exes">Use Wine to open and run .EXE and .MSI files</flag> |
398 |
+ <flag name="s3tc">Pull in <pkg>media-libs/libtxc_dxtn</pkg> for DXTn texture compression, needed for many games</flag> |
399 |
+ <flag name="samba">Add support for NTLM auth. see |
400 |
+ http://wiki.winehq.org/NtlmAuthSetupGuide and |
401 |
+ http://wiki.winehq.org/NtlmSigningAndSealing</flag> |
402 |
+ <flag name="staging">Apply Wine-Staging patches for advanced feature support that haven't made it into upstream Wine yet</flag> |
403 |
+ <flag name="themes">Support GTK+:3 window theming through Wine-Staging</flag> |
404 |
+ <flag name="udev">Use <pkg>virtual/libudev</pkg> to provide plug and play support</flag> |
405 |
+ </use> |
406 |
+ <upstream> |
407 |
+ <remote-id type="github">wine-compholio/wine-staging</remote-id> |
408 |
+ <remote-id type="sourceforge">wine</remote-id> |
409 |
+ </upstream> |
410 |
+</pkgmetadata> |
411 |
|
412 |
diff --git a/app-emulation/wine-any/wine-any-2.0.ebuild b/app-emulation/wine-any/wine-any-2.0.ebuild |
413 |
new file mode 100644 |
414 |
index 00000000000..3cdfb2f30ab |
415 |
--- /dev/null |
416 |
+++ b/app-emulation/wine-any/wine-any-2.0.ebuild |
417 |
@@ -0,0 +1,615 @@ |
418 |
+# Copyright 1999-2017 Gentoo Foundation |
419 |
+# Distributed under the terms of the GNU General Public License v2 |
420 |
+ |
421 |
+EAPI=6 |
422 |
+ |
423 |
+PLOCALES="ar bg ca cs da de el en en_US eo es fa fi fr he hi hr hu it ja ko lt ml nb_NO nl or pa pl pt_BR pt_PT rm ro ru sk sl sr_RS@cyrillic sr_RS@latin sv te th tr uk wa zh_CN zh_TW" |
424 |
+PLOCALE_BACKUP="en" |
425 |
+ |
426 |
+inherit autotools eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator |
427 |
+ |
428 |
+MY_PN="${PN%%-*}" |
429 |
+MY_P="${MY_PN}-${PV}" |
430 |
+ |
431 |
+if [[ ${PV} == "9999" ]] ; then |
432 |
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git" |
433 |
+ EGIT_BRANCH="master" |
434 |
+ inherit git-r3 |
435 |
+ SRC_URI="" |
436 |
+ #KEYWORDS="" |
437 |
+else |
438 |
+ MAJOR_V=$(get_version_component_range 1) |
439 |
+ SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.bz2" |
440 |
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" |
441 |
+fi |
442 |
+S="${WORKDIR}/${MY_P}" |
443 |
+ |
444 |
+STAGING_P="wine-staging-${PV}" |
445 |
+STAGING_DIR="${WORKDIR}/${STAGING_P}" |
446 |
+D3D9_P="wine-d3d9-${PV}" |
447 |
+D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}" |
448 |
+WDC_V="20150204" |
449 |
+WINE_DESKTOP_COMMON_P="wine-desktop-common-${WDC_V}" |
450 |
+ |
451 |
+DESCRIPTION="Free implementation of Windows(tm) on Unix" |
452 |
+HOMEPAGE="http://www.winehq.org/" |
453 |
+SRC_URI="${SRC_URI} |
454 |
+ https://github.com/NP-Hardass/wine-desktop-common/archive/${WDC_V}.tar.gz -> ${WINE_DESKTOP_COMMON_P}.tar.gz |
455 |
+" |
456 |
+ |
457 |
+if [[ ${PV} == "9999" ]] ; then |
458 |
+ STAGING_EGIT_REPO_URI="git://github.com/wine-compholio/wine-staging.git" |
459 |
+ D3D9_EGIT_REPO_URI="git://github.com/sarnex/wine-d3d9-patches.git" |
460 |
+else |
461 |
+ SRC_URI="${SRC_URI} |
462 |
+ staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz ) |
463 |
+ d3d9? ( https://github.com/sarnex/wine-d3d9-patches/archive/${D3D9_P}.tar.gz )" |
464 |
+fi |
465 |
+ |
466 |
+LICENSE="LGPL-2.1" |
467 |
+SLOT="${PV}" |
468 |
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags d3d9 dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg kernel_FreeBSD +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl pcap pipelight +png prelink pulseaudio +realtime +run-exes s3tc samba scanner selinux +ssl staging test themes +threads +truetype udev +udisks v4l vaapi +X +xcomposite xinerama +xml" |
469 |
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) |
470 |
+ X? ( truetype ) |
471 |
+ elibc_glibc? ( threads ) |
472 |
+ osmesa? ( opengl ) |
473 |
+ pipelight? ( staging ) |
474 |
+ s3tc? ( staging ) |
475 |
+ test? ( abi_x86_32 ) |
476 |
+ themes? ( staging ) |
477 |
+ vaapi? ( staging )" # osmesa-opengl #286560 # X-truetype #551124 |
478 |
+ |
479 |
+# FIXME: the test suite is unsuitable for us; many tests require net access |
480 |
+# or fail due to Xvfb's opengl limitations. |
481 |
+RESTRICT="test" |
482 |
+ |
483 |
+COMMON_DEPEND=" |
484 |
+ X? ( |
485 |
+ x11-libs/libXcursor[${MULTILIB_USEDEP}] |
486 |
+ x11-libs/libXext[${MULTILIB_USEDEP}] |
487 |
+ x11-libs/libXrandr[${MULTILIB_USEDEP}] |
488 |
+ x11-libs/libXi[${MULTILIB_USEDEP}] |
489 |
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}] |
490 |
+ ) |
491 |
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) |
492 |
+ capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] ) |
493 |
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] ) |
494 |
+ d3d9? ( |
495 |
+ media-libs/mesa[d3d9,egl,${MULTILIB_USEDEP}] |
496 |
+ x11-libs/libX11[${MULTILIB_USEDEP}] |
497 |
+ x11-libs/libXext[${MULTILIB_USEDEP}] |
498 |
+ x11-libs/libxcb[${MULTILIB_USEDEP}] |
499 |
+ ) |
500 |
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] ) |
501 |
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) |
502 |
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] ) |
503 |
+ gstreamer? ( |
504 |
+ media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] |
505 |
+ media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] |
506 |
+ ) |
507 |
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] ) |
508 |
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] ) |
509 |
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) |
510 |
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] ) |
511 |
+ ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] ) |
512 |
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] ) |
513 |
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] ) |
514 |
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] ) |
515 |
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] ) |
516 |
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) |
517 |
+ opengl? ( |
518 |
+ virtual/glu[${MULTILIB_USEDEP}] |
519 |
+ virtual/opengl[${MULTILIB_USEDEP}] |
520 |
+ ) |
521 |
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] ) |
522 |
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) |
523 |
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) |
524 |
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] ) |
525 |
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] ) |
526 |
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) |
527 |
+ staging? ( sys-apps/attr[${MULTILIB_USEDEP}] ) |
528 |
+ themes? ( |
529 |
+ dev-libs/glib:2[${MULTILIB_USEDEP}] |
530 |
+ x11-libs/cairo[${MULTILIB_USEDEP}] |
531 |
+ x11-libs/gtk+:3[${MULTILIB_USEDEP}] |
532 |
+ ) |
533 |
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] ) |
534 |
+ udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) |
535 |
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) |
536 |
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) |
537 |
+ vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] ) |
538 |
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) |
539 |
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) |
540 |
+ xml? ( |
541 |
+ dev-libs/libxml2[${MULTILIB_USEDEP}] |
542 |
+ dev-libs/libxslt[${MULTILIB_USEDEP}] |
543 |
+ ) |
544 |
+ abi_x86_32? ( |
545 |
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] |
546 |
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14 |
547 |
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)] |
548 |
+ !<app-emulation/emul-linux-x86-db-20140508-r3 |
549 |
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] |
550 |
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6 |
551 |
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] |
552 |
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1 |
553 |
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)] |
554 |
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1 |
555 |
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] |
556 |
+ !<app-emulation/emul-linux-x86-soundlibs-20140508 |
557 |
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] |
558 |
+ !<app-emulation/emul-linux-x86-xlibs-20140508 |
559 |
+ )" |
560 |
+ |
561 |
+RDEPEND="${COMMON_DEPEND} |
562 |
+ app-emulation/wine-desktop-common |
563 |
+ >app-eselect/eselect-wine-0.3 |
564 |
+ !app-emulation/wine:0 |
565 |
+ dos? ( >=games-emulation/dosbox-0.74_p20160629 ) |
566 |
+ gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] ) |
567 |
+ mono? ( app-emulation/wine-mono:4.6.4 ) |
568 |
+ perl? ( |
569 |
+ dev-lang/perl |
570 |
+ dev-perl/XML-Simple |
571 |
+ ) |
572 |
+ pulseaudio? ( |
573 |
+ realtime? ( sys-auth/rtkit ) |
574 |
+ ) |
575 |
+ s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] ) |
576 |
+ samba? ( >=net-fs/samba-3.0.25[winbind] ) |
577 |
+ selinux? ( sec-policy/selinux-wine ) |
578 |
+ udisks? ( sys-fs/udisks:2 )" |
579 |
+ |
580 |
+# tools/make_requests requires perl |
581 |
+DEPEND="${COMMON_DEPEND} |
582 |
+ sys-devel/flex |
583 |
+ >=sys-kernel/linux-headers-2.6 |
584 |
+ virtual/pkgconfig |
585 |
+ virtual/yacc |
586 |
+ X? ( |
587 |
+ x11-proto/inputproto |
588 |
+ x11-proto/xextproto |
589 |
+ x11-proto/xf86vidmodeproto |
590 |
+ ) |
591 |
+ prelink? ( sys-devel/prelink ) |
592 |
+ staging? ( |
593 |
+ dev-lang/perl |
594 |
+ dev-perl/XML-Simple |
595 |
+ ) |
596 |
+ xinerama? ( x11-proto/xineramaproto )" |
597 |
+ |
598 |
+# These use a non-standard "Wine" category, which is provided by |
599 |
+# /etc/xdg/applications-merged/wine.menu |
600 |
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop |
601 |
+usr/share/applications/wine-notepad.desktop |
602 |
+usr/share/applications/wine-uninstaller.desktop |
603 |
+usr/share/applications/wine-winecfg.desktop" |
604 |
+ |
605 |
+wine_compiler_check() { |
606 |
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
607 |
+ |
608 |
+ # GCC-specific bugs |
609 |
+ if tc-is-gcc; then |
610 |
+ # bug #549768 |
611 |
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then |
612 |
+ ebegin "Checking for gcc-5 ms_abi compiler bug" |
613 |
+ $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die |
614 |
+ # Run in subshell to prevent "Aborted" message |
615 |
+ ( "${T}"/pr66838 || false ) >/dev/null 2>&1 |
616 |
+ if ! eend $?; then |
617 |
+ eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0" |
618 |
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild," |
619 |
+ eerror "or use gcc-config to select a different compiler version." |
620 |
+ eerror "See https://bugs.gentoo.org/549768" |
621 |
+ eerror |
622 |
+ return 1 |
623 |
+ fi |
624 |
+ fi |
625 |
+ # bug #574044 |
626 |
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then |
627 |
+ ebegin "Checking for gcc-5-3 stack realignment compiler bug" |
628 |
+ # Compile in subshell to prevent "Aborted" message |
629 |
+ ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${FILESDIR}"/pr69140.c -o "${T}"/pr69140 ) >/dev/null 2>&1 |
630 |
+ if ! eend $?; then |
631 |
+ eerror "Wine cannot be built with this version of gcc-5.3" |
632 |
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild," |
633 |
+ eerror "or use gcc-config to select a different compiler version." |
634 |
+ eerror "See https://bugs.gentoo.org/574044" |
635 |
+ eerror |
636 |
+ return 1 |
637 |
+ fi |
638 |
+ fi |
639 |
+ fi |
640 |
+ |
641 |
+ # Ensure compiler support |
642 |
+ if use abi_x86_64; then |
643 |
+ ebegin "Checking for 64-bit compiler with builtin_ms_va_list support" |
644 |
+ # Compile in subshell to prevent "Aborted" message |
645 |
+ ( $(tc-getCC) -O2 "${FILESDIR}"/builtin_ms_va_list.c -o "${T}"/builtin_ms_va_list >/dev/null 2>&1) |
646 |
+ if ! eend $?; then |
647 |
+ eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine" |
648 |
+ eerror |
649 |
+ eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine" |
650 |
+ eerror |
651 |
+ return 1 |
652 |
+ fi |
653 |
+ fi |
654 |
+} |
655 |
+ |
656 |
+wine_build_environment_check() { |
657 |
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
658 |
+ |
659 |
+ if use abi_x86_64; then |
660 |
+ if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then |
661 |
+ eerror "You need gcc-4.4+ to compile 64-bit wine" |
662 |
+ die |
663 |
+ elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then |
664 |
+ eerror "You need clang-3.8+ to compile 64-bit wine" |
665 |
+ die |
666 |
+ fi |
667 |
+ fi |
668 |
+ if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then |
669 |
+ ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by" |
670 |
+ ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in" |
671 |
+ ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4" |
672 |
+ fi |
673 |
+ if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then |
674 |
+ if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then |
675 |
+ ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work" |
676 |
+ ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine." |
677 |
+ ewarn "See package.env in man 5 portage for more information on how to do this." |
678 |
+ ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details" |
679 |
+ fi |
680 |
+ fi |
681 |
+ |
682 |
+ if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then |
683 |
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only." |
684 |
+ eerror "See https://bugs.gentoo.org/487864 for more details." |
685 |
+ eerror |
686 |
+ return 1 |
687 |
+ fi |
688 |
+} |
689 |
+ |
690 |
+wine_env_vcs_vars() { |
691 |
+ local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT" |
692 |
+ local pn_live_val="${pn_live_var}" |
693 |
+ eval pn_live_val='$'${pn_live_val} |
694 |
+ if [[ ! -z ${pn_live_val} ]]; then |
695 |
+ if use staging || use d3d9; then |
696 |
+ eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}" |
697 |
+ eerror "cannot be used to set the commit. Instead, you may use the" |
698 |
+ eerror "environmental variables WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT." |
699 |
+ eerror |
700 |
+ return 1 |
701 |
+ fi |
702 |
+ fi |
703 |
+ if [[ ! -z ${EGIT_COMMIT} ]]; then |
704 |
+ eerror "Commits must now be specified using the environmental variables" |
705 |
+ eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT" |
706 |
+ eerror |
707 |
+ return 1 |
708 |
+ fi |
709 |
+} |
710 |
+ |
711 |
+pkg_pretend() { |
712 |
+ wine_build_environment_check || die |
713 |
+ |
714 |
+ # Verify OSS support |
715 |
+ if use oss && ! use kernel_FreeBSD; then |
716 |
+ if ! has_version ">=media-sound/oss-4"; then |
717 |
+ eerror "You cannot build wine with USE=oss without having support from a" |
718 |
+ eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)" |
719 |
+ eerror |
720 |
+ die |
721 |
+ fi |
722 |
+ fi |
723 |
+} |
724 |
+ |
725 |
+pkg_setup() { |
726 |
+ wine_build_environment_check || die |
727 |
+ wine_env_vcs_vars || die |
728 |
+ |
729 |
+ WINE_VARIANT="${PN#wine}-${PV}" |
730 |
+ WINE_VARIANT="${WINE_VARIANT#-}" |
731 |
+ |
732 |
+ MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}" |
733 |
+ MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}" |
734 |
+ MY_DATADIR="${MY_DATAROOTDIR}" |
735 |
+ MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}" |
736 |
+ MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}" |
737 |
+ MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}" |
738 |
+ MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}" |
739 |
+ MY_MANDIR="${MY_DATADIR}/man" |
740 |
+} |
741 |
+ |
742 |
+src_unpack() { |
743 |
+ if [[ ${PV} == "9999" ]] ; then |
744 |
+ EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack |
745 |
+ if use staging; then |
746 |
+ local CURRENT_WINE_COMMIT=${EGIT_VERSION} |
747 |
+ |
748 |
+ git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}" |
749 |
+ git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}" |
750 |
+ |
751 |
+ local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die |
752 |
+ |
753 |
+ if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then |
754 |
+ einfo "The current Staging patchset is not guaranteed to apply on this WINE commit." |
755 |
+ einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT." |
756 |
+ einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine" |
757 |
+ fi |
758 |
+ fi |
759 |
+ if use d3d9; then |
760 |
+ git-r3_fetch "${D3D9_EGIT_REPO_URI}" "${D3D9_COMMIT}" |
761 |
+ git-r3_checkout "${D3D9_EGIT_REPO_URI}" "${D3D9_DIR}" |
762 |
+ fi |
763 |
+ fi |
764 |
+ |
765 |
+ default |
766 |
+ |
767 |
+ l10n_find_plocales_changes "${S}/po" "" ".po" |
768 |
+} |
769 |
+ |
770 |
+src_prepare() { |
771 |
+ local md5="$(md5sum server/protocol.def)" |
772 |
+ local PATCHES=( |
773 |
+ "${FILESDIR}"/${MY_PN}-1.5.26-winegcc.patch #260726 |
774 |
+ "${FILESDIR}"/${MY_PN}-1.9.5-multilib-portage.patch #395615 |
775 |
+ "${FILESDIR}"/${MY_PN}-1.7.12-osmesa-check.patch #429386 |
776 |
+ "${FILESDIR}"/${MY_PN}-1.6-memset-O3.patch #480508 |
777 |
+ "${FILESDIR}"/${MY_PN}-2.0-multislot-apploader.patch |
778 |
+ ) |
779 |
+ if use staging; then |
780 |
+ ewarn "Applying the Wine-Staging patchset. Any bug reports to the" |
781 |
+ ewarn "Wine bugzilla should explicitly state that staging was used." |
782 |
+ |
783 |
+ local STAGING_EXCLUDE="" |
784 |
+ STAGING_EXCLUDE="${STAGING_EXCLUDE} -W winhlp32-Flex_Workaround" # Avoid double patching https://bugs.winehq.org/show_bug.cgi?id=42132 |
785 |
+ use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight" |
786 |
+ |
787 |
+ # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches |
788 |
+ ebegin "Running Wine-Staging patch installer" |
789 |
+ ( |
790 |
+ set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE} |
791 |
+ cd "${STAGING_DIR}/patches" |
792 |
+ source "${STAGING_DIR}/patches/patchinstall.sh" |
793 |
+ ) |
794 |
+ eend $? || die "Failed to apply Wine-Staging patches" |
795 |
+ fi |
796 |
+ if use d3d9; then |
797 |
+ if use staging; then |
798 |
+ PATCHES+=( "${D3D9_DIR}/staging-helper.patch" ) |
799 |
+ else |
800 |
+ PATCHES+=( "${D3D9_DIR}/d3d9-helper.patch" ) |
801 |
+ fi |
802 |
+ PATCHES+=( "${D3D9_DIR}/wine-d3d9.patch" ) |
803 |
+ fi |
804 |
+ |
805 |
+ default |
806 |
+ eautoreconf |
807 |
+ |
808 |
+ # Modification of the server protocol requires regenerating the server requests |
809 |
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then |
810 |
+ einfo "server/protocol.def was patched; running tools/make_requests" |
811 |
+ tools/make_requests || die #432348 |
812 |
+ fi |
813 |
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die |
814 |
+ if ! use run-exes; then |
815 |
+ sed -i '/^MimeType/d' loader/wine.desktop || die #117785 |
816 |
+ fi |
817 |
+ |
818 |
+ # Edit wine.desktop to work for specific variant |
819 |
+ sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die |
820 |
+ |
821 |
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652 |
822 |
+ cp "${WORKDIR}/${WINE_DESKTOP_COMMON_P}/icons/oic_winlogo.ico" dlls/user32/resources/ || die |
823 |
+ |
824 |
+ l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS |
825 |
+} |
826 |
+ |
827 |
+src_configure() { |
828 |
+ wine_compiler_check || die |
829 |
+ |
830 |
+ export LDCONFIG=/bin/true |
831 |
+ use custom-cflags || strip-flags |
832 |
+ |
833 |
+ multilib-minimal_src_configure |
834 |
+} |
835 |
+ |
836 |
+multilib_src_configure() { |
837 |
+ local myconf=( |
838 |
+ --prefix="${MY_PREFIX}" |
839 |
+ --datarootdir="${MY_DATAROOTDIR}" |
840 |
+ --datadir="${MY_DATADIR}" |
841 |
+ --docdir="${MY_DOCDIR}" |
842 |
+ --includedir="${MY_INCLUDEDIR}" |
843 |
+ --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}" |
844 |
+ --libexecdir="${MY_LIBEXECDIR}" |
845 |
+ --localstatedir="${MY_LOCALSTATEDIR}" |
846 |
+ --mandir="${MY_MANDIR}" |
847 |
+ --sysconfdir=/etc/wine |
848 |
+ $(use_with alsa) |
849 |
+ $(use_with capi) |
850 |
+ $(use_with lcms cms) |
851 |
+ $(use_with cups) |
852 |
+ $(use_with ncurses curses) |
853 |
+ $(use_with udisks dbus) |
854 |
+ $(use_with fontconfig) |
855 |
+ $(use_with ssl gnutls) |
856 |
+ $(use_enable gecko mshtml) |
857 |
+ $(use_with gphoto2 gphoto) |
858 |
+ $(use_with gsm) |
859 |
+ $(use_with gstreamer) |
860 |
+ --without-hal |
861 |
+ $(use_with jpeg) |
862 |
+ $(use_with ldap) |
863 |
+ $(use_enable mono mscoree) |
864 |
+ $(use_with mp3 mpg123) |
865 |
+ $(use_with netapi) |
866 |
+ $(use_with nls gettext) |
867 |
+ $(use_with openal) |
868 |
+ $(use_with opencl) |
869 |
+ $(use_with opengl) |
870 |
+ $(use_with osmesa) |
871 |
+ $(use_with oss) |
872 |
+ $(use_with pcap) |
873 |
+ $(use_with png) |
874 |
+ $(use_with pulseaudio pulse) |
875 |
+ $(use_with threads pthread) |
876 |
+ $(use_with scanner sane) |
877 |
+ $(use_enable test tests) |
878 |
+ $(use_with truetype freetype) |
879 |
+ $(use_with udev) |
880 |
+ $(use_with v4l) |
881 |
+ $(use_with X x) |
882 |
+ $(use_with xcomposite) |
883 |
+ $(use_with xinerama) |
884 |
+ $(use_with xml) |
885 |
+ $(use_with xml xslt) |
886 |
+ ) |
887 |
+ |
888 |
+ use staging && myconf+=( |
889 |
+ --with-xattr |
890 |
+ $(use_with themes gtk3) |
891 |
+ $(use_with vaapi va) |
892 |
+ ) |
893 |
+ use d3d9 && myconf+=( $(use_with d3d9 d3d9-nine) ) |
894 |
+ |
895 |
+ local PKG_CONFIG AR RANLIB |
896 |
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038 |
897 |
+ # set AR and RANLIB to make QA scripts happy; #483342 |
898 |
+ tc-export PKG_CONFIG AR RANLIB |
899 |
+ |
900 |
+ if use amd64; then |
901 |
+ if [[ ${ABI} == amd64 ]]; then |
902 |
+ myconf+=( --enable-win64 ) |
903 |
+ else |
904 |
+ myconf+=( --disable-win64 ) |
905 |
+ fi |
906 |
+ |
907 |
+ # Note: using --with-wine64 results in problems with multilib.eclass |
908 |
+ # CC/LD hackery. We're using separate tools instead. |
909 |
+ fi |
910 |
+ |
911 |
+ ECONF_SOURCE=${S} \ |
912 |
+ econf "${myconf[@]}" |
913 |
+ emake depend |
914 |
+} |
915 |
+ |
916 |
+multilib_src_test() { |
917 |
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader" |
918 |
+ if [[ ${ABI} == x86 ]]; then |
919 |
+ if [[ $(id -u) == 0 ]]; then |
920 |
+ ewarn "Skipping tests since they cannot be run under the root user." |
921 |
+ ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf" |
922 |
+ return |
923 |
+ fi |
924 |
+ |
925 |
+ WINEPREFIX="${T}/.wine-${ABI}" \ |
926 |
+ Xemake test |
927 |
+ fi |
928 |
+} |
929 |
+ |
930 |
+multilib_src_install_all() { |
931 |
+ local DOCS=( ANNOUNCE AUTHORS README ) |
932 |
+ local l |
933 |
+ add_locale_docs() { |
934 |
+ local locale_doc="documentation/README.$1" |
935 |
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} ) |
936 |
+ } |
937 |
+ l10n_for_each_locale_do add_locale_docs |
938 |
+ |
939 |
+ einstalldocs |
940 |
+ prune_libtool_files --all |
941 |
+ |
942 |
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script |
943 |
+ rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \ |
944 |
+ "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die |
945 |
+ fi |
946 |
+ |
947 |
+ # Remove wineconsole if neither backend is installed #551124 |
948 |
+ if ! use X && ! use ncurses; then |
949 |
+ rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die |
950 |
+ rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die |
951 |
+ rm_wineconsole() { |
952 |
+ rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die |
953 |
+ } |
954 |
+ multilib_foreach_abi rm_wineconsole |
955 |
+ fi |
956 |
+ |
957 |
+ use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055 |
958 |
+ use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader} |
959 |
+ |
960 |
+ if use abi_x86_64 && ! use abi_x86_32; then |
961 |
+ dosym "${MY_PREFIX}"/bin/wine{64,} # 404331 |
962 |
+ dosym "${MY_PREFIX}"/bin/wine{64,}-preloader |
963 |
+ fi |
964 |
+ |
965 |
+ # Make wrappers for binaries for handling multiple variants |
966 |
+ # Note: wrappers instead of symlinks because some are shell which use basename |
967 |
+ for b in "${D%/}${MY_PREFIX}"/bin/*; do |
968 |
+ make_wrapper ${b##*/}-${WINE_VARIANT} "${MY_PREFIX}"/bin/${b##*/} |
969 |
+ done |
970 |
+ |
971 |
+ # respect LINGUAS when installing man pages, #469418 |
972 |
+ for l in de fr pl; do |
973 |
+ use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}* |
974 |
+ done |
975 |
+ |
976 |
+ for m in "${D%/}${MY_MANDIR}"/*/*; do |
977 |
+ new_man=${m##*/} |
978 |
+ new_man=${new_man%%.1} |
979 |
+ newman "${m}" ${new_man##*/}-${WINE_VARIANT}.1 |
980 |
+ done |
981 |
+} |
982 |
+ |
983 |
+pkg_postinst() { |
984 |
+ eselect wine register ${P} |
985 |
+ if [[ ${PN} == "wine-vanilla" ]]; then |
986 |
+ eselect wine register --vanilla ${P} || die |
987 |
+ else |
988 |
+ if use staging; then |
989 |
+ eselect wine register --staging ${P} || die |
990 |
+ fi |
991 |
+ if use d3d9; then |
992 |
+ eselect wine register --d3d9 ${P} || die |
993 |
+ fi |
994 |
+ fi |
995 |
+ |
996 |
+ eselect wine update --all --if-unset || die |
997 |
+ |
998 |
+ fdo-mime_desktop_database_update |
999 |
+ |
1000 |
+ if ! use gecko; then |
1001 |
+ ewarn "Without Wine Gecko, wine prefixes will not have a default" |
1002 |
+ ewarn "implementation of iexplore. Many older windows applications" |
1003 |
+ ewarn "rely upon the existence of an iexplore implementation, so" |
1004 |
+ ewarn "you will likely need to install an external one, like via winetricks" |
1005 |
+ fi |
1006 |
+ if ! use mono; then |
1007 |
+ ewarn "Without Wine Mono, wine prefixes will not have a default" |
1008 |
+ ewarn "implementation of .NET. Many windows applications rely upon" |
1009 |
+ ewarn "the existence of a .NET implementation, so you will likely need" |
1010 |
+ ewarn "to install an external one, like via winetricks" |
1011 |
+ fi |
1012 |
+} |
1013 |
+ |
1014 |
+pkg_prerm() { |
1015 |
+ eselect wine deregister ${P} |
1016 |
+ if [[ ${PN} == "wine-vanilla" ]]; then |
1017 |
+ eselect wine deregister --vanilla ${P} || die |
1018 |
+ else |
1019 |
+ if use staging; then |
1020 |
+ eselect wine deregister --staging ${P} || die |
1021 |
+ fi |
1022 |
+ if use d3d9; then |
1023 |
+ eselect wine deregister --d3d9 ${P} || die |
1024 |
+ fi |
1025 |
+ fi |
1026 |
+ |
1027 |
+ eselect wine update --all --if-unset || die |
1028 |
+} |
1029 |
+ |
1030 |
+pkg_postrm() { |
1031 |
+ fdo-mime_desktop_database_update |
1032 |
+} |
1033 |
|
1034 |
diff --git a/app-emulation/wine-any/wine-any-2.1.ebuild b/app-emulation/wine-any/wine-any-2.1.ebuild |
1035 |
new file mode 100644 |
1036 |
index 00000000000..88e2cd700de |
1037 |
--- /dev/null |
1038 |
+++ b/app-emulation/wine-any/wine-any-2.1.ebuild |
1039 |
@@ -0,0 +1,615 @@ |
1040 |
+# Copyright 1999-2017 Gentoo Foundation |
1041 |
+# Distributed under the terms of the GNU General Public License v2 |
1042 |
+ |
1043 |
+EAPI=6 |
1044 |
+ |
1045 |
+PLOCALES="ar bg ca cs da de el en en_US eo es fa fi fr he hi hr hu it ja ko lt ml nb_NO nl or pa pl pt_BR pt_PT rm ro ru sk sl sr_RS@cyrillic sr_RS@latin sv te th tr uk wa zh_CN zh_TW" |
1046 |
+PLOCALE_BACKUP="en" |
1047 |
+ |
1048 |
+inherit autotools eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator |
1049 |
+ |
1050 |
+MY_PN="${PN%%-*}" |
1051 |
+MY_P="${MY_PN}-${PV}" |
1052 |
+ |
1053 |
+if [[ ${PV} == "9999" ]] ; then |
1054 |
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git" |
1055 |
+ EGIT_BRANCH="master" |
1056 |
+ inherit git-r3 |
1057 |
+ SRC_URI="" |
1058 |
+ #KEYWORDS="" |
1059 |
+else |
1060 |
+ MAJOR_V=$(get_version_component_range 1) |
1061 |
+ SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz" |
1062 |
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" |
1063 |
+fi |
1064 |
+S="${WORKDIR}/${MY_P}" |
1065 |
+ |
1066 |
+STAGING_P="wine-staging-${PV}" |
1067 |
+STAGING_DIR="${WORKDIR}/${STAGING_P}" |
1068 |
+D3D9_P="wine-d3d9-${PV}" |
1069 |
+D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}" |
1070 |
+WDC_V="20150204" |
1071 |
+WINE_DESKTOP_COMMON_P="wine-desktop-common-${WDC_V}" |
1072 |
+ |
1073 |
+DESCRIPTION="Free implementation of Windows(tm) on Unix" |
1074 |
+HOMEPAGE="http://www.winehq.org/" |
1075 |
+SRC_URI="${SRC_URI} |
1076 |
+ https://github.com/NP-Hardass/wine-desktop-common/archive/${WDC_V}.tar.gz -> ${WINE_DESKTOP_COMMON_P}.tar.gz |
1077 |
+" |
1078 |
+ |
1079 |
+if [[ ${PV} == "9999" ]] ; then |
1080 |
+ STAGING_EGIT_REPO_URI="git://github.com/wine-compholio/wine-staging.git" |
1081 |
+ D3D9_EGIT_REPO_URI="git://github.com/sarnex/wine-d3d9-patches.git" |
1082 |
+else |
1083 |
+ SRC_URI="${SRC_URI} |
1084 |
+ staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz ) |
1085 |
+ d3d9? ( https://github.com/sarnex/wine-d3d9-patches/archive/${D3D9_P}.tar.gz )" |
1086 |
+fi |
1087 |
+ |
1088 |
+LICENSE="LGPL-2.1" |
1089 |
+SLOT="${PV}" |
1090 |
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags d3d9 dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg kernel_FreeBSD +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl pcap pipelight +png prelink pulseaudio +realtime +run-exes s3tc samba scanner selinux +ssl staging test themes +threads +truetype udev +udisks v4l vaapi +X +xcomposite xinerama +xml" |
1091 |
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) |
1092 |
+ X? ( truetype ) |
1093 |
+ elibc_glibc? ( threads ) |
1094 |
+ osmesa? ( opengl ) |
1095 |
+ pipelight? ( staging ) |
1096 |
+ s3tc? ( staging ) |
1097 |
+ test? ( abi_x86_32 ) |
1098 |
+ themes? ( staging ) |
1099 |
+ vaapi? ( staging )" # osmesa-opengl #286560 # X-truetype #551124 |
1100 |
+ |
1101 |
+# FIXME: the test suite is unsuitable for us; many tests require net access |
1102 |
+# or fail due to Xvfb's opengl limitations. |
1103 |
+RESTRICT="test" |
1104 |
+ |
1105 |
+COMMON_DEPEND=" |
1106 |
+ X? ( |
1107 |
+ x11-libs/libXcursor[${MULTILIB_USEDEP}] |
1108 |
+ x11-libs/libXext[${MULTILIB_USEDEP}] |
1109 |
+ x11-libs/libXrandr[${MULTILIB_USEDEP}] |
1110 |
+ x11-libs/libXi[${MULTILIB_USEDEP}] |
1111 |
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}] |
1112 |
+ ) |
1113 |
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) |
1114 |
+ capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] ) |
1115 |
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] ) |
1116 |
+ d3d9? ( |
1117 |
+ media-libs/mesa[d3d9,egl,${MULTILIB_USEDEP}] |
1118 |
+ x11-libs/libX11[${MULTILIB_USEDEP}] |
1119 |
+ x11-libs/libXext[${MULTILIB_USEDEP}] |
1120 |
+ x11-libs/libxcb[${MULTILIB_USEDEP}] |
1121 |
+ ) |
1122 |
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] ) |
1123 |
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) |
1124 |
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] ) |
1125 |
+ gstreamer? ( |
1126 |
+ media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] |
1127 |
+ media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] |
1128 |
+ ) |
1129 |
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] ) |
1130 |
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] ) |
1131 |
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) |
1132 |
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] ) |
1133 |
+ ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] ) |
1134 |
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] ) |
1135 |
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] ) |
1136 |
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] ) |
1137 |
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] ) |
1138 |
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) |
1139 |
+ opengl? ( |
1140 |
+ virtual/glu[${MULTILIB_USEDEP}] |
1141 |
+ virtual/opengl[${MULTILIB_USEDEP}] |
1142 |
+ ) |
1143 |
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] ) |
1144 |
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) |
1145 |
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) |
1146 |
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] ) |
1147 |
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] ) |
1148 |
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) |
1149 |
+ staging? ( sys-apps/attr[${MULTILIB_USEDEP}] ) |
1150 |
+ themes? ( |
1151 |
+ dev-libs/glib:2[${MULTILIB_USEDEP}] |
1152 |
+ x11-libs/cairo[${MULTILIB_USEDEP}] |
1153 |
+ x11-libs/gtk+:3[${MULTILIB_USEDEP}] |
1154 |
+ ) |
1155 |
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] ) |
1156 |
+ udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) |
1157 |
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) |
1158 |
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) |
1159 |
+ vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] ) |
1160 |
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) |
1161 |
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) |
1162 |
+ xml? ( |
1163 |
+ dev-libs/libxml2[${MULTILIB_USEDEP}] |
1164 |
+ dev-libs/libxslt[${MULTILIB_USEDEP}] |
1165 |
+ ) |
1166 |
+ abi_x86_32? ( |
1167 |
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] |
1168 |
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14 |
1169 |
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)] |
1170 |
+ !<app-emulation/emul-linux-x86-db-20140508-r3 |
1171 |
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] |
1172 |
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6 |
1173 |
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] |
1174 |
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1 |
1175 |
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)] |
1176 |
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1 |
1177 |
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] |
1178 |
+ !<app-emulation/emul-linux-x86-soundlibs-20140508 |
1179 |
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] |
1180 |
+ !<app-emulation/emul-linux-x86-xlibs-20140508 |
1181 |
+ )" |
1182 |
+ |
1183 |
+RDEPEND="${COMMON_DEPEND} |
1184 |
+ app-emulation/wine-desktop-common |
1185 |
+ >app-eselect/eselect-wine-0.3 |
1186 |
+ !app-emulation/wine:0 |
1187 |
+ dos? ( >=games-emulation/dosbox-0.74_p20160629 ) |
1188 |
+ gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] ) |
1189 |
+ mono? ( app-emulation/wine-mono:4.6.4 ) |
1190 |
+ perl? ( |
1191 |
+ dev-lang/perl |
1192 |
+ dev-perl/XML-Simple |
1193 |
+ ) |
1194 |
+ pulseaudio? ( |
1195 |
+ realtime? ( sys-auth/rtkit ) |
1196 |
+ ) |
1197 |
+ s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] ) |
1198 |
+ samba? ( >=net-fs/samba-3.0.25[winbind] ) |
1199 |
+ selinux? ( sec-policy/selinux-wine ) |
1200 |
+ udisks? ( sys-fs/udisks:2 )" |
1201 |
+ |
1202 |
+# tools/make_requests requires perl |
1203 |
+DEPEND="${COMMON_DEPEND} |
1204 |
+ sys-devel/flex |
1205 |
+ >=sys-kernel/linux-headers-2.6 |
1206 |
+ virtual/pkgconfig |
1207 |
+ virtual/yacc |
1208 |
+ X? ( |
1209 |
+ x11-proto/inputproto |
1210 |
+ x11-proto/xextproto |
1211 |
+ x11-proto/xf86vidmodeproto |
1212 |
+ ) |
1213 |
+ prelink? ( sys-devel/prelink ) |
1214 |
+ staging? ( |
1215 |
+ dev-lang/perl |
1216 |
+ dev-perl/XML-Simple |
1217 |
+ ) |
1218 |
+ xinerama? ( x11-proto/xineramaproto )" |
1219 |
+ |
1220 |
+# These use a non-standard "Wine" category, which is provided by |
1221 |
+# /etc/xdg/applications-merged/wine.menu |
1222 |
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop |
1223 |
+usr/share/applications/wine-notepad.desktop |
1224 |
+usr/share/applications/wine-uninstaller.desktop |
1225 |
+usr/share/applications/wine-winecfg.desktop" |
1226 |
+ |
1227 |
+wine_compiler_check() { |
1228 |
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
1229 |
+ |
1230 |
+ # GCC-specific bugs |
1231 |
+ if tc-is-gcc; then |
1232 |
+ # bug #549768 |
1233 |
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then |
1234 |
+ ebegin "Checking for gcc-5 ms_abi compiler bug" |
1235 |
+ $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die |
1236 |
+ # Run in subshell to prevent "Aborted" message |
1237 |
+ ( "${T}"/pr66838 || false ) >/dev/null 2>&1 |
1238 |
+ if ! eend $?; then |
1239 |
+ eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0" |
1240 |
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild," |
1241 |
+ eerror "or use gcc-config to select a different compiler version." |
1242 |
+ eerror "See https://bugs.gentoo.org/549768" |
1243 |
+ eerror |
1244 |
+ return 1 |
1245 |
+ fi |
1246 |
+ fi |
1247 |
+ # bug #574044 |
1248 |
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then |
1249 |
+ ebegin "Checking for gcc-5-3 stack realignment compiler bug" |
1250 |
+ # Compile in subshell to prevent "Aborted" message |
1251 |
+ ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${FILESDIR}"/pr69140.c -o "${T}"/pr69140 ) >/dev/null 2>&1 |
1252 |
+ if ! eend $?; then |
1253 |
+ eerror "Wine cannot be built with this version of gcc-5.3" |
1254 |
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild," |
1255 |
+ eerror "or use gcc-config to select a different compiler version." |
1256 |
+ eerror "See https://bugs.gentoo.org/574044" |
1257 |
+ eerror |
1258 |
+ return 1 |
1259 |
+ fi |
1260 |
+ fi |
1261 |
+ fi |
1262 |
+ |
1263 |
+ # Ensure compiler support |
1264 |
+ if use abi_x86_64; then |
1265 |
+ ebegin "Checking for 64-bit compiler with builtin_ms_va_list support" |
1266 |
+ # Compile in subshell to prevent "Aborted" message |
1267 |
+ ( $(tc-getCC) -O2 "${FILESDIR}"/builtin_ms_va_list.c -o "${T}"/builtin_ms_va_list >/dev/null 2>&1) |
1268 |
+ if ! eend $?; then |
1269 |
+ eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine" |
1270 |
+ eerror |
1271 |
+ eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine" |
1272 |
+ eerror |
1273 |
+ return 1 |
1274 |
+ fi |
1275 |
+ fi |
1276 |
+} |
1277 |
+ |
1278 |
+wine_build_environment_check() { |
1279 |
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
1280 |
+ |
1281 |
+ if use abi_x86_64; then |
1282 |
+ if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then |
1283 |
+ eerror "You need gcc-4.4+ to compile 64-bit wine" |
1284 |
+ die |
1285 |
+ elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then |
1286 |
+ eerror "You need clang-3.8+ to compile 64-bit wine" |
1287 |
+ die |
1288 |
+ fi |
1289 |
+ fi |
1290 |
+ if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then |
1291 |
+ ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by" |
1292 |
+ ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in" |
1293 |
+ ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4" |
1294 |
+ fi |
1295 |
+ if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then |
1296 |
+ if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then |
1297 |
+ ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work" |
1298 |
+ ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine." |
1299 |
+ ewarn "See package.env in man 5 portage for more information on how to do this." |
1300 |
+ ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details" |
1301 |
+ fi |
1302 |
+ fi |
1303 |
+ |
1304 |
+ if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then |
1305 |
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only." |
1306 |
+ eerror "See https://bugs.gentoo.org/487864 for more details." |
1307 |
+ eerror |
1308 |
+ return 1 |
1309 |
+ fi |
1310 |
+} |
1311 |
+ |
1312 |
+wine_env_vcs_vars() { |
1313 |
+ local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT" |
1314 |
+ local pn_live_val="${pn_live_var}" |
1315 |
+ eval pn_live_val='$'${pn_live_val} |
1316 |
+ if [[ ! -z ${pn_live_val} ]]; then |
1317 |
+ if use staging || use d3d9; then |
1318 |
+ eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}" |
1319 |
+ eerror "cannot be used to set the commit. Instead, you may use the" |
1320 |
+ eerror "environmental variables WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT." |
1321 |
+ eerror |
1322 |
+ return 1 |
1323 |
+ fi |
1324 |
+ fi |
1325 |
+ if [[ ! -z ${EGIT_COMMIT} ]]; then |
1326 |
+ eerror "Commits must now be specified using the environmental variables" |
1327 |
+ eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT" |
1328 |
+ eerror |
1329 |
+ return 1 |
1330 |
+ fi |
1331 |
+} |
1332 |
+ |
1333 |
+pkg_pretend() { |
1334 |
+ wine_build_environment_check || die |
1335 |
+ |
1336 |
+ # Verify OSS support |
1337 |
+ if use oss && ! use kernel_FreeBSD; then |
1338 |
+ if ! has_version ">=media-sound/oss-4"; then |
1339 |
+ eerror "You cannot build wine with USE=oss without having support from a" |
1340 |
+ eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)" |
1341 |
+ eerror |
1342 |
+ die |
1343 |
+ fi |
1344 |
+ fi |
1345 |
+} |
1346 |
+ |
1347 |
+pkg_setup() { |
1348 |
+ wine_build_environment_check || die |
1349 |
+ wine_env_vcs_vars || die |
1350 |
+ |
1351 |
+ WINE_VARIANT="${PN#wine}-${PV}" |
1352 |
+ WINE_VARIANT="${WINE_VARIANT#-}" |
1353 |
+ |
1354 |
+ MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}" |
1355 |
+ MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}" |
1356 |
+ MY_DATADIR="${MY_DATAROOTDIR}" |
1357 |
+ MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}" |
1358 |
+ MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}" |
1359 |
+ MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}" |
1360 |
+ MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}" |
1361 |
+ MY_MANDIR="${MY_DATADIR}/man" |
1362 |
+} |
1363 |
+ |
1364 |
+src_unpack() { |
1365 |
+ if [[ ${PV} == "9999" ]] ; then |
1366 |
+ EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack |
1367 |
+ if use staging; then |
1368 |
+ local CURRENT_WINE_COMMIT=${EGIT_VERSION} |
1369 |
+ |
1370 |
+ git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}" |
1371 |
+ git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}" |
1372 |
+ |
1373 |
+ local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die |
1374 |
+ |
1375 |
+ if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then |
1376 |
+ einfo "The current Staging patchset is not guaranteed to apply on this WINE commit." |
1377 |
+ einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT." |
1378 |
+ einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine" |
1379 |
+ fi |
1380 |
+ fi |
1381 |
+ if use d3d9; then |
1382 |
+ git-r3_fetch "${D3D9_EGIT_REPO_URI}" "${D3D9_COMMIT}" |
1383 |
+ git-r3_checkout "${D3D9_EGIT_REPO_URI}" "${D3D9_DIR}" |
1384 |
+ fi |
1385 |
+ fi |
1386 |
+ |
1387 |
+ default |
1388 |
+ |
1389 |
+ l10n_find_plocales_changes "${S}/po" "" ".po" |
1390 |
+} |
1391 |
+ |
1392 |
+src_prepare() { |
1393 |
+ local md5="$(md5sum server/protocol.def)" |
1394 |
+ local PATCHES=( |
1395 |
+ "${FILESDIR}"/${MY_PN}-1.5.26-winegcc.patch #260726 |
1396 |
+ "${FILESDIR}"/${MY_PN}-1.9.5-multilib-portage.patch #395615 |
1397 |
+ "${FILESDIR}"/${MY_PN}-1.7.12-osmesa-check.patch #429386 |
1398 |
+ "${FILESDIR}"/${MY_PN}-1.6-memset-O3.patch #480508 |
1399 |
+ "${FILESDIR}"/${MY_PN}-2.0-multislot-apploader.patch |
1400 |
+ ) |
1401 |
+ if use staging; then |
1402 |
+ ewarn "Applying the Wine-Staging patchset. Any bug reports to the" |
1403 |
+ ewarn "Wine bugzilla should explicitly state that staging was used." |
1404 |
+ |
1405 |
+ local STAGING_EXCLUDE="" |
1406 |
+ STAGING_EXCLUDE="${STAGING_EXCLUDE} -W winhlp32-Flex_Workaround" # Avoid double patching https://bugs.winehq.org/show_bug.cgi?id=42132 |
1407 |
+ use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight" |
1408 |
+ |
1409 |
+ # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches |
1410 |
+ ebegin "Running Wine-Staging patch installer" |
1411 |
+ ( |
1412 |
+ set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE} |
1413 |
+ cd "${STAGING_DIR}/patches" |
1414 |
+ source "${STAGING_DIR}/patches/patchinstall.sh" |
1415 |
+ ) |
1416 |
+ eend $? || die "Failed to apply Wine-Staging patches" |
1417 |
+ fi |
1418 |
+ if use d3d9; then |
1419 |
+ if use staging; then |
1420 |
+ PATCHES+=( "${D3D9_DIR}/staging-helper.patch" ) |
1421 |
+ else |
1422 |
+ PATCHES+=( "${D3D9_DIR}/d3d9-helper.patch" ) |
1423 |
+ fi |
1424 |
+ PATCHES+=( "${D3D9_DIR}/wine-d3d9.patch" ) |
1425 |
+ fi |
1426 |
+ |
1427 |
+ default |
1428 |
+ eautoreconf |
1429 |
+ |
1430 |
+ # Modification of the server protocol requires regenerating the server requests |
1431 |
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then |
1432 |
+ einfo "server/protocol.def was patched; running tools/make_requests" |
1433 |
+ tools/make_requests || die #432348 |
1434 |
+ fi |
1435 |
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die |
1436 |
+ if ! use run-exes; then |
1437 |
+ sed -i '/^MimeType/d' loader/wine.desktop || die #117785 |
1438 |
+ fi |
1439 |
+ |
1440 |
+ # Edit wine.desktop to work for specific variant |
1441 |
+ sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die |
1442 |
+ |
1443 |
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652 |
1444 |
+ cp "${WORKDIR}/${WINE_DESKTOP_COMMON_P}/icons/oic_winlogo.ico" dlls/user32/resources/ || die |
1445 |
+ |
1446 |
+ l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS |
1447 |
+} |
1448 |
+ |
1449 |
+src_configure() { |
1450 |
+ wine_compiler_check || die |
1451 |
+ |
1452 |
+ export LDCONFIG=/bin/true |
1453 |
+ use custom-cflags || strip-flags |
1454 |
+ |
1455 |
+ multilib-minimal_src_configure |
1456 |
+} |
1457 |
+ |
1458 |
+multilib_src_configure() { |
1459 |
+ local myconf=( |
1460 |
+ --prefix="${MY_PREFIX}" |
1461 |
+ --datarootdir="${MY_DATAROOTDIR}" |
1462 |
+ --datadir="${MY_DATADIR}" |
1463 |
+ --docdir="${MY_DOCDIR}" |
1464 |
+ --includedir="${MY_INCLUDEDIR}" |
1465 |
+ --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}" |
1466 |
+ --libexecdir="${MY_LIBEXECDIR}" |
1467 |
+ --localstatedir="${MY_LOCALSTATEDIR}" |
1468 |
+ --mandir="${MY_MANDIR}" |
1469 |
+ --sysconfdir=/etc/wine |
1470 |
+ $(use_with alsa) |
1471 |
+ $(use_with capi) |
1472 |
+ $(use_with lcms cms) |
1473 |
+ $(use_with cups) |
1474 |
+ $(use_with ncurses curses) |
1475 |
+ $(use_with udisks dbus) |
1476 |
+ $(use_with fontconfig) |
1477 |
+ $(use_with ssl gnutls) |
1478 |
+ $(use_enable gecko mshtml) |
1479 |
+ $(use_with gphoto2 gphoto) |
1480 |
+ $(use_with gsm) |
1481 |
+ $(use_with gstreamer) |
1482 |
+ --without-hal |
1483 |
+ $(use_with jpeg) |
1484 |
+ $(use_with ldap) |
1485 |
+ $(use_enable mono mscoree) |
1486 |
+ $(use_with mp3 mpg123) |
1487 |
+ $(use_with netapi) |
1488 |
+ $(use_with nls gettext) |
1489 |
+ $(use_with openal) |
1490 |
+ $(use_with opencl) |
1491 |
+ $(use_with opengl) |
1492 |
+ $(use_with osmesa) |
1493 |
+ $(use_with oss) |
1494 |
+ $(use_with pcap) |
1495 |
+ $(use_with png) |
1496 |
+ $(use_with pulseaudio pulse) |
1497 |
+ $(use_with threads pthread) |
1498 |
+ $(use_with scanner sane) |
1499 |
+ $(use_enable test tests) |
1500 |
+ $(use_with truetype freetype) |
1501 |
+ $(use_with udev) |
1502 |
+ $(use_with v4l) |
1503 |
+ $(use_with X x) |
1504 |
+ $(use_with xcomposite) |
1505 |
+ $(use_with xinerama) |
1506 |
+ $(use_with xml) |
1507 |
+ $(use_with xml xslt) |
1508 |
+ ) |
1509 |
+ |
1510 |
+ use staging && myconf+=( |
1511 |
+ --with-xattr |
1512 |
+ $(use_with themes gtk3) |
1513 |
+ $(use_with vaapi va) |
1514 |
+ ) |
1515 |
+ use d3d9 && myconf+=( $(use_with d3d9 d3d9-nine) ) |
1516 |
+ |
1517 |
+ local PKG_CONFIG AR RANLIB |
1518 |
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038 |
1519 |
+ # set AR and RANLIB to make QA scripts happy; #483342 |
1520 |
+ tc-export PKG_CONFIG AR RANLIB |
1521 |
+ |
1522 |
+ if use amd64; then |
1523 |
+ if [[ ${ABI} == amd64 ]]; then |
1524 |
+ myconf+=( --enable-win64 ) |
1525 |
+ else |
1526 |
+ myconf+=( --disable-win64 ) |
1527 |
+ fi |
1528 |
+ |
1529 |
+ # Note: using --with-wine64 results in problems with multilib.eclass |
1530 |
+ # CC/LD hackery. We're using separate tools instead. |
1531 |
+ fi |
1532 |
+ |
1533 |
+ ECONF_SOURCE=${S} \ |
1534 |
+ econf "${myconf[@]}" |
1535 |
+ emake depend |
1536 |
+} |
1537 |
+ |
1538 |
+multilib_src_test() { |
1539 |
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader" |
1540 |
+ if [[ ${ABI} == x86 ]]; then |
1541 |
+ if [[ $(id -u) == 0 ]]; then |
1542 |
+ ewarn "Skipping tests since they cannot be run under the root user." |
1543 |
+ ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf" |
1544 |
+ return |
1545 |
+ fi |
1546 |
+ |
1547 |
+ WINEPREFIX="${T}/.wine-${ABI}" \ |
1548 |
+ Xemake test |
1549 |
+ fi |
1550 |
+} |
1551 |
+ |
1552 |
+multilib_src_install_all() { |
1553 |
+ local DOCS=( ANNOUNCE AUTHORS README ) |
1554 |
+ local l |
1555 |
+ add_locale_docs() { |
1556 |
+ local locale_doc="documentation/README.$1" |
1557 |
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} ) |
1558 |
+ } |
1559 |
+ l10n_for_each_locale_do add_locale_docs |
1560 |
+ |
1561 |
+ einstalldocs |
1562 |
+ prune_libtool_files --all |
1563 |
+ |
1564 |
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script |
1565 |
+ rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \ |
1566 |
+ "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die |
1567 |
+ fi |
1568 |
+ |
1569 |
+ # Remove wineconsole if neither backend is installed #551124 |
1570 |
+ if ! use X && ! use ncurses; then |
1571 |
+ rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die |
1572 |
+ rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die |
1573 |
+ rm_wineconsole() { |
1574 |
+ rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die |
1575 |
+ } |
1576 |
+ multilib_foreach_abi rm_wineconsole |
1577 |
+ fi |
1578 |
+ |
1579 |
+ use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055 |
1580 |
+ use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader} |
1581 |
+ |
1582 |
+ if use abi_x86_64 && ! use abi_x86_32; then |
1583 |
+ dosym "${MY_PREFIX}"/bin/wine{64,} # 404331 |
1584 |
+ dosym "${MY_PREFIX}"/bin/wine{64,}-preloader |
1585 |
+ fi |
1586 |
+ |
1587 |
+ # Make wrappers for binaries for handling multiple variants |
1588 |
+ # Note: wrappers instead of symlinks because some are shell which use basename |
1589 |
+ for b in "${D%/}${MY_PREFIX}"/bin/*; do |
1590 |
+ make_wrapper ${b##*/}-${WINE_VARIANT} "${MY_PREFIX}"/bin/${b##*/} |
1591 |
+ done |
1592 |
+ |
1593 |
+ # respect LINGUAS when installing man pages, #469418 |
1594 |
+ for l in de fr pl; do |
1595 |
+ use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}* |
1596 |
+ done |
1597 |
+ |
1598 |
+ for m in "${D%/}${MY_MANDIR}"/*/*; do |
1599 |
+ new_man=${m##*/} |
1600 |
+ new_man=${new_man%%.1} |
1601 |
+ newman "${m}" ${new_man##*/}-${WINE_VARIANT}.1 |
1602 |
+ done |
1603 |
+} |
1604 |
+ |
1605 |
+pkg_postinst() { |
1606 |
+ eselect wine register ${P} |
1607 |
+ if [[ ${PN} == "wine-vanilla" ]]; then |
1608 |
+ eselect wine register --vanilla ${P} || die |
1609 |
+ else |
1610 |
+ if use staging; then |
1611 |
+ eselect wine register --staging ${P} || die |
1612 |
+ fi |
1613 |
+ if use d3d9; then |
1614 |
+ eselect wine register --d3d9 ${P} || die |
1615 |
+ fi |
1616 |
+ fi |
1617 |
+ |
1618 |
+ eselect wine update --all --if-unset || die |
1619 |
+ |
1620 |
+ fdo-mime_desktop_database_update |
1621 |
+ |
1622 |
+ if ! use gecko; then |
1623 |
+ ewarn "Without Wine Gecko, wine prefixes will not have a default" |
1624 |
+ ewarn "implementation of iexplore. Many older windows applications" |
1625 |
+ ewarn "rely upon the existence of an iexplore implementation, so" |
1626 |
+ ewarn "you will likely need to install an external one, like via winetricks" |
1627 |
+ fi |
1628 |
+ if ! use mono; then |
1629 |
+ ewarn "Without Wine Mono, wine prefixes will not have a default" |
1630 |
+ ewarn "implementation of .NET. Many windows applications rely upon" |
1631 |
+ ewarn "the existence of a .NET implementation, so you will likely need" |
1632 |
+ ewarn "to install an external one, like via winetricks" |
1633 |
+ fi |
1634 |
+} |
1635 |
+ |
1636 |
+pkg_prerm() { |
1637 |
+ eselect wine deregister ${P} |
1638 |
+ if [[ ${PN} == "wine-vanilla" ]]; then |
1639 |
+ eselect wine deregister --vanilla ${P} || die |
1640 |
+ else |
1641 |
+ if use staging; then |
1642 |
+ eselect wine deregister --staging ${P} || die |
1643 |
+ fi |
1644 |
+ if use d3d9; then |
1645 |
+ eselect wine deregister --d3d9 ${P} || die |
1646 |
+ fi |
1647 |
+ fi |
1648 |
+ |
1649 |
+ eselect wine update --all --if-unset || die |
1650 |
+} |
1651 |
+ |
1652 |
+pkg_postrm() { |
1653 |
+ fdo-mime_desktop_database_update |
1654 |
+} |
1655 |
|
1656 |
diff --git a/app-emulation/wine-any/wine-any-2.2.ebuild b/app-emulation/wine-any/wine-any-2.2.ebuild |
1657 |
new file mode 100644 |
1658 |
index 00000000000..88e2cd700de |
1659 |
--- /dev/null |
1660 |
+++ b/app-emulation/wine-any/wine-any-2.2.ebuild |
1661 |
@@ -0,0 +1,615 @@ |
1662 |
+# Copyright 1999-2017 Gentoo Foundation |
1663 |
+# Distributed under the terms of the GNU General Public License v2 |
1664 |
+ |
1665 |
+EAPI=6 |
1666 |
+ |
1667 |
+PLOCALES="ar bg ca cs da de el en en_US eo es fa fi fr he hi hr hu it ja ko lt ml nb_NO nl or pa pl pt_BR pt_PT rm ro ru sk sl sr_RS@cyrillic sr_RS@latin sv te th tr uk wa zh_CN zh_TW" |
1668 |
+PLOCALE_BACKUP="en" |
1669 |
+ |
1670 |
+inherit autotools eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator |
1671 |
+ |
1672 |
+MY_PN="${PN%%-*}" |
1673 |
+MY_P="${MY_PN}-${PV}" |
1674 |
+ |
1675 |
+if [[ ${PV} == "9999" ]] ; then |
1676 |
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git" |
1677 |
+ EGIT_BRANCH="master" |
1678 |
+ inherit git-r3 |
1679 |
+ SRC_URI="" |
1680 |
+ #KEYWORDS="" |
1681 |
+else |
1682 |
+ MAJOR_V=$(get_version_component_range 1) |
1683 |
+ SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz" |
1684 |
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" |
1685 |
+fi |
1686 |
+S="${WORKDIR}/${MY_P}" |
1687 |
+ |
1688 |
+STAGING_P="wine-staging-${PV}" |
1689 |
+STAGING_DIR="${WORKDIR}/${STAGING_P}" |
1690 |
+D3D9_P="wine-d3d9-${PV}" |
1691 |
+D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}" |
1692 |
+WDC_V="20150204" |
1693 |
+WINE_DESKTOP_COMMON_P="wine-desktop-common-${WDC_V}" |
1694 |
+ |
1695 |
+DESCRIPTION="Free implementation of Windows(tm) on Unix" |
1696 |
+HOMEPAGE="http://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 |
+" |
1700 |
+ |
1701 |
+if [[ ${PV} == "9999" ]] ; then |
1702 |
+ STAGING_EGIT_REPO_URI="git://github.com/wine-compholio/wine-staging.git" |
1703 |
+ D3D9_EGIT_REPO_URI="git://github.com/sarnex/wine-d3d9-patches.git" |
1704 |
+else |
1705 |
+ SRC_URI="${SRC_URI} |
1706 |
+ staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz ) |
1707 |
+ d3d9? ( https://github.com/sarnex/wine-d3d9-patches/archive/${D3D9_P}.tar.gz )" |
1708 |
+fi |
1709 |
+ |
1710 |
+LICENSE="LGPL-2.1" |
1711 |
+SLOT="${PV}" |
1712 |
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags d3d9 dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg kernel_FreeBSD +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl pcap pipelight +png prelink pulseaudio +realtime +run-exes s3tc samba scanner selinux +ssl staging test themes +threads +truetype udev +udisks v4l vaapi +X +xcomposite xinerama +xml" |
1713 |
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) |
1714 |
+ X? ( truetype ) |
1715 |
+ elibc_glibc? ( threads ) |
1716 |
+ osmesa? ( opengl ) |
1717 |
+ pipelight? ( staging ) |
1718 |
+ s3tc? ( staging ) |
1719 |
+ test? ( abi_x86_32 ) |
1720 |
+ themes? ( staging ) |
1721 |
+ vaapi? ( staging )" # osmesa-opengl #286560 # X-truetype #551124 |
1722 |
+ |
1723 |
+# FIXME: the test suite is unsuitable for us; many tests require net access |
1724 |
+# or fail due to Xvfb's opengl limitations. |
1725 |
+RESTRICT="test" |
1726 |
+ |
1727 |
+COMMON_DEPEND=" |
1728 |
+ X? ( |
1729 |
+ x11-libs/libXcursor[${MULTILIB_USEDEP}] |
1730 |
+ x11-libs/libXext[${MULTILIB_USEDEP}] |
1731 |
+ x11-libs/libXrandr[${MULTILIB_USEDEP}] |
1732 |
+ x11-libs/libXi[${MULTILIB_USEDEP}] |
1733 |
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}] |
1734 |
+ ) |
1735 |
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) |
1736 |
+ capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] ) |
1737 |
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] ) |
1738 |
+ d3d9? ( |
1739 |
+ media-libs/mesa[d3d9,egl,${MULTILIB_USEDEP}] |
1740 |
+ x11-libs/libX11[${MULTILIB_USEDEP}] |
1741 |
+ x11-libs/libXext[${MULTILIB_USEDEP}] |
1742 |
+ x11-libs/libxcb[${MULTILIB_USEDEP}] |
1743 |
+ ) |
1744 |
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] ) |
1745 |
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) |
1746 |
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] ) |
1747 |
+ gstreamer? ( |
1748 |
+ media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] |
1749 |
+ media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] |
1750 |
+ ) |
1751 |
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] ) |
1752 |
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] ) |
1753 |
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) |
1754 |
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] ) |
1755 |
+ ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] ) |
1756 |
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] ) |
1757 |
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] ) |
1758 |
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] ) |
1759 |
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] ) |
1760 |
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) |
1761 |
+ opengl? ( |
1762 |
+ virtual/glu[${MULTILIB_USEDEP}] |
1763 |
+ virtual/opengl[${MULTILIB_USEDEP}] |
1764 |
+ ) |
1765 |
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] ) |
1766 |
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) |
1767 |
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) |
1768 |
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] ) |
1769 |
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] ) |
1770 |
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) |
1771 |
+ staging? ( sys-apps/attr[${MULTILIB_USEDEP}] ) |
1772 |
+ themes? ( |
1773 |
+ dev-libs/glib:2[${MULTILIB_USEDEP}] |
1774 |
+ x11-libs/cairo[${MULTILIB_USEDEP}] |
1775 |
+ x11-libs/gtk+:3[${MULTILIB_USEDEP}] |
1776 |
+ ) |
1777 |
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] ) |
1778 |
+ udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) |
1779 |
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) |
1780 |
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) |
1781 |
+ vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] ) |
1782 |
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) |
1783 |
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) |
1784 |
+ xml? ( |
1785 |
+ dev-libs/libxml2[${MULTILIB_USEDEP}] |
1786 |
+ dev-libs/libxslt[${MULTILIB_USEDEP}] |
1787 |
+ ) |
1788 |
+ abi_x86_32? ( |
1789 |
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] |
1790 |
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14 |
1791 |
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)] |
1792 |
+ !<app-emulation/emul-linux-x86-db-20140508-r3 |
1793 |
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] |
1794 |
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6 |
1795 |
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] |
1796 |
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1 |
1797 |
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)] |
1798 |
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1 |
1799 |
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] |
1800 |
+ !<app-emulation/emul-linux-x86-soundlibs-20140508 |
1801 |
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] |
1802 |
+ !<app-emulation/emul-linux-x86-xlibs-20140508 |
1803 |
+ )" |
1804 |
+ |
1805 |
+RDEPEND="${COMMON_DEPEND} |
1806 |
+ app-emulation/wine-desktop-common |
1807 |
+ >app-eselect/eselect-wine-0.3 |
1808 |
+ !app-emulation/wine:0 |
1809 |
+ dos? ( >=games-emulation/dosbox-0.74_p20160629 ) |
1810 |
+ gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] ) |
1811 |
+ mono? ( app-emulation/wine-mono:4.6.4 ) |
1812 |
+ perl? ( |
1813 |
+ dev-lang/perl |
1814 |
+ dev-perl/XML-Simple |
1815 |
+ ) |
1816 |
+ pulseaudio? ( |
1817 |
+ realtime? ( sys-auth/rtkit ) |
1818 |
+ ) |
1819 |
+ s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] ) |
1820 |
+ samba? ( >=net-fs/samba-3.0.25[winbind] ) |
1821 |
+ selinux? ( sec-policy/selinux-wine ) |
1822 |
+ udisks? ( sys-fs/udisks:2 )" |
1823 |
+ |
1824 |
+# tools/make_requests requires perl |
1825 |
+DEPEND="${COMMON_DEPEND} |
1826 |
+ sys-devel/flex |
1827 |
+ >=sys-kernel/linux-headers-2.6 |
1828 |
+ virtual/pkgconfig |
1829 |
+ virtual/yacc |
1830 |
+ X? ( |
1831 |
+ x11-proto/inputproto |
1832 |
+ x11-proto/xextproto |
1833 |
+ x11-proto/xf86vidmodeproto |
1834 |
+ ) |
1835 |
+ prelink? ( sys-devel/prelink ) |
1836 |
+ staging? ( |
1837 |
+ dev-lang/perl |
1838 |
+ dev-perl/XML-Simple |
1839 |
+ ) |
1840 |
+ xinerama? ( x11-proto/xineramaproto )" |
1841 |
+ |
1842 |
+# These use a non-standard "Wine" category, which is provided by |
1843 |
+# /etc/xdg/applications-merged/wine.menu |
1844 |
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop |
1845 |
+usr/share/applications/wine-notepad.desktop |
1846 |
+usr/share/applications/wine-uninstaller.desktop |
1847 |
+usr/share/applications/wine-winecfg.desktop" |
1848 |
+ |
1849 |
+wine_compiler_check() { |
1850 |
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
1851 |
+ |
1852 |
+ # GCC-specific bugs |
1853 |
+ if tc-is-gcc; then |
1854 |
+ # bug #549768 |
1855 |
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then |
1856 |
+ ebegin "Checking for gcc-5 ms_abi compiler bug" |
1857 |
+ $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die |
1858 |
+ # Run in subshell to prevent "Aborted" message |
1859 |
+ ( "${T}"/pr66838 || false ) >/dev/null 2>&1 |
1860 |
+ if ! eend $?; then |
1861 |
+ eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0" |
1862 |
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild," |
1863 |
+ eerror "or use gcc-config to select a different compiler version." |
1864 |
+ eerror "See https://bugs.gentoo.org/549768" |
1865 |
+ eerror |
1866 |
+ return 1 |
1867 |
+ fi |
1868 |
+ fi |
1869 |
+ # bug #574044 |
1870 |
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then |
1871 |
+ ebegin "Checking for gcc-5-3 stack realignment compiler bug" |
1872 |
+ # Compile in subshell to prevent "Aborted" message |
1873 |
+ ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${FILESDIR}"/pr69140.c -o "${T}"/pr69140 ) >/dev/null 2>&1 |
1874 |
+ if ! eend $?; then |
1875 |
+ eerror "Wine cannot be built with this version of gcc-5.3" |
1876 |
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild," |
1877 |
+ eerror "or use gcc-config to select a different compiler version." |
1878 |
+ eerror "See https://bugs.gentoo.org/574044" |
1879 |
+ eerror |
1880 |
+ return 1 |
1881 |
+ fi |
1882 |
+ fi |
1883 |
+ fi |
1884 |
+ |
1885 |
+ # Ensure compiler support |
1886 |
+ if use abi_x86_64; then |
1887 |
+ ebegin "Checking for 64-bit compiler with builtin_ms_va_list support" |
1888 |
+ # Compile in subshell to prevent "Aborted" message |
1889 |
+ ( $(tc-getCC) -O2 "${FILESDIR}"/builtin_ms_va_list.c -o "${T}"/builtin_ms_va_list >/dev/null 2>&1) |
1890 |
+ if ! eend $?; then |
1891 |
+ eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine" |
1892 |
+ eerror |
1893 |
+ eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine" |
1894 |
+ eerror |
1895 |
+ return 1 |
1896 |
+ fi |
1897 |
+ fi |
1898 |
+} |
1899 |
+ |
1900 |
+wine_build_environment_check() { |
1901 |
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
1902 |
+ |
1903 |
+ if use abi_x86_64; then |
1904 |
+ if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then |
1905 |
+ eerror "You need gcc-4.4+ to compile 64-bit wine" |
1906 |
+ die |
1907 |
+ elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then |
1908 |
+ eerror "You need clang-3.8+ to compile 64-bit wine" |
1909 |
+ die |
1910 |
+ fi |
1911 |
+ fi |
1912 |
+ if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then |
1913 |
+ ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by" |
1914 |
+ ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in" |
1915 |
+ ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4" |
1916 |
+ fi |
1917 |
+ if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then |
1918 |
+ if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then |
1919 |
+ ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work" |
1920 |
+ ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine." |
1921 |
+ ewarn "See package.env in man 5 portage for more information on how to do this." |
1922 |
+ ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details" |
1923 |
+ fi |
1924 |
+ fi |
1925 |
+ |
1926 |
+ if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then |
1927 |
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only." |
1928 |
+ eerror "See https://bugs.gentoo.org/487864 for more details." |
1929 |
+ eerror |
1930 |
+ return 1 |
1931 |
+ fi |
1932 |
+} |
1933 |
+ |
1934 |
+wine_env_vcs_vars() { |
1935 |
+ local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT" |
1936 |
+ local pn_live_val="${pn_live_var}" |
1937 |
+ eval pn_live_val='$'${pn_live_val} |
1938 |
+ if [[ ! -z ${pn_live_val} ]]; then |
1939 |
+ if use staging || use d3d9; then |
1940 |
+ eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}" |
1941 |
+ eerror "cannot be used to set the commit. Instead, you may use the" |
1942 |
+ eerror "environmental variables WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT." |
1943 |
+ eerror |
1944 |
+ return 1 |
1945 |
+ fi |
1946 |
+ fi |
1947 |
+ if [[ ! -z ${EGIT_COMMIT} ]]; then |
1948 |
+ eerror "Commits must now be specified using the environmental variables" |
1949 |
+ eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT" |
1950 |
+ eerror |
1951 |
+ return 1 |
1952 |
+ fi |
1953 |
+} |
1954 |
+ |
1955 |
+pkg_pretend() { |
1956 |
+ wine_build_environment_check || die |
1957 |
+ |
1958 |
+ # Verify OSS support |
1959 |
+ if use oss && ! use kernel_FreeBSD; then |
1960 |
+ if ! has_version ">=media-sound/oss-4"; then |
1961 |
+ eerror "You cannot build wine with USE=oss without having support from a" |
1962 |
+ eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)" |
1963 |
+ eerror |
1964 |
+ die |
1965 |
+ fi |
1966 |
+ fi |
1967 |
+} |
1968 |
+ |
1969 |
+pkg_setup() { |
1970 |
+ wine_build_environment_check || die |
1971 |
+ wine_env_vcs_vars || die |
1972 |
+ |
1973 |
+ WINE_VARIANT="${PN#wine}-${PV}" |
1974 |
+ WINE_VARIANT="${WINE_VARIANT#-}" |
1975 |
+ |
1976 |
+ MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}" |
1977 |
+ MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}" |
1978 |
+ MY_DATADIR="${MY_DATAROOTDIR}" |
1979 |
+ MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}" |
1980 |
+ MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}" |
1981 |
+ MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}" |
1982 |
+ MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}" |
1983 |
+ MY_MANDIR="${MY_DATADIR}/man" |
1984 |
+} |
1985 |
+ |
1986 |
+src_unpack() { |
1987 |
+ if [[ ${PV} == "9999" ]] ; then |
1988 |
+ EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack |
1989 |
+ if use staging; then |
1990 |
+ local CURRENT_WINE_COMMIT=${EGIT_VERSION} |
1991 |
+ |
1992 |
+ git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}" |
1993 |
+ git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}" |
1994 |
+ |
1995 |
+ local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die |
1996 |
+ |
1997 |
+ if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then |
1998 |
+ einfo "The current Staging patchset is not guaranteed to apply on this WINE commit." |
1999 |
+ einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT." |
2000 |
+ einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine" |
2001 |
+ fi |
2002 |
+ fi |
2003 |
+ if use d3d9; then |
2004 |
+ git-r3_fetch "${D3D9_EGIT_REPO_URI}" "${D3D9_COMMIT}" |
2005 |
+ git-r3_checkout "${D3D9_EGIT_REPO_URI}" "${D3D9_DIR}" |
2006 |
+ fi |
2007 |
+ fi |
2008 |
+ |
2009 |
+ default |
2010 |
+ |
2011 |
+ l10n_find_plocales_changes "${S}/po" "" ".po" |
2012 |
+} |
2013 |
+ |
2014 |
+src_prepare() { |
2015 |
+ local md5="$(md5sum server/protocol.def)" |
2016 |
+ local PATCHES=( |
2017 |
+ "${FILESDIR}"/${MY_PN}-1.5.26-winegcc.patch #260726 |
2018 |
+ "${FILESDIR}"/${MY_PN}-1.9.5-multilib-portage.patch #395615 |
2019 |
+ "${FILESDIR}"/${MY_PN}-1.7.12-osmesa-check.patch #429386 |
2020 |
+ "${FILESDIR}"/${MY_PN}-1.6-memset-O3.patch #480508 |
2021 |
+ "${FILESDIR}"/${MY_PN}-2.0-multislot-apploader.patch |
2022 |
+ ) |
2023 |
+ if use staging; then |
2024 |
+ ewarn "Applying the Wine-Staging patchset. Any bug reports to the" |
2025 |
+ ewarn "Wine bugzilla should explicitly state that staging was used." |
2026 |
+ |
2027 |
+ local STAGING_EXCLUDE="" |
2028 |
+ STAGING_EXCLUDE="${STAGING_EXCLUDE} -W winhlp32-Flex_Workaround" # Avoid double patching https://bugs.winehq.org/show_bug.cgi?id=42132 |
2029 |
+ use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight" |
2030 |
+ |
2031 |
+ # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches |
2032 |
+ ebegin "Running Wine-Staging patch installer" |
2033 |
+ ( |
2034 |
+ set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE} |
2035 |
+ cd "${STAGING_DIR}/patches" |
2036 |
+ source "${STAGING_DIR}/patches/patchinstall.sh" |
2037 |
+ ) |
2038 |
+ eend $? || die "Failed to apply Wine-Staging patches" |
2039 |
+ fi |
2040 |
+ if use d3d9; then |
2041 |
+ if use staging; then |
2042 |
+ PATCHES+=( "${D3D9_DIR}/staging-helper.patch" ) |
2043 |
+ else |
2044 |
+ PATCHES+=( "${D3D9_DIR}/d3d9-helper.patch" ) |
2045 |
+ fi |
2046 |
+ PATCHES+=( "${D3D9_DIR}/wine-d3d9.patch" ) |
2047 |
+ fi |
2048 |
+ |
2049 |
+ default |
2050 |
+ eautoreconf |
2051 |
+ |
2052 |
+ # Modification of the server protocol requires regenerating the server requests |
2053 |
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then |
2054 |
+ einfo "server/protocol.def was patched; running tools/make_requests" |
2055 |
+ tools/make_requests || die #432348 |
2056 |
+ fi |
2057 |
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die |
2058 |
+ if ! use run-exes; then |
2059 |
+ sed -i '/^MimeType/d' loader/wine.desktop || die #117785 |
2060 |
+ fi |
2061 |
+ |
2062 |
+ # Edit wine.desktop to work for specific variant |
2063 |
+ sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die |
2064 |
+ |
2065 |
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652 |
2066 |
+ cp "${WORKDIR}/${WINE_DESKTOP_COMMON_P}/icons/oic_winlogo.ico" dlls/user32/resources/ || die |
2067 |
+ |
2068 |
+ l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS |
2069 |
+} |
2070 |
+ |
2071 |
+src_configure() { |
2072 |
+ wine_compiler_check || die |
2073 |
+ |
2074 |
+ export LDCONFIG=/bin/true |
2075 |
+ use custom-cflags || strip-flags |
2076 |
+ |
2077 |
+ multilib-minimal_src_configure |
2078 |
+} |
2079 |
+ |
2080 |
+multilib_src_configure() { |
2081 |
+ local myconf=( |
2082 |
+ --prefix="${MY_PREFIX}" |
2083 |
+ --datarootdir="${MY_DATAROOTDIR}" |
2084 |
+ --datadir="${MY_DATADIR}" |
2085 |
+ --docdir="${MY_DOCDIR}" |
2086 |
+ --includedir="${MY_INCLUDEDIR}" |
2087 |
+ --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}" |
2088 |
+ --libexecdir="${MY_LIBEXECDIR}" |
2089 |
+ --localstatedir="${MY_LOCALSTATEDIR}" |
2090 |
+ --mandir="${MY_MANDIR}" |
2091 |
+ --sysconfdir=/etc/wine |
2092 |
+ $(use_with alsa) |
2093 |
+ $(use_with capi) |
2094 |
+ $(use_with lcms cms) |
2095 |
+ $(use_with cups) |
2096 |
+ $(use_with ncurses curses) |
2097 |
+ $(use_with udisks dbus) |
2098 |
+ $(use_with fontconfig) |
2099 |
+ $(use_with ssl gnutls) |
2100 |
+ $(use_enable gecko mshtml) |
2101 |
+ $(use_with gphoto2 gphoto) |
2102 |
+ $(use_with gsm) |
2103 |
+ $(use_with gstreamer) |
2104 |
+ --without-hal |
2105 |
+ $(use_with jpeg) |
2106 |
+ $(use_with ldap) |
2107 |
+ $(use_enable mono mscoree) |
2108 |
+ $(use_with mp3 mpg123) |
2109 |
+ $(use_with netapi) |
2110 |
+ $(use_with nls gettext) |
2111 |
+ $(use_with openal) |
2112 |
+ $(use_with opencl) |
2113 |
+ $(use_with opengl) |
2114 |
+ $(use_with osmesa) |
2115 |
+ $(use_with oss) |
2116 |
+ $(use_with pcap) |
2117 |
+ $(use_with png) |
2118 |
+ $(use_with pulseaudio pulse) |
2119 |
+ $(use_with threads pthread) |
2120 |
+ $(use_with scanner sane) |
2121 |
+ $(use_enable test tests) |
2122 |
+ $(use_with truetype freetype) |
2123 |
+ $(use_with udev) |
2124 |
+ $(use_with v4l) |
2125 |
+ $(use_with X x) |
2126 |
+ $(use_with xcomposite) |
2127 |
+ $(use_with xinerama) |
2128 |
+ $(use_with xml) |
2129 |
+ $(use_with xml xslt) |
2130 |
+ ) |
2131 |
+ |
2132 |
+ use staging && myconf+=( |
2133 |
+ --with-xattr |
2134 |
+ $(use_with themes gtk3) |
2135 |
+ $(use_with vaapi va) |
2136 |
+ ) |
2137 |
+ use d3d9 && myconf+=( $(use_with d3d9 d3d9-nine) ) |
2138 |
+ |
2139 |
+ local PKG_CONFIG AR RANLIB |
2140 |
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038 |
2141 |
+ # set AR and RANLIB to make QA scripts happy; #483342 |
2142 |
+ tc-export PKG_CONFIG AR RANLIB |
2143 |
+ |
2144 |
+ if use amd64; then |
2145 |
+ if [[ ${ABI} == amd64 ]]; then |
2146 |
+ myconf+=( --enable-win64 ) |
2147 |
+ else |
2148 |
+ myconf+=( --disable-win64 ) |
2149 |
+ fi |
2150 |
+ |
2151 |
+ # Note: using --with-wine64 results in problems with multilib.eclass |
2152 |
+ # CC/LD hackery. We're using separate tools instead. |
2153 |
+ fi |
2154 |
+ |
2155 |
+ ECONF_SOURCE=${S} \ |
2156 |
+ econf "${myconf[@]}" |
2157 |
+ emake depend |
2158 |
+} |
2159 |
+ |
2160 |
+multilib_src_test() { |
2161 |
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader" |
2162 |
+ if [[ ${ABI} == x86 ]]; then |
2163 |
+ if [[ $(id -u) == 0 ]]; then |
2164 |
+ ewarn "Skipping tests since they cannot be run under the root user." |
2165 |
+ ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf" |
2166 |
+ return |
2167 |
+ fi |
2168 |
+ |
2169 |
+ WINEPREFIX="${T}/.wine-${ABI}" \ |
2170 |
+ Xemake test |
2171 |
+ fi |
2172 |
+} |
2173 |
+ |
2174 |
+multilib_src_install_all() { |
2175 |
+ local DOCS=( ANNOUNCE AUTHORS README ) |
2176 |
+ local l |
2177 |
+ add_locale_docs() { |
2178 |
+ local locale_doc="documentation/README.$1" |
2179 |
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} ) |
2180 |
+ } |
2181 |
+ l10n_for_each_locale_do add_locale_docs |
2182 |
+ |
2183 |
+ einstalldocs |
2184 |
+ prune_libtool_files --all |
2185 |
+ |
2186 |
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script |
2187 |
+ rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \ |
2188 |
+ "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die |
2189 |
+ fi |
2190 |
+ |
2191 |
+ # Remove wineconsole if neither backend is installed #551124 |
2192 |
+ if ! use X && ! use ncurses; then |
2193 |
+ rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die |
2194 |
+ rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die |
2195 |
+ rm_wineconsole() { |
2196 |
+ rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die |
2197 |
+ } |
2198 |
+ multilib_foreach_abi rm_wineconsole |
2199 |
+ fi |
2200 |
+ |
2201 |
+ use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055 |
2202 |
+ use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader} |
2203 |
+ |
2204 |
+ if use abi_x86_64 && ! use abi_x86_32; then |
2205 |
+ dosym "${MY_PREFIX}"/bin/wine{64,} # 404331 |
2206 |
+ dosym "${MY_PREFIX}"/bin/wine{64,}-preloader |
2207 |
+ fi |
2208 |
+ |
2209 |
+ # Make wrappers for binaries for handling multiple variants |
2210 |
+ # Note: wrappers instead of symlinks because some are shell which use basename |
2211 |
+ for b in "${D%/}${MY_PREFIX}"/bin/*; do |
2212 |
+ make_wrapper ${b##*/}-${WINE_VARIANT} "${MY_PREFIX}"/bin/${b##*/} |
2213 |
+ done |
2214 |
+ |
2215 |
+ # respect LINGUAS when installing man pages, #469418 |
2216 |
+ for l in de fr pl; do |
2217 |
+ use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}* |
2218 |
+ done |
2219 |
+ |
2220 |
+ for m in "${D%/}${MY_MANDIR}"/*/*; do |
2221 |
+ new_man=${m##*/} |
2222 |
+ new_man=${new_man%%.1} |
2223 |
+ newman "${m}" ${new_man##*/}-${WINE_VARIANT}.1 |
2224 |
+ done |
2225 |
+} |
2226 |
+ |
2227 |
+pkg_postinst() { |
2228 |
+ eselect wine register ${P} |
2229 |
+ if [[ ${PN} == "wine-vanilla" ]]; then |
2230 |
+ eselect wine register --vanilla ${P} || die |
2231 |
+ else |
2232 |
+ if use staging; then |
2233 |
+ eselect wine register --staging ${P} || die |
2234 |
+ fi |
2235 |
+ if use d3d9; then |
2236 |
+ eselect wine register --d3d9 ${P} || die |
2237 |
+ fi |
2238 |
+ fi |
2239 |
+ |
2240 |
+ eselect wine update --all --if-unset || die |
2241 |
+ |
2242 |
+ fdo-mime_desktop_database_update |
2243 |
+ |
2244 |
+ if ! use gecko; then |
2245 |
+ ewarn "Without Wine Gecko, wine prefixes will not have a default" |
2246 |
+ ewarn "implementation of iexplore. Many older windows applications" |
2247 |
+ ewarn "rely upon the existence of an iexplore implementation, so" |
2248 |
+ ewarn "you will likely need to install an external one, like via winetricks" |
2249 |
+ fi |
2250 |
+ if ! use mono; then |
2251 |
+ ewarn "Without Wine Mono, wine prefixes will not have a default" |
2252 |
+ ewarn "implementation of .NET. Many windows applications rely upon" |
2253 |
+ ewarn "the existence of a .NET implementation, so you will likely need" |
2254 |
+ ewarn "to install an external one, like via winetricks" |
2255 |
+ fi |
2256 |
+} |
2257 |
+ |
2258 |
+pkg_prerm() { |
2259 |
+ eselect wine deregister ${P} |
2260 |
+ if [[ ${PN} == "wine-vanilla" ]]; then |
2261 |
+ eselect wine deregister --vanilla ${P} || die |
2262 |
+ else |
2263 |
+ if use staging; then |
2264 |
+ eselect wine deregister --staging ${P} || die |
2265 |
+ fi |
2266 |
+ if use d3d9; then |
2267 |
+ eselect wine deregister --d3d9 ${P} || die |
2268 |
+ fi |
2269 |
+ fi |
2270 |
+ |
2271 |
+ eselect wine update --all --if-unset || die |
2272 |
+} |
2273 |
+ |
2274 |
+pkg_postrm() { |
2275 |
+ fdo-mime_desktop_database_update |
2276 |
+} |
2277 |
|
2278 |
diff --git a/app-emulation/wine-any/wine-any-2.3.ebuild b/app-emulation/wine-any/wine-any-2.3.ebuild |
2279 |
new file mode 100644 |
2280 |
index 00000000000..88e2cd700de |
2281 |
--- /dev/null |
2282 |
+++ b/app-emulation/wine-any/wine-any-2.3.ebuild |
2283 |
@@ -0,0 +1,615 @@ |
2284 |
+# Copyright 1999-2017 Gentoo Foundation |
2285 |
+# Distributed under the terms of the GNU General Public License v2 |
2286 |
+ |
2287 |
+EAPI=6 |
2288 |
+ |
2289 |
+PLOCALES="ar bg ca cs da de el en en_US eo es fa fi fr he hi hr hu it ja ko lt ml nb_NO nl or pa pl pt_BR pt_PT rm ro ru sk sl sr_RS@cyrillic sr_RS@latin sv te th tr uk wa zh_CN zh_TW" |
2290 |
+PLOCALE_BACKUP="en" |
2291 |
+ |
2292 |
+inherit autotools eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator |
2293 |
+ |
2294 |
+MY_PN="${PN%%-*}" |
2295 |
+MY_P="${MY_PN}-${PV}" |
2296 |
+ |
2297 |
+if [[ ${PV} == "9999" ]] ; then |
2298 |
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git" |
2299 |
+ EGIT_BRANCH="master" |
2300 |
+ inherit git-r3 |
2301 |
+ SRC_URI="" |
2302 |
+ #KEYWORDS="" |
2303 |
+else |
2304 |
+ MAJOR_V=$(get_version_component_range 1) |
2305 |
+ SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz" |
2306 |
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" |
2307 |
+fi |
2308 |
+S="${WORKDIR}/${MY_P}" |
2309 |
+ |
2310 |
+STAGING_P="wine-staging-${PV}" |
2311 |
+STAGING_DIR="${WORKDIR}/${STAGING_P}" |
2312 |
+D3D9_P="wine-d3d9-${PV}" |
2313 |
+D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}" |
2314 |
+WDC_V="20150204" |
2315 |
+WINE_DESKTOP_COMMON_P="wine-desktop-common-${WDC_V}" |
2316 |
+ |
2317 |
+DESCRIPTION="Free implementation of Windows(tm) on Unix" |
2318 |
+HOMEPAGE="http://www.winehq.org/" |
2319 |
+SRC_URI="${SRC_URI} |
2320 |
+ https://github.com/NP-Hardass/wine-desktop-common/archive/${WDC_V}.tar.gz -> ${WINE_DESKTOP_COMMON_P}.tar.gz |
2321 |
+" |
2322 |
+ |
2323 |
+if [[ ${PV} == "9999" ]] ; then |
2324 |
+ STAGING_EGIT_REPO_URI="git://github.com/wine-compholio/wine-staging.git" |
2325 |
+ D3D9_EGIT_REPO_URI="git://github.com/sarnex/wine-d3d9-patches.git" |
2326 |
+else |
2327 |
+ SRC_URI="${SRC_URI} |
2328 |
+ staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz ) |
2329 |
+ d3d9? ( https://github.com/sarnex/wine-d3d9-patches/archive/${D3D9_P}.tar.gz )" |
2330 |
+fi |
2331 |
+ |
2332 |
+LICENSE="LGPL-2.1" |
2333 |
+SLOT="${PV}" |
2334 |
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags d3d9 dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg kernel_FreeBSD +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl pcap pipelight +png prelink pulseaudio +realtime +run-exes s3tc samba scanner selinux +ssl staging test themes +threads +truetype udev +udisks v4l vaapi +X +xcomposite xinerama +xml" |
2335 |
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) |
2336 |
+ X? ( truetype ) |
2337 |
+ elibc_glibc? ( threads ) |
2338 |
+ osmesa? ( opengl ) |
2339 |
+ pipelight? ( staging ) |
2340 |
+ s3tc? ( staging ) |
2341 |
+ test? ( abi_x86_32 ) |
2342 |
+ themes? ( staging ) |
2343 |
+ vaapi? ( staging )" # osmesa-opengl #286560 # X-truetype #551124 |
2344 |
+ |
2345 |
+# FIXME: the test suite is unsuitable for us; many tests require net access |
2346 |
+# or fail due to Xvfb's opengl limitations. |
2347 |
+RESTRICT="test" |
2348 |
+ |
2349 |
+COMMON_DEPEND=" |
2350 |
+ X? ( |
2351 |
+ x11-libs/libXcursor[${MULTILIB_USEDEP}] |
2352 |
+ x11-libs/libXext[${MULTILIB_USEDEP}] |
2353 |
+ x11-libs/libXrandr[${MULTILIB_USEDEP}] |
2354 |
+ x11-libs/libXi[${MULTILIB_USEDEP}] |
2355 |
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}] |
2356 |
+ ) |
2357 |
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) |
2358 |
+ capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] ) |
2359 |
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] ) |
2360 |
+ d3d9? ( |
2361 |
+ media-libs/mesa[d3d9,egl,${MULTILIB_USEDEP}] |
2362 |
+ x11-libs/libX11[${MULTILIB_USEDEP}] |
2363 |
+ x11-libs/libXext[${MULTILIB_USEDEP}] |
2364 |
+ x11-libs/libxcb[${MULTILIB_USEDEP}] |
2365 |
+ ) |
2366 |
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] ) |
2367 |
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) |
2368 |
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] ) |
2369 |
+ gstreamer? ( |
2370 |
+ media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] |
2371 |
+ media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] |
2372 |
+ ) |
2373 |
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] ) |
2374 |
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] ) |
2375 |
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) |
2376 |
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] ) |
2377 |
+ ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] ) |
2378 |
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] ) |
2379 |
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] ) |
2380 |
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] ) |
2381 |
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] ) |
2382 |
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) |
2383 |
+ opengl? ( |
2384 |
+ virtual/glu[${MULTILIB_USEDEP}] |
2385 |
+ virtual/opengl[${MULTILIB_USEDEP}] |
2386 |
+ ) |
2387 |
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] ) |
2388 |
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) |
2389 |
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) |
2390 |
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] ) |
2391 |
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] ) |
2392 |
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) |
2393 |
+ staging? ( sys-apps/attr[${MULTILIB_USEDEP}] ) |
2394 |
+ themes? ( |
2395 |
+ dev-libs/glib:2[${MULTILIB_USEDEP}] |
2396 |
+ x11-libs/cairo[${MULTILIB_USEDEP}] |
2397 |
+ x11-libs/gtk+:3[${MULTILIB_USEDEP}] |
2398 |
+ ) |
2399 |
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] ) |
2400 |
+ udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) |
2401 |
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) |
2402 |
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) |
2403 |
+ vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] ) |
2404 |
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) |
2405 |
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) |
2406 |
+ xml? ( |
2407 |
+ dev-libs/libxml2[${MULTILIB_USEDEP}] |
2408 |
+ dev-libs/libxslt[${MULTILIB_USEDEP}] |
2409 |
+ ) |
2410 |
+ abi_x86_32? ( |
2411 |
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] |
2412 |
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14 |
2413 |
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)] |
2414 |
+ !<app-emulation/emul-linux-x86-db-20140508-r3 |
2415 |
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] |
2416 |
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6 |
2417 |
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] |
2418 |
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1 |
2419 |
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)] |
2420 |
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1 |
2421 |
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] |
2422 |
+ !<app-emulation/emul-linux-x86-soundlibs-20140508 |
2423 |
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] |
2424 |
+ !<app-emulation/emul-linux-x86-xlibs-20140508 |
2425 |
+ )" |
2426 |
+ |
2427 |
+RDEPEND="${COMMON_DEPEND} |
2428 |
+ app-emulation/wine-desktop-common |
2429 |
+ >app-eselect/eselect-wine-0.3 |
2430 |
+ !app-emulation/wine:0 |
2431 |
+ dos? ( >=games-emulation/dosbox-0.74_p20160629 ) |
2432 |
+ gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] ) |
2433 |
+ mono? ( app-emulation/wine-mono:4.6.4 ) |
2434 |
+ perl? ( |
2435 |
+ dev-lang/perl |
2436 |
+ dev-perl/XML-Simple |
2437 |
+ ) |
2438 |
+ pulseaudio? ( |
2439 |
+ realtime? ( sys-auth/rtkit ) |
2440 |
+ ) |
2441 |
+ s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] ) |
2442 |
+ samba? ( >=net-fs/samba-3.0.25[winbind] ) |
2443 |
+ selinux? ( sec-policy/selinux-wine ) |
2444 |
+ udisks? ( sys-fs/udisks:2 )" |
2445 |
+ |
2446 |
+# tools/make_requests requires perl |
2447 |
+DEPEND="${COMMON_DEPEND} |
2448 |
+ sys-devel/flex |
2449 |
+ >=sys-kernel/linux-headers-2.6 |
2450 |
+ virtual/pkgconfig |
2451 |
+ virtual/yacc |
2452 |
+ X? ( |
2453 |
+ x11-proto/inputproto |
2454 |
+ x11-proto/xextproto |
2455 |
+ x11-proto/xf86vidmodeproto |
2456 |
+ ) |
2457 |
+ prelink? ( sys-devel/prelink ) |
2458 |
+ staging? ( |
2459 |
+ dev-lang/perl |
2460 |
+ dev-perl/XML-Simple |
2461 |
+ ) |
2462 |
+ xinerama? ( x11-proto/xineramaproto )" |
2463 |
+ |
2464 |
+# These use a non-standard "Wine" category, which is provided by |
2465 |
+# /etc/xdg/applications-merged/wine.menu |
2466 |
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop |
2467 |
+usr/share/applications/wine-notepad.desktop |
2468 |
+usr/share/applications/wine-uninstaller.desktop |
2469 |
+usr/share/applications/wine-winecfg.desktop" |
2470 |
+ |
2471 |
+wine_compiler_check() { |
2472 |
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
2473 |
+ |
2474 |
+ # GCC-specific bugs |
2475 |
+ if tc-is-gcc; then |
2476 |
+ # bug #549768 |
2477 |
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then |
2478 |
+ ebegin "Checking for gcc-5 ms_abi compiler bug" |
2479 |
+ $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die |
2480 |
+ # Run in subshell to prevent "Aborted" message |
2481 |
+ ( "${T}"/pr66838 || false ) >/dev/null 2>&1 |
2482 |
+ if ! eend $?; then |
2483 |
+ eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0" |
2484 |
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild," |
2485 |
+ eerror "or use gcc-config to select a different compiler version." |
2486 |
+ eerror "See https://bugs.gentoo.org/549768" |
2487 |
+ eerror |
2488 |
+ return 1 |
2489 |
+ fi |
2490 |
+ fi |
2491 |
+ # bug #574044 |
2492 |
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then |
2493 |
+ ebegin "Checking for gcc-5-3 stack realignment compiler bug" |
2494 |
+ # Compile in subshell to prevent "Aborted" message |
2495 |
+ ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${FILESDIR}"/pr69140.c -o "${T}"/pr69140 ) >/dev/null 2>&1 |
2496 |
+ if ! eend $?; then |
2497 |
+ eerror "Wine cannot be built with this version of gcc-5.3" |
2498 |
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild," |
2499 |
+ eerror "or use gcc-config to select a different compiler version." |
2500 |
+ eerror "See https://bugs.gentoo.org/574044" |
2501 |
+ eerror |
2502 |
+ return 1 |
2503 |
+ fi |
2504 |
+ fi |
2505 |
+ fi |
2506 |
+ |
2507 |
+ # Ensure compiler support |
2508 |
+ if use abi_x86_64; then |
2509 |
+ ebegin "Checking for 64-bit compiler with builtin_ms_va_list support" |
2510 |
+ # Compile in subshell to prevent "Aborted" message |
2511 |
+ ( $(tc-getCC) -O2 "${FILESDIR}"/builtin_ms_va_list.c -o "${T}"/builtin_ms_va_list >/dev/null 2>&1) |
2512 |
+ if ! eend $?; then |
2513 |
+ eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine" |
2514 |
+ eerror |
2515 |
+ eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine" |
2516 |
+ eerror |
2517 |
+ return 1 |
2518 |
+ fi |
2519 |
+ fi |
2520 |
+} |
2521 |
+ |
2522 |
+wine_build_environment_check() { |
2523 |
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
2524 |
+ |
2525 |
+ if use abi_x86_64; then |
2526 |
+ if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then |
2527 |
+ eerror "You need gcc-4.4+ to compile 64-bit wine" |
2528 |
+ die |
2529 |
+ elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then |
2530 |
+ eerror "You need clang-3.8+ to compile 64-bit wine" |
2531 |
+ die |
2532 |
+ fi |
2533 |
+ fi |
2534 |
+ if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then |
2535 |
+ ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by" |
2536 |
+ ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in" |
2537 |
+ ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4" |
2538 |
+ fi |
2539 |
+ if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then |
2540 |
+ if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then |
2541 |
+ ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work" |
2542 |
+ ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine." |
2543 |
+ ewarn "See package.env in man 5 portage for more information on how to do this." |
2544 |
+ ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details" |
2545 |
+ fi |
2546 |
+ fi |
2547 |
+ |
2548 |
+ if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then |
2549 |
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only." |
2550 |
+ eerror "See https://bugs.gentoo.org/487864 for more details." |
2551 |
+ eerror |
2552 |
+ return 1 |
2553 |
+ fi |
2554 |
+} |
2555 |
+ |
2556 |
+wine_env_vcs_vars() { |
2557 |
+ local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT" |
2558 |
+ local pn_live_val="${pn_live_var}" |
2559 |
+ eval pn_live_val='$'${pn_live_val} |
2560 |
+ if [[ ! -z ${pn_live_val} ]]; then |
2561 |
+ if use staging || use d3d9; then |
2562 |
+ eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}" |
2563 |
+ eerror "cannot be used to set the commit. Instead, you may use the" |
2564 |
+ eerror "environmental variables WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT." |
2565 |
+ eerror |
2566 |
+ return 1 |
2567 |
+ fi |
2568 |
+ fi |
2569 |
+ if [[ ! -z ${EGIT_COMMIT} ]]; then |
2570 |
+ eerror "Commits must now be specified using the environmental variables" |
2571 |
+ eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT" |
2572 |
+ eerror |
2573 |
+ return 1 |
2574 |
+ fi |
2575 |
+} |
2576 |
+ |
2577 |
+pkg_pretend() { |
2578 |
+ wine_build_environment_check || die |
2579 |
+ |
2580 |
+ # Verify OSS support |
2581 |
+ if use oss && ! use kernel_FreeBSD; then |
2582 |
+ if ! has_version ">=media-sound/oss-4"; then |
2583 |
+ eerror "You cannot build wine with USE=oss without having support from a" |
2584 |
+ eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)" |
2585 |
+ eerror |
2586 |
+ die |
2587 |
+ fi |
2588 |
+ fi |
2589 |
+} |
2590 |
+ |
2591 |
+pkg_setup() { |
2592 |
+ wine_build_environment_check || die |
2593 |
+ wine_env_vcs_vars || die |
2594 |
+ |
2595 |
+ WINE_VARIANT="${PN#wine}-${PV}" |
2596 |
+ WINE_VARIANT="${WINE_VARIANT#-}" |
2597 |
+ |
2598 |
+ MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}" |
2599 |
+ MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}" |
2600 |
+ MY_DATADIR="${MY_DATAROOTDIR}" |
2601 |
+ MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}" |
2602 |
+ MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}" |
2603 |
+ MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}" |
2604 |
+ MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}" |
2605 |
+ MY_MANDIR="${MY_DATADIR}/man" |
2606 |
+} |
2607 |
+ |
2608 |
+src_unpack() { |
2609 |
+ if [[ ${PV} == "9999" ]] ; then |
2610 |
+ EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack |
2611 |
+ if use staging; then |
2612 |
+ local CURRENT_WINE_COMMIT=${EGIT_VERSION} |
2613 |
+ |
2614 |
+ git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}" |
2615 |
+ git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}" |
2616 |
+ |
2617 |
+ local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die |
2618 |
+ |
2619 |
+ if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then |
2620 |
+ einfo "The current Staging patchset is not guaranteed to apply on this WINE commit." |
2621 |
+ einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT." |
2622 |
+ einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine" |
2623 |
+ fi |
2624 |
+ fi |
2625 |
+ if use d3d9; then |
2626 |
+ git-r3_fetch "${D3D9_EGIT_REPO_URI}" "${D3D9_COMMIT}" |
2627 |
+ git-r3_checkout "${D3D9_EGIT_REPO_URI}" "${D3D9_DIR}" |
2628 |
+ fi |
2629 |
+ fi |
2630 |
+ |
2631 |
+ default |
2632 |
+ |
2633 |
+ l10n_find_plocales_changes "${S}/po" "" ".po" |
2634 |
+} |
2635 |
+ |
2636 |
+src_prepare() { |
2637 |
+ local md5="$(md5sum server/protocol.def)" |
2638 |
+ local PATCHES=( |
2639 |
+ "${FILESDIR}"/${MY_PN}-1.5.26-winegcc.patch #260726 |
2640 |
+ "${FILESDIR}"/${MY_PN}-1.9.5-multilib-portage.patch #395615 |
2641 |
+ "${FILESDIR}"/${MY_PN}-1.7.12-osmesa-check.patch #429386 |
2642 |
+ "${FILESDIR}"/${MY_PN}-1.6-memset-O3.patch #480508 |
2643 |
+ "${FILESDIR}"/${MY_PN}-2.0-multislot-apploader.patch |
2644 |
+ ) |
2645 |
+ if use staging; then |
2646 |
+ ewarn "Applying the Wine-Staging patchset. Any bug reports to the" |
2647 |
+ ewarn "Wine bugzilla should explicitly state that staging was used." |
2648 |
+ |
2649 |
+ local STAGING_EXCLUDE="" |
2650 |
+ STAGING_EXCLUDE="${STAGING_EXCLUDE} -W winhlp32-Flex_Workaround" # Avoid double patching https://bugs.winehq.org/show_bug.cgi?id=42132 |
2651 |
+ use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight" |
2652 |
+ |
2653 |
+ # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches |
2654 |
+ ebegin "Running Wine-Staging patch installer" |
2655 |
+ ( |
2656 |
+ set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE} |
2657 |
+ cd "${STAGING_DIR}/patches" |
2658 |
+ source "${STAGING_DIR}/patches/patchinstall.sh" |
2659 |
+ ) |
2660 |
+ eend $? || die "Failed to apply Wine-Staging patches" |
2661 |
+ fi |
2662 |
+ if use d3d9; then |
2663 |
+ if use staging; then |
2664 |
+ PATCHES+=( "${D3D9_DIR}/staging-helper.patch" ) |
2665 |
+ else |
2666 |
+ PATCHES+=( "${D3D9_DIR}/d3d9-helper.patch" ) |
2667 |
+ fi |
2668 |
+ PATCHES+=( "${D3D9_DIR}/wine-d3d9.patch" ) |
2669 |
+ fi |
2670 |
+ |
2671 |
+ default |
2672 |
+ eautoreconf |
2673 |
+ |
2674 |
+ # Modification of the server protocol requires regenerating the server requests |
2675 |
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then |
2676 |
+ einfo "server/protocol.def was patched; running tools/make_requests" |
2677 |
+ tools/make_requests || die #432348 |
2678 |
+ fi |
2679 |
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die |
2680 |
+ if ! use run-exes; then |
2681 |
+ sed -i '/^MimeType/d' loader/wine.desktop || die #117785 |
2682 |
+ fi |
2683 |
+ |
2684 |
+ # Edit wine.desktop to work for specific variant |
2685 |
+ sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die |
2686 |
+ |
2687 |
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652 |
2688 |
+ cp "${WORKDIR}/${WINE_DESKTOP_COMMON_P}/icons/oic_winlogo.ico" dlls/user32/resources/ || die |
2689 |
+ |
2690 |
+ l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS |
2691 |
+} |
2692 |
+ |
2693 |
+src_configure() { |
2694 |
+ wine_compiler_check || die |
2695 |
+ |
2696 |
+ export LDCONFIG=/bin/true |
2697 |
+ use custom-cflags || strip-flags |
2698 |
+ |
2699 |
+ multilib-minimal_src_configure |
2700 |
+} |
2701 |
+ |
2702 |
+multilib_src_configure() { |
2703 |
+ local myconf=( |
2704 |
+ --prefix="${MY_PREFIX}" |
2705 |
+ --datarootdir="${MY_DATAROOTDIR}" |
2706 |
+ --datadir="${MY_DATADIR}" |
2707 |
+ --docdir="${MY_DOCDIR}" |
2708 |
+ --includedir="${MY_INCLUDEDIR}" |
2709 |
+ --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}" |
2710 |
+ --libexecdir="${MY_LIBEXECDIR}" |
2711 |
+ --localstatedir="${MY_LOCALSTATEDIR}" |
2712 |
+ --mandir="${MY_MANDIR}" |
2713 |
+ --sysconfdir=/etc/wine |
2714 |
+ $(use_with alsa) |
2715 |
+ $(use_with capi) |
2716 |
+ $(use_with lcms cms) |
2717 |
+ $(use_with cups) |
2718 |
+ $(use_with ncurses curses) |
2719 |
+ $(use_with udisks dbus) |
2720 |
+ $(use_with fontconfig) |
2721 |
+ $(use_with ssl gnutls) |
2722 |
+ $(use_enable gecko mshtml) |
2723 |
+ $(use_with gphoto2 gphoto) |
2724 |
+ $(use_with gsm) |
2725 |
+ $(use_with gstreamer) |
2726 |
+ --without-hal |
2727 |
+ $(use_with jpeg) |
2728 |
+ $(use_with ldap) |
2729 |
+ $(use_enable mono mscoree) |
2730 |
+ $(use_with mp3 mpg123) |
2731 |
+ $(use_with netapi) |
2732 |
+ $(use_with nls gettext) |
2733 |
+ $(use_with openal) |
2734 |
+ $(use_with opencl) |
2735 |
+ $(use_with opengl) |
2736 |
+ $(use_with osmesa) |
2737 |
+ $(use_with oss) |
2738 |
+ $(use_with pcap) |
2739 |
+ $(use_with png) |
2740 |
+ $(use_with pulseaudio pulse) |
2741 |
+ $(use_with threads pthread) |
2742 |
+ $(use_with scanner sane) |
2743 |
+ $(use_enable test tests) |
2744 |
+ $(use_with truetype freetype) |
2745 |
+ $(use_with udev) |
2746 |
+ $(use_with v4l) |
2747 |
+ $(use_with X x) |
2748 |
+ $(use_with xcomposite) |
2749 |
+ $(use_with xinerama) |
2750 |
+ $(use_with xml) |
2751 |
+ $(use_with xml xslt) |
2752 |
+ ) |
2753 |
+ |
2754 |
+ use staging && myconf+=( |
2755 |
+ --with-xattr |
2756 |
+ $(use_with themes gtk3) |
2757 |
+ $(use_with vaapi va) |
2758 |
+ ) |
2759 |
+ use d3d9 && myconf+=( $(use_with d3d9 d3d9-nine) ) |
2760 |
+ |
2761 |
+ local PKG_CONFIG AR RANLIB |
2762 |
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038 |
2763 |
+ # set AR and RANLIB to make QA scripts happy; #483342 |
2764 |
+ tc-export PKG_CONFIG AR RANLIB |
2765 |
+ |
2766 |
+ if use amd64; then |
2767 |
+ if [[ ${ABI} == amd64 ]]; then |
2768 |
+ myconf+=( --enable-win64 ) |
2769 |
+ else |
2770 |
+ myconf+=( --disable-win64 ) |
2771 |
+ fi |
2772 |
+ |
2773 |
+ # Note: using --with-wine64 results in problems with multilib.eclass |
2774 |
+ # CC/LD hackery. We're using separate tools instead. |
2775 |
+ fi |
2776 |
+ |
2777 |
+ ECONF_SOURCE=${S} \ |
2778 |
+ econf "${myconf[@]}" |
2779 |
+ emake depend |
2780 |
+} |
2781 |
+ |
2782 |
+multilib_src_test() { |
2783 |
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader" |
2784 |
+ if [[ ${ABI} == x86 ]]; then |
2785 |
+ if [[ $(id -u) == 0 ]]; then |
2786 |
+ ewarn "Skipping tests since they cannot be run under the root user." |
2787 |
+ ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf" |
2788 |
+ return |
2789 |
+ fi |
2790 |
+ |
2791 |
+ WINEPREFIX="${T}/.wine-${ABI}" \ |
2792 |
+ Xemake test |
2793 |
+ fi |
2794 |
+} |
2795 |
+ |
2796 |
+multilib_src_install_all() { |
2797 |
+ local DOCS=( ANNOUNCE AUTHORS README ) |
2798 |
+ local l |
2799 |
+ add_locale_docs() { |
2800 |
+ local locale_doc="documentation/README.$1" |
2801 |
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} ) |
2802 |
+ } |
2803 |
+ l10n_for_each_locale_do add_locale_docs |
2804 |
+ |
2805 |
+ einstalldocs |
2806 |
+ prune_libtool_files --all |
2807 |
+ |
2808 |
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script |
2809 |
+ rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \ |
2810 |
+ "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die |
2811 |
+ fi |
2812 |
+ |
2813 |
+ # Remove wineconsole if neither backend is installed #551124 |
2814 |
+ if ! use X && ! use ncurses; then |
2815 |
+ rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die |
2816 |
+ rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die |
2817 |
+ rm_wineconsole() { |
2818 |
+ rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die |
2819 |
+ } |
2820 |
+ multilib_foreach_abi rm_wineconsole |
2821 |
+ fi |
2822 |
+ |
2823 |
+ use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055 |
2824 |
+ use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader} |
2825 |
+ |
2826 |
+ if use abi_x86_64 && ! use abi_x86_32; then |
2827 |
+ dosym "${MY_PREFIX}"/bin/wine{64,} # 404331 |
2828 |
+ dosym "${MY_PREFIX}"/bin/wine{64,}-preloader |
2829 |
+ fi |
2830 |
+ |
2831 |
+ # Make wrappers for binaries for handling multiple variants |
2832 |
+ # Note: wrappers instead of symlinks because some are shell which use basename |
2833 |
+ for b in "${D%/}${MY_PREFIX}"/bin/*; do |
2834 |
+ make_wrapper ${b##*/}-${WINE_VARIANT} "${MY_PREFIX}"/bin/${b##*/} |
2835 |
+ done |
2836 |
+ |
2837 |
+ # respect LINGUAS when installing man pages, #469418 |
2838 |
+ for l in de fr pl; do |
2839 |
+ use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}* |
2840 |
+ done |
2841 |
+ |
2842 |
+ for m in "${D%/}${MY_MANDIR}"/*/*; do |
2843 |
+ new_man=${m##*/} |
2844 |
+ new_man=${new_man%%.1} |
2845 |
+ newman "${m}" ${new_man##*/}-${WINE_VARIANT}.1 |
2846 |
+ done |
2847 |
+} |
2848 |
+ |
2849 |
+pkg_postinst() { |
2850 |
+ eselect wine register ${P} |
2851 |
+ if [[ ${PN} == "wine-vanilla" ]]; then |
2852 |
+ eselect wine register --vanilla ${P} || die |
2853 |
+ else |
2854 |
+ if use staging; then |
2855 |
+ eselect wine register --staging ${P} || die |
2856 |
+ fi |
2857 |
+ if use d3d9; then |
2858 |
+ eselect wine register --d3d9 ${P} || die |
2859 |
+ fi |
2860 |
+ fi |
2861 |
+ |
2862 |
+ eselect wine update --all --if-unset || die |
2863 |
+ |
2864 |
+ fdo-mime_desktop_database_update |
2865 |
+ |
2866 |
+ if ! use gecko; then |
2867 |
+ ewarn "Without Wine Gecko, wine prefixes will not have a default" |
2868 |
+ ewarn "implementation of iexplore. Many older windows applications" |
2869 |
+ ewarn "rely upon the existence of an iexplore implementation, so" |
2870 |
+ ewarn "you will likely need to install an external one, like via winetricks" |
2871 |
+ fi |
2872 |
+ if ! use mono; then |
2873 |
+ ewarn "Without Wine Mono, wine prefixes will not have a default" |
2874 |
+ ewarn "implementation of .NET. Many windows applications rely upon" |
2875 |
+ ewarn "the existence of a .NET implementation, so you will likely need" |
2876 |
+ ewarn "to install an external one, like via winetricks" |
2877 |
+ fi |
2878 |
+} |
2879 |
+ |
2880 |
+pkg_prerm() { |
2881 |
+ eselect wine deregister ${P} |
2882 |
+ if [[ ${PN} == "wine-vanilla" ]]; then |
2883 |
+ eselect wine deregister --vanilla ${P} || die |
2884 |
+ else |
2885 |
+ if use staging; then |
2886 |
+ eselect wine deregister --staging ${P} || die |
2887 |
+ fi |
2888 |
+ if use d3d9; then |
2889 |
+ eselect wine deregister --d3d9 ${P} || die |
2890 |
+ fi |
2891 |
+ fi |
2892 |
+ |
2893 |
+ eselect wine update --all --if-unset || die |
2894 |
+} |
2895 |
+ |
2896 |
+pkg_postrm() { |
2897 |
+ fdo-mime_desktop_database_update |
2898 |
+} |
2899 |
|
2900 |
diff --git a/app-emulation/wine-any/wine-any-2.4.ebuild b/app-emulation/wine-any/wine-any-2.4.ebuild |
2901 |
new file mode 100644 |
2902 |
index 00000000000..35211f1a29b |
2903 |
--- /dev/null |
2904 |
+++ b/app-emulation/wine-any/wine-any-2.4.ebuild |
2905 |
@@ -0,0 +1,615 @@ |
2906 |
+# Copyright 1999-2017 Gentoo Foundation |
2907 |
+# Distributed under the terms of the GNU General Public License v2 |
2908 |
+ |
2909 |
+EAPI=6 |
2910 |
+ |
2911 |
+PLOCALES="ar bg ca cs da de el en en_US eo es fa fi fr he hi hr hu it ja ko lt ml nb_NO nl or pa pl pt_BR pt_PT rm ro ru sk sl sr_RS@cyrillic sr_RS@latin sv te th tr uk wa zh_CN zh_TW" |
2912 |
+PLOCALE_BACKUP="en" |
2913 |
+ |
2914 |
+inherit autotools eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator |
2915 |
+ |
2916 |
+MY_PN="${PN%%-*}" |
2917 |
+MY_P="${MY_PN}-${PV}" |
2918 |
+ |
2919 |
+if [[ ${PV} == "9999" ]] ; then |
2920 |
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git" |
2921 |
+ EGIT_BRANCH="master" |
2922 |
+ inherit git-r3 |
2923 |
+ SRC_URI="" |
2924 |
+ #KEYWORDS="" |
2925 |
+else |
2926 |
+ MAJOR_V=$(get_version_component_range 1) |
2927 |
+ SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz" |
2928 |
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" |
2929 |
+fi |
2930 |
+S="${WORKDIR}/${MY_P}" |
2931 |
+ |
2932 |
+STAGING_P="wine-staging-${PV}" |
2933 |
+STAGING_DIR="${WORKDIR}/${STAGING_P}" |
2934 |
+D3D9_P="wine-d3d9-${PV}" |
2935 |
+D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}" |
2936 |
+WDC_V="20150204" |
2937 |
+WINE_DESKTOP_COMMON_P="wine-desktop-common-${WDC_V}" |
2938 |
+ |
2939 |
+DESCRIPTION="Free implementation of Windows(tm) on Unix" |
2940 |
+HOMEPAGE="http://www.winehq.org/" |
2941 |
+SRC_URI="${SRC_URI} |
2942 |
+ https://github.com/NP-Hardass/wine-desktop-common/archive/${WDC_V}.tar.gz -> ${WINE_DESKTOP_COMMON_P}.tar.gz |
2943 |
+" |
2944 |
+ |
2945 |
+if [[ ${PV} == "9999" ]] ; then |
2946 |
+ STAGING_EGIT_REPO_URI="git://github.com/wine-compholio/wine-staging.git" |
2947 |
+ D3D9_EGIT_REPO_URI="git://github.com/sarnex/wine-d3d9-patches.git" |
2948 |
+else |
2949 |
+ SRC_URI="${SRC_URI} |
2950 |
+ staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz ) |
2951 |
+ d3d9? ( https://github.com/sarnex/wine-d3d9-patches/archive/${D3D9_P}.tar.gz )" |
2952 |
+fi |
2953 |
+ |
2954 |
+LICENSE="LGPL-2.1" |
2955 |
+SLOT="${PV}" |
2956 |
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags d3d9 dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg kernel_FreeBSD +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl pcap pipelight +png prelink pulseaudio +realtime +run-exes s3tc samba scanner selinux +ssl staging test themes +threads +truetype udev +udisks v4l vaapi +X +xcomposite xinerama +xml" |
2957 |
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) |
2958 |
+ X? ( truetype ) |
2959 |
+ elibc_glibc? ( threads ) |
2960 |
+ osmesa? ( opengl ) |
2961 |
+ pipelight? ( staging ) |
2962 |
+ s3tc? ( staging ) |
2963 |
+ test? ( abi_x86_32 ) |
2964 |
+ themes? ( staging ) |
2965 |
+ vaapi? ( staging )" # osmesa-opengl #286560 # X-truetype #551124 |
2966 |
+ |
2967 |
+# FIXME: the test suite is unsuitable for us; many tests require net access |
2968 |
+# or fail due to Xvfb's opengl limitations. |
2969 |
+RESTRICT="test" |
2970 |
+ |
2971 |
+COMMON_DEPEND=" |
2972 |
+ X? ( |
2973 |
+ x11-libs/libXcursor[${MULTILIB_USEDEP}] |
2974 |
+ x11-libs/libXext[${MULTILIB_USEDEP}] |
2975 |
+ x11-libs/libXrandr[${MULTILIB_USEDEP}] |
2976 |
+ x11-libs/libXi[${MULTILIB_USEDEP}] |
2977 |
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}] |
2978 |
+ ) |
2979 |
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) |
2980 |
+ capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] ) |
2981 |
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] ) |
2982 |
+ d3d9? ( |
2983 |
+ media-libs/mesa[d3d9,egl,${MULTILIB_USEDEP}] |
2984 |
+ x11-libs/libX11[${MULTILIB_USEDEP}] |
2985 |
+ x11-libs/libXext[${MULTILIB_USEDEP}] |
2986 |
+ x11-libs/libxcb[${MULTILIB_USEDEP}] |
2987 |
+ ) |
2988 |
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] ) |
2989 |
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) |
2990 |
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] ) |
2991 |
+ gstreamer? ( |
2992 |
+ media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] |
2993 |
+ media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] |
2994 |
+ ) |
2995 |
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] ) |
2996 |
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] ) |
2997 |
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) |
2998 |
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] ) |
2999 |
+ ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] ) |
3000 |
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] ) |
3001 |
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] ) |
3002 |
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] ) |
3003 |
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] ) |
3004 |
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) |
3005 |
+ opengl? ( |
3006 |
+ virtual/glu[${MULTILIB_USEDEP}] |
3007 |
+ virtual/opengl[${MULTILIB_USEDEP}] |
3008 |
+ ) |
3009 |
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] ) |
3010 |
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) |
3011 |
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) |
3012 |
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] ) |
3013 |
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] ) |
3014 |
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) |
3015 |
+ staging? ( sys-apps/attr[${MULTILIB_USEDEP}] ) |
3016 |
+ themes? ( |
3017 |
+ dev-libs/glib:2[${MULTILIB_USEDEP}] |
3018 |
+ x11-libs/cairo[${MULTILIB_USEDEP}] |
3019 |
+ x11-libs/gtk+:3[${MULTILIB_USEDEP}] |
3020 |
+ ) |
3021 |
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] ) |
3022 |
+ udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) |
3023 |
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) |
3024 |
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) |
3025 |
+ vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] ) |
3026 |
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) |
3027 |
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) |
3028 |
+ xml? ( |
3029 |
+ dev-libs/libxml2[${MULTILIB_USEDEP}] |
3030 |
+ dev-libs/libxslt[${MULTILIB_USEDEP}] |
3031 |
+ ) |
3032 |
+ abi_x86_32? ( |
3033 |
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] |
3034 |
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14 |
3035 |
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)] |
3036 |
+ !<app-emulation/emul-linux-x86-db-20140508-r3 |
3037 |
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] |
3038 |
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6 |
3039 |
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] |
3040 |
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1 |
3041 |
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)] |
3042 |
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1 |
3043 |
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] |
3044 |
+ !<app-emulation/emul-linux-x86-soundlibs-20140508 |
3045 |
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] |
3046 |
+ !<app-emulation/emul-linux-x86-xlibs-20140508 |
3047 |
+ )" |
3048 |
+ |
3049 |
+RDEPEND="${COMMON_DEPEND} |
3050 |
+ app-emulation/wine-desktop-common |
3051 |
+ >app-eselect/eselect-wine-0.3 |
3052 |
+ !app-emulation/wine:0 |
3053 |
+ dos? ( >=games-emulation/dosbox-0.74_p20160629 ) |
3054 |
+ gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] ) |
3055 |
+ mono? ( app-emulation/wine-mono:4.7.0 ) |
3056 |
+ perl? ( |
3057 |
+ dev-lang/perl |
3058 |
+ dev-perl/XML-Simple |
3059 |
+ ) |
3060 |
+ pulseaudio? ( |
3061 |
+ realtime? ( sys-auth/rtkit ) |
3062 |
+ ) |
3063 |
+ s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] ) |
3064 |
+ samba? ( >=net-fs/samba-3.0.25[winbind] ) |
3065 |
+ selinux? ( sec-policy/selinux-wine ) |
3066 |
+ udisks? ( sys-fs/udisks:2 )" |
3067 |
+ |
3068 |
+# tools/make_requests requires perl |
3069 |
+DEPEND="${COMMON_DEPEND} |
3070 |
+ sys-devel/flex |
3071 |
+ >=sys-kernel/linux-headers-2.6 |
3072 |
+ virtual/pkgconfig |
3073 |
+ virtual/yacc |
3074 |
+ X? ( |
3075 |
+ x11-proto/inputproto |
3076 |
+ x11-proto/xextproto |
3077 |
+ x11-proto/xf86vidmodeproto |
3078 |
+ ) |
3079 |
+ prelink? ( sys-devel/prelink ) |
3080 |
+ staging? ( |
3081 |
+ dev-lang/perl |
3082 |
+ dev-perl/XML-Simple |
3083 |
+ ) |
3084 |
+ xinerama? ( x11-proto/xineramaproto )" |
3085 |
+ |
3086 |
+# These use a non-standard "Wine" category, which is provided by |
3087 |
+# /etc/xdg/applications-merged/wine.menu |
3088 |
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop |
3089 |
+usr/share/applications/wine-notepad.desktop |
3090 |
+usr/share/applications/wine-uninstaller.desktop |
3091 |
+usr/share/applications/wine-winecfg.desktop" |
3092 |
+ |
3093 |
+wine_compiler_check() { |
3094 |
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
3095 |
+ |
3096 |
+ # GCC-specific bugs |
3097 |
+ if tc-is-gcc; then |
3098 |
+ # bug #549768 |
3099 |
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then |
3100 |
+ ebegin "Checking for gcc-5 ms_abi compiler bug" |
3101 |
+ $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die |
3102 |
+ # Run in subshell to prevent "Aborted" message |
3103 |
+ ( "${T}"/pr66838 || false ) >/dev/null 2>&1 |
3104 |
+ if ! eend $?; then |
3105 |
+ eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0" |
3106 |
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild," |
3107 |
+ eerror "or use gcc-config to select a different compiler version." |
3108 |
+ eerror "See https://bugs.gentoo.org/549768" |
3109 |
+ eerror |
3110 |
+ return 1 |
3111 |
+ fi |
3112 |
+ fi |
3113 |
+ # bug #574044 |
3114 |
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then |
3115 |
+ ebegin "Checking for gcc-5-3 stack realignment compiler bug" |
3116 |
+ # Compile in subshell to prevent "Aborted" message |
3117 |
+ ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${FILESDIR}"/pr69140.c -o "${T}"/pr69140 ) >/dev/null 2>&1 |
3118 |
+ if ! eend $?; then |
3119 |
+ eerror "Wine cannot be built with this version of gcc-5.3" |
3120 |
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild," |
3121 |
+ eerror "or use gcc-config to select a different compiler version." |
3122 |
+ eerror "See https://bugs.gentoo.org/574044" |
3123 |
+ eerror |
3124 |
+ return 1 |
3125 |
+ fi |
3126 |
+ fi |
3127 |
+ fi |
3128 |
+ |
3129 |
+ # Ensure compiler support |
3130 |
+ if use abi_x86_64; then |
3131 |
+ ebegin "Checking for 64-bit compiler with builtin_ms_va_list support" |
3132 |
+ # Compile in subshell to prevent "Aborted" message |
3133 |
+ ( $(tc-getCC) -O2 "${FILESDIR}"/builtin_ms_va_list.c -o "${T}"/builtin_ms_va_list >/dev/null 2>&1) |
3134 |
+ if ! eend $?; then |
3135 |
+ eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine" |
3136 |
+ eerror |
3137 |
+ eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine" |
3138 |
+ eerror |
3139 |
+ return 1 |
3140 |
+ fi |
3141 |
+ fi |
3142 |
+} |
3143 |
+ |
3144 |
+wine_build_environment_check() { |
3145 |
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
3146 |
+ |
3147 |
+ if use abi_x86_64; then |
3148 |
+ if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then |
3149 |
+ eerror "You need gcc-4.4+ to compile 64-bit wine" |
3150 |
+ die |
3151 |
+ elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then |
3152 |
+ eerror "You need clang-3.8+ to compile 64-bit wine" |
3153 |
+ die |
3154 |
+ fi |
3155 |
+ fi |
3156 |
+ if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then |
3157 |
+ ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by" |
3158 |
+ ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in" |
3159 |
+ ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4" |
3160 |
+ fi |
3161 |
+ if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then |
3162 |
+ if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then |
3163 |
+ ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work" |
3164 |
+ ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine." |
3165 |
+ ewarn "See package.env in man 5 portage for more information on how to do this." |
3166 |
+ ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details" |
3167 |
+ fi |
3168 |
+ fi |
3169 |
+ |
3170 |
+ if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then |
3171 |
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only." |
3172 |
+ eerror "See https://bugs.gentoo.org/487864 for more details." |
3173 |
+ eerror |
3174 |
+ return 1 |
3175 |
+ fi |
3176 |
+} |
3177 |
+ |
3178 |
+wine_env_vcs_vars() { |
3179 |
+ local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT" |
3180 |
+ local pn_live_val="${pn_live_var}" |
3181 |
+ eval pn_live_val='$'${pn_live_val} |
3182 |
+ if [[ ! -z ${pn_live_val} ]]; then |
3183 |
+ if use staging || use d3d9; then |
3184 |
+ eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}" |
3185 |
+ eerror "cannot be used to set the commit. Instead, you may use the" |
3186 |
+ eerror "environmental variables WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT." |
3187 |
+ eerror |
3188 |
+ return 1 |
3189 |
+ fi |
3190 |
+ fi |
3191 |
+ if [[ ! -z ${EGIT_COMMIT} ]]; then |
3192 |
+ eerror "Commits must now be specified using the environmental variables" |
3193 |
+ eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT" |
3194 |
+ eerror |
3195 |
+ return 1 |
3196 |
+ fi |
3197 |
+} |
3198 |
+ |
3199 |
+pkg_pretend() { |
3200 |
+ wine_build_environment_check || die |
3201 |
+ |
3202 |
+ # Verify OSS support |
3203 |
+ if use oss && ! use kernel_FreeBSD; then |
3204 |
+ if ! has_version ">=media-sound/oss-4"; then |
3205 |
+ eerror "You cannot build wine with USE=oss without having support from a" |
3206 |
+ eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)" |
3207 |
+ eerror |
3208 |
+ die |
3209 |
+ fi |
3210 |
+ fi |
3211 |
+} |
3212 |
+ |
3213 |
+pkg_setup() { |
3214 |
+ wine_build_environment_check || die |
3215 |
+ wine_env_vcs_vars || die |
3216 |
+ |
3217 |
+ WINE_VARIANT="${PN#wine}-${PV}" |
3218 |
+ WINE_VARIANT="${WINE_VARIANT#-}" |
3219 |
+ |
3220 |
+ MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}" |
3221 |
+ MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}" |
3222 |
+ MY_DATADIR="${MY_DATAROOTDIR}" |
3223 |
+ MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}" |
3224 |
+ MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}" |
3225 |
+ MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}" |
3226 |
+ MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}" |
3227 |
+ MY_MANDIR="${MY_DATADIR}/man" |
3228 |
+} |
3229 |
+ |
3230 |
+src_unpack() { |
3231 |
+ if [[ ${PV} == "9999" ]] ; then |
3232 |
+ EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack |
3233 |
+ if use staging; then |
3234 |
+ local CURRENT_WINE_COMMIT=${EGIT_VERSION} |
3235 |
+ |
3236 |
+ git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}" |
3237 |
+ git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}" |
3238 |
+ |
3239 |
+ local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die |
3240 |
+ |
3241 |
+ if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then |
3242 |
+ einfo "The current Staging patchset is not guaranteed to apply on this WINE commit." |
3243 |
+ einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT." |
3244 |
+ einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine" |
3245 |
+ fi |
3246 |
+ fi |
3247 |
+ if use d3d9; then |
3248 |
+ git-r3_fetch "${D3D9_EGIT_REPO_URI}" "${D3D9_COMMIT}" |
3249 |
+ git-r3_checkout "${D3D9_EGIT_REPO_URI}" "${D3D9_DIR}" |
3250 |
+ fi |
3251 |
+ fi |
3252 |
+ |
3253 |
+ default |
3254 |
+ |
3255 |
+ l10n_find_plocales_changes "${S}/po" "" ".po" |
3256 |
+} |
3257 |
+ |
3258 |
+src_prepare() { |
3259 |
+ local md5="$(md5sum server/protocol.def)" |
3260 |
+ local PATCHES=( |
3261 |
+ "${FILESDIR}"/${MY_PN}-1.5.26-winegcc.patch #260726 |
3262 |
+ "${FILESDIR}"/${MY_PN}-1.9.5-multilib-portage.patch #395615 |
3263 |
+ "${FILESDIR}"/${MY_PN}-1.7.12-osmesa-check.patch #429386 |
3264 |
+ "${FILESDIR}"/${MY_PN}-1.6-memset-O3.patch #480508 |
3265 |
+ "${FILESDIR}"/${MY_PN}-2.0-multislot-apploader.patch |
3266 |
+ ) |
3267 |
+ if use staging; then |
3268 |
+ ewarn "Applying the Wine-Staging patchset. Any bug reports to the" |
3269 |
+ ewarn "Wine bugzilla should explicitly state that staging was used." |
3270 |
+ |
3271 |
+ local STAGING_EXCLUDE="" |
3272 |
+ STAGING_EXCLUDE="${STAGING_EXCLUDE} -W winhlp32-Flex_Workaround" # Avoid double patching https://bugs.winehq.org/show_bug.cgi?id=42132 |
3273 |
+ use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight" |
3274 |
+ |
3275 |
+ # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches |
3276 |
+ ebegin "Running Wine-Staging patch installer" |
3277 |
+ ( |
3278 |
+ set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE} |
3279 |
+ cd "${STAGING_DIR}/patches" |
3280 |
+ source "${STAGING_DIR}/patches/patchinstall.sh" |
3281 |
+ ) |
3282 |
+ eend $? || die "Failed to apply Wine-Staging patches" |
3283 |
+ fi |
3284 |
+ if use d3d9; then |
3285 |
+ if use staging; then |
3286 |
+ PATCHES+=( "${D3D9_DIR}/staging-helper.patch" ) |
3287 |
+ else |
3288 |
+ PATCHES+=( "${D3D9_DIR}/d3d9-helper.patch" ) |
3289 |
+ fi |
3290 |
+ PATCHES+=( "${D3D9_DIR}/wine-d3d9.patch" ) |
3291 |
+ fi |
3292 |
+ |
3293 |
+ default |
3294 |
+ eautoreconf |
3295 |
+ |
3296 |
+ # Modification of the server protocol requires regenerating the server requests |
3297 |
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then |
3298 |
+ einfo "server/protocol.def was patched; running tools/make_requests" |
3299 |
+ tools/make_requests || die #432348 |
3300 |
+ fi |
3301 |
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die |
3302 |
+ if ! use run-exes; then |
3303 |
+ sed -i '/^MimeType/d' loader/wine.desktop || die #117785 |
3304 |
+ fi |
3305 |
+ |
3306 |
+ # Edit wine.desktop to work for specific variant |
3307 |
+ sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die |
3308 |
+ |
3309 |
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652 |
3310 |
+ cp "${WORKDIR}/${WINE_DESKTOP_COMMON_P}/icons/oic_winlogo.ico" dlls/user32/resources/ || die |
3311 |
+ |
3312 |
+ l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS |
3313 |
+} |
3314 |
+ |
3315 |
+src_configure() { |
3316 |
+ wine_compiler_check || die |
3317 |
+ |
3318 |
+ export LDCONFIG=/bin/true |
3319 |
+ use custom-cflags || strip-flags |
3320 |
+ |
3321 |
+ multilib-minimal_src_configure |
3322 |
+} |
3323 |
+ |
3324 |
+multilib_src_configure() { |
3325 |
+ local myconf=( |
3326 |
+ --prefix="${MY_PREFIX}" |
3327 |
+ --datarootdir="${MY_DATAROOTDIR}" |
3328 |
+ --datadir="${MY_DATADIR}" |
3329 |
+ --docdir="${MY_DOCDIR}" |
3330 |
+ --includedir="${MY_INCLUDEDIR}" |
3331 |
+ --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}" |
3332 |
+ --libexecdir="${MY_LIBEXECDIR}" |
3333 |
+ --localstatedir="${MY_LOCALSTATEDIR}" |
3334 |
+ --mandir="${MY_MANDIR}" |
3335 |
+ --sysconfdir=/etc/wine |
3336 |
+ $(use_with alsa) |
3337 |
+ $(use_with capi) |
3338 |
+ $(use_with lcms cms) |
3339 |
+ $(use_with cups) |
3340 |
+ $(use_with ncurses curses) |
3341 |
+ $(use_with udisks dbus) |
3342 |
+ $(use_with fontconfig) |
3343 |
+ $(use_with ssl gnutls) |
3344 |
+ $(use_enable gecko mshtml) |
3345 |
+ $(use_with gphoto2 gphoto) |
3346 |
+ $(use_with gsm) |
3347 |
+ $(use_with gstreamer) |
3348 |
+ --without-hal |
3349 |
+ $(use_with jpeg) |
3350 |
+ $(use_with ldap) |
3351 |
+ $(use_enable mono mscoree) |
3352 |
+ $(use_with mp3 mpg123) |
3353 |
+ $(use_with netapi) |
3354 |
+ $(use_with nls gettext) |
3355 |
+ $(use_with openal) |
3356 |
+ $(use_with opencl) |
3357 |
+ $(use_with opengl) |
3358 |
+ $(use_with osmesa) |
3359 |
+ $(use_with oss) |
3360 |
+ $(use_with pcap) |
3361 |
+ $(use_with png) |
3362 |
+ $(use_with pulseaudio pulse) |
3363 |
+ $(use_with threads pthread) |
3364 |
+ $(use_with scanner sane) |
3365 |
+ $(use_enable test tests) |
3366 |
+ $(use_with truetype freetype) |
3367 |
+ $(use_with udev) |
3368 |
+ $(use_with v4l) |
3369 |
+ $(use_with X x) |
3370 |
+ $(use_with xcomposite) |
3371 |
+ $(use_with xinerama) |
3372 |
+ $(use_with xml) |
3373 |
+ $(use_with xml xslt) |
3374 |
+ ) |
3375 |
+ |
3376 |
+ use staging && myconf+=( |
3377 |
+ --with-xattr |
3378 |
+ $(use_with themes gtk3) |
3379 |
+ $(use_with vaapi va) |
3380 |
+ ) |
3381 |
+ use d3d9 && myconf+=( $(use_with d3d9 d3d9-nine) ) |
3382 |
+ |
3383 |
+ local PKG_CONFIG AR RANLIB |
3384 |
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038 |
3385 |
+ # set AR and RANLIB to make QA scripts happy; #483342 |
3386 |
+ tc-export PKG_CONFIG AR RANLIB |
3387 |
+ |
3388 |
+ if use amd64; then |
3389 |
+ if [[ ${ABI} == amd64 ]]; then |
3390 |
+ myconf+=( --enable-win64 ) |
3391 |
+ else |
3392 |
+ myconf+=( --disable-win64 ) |
3393 |
+ fi |
3394 |
+ |
3395 |
+ # Note: using --with-wine64 results in problems with multilib.eclass |
3396 |
+ # CC/LD hackery. We're using separate tools instead. |
3397 |
+ fi |
3398 |
+ |
3399 |
+ ECONF_SOURCE=${S} \ |
3400 |
+ econf "${myconf[@]}" |
3401 |
+ emake depend |
3402 |
+} |
3403 |
+ |
3404 |
+multilib_src_test() { |
3405 |
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader" |
3406 |
+ if [[ ${ABI} == x86 ]]; then |
3407 |
+ if [[ $(id -u) == 0 ]]; then |
3408 |
+ ewarn "Skipping tests since they cannot be run under the root user." |
3409 |
+ ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf" |
3410 |
+ return |
3411 |
+ fi |
3412 |
+ |
3413 |
+ WINEPREFIX="${T}/.wine-${ABI}" \ |
3414 |
+ Xemake test |
3415 |
+ fi |
3416 |
+} |
3417 |
+ |
3418 |
+multilib_src_install_all() { |
3419 |
+ local DOCS=( ANNOUNCE AUTHORS README ) |
3420 |
+ local l |
3421 |
+ add_locale_docs() { |
3422 |
+ local locale_doc="documentation/README.$1" |
3423 |
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} ) |
3424 |
+ } |
3425 |
+ l10n_for_each_locale_do add_locale_docs |
3426 |
+ |
3427 |
+ einstalldocs |
3428 |
+ prune_libtool_files --all |
3429 |
+ |
3430 |
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script |
3431 |
+ rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \ |
3432 |
+ "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die |
3433 |
+ fi |
3434 |
+ |
3435 |
+ # Remove wineconsole if neither backend is installed #551124 |
3436 |
+ if ! use X && ! use ncurses; then |
3437 |
+ rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die |
3438 |
+ rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die |
3439 |
+ rm_wineconsole() { |
3440 |
+ rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die |
3441 |
+ } |
3442 |
+ multilib_foreach_abi rm_wineconsole |
3443 |
+ fi |
3444 |
+ |
3445 |
+ use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055 |
3446 |
+ use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader} |
3447 |
+ |
3448 |
+ if use abi_x86_64 && ! use abi_x86_32; then |
3449 |
+ dosym "${MY_PREFIX}"/bin/wine{64,} # 404331 |
3450 |
+ dosym "${MY_PREFIX}"/bin/wine{64,}-preloader |
3451 |
+ fi |
3452 |
+ |
3453 |
+ # Make wrappers for binaries for handling multiple variants |
3454 |
+ # Note: wrappers instead of symlinks because some are shell which use basename |
3455 |
+ for b in "${D%/}${MY_PREFIX}"/bin/*; do |
3456 |
+ make_wrapper ${b##*/}-${WINE_VARIANT} "${MY_PREFIX}"/bin/${b##*/} |
3457 |
+ done |
3458 |
+ |
3459 |
+ # respect LINGUAS when installing man pages, #469418 |
3460 |
+ for l in de fr pl; do |
3461 |
+ use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}* |
3462 |
+ done |
3463 |
+ |
3464 |
+ for m in "${D%/}${MY_MANDIR}"/*/*; do |
3465 |
+ new_man=${m##*/} |
3466 |
+ new_man=${new_man%%.1} |
3467 |
+ newman "${m}" ${new_man##*/}-${WINE_VARIANT}.1 |
3468 |
+ done |
3469 |
+} |
3470 |
+ |
3471 |
+pkg_postinst() { |
3472 |
+ eselect wine register ${P} |
3473 |
+ if [[ ${PN} == "wine-vanilla" ]]; then |
3474 |
+ eselect wine register --vanilla ${P} || die |
3475 |
+ else |
3476 |
+ if use staging; then |
3477 |
+ eselect wine register --staging ${P} || die |
3478 |
+ fi |
3479 |
+ if use d3d9; then |
3480 |
+ eselect wine register --d3d9 ${P} || die |
3481 |
+ fi |
3482 |
+ fi |
3483 |
+ |
3484 |
+ eselect wine update --all --if-unset || die |
3485 |
+ |
3486 |
+ fdo-mime_desktop_database_update |
3487 |
+ |
3488 |
+ if ! use gecko; then |
3489 |
+ ewarn "Without Wine Gecko, wine prefixes will not have a default" |
3490 |
+ ewarn "implementation of iexplore. Many older windows applications" |
3491 |
+ ewarn "rely upon the existence of an iexplore implementation, so" |
3492 |
+ ewarn "you will likely need to install an external one, like via winetricks" |
3493 |
+ fi |
3494 |
+ if ! use mono; then |
3495 |
+ ewarn "Without Wine Mono, wine prefixes will not have a default" |
3496 |
+ ewarn "implementation of .NET. Many windows applications rely upon" |
3497 |
+ ewarn "the existence of a .NET implementation, so you will likely need" |
3498 |
+ ewarn "to install an external one, like via winetricks" |
3499 |
+ fi |
3500 |
+} |
3501 |
+ |
3502 |
+pkg_prerm() { |
3503 |
+ eselect wine deregister ${P} |
3504 |
+ if [[ ${PN} == "wine-vanilla" ]]; then |
3505 |
+ eselect wine deregister --vanilla ${P} || die |
3506 |
+ else |
3507 |
+ if use staging; then |
3508 |
+ eselect wine deregister --staging ${P} || die |
3509 |
+ fi |
3510 |
+ if use d3d9; then |
3511 |
+ eselect wine deregister --d3d9 ${P} || die |
3512 |
+ fi |
3513 |
+ fi |
3514 |
+ |
3515 |
+ eselect wine update --all --if-unset || die |
3516 |
+} |
3517 |
+ |
3518 |
+pkg_postrm() { |
3519 |
+ fdo-mime_desktop_database_update |
3520 |
+} |
3521 |
|
3522 |
diff --git a/app-emulation/wine-any/wine-any-9999.ebuild b/app-emulation/wine-any/wine-any-9999.ebuild |
3523 |
new file mode 100644 |
3524 |
index 00000000000..35211f1a29b |
3525 |
--- /dev/null |
3526 |
+++ b/app-emulation/wine-any/wine-any-9999.ebuild |
3527 |
@@ -0,0 +1,615 @@ |
3528 |
+# Copyright 1999-2017 Gentoo Foundation |
3529 |
+# Distributed under the terms of the GNU General Public License v2 |
3530 |
+ |
3531 |
+EAPI=6 |
3532 |
+ |
3533 |
+PLOCALES="ar bg ca cs da de el en en_US eo es fa fi fr he hi hr hu it ja ko lt ml nb_NO nl or pa pl pt_BR pt_PT rm ro ru sk sl sr_RS@cyrillic sr_RS@latin sv te th tr uk wa zh_CN zh_TW" |
3534 |
+PLOCALE_BACKUP="en" |
3535 |
+ |
3536 |
+inherit autotools eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator |
3537 |
+ |
3538 |
+MY_PN="${PN%%-*}" |
3539 |
+MY_P="${MY_PN}-${PV}" |
3540 |
+ |
3541 |
+if [[ ${PV} == "9999" ]] ; then |
3542 |
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git" |
3543 |
+ EGIT_BRANCH="master" |
3544 |
+ inherit git-r3 |
3545 |
+ SRC_URI="" |
3546 |
+ #KEYWORDS="" |
3547 |
+else |
3548 |
+ MAJOR_V=$(get_version_component_range 1) |
3549 |
+ SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz" |
3550 |
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" |
3551 |
+fi |
3552 |
+S="${WORKDIR}/${MY_P}" |
3553 |
+ |
3554 |
+STAGING_P="wine-staging-${PV}" |
3555 |
+STAGING_DIR="${WORKDIR}/${STAGING_P}" |
3556 |
+D3D9_P="wine-d3d9-${PV}" |
3557 |
+D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}" |
3558 |
+WDC_V="20150204" |
3559 |
+WINE_DESKTOP_COMMON_P="wine-desktop-common-${WDC_V}" |
3560 |
+ |
3561 |
+DESCRIPTION="Free implementation of Windows(tm) on Unix" |
3562 |
+HOMEPAGE="http://www.winehq.org/" |
3563 |
+SRC_URI="${SRC_URI} |
3564 |
+ https://github.com/NP-Hardass/wine-desktop-common/archive/${WDC_V}.tar.gz -> ${WINE_DESKTOP_COMMON_P}.tar.gz |
3565 |
+" |
3566 |
+ |
3567 |
+if [[ ${PV} == "9999" ]] ; then |
3568 |
+ STAGING_EGIT_REPO_URI="git://github.com/wine-compholio/wine-staging.git" |
3569 |
+ D3D9_EGIT_REPO_URI="git://github.com/sarnex/wine-d3d9-patches.git" |
3570 |
+else |
3571 |
+ SRC_URI="${SRC_URI} |
3572 |
+ staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz ) |
3573 |
+ d3d9? ( https://github.com/sarnex/wine-d3d9-patches/archive/${D3D9_P}.tar.gz )" |
3574 |
+fi |
3575 |
+ |
3576 |
+LICENSE="LGPL-2.1" |
3577 |
+SLOT="${PV}" |
3578 |
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags d3d9 dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg kernel_FreeBSD +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl pcap pipelight +png prelink pulseaudio +realtime +run-exes s3tc samba scanner selinux +ssl staging test themes +threads +truetype udev +udisks v4l vaapi +X +xcomposite xinerama +xml" |
3579 |
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) |
3580 |
+ X? ( truetype ) |
3581 |
+ elibc_glibc? ( threads ) |
3582 |
+ osmesa? ( opengl ) |
3583 |
+ pipelight? ( staging ) |
3584 |
+ s3tc? ( staging ) |
3585 |
+ test? ( abi_x86_32 ) |
3586 |
+ themes? ( staging ) |
3587 |
+ vaapi? ( staging )" # osmesa-opengl #286560 # X-truetype #551124 |
3588 |
+ |
3589 |
+# FIXME: the test suite is unsuitable for us; many tests require net access |
3590 |
+# or fail due to Xvfb's opengl limitations. |
3591 |
+RESTRICT="test" |
3592 |
+ |
3593 |
+COMMON_DEPEND=" |
3594 |
+ X? ( |
3595 |
+ x11-libs/libXcursor[${MULTILIB_USEDEP}] |
3596 |
+ x11-libs/libXext[${MULTILIB_USEDEP}] |
3597 |
+ x11-libs/libXrandr[${MULTILIB_USEDEP}] |
3598 |
+ x11-libs/libXi[${MULTILIB_USEDEP}] |
3599 |
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}] |
3600 |
+ ) |
3601 |
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) |
3602 |
+ capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] ) |
3603 |
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] ) |
3604 |
+ d3d9? ( |
3605 |
+ media-libs/mesa[d3d9,egl,${MULTILIB_USEDEP}] |
3606 |
+ x11-libs/libX11[${MULTILIB_USEDEP}] |
3607 |
+ x11-libs/libXext[${MULTILIB_USEDEP}] |
3608 |
+ x11-libs/libxcb[${MULTILIB_USEDEP}] |
3609 |
+ ) |
3610 |
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] ) |
3611 |
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) |
3612 |
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] ) |
3613 |
+ gstreamer? ( |
3614 |
+ media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] |
3615 |
+ media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] |
3616 |
+ ) |
3617 |
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] ) |
3618 |
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] ) |
3619 |
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) |
3620 |
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] ) |
3621 |
+ ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] ) |
3622 |
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] ) |
3623 |
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] ) |
3624 |
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] ) |
3625 |
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] ) |
3626 |
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) |
3627 |
+ opengl? ( |
3628 |
+ virtual/glu[${MULTILIB_USEDEP}] |
3629 |
+ virtual/opengl[${MULTILIB_USEDEP}] |
3630 |
+ ) |
3631 |
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] ) |
3632 |
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) |
3633 |
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) |
3634 |
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] ) |
3635 |
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] ) |
3636 |
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) |
3637 |
+ staging? ( sys-apps/attr[${MULTILIB_USEDEP}] ) |
3638 |
+ themes? ( |
3639 |
+ dev-libs/glib:2[${MULTILIB_USEDEP}] |
3640 |
+ x11-libs/cairo[${MULTILIB_USEDEP}] |
3641 |
+ x11-libs/gtk+:3[${MULTILIB_USEDEP}] |
3642 |
+ ) |
3643 |
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] ) |
3644 |
+ udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) |
3645 |
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) |
3646 |
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) |
3647 |
+ vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] ) |
3648 |
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) |
3649 |
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) |
3650 |
+ xml? ( |
3651 |
+ dev-libs/libxml2[${MULTILIB_USEDEP}] |
3652 |
+ dev-libs/libxslt[${MULTILIB_USEDEP}] |
3653 |
+ ) |
3654 |
+ abi_x86_32? ( |
3655 |
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] |
3656 |
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14 |
3657 |
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)] |
3658 |
+ !<app-emulation/emul-linux-x86-db-20140508-r3 |
3659 |
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] |
3660 |
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6 |
3661 |
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] |
3662 |
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1 |
3663 |
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)] |
3664 |
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1 |
3665 |
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] |
3666 |
+ !<app-emulation/emul-linux-x86-soundlibs-20140508 |
3667 |
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] |
3668 |
+ !<app-emulation/emul-linux-x86-xlibs-20140508 |
3669 |
+ )" |
3670 |
+ |
3671 |
+RDEPEND="${COMMON_DEPEND} |
3672 |
+ app-emulation/wine-desktop-common |
3673 |
+ >app-eselect/eselect-wine-0.3 |
3674 |
+ !app-emulation/wine:0 |
3675 |
+ dos? ( >=games-emulation/dosbox-0.74_p20160629 ) |
3676 |
+ gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] ) |
3677 |
+ mono? ( app-emulation/wine-mono:4.7.0 ) |
3678 |
+ perl? ( |
3679 |
+ dev-lang/perl |
3680 |
+ dev-perl/XML-Simple |
3681 |
+ ) |
3682 |
+ pulseaudio? ( |
3683 |
+ realtime? ( sys-auth/rtkit ) |
3684 |
+ ) |
3685 |
+ s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] ) |
3686 |
+ samba? ( >=net-fs/samba-3.0.25[winbind] ) |
3687 |
+ selinux? ( sec-policy/selinux-wine ) |
3688 |
+ udisks? ( sys-fs/udisks:2 )" |
3689 |
+ |
3690 |
+# tools/make_requests requires perl |
3691 |
+DEPEND="${COMMON_DEPEND} |
3692 |
+ sys-devel/flex |
3693 |
+ >=sys-kernel/linux-headers-2.6 |
3694 |
+ virtual/pkgconfig |
3695 |
+ virtual/yacc |
3696 |
+ X? ( |
3697 |
+ x11-proto/inputproto |
3698 |
+ x11-proto/xextproto |
3699 |
+ x11-proto/xf86vidmodeproto |
3700 |
+ ) |
3701 |
+ prelink? ( sys-devel/prelink ) |
3702 |
+ staging? ( |
3703 |
+ dev-lang/perl |
3704 |
+ dev-perl/XML-Simple |
3705 |
+ ) |
3706 |
+ xinerama? ( x11-proto/xineramaproto )" |
3707 |
+ |
3708 |
+# These use a non-standard "Wine" category, which is provided by |
3709 |
+# /etc/xdg/applications-merged/wine.menu |
3710 |
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop |
3711 |
+usr/share/applications/wine-notepad.desktop |
3712 |
+usr/share/applications/wine-uninstaller.desktop |
3713 |
+usr/share/applications/wine-winecfg.desktop" |
3714 |
+ |
3715 |
+wine_compiler_check() { |
3716 |
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
3717 |
+ |
3718 |
+ # GCC-specific bugs |
3719 |
+ if tc-is-gcc; then |
3720 |
+ # bug #549768 |
3721 |
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then |
3722 |
+ ebegin "Checking for gcc-5 ms_abi compiler bug" |
3723 |
+ $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die |
3724 |
+ # Run in subshell to prevent "Aborted" message |
3725 |
+ ( "${T}"/pr66838 || false ) >/dev/null 2>&1 |
3726 |
+ if ! eend $?; then |
3727 |
+ eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0" |
3728 |
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild," |
3729 |
+ eerror "or use gcc-config to select a different compiler version." |
3730 |
+ eerror "See https://bugs.gentoo.org/549768" |
3731 |
+ eerror |
3732 |
+ return 1 |
3733 |
+ fi |
3734 |
+ fi |
3735 |
+ # bug #574044 |
3736 |
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then |
3737 |
+ ebegin "Checking for gcc-5-3 stack realignment compiler bug" |
3738 |
+ # Compile in subshell to prevent "Aborted" message |
3739 |
+ ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${FILESDIR}"/pr69140.c -o "${T}"/pr69140 ) >/dev/null 2>&1 |
3740 |
+ if ! eend $?; then |
3741 |
+ eerror "Wine cannot be built with this version of gcc-5.3" |
3742 |
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild," |
3743 |
+ eerror "or use gcc-config to select a different compiler version." |
3744 |
+ eerror "See https://bugs.gentoo.org/574044" |
3745 |
+ eerror |
3746 |
+ return 1 |
3747 |
+ fi |
3748 |
+ fi |
3749 |
+ fi |
3750 |
+ |
3751 |
+ # Ensure compiler support |
3752 |
+ if use abi_x86_64; then |
3753 |
+ ebegin "Checking for 64-bit compiler with builtin_ms_va_list support" |
3754 |
+ # Compile in subshell to prevent "Aborted" message |
3755 |
+ ( $(tc-getCC) -O2 "${FILESDIR}"/builtin_ms_va_list.c -o "${T}"/builtin_ms_va_list >/dev/null 2>&1) |
3756 |
+ if ! eend $?; then |
3757 |
+ eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine" |
3758 |
+ eerror |
3759 |
+ eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine" |
3760 |
+ eerror |
3761 |
+ return 1 |
3762 |
+ fi |
3763 |
+ fi |
3764 |
+} |
3765 |
+ |
3766 |
+wine_build_environment_check() { |
3767 |
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
3768 |
+ |
3769 |
+ if use abi_x86_64; then |
3770 |
+ if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then |
3771 |
+ eerror "You need gcc-4.4+ to compile 64-bit wine" |
3772 |
+ die |
3773 |
+ elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then |
3774 |
+ eerror "You need clang-3.8+ to compile 64-bit wine" |
3775 |
+ die |
3776 |
+ fi |
3777 |
+ fi |
3778 |
+ if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then |
3779 |
+ ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by" |
3780 |
+ ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in" |
3781 |
+ ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4" |
3782 |
+ fi |
3783 |
+ if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then |
3784 |
+ if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then |
3785 |
+ ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work" |
3786 |
+ ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine." |
3787 |
+ ewarn "See package.env in man 5 portage for more information on how to do this." |
3788 |
+ ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details" |
3789 |
+ fi |
3790 |
+ fi |
3791 |
+ |
3792 |
+ if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then |
3793 |
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only." |
3794 |
+ eerror "See https://bugs.gentoo.org/487864 for more details." |
3795 |
+ eerror |
3796 |
+ return 1 |
3797 |
+ fi |
3798 |
+} |
3799 |
+ |
3800 |
+wine_env_vcs_vars() { |
3801 |
+ local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT" |
3802 |
+ local pn_live_val="${pn_live_var}" |
3803 |
+ eval pn_live_val='$'${pn_live_val} |
3804 |
+ if [[ ! -z ${pn_live_val} ]]; then |
3805 |
+ if use staging || use d3d9; then |
3806 |
+ eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}" |
3807 |
+ eerror "cannot be used to set the commit. Instead, you may use the" |
3808 |
+ eerror "environmental variables WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT." |
3809 |
+ eerror |
3810 |
+ return 1 |
3811 |
+ fi |
3812 |
+ fi |
3813 |
+ if [[ ! -z ${EGIT_COMMIT} ]]; then |
3814 |
+ eerror "Commits must now be specified using the environmental variables" |
3815 |
+ eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT" |
3816 |
+ eerror |
3817 |
+ return 1 |
3818 |
+ fi |
3819 |
+} |
3820 |
+ |
3821 |
+pkg_pretend() { |
3822 |
+ wine_build_environment_check || die |
3823 |
+ |
3824 |
+ # Verify OSS support |
3825 |
+ if use oss && ! use kernel_FreeBSD; then |
3826 |
+ if ! has_version ">=media-sound/oss-4"; then |
3827 |
+ eerror "You cannot build wine with USE=oss without having support from a" |
3828 |
+ eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)" |
3829 |
+ eerror |
3830 |
+ die |
3831 |
+ fi |
3832 |
+ fi |
3833 |
+} |
3834 |
+ |
3835 |
+pkg_setup() { |
3836 |
+ wine_build_environment_check || die |
3837 |
+ wine_env_vcs_vars || die |
3838 |
+ |
3839 |
+ WINE_VARIANT="${PN#wine}-${PV}" |
3840 |
+ WINE_VARIANT="${WINE_VARIANT#-}" |
3841 |
+ |
3842 |
+ MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}" |
3843 |
+ MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}" |
3844 |
+ MY_DATADIR="${MY_DATAROOTDIR}" |
3845 |
+ MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}" |
3846 |
+ MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}" |
3847 |
+ MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}" |
3848 |
+ MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}" |
3849 |
+ MY_MANDIR="${MY_DATADIR}/man" |
3850 |
+} |
3851 |
+ |
3852 |
+src_unpack() { |
3853 |
+ if [[ ${PV} == "9999" ]] ; then |
3854 |
+ EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack |
3855 |
+ if use staging; then |
3856 |
+ local CURRENT_WINE_COMMIT=${EGIT_VERSION} |
3857 |
+ |
3858 |
+ git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}" |
3859 |
+ git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}" |
3860 |
+ |
3861 |
+ local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die |
3862 |
+ |
3863 |
+ if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then |
3864 |
+ einfo "The current Staging patchset is not guaranteed to apply on this WINE commit." |
3865 |
+ einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT." |
3866 |
+ einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine" |
3867 |
+ fi |
3868 |
+ fi |
3869 |
+ if use d3d9; then |
3870 |
+ git-r3_fetch "${D3D9_EGIT_REPO_URI}" "${D3D9_COMMIT}" |
3871 |
+ git-r3_checkout "${D3D9_EGIT_REPO_URI}" "${D3D9_DIR}" |
3872 |
+ fi |
3873 |
+ fi |
3874 |
+ |
3875 |
+ default |
3876 |
+ |
3877 |
+ l10n_find_plocales_changes "${S}/po" "" ".po" |
3878 |
+} |
3879 |
+ |
3880 |
+src_prepare() { |
3881 |
+ local md5="$(md5sum server/protocol.def)" |
3882 |
+ local PATCHES=( |
3883 |
+ "${FILESDIR}"/${MY_PN}-1.5.26-winegcc.patch #260726 |
3884 |
+ "${FILESDIR}"/${MY_PN}-1.9.5-multilib-portage.patch #395615 |
3885 |
+ "${FILESDIR}"/${MY_PN}-1.7.12-osmesa-check.patch #429386 |
3886 |
+ "${FILESDIR}"/${MY_PN}-1.6-memset-O3.patch #480508 |
3887 |
+ "${FILESDIR}"/${MY_PN}-2.0-multislot-apploader.patch |
3888 |
+ ) |
3889 |
+ if use staging; then |
3890 |
+ ewarn "Applying the Wine-Staging patchset. Any bug reports to the" |
3891 |
+ ewarn "Wine bugzilla should explicitly state that staging was used." |
3892 |
+ |
3893 |
+ local STAGING_EXCLUDE="" |
3894 |
+ STAGING_EXCLUDE="${STAGING_EXCLUDE} -W winhlp32-Flex_Workaround" # Avoid double patching https://bugs.winehq.org/show_bug.cgi?id=42132 |
3895 |
+ use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight" |
3896 |
+ |
3897 |
+ # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches |
3898 |
+ ebegin "Running Wine-Staging patch installer" |
3899 |
+ ( |
3900 |
+ set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE} |
3901 |
+ cd "${STAGING_DIR}/patches" |
3902 |
+ source "${STAGING_DIR}/patches/patchinstall.sh" |
3903 |
+ ) |
3904 |
+ eend $? || die "Failed to apply Wine-Staging patches" |
3905 |
+ fi |
3906 |
+ if use d3d9; then |
3907 |
+ if use staging; then |
3908 |
+ PATCHES+=( "${D3D9_DIR}/staging-helper.patch" ) |
3909 |
+ else |
3910 |
+ PATCHES+=( "${D3D9_DIR}/d3d9-helper.patch" ) |
3911 |
+ fi |
3912 |
+ PATCHES+=( "${D3D9_DIR}/wine-d3d9.patch" ) |
3913 |
+ fi |
3914 |
+ |
3915 |
+ default |
3916 |
+ eautoreconf |
3917 |
+ |
3918 |
+ # Modification of the server protocol requires regenerating the server requests |
3919 |
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then |
3920 |
+ einfo "server/protocol.def was patched; running tools/make_requests" |
3921 |
+ tools/make_requests || die #432348 |
3922 |
+ fi |
3923 |
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die |
3924 |
+ if ! use run-exes; then |
3925 |
+ sed -i '/^MimeType/d' loader/wine.desktop || die #117785 |
3926 |
+ fi |
3927 |
+ |
3928 |
+ # Edit wine.desktop to work for specific variant |
3929 |
+ sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die |
3930 |
+ |
3931 |
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652 |
3932 |
+ cp "${WORKDIR}/${WINE_DESKTOP_COMMON_P}/icons/oic_winlogo.ico" dlls/user32/resources/ || die |
3933 |
+ |
3934 |
+ l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS |
3935 |
+} |
3936 |
+ |
3937 |
+src_configure() { |
3938 |
+ wine_compiler_check || die |
3939 |
+ |
3940 |
+ export LDCONFIG=/bin/true |
3941 |
+ use custom-cflags || strip-flags |
3942 |
+ |
3943 |
+ multilib-minimal_src_configure |
3944 |
+} |
3945 |
+ |
3946 |
+multilib_src_configure() { |
3947 |
+ local myconf=( |
3948 |
+ --prefix="${MY_PREFIX}" |
3949 |
+ --datarootdir="${MY_DATAROOTDIR}" |
3950 |
+ --datadir="${MY_DATADIR}" |
3951 |
+ --docdir="${MY_DOCDIR}" |
3952 |
+ --includedir="${MY_INCLUDEDIR}" |
3953 |
+ --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}" |
3954 |
+ --libexecdir="${MY_LIBEXECDIR}" |
3955 |
+ --localstatedir="${MY_LOCALSTATEDIR}" |
3956 |
+ --mandir="${MY_MANDIR}" |
3957 |
+ --sysconfdir=/etc/wine |
3958 |
+ $(use_with alsa) |
3959 |
+ $(use_with capi) |
3960 |
+ $(use_with lcms cms) |
3961 |
+ $(use_with cups) |
3962 |
+ $(use_with ncurses curses) |
3963 |
+ $(use_with udisks dbus) |
3964 |
+ $(use_with fontconfig) |
3965 |
+ $(use_with ssl gnutls) |
3966 |
+ $(use_enable gecko mshtml) |
3967 |
+ $(use_with gphoto2 gphoto) |
3968 |
+ $(use_with gsm) |
3969 |
+ $(use_with gstreamer) |
3970 |
+ --without-hal |
3971 |
+ $(use_with jpeg) |
3972 |
+ $(use_with ldap) |
3973 |
+ $(use_enable mono mscoree) |
3974 |
+ $(use_with mp3 mpg123) |
3975 |
+ $(use_with netapi) |
3976 |
+ $(use_with nls gettext) |
3977 |
+ $(use_with openal) |
3978 |
+ $(use_with opencl) |
3979 |
+ $(use_with opengl) |
3980 |
+ $(use_with osmesa) |
3981 |
+ $(use_with oss) |
3982 |
+ $(use_with pcap) |
3983 |
+ $(use_with png) |
3984 |
+ $(use_with pulseaudio pulse) |
3985 |
+ $(use_with threads pthread) |
3986 |
+ $(use_with scanner sane) |
3987 |
+ $(use_enable test tests) |
3988 |
+ $(use_with truetype freetype) |
3989 |
+ $(use_with udev) |
3990 |
+ $(use_with v4l) |
3991 |
+ $(use_with X x) |
3992 |
+ $(use_with xcomposite) |
3993 |
+ $(use_with xinerama) |
3994 |
+ $(use_with xml) |
3995 |
+ $(use_with xml xslt) |
3996 |
+ ) |
3997 |
+ |
3998 |
+ use staging && myconf+=( |
3999 |
+ --with-xattr |
4000 |
+ $(use_with themes gtk3) |
4001 |
+ $(use_with vaapi va) |
4002 |
+ ) |
4003 |
+ use d3d9 && myconf+=( $(use_with d3d9 d3d9-nine) ) |
4004 |
+ |
4005 |
+ local PKG_CONFIG AR RANLIB |
4006 |
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038 |
4007 |
+ # set AR and RANLIB to make QA scripts happy; #483342 |
4008 |
+ tc-export PKG_CONFIG AR RANLIB |
4009 |
+ |
4010 |
+ if use amd64; then |
4011 |
+ if [[ ${ABI} == amd64 ]]; then |
4012 |
+ myconf+=( --enable-win64 ) |
4013 |
+ else |
4014 |
+ myconf+=( --disable-win64 ) |
4015 |
+ fi |
4016 |
+ |
4017 |
+ # Note: using --with-wine64 results in problems with multilib.eclass |
4018 |
+ # CC/LD hackery. We're using separate tools instead. |
4019 |
+ fi |
4020 |
+ |
4021 |
+ ECONF_SOURCE=${S} \ |
4022 |
+ econf "${myconf[@]}" |
4023 |
+ emake depend |
4024 |
+} |
4025 |
+ |
4026 |
+multilib_src_test() { |
4027 |
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader" |
4028 |
+ if [[ ${ABI} == x86 ]]; then |
4029 |
+ if [[ $(id -u) == 0 ]]; then |
4030 |
+ ewarn "Skipping tests since they cannot be run under the root user." |
4031 |
+ ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf" |
4032 |
+ return |
4033 |
+ fi |
4034 |
+ |
4035 |
+ WINEPREFIX="${T}/.wine-${ABI}" \ |
4036 |
+ Xemake test |
4037 |
+ fi |
4038 |
+} |
4039 |
+ |
4040 |
+multilib_src_install_all() { |
4041 |
+ local DOCS=( ANNOUNCE AUTHORS README ) |
4042 |
+ local l |
4043 |
+ add_locale_docs() { |
4044 |
+ local locale_doc="documentation/README.$1" |
4045 |
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} ) |
4046 |
+ } |
4047 |
+ l10n_for_each_locale_do add_locale_docs |
4048 |
+ |
4049 |
+ einstalldocs |
4050 |
+ prune_libtool_files --all |
4051 |
+ |
4052 |
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script |
4053 |
+ rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \ |
4054 |
+ "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die |
4055 |
+ fi |
4056 |
+ |
4057 |
+ # Remove wineconsole if neither backend is installed #551124 |
4058 |
+ if ! use X && ! use ncurses; then |
4059 |
+ rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die |
4060 |
+ rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die |
4061 |
+ rm_wineconsole() { |
4062 |
+ rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die |
4063 |
+ } |
4064 |
+ multilib_foreach_abi rm_wineconsole |
4065 |
+ fi |
4066 |
+ |
4067 |
+ use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055 |
4068 |
+ use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader} |
4069 |
+ |
4070 |
+ if use abi_x86_64 && ! use abi_x86_32; then |
4071 |
+ dosym "${MY_PREFIX}"/bin/wine{64,} # 404331 |
4072 |
+ dosym "${MY_PREFIX}"/bin/wine{64,}-preloader |
4073 |
+ fi |
4074 |
+ |
4075 |
+ # Make wrappers for binaries for handling multiple variants |
4076 |
+ # Note: wrappers instead of symlinks because some are shell which use basename |
4077 |
+ for b in "${D%/}${MY_PREFIX}"/bin/*; do |
4078 |
+ make_wrapper ${b##*/}-${WINE_VARIANT} "${MY_PREFIX}"/bin/${b##*/} |
4079 |
+ done |
4080 |
+ |
4081 |
+ # respect LINGUAS when installing man pages, #469418 |
4082 |
+ for l in de fr pl; do |
4083 |
+ use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}* |
4084 |
+ done |
4085 |
+ |
4086 |
+ for m in "${D%/}${MY_MANDIR}"/*/*; do |
4087 |
+ new_man=${m##*/} |
4088 |
+ new_man=${new_man%%.1} |
4089 |
+ newman "${m}" ${new_man##*/}-${WINE_VARIANT}.1 |
4090 |
+ done |
4091 |
+} |
4092 |
+ |
4093 |
+pkg_postinst() { |
4094 |
+ eselect wine register ${P} |
4095 |
+ if [[ ${PN} == "wine-vanilla" ]]; then |
4096 |
+ eselect wine register --vanilla ${P} || die |
4097 |
+ else |
4098 |
+ if use staging; then |
4099 |
+ eselect wine register --staging ${P} || die |
4100 |
+ fi |
4101 |
+ if use d3d9; then |
4102 |
+ eselect wine register --d3d9 ${P} || die |
4103 |
+ fi |
4104 |
+ fi |
4105 |
+ |
4106 |
+ eselect wine update --all --if-unset || die |
4107 |
+ |
4108 |
+ fdo-mime_desktop_database_update |
4109 |
+ |
4110 |
+ if ! use gecko; then |
4111 |
+ ewarn "Without Wine Gecko, wine prefixes will not have a default" |
4112 |
+ ewarn "implementation of iexplore. Many older windows applications" |
4113 |
+ ewarn "rely upon the existence of an iexplore implementation, so" |
4114 |
+ ewarn "you will likely need to install an external one, like via winetricks" |
4115 |
+ fi |
4116 |
+ if ! use mono; then |
4117 |
+ ewarn "Without Wine Mono, wine prefixes will not have a default" |
4118 |
+ ewarn "implementation of .NET. Many windows applications rely upon" |
4119 |
+ ewarn "the existence of a .NET implementation, so you will likely need" |
4120 |
+ ewarn "to install an external one, like via winetricks" |
4121 |
+ fi |
4122 |
+} |
4123 |
+ |
4124 |
+pkg_prerm() { |
4125 |
+ eselect wine deregister ${P} |
4126 |
+ if [[ ${PN} == "wine-vanilla" ]]; then |
4127 |
+ eselect wine deregister --vanilla ${P} || die |
4128 |
+ else |
4129 |
+ if use staging; then |
4130 |
+ eselect wine deregister --staging ${P} || die |
4131 |
+ fi |
4132 |
+ if use d3d9; then |
4133 |
+ eselect wine deregister --d3d9 ${P} || die |
4134 |
+ fi |
4135 |
+ fi |
4136 |
+ |
4137 |
+ eselect wine update --all --if-unset || die |
4138 |
+} |
4139 |
+ |
4140 |
+pkg_postrm() { |
4141 |
+ fdo-mime_desktop_database_update |
4142 |
+} |