Gentoo Archives: gentoo-commits

From: NP Hardass <np-hardass@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/wine-staging/
Date: Tue, 28 Nov 2017 16:24:31
Message-Id: 1511886251.7598f91b7ae513f9d763df4dbe94b77dc6b157a2.np-hardass@gentoo
1 commit: 7598f91b7ae513f9d763df4dbe94b77dc6b157a2
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Tue Nov 28 15:35:00 2017 +0000
4 Commit: NP Hardass <np-hardass <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 28 16:24:11 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7598f91b
7
8 app-emulation/wine-staging: Clean old up
9
10 Closes: https://bugs.gentoo.org/638064
11
12 Signed-off-by: NP-Hardass <NP-Hardass <AT> gentoo.org>
13
14 app-emulation/wine-staging/Manifest | 40 +-
15 .../wine-staging/wine-staging-2.0-r1.ebuild | 607 --------------------
16 .../wine-staging/wine-staging-2.1-r1.ebuild | 607 --------------------
17 .../wine-staging/wine-staging-2.10-r1.ebuild | 609 ---------------------
18 .../wine-staging/wine-staging-2.11-r1.ebuild | 609 ---------------------
19 .../wine-staging/wine-staging-2.12-r1.ebuild | 609 ---------------------
20 .../wine-staging/wine-staging-2.13-r1.ebuild | 609 ---------------------
21 .../wine-staging/wine-staging-2.14-r1.ebuild | 609 ---------------------
22 .../wine-staging/wine-staging-2.15-r1.ebuild | 609 ---------------------
23 .../wine-staging/wine-staging-2.16-r1.ebuild | 609 ---------------------
24 .../wine-staging/wine-staging-2.2-r1.ebuild | 607 --------------------
25 .../wine-staging/wine-staging-2.3-r1.ebuild | 607 --------------------
26 .../wine-staging/wine-staging-2.4-r1.ebuild | 607 --------------------
27 .../wine-staging/wine-staging-2.5-r1.ebuild | 607 --------------------
28 .../wine-staging/wine-staging-2.6-r1.ebuild | 607 --------------------
29 .../wine-staging/wine-staging-2.7-r1.ebuild | 607 --------------------
30 .../wine-staging/wine-staging-2.8-r1.ebuild | 607 --------------------
31 .../wine-staging/wine-staging-2.9-r1.ebuild | 609 ---------------------
32 18 files changed, 3 insertions(+), 10372 deletions(-)
33
34 diff --git a/app-emulation/wine-staging/Manifest b/app-emulation/wine-staging/Manifest
35 index 8be7b53e71f..1f75cd0f44d 100644
36 --- a/app-emulation/wine-staging/Manifest
37 +++ b/app-emulation/wine-staging/Manifest
38 @@ -1,41 +1,7 @@
39 -DIST gentoo-wine-patches-20170830.tar.xz 58456 SHA256 fb7781d0ae360cbc3860c2d2e81527a1b903da824c01f5d5040e95aaf99a3970 SHA512 5e5159e3252b246bba0ef7fdba345db3ab1071c5b8b8b625f98eda18779d4024c5b76bdbf49ce7bd5c6b01b422807adf76820beddb2b4a6ee9e67d13052cc575 WHIRLPOOL a79be264bab3fcdeee06fef47efd28e6e1125254ac7f82300cb6ba2591ef69cd76b5fed8f778b1849a0659e680e9fc785f0273d55cb2ed95648a74dffa5e22d2
40 -DIST wine-2.0.tar.bz2 23662707 SHA256 9756f5a2129b6a83ba701e546173cbff86caa671b0af73eb8f72c03b20c066c6 SHA512 b0a57ba8202d9fc396e5bfb7a7718d6bababbed8f3351e7fdc36afa37f35a871e04903757618f73427aeb71a52b2d323977d79e48f8b38d636f23fd404441186 WHIRLPOOL fa9f774d87dae73c7d1f3b86dc3b03ea27065eb6140f1cac13c82fe16f7ebff8f8365ed447220cf5c2788b9f4aae7c482e4f9e2e69f47e5435209e148f5dbdfe
41 -DIST wine-2.1.tar.xz 18887032 SHA256 bfb9abf63691c93df28d9599aaa866dc2b4e27209b3b7b546df8a37d7d9d1e6e SHA512 03d678ee6e89c2804813f2827255fcf59e96ca9a45b7d8ac441cfc84f835e5e5689c70a79a41a04c631e1add7807fa4a5758acef3bd7aadfb2e92e68958c6ef6 WHIRLPOOL 063d935f1ff0922100641f2f53cdac23d2993a83182d45e028e485fd7d0a13bc5cfb77bca76550b1537b3f42fecacef7fd64785adbf6425af823f56f96973b54
42 -DIST wine-2.10.tar.xz 19209580 SHA256 488df7ffd2e81da455bf428fc9eb784bb4273a890334500895665711bd52f179 SHA512 8807e16a571bf45d99097ad5fdfb9fe755f6dbe84010a330fed82f1d48c76b7f19589bfc0e5dde0b9e49a608fd0501db3f7e3e129e4d9d34bcae03bc51a73139 WHIRLPOOL e9a8248aac31593fbac28a3d8d4e62bfce14a7c41cc416ebfca8606518d28efd31b32196133da211f75f48bd228bd5d21fcbbc0479293e813ed99b258b37126e
43 -DIST wine-2.11.tar.xz 19251116 SHA256 efa96dade206aa21accf0da195335a805d38209d6a14320607c6308ebde4cc3c SHA512 691f329c47af5e51498287029988b8ca0777bfc3902ed80fd315004aba2337a938e79177e752efe86423c9b34544df3952b8c443bf43149356575fac75a779ac WHIRLPOOL 4933e1ce640b0abeebccd6969b5eaf4eec76cd135d9cfc1d904a902219f776a68f72e2bd1ae9019d69f0d0d81fd8ead0084785d1b9710590349365977f9c1817
44 -DIST wine-2.12.tar.xz 19301968 SHA256 496c11af841487e6ec4e1953ac19b05a7f48e397da502653ffbd9fe9004213a7 SHA512 d44c1937d7d2d797150381f70317b810616d61355a59be096366d3507f59b678cffaf6d841cecf02bf9d2afa3dbf4d19270f80fb1d3ba5f0f93787d40c328f62 WHIRLPOOL 6f4b9baa6fcfe86f3d195fe603c2b9450a72a593c8f7042959b42a76880cb4ae680fde7beb70a8e823150849fda36c42985035de891ebf0088c8ffc2bceb15bf
45 -DIST wine-2.13.tar.xz 19439328 SHA256 6fbca3ddd19b061ce65a267639efae93cf38cfabbe4a9c148a17a44703587ef8 SHA512 71873b9ec1605dd5f7502b87b0f3429c3d14a4196543d7304df455854b58ef82b8fafdcea91450cbfc01434a44886a0e0c4c4cf289ffb53167dde0f969cddc48 WHIRLPOOL 6faf1e6aeea2ab7ccc496ed85834f98eb25111c8f541c24d4876a142ad4acf7d9a4c08c2716e11fb6c92fe7aad29980cab912eb9dbb6759bdbdeca2f2f8e78a7
46 -DIST wine-2.14.tar.xz 19447812 SHA256 03f934d95181f728600ca04d395f10e821ee38cfa31655e872e4d27d2a8795c6 SHA512 ff43d386d46c0c74449e667b61d8cebd5fa768c88e6220aa2f13df03d80b71b6c0bdf8cbab023aed96f7c88b9787a3be4989da892fa1778412534ae82a7279bb WHIRLPOOL 2d2784e1b2ddeac39a3cea4cb08a62d99d1d062d8d801874e8bf4f56d2538a4cb019418c60299556548028e2362dd533d9ea0956014a65ac7a367ed489c0c392
47 -DIST wine-2.15.tar.xz 19463720 SHA256 d82d500cbf81fb08c711d3619bd52373138a05574d044f089af89707274868b3 SHA512 a52a42dd1f20fe68213c55a07ac5b2455150806e534f0ab77a8e9ae3d2f12840983fa92290dac569207d3640c7f45cda83801e9f2e80294863ffa854c6c89171 WHIRLPOOL 99c9497a44859ce310c764b3cd172d83ca1a2dce13633fee930ddbf1c40651ee4470f6bc9cfcb407ce65298a2afd73dc9edc536c2ba6f076631e5cf2085b8e61
48 -DIST wine-2.16.tar.xz 19484716 SHA256 a561edcabecd6c44948e5b2ef11941b2ba047275240418fa2c98c1fdceda2c21 SHA512 749a36b536506c4b63ff7512e316f44503cdb0db46e38a124da86df638f3e8ff9c404b034ece5cbb95cf20c09bc46be9a38f2ee66480aa6a4f2385e2a7a7eea4 WHIRLPOOL 92ae0a427d89b24d41d4565e333cf3b7499c1dfedb6d2a204f934975c35cb589d38b4f669890c1fd6a37b9fe8f34d98be3e7d0986e9ff99516fe00a004574520
49 +DIST gentoo-wine-patches-20170830.tar.xz 58456 BLAKE2B 86445a6d91d9981d069ff2fb3b64a47e166c76b4721ef877c74cd60e359ee5bdbe36ebf37cf796a18e9cf42dbc69ce1496777144fc28b072f47c965173bf48b4 SHA512 5e5159e3252b246bba0ef7fdba345db3ab1071c5b8b8b625f98eda18779d4024c5b76bdbf49ce7bd5c6b01b422807adf76820beddb2b4a6ee9e67d13052cc575
50 DIST wine-2.17.tar.xz 19505528 SHA256 7edc95739043ccc55957af663fb910318283dc5d1db42cd7f0224e30acfcea69 SHA512 cb10c876e689aa601c68673aab32c0514dd174692a01bdb3afc78d5e6079b0e77f48783af2f54245f397c762da3b4e5f2c1d39d2ce7fdb3b117d338b95c24810 WHIRLPOOL 196427a68ab3b1261cb63bafd7f82b7a688ad439fa82ae3fc04b18c9da14cc8e95b827ca8ddd07124e1179c55ed0e0aba3bdcb4639b724a6dacf4952e8827e16
51 DIST wine-2.18.tar.xz 19546360 SHA256 9f0931129878157d717cb39f16cd33bf49f40aac77331c93d0ad30f2ccac4f50 SHA512 61cc39fa3d2b0a0ab3c5d17579865e6aea76dd9513a4b3c45975a2d5c05f2b4ba952b97eef547131a014763c7f692a08df29bc2ebf7e4ac7e2616e6a7822ddb9 WHIRLPOOL e864dd1705c0480d3f3095aa02ab1e7bc5b41693cd6b791cdf05e636c7099562020ac3adcba6421653efdf5dbe232b5abe9071792785e008ea30dedbb63e080e
52 -DIST wine-2.19.tar.xz 19549464 SHA256 487131e69875ae9c2d042798f954160146e603e449c3c97981f29b42f4a66095 SHA512 83558231bdc592b1f69cfedf6c689063df7bd9fecdfafba6fb7f6a2c7fa7783973efb85a6a49305afc18b1aa268209ee5b9c0655756e05d7550468698dfa51ae WHIRLPOOL 123aec3a367e67353655d940ba2ffe9386a583afbd0961dd3f446a00b0cf82ad4ed590508e03bf2a4e60b11753f8f430e748e6614f476675423f3bdaf7089288
53 -DIST wine-2.2.tar.xz 18916364 SHA256 64cb57e1d8aa07f5c89ef26743b494f2d3ef9c0f4e50d3ee896a93535f7751f4 SHA512 0700868244d397c1442948716321e5ff030c667edce464570f76aa4340199489a422872aa3975bc0a57b8285c9d59fc04e223a4bde094169fc6db460acb626c4 WHIRLPOOL ffc3d357a76592651b589c6ac6608720d0258474890faf8fe3e20ac29cdd1496d569721256f9389d347bf2734a556099154fd18ef1b56f45bb46c4c15771d6ca
54 -DIST wine-2.3.tar.xz 18931732 SHA256 afc95c7a87cc8f0730b462c50a5dfc9c462eb02c6bf5874b4fa99946f49e067e SHA512 bea78e8468555ff9e08dedf3918da5ea82721549c43984869989bbdafeea00e454820ff9558aa29925c97a165a9b01e5cd1fd397f133833c58824984a6686171 WHIRLPOOL 1f5ec8e5c32d124277e4c71d95726d3a5337575757c3029567c77165d65fcfec2ddf33d3863b4bf55c9eff7c3582c1ec7dbd76d84ed8bbbe89dd16db6b0128c1
55 -DIST wine-2.4.tar.xz 18953748 SHA256 87b5df07e4781fecce2f92415a4717208ea253a20a0df8b36b9f90b69b72748e SHA512 15ae7e97dc72a8636b2c15c93803ed430fa456d673add61457cf3e479e769559c682b40949b5d38828f6681f13183e560fcb4a2eb0f0ba25e6eade46f7d3d7c0 WHIRLPOOL 558ab7b7517ad5e03366b4db974047eba776585e958a5b71bb2e93993e21bc725ea7a8bcf2a4354f34ca38c94ba99ccd15f2f8b5e4b58066bf339d3517eec56c
56 -DIST wine-2.5.tar.xz 18993176 SHA256 13f92b7ab483323aaabbc6519851e688ad4372ea30569961c831d40d6d3bccd2 SHA512 7b6faf6d8aa3d41465ad93ebae055581136f736c7eb8b4c61682e5a05589c83a0ff2c85e0f9abbca016f31b6f1c1435617c4994f1913f715a8707ebee3f28467 WHIRLPOOL 5acd2ac65df5dee1c860ddca72b8df8e021a0b95a3a1870d15468ce4591d569fa15bf8a0a6d341bcd3a624d13d0affe5b0263e67f9dfcbbf3ae7b59218dcded9
57 -DIST wine-2.6.tar.xz 19023352 SHA256 e6ff64758f437647e99a36c1275e41adf54f0432907172d3bba22b070a97aac0 SHA512 2aa55413ac090e011725566d004e42ee46323cd4c6961b9faa63e3de422ba60bb657bf224a4d7e8aa712a8e26e11977d07acb7c088ffeef8c37310e8cc698970 WHIRLPOOL 82e6a06cc342c7d6eace64a97bae10cc39c120c5776170b059700542b8b6fef56be9a697f05b3bc21ae82621f4bf50f3ab478311c9a3a55d86ed7c0a009766b0
58 -DIST wine-2.7.tar.xz 19101108 SHA256 e55a43088e313c45f7ab49272b7cb441c06f5659fb4220b2325dc060db0ee14c SHA512 1e61b9a4aa1f5f42fb27d11d5254a9ba90f348ad9c4d1ddd4b5da47cd7de638290a20accf7447db9c0e4ced4c2144497cdf5fc906a5eac60e923dabb61f65d3a WHIRLPOOL 133426a0313facc856eebad3d16d199948b780ce4c4561e5784845c119fe462b8942ed86fa5e823e729a997d704bd3c70f44a64ce3eef965b4f3eb92587dfa4d
59 -DIST wine-2.8.tar.xz 19120740 SHA256 83e9607af66d86020dc27a368ebba28fa7e8ffecfdf8f149da06b3531ac3e579 SHA512 4d0b167b1e5add31ed0ed05b328d16fc13cd268285c03a9100e7ddc53864aa07f6b216a555ef0c2e51dee550e3f4abf0c7c20db2cbca177bb38e8c3e11f05b97 WHIRLPOOL 568cf46caf7322eb5e26b364bd15f9e80c41a65340952a1ee0fa80514bbee3c5adfa72af40809a978a5d4202f5e8d3da3e4581767bab9fa08ab441cdd5d1da31
60 -DIST wine-2.9.tar.xz 19154668 SHA256 ac46f7bbbbc1dc135c95e4f98d28bf6e3d7a78fb7f9ba6caa7354a3e8786545f SHA512 6d06e511d8f338297ed0ddb7bf2ffb501f528209eaecbbee3d4e5d53db649dd5ea0aeb78bba661a9bcfda5f97e170ca10eb8fab355e229bfe7db6a5feb7ec4e8 WHIRLPOOL 7355166aeaac54abb6e1d25da6f87a4814d37764044e95462bc2a83f8d5a9b7a3bb10730bb5506516e130a4fc9ee35e3656d1106939bbbc1310c6aff0d798a1c
61 -DIST wine-staging-2.0.tar.gz 10182575 SHA256 22a43cb50c1fff9c6f233a965247056e3321533aa73a6419aa34a22de7180039 SHA512 51412299259d6e92c8993543d5fdb3239ebe31e0d1d715e0a9e8ce94b3139c0567b08ff1600d41be94f12427cbfccc2f6b6b2ed030535445c95618aaf6578580 WHIRLPOOL 9879174bc3a7c8ece156c822b7a7b870908e51335702a78e6f04ea1496125a2018a879bfc53d1302e4825138d22af526308ba7f656d683a535be44d4515f1bac
62 -DIST wine-staging-2.1.tar.gz 10101781 SHA256 1d193be2734ea495df2cae1dc54ce89204ca68699979174b0bd726d2e5e0576b SHA512 c64c48b265f0779c621a643ddbd2d12aaa548e4bff3b2b728280cdb9613214989911ee8ba5e46c7770f5f6430014a5da1c98e95d5008c1174bd14bf9ce5250db WHIRLPOOL ecf970ef436089bbcd0088e1608b22e808d54560e905c7d8046b3e21508166a595c3ef7b69819c45e4b13183bd9134a2bd7016d29c4da52985701d392eb35a0a
63 -DIST wine-staging-2.10.tar.gz 10091114 SHA256 b361ec92b2e40de983b987f6564dbb75dcb121c6e2f0123fe1ae234fd81a591b SHA512 c3bf7027ddfd1405263cce844a7cbeb923e9de56cffdb296384449c0cc600b3c9a37c7fe09b62fb9ae0b47f97a2d4f208cc589f0e4205fa84ce5d112953ac2e7 WHIRLPOOL 01c5436179bcbd29ee0468f2f4d839ba805c064d80835fcd1d5e6eba562881c65ac576657a733c726ccf4b37473da6724ae06ebc023fb988d8810ed1f8096c6b
64 -DIST wine-staging-2.11.tar.gz 10083147 SHA256 45c40fbca76cab987e7adfe47fc8e24692f896805c8a6dc6030da28e3bd842bc SHA512 e2d05ee88e1cc932c2890f1db867a9382f2c62a00ea7d63fc6bd7b3fab57ea2f0e4908313cbed08b92e48d5bc17753b0b78f6cdf2cb64e81aa5725fd86cbc695 WHIRLPOOL e2d13ed7d258b1ee442c8c87f852c1564ce5f262bd7cd31710b975882ab8cb454a1e2ec308c6c17e5bd0a691b0492fdea22a182323cb963c055592ce538db690
65 -DIST wine-staging-2.12.tar.gz 10105899 SHA256 0f186d2268011c12094ecac8747378ad8f4ee7152e8854cb00496ba9565b7974 SHA512 a8c21c923153a42609e3ea9065b84208b01f3b14d55b7e68e548ebf6d27df956051b29dc2f053aec6287422c13eed5b6ec71e667ae6f46b1c80ae7c84a51b648 WHIRLPOOL 01cf39fa257e9975cfd16976e680117dac3d0ea3f9bc41e2d0a636023bd4afba0676587e41c55d4417cff97080b90eb11b3fe475970eec70be64f5c788c1cf88
66 -DIST wine-staging-2.13.tar.gz 10137549 SHA256 0796440ebfa2aa651051e7081cc64f83774f966f26353876e024e42c59e24b46 SHA512 86077747d8a4f6e56dc1b0dda1688810defa9bcebaaadbf2419ce56e4590d4249881105e1dda24236f861baf0b1cc42019b2538de5d24a6d3c4f27c7a8248086 WHIRLPOOL e0c147519fde14f74031fcb7ba154c39583a9c817460d21ec50fdae40039136d46b8cc0ce9a8fb558ddbf8b62c6f0a572ad04a887c47046c0e921e6f08c4b44d
67 -DIST wine-staging-2.14.tar.gz 10179829 SHA256 cd4c8e400a808cbfa5c5cf088ea874c761d09db897f25bc33eab840101020b19 SHA512 1e794f77309e94612f822b72872ac2726e37d219a40c4a45feb2fb56f4413c34eae966a4ae8708d502c837cd47db22979e9a05cb73b681703cd729f701cdb210 WHIRLPOOL 63f9ff9cd4d54d6ff91997a904e7cd612bb8bca905399e9c6950b274cd8218c0c04a40dca9f4e12180e1080f1631bfec38e3633fcd457e688e8f8883661a4e59
68 -DIST wine-staging-2.15.tar.gz 10190900 SHA256 f2b5c43fbc185a6fd6399f4c351b83a172737977b2ebb1cbdeddd1838d044bc2 SHA512 75d64d103839da2daed6e5b2400185c0a5274d0e50b675283bbadff70cafe712e573701207d80c8e8af7f68d1d273efec3c0d705dc982c74b8574929daadecfa WHIRLPOOL 13239aa636fc102fb374ab8724b7dbce8e9b95f16797a4f5faf8a5e7789d60e6b485c7495ccef4568edbbb0549d657a6758642de2e98b449b0ced2725136e444
69 -DIST wine-staging-2.16.tar.gz 10220855 SHA256 da0ef4b0eafe9cd1b9cf26a5b950088adf1308e17a0d6f4ae62516b6ee64248e SHA512 96585caf77569a31f516aefe230a8907ef91db29759f75075593b751985f294bf292a1c146d287a3f0859a6b6273560670c4bc734ef0fbecb0809574eb3f09ba WHIRLPOOL 66128c8d59593243e95d6765b9fd8ace59e85e365a5e8a41eeb17d370464005aef060ddf3d862d0a3638048fd92189860e69a3cbf7d24d3ce1e420200d4b3cf5
70 +DIST wine-2.19.tar.xz 19549464 BLAKE2B 86d130cc43d7d674d2f478365952962b2792fd585b8d074564108bc7e9f4f7690337e4758b9a24e54fe8fd60187d3a96496a5ffc454ba674b02ecdde68efd3bb SHA512 83558231bdc592b1f69cfedf6c689063df7bd9fecdfafba6fb7f6a2c7fa7783973efb85a6a49305afc18b1aa268209ee5b9c0655756e05d7550468698dfa51ae
71 DIST wine-staging-2.17.tar.gz 10211107 SHA256 f511bf3438dc418b4f667513bf1ae419255e4ee62229e9205c0c64b047222183 SHA512 b652f6a852a1382c1b8275e172b7ac7608749c34aef5c0c5387cf262bf0da8db67a77ce397d49e53f3e2a8f210a3dbea1a9b3f3feb15c7d5bad8952b6fb7b53c WHIRLPOOL c45dc5fc91bc774f9f28bb06dff959391829fafac398bef198755395afe5a65bb2d32ba3ce157607a6040481955926866ed8f0760850bfca821be8599f4d7b64
72 DIST wine-staging-2.18.tar.gz 10243957 SHA256 69c75d3ca17b1c3617cd0934a9e9ad6fca37c6679900d2cb63f6981aa1026cc8 SHA512 fe18b53d4160596d134ceed392f6459e9c183381f4712add43d8422e77d7d5d89ff34a3bb3afbd7740f250d85dfda0f3501e9600a41270790ae02138ed6d7dc7 WHIRLPOOL 2dc1429a7a4f13ee01b1317f1937ef7ec6b42c3cfdd78ff78bb8273e1056751edb2ac119904ba48ab645b430f269a9361a6d42bcbb5dfb46bd15a129569d3194
73 -DIST wine-staging-2.19.tar.gz 10241240 SHA256 2fdb083a484708362433000f92b54a5d648df190b2ab084647c45f5624063bd2 SHA512 90916cb096bbfec35514eff4c1b6e2090b6e68e3e7af1164715f5abb1d255c5cfd6411f53c27cb277adcf0982fa6d6e508a7cdbc1404dcca6c2700b05c2c5483 WHIRLPOOL 3ed1a5d39d0ec186538e04ca09e4fa2729f356385523177b753e7c7183416f666f336bec7d4b606f29266cd227cf5e72f707c79adf510bc3899adb76ce3df84f
74 -DIST wine-staging-2.2.tar.gz 10078327 SHA256 9d3cbf7e5f12c623d275457b910a158e0b176fcf50c09a5f8425864de604bc1d SHA512 8ad3f8ba4c6439a9ec4884a55018a67c9e2c2384830074646aac7b70cb9f4f5a20f760247ab42dc3d2f697cdac7ea5322be8ed12c435cb0bc185ac08fdd4dd91 WHIRLPOOL a34c19aaace64307de56d935cb0cef17d7c066c39b83c51e70ea76a20083f928bea55fe38d62b7a8250b0a9e8f00e0d2b744f43fcab433069ffb96625d955303
75 -DIST wine-staging-2.3.tar.gz 10071742 SHA256 9a81be606836fab6203857f7937ff97575947f75d52c80fb5489418efb8b87e1 SHA512 8e8af1e36cc69c63ec3542f0ec4db18b6d8c16b5c9077eb211297f3a886519da71bcf72934bf8d6d72e44c7c9f765e1d00203d0d75cab8544f69f9b0c10a7133 WHIRLPOOL 50738a6e20890748d7eb01152244d34b259759f61b3587ba39815dc066fc8e2b66ce182e1ddbc912f50076a3599aa060ec6a94eeaab4513ce3a776711929b9b1
76 -DIST wine-staging-2.4.tar.gz 10067020 SHA256 709cab12c0ebf7cf9504fd4a67eb851272309e00066ad81f184b0f55c63e9deb SHA512 55d11851697836b582ba54696cadc812ef6b14872440f5c3ed6fbe30a05abcb8abe2ab31a11ea4daeb354854c7c0e6549401d4b26b26621808bdeb89aeb206f9 WHIRLPOOL 8d344b7e6e89322c8dbbe6fd211851c90a45a33b514c182609cc60dc21939f791abc71d8665cd66e5c5161f159fe24c4772b99405833e3d11985a644e1335eaf
77 -DIST wine-staging-2.5.tar.gz 10062025 SHA256 b5cf6fa38151ff47ab6d725077693b02b37bb07b2ab7fda55290bb1f63ac54ad SHA512 6ab981886776f624c6478230aad18870f55b7252f1c6df90bfe1a248f7ea76cbb181f8e0780fdd4bb5e3c589a785baa7cf126a2c838adf65db2a67f873ed1698 WHIRLPOOL 7045b1642a3b14e5a507854cb8bf910c7cfb3c64ada4ee3534175c75b03cd604206617a55fb870e47fb248a4db8a9ca2abc0b4688005c1c0de0d542fec8cbc57
78 -DIST wine-staging-2.6.tar.gz 10034709 SHA256 ff86ddcceb7f6857bd415db3842ddf216a5cb301452e2a08053a9378cbf5580a SHA512 dc199b5345985d261b708ac811b02253ab9fbc4966889f2382ce518d991fe43b7c771c1d56d055c6234c9329d5c571cd9cf0b16587b77124b9c46917ddd066d2 WHIRLPOOL 375f484c6c50645c605994eb08c38c649ca6c8b47430e2f2f285a63fc24eca81588d0496a8c32074f90e4ea8f4330f76854bf8874f042e27581a7eee19aedf98
79 -DIST wine-staging-2.7.tar.gz 10018082 SHA256 3095f9c634f00b143c2407dce8c3f29c629ec95074cf14c8e8dc2e0cdba45b6d SHA512 0abc89af701ae1b95c0eb08e72894c7bc40bdfe792e05b8af9282eab8407bb90b7dfcd4eb3a193a88759ce5d6ea6c2aa9696cac2d744f543c92529bb0d2636ee WHIRLPOOL 6cc666f702ef1bd574ede54a7f6755e07d768c9fa549b9bdb9b5416288619347e0c1b9c70893b6300800d8e6c94e8d2396937f639d1e821945ba9fe144b32c95
80 -DIST wine-staging-2.8.tar.gz 10043842 SHA256 8680614be6c3b01c7c577eb6924fc05cc3de92394384939dd5b2e12e08235fff SHA512 af1707fe3119664a0d97d94fc4c955612d80cb76eae8c4248a268c0f6be9e659fccf7c26899c9e9ae5822f74474c0db5283b598dd4d9d69a3b108f947653217a WHIRLPOOL 7e9aa61a7666404475abb442304e63c76c2e6df26479711b7c08ebe7c15b9b53017e7a1d2dca4f9f8aeba78290df03f06076c99ac06c30d5ed893cfc3842107a
81 -DIST wine-staging-2.9.tar.gz 10062408 SHA256 cde0895142c0ca0be5b532560ec0546d6e4f655615572d80cfcce663f92c57f6 SHA512 7862a403817791c54c5c1b8f233b06a850500305c46283bccb9026fb6db041a8fba619d145ab21fe2fdc5f25ed3bbb75fde05245fbbbd67139a5f64b547b1196 WHIRLPOOL 52c0b9065cfa54f6b86b74f9a98c9d232e3a88aa9d61d06c6e01044122fab8b01a567e99f93014042031e9eb991fd9234c4a02ebe3d2aa8c042e5e769269095c
82 +DIST wine-staging-2.19.tar.gz 10241240 BLAKE2B e661e3272328988e9a1aacc22fc02f0773804b58777f208c79c6af866032f31b6140a52e2aa5af954e52437db234712863d1369e960e98e2c212d1efc7f6344f SHA512 90916cb096bbfec35514eff4c1b6e2090b6e68e3e7af1164715f5abb1d255c5cfd6411f53c27cb277adcf0982fa6d6e508a7cdbc1404dcca6c2700b05c2c5483
83
84 diff --git a/app-emulation/wine-staging/wine-staging-2.0-r1.ebuild b/app-emulation/wine-staging/wine-staging-2.0-r1.ebuild
85 deleted file mode 100644
86 index 510cfb087fa..00000000000
87 --- a/app-emulation/wine-staging/wine-staging-2.0-r1.ebuild
88 +++ /dev/null
89 @@ -1,607 +0,0 @@
90 -# Copyright 1999-2017 Gentoo Foundation
91 -# Distributed under the terms of the GNU General Public License v2
92 -
93 -EAPI=6
94 -
95 -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"
96 -PLOCALE_BACKUP="en"
97 -
98 -inherit autotools eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils
99 -
100 -MY_PN="${PN%%-*}"
101 -MY_P="${MY_PN}-${PV}"
102 -
103 -if [[ ${PV} == "9999" ]] ; then
104 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
105 - EGIT_BRANCH="master"
106 - inherit git-r3
107 - SRC_URI=""
108 - #KEYWORDS=""
109 -else
110 - MAJOR_V=$(get_version_component_range 1)
111 - SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.0/${MY_P}.tar.bz2"
112 - KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
113 -fi
114 -S="${WORKDIR}/${MY_P}"
115 -
116 -STAGING_P="wine-staging-${PV}"
117 -STAGING_DIR="${WORKDIR}/${STAGING_P}"
118 -GWP_V="20170830"
119 -PATCHDIR="${WORKDIR}/gentoo-wine-patches"
120 -
121 -DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset"
122 -HOMEPAGE="https://www.winehq.org/"
123 -SRC_URI="${SRC_URI}
124 - https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
125 -"
126 -
127 -if [[ ${PV} == "9999" ]] ; then
128 - STAGING_EGIT_REPO_URI="https://github.com/wine-compholio/wine-staging.git"
129 -else
130 - SRC_URI="${SRC_URI}
131 - staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
132 -fi
133 -
134 -LICENSE="LGPL-2.1"
135 -SLOT="${PV}"
136 -IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags 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"
137 -REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
138 - X? ( truetype )
139 - elibc_glibc? ( threads )
140 - osmesa? ( opengl )
141 - pipelight? ( staging )
142 - s3tc? ( staging )
143 - test? ( abi_x86_32 )
144 - themes? ( staging )
145 - vaapi? ( staging )" # osmesa-opengl #286560 # X-truetype #551124
146 -
147 -# FIXME: the test suite is unsuitable for us; many tests require net access
148 -# or fail due to Xvfb's opengl limitations.
149 -RESTRICT="test"
150 -
151 -COMMON_DEPEND="
152 - X? (
153 - x11-libs/libXcursor[${MULTILIB_USEDEP}]
154 - x11-libs/libXext[${MULTILIB_USEDEP}]
155 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
156 - x11-libs/libXi[${MULTILIB_USEDEP}]
157 - x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
158 - )
159 - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
160 - capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
161 - cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
162 - fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
163 - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
164 - gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
165 - gstreamer? (
166 - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
167 - media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
168 - )
169 - jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
170 - lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
171 - ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
172 - mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
173 - ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] )
174 - netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
175 - nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
176 - odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
177 - openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
178 - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
179 - opengl? (
180 - virtual/glu[${MULTILIB_USEDEP}]
181 - virtual/opengl[${MULTILIB_USEDEP}]
182 - )
183 - osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] )
184 - pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
185 - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
186 - pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
187 - scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
188 - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
189 - staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
190 - themes? (
191 - dev-libs/glib:2[${MULTILIB_USEDEP}]
192 - x11-libs/cairo[${MULTILIB_USEDEP}]
193 - x11-libs/gtk+:3[${MULTILIB_USEDEP}]
194 - )
195 - truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
196 - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
197 - udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
198 - v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
199 - vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
200 - xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
201 - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
202 - xml? (
203 - dev-libs/libxml2[${MULTILIB_USEDEP}]
204 - dev-libs/libxslt[${MULTILIB_USEDEP}]
205 - )
206 - abi_x86_32? (
207 - !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
208 - !<app-emulation/emul-linux-x86-baselibs-20140508-r14
209 - !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
210 - !<app-emulation/emul-linux-x86-db-20140508-r3
211 - !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
212 - !<app-emulation/emul-linux-x86-medialibs-20140508-r6
213 - !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
214 - !<app-emulation/emul-linux-x86-opengl-20140508-r1
215 - !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
216 - !<app-emulation/emul-linux-x86-sdl-20140508-r1
217 - !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
218 - !<app-emulation/emul-linux-x86-soundlibs-20140508
219 - !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
220 - !<app-emulation/emul-linux-x86-xlibs-20140508
221 - )"
222 -
223 -RDEPEND="${COMMON_DEPEND}
224 - app-emulation/wine-desktop-common
225 - >app-eselect/eselect-wine-0.3
226 - !app-emulation/wine:0
227 - dos? ( >=games-emulation/dosbox-0.74_p20160629 )
228 - gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
229 - mono? ( app-emulation/wine-mono:4.6.4 )
230 - perl? (
231 - dev-lang/perl
232 - dev-perl/XML-Simple
233 - )
234 - pulseaudio? (
235 - realtime? ( sys-auth/rtkit )
236 - )
237 - s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] )
238 - samba? ( >=net-fs/samba-3.0.25[winbind] )
239 - selinux? ( sec-policy/selinux-wine )
240 - udisks? ( sys-fs/udisks:2 )"
241 -
242 -# tools/make_requests requires perl
243 -DEPEND="${COMMON_DEPEND}
244 - sys-devel/flex
245 - >=sys-kernel/linux-headers-2.6
246 - virtual/pkgconfig
247 - virtual/yacc
248 - X? (
249 - x11-proto/inputproto
250 - x11-proto/xextproto
251 - x11-proto/xf86vidmodeproto
252 - )
253 - prelink? ( sys-devel/prelink )
254 - staging? (
255 - dev-lang/perl
256 - dev-perl/XML-Simple
257 - )
258 - xinerama? ( x11-proto/xineramaproto )"
259 -
260 -# These use a non-standard "Wine" category, which is provided by
261 -# /etc/xdg/applications-merged/wine.menu
262 -QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
263 -usr/share/applications/wine-notepad.desktop
264 -usr/share/applications/wine-uninstaller.desktop
265 -usr/share/applications/wine-winecfg.desktop"
266 -
267 -PATCHES=(
268 - "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
269 - "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
270 - "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
271 - "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
272 - "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
273 - "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
274 -)
275 -PATCHES_BIN=(
276 - "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
277 -)
278 -
279 -# https://bugs.gentoo.org/show_bug.cgi?id=635222
280 -if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then
281 - DEPEND+=" dev-util/patchbin"
282 -fi
283 -
284 -wine_compiler_check() {
285 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
286 -
287 - # GCC-specific bugs
288 - if tc-is-gcc; then
289 - # bug #549768
290 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
291 - ebegin "Checking for gcc-5 ms_abi compiler bug"
292 - $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
293 - # Run in subshell to prevent "Aborted" message
294 - ( "${T}"/pr66838 || false ) >/dev/null 2>&1
295 - if ! eend $?; then
296 - eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
297 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
298 - eerror "or use gcc-config to select a different compiler version."
299 - eerror "See https://bugs.gentoo.org/549768"
300 - eerror
301 - return 1
302 - fi
303 - fi
304 - # bug #574044
305 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
306 - ebegin "Checking for gcc-5-3 stack realignment compiler bug"
307 - # Compile in subshell to prevent "Aborted" message
308 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
309 - if ! eend $?; then
310 - eerror "Wine cannot be built with this version of gcc-5.3"
311 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
312 - eerror "or use gcc-config to select a different compiler version."
313 - eerror "See https://bugs.gentoo.org/574044"
314 - eerror
315 - return 1
316 - fi
317 - fi
318 - fi
319 -
320 - # Ensure compiler support
321 - if use abi_x86_64; then
322 - ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
323 - # Compile in subshell to prevent "Aborted" message
324 - ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
325 - if ! eend $?; then
326 - eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
327 - eerror
328 - eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine"
329 - eerror
330 - return 1
331 - fi
332 - fi
333 -}
334 -
335 -wine_build_environment_check() {
336 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
337 -
338 - if use abi_x86_64; then
339 - if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
340 - eerror "You need gcc-4.4+ to compile 64-bit wine"
341 - die
342 - elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
343 - eerror "You need clang-3.8+ to compile 64-bit wine"
344 - die
345 - fi
346 - fi
347 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
348 - ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
349 - ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
350 - ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
351 - fi
352 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
353 - if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
354 - ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work"
355 - ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
356 - ewarn "See package.env in man 5 portage for more information on how to do this."
357 - ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
358 - fi
359 - fi
360 -
361 - if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then
362 - eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
363 - eerror "See https://bugs.gentoo.org/487864 for more details."
364 - eerror
365 - return 1
366 - fi
367 -}
368 -
369 -wine_env_vcs_vars() {
370 - local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
371 - local pn_live_val="${pn_live_var}"
372 - eval pn_live_val='$'${pn_live_val}
373 - if [[ ! -z ${pn_live_val} ]]; then
374 - if use staging; then
375 - eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}"
376 - eerror "cannot be used to set the commit. Instead, you may use the"
377 - eerror "environmental variables WINE_COMMIT, and STAGING_COMMIT."
378 - eerror
379 - return 1
380 - fi
381 - fi
382 - if [[ ! -z ${EGIT_COMMIT} ]]; then
383 - eerror "Commits must now be specified using the environmental variables"
384 - eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT"
385 - eerror
386 - return 1
387 - fi
388 -}
389 -
390 -pkg_pretend() {
391 - wine_build_environment_check || die
392 -
393 - # Verify OSS support
394 - if use oss && ! use kernel_FreeBSD; then
395 - if ! has_version ">=media-sound/oss-4"; then
396 - eerror "You cannot build wine with USE=oss without having support from a"
397 - eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)"
398 - eerror
399 - die
400 - fi
401 - fi
402 -}
403 -
404 -pkg_setup() {
405 - wine_build_environment_check || die
406 - wine_env_vcs_vars || die
407 -
408 - WINE_VARIANT="${PN#wine}-${PV}"
409 - WINE_VARIANT="${WINE_VARIANT#-}"
410 -
411 - MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
412 - MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
413 - MY_DATADIR="${MY_DATAROOTDIR}"
414 - MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
415 - MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
416 - MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
417 - MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
418 - MY_MANDIR="${MY_DATADIR}/man"
419 -}
420 -
421 -src_unpack() {
422 - if [[ ${PV} == "9999" ]] ; then
423 - EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
424 - if use staging; then
425 - local CURRENT_WINE_COMMIT=${EGIT_VERSION}
426 -
427 - git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}"
428 - git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}"
429 -
430 - local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die
431 -
432 - if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then
433 - einfo "The current Staging patchset is not guaranteed to apply on this WINE commit."
434 - einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT."
435 - einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine"
436 - fi
437 - fi
438 - fi
439 -
440 - default
441 -
442 - l10n_find_plocales_changes "${S}/po" "" ".po"
443 -}
444 -
445 -src_prepare() {
446 -
447 - eapply_bin(){
448 - local patch
449 - for patch in ${PATCHES_BIN[@]}; do
450 - patchbin --nogit < "${patch}" || die
451 - done
452 - }
453 -
454 - local md5="$(md5sum server/protocol.def)"
455 -
456 - if use staging; then
457 - ewarn "Applying the Wine-Staging patchset. Any bug reports to the"
458 - ewarn "Wine bugzilla should explicitly state that staging was used."
459 -
460 - local STAGING_EXCLUDE=""
461 - STAGING_EXCLUDE="${STAGING_EXCLUDE} -W winhlp32-Flex_Workaround" # Avoid double patching https://bugs.winehq.org/show_bug.cgi?id=42132
462 - use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
463 -
464 - # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches
465 - ebegin "Running Wine-Staging patch installer"
466 - (
467 - set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE}
468 - cd "${STAGING_DIR}/patches"
469 - source "${STAGING_DIR}/patches/patchinstall.sh"
470 - )
471 - eend $? || die "Failed to apply Wine-Staging patches"
472 - fi
473 -
474 - default
475 - eapply_bin
476 - eautoreconf
477 -
478 - # Modification of the server protocol requires regenerating the server requests
479 - if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
480 - einfo "server/protocol.def was patched; running tools/make_requests"
481 - tools/make_requests || die #432348
482 - fi
483 - sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
484 - if ! use run-exes; then
485 - sed -i '/^MimeType/d' loader/wine.desktop || die #117785
486 - fi
487 -
488 - # Edit wine.desktop to work for specific variant
489 - sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
490 -
491 - # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
492 - cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
493 -
494 - l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
495 -}
496 -
497 -src_configure() {
498 - wine_compiler_check || die
499 -
500 - export LDCONFIG=/bin/true
501 - use custom-cflags || strip-flags
502 -
503 - multilib-minimal_src_configure
504 -}
505 -
506 -multilib_src_configure() {
507 - local myconf=(
508 - --prefix="${MY_PREFIX}"
509 - --datarootdir="${MY_DATAROOTDIR}"
510 - --datadir="${MY_DATADIR}"
511 - --docdir="${MY_DOCDIR}"
512 - --includedir="${MY_INCLUDEDIR}"
513 - --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
514 - --libexecdir="${MY_LIBEXECDIR}"
515 - --localstatedir="${MY_LOCALSTATEDIR}"
516 - --mandir="${MY_MANDIR}"
517 - --sysconfdir=/etc/wine
518 - $(use_with alsa)
519 - $(use_with capi)
520 - $(use_with lcms cms)
521 - $(use_with cups)
522 - $(use_with ncurses curses)
523 - $(use_with udisks dbus)
524 - $(use_with fontconfig)
525 - $(use_with ssl gnutls)
526 - $(use_enable gecko mshtml)
527 - $(use_with gphoto2 gphoto)
528 - $(use_with gsm)
529 - $(use_with gstreamer)
530 - --without-hal
531 - $(use_with jpeg)
532 - $(use_with ldap)
533 - $(use_enable mono mscoree)
534 - $(use_with mp3 mpg123)
535 - $(use_with netapi)
536 - $(use_with nls gettext)
537 - $(use_with openal)
538 - $(use_with opencl)
539 - $(use_with opengl)
540 - $(use_with osmesa)
541 - $(use_with oss)
542 - $(use_with pcap)
543 - $(use_with png)
544 - $(use_with pulseaudio pulse)
545 - $(use_with threads pthread)
546 - $(use_with scanner sane)
547 - $(use_enable test tests)
548 - $(use_with truetype freetype)
549 - $(use_with udev)
550 - $(use_with v4l)
551 - $(use_with X x)
552 - $(use_with xcomposite)
553 - $(use_with xinerama)
554 - $(use_with xml)
555 - $(use_with xml xslt)
556 - )
557 -
558 - use staging && myconf+=(
559 - --with-xattr
560 - $(use_with themes gtk3)
561 - $(use_with vaapi va)
562 - )
563 -
564 - local PKG_CONFIG AR RANLIB
565 - # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
566 - # set AR and RANLIB to make QA scripts happy; #483342
567 - tc-export PKG_CONFIG AR RANLIB
568 -
569 - if use amd64; then
570 - if [[ ${ABI} == amd64 ]]; then
571 - myconf+=( --enable-win64 )
572 - else
573 - myconf+=( --disable-win64 )
574 - fi
575 -
576 - # Note: using --with-wine64 results in problems with multilib.eclass
577 - # CC/LD hackery. We're using separate tools instead.
578 - fi
579 -
580 - ECONF_SOURCE=${S} \
581 - econf "${myconf[@]}"
582 - emake depend
583 -}
584 -
585 -multilib_src_test() {
586 - # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
587 - if [[ ${ABI} == x86 ]]; then
588 - if [[ $(id -u) == 0 ]]; then
589 - ewarn "Skipping tests since they cannot be run under the root user."
590 - ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
591 - return
592 - fi
593 -
594 - WINEPREFIX="${T}/.wine-${ABI}" \
595 - Xemake test
596 - fi
597 -}
598 -
599 -multilib_src_install_all() {
600 - local DOCS=( ANNOUNCE AUTHORS README )
601 - add_locale_docs() {
602 - local locale_doc="documentation/README.$1"
603 - [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
604 - }
605 - l10n_for_each_locale_do add_locale_docs
606 -
607 - einstalldocs
608 - prune_libtool_files --all
609 -
610 - if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
611 - rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
612 - "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
613 - fi
614 -
615 - # Remove wineconsole if neither backend is installed #551124
616 - if ! use X && ! use ncurses; then
617 - rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
618 - rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
619 - rm_wineconsole() {
620 - rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
621 - }
622 - multilib_foreach_abi rm_wineconsole
623 - fi
624 -
625 - use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
626 - use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
627 -
628 - if use abi_x86_64 && ! use abi_x86_32; then
629 - dosym wine64 "${MY_PREFIX}"/bin/wine # 404331
630 - dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader
631 - fi
632 -
633 - # Failglob for bin and man loops
634 - local glob_state=$(shopt -p failglob)
635 - shopt -s failglob
636 -
637 - # Make wrappers for binaries for handling multiple variants
638 - # Note: wrappers instead of symlinks because some are shell which use basename
639 - local b
640 - for b in "${D%/}${MY_PREFIX}"/bin/*; do
641 - make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
642 - done
643 -
644 - # respect LINGUAS when installing man pages, #469418
645 - local l
646 - for l in de fr pl; do
647 - use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}*
648 - done
649 -
650 - eval "${glob_state}"
651 -}
652 -
653 -pkg_postinst() {
654 - eselect wine register ${P}
655 - if [[ ${PN} == "wine-vanilla" ]]; then
656 - eselect wine register --vanilla ${P} || die
657 - else
658 - if use staging; then
659 - eselect wine register --staging ${P} || die
660 - fi
661 - fi
662 -
663 - eselect wine update --all --if-unset || die
664 -
665 - xdg_desktop_database_update
666 -
667 - if ! use gecko; then
668 - ewarn "Without Wine Gecko, wine prefixes will not have a default"
669 - ewarn "implementation of iexplore. Many older windows applications"
670 - ewarn "rely upon the existence of an iexplore implementation, so"
671 - ewarn "you will likely need to install an external one, like via winetricks"
672 - fi
673 - if ! use mono; then
674 - ewarn "Without Wine Mono, wine prefixes will not have a default"
675 - ewarn "implementation of .NET. Many windows applications rely upon"
676 - ewarn "the existence of a .NET implementation, so you will likely need"
677 - ewarn "to install an external one, like via winetricks"
678 - fi
679 -}
680 -
681 -pkg_prerm() {
682 - eselect wine deregister ${P}
683 - if [[ ${PN} == "wine-vanilla" ]]; then
684 - eselect wine deregister --vanilla ${P} || die
685 - else
686 - if use staging; then
687 - eselect wine deregister --staging ${P} || die
688 - fi
689 - fi
690 -
691 - eselect wine update --all --if-unset || die
692 -}
693 -
694 -pkg_postrm() {
695 - xdg_desktop_database_update
696 -}
697
698 diff --git a/app-emulation/wine-staging/wine-staging-2.1-r1.ebuild b/app-emulation/wine-staging/wine-staging-2.1-r1.ebuild
699 deleted file mode 100644
700 index 1177c5533ac..00000000000
701 --- a/app-emulation/wine-staging/wine-staging-2.1-r1.ebuild
702 +++ /dev/null
703 @@ -1,607 +0,0 @@
704 -# Copyright 1999-2017 Gentoo Foundation
705 -# Distributed under the terms of the GNU General Public License v2
706 -
707 -EAPI=6
708 -
709 -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"
710 -PLOCALE_BACKUP="en"
711 -
712 -inherit autotools eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils
713 -
714 -MY_PN="${PN%%-*}"
715 -MY_P="${MY_PN}-${PV}"
716 -
717 -if [[ ${PV} == "9999" ]] ; then
718 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
719 - EGIT_BRANCH="master"
720 - inherit git-r3
721 - SRC_URI=""
722 - #KEYWORDS=""
723 -else
724 - MAJOR_V=$(get_version_component_range 1)
725 - SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
726 - KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
727 -fi
728 -S="${WORKDIR}/${MY_P}"
729 -
730 -STAGING_P="wine-staging-${PV}"
731 -STAGING_DIR="${WORKDIR}/${STAGING_P}"
732 -GWP_V="20170830"
733 -PATCHDIR="${WORKDIR}/gentoo-wine-patches"
734 -
735 -DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset"
736 -HOMEPAGE="https://www.winehq.org/"
737 -SRC_URI="${SRC_URI}
738 - https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
739 -"
740 -
741 -if [[ ${PV} == "9999" ]] ; then
742 - STAGING_EGIT_REPO_URI="https://github.com/wine-compholio/wine-staging.git"
743 -else
744 - SRC_URI="${SRC_URI}
745 - staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
746 -fi
747 -
748 -LICENSE="LGPL-2.1"
749 -SLOT="${PV}"
750 -IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags 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"
751 -REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
752 - X? ( truetype )
753 - elibc_glibc? ( threads )
754 - osmesa? ( opengl )
755 - pipelight? ( staging )
756 - s3tc? ( staging )
757 - test? ( abi_x86_32 )
758 - themes? ( staging )
759 - vaapi? ( staging )" # osmesa-opengl #286560 # X-truetype #551124
760 -
761 -# FIXME: the test suite is unsuitable for us; many tests require net access
762 -# or fail due to Xvfb's opengl limitations.
763 -RESTRICT="test"
764 -
765 -COMMON_DEPEND="
766 - X? (
767 - x11-libs/libXcursor[${MULTILIB_USEDEP}]
768 - x11-libs/libXext[${MULTILIB_USEDEP}]
769 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
770 - x11-libs/libXi[${MULTILIB_USEDEP}]
771 - x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
772 - )
773 - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
774 - capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
775 - cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
776 - fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
777 - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
778 - gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
779 - gstreamer? (
780 - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
781 - media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
782 - )
783 - jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
784 - lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
785 - ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
786 - mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
787 - ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] )
788 - netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
789 - nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
790 - odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
791 - openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
792 - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
793 - opengl? (
794 - virtual/glu[${MULTILIB_USEDEP}]
795 - virtual/opengl[${MULTILIB_USEDEP}]
796 - )
797 - osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] )
798 - pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
799 - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
800 - pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
801 - scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
802 - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
803 - staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
804 - themes? (
805 - dev-libs/glib:2[${MULTILIB_USEDEP}]
806 - x11-libs/cairo[${MULTILIB_USEDEP}]
807 - x11-libs/gtk+:3[${MULTILIB_USEDEP}]
808 - )
809 - truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
810 - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
811 - udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
812 - v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
813 - vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
814 - xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
815 - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
816 - xml? (
817 - dev-libs/libxml2[${MULTILIB_USEDEP}]
818 - dev-libs/libxslt[${MULTILIB_USEDEP}]
819 - )
820 - abi_x86_32? (
821 - !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
822 - !<app-emulation/emul-linux-x86-baselibs-20140508-r14
823 - !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
824 - !<app-emulation/emul-linux-x86-db-20140508-r3
825 - !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
826 - !<app-emulation/emul-linux-x86-medialibs-20140508-r6
827 - !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
828 - !<app-emulation/emul-linux-x86-opengl-20140508-r1
829 - !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
830 - !<app-emulation/emul-linux-x86-sdl-20140508-r1
831 - !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
832 - !<app-emulation/emul-linux-x86-soundlibs-20140508
833 - !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
834 - !<app-emulation/emul-linux-x86-xlibs-20140508
835 - )"
836 -
837 -RDEPEND="${COMMON_DEPEND}
838 - app-emulation/wine-desktop-common
839 - >app-eselect/eselect-wine-0.3
840 - !app-emulation/wine:0
841 - dos? ( >=games-emulation/dosbox-0.74_p20160629 )
842 - gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
843 - mono? ( app-emulation/wine-mono:4.6.4 )
844 - perl? (
845 - dev-lang/perl
846 - dev-perl/XML-Simple
847 - )
848 - pulseaudio? (
849 - realtime? ( sys-auth/rtkit )
850 - )
851 - s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] )
852 - samba? ( >=net-fs/samba-3.0.25[winbind] )
853 - selinux? ( sec-policy/selinux-wine )
854 - udisks? ( sys-fs/udisks:2 )"
855 -
856 -# tools/make_requests requires perl
857 -DEPEND="${COMMON_DEPEND}
858 - sys-devel/flex
859 - >=sys-kernel/linux-headers-2.6
860 - virtual/pkgconfig
861 - virtual/yacc
862 - X? (
863 - x11-proto/inputproto
864 - x11-proto/xextproto
865 - x11-proto/xf86vidmodeproto
866 - )
867 - prelink? ( sys-devel/prelink )
868 - staging? (
869 - dev-lang/perl
870 - dev-perl/XML-Simple
871 - )
872 - xinerama? ( x11-proto/xineramaproto )"
873 -
874 -# These use a non-standard "Wine" category, which is provided by
875 -# /etc/xdg/applications-merged/wine.menu
876 -QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
877 -usr/share/applications/wine-notepad.desktop
878 -usr/share/applications/wine-uninstaller.desktop
879 -usr/share/applications/wine-winecfg.desktop"
880 -
881 -PATCHES=(
882 - "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
883 - "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
884 - "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
885 - "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
886 - "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
887 - "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
888 -)
889 -PATCHES_BIN=(
890 - "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
891 -)
892 -
893 -# https://bugs.gentoo.org/show_bug.cgi?id=635222
894 -if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then
895 - DEPEND+=" dev-util/patchbin"
896 -fi
897 -
898 -wine_compiler_check() {
899 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
900 -
901 - # GCC-specific bugs
902 - if tc-is-gcc; then
903 - # bug #549768
904 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
905 - ebegin "Checking for gcc-5 ms_abi compiler bug"
906 - $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
907 - # Run in subshell to prevent "Aborted" message
908 - ( "${T}"/pr66838 || false ) >/dev/null 2>&1
909 - if ! eend $?; then
910 - eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
911 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
912 - eerror "or use gcc-config to select a different compiler version."
913 - eerror "See https://bugs.gentoo.org/549768"
914 - eerror
915 - return 1
916 - fi
917 - fi
918 - # bug #574044
919 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
920 - ebegin "Checking for gcc-5-3 stack realignment compiler bug"
921 - # Compile in subshell to prevent "Aborted" message
922 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
923 - if ! eend $?; then
924 - eerror "Wine cannot be built with this version of gcc-5.3"
925 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
926 - eerror "or use gcc-config to select a different compiler version."
927 - eerror "See https://bugs.gentoo.org/574044"
928 - eerror
929 - return 1
930 - fi
931 - fi
932 - fi
933 -
934 - # Ensure compiler support
935 - if use abi_x86_64; then
936 - ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
937 - # Compile in subshell to prevent "Aborted" message
938 - ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
939 - if ! eend $?; then
940 - eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
941 - eerror
942 - eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine"
943 - eerror
944 - return 1
945 - fi
946 - fi
947 -}
948 -
949 -wine_build_environment_check() {
950 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
951 -
952 - if use abi_x86_64; then
953 - if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
954 - eerror "You need gcc-4.4+ to compile 64-bit wine"
955 - die
956 - elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
957 - eerror "You need clang-3.8+ to compile 64-bit wine"
958 - die
959 - fi
960 - fi
961 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
962 - ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
963 - ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
964 - ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
965 - fi
966 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
967 - if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
968 - ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work"
969 - ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
970 - ewarn "See package.env in man 5 portage for more information on how to do this."
971 - ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
972 - fi
973 - fi
974 -
975 - if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then
976 - eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
977 - eerror "See https://bugs.gentoo.org/487864 for more details."
978 - eerror
979 - return 1
980 - fi
981 -}
982 -
983 -wine_env_vcs_vars() {
984 - local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
985 - local pn_live_val="${pn_live_var}"
986 - eval pn_live_val='$'${pn_live_val}
987 - if [[ ! -z ${pn_live_val} ]]; then
988 - if use staging; then
989 - eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}"
990 - eerror "cannot be used to set the commit. Instead, you may use the"
991 - eerror "environmental variables WINE_COMMIT, and STAGING_COMMIT."
992 - eerror
993 - return 1
994 - fi
995 - fi
996 - if [[ ! -z ${EGIT_COMMIT} ]]; then
997 - eerror "Commits must now be specified using the environmental variables"
998 - eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT"
999 - eerror
1000 - return 1
1001 - fi
1002 -}
1003 -
1004 -pkg_pretend() {
1005 - wine_build_environment_check || die
1006 -
1007 - # Verify OSS support
1008 - if use oss && ! use kernel_FreeBSD; then
1009 - if ! has_version ">=media-sound/oss-4"; then
1010 - eerror "You cannot build wine with USE=oss without having support from a"
1011 - eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)"
1012 - eerror
1013 - die
1014 - fi
1015 - fi
1016 -}
1017 -
1018 -pkg_setup() {
1019 - wine_build_environment_check || die
1020 - wine_env_vcs_vars || die
1021 -
1022 - WINE_VARIANT="${PN#wine}-${PV}"
1023 - WINE_VARIANT="${WINE_VARIANT#-}"
1024 -
1025 - MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
1026 - MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
1027 - MY_DATADIR="${MY_DATAROOTDIR}"
1028 - MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
1029 - MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
1030 - MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
1031 - MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
1032 - MY_MANDIR="${MY_DATADIR}/man"
1033 -}
1034 -
1035 -src_unpack() {
1036 - if [[ ${PV} == "9999" ]] ; then
1037 - EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
1038 - if use staging; then
1039 - local CURRENT_WINE_COMMIT=${EGIT_VERSION}
1040 -
1041 - git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}"
1042 - git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}"
1043 -
1044 - local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die
1045 -
1046 - if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then
1047 - einfo "The current Staging patchset is not guaranteed to apply on this WINE commit."
1048 - einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT."
1049 - einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine"
1050 - fi
1051 - fi
1052 - fi
1053 -
1054 - default
1055 -
1056 - l10n_find_plocales_changes "${S}/po" "" ".po"
1057 -}
1058 -
1059 -src_prepare() {
1060 -
1061 - eapply_bin(){
1062 - local patch
1063 - for patch in ${PATCHES_BIN[@]}; do
1064 - patchbin --nogit < "${patch}" || die
1065 - done
1066 - }
1067 -
1068 - local md5="$(md5sum server/protocol.def)"
1069 -
1070 - if use staging; then
1071 - ewarn "Applying the Wine-Staging patchset. Any bug reports to the"
1072 - ewarn "Wine bugzilla should explicitly state that staging was used."
1073 -
1074 - local STAGING_EXCLUDE=""
1075 - STAGING_EXCLUDE="${STAGING_EXCLUDE} -W winhlp32-Flex_Workaround" # Avoid double patching https://bugs.winehq.org/show_bug.cgi?id=42132
1076 - use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
1077 -
1078 - # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches
1079 - ebegin "Running Wine-Staging patch installer"
1080 - (
1081 - set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE}
1082 - cd "${STAGING_DIR}/patches"
1083 - source "${STAGING_DIR}/patches/patchinstall.sh"
1084 - )
1085 - eend $? || die "Failed to apply Wine-Staging patches"
1086 - fi
1087 -
1088 - default
1089 - eapply_bin
1090 - eautoreconf
1091 -
1092 - # Modification of the server protocol requires regenerating the server requests
1093 - if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
1094 - einfo "server/protocol.def was patched; running tools/make_requests"
1095 - tools/make_requests || die #432348
1096 - fi
1097 - sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
1098 - if ! use run-exes; then
1099 - sed -i '/^MimeType/d' loader/wine.desktop || die #117785
1100 - fi
1101 -
1102 - # Edit wine.desktop to work for specific variant
1103 - sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
1104 -
1105 - # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
1106 - cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
1107 -
1108 - l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
1109 -}
1110 -
1111 -src_configure() {
1112 - wine_compiler_check || die
1113 -
1114 - export LDCONFIG=/bin/true
1115 - use custom-cflags || strip-flags
1116 -
1117 - multilib-minimal_src_configure
1118 -}
1119 -
1120 -multilib_src_configure() {
1121 - local myconf=(
1122 - --prefix="${MY_PREFIX}"
1123 - --datarootdir="${MY_DATAROOTDIR}"
1124 - --datadir="${MY_DATADIR}"
1125 - --docdir="${MY_DOCDIR}"
1126 - --includedir="${MY_INCLUDEDIR}"
1127 - --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
1128 - --libexecdir="${MY_LIBEXECDIR}"
1129 - --localstatedir="${MY_LOCALSTATEDIR}"
1130 - --mandir="${MY_MANDIR}"
1131 - --sysconfdir=/etc/wine
1132 - $(use_with alsa)
1133 - $(use_with capi)
1134 - $(use_with lcms cms)
1135 - $(use_with cups)
1136 - $(use_with ncurses curses)
1137 - $(use_with udisks dbus)
1138 - $(use_with fontconfig)
1139 - $(use_with ssl gnutls)
1140 - $(use_enable gecko mshtml)
1141 - $(use_with gphoto2 gphoto)
1142 - $(use_with gsm)
1143 - $(use_with gstreamer)
1144 - --without-hal
1145 - $(use_with jpeg)
1146 - $(use_with ldap)
1147 - $(use_enable mono mscoree)
1148 - $(use_with mp3 mpg123)
1149 - $(use_with netapi)
1150 - $(use_with nls gettext)
1151 - $(use_with openal)
1152 - $(use_with opencl)
1153 - $(use_with opengl)
1154 - $(use_with osmesa)
1155 - $(use_with oss)
1156 - $(use_with pcap)
1157 - $(use_with png)
1158 - $(use_with pulseaudio pulse)
1159 - $(use_with threads pthread)
1160 - $(use_with scanner sane)
1161 - $(use_enable test tests)
1162 - $(use_with truetype freetype)
1163 - $(use_with udev)
1164 - $(use_with v4l)
1165 - $(use_with X x)
1166 - $(use_with xcomposite)
1167 - $(use_with xinerama)
1168 - $(use_with xml)
1169 - $(use_with xml xslt)
1170 - )
1171 -
1172 - use staging && myconf+=(
1173 - --with-xattr
1174 - $(use_with themes gtk3)
1175 - $(use_with vaapi va)
1176 - )
1177 -
1178 - local PKG_CONFIG AR RANLIB
1179 - # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
1180 - # set AR and RANLIB to make QA scripts happy; #483342
1181 - tc-export PKG_CONFIG AR RANLIB
1182 -
1183 - if use amd64; then
1184 - if [[ ${ABI} == amd64 ]]; then
1185 - myconf+=( --enable-win64 )
1186 - else
1187 - myconf+=( --disable-win64 )
1188 - fi
1189 -
1190 - # Note: using --with-wine64 results in problems with multilib.eclass
1191 - # CC/LD hackery. We're using separate tools instead.
1192 - fi
1193 -
1194 - ECONF_SOURCE=${S} \
1195 - econf "${myconf[@]}"
1196 - emake depend
1197 -}
1198 -
1199 -multilib_src_test() {
1200 - # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
1201 - if [[ ${ABI} == x86 ]]; then
1202 - if [[ $(id -u) == 0 ]]; then
1203 - ewarn "Skipping tests since they cannot be run under the root user."
1204 - ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
1205 - return
1206 - fi
1207 -
1208 - WINEPREFIX="${T}/.wine-${ABI}" \
1209 - Xemake test
1210 - fi
1211 -}
1212 -
1213 -multilib_src_install_all() {
1214 - local DOCS=( ANNOUNCE AUTHORS README )
1215 - add_locale_docs() {
1216 - local locale_doc="documentation/README.$1"
1217 - [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
1218 - }
1219 - l10n_for_each_locale_do add_locale_docs
1220 -
1221 - einstalldocs
1222 - prune_libtool_files --all
1223 -
1224 - if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
1225 - rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
1226 - "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
1227 - fi
1228 -
1229 - # Remove wineconsole if neither backend is installed #551124
1230 - if ! use X && ! use ncurses; then
1231 - rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
1232 - rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
1233 - rm_wineconsole() {
1234 - rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
1235 - }
1236 - multilib_foreach_abi rm_wineconsole
1237 - fi
1238 -
1239 - use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
1240 - use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
1241 -
1242 - if use abi_x86_64 && ! use abi_x86_32; then
1243 - dosym wine64 "${MY_PREFIX}"/bin/wine # 404331
1244 - dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader
1245 - fi
1246 -
1247 - # Failglob for bin and man loops
1248 - local glob_state=$(shopt -p failglob)
1249 - shopt -s failglob
1250 -
1251 - # Make wrappers for binaries for handling multiple variants
1252 - # Note: wrappers instead of symlinks because some are shell which use basename
1253 - local b
1254 - for b in "${D%/}${MY_PREFIX}"/bin/*; do
1255 - make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
1256 - done
1257 -
1258 - # respect LINGUAS when installing man pages, #469418
1259 - local l
1260 - for l in de fr pl; do
1261 - use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}*
1262 - done
1263 -
1264 - eval "${glob_state}"
1265 -}
1266 -
1267 -pkg_postinst() {
1268 - eselect wine register ${P}
1269 - if [[ ${PN} == "wine-vanilla" ]]; then
1270 - eselect wine register --vanilla ${P} || die
1271 - else
1272 - if use staging; then
1273 - eselect wine register --staging ${P} || die
1274 - fi
1275 - fi
1276 -
1277 - eselect wine update --all --if-unset || die
1278 -
1279 - xdg_desktop_database_update
1280 -
1281 - if ! use gecko; then
1282 - ewarn "Without Wine Gecko, wine prefixes will not have a default"
1283 - ewarn "implementation of iexplore. Many older windows applications"
1284 - ewarn "rely upon the existence of an iexplore implementation, so"
1285 - ewarn "you will likely need to install an external one, like via winetricks"
1286 - fi
1287 - if ! use mono; then
1288 - ewarn "Without Wine Mono, wine prefixes will not have a default"
1289 - ewarn "implementation of .NET. Many windows applications rely upon"
1290 - ewarn "the existence of a .NET implementation, so you will likely need"
1291 - ewarn "to install an external one, like via winetricks"
1292 - fi
1293 -}
1294 -
1295 -pkg_prerm() {
1296 - eselect wine deregister ${P}
1297 - if [[ ${PN} == "wine-vanilla" ]]; then
1298 - eselect wine deregister --vanilla ${P} || die
1299 - else
1300 - if use staging; then
1301 - eselect wine deregister --staging ${P} || die
1302 - fi
1303 - fi
1304 -
1305 - eselect wine update --all --if-unset || die
1306 -}
1307 -
1308 -pkg_postrm() {
1309 - xdg_desktop_database_update
1310 -}
1311
1312 diff --git a/app-emulation/wine-staging/wine-staging-2.10-r1.ebuild b/app-emulation/wine-staging/wine-staging-2.10-r1.ebuild
1313 deleted file mode 100644
1314 index b119a5cd863..00000000000
1315 --- a/app-emulation/wine-staging/wine-staging-2.10-r1.ebuild
1316 +++ /dev/null
1317 @@ -1,609 +0,0 @@
1318 -# Copyright 1999-2017 Gentoo Foundation
1319 -# Distributed under the terms of the GNU General Public License v2
1320 -
1321 -EAPI=6
1322 -
1323 -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"
1324 -PLOCALE_BACKUP="en"
1325 -
1326 -inherit autotools eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils
1327 -
1328 -MY_PN="${PN%%-*}"
1329 -MY_P="${MY_PN}-${PV}"
1330 -
1331 -if [[ ${PV} == "9999" ]] ; then
1332 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
1333 - EGIT_BRANCH="master"
1334 - inherit git-r3
1335 - SRC_URI=""
1336 - #KEYWORDS=""
1337 -else
1338 - MAJOR_V=$(get_version_component_range 1)
1339 - SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
1340 - KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
1341 -fi
1342 -S="${WORKDIR}/${MY_P}"
1343 -
1344 -STAGING_P="wine-staging-${PV}"
1345 -STAGING_DIR="${WORKDIR}/${STAGING_P}"
1346 -GWP_V="20170830"
1347 -PATCHDIR="${WORKDIR}/gentoo-wine-patches"
1348 -
1349 -DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset"
1350 -HOMEPAGE="https://www.winehq.org/"
1351 -SRC_URI="${SRC_URI}
1352 - https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
1353 -"
1354 -
1355 -if [[ ${PV} == "9999" ]] ; then
1356 - STAGING_EGIT_REPO_URI="https://github.com/wine-compholio/wine-staging.git"
1357 -else
1358 - SRC_URI="${SRC_URI}
1359 - staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
1360 -fi
1361 -
1362 -LICENSE="LGPL-2.1"
1363 -SLOT="${PV}"
1364 -IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags 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"
1365 -REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
1366 - X? ( truetype )
1367 - elibc_glibc? ( threads )
1368 - osmesa? ( opengl )
1369 - pipelight? ( staging )
1370 - s3tc? ( staging )
1371 - test? ( abi_x86_32 )
1372 - themes? ( staging )
1373 - vaapi? ( staging )" # osmesa-opengl #286560 # X-truetype #551124
1374 -
1375 -# FIXME: the test suite is unsuitable for us; many tests require net access
1376 -# or fail due to Xvfb's opengl limitations.
1377 -RESTRICT="test"
1378 -
1379 -COMMON_DEPEND="
1380 - X? (
1381 - x11-libs/libXcursor[${MULTILIB_USEDEP}]
1382 - x11-libs/libXext[${MULTILIB_USEDEP}]
1383 - x11-libs/libXfixes[${MULTILIB_USEDEP}]
1384 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
1385 - x11-libs/libXi[${MULTILIB_USEDEP}]
1386 - x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
1387 - )
1388 - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
1389 - capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
1390 - cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
1391 - fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
1392 - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
1393 - gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
1394 - gstreamer? (
1395 - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
1396 - media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
1397 - )
1398 - jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
1399 - lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
1400 - ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
1401 - mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
1402 - ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] )
1403 - netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
1404 - nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
1405 - odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
1406 - openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
1407 - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
1408 - opengl? (
1409 - virtual/glu[${MULTILIB_USEDEP}]
1410 - virtual/opengl[${MULTILIB_USEDEP}]
1411 - )
1412 - osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] )
1413 - pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
1414 - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
1415 - pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
1416 - scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
1417 - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
1418 - staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
1419 - themes? (
1420 - dev-libs/glib:2[${MULTILIB_USEDEP}]
1421 - x11-libs/cairo[${MULTILIB_USEDEP}]
1422 - x11-libs/gtk+:3[${MULTILIB_USEDEP}]
1423 - )
1424 - truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
1425 - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
1426 - udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
1427 - v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
1428 - vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
1429 - xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
1430 - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
1431 - xml? (
1432 - dev-libs/libxml2[${MULTILIB_USEDEP}]
1433 - dev-libs/libxslt[${MULTILIB_USEDEP}]
1434 - )
1435 - abi_x86_32? (
1436 - !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
1437 - !<app-emulation/emul-linux-x86-baselibs-20140508-r14
1438 - !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
1439 - !<app-emulation/emul-linux-x86-db-20140508-r3
1440 - !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
1441 - !<app-emulation/emul-linux-x86-medialibs-20140508-r6
1442 - !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
1443 - !<app-emulation/emul-linux-x86-opengl-20140508-r1
1444 - !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
1445 - !<app-emulation/emul-linux-x86-sdl-20140508-r1
1446 - !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
1447 - !<app-emulation/emul-linux-x86-soundlibs-20140508
1448 - !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
1449 - !<app-emulation/emul-linux-x86-xlibs-20140508
1450 - )"
1451 -
1452 -RDEPEND="${COMMON_DEPEND}
1453 - app-emulation/wine-desktop-common
1454 - >app-eselect/eselect-wine-0.3
1455 - !app-emulation/wine:0
1456 - dos? ( >=games-emulation/dosbox-0.74_p20160629 )
1457 - gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
1458 - mono? ( app-emulation/wine-mono:4.7.0 )
1459 - perl? (
1460 - dev-lang/perl
1461 - dev-perl/XML-Simple
1462 - )
1463 - pulseaudio? (
1464 - realtime? ( sys-auth/rtkit )
1465 - )
1466 - s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] )
1467 - samba? ( >=net-fs/samba-3.0.25[winbind] )
1468 - selinux? ( sec-policy/selinux-wine )
1469 - udisks? ( sys-fs/udisks:2 )"
1470 -
1471 -# tools/make_requests requires perl
1472 -DEPEND="${COMMON_DEPEND}
1473 - sys-devel/flex
1474 - >=sys-kernel/linux-headers-2.6
1475 - virtual/pkgconfig
1476 - virtual/yacc
1477 - X? (
1478 - x11-proto/inputproto
1479 - x11-proto/xextproto
1480 - x11-proto/xf86vidmodeproto
1481 - )
1482 - prelink? ( sys-devel/prelink )
1483 - staging? (
1484 - dev-lang/perl
1485 - dev-perl/XML-Simple
1486 - )
1487 - xinerama? ( x11-proto/xineramaproto )"
1488 -
1489 -# These use a non-standard "Wine" category, which is provided by
1490 -# /etc/xdg/applications-merged/wine.menu
1491 -QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
1492 -usr/share/applications/wine-notepad.desktop
1493 -usr/share/applications/wine-uninstaller.desktop
1494 -usr/share/applications/wine-winecfg.desktop"
1495 -
1496 -PATCHES=(
1497 - "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
1498 - "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
1499 - "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
1500 - "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
1501 - "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
1502 - "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
1503 -)
1504 -PATCHES_BIN=(
1505 - "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
1506 -)
1507 -
1508 -# https://bugs.gentoo.org/show_bug.cgi?id=635222
1509 -if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then
1510 - DEPEND+=" dev-util/patchbin"
1511 -fi
1512 -
1513 -wine_compiler_check() {
1514 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
1515 -
1516 - # GCC-specific bugs
1517 - if tc-is-gcc; then
1518 - # bug #549768
1519 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
1520 - ebegin "Checking for gcc-5 ms_abi compiler bug"
1521 - $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
1522 - # Run in subshell to prevent "Aborted" message
1523 - ( "${T}"/pr66838 || false ) >/dev/null 2>&1
1524 - if ! eend $?; then
1525 - eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
1526 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
1527 - eerror "or use gcc-config to select a different compiler version."
1528 - eerror "See https://bugs.gentoo.org/549768"
1529 - eerror
1530 - return 1
1531 - fi
1532 - fi
1533 - # bug #574044
1534 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
1535 - ebegin "Checking for gcc-5-3 stack realignment compiler bug"
1536 - # Compile in subshell to prevent "Aborted" message
1537 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
1538 - if ! eend $?; then
1539 - eerror "Wine cannot be built with this version of gcc-5.3"
1540 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
1541 - eerror "or use gcc-config to select a different compiler version."
1542 - eerror "See https://bugs.gentoo.org/574044"
1543 - eerror
1544 - return 1
1545 - fi
1546 - fi
1547 - fi
1548 -
1549 - # Ensure compiler support
1550 - if use abi_x86_64; then
1551 - ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
1552 - # Compile in subshell to prevent "Aborted" message
1553 - ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
1554 - if ! eend $?; then
1555 - eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
1556 - eerror
1557 - eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine"
1558 - eerror
1559 - return 1
1560 - fi
1561 - fi
1562 -}
1563 -
1564 -wine_build_environment_check() {
1565 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
1566 -
1567 - if use abi_x86_64; then
1568 - if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
1569 - eerror "You need gcc-4.4+ to compile 64-bit wine"
1570 - die
1571 - elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
1572 - eerror "You need clang-3.8+ to compile 64-bit wine"
1573 - die
1574 - fi
1575 - fi
1576 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
1577 - ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
1578 - ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
1579 - ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
1580 - fi
1581 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
1582 - if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
1583 - ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work"
1584 - ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
1585 - ewarn "See package.env in man 5 portage for more information on how to do this."
1586 - ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
1587 - fi
1588 - fi
1589 -
1590 - if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then
1591 - eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
1592 - eerror "See https://bugs.gentoo.org/487864 for more details."
1593 - eerror
1594 - return 1
1595 - fi
1596 -}
1597 -
1598 -wine_env_vcs_vars() {
1599 - local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
1600 - local pn_live_val="${pn_live_var}"
1601 - eval pn_live_val='$'${pn_live_val}
1602 - if [[ ! -z ${pn_live_val} ]]; then
1603 - if use staging; then
1604 - eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}"
1605 - eerror "cannot be used to set the commit. Instead, you may use the"
1606 - eerror "environmental variables WINE_COMMIT, and STAGING_COMMIT."
1607 - eerror
1608 - return 1
1609 - fi
1610 - fi
1611 - if [[ ! -z ${EGIT_COMMIT} ]]; then
1612 - eerror "Commits must now be specified using the environmental variables"
1613 - eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT"
1614 - eerror
1615 - return 1
1616 - fi
1617 -}
1618 -
1619 -pkg_pretend() {
1620 - wine_build_environment_check || die
1621 -
1622 - # Verify OSS support
1623 - if use oss && ! use kernel_FreeBSD; then
1624 - if ! has_version ">=media-sound/oss-4"; then
1625 - eerror "You cannot build wine with USE=oss without having support from a"
1626 - eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)"
1627 - eerror
1628 - die
1629 - fi
1630 - fi
1631 -}
1632 -
1633 -pkg_setup() {
1634 - wine_build_environment_check || die
1635 - wine_env_vcs_vars || die
1636 -
1637 - WINE_VARIANT="${PN#wine}-${PV}"
1638 - WINE_VARIANT="${WINE_VARIANT#-}"
1639 -
1640 - MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
1641 - MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
1642 - MY_DATADIR="${MY_DATAROOTDIR}"
1643 - MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
1644 - MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
1645 - MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
1646 - MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
1647 - MY_MANDIR="${MY_DATADIR}/man"
1648 -}
1649 -
1650 -src_unpack() {
1651 - if [[ ${PV} == "9999" ]] ; then
1652 - EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
1653 - if use staging; then
1654 - local CURRENT_WINE_COMMIT=${EGIT_VERSION}
1655 -
1656 - git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}"
1657 - git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}"
1658 -
1659 - local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die
1660 -
1661 - if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then
1662 - einfo "The current Staging patchset is not guaranteed to apply on this WINE commit."
1663 - einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT."
1664 - einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine"
1665 - fi
1666 - fi
1667 - fi
1668 -
1669 - default
1670 -
1671 - l10n_find_plocales_changes "${S}/po" "" ".po"
1672 -}
1673 -
1674 -src_prepare() {
1675 -
1676 - eapply_bin(){
1677 - local patch
1678 - for patch in ${PATCHES_BIN[@]}; do
1679 - patchbin --nogit < "${patch}" || die
1680 - done
1681 - }
1682 -
1683 - local md5="$(md5sum server/protocol.def)"
1684 -
1685 - if use staging; then
1686 - ewarn "Applying the Wine-Staging patchset. Any bug reports to the"
1687 - ewarn "Wine bugzilla should explicitly state that staging was used."
1688 -
1689 - local STAGING_EXCLUDE=""
1690 - STAGING_EXCLUDE="${STAGING_EXCLUDE} -W winhlp32-Flex_Workaround" # Avoid double patching https://bugs.winehq.org/show_bug.cgi?id=42132
1691 - use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
1692 -
1693 - # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches
1694 - ebegin "Running Wine-Staging patch installer"
1695 - (
1696 - set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE}
1697 - cd "${STAGING_DIR}/patches"
1698 - source "${STAGING_DIR}/patches/patchinstall.sh"
1699 - )
1700 - eend $? || die "Failed to apply Wine-Staging patches"
1701 - fi
1702 -
1703 - default
1704 - eapply_bin
1705 - eautoreconf
1706 -
1707 - # Modification of the server protocol requires regenerating the server requests
1708 - if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
1709 - einfo "server/protocol.def was patched; running tools/make_requests"
1710 - tools/make_requests || die #432348
1711 - fi
1712 - sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
1713 - if ! use run-exes; then
1714 - sed -i '/^MimeType/d' loader/wine.desktop || die #117785
1715 - fi
1716 -
1717 - # Edit wine.desktop to work for specific variant
1718 - sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
1719 -
1720 - # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
1721 - cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
1722 -
1723 - l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
1724 -}
1725 -
1726 -src_configure() {
1727 - wine_compiler_check || die
1728 -
1729 - export LDCONFIG=/bin/true
1730 - use custom-cflags || strip-flags
1731 -
1732 - multilib-minimal_src_configure
1733 -}
1734 -
1735 -multilib_src_configure() {
1736 - local myconf=(
1737 - --prefix="${MY_PREFIX}"
1738 - --datarootdir="${MY_DATAROOTDIR}"
1739 - --datadir="${MY_DATADIR}"
1740 - --docdir="${MY_DOCDIR}"
1741 - --includedir="${MY_INCLUDEDIR}"
1742 - --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
1743 - --libexecdir="${MY_LIBEXECDIR}"
1744 - --localstatedir="${MY_LOCALSTATEDIR}"
1745 - --mandir="${MY_MANDIR}"
1746 - --sysconfdir=/etc/wine
1747 - $(use_with alsa)
1748 - $(use_with capi)
1749 - $(use_with lcms cms)
1750 - $(use_with cups)
1751 - $(use_with ncurses curses)
1752 - $(use_with udisks dbus)
1753 - $(use_with fontconfig)
1754 - $(use_with ssl gnutls)
1755 - $(use_enable gecko mshtml)
1756 - $(use_with gphoto2 gphoto)
1757 - $(use_with gsm)
1758 - $(use_with gstreamer)
1759 - --without-hal
1760 - $(use_with jpeg)
1761 - $(use_with ldap)
1762 - $(use_enable mono mscoree)
1763 - $(use_with mp3 mpg123)
1764 - $(use_with netapi)
1765 - $(use_with nls gettext)
1766 - $(use_with openal)
1767 - $(use_with opencl)
1768 - $(use_with opengl)
1769 - $(use_with osmesa)
1770 - $(use_with oss)
1771 - $(use_with pcap)
1772 - $(use_with png)
1773 - $(use_with pulseaudio pulse)
1774 - $(use_with threads pthread)
1775 - $(use_with scanner sane)
1776 - $(use_enable test tests)
1777 - $(use_with truetype freetype)
1778 - $(use_with udev)
1779 - $(use_with v4l)
1780 - $(use_with X x)
1781 - $(use_with X xfixes)
1782 - $(use_with xcomposite)
1783 - $(use_with xinerama)
1784 - $(use_with xml)
1785 - $(use_with xml xslt)
1786 - )
1787 -
1788 - use staging && myconf+=(
1789 - --with-xattr
1790 - $(use_with themes gtk3)
1791 - $(use_with vaapi va)
1792 - )
1793 -
1794 - local PKG_CONFIG AR RANLIB
1795 - # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
1796 - # set AR and RANLIB to make QA scripts happy; #483342
1797 - tc-export PKG_CONFIG AR RANLIB
1798 -
1799 - if use amd64; then
1800 - if [[ ${ABI} == amd64 ]]; then
1801 - myconf+=( --enable-win64 )
1802 - else
1803 - myconf+=( --disable-win64 )
1804 - fi
1805 -
1806 - # Note: using --with-wine64 results in problems with multilib.eclass
1807 - # CC/LD hackery. We're using separate tools instead.
1808 - fi
1809 -
1810 - ECONF_SOURCE=${S} \
1811 - econf "${myconf[@]}"
1812 - emake depend
1813 -}
1814 -
1815 -multilib_src_test() {
1816 - # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
1817 - if [[ ${ABI} == x86 ]]; then
1818 - if [[ $(id -u) == 0 ]]; then
1819 - ewarn "Skipping tests since they cannot be run under the root user."
1820 - ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
1821 - return
1822 - fi
1823 -
1824 - WINEPREFIX="${T}/.wine-${ABI}" \
1825 - Xemake test
1826 - fi
1827 -}
1828 -
1829 -multilib_src_install_all() {
1830 - local DOCS=( ANNOUNCE AUTHORS README )
1831 - add_locale_docs() {
1832 - local locale_doc="documentation/README.$1"
1833 - [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
1834 - }
1835 - l10n_for_each_locale_do add_locale_docs
1836 -
1837 - einstalldocs
1838 - prune_libtool_files --all
1839 -
1840 - if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
1841 - rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
1842 - "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
1843 - fi
1844 -
1845 - # Remove wineconsole if neither backend is installed #551124
1846 - if ! use X && ! use ncurses; then
1847 - rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
1848 - rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
1849 - rm_wineconsole() {
1850 - rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
1851 - }
1852 - multilib_foreach_abi rm_wineconsole
1853 - fi
1854 -
1855 - use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
1856 - use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
1857 -
1858 - if use abi_x86_64 && ! use abi_x86_32; then
1859 - dosym wine64 "${MY_PREFIX}"/bin/wine # 404331
1860 - dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader
1861 - fi
1862 -
1863 - # Failglob for bin and man loops
1864 - local glob_state=$(shopt -p failglob)
1865 - shopt -s failglob
1866 -
1867 - # Make wrappers for binaries for handling multiple variants
1868 - # Note: wrappers instead of symlinks because some are shell which use basename
1869 - local b
1870 - for b in "${D%/}${MY_PREFIX}"/bin/*; do
1871 - make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
1872 - done
1873 -
1874 - # respect LINGUAS when installing man pages, #469418
1875 - local l
1876 - for l in de fr pl; do
1877 - use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}*
1878 - done
1879 -
1880 - eval "${glob_state}"
1881 -}
1882 -
1883 -pkg_postinst() {
1884 - eselect wine register ${P}
1885 - if [[ ${PN} == "wine-vanilla" ]]; then
1886 - eselect wine register --vanilla ${P} || die
1887 - else
1888 - if use staging; then
1889 - eselect wine register --staging ${P} || die
1890 - fi
1891 - fi
1892 -
1893 - eselect wine update --all --if-unset || die
1894 -
1895 - xdg_desktop_database_update
1896 -
1897 - if ! use gecko; then
1898 - ewarn "Without Wine Gecko, wine prefixes will not have a default"
1899 - ewarn "implementation of iexplore. Many older windows applications"
1900 - ewarn "rely upon the existence of an iexplore implementation, so"
1901 - ewarn "you will likely need to install an external one, like via winetricks"
1902 - fi
1903 - if ! use mono; then
1904 - ewarn "Without Wine Mono, wine prefixes will not have a default"
1905 - ewarn "implementation of .NET. Many windows applications rely upon"
1906 - ewarn "the existence of a .NET implementation, so you will likely need"
1907 - ewarn "to install an external one, like via winetricks"
1908 - fi
1909 -}
1910 -
1911 -pkg_prerm() {
1912 - eselect wine deregister ${P}
1913 - if [[ ${PN} == "wine-vanilla" ]]; then
1914 - eselect wine deregister --vanilla ${P} || die
1915 - else
1916 - if use staging; then
1917 - eselect wine deregister --staging ${P} || die
1918 - fi
1919 - fi
1920 -
1921 - eselect wine update --all --if-unset || die
1922 -}
1923 -
1924 -pkg_postrm() {
1925 - xdg_desktop_database_update
1926 -}
1927
1928 diff --git a/app-emulation/wine-staging/wine-staging-2.11-r1.ebuild b/app-emulation/wine-staging/wine-staging-2.11-r1.ebuild
1929 deleted file mode 100644
1930 index b119a5cd863..00000000000
1931 --- a/app-emulation/wine-staging/wine-staging-2.11-r1.ebuild
1932 +++ /dev/null
1933 @@ -1,609 +0,0 @@
1934 -# Copyright 1999-2017 Gentoo Foundation
1935 -# Distributed under the terms of the GNU General Public License v2
1936 -
1937 -EAPI=6
1938 -
1939 -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"
1940 -PLOCALE_BACKUP="en"
1941 -
1942 -inherit autotools eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils
1943 -
1944 -MY_PN="${PN%%-*}"
1945 -MY_P="${MY_PN}-${PV}"
1946 -
1947 -if [[ ${PV} == "9999" ]] ; then
1948 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
1949 - EGIT_BRANCH="master"
1950 - inherit git-r3
1951 - SRC_URI=""
1952 - #KEYWORDS=""
1953 -else
1954 - MAJOR_V=$(get_version_component_range 1)
1955 - SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
1956 - KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
1957 -fi
1958 -S="${WORKDIR}/${MY_P}"
1959 -
1960 -STAGING_P="wine-staging-${PV}"
1961 -STAGING_DIR="${WORKDIR}/${STAGING_P}"
1962 -GWP_V="20170830"
1963 -PATCHDIR="${WORKDIR}/gentoo-wine-patches"
1964 -
1965 -DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset"
1966 -HOMEPAGE="https://www.winehq.org/"
1967 -SRC_URI="${SRC_URI}
1968 - https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
1969 -"
1970 -
1971 -if [[ ${PV} == "9999" ]] ; then
1972 - STAGING_EGIT_REPO_URI="https://github.com/wine-compholio/wine-staging.git"
1973 -else
1974 - SRC_URI="${SRC_URI}
1975 - staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
1976 -fi
1977 -
1978 -LICENSE="LGPL-2.1"
1979 -SLOT="${PV}"
1980 -IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags 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"
1981 -REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
1982 - X? ( truetype )
1983 - elibc_glibc? ( threads )
1984 - osmesa? ( opengl )
1985 - pipelight? ( staging )
1986 - s3tc? ( staging )
1987 - test? ( abi_x86_32 )
1988 - themes? ( staging )
1989 - vaapi? ( staging )" # osmesa-opengl #286560 # X-truetype #551124
1990 -
1991 -# FIXME: the test suite is unsuitable for us; many tests require net access
1992 -# or fail due to Xvfb's opengl limitations.
1993 -RESTRICT="test"
1994 -
1995 -COMMON_DEPEND="
1996 - X? (
1997 - x11-libs/libXcursor[${MULTILIB_USEDEP}]
1998 - x11-libs/libXext[${MULTILIB_USEDEP}]
1999 - x11-libs/libXfixes[${MULTILIB_USEDEP}]
2000 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
2001 - x11-libs/libXi[${MULTILIB_USEDEP}]
2002 - x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
2003 - )
2004 - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
2005 - capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
2006 - cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
2007 - fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
2008 - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
2009 - gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
2010 - gstreamer? (
2011 - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
2012 - media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
2013 - )
2014 - jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
2015 - lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
2016 - ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
2017 - mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
2018 - ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] )
2019 - netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
2020 - nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
2021 - odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
2022 - openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
2023 - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
2024 - opengl? (
2025 - virtual/glu[${MULTILIB_USEDEP}]
2026 - virtual/opengl[${MULTILIB_USEDEP}]
2027 - )
2028 - osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] )
2029 - pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
2030 - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
2031 - pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
2032 - scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
2033 - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
2034 - staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
2035 - themes? (
2036 - dev-libs/glib:2[${MULTILIB_USEDEP}]
2037 - x11-libs/cairo[${MULTILIB_USEDEP}]
2038 - x11-libs/gtk+:3[${MULTILIB_USEDEP}]
2039 - )
2040 - truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
2041 - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
2042 - udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
2043 - v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
2044 - vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
2045 - xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
2046 - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
2047 - xml? (
2048 - dev-libs/libxml2[${MULTILIB_USEDEP}]
2049 - dev-libs/libxslt[${MULTILIB_USEDEP}]
2050 - )
2051 - abi_x86_32? (
2052 - !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
2053 - !<app-emulation/emul-linux-x86-baselibs-20140508-r14
2054 - !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
2055 - !<app-emulation/emul-linux-x86-db-20140508-r3
2056 - !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
2057 - !<app-emulation/emul-linux-x86-medialibs-20140508-r6
2058 - !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
2059 - !<app-emulation/emul-linux-x86-opengl-20140508-r1
2060 - !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
2061 - !<app-emulation/emul-linux-x86-sdl-20140508-r1
2062 - !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
2063 - !<app-emulation/emul-linux-x86-soundlibs-20140508
2064 - !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
2065 - !<app-emulation/emul-linux-x86-xlibs-20140508
2066 - )"
2067 -
2068 -RDEPEND="${COMMON_DEPEND}
2069 - app-emulation/wine-desktop-common
2070 - >app-eselect/eselect-wine-0.3
2071 - !app-emulation/wine:0
2072 - dos? ( >=games-emulation/dosbox-0.74_p20160629 )
2073 - gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
2074 - mono? ( app-emulation/wine-mono:4.7.0 )
2075 - perl? (
2076 - dev-lang/perl
2077 - dev-perl/XML-Simple
2078 - )
2079 - pulseaudio? (
2080 - realtime? ( sys-auth/rtkit )
2081 - )
2082 - s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] )
2083 - samba? ( >=net-fs/samba-3.0.25[winbind] )
2084 - selinux? ( sec-policy/selinux-wine )
2085 - udisks? ( sys-fs/udisks:2 )"
2086 -
2087 -# tools/make_requests requires perl
2088 -DEPEND="${COMMON_DEPEND}
2089 - sys-devel/flex
2090 - >=sys-kernel/linux-headers-2.6
2091 - virtual/pkgconfig
2092 - virtual/yacc
2093 - X? (
2094 - x11-proto/inputproto
2095 - x11-proto/xextproto
2096 - x11-proto/xf86vidmodeproto
2097 - )
2098 - prelink? ( sys-devel/prelink )
2099 - staging? (
2100 - dev-lang/perl
2101 - dev-perl/XML-Simple
2102 - )
2103 - xinerama? ( x11-proto/xineramaproto )"
2104 -
2105 -# These use a non-standard "Wine" category, which is provided by
2106 -# /etc/xdg/applications-merged/wine.menu
2107 -QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
2108 -usr/share/applications/wine-notepad.desktop
2109 -usr/share/applications/wine-uninstaller.desktop
2110 -usr/share/applications/wine-winecfg.desktop"
2111 -
2112 -PATCHES=(
2113 - "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
2114 - "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
2115 - "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
2116 - "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
2117 - "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
2118 - "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
2119 -)
2120 -PATCHES_BIN=(
2121 - "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
2122 -)
2123 -
2124 -# https://bugs.gentoo.org/show_bug.cgi?id=635222
2125 -if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then
2126 - DEPEND+=" dev-util/patchbin"
2127 -fi
2128 -
2129 -wine_compiler_check() {
2130 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
2131 -
2132 - # GCC-specific bugs
2133 - if tc-is-gcc; then
2134 - # bug #549768
2135 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
2136 - ebegin "Checking for gcc-5 ms_abi compiler bug"
2137 - $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
2138 - # Run in subshell to prevent "Aborted" message
2139 - ( "${T}"/pr66838 || false ) >/dev/null 2>&1
2140 - if ! eend $?; then
2141 - eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
2142 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
2143 - eerror "or use gcc-config to select a different compiler version."
2144 - eerror "See https://bugs.gentoo.org/549768"
2145 - eerror
2146 - return 1
2147 - fi
2148 - fi
2149 - # bug #574044
2150 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
2151 - ebegin "Checking for gcc-5-3 stack realignment compiler bug"
2152 - # Compile in subshell to prevent "Aborted" message
2153 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
2154 - if ! eend $?; then
2155 - eerror "Wine cannot be built with this version of gcc-5.3"
2156 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
2157 - eerror "or use gcc-config to select a different compiler version."
2158 - eerror "See https://bugs.gentoo.org/574044"
2159 - eerror
2160 - return 1
2161 - fi
2162 - fi
2163 - fi
2164 -
2165 - # Ensure compiler support
2166 - if use abi_x86_64; then
2167 - ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
2168 - # Compile in subshell to prevent "Aborted" message
2169 - ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
2170 - if ! eend $?; then
2171 - eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
2172 - eerror
2173 - eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine"
2174 - eerror
2175 - return 1
2176 - fi
2177 - fi
2178 -}
2179 -
2180 -wine_build_environment_check() {
2181 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
2182 -
2183 - if use abi_x86_64; then
2184 - if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
2185 - eerror "You need gcc-4.4+ to compile 64-bit wine"
2186 - die
2187 - elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
2188 - eerror "You need clang-3.8+ to compile 64-bit wine"
2189 - die
2190 - fi
2191 - fi
2192 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
2193 - ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
2194 - ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
2195 - ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
2196 - fi
2197 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
2198 - if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
2199 - ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work"
2200 - ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
2201 - ewarn "See package.env in man 5 portage for more information on how to do this."
2202 - ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
2203 - fi
2204 - fi
2205 -
2206 - if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then
2207 - eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
2208 - eerror "See https://bugs.gentoo.org/487864 for more details."
2209 - eerror
2210 - return 1
2211 - fi
2212 -}
2213 -
2214 -wine_env_vcs_vars() {
2215 - local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
2216 - local pn_live_val="${pn_live_var}"
2217 - eval pn_live_val='$'${pn_live_val}
2218 - if [[ ! -z ${pn_live_val} ]]; then
2219 - if use staging; then
2220 - eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}"
2221 - eerror "cannot be used to set the commit. Instead, you may use the"
2222 - eerror "environmental variables WINE_COMMIT, and STAGING_COMMIT."
2223 - eerror
2224 - return 1
2225 - fi
2226 - fi
2227 - if [[ ! -z ${EGIT_COMMIT} ]]; then
2228 - eerror "Commits must now be specified using the environmental variables"
2229 - eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT"
2230 - eerror
2231 - return 1
2232 - fi
2233 -}
2234 -
2235 -pkg_pretend() {
2236 - wine_build_environment_check || die
2237 -
2238 - # Verify OSS support
2239 - if use oss && ! use kernel_FreeBSD; then
2240 - if ! has_version ">=media-sound/oss-4"; then
2241 - eerror "You cannot build wine with USE=oss without having support from a"
2242 - eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)"
2243 - eerror
2244 - die
2245 - fi
2246 - fi
2247 -}
2248 -
2249 -pkg_setup() {
2250 - wine_build_environment_check || die
2251 - wine_env_vcs_vars || die
2252 -
2253 - WINE_VARIANT="${PN#wine}-${PV}"
2254 - WINE_VARIANT="${WINE_VARIANT#-}"
2255 -
2256 - MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
2257 - MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
2258 - MY_DATADIR="${MY_DATAROOTDIR}"
2259 - MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
2260 - MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
2261 - MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
2262 - MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
2263 - MY_MANDIR="${MY_DATADIR}/man"
2264 -}
2265 -
2266 -src_unpack() {
2267 - if [[ ${PV} == "9999" ]] ; then
2268 - EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
2269 - if use staging; then
2270 - local CURRENT_WINE_COMMIT=${EGIT_VERSION}
2271 -
2272 - git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}"
2273 - git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}"
2274 -
2275 - local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die
2276 -
2277 - if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then
2278 - einfo "The current Staging patchset is not guaranteed to apply on this WINE commit."
2279 - einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT."
2280 - einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine"
2281 - fi
2282 - fi
2283 - fi
2284 -
2285 - default
2286 -
2287 - l10n_find_plocales_changes "${S}/po" "" ".po"
2288 -}
2289 -
2290 -src_prepare() {
2291 -
2292 - eapply_bin(){
2293 - local patch
2294 - for patch in ${PATCHES_BIN[@]}; do
2295 - patchbin --nogit < "${patch}" || die
2296 - done
2297 - }
2298 -
2299 - local md5="$(md5sum server/protocol.def)"
2300 -
2301 - if use staging; then
2302 - ewarn "Applying the Wine-Staging patchset. Any bug reports to the"
2303 - ewarn "Wine bugzilla should explicitly state that staging was used."
2304 -
2305 - local STAGING_EXCLUDE=""
2306 - STAGING_EXCLUDE="${STAGING_EXCLUDE} -W winhlp32-Flex_Workaround" # Avoid double patching https://bugs.winehq.org/show_bug.cgi?id=42132
2307 - use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
2308 -
2309 - # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches
2310 - ebegin "Running Wine-Staging patch installer"
2311 - (
2312 - set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE}
2313 - cd "${STAGING_DIR}/patches"
2314 - source "${STAGING_DIR}/patches/patchinstall.sh"
2315 - )
2316 - eend $? || die "Failed to apply Wine-Staging patches"
2317 - fi
2318 -
2319 - default
2320 - eapply_bin
2321 - eautoreconf
2322 -
2323 - # Modification of the server protocol requires regenerating the server requests
2324 - if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
2325 - einfo "server/protocol.def was patched; running tools/make_requests"
2326 - tools/make_requests || die #432348
2327 - fi
2328 - sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
2329 - if ! use run-exes; then
2330 - sed -i '/^MimeType/d' loader/wine.desktop || die #117785
2331 - fi
2332 -
2333 - # Edit wine.desktop to work for specific variant
2334 - sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
2335 -
2336 - # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
2337 - cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
2338 -
2339 - l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
2340 -}
2341 -
2342 -src_configure() {
2343 - wine_compiler_check || die
2344 -
2345 - export LDCONFIG=/bin/true
2346 - use custom-cflags || strip-flags
2347 -
2348 - multilib-minimal_src_configure
2349 -}
2350 -
2351 -multilib_src_configure() {
2352 - local myconf=(
2353 - --prefix="${MY_PREFIX}"
2354 - --datarootdir="${MY_DATAROOTDIR}"
2355 - --datadir="${MY_DATADIR}"
2356 - --docdir="${MY_DOCDIR}"
2357 - --includedir="${MY_INCLUDEDIR}"
2358 - --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
2359 - --libexecdir="${MY_LIBEXECDIR}"
2360 - --localstatedir="${MY_LOCALSTATEDIR}"
2361 - --mandir="${MY_MANDIR}"
2362 - --sysconfdir=/etc/wine
2363 - $(use_with alsa)
2364 - $(use_with capi)
2365 - $(use_with lcms cms)
2366 - $(use_with cups)
2367 - $(use_with ncurses curses)
2368 - $(use_with udisks dbus)
2369 - $(use_with fontconfig)
2370 - $(use_with ssl gnutls)
2371 - $(use_enable gecko mshtml)
2372 - $(use_with gphoto2 gphoto)
2373 - $(use_with gsm)
2374 - $(use_with gstreamer)
2375 - --without-hal
2376 - $(use_with jpeg)
2377 - $(use_with ldap)
2378 - $(use_enable mono mscoree)
2379 - $(use_with mp3 mpg123)
2380 - $(use_with netapi)
2381 - $(use_with nls gettext)
2382 - $(use_with openal)
2383 - $(use_with opencl)
2384 - $(use_with opengl)
2385 - $(use_with osmesa)
2386 - $(use_with oss)
2387 - $(use_with pcap)
2388 - $(use_with png)
2389 - $(use_with pulseaudio pulse)
2390 - $(use_with threads pthread)
2391 - $(use_with scanner sane)
2392 - $(use_enable test tests)
2393 - $(use_with truetype freetype)
2394 - $(use_with udev)
2395 - $(use_with v4l)
2396 - $(use_with X x)
2397 - $(use_with X xfixes)
2398 - $(use_with xcomposite)
2399 - $(use_with xinerama)
2400 - $(use_with xml)
2401 - $(use_with xml xslt)
2402 - )
2403 -
2404 - use staging && myconf+=(
2405 - --with-xattr
2406 - $(use_with themes gtk3)
2407 - $(use_with vaapi va)
2408 - )
2409 -
2410 - local PKG_CONFIG AR RANLIB
2411 - # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
2412 - # set AR and RANLIB to make QA scripts happy; #483342
2413 - tc-export PKG_CONFIG AR RANLIB
2414 -
2415 - if use amd64; then
2416 - if [[ ${ABI} == amd64 ]]; then
2417 - myconf+=( --enable-win64 )
2418 - else
2419 - myconf+=( --disable-win64 )
2420 - fi
2421 -
2422 - # Note: using --with-wine64 results in problems with multilib.eclass
2423 - # CC/LD hackery. We're using separate tools instead.
2424 - fi
2425 -
2426 - ECONF_SOURCE=${S} \
2427 - econf "${myconf[@]}"
2428 - emake depend
2429 -}
2430 -
2431 -multilib_src_test() {
2432 - # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
2433 - if [[ ${ABI} == x86 ]]; then
2434 - if [[ $(id -u) == 0 ]]; then
2435 - ewarn "Skipping tests since they cannot be run under the root user."
2436 - ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
2437 - return
2438 - fi
2439 -
2440 - WINEPREFIX="${T}/.wine-${ABI}" \
2441 - Xemake test
2442 - fi
2443 -}
2444 -
2445 -multilib_src_install_all() {
2446 - local DOCS=( ANNOUNCE AUTHORS README )
2447 - add_locale_docs() {
2448 - local locale_doc="documentation/README.$1"
2449 - [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
2450 - }
2451 - l10n_for_each_locale_do add_locale_docs
2452 -
2453 - einstalldocs
2454 - prune_libtool_files --all
2455 -
2456 - if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
2457 - rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
2458 - "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
2459 - fi
2460 -
2461 - # Remove wineconsole if neither backend is installed #551124
2462 - if ! use X && ! use ncurses; then
2463 - rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
2464 - rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
2465 - rm_wineconsole() {
2466 - rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
2467 - }
2468 - multilib_foreach_abi rm_wineconsole
2469 - fi
2470 -
2471 - use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
2472 - use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
2473 -
2474 - if use abi_x86_64 && ! use abi_x86_32; then
2475 - dosym wine64 "${MY_PREFIX}"/bin/wine # 404331
2476 - dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader
2477 - fi
2478 -
2479 - # Failglob for bin and man loops
2480 - local glob_state=$(shopt -p failglob)
2481 - shopt -s failglob
2482 -
2483 - # Make wrappers for binaries for handling multiple variants
2484 - # Note: wrappers instead of symlinks because some are shell which use basename
2485 - local b
2486 - for b in "${D%/}${MY_PREFIX}"/bin/*; do
2487 - make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
2488 - done
2489 -
2490 - # respect LINGUAS when installing man pages, #469418
2491 - local l
2492 - for l in de fr pl; do
2493 - use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}*
2494 - done
2495 -
2496 - eval "${glob_state}"
2497 -}
2498 -
2499 -pkg_postinst() {
2500 - eselect wine register ${P}
2501 - if [[ ${PN} == "wine-vanilla" ]]; then
2502 - eselect wine register --vanilla ${P} || die
2503 - else
2504 - if use staging; then
2505 - eselect wine register --staging ${P} || die
2506 - fi
2507 - fi
2508 -
2509 - eselect wine update --all --if-unset || die
2510 -
2511 - xdg_desktop_database_update
2512 -
2513 - if ! use gecko; then
2514 - ewarn "Without Wine Gecko, wine prefixes will not have a default"
2515 - ewarn "implementation of iexplore. Many older windows applications"
2516 - ewarn "rely upon the existence of an iexplore implementation, so"
2517 - ewarn "you will likely need to install an external one, like via winetricks"
2518 - fi
2519 - if ! use mono; then
2520 - ewarn "Without Wine Mono, wine prefixes will not have a default"
2521 - ewarn "implementation of .NET. Many windows applications rely upon"
2522 - ewarn "the existence of a .NET implementation, so you will likely need"
2523 - ewarn "to install an external one, like via winetricks"
2524 - fi
2525 -}
2526 -
2527 -pkg_prerm() {
2528 - eselect wine deregister ${P}
2529 - if [[ ${PN} == "wine-vanilla" ]]; then
2530 - eselect wine deregister --vanilla ${P} || die
2531 - else
2532 - if use staging; then
2533 - eselect wine deregister --staging ${P} || die
2534 - fi
2535 - fi
2536 -
2537 - eselect wine update --all --if-unset || die
2538 -}
2539 -
2540 -pkg_postrm() {
2541 - xdg_desktop_database_update
2542 -}
2543
2544 diff --git a/app-emulation/wine-staging/wine-staging-2.12-r1.ebuild b/app-emulation/wine-staging/wine-staging-2.12-r1.ebuild
2545 deleted file mode 100644
2546 index b119a5cd863..00000000000
2547 --- a/app-emulation/wine-staging/wine-staging-2.12-r1.ebuild
2548 +++ /dev/null
2549 @@ -1,609 +0,0 @@
2550 -# Copyright 1999-2017 Gentoo Foundation
2551 -# Distributed under the terms of the GNU General Public License v2
2552 -
2553 -EAPI=6
2554 -
2555 -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"
2556 -PLOCALE_BACKUP="en"
2557 -
2558 -inherit autotools eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils
2559 -
2560 -MY_PN="${PN%%-*}"
2561 -MY_P="${MY_PN}-${PV}"
2562 -
2563 -if [[ ${PV} == "9999" ]] ; then
2564 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
2565 - EGIT_BRANCH="master"
2566 - inherit git-r3
2567 - SRC_URI=""
2568 - #KEYWORDS=""
2569 -else
2570 - MAJOR_V=$(get_version_component_range 1)
2571 - SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
2572 - KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
2573 -fi
2574 -S="${WORKDIR}/${MY_P}"
2575 -
2576 -STAGING_P="wine-staging-${PV}"
2577 -STAGING_DIR="${WORKDIR}/${STAGING_P}"
2578 -GWP_V="20170830"
2579 -PATCHDIR="${WORKDIR}/gentoo-wine-patches"
2580 -
2581 -DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset"
2582 -HOMEPAGE="https://www.winehq.org/"
2583 -SRC_URI="${SRC_URI}
2584 - https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
2585 -"
2586 -
2587 -if [[ ${PV} == "9999" ]] ; then
2588 - STAGING_EGIT_REPO_URI="https://github.com/wine-compholio/wine-staging.git"
2589 -else
2590 - SRC_URI="${SRC_URI}
2591 - staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
2592 -fi
2593 -
2594 -LICENSE="LGPL-2.1"
2595 -SLOT="${PV}"
2596 -IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags 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"
2597 -REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
2598 - X? ( truetype )
2599 - elibc_glibc? ( threads )
2600 - osmesa? ( opengl )
2601 - pipelight? ( staging )
2602 - s3tc? ( staging )
2603 - test? ( abi_x86_32 )
2604 - themes? ( staging )
2605 - vaapi? ( staging )" # osmesa-opengl #286560 # X-truetype #551124
2606 -
2607 -# FIXME: the test suite is unsuitable for us; many tests require net access
2608 -# or fail due to Xvfb's opengl limitations.
2609 -RESTRICT="test"
2610 -
2611 -COMMON_DEPEND="
2612 - X? (
2613 - x11-libs/libXcursor[${MULTILIB_USEDEP}]
2614 - x11-libs/libXext[${MULTILIB_USEDEP}]
2615 - x11-libs/libXfixes[${MULTILIB_USEDEP}]
2616 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
2617 - x11-libs/libXi[${MULTILIB_USEDEP}]
2618 - x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
2619 - )
2620 - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
2621 - capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
2622 - cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
2623 - fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
2624 - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
2625 - gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
2626 - gstreamer? (
2627 - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
2628 - media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
2629 - )
2630 - jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
2631 - lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
2632 - ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
2633 - mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
2634 - ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] )
2635 - netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
2636 - nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
2637 - odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
2638 - openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
2639 - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
2640 - opengl? (
2641 - virtual/glu[${MULTILIB_USEDEP}]
2642 - virtual/opengl[${MULTILIB_USEDEP}]
2643 - )
2644 - osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] )
2645 - pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
2646 - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
2647 - pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
2648 - scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
2649 - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
2650 - staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
2651 - themes? (
2652 - dev-libs/glib:2[${MULTILIB_USEDEP}]
2653 - x11-libs/cairo[${MULTILIB_USEDEP}]
2654 - x11-libs/gtk+:3[${MULTILIB_USEDEP}]
2655 - )
2656 - truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
2657 - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
2658 - udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
2659 - v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
2660 - vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
2661 - xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
2662 - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
2663 - xml? (
2664 - dev-libs/libxml2[${MULTILIB_USEDEP}]
2665 - dev-libs/libxslt[${MULTILIB_USEDEP}]
2666 - )
2667 - abi_x86_32? (
2668 - !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
2669 - !<app-emulation/emul-linux-x86-baselibs-20140508-r14
2670 - !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
2671 - !<app-emulation/emul-linux-x86-db-20140508-r3
2672 - !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
2673 - !<app-emulation/emul-linux-x86-medialibs-20140508-r6
2674 - !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
2675 - !<app-emulation/emul-linux-x86-opengl-20140508-r1
2676 - !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
2677 - !<app-emulation/emul-linux-x86-sdl-20140508-r1
2678 - !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
2679 - !<app-emulation/emul-linux-x86-soundlibs-20140508
2680 - !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
2681 - !<app-emulation/emul-linux-x86-xlibs-20140508
2682 - )"
2683 -
2684 -RDEPEND="${COMMON_DEPEND}
2685 - app-emulation/wine-desktop-common
2686 - >app-eselect/eselect-wine-0.3
2687 - !app-emulation/wine:0
2688 - dos? ( >=games-emulation/dosbox-0.74_p20160629 )
2689 - gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
2690 - mono? ( app-emulation/wine-mono:4.7.0 )
2691 - perl? (
2692 - dev-lang/perl
2693 - dev-perl/XML-Simple
2694 - )
2695 - pulseaudio? (
2696 - realtime? ( sys-auth/rtkit )
2697 - )
2698 - s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] )
2699 - samba? ( >=net-fs/samba-3.0.25[winbind] )
2700 - selinux? ( sec-policy/selinux-wine )
2701 - udisks? ( sys-fs/udisks:2 )"
2702 -
2703 -# tools/make_requests requires perl
2704 -DEPEND="${COMMON_DEPEND}
2705 - sys-devel/flex
2706 - >=sys-kernel/linux-headers-2.6
2707 - virtual/pkgconfig
2708 - virtual/yacc
2709 - X? (
2710 - x11-proto/inputproto
2711 - x11-proto/xextproto
2712 - x11-proto/xf86vidmodeproto
2713 - )
2714 - prelink? ( sys-devel/prelink )
2715 - staging? (
2716 - dev-lang/perl
2717 - dev-perl/XML-Simple
2718 - )
2719 - xinerama? ( x11-proto/xineramaproto )"
2720 -
2721 -# These use a non-standard "Wine" category, which is provided by
2722 -# /etc/xdg/applications-merged/wine.menu
2723 -QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
2724 -usr/share/applications/wine-notepad.desktop
2725 -usr/share/applications/wine-uninstaller.desktop
2726 -usr/share/applications/wine-winecfg.desktop"
2727 -
2728 -PATCHES=(
2729 - "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
2730 - "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
2731 - "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
2732 - "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
2733 - "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
2734 - "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
2735 -)
2736 -PATCHES_BIN=(
2737 - "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
2738 -)
2739 -
2740 -# https://bugs.gentoo.org/show_bug.cgi?id=635222
2741 -if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then
2742 - DEPEND+=" dev-util/patchbin"
2743 -fi
2744 -
2745 -wine_compiler_check() {
2746 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
2747 -
2748 - # GCC-specific bugs
2749 - if tc-is-gcc; then
2750 - # bug #549768
2751 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
2752 - ebegin "Checking for gcc-5 ms_abi compiler bug"
2753 - $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
2754 - # Run in subshell to prevent "Aborted" message
2755 - ( "${T}"/pr66838 || false ) >/dev/null 2>&1
2756 - if ! eend $?; then
2757 - eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
2758 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
2759 - eerror "or use gcc-config to select a different compiler version."
2760 - eerror "See https://bugs.gentoo.org/549768"
2761 - eerror
2762 - return 1
2763 - fi
2764 - fi
2765 - # bug #574044
2766 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
2767 - ebegin "Checking for gcc-5-3 stack realignment compiler bug"
2768 - # Compile in subshell to prevent "Aborted" message
2769 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
2770 - if ! eend $?; then
2771 - eerror "Wine cannot be built with this version of gcc-5.3"
2772 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
2773 - eerror "or use gcc-config to select a different compiler version."
2774 - eerror "See https://bugs.gentoo.org/574044"
2775 - eerror
2776 - return 1
2777 - fi
2778 - fi
2779 - fi
2780 -
2781 - # Ensure compiler support
2782 - if use abi_x86_64; then
2783 - ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
2784 - # Compile in subshell to prevent "Aborted" message
2785 - ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
2786 - if ! eend $?; then
2787 - eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
2788 - eerror
2789 - eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine"
2790 - eerror
2791 - return 1
2792 - fi
2793 - fi
2794 -}
2795 -
2796 -wine_build_environment_check() {
2797 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
2798 -
2799 - if use abi_x86_64; then
2800 - if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
2801 - eerror "You need gcc-4.4+ to compile 64-bit wine"
2802 - die
2803 - elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
2804 - eerror "You need clang-3.8+ to compile 64-bit wine"
2805 - die
2806 - fi
2807 - fi
2808 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
2809 - ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
2810 - ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
2811 - ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
2812 - fi
2813 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
2814 - if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
2815 - ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work"
2816 - ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
2817 - ewarn "See package.env in man 5 portage for more information on how to do this."
2818 - ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
2819 - fi
2820 - fi
2821 -
2822 - if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then
2823 - eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
2824 - eerror "See https://bugs.gentoo.org/487864 for more details."
2825 - eerror
2826 - return 1
2827 - fi
2828 -}
2829 -
2830 -wine_env_vcs_vars() {
2831 - local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
2832 - local pn_live_val="${pn_live_var}"
2833 - eval pn_live_val='$'${pn_live_val}
2834 - if [[ ! -z ${pn_live_val} ]]; then
2835 - if use staging; then
2836 - eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}"
2837 - eerror "cannot be used to set the commit. Instead, you may use the"
2838 - eerror "environmental variables WINE_COMMIT, and STAGING_COMMIT."
2839 - eerror
2840 - return 1
2841 - fi
2842 - fi
2843 - if [[ ! -z ${EGIT_COMMIT} ]]; then
2844 - eerror "Commits must now be specified using the environmental variables"
2845 - eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT"
2846 - eerror
2847 - return 1
2848 - fi
2849 -}
2850 -
2851 -pkg_pretend() {
2852 - wine_build_environment_check || die
2853 -
2854 - # Verify OSS support
2855 - if use oss && ! use kernel_FreeBSD; then
2856 - if ! has_version ">=media-sound/oss-4"; then
2857 - eerror "You cannot build wine with USE=oss without having support from a"
2858 - eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)"
2859 - eerror
2860 - die
2861 - fi
2862 - fi
2863 -}
2864 -
2865 -pkg_setup() {
2866 - wine_build_environment_check || die
2867 - wine_env_vcs_vars || die
2868 -
2869 - WINE_VARIANT="${PN#wine}-${PV}"
2870 - WINE_VARIANT="${WINE_VARIANT#-}"
2871 -
2872 - MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
2873 - MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
2874 - MY_DATADIR="${MY_DATAROOTDIR}"
2875 - MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
2876 - MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
2877 - MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
2878 - MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
2879 - MY_MANDIR="${MY_DATADIR}/man"
2880 -}
2881 -
2882 -src_unpack() {
2883 - if [[ ${PV} == "9999" ]] ; then
2884 - EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
2885 - if use staging; then
2886 - local CURRENT_WINE_COMMIT=${EGIT_VERSION}
2887 -
2888 - git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}"
2889 - git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}"
2890 -
2891 - local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die
2892 -
2893 - if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then
2894 - einfo "The current Staging patchset is not guaranteed to apply on this WINE commit."
2895 - einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT."
2896 - einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine"
2897 - fi
2898 - fi
2899 - fi
2900 -
2901 - default
2902 -
2903 - l10n_find_plocales_changes "${S}/po" "" ".po"
2904 -}
2905 -
2906 -src_prepare() {
2907 -
2908 - eapply_bin(){
2909 - local patch
2910 - for patch in ${PATCHES_BIN[@]}; do
2911 - patchbin --nogit < "${patch}" || die
2912 - done
2913 - }
2914 -
2915 - local md5="$(md5sum server/protocol.def)"
2916 -
2917 - if use staging; then
2918 - ewarn "Applying the Wine-Staging patchset. Any bug reports to the"
2919 - ewarn "Wine bugzilla should explicitly state that staging was used."
2920 -
2921 - local STAGING_EXCLUDE=""
2922 - STAGING_EXCLUDE="${STAGING_EXCLUDE} -W winhlp32-Flex_Workaround" # Avoid double patching https://bugs.winehq.org/show_bug.cgi?id=42132
2923 - use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
2924 -
2925 - # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches
2926 - ebegin "Running Wine-Staging patch installer"
2927 - (
2928 - set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE}
2929 - cd "${STAGING_DIR}/patches"
2930 - source "${STAGING_DIR}/patches/patchinstall.sh"
2931 - )
2932 - eend $? || die "Failed to apply Wine-Staging patches"
2933 - fi
2934 -
2935 - default
2936 - eapply_bin
2937 - eautoreconf
2938 -
2939 - # Modification of the server protocol requires regenerating the server requests
2940 - if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
2941 - einfo "server/protocol.def was patched; running tools/make_requests"
2942 - tools/make_requests || die #432348
2943 - fi
2944 - sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
2945 - if ! use run-exes; then
2946 - sed -i '/^MimeType/d' loader/wine.desktop || die #117785
2947 - fi
2948 -
2949 - # Edit wine.desktop to work for specific variant
2950 - sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
2951 -
2952 - # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
2953 - cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
2954 -
2955 - l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
2956 -}
2957 -
2958 -src_configure() {
2959 - wine_compiler_check || die
2960 -
2961 - export LDCONFIG=/bin/true
2962 - use custom-cflags || strip-flags
2963 -
2964 - multilib-minimal_src_configure
2965 -}
2966 -
2967 -multilib_src_configure() {
2968 - local myconf=(
2969 - --prefix="${MY_PREFIX}"
2970 - --datarootdir="${MY_DATAROOTDIR}"
2971 - --datadir="${MY_DATADIR}"
2972 - --docdir="${MY_DOCDIR}"
2973 - --includedir="${MY_INCLUDEDIR}"
2974 - --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
2975 - --libexecdir="${MY_LIBEXECDIR}"
2976 - --localstatedir="${MY_LOCALSTATEDIR}"
2977 - --mandir="${MY_MANDIR}"
2978 - --sysconfdir=/etc/wine
2979 - $(use_with alsa)
2980 - $(use_with capi)
2981 - $(use_with lcms cms)
2982 - $(use_with cups)
2983 - $(use_with ncurses curses)
2984 - $(use_with udisks dbus)
2985 - $(use_with fontconfig)
2986 - $(use_with ssl gnutls)
2987 - $(use_enable gecko mshtml)
2988 - $(use_with gphoto2 gphoto)
2989 - $(use_with gsm)
2990 - $(use_with gstreamer)
2991 - --without-hal
2992 - $(use_with jpeg)
2993 - $(use_with ldap)
2994 - $(use_enable mono mscoree)
2995 - $(use_with mp3 mpg123)
2996 - $(use_with netapi)
2997 - $(use_with nls gettext)
2998 - $(use_with openal)
2999 - $(use_with opencl)
3000 - $(use_with opengl)
3001 - $(use_with osmesa)
3002 - $(use_with oss)
3003 - $(use_with pcap)
3004 - $(use_with png)
3005 - $(use_with pulseaudio pulse)
3006 - $(use_with threads pthread)
3007 - $(use_with scanner sane)
3008 - $(use_enable test tests)
3009 - $(use_with truetype freetype)
3010 - $(use_with udev)
3011 - $(use_with v4l)
3012 - $(use_with X x)
3013 - $(use_with X xfixes)
3014 - $(use_with xcomposite)
3015 - $(use_with xinerama)
3016 - $(use_with xml)
3017 - $(use_with xml xslt)
3018 - )
3019 -
3020 - use staging && myconf+=(
3021 - --with-xattr
3022 - $(use_with themes gtk3)
3023 - $(use_with vaapi va)
3024 - )
3025 -
3026 - local PKG_CONFIG AR RANLIB
3027 - # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
3028 - # set AR and RANLIB to make QA scripts happy; #483342
3029 - tc-export PKG_CONFIG AR RANLIB
3030 -
3031 - if use amd64; then
3032 - if [[ ${ABI} == amd64 ]]; then
3033 - myconf+=( --enable-win64 )
3034 - else
3035 - myconf+=( --disable-win64 )
3036 - fi
3037 -
3038 - # Note: using --with-wine64 results in problems with multilib.eclass
3039 - # CC/LD hackery. We're using separate tools instead.
3040 - fi
3041 -
3042 - ECONF_SOURCE=${S} \
3043 - econf "${myconf[@]}"
3044 - emake depend
3045 -}
3046 -
3047 -multilib_src_test() {
3048 - # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
3049 - if [[ ${ABI} == x86 ]]; then
3050 - if [[ $(id -u) == 0 ]]; then
3051 - ewarn "Skipping tests since they cannot be run under the root user."
3052 - ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
3053 - return
3054 - fi
3055 -
3056 - WINEPREFIX="${T}/.wine-${ABI}" \
3057 - Xemake test
3058 - fi
3059 -}
3060 -
3061 -multilib_src_install_all() {
3062 - local DOCS=( ANNOUNCE AUTHORS README )
3063 - add_locale_docs() {
3064 - local locale_doc="documentation/README.$1"
3065 - [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
3066 - }
3067 - l10n_for_each_locale_do add_locale_docs
3068 -
3069 - einstalldocs
3070 - prune_libtool_files --all
3071 -
3072 - if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
3073 - rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
3074 - "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
3075 - fi
3076 -
3077 - # Remove wineconsole if neither backend is installed #551124
3078 - if ! use X && ! use ncurses; then
3079 - rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
3080 - rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
3081 - rm_wineconsole() {
3082 - rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
3083 - }
3084 - multilib_foreach_abi rm_wineconsole
3085 - fi
3086 -
3087 - use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
3088 - use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
3089 -
3090 - if use abi_x86_64 && ! use abi_x86_32; then
3091 - dosym wine64 "${MY_PREFIX}"/bin/wine # 404331
3092 - dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader
3093 - fi
3094 -
3095 - # Failglob for bin and man loops
3096 - local glob_state=$(shopt -p failglob)
3097 - shopt -s failglob
3098 -
3099 - # Make wrappers for binaries for handling multiple variants
3100 - # Note: wrappers instead of symlinks because some are shell which use basename
3101 - local b
3102 - for b in "${D%/}${MY_PREFIX}"/bin/*; do
3103 - make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
3104 - done
3105 -
3106 - # respect LINGUAS when installing man pages, #469418
3107 - local l
3108 - for l in de fr pl; do
3109 - use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}*
3110 - done
3111 -
3112 - eval "${glob_state}"
3113 -}
3114 -
3115 -pkg_postinst() {
3116 - eselect wine register ${P}
3117 - if [[ ${PN} == "wine-vanilla" ]]; then
3118 - eselect wine register --vanilla ${P} || die
3119 - else
3120 - if use staging; then
3121 - eselect wine register --staging ${P} || die
3122 - fi
3123 - fi
3124 -
3125 - eselect wine update --all --if-unset || die
3126 -
3127 - xdg_desktop_database_update
3128 -
3129 - if ! use gecko; then
3130 - ewarn "Without Wine Gecko, wine prefixes will not have a default"
3131 - ewarn "implementation of iexplore. Many older windows applications"
3132 - ewarn "rely upon the existence of an iexplore implementation, so"
3133 - ewarn "you will likely need to install an external one, like via winetricks"
3134 - fi
3135 - if ! use mono; then
3136 - ewarn "Without Wine Mono, wine prefixes will not have a default"
3137 - ewarn "implementation of .NET. Many windows applications rely upon"
3138 - ewarn "the existence of a .NET implementation, so you will likely need"
3139 - ewarn "to install an external one, like via winetricks"
3140 - fi
3141 -}
3142 -
3143 -pkg_prerm() {
3144 - eselect wine deregister ${P}
3145 - if [[ ${PN} == "wine-vanilla" ]]; then
3146 - eselect wine deregister --vanilla ${P} || die
3147 - else
3148 - if use staging; then
3149 - eselect wine deregister --staging ${P} || die
3150 - fi
3151 - fi
3152 -
3153 - eselect wine update --all --if-unset || die
3154 -}
3155 -
3156 -pkg_postrm() {
3157 - xdg_desktop_database_update
3158 -}
3159
3160 diff --git a/app-emulation/wine-staging/wine-staging-2.13-r1.ebuild b/app-emulation/wine-staging/wine-staging-2.13-r1.ebuild
3161 deleted file mode 100644
3162 index b119a5cd863..00000000000
3163 --- a/app-emulation/wine-staging/wine-staging-2.13-r1.ebuild
3164 +++ /dev/null
3165 @@ -1,609 +0,0 @@
3166 -# Copyright 1999-2017 Gentoo Foundation
3167 -# Distributed under the terms of the GNU General Public License v2
3168 -
3169 -EAPI=6
3170 -
3171 -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"
3172 -PLOCALE_BACKUP="en"
3173 -
3174 -inherit autotools eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils
3175 -
3176 -MY_PN="${PN%%-*}"
3177 -MY_P="${MY_PN}-${PV}"
3178 -
3179 -if [[ ${PV} == "9999" ]] ; then
3180 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
3181 - EGIT_BRANCH="master"
3182 - inherit git-r3
3183 - SRC_URI=""
3184 - #KEYWORDS=""
3185 -else
3186 - MAJOR_V=$(get_version_component_range 1)
3187 - SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
3188 - KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
3189 -fi
3190 -S="${WORKDIR}/${MY_P}"
3191 -
3192 -STAGING_P="wine-staging-${PV}"
3193 -STAGING_DIR="${WORKDIR}/${STAGING_P}"
3194 -GWP_V="20170830"
3195 -PATCHDIR="${WORKDIR}/gentoo-wine-patches"
3196 -
3197 -DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset"
3198 -HOMEPAGE="https://www.winehq.org/"
3199 -SRC_URI="${SRC_URI}
3200 - https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
3201 -"
3202 -
3203 -if [[ ${PV} == "9999" ]] ; then
3204 - STAGING_EGIT_REPO_URI="https://github.com/wine-compholio/wine-staging.git"
3205 -else
3206 - SRC_URI="${SRC_URI}
3207 - staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
3208 -fi
3209 -
3210 -LICENSE="LGPL-2.1"
3211 -SLOT="${PV}"
3212 -IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags 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"
3213 -REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
3214 - X? ( truetype )
3215 - elibc_glibc? ( threads )
3216 - osmesa? ( opengl )
3217 - pipelight? ( staging )
3218 - s3tc? ( staging )
3219 - test? ( abi_x86_32 )
3220 - themes? ( staging )
3221 - vaapi? ( staging )" # osmesa-opengl #286560 # X-truetype #551124
3222 -
3223 -# FIXME: the test suite is unsuitable for us; many tests require net access
3224 -# or fail due to Xvfb's opengl limitations.
3225 -RESTRICT="test"
3226 -
3227 -COMMON_DEPEND="
3228 - X? (
3229 - x11-libs/libXcursor[${MULTILIB_USEDEP}]
3230 - x11-libs/libXext[${MULTILIB_USEDEP}]
3231 - x11-libs/libXfixes[${MULTILIB_USEDEP}]
3232 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
3233 - x11-libs/libXi[${MULTILIB_USEDEP}]
3234 - x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
3235 - )
3236 - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
3237 - capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
3238 - cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
3239 - fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
3240 - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
3241 - gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
3242 - gstreamer? (
3243 - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
3244 - media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
3245 - )
3246 - jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
3247 - lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
3248 - ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
3249 - mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
3250 - ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] )
3251 - netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
3252 - nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
3253 - odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
3254 - openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
3255 - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
3256 - opengl? (
3257 - virtual/glu[${MULTILIB_USEDEP}]
3258 - virtual/opengl[${MULTILIB_USEDEP}]
3259 - )
3260 - osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] )
3261 - pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
3262 - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
3263 - pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
3264 - scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
3265 - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
3266 - staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
3267 - themes? (
3268 - dev-libs/glib:2[${MULTILIB_USEDEP}]
3269 - x11-libs/cairo[${MULTILIB_USEDEP}]
3270 - x11-libs/gtk+:3[${MULTILIB_USEDEP}]
3271 - )
3272 - truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
3273 - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
3274 - udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
3275 - v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
3276 - vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
3277 - xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
3278 - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
3279 - xml? (
3280 - dev-libs/libxml2[${MULTILIB_USEDEP}]
3281 - dev-libs/libxslt[${MULTILIB_USEDEP}]
3282 - )
3283 - abi_x86_32? (
3284 - !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
3285 - !<app-emulation/emul-linux-x86-baselibs-20140508-r14
3286 - !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
3287 - !<app-emulation/emul-linux-x86-db-20140508-r3
3288 - !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
3289 - !<app-emulation/emul-linux-x86-medialibs-20140508-r6
3290 - !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
3291 - !<app-emulation/emul-linux-x86-opengl-20140508-r1
3292 - !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
3293 - !<app-emulation/emul-linux-x86-sdl-20140508-r1
3294 - !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
3295 - !<app-emulation/emul-linux-x86-soundlibs-20140508
3296 - !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
3297 - !<app-emulation/emul-linux-x86-xlibs-20140508
3298 - )"
3299 -
3300 -RDEPEND="${COMMON_DEPEND}
3301 - app-emulation/wine-desktop-common
3302 - >app-eselect/eselect-wine-0.3
3303 - !app-emulation/wine:0
3304 - dos? ( >=games-emulation/dosbox-0.74_p20160629 )
3305 - gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
3306 - mono? ( app-emulation/wine-mono:4.7.0 )
3307 - perl? (
3308 - dev-lang/perl
3309 - dev-perl/XML-Simple
3310 - )
3311 - pulseaudio? (
3312 - realtime? ( sys-auth/rtkit )
3313 - )
3314 - s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] )
3315 - samba? ( >=net-fs/samba-3.0.25[winbind] )
3316 - selinux? ( sec-policy/selinux-wine )
3317 - udisks? ( sys-fs/udisks:2 )"
3318 -
3319 -# tools/make_requests requires perl
3320 -DEPEND="${COMMON_DEPEND}
3321 - sys-devel/flex
3322 - >=sys-kernel/linux-headers-2.6
3323 - virtual/pkgconfig
3324 - virtual/yacc
3325 - X? (
3326 - x11-proto/inputproto
3327 - x11-proto/xextproto
3328 - x11-proto/xf86vidmodeproto
3329 - )
3330 - prelink? ( sys-devel/prelink )
3331 - staging? (
3332 - dev-lang/perl
3333 - dev-perl/XML-Simple
3334 - )
3335 - xinerama? ( x11-proto/xineramaproto )"
3336 -
3337 -# These use a non-standard "Wine" category, which is provided by
3338 -# /etc/xdg/applications-merged/wine.menu
3339 -QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
3340 -usr/share/applications/wine-notepad.desktop
3341 -usr/share/applications/wine-uninstaller.desktop
3342 -usr/share/applications/wine-winecfg.desktop"
3343 -
3344 -PATCHES=(
3345 - "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
3346 - "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
3347 - "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
3348 - "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
3349 - "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
3350 - "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
3351 -)
3352 -PATCHES_BIN=(
3353 - "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
3354 -)
3355 -
3356 -# https://bugs.gentoo.org/show_bug.cgi?id=635222
3357 -if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then
3358 - DEPEND+=" dev-util/patchbin"
3359 -fi
3360 -
3361 -wine_compiler_check() {
3362 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
3363 -
3364 - # GCC-specific bugs
3365 - if tc-is-gcc; then
3366 - # bug #549768
3367 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
3368 - ebegin "Checking for gcc-5 ms_abi compiler bug"
3369 - $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
3370 - # Run in subshell to prevent "Aborted" message
3371 - ( "${T}"/pr66838 || false ) >/dev/null 2>&1
3372 - if ! eend $?; then
3373 - eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
3374 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
3375 - eerror "or use gcc-config to select a different compiler version."
3376 - eerror "See https://bugs.gentoo.org/549768"
3377 - eerror
3378 - return 1
3379 - fi
3380 - fi
3381 - # bug #574044
3382 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
3383 - ebegin "Checking for gcc-5-3 stack realignment compiler bug"
3384 - # Compile in subshell to prevent "Aborted" message
3385 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
3386 - if ! eend $?; then
3387 - eerror "Wine cannot be built with this version of gcc-5.3"
3388 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
3389 - eerror "or use gcc-config to select a different compiler version."
3390 - eerror "See https://bugs.gentoo.org/574044"
3391 - eerror
3392 - return 1
3393 - fi
3394 - fi
3395 - fi
3396 -
3397 - # Ensure compiler support
3398 - if use abi_x86_64; then
3399 - ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
3400 - # Compile in subshell to prevent "Aborted" message
3401 - ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
3402 - if ! eend $?; then
3403 - eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
3404 - eerror
3405 - eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine"
3406 - eerror
3407 - return 1
3408 - fi
3409 - fi
3410 -}
3411 -
3412 -wine_build_environment_check() {
3413 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
3414 -
3415 - if use abi_x86_64; then
3416 - if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
3417 - eerror "You need gcc-4.4+ to compile 64-bit wine"
3418 - die
3419 - elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
3420 - eerror "You need clang-3.8+ to compile 64-bit wine"
3421 - die
3422 - fi
3423 - fi
3424 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
3425 - ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
3426 - ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
3427 - ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
3428 - fi
3429 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
3430 - if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
3431 - ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work"
3432 - ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
3433 - ewarn "See package.env in man 5 portage for more information on how to do this."
3434 - ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
3435 - fi
3436 - fi
3437 -
3438 - if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then
3439 - eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
3440 - eerror "See https://bugs.gentoo.org/487864 for more details."
3441 - eerror
3442 - return 1
3443 - fi
3444 -}
3445 -
3446 -wine_env_vcs_vars() {
3447 - local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
3448 - local pn_live_val="${pn_live_var}"
3449 - eval pn_live_val='$'${pn_live_val}
3450 - if [[ ! -z ${pn_live_val} ]]; then
3451 - if use staging; then
3452 - eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}"
3453 - eerror "cannot be used to set the commit. Instead, you may use the"
3454 - eerror "environmental variables WINE_COMMIT, and STAGING_COMMIT."
3455 - eerror
3456 - return 1
3457 - fi
3458 - fi
3459 - if [[ ! -z ${EGIT_COMMIT} ]]; then
3460 - eerror "Commits must now be specified using the environmental variables"
3461 - eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT"
3462 - eerror
3463 - return 1
3464 - fi
3465 -}
3466 -
3467 -pkg_pretend() {
3468 - wine_build_environment_check || die
3469 -
3470 - # Verify OSS support
3471 - if use oss && ! use kernel_FreeBSD; then
3472 - if ! has_version ">=media-sound/oss-4"; then
3473 - eerror "You cannot build wine with USE=oss without having support from a"
3474 - eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)"
3475 - eerror
3476 - die
3477 - fi
3478 - fi
3479 -}
3480 -
3481 -pkg_setup() {
3482 - wine_build_environment_check || die
3483 - wine_env_vcs_vars || die
3484 -
3485 - WINE_VARIANT="${PN#wine}-${PV}"
3486 - WINE_VARIANT="${WINE_VARIANT#-}"
3487 -
3488 - MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
3489 - MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
3490 - MY_DATADIR="${MY_DATAROOTDIR}"
3491 - MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
3492 - MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
3493 - MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
3494 - MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
3495 - MY_MANDIR="${MY_DATADIR}/man"
3496 -}
3497 -
3498 -src_unpack() {
3499 - if [[ ${PV} == "9999" ]] ; then
3500 - EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
3501 - if use staging; then
3502 - local CURRENT_WINE_COMMIT=${EGIT_VERSION}
3503 -
3504 - git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}"
3505 - git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}"
3506 -
3507 - local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die
3508 -
3509 - if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then
3510 - einfo "The current Staging patchset is not guaranteed to apply on this WINE commit."
3511 - einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT."
3512 - einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine"
3513 - fi
3514 - fi
3515 - fi
3516 -
3517 - default
3518 -
3519 - l10n_find_plocales_changes "${S}/po" "" ".po"
3520 -}
3521 -
3522 -src_prepare() {
3523 -
3524 - eapply_bin(){
3525 - local patch
3526 - for patch in ${PATCHES_BIN[@]}; do
3527 - patchbin --nogit < "${patch}" || die
3528 - done
3529 - }
3530 -
3531 - local md5="$(md5sum server/protocol.def)"
3532 -
3533 - if use staging; then
3534 - ewarn "Applying the Wine-Staging patchset. Any bug reports to the"
3535 - ewarn "Wine bugzilla should explicitly state that staging was used."
3536 -
3537 - local STAGING_EXCLUDE=""
3538 - STAGING_EXCLUDE="${STAGING_EXCLUDE} -W winhlp32-Flex_Workaround" # Avoid double patching https://bugs.winehq.org/show_bug.cgi?id=42132
3539 - use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
3540 -
3541 - # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches
3542 - ebegin "Running Wine-Staging patch installer"
3543 - (
3544 - set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE}
3545 - cd "${STAGING_DIR}/patches"
3546 - source "${STAGING_DIR}/patches/patchinstall.sh"
3547 - )
3548 - eend $? || die "Failed to apply Wine-Staging patches"
3549 - fi
3550 -
3551 - default
3552 - eapply_bin
3553 - eautoreconf
3554 -
3555 - # Modification of the server protocol requires regenerating the server requests
3556 - if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
3557 - einfo "server/protocol.def was patched; running tools/make_requests"
3558 - tools/make_requests || die #432348
3559 - fi
3560 - sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
3561 - if ! use run-exes; then
3562 - sed -i '/^MimeType/d' loader/wine.desktop || die #117785
3563 - fi
3564 -
3565 - # Edit wine.desktop to work for specific variant
3566 - sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
3567 -
3568 - # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
3569 - cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
3570 -
3571 - l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
3572 -}
3573 -
3574 -src_configure() {
3575 - wine_compiler_check || die
3576 -
3577 - export LDCONFIG=/bin/true
3578 - use custom-cflags || strip-flags
3579 -
3580 - multilib-minimal_src_configure
3581 -}
3582 -
3583 -multilib_src_configure() {
3584 - local myconf=(
3585 - --prefix="${MY_PREFIX}"
3586 - --datarootdir="${MY_DATAROOTDIR}"
3587 - --datadir="${MY_DATADIR}"
3588 - --docdir="${MY_DOCDIR}"
3589 - --includedir="${MY_INCLUDEDIR}"
3590 - --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
3591 - --libexecdir="${MY_LIBEXECDIR}"
3592 - --localstatedir="${MY_LOCALSTATEDIR}"
3593 - --mandir="${MY_MANDIR}"
3594 - --sysconfdir=/etc/wine
3595 - $(use_with alsa)
3596 - $(use_with capi)
3597 - $(use_with lcms cms)
3598 - $(use_with cups)
3599 - $(use_with ncurses curses)
3600 - $(use_with udisks dbus)
3601 - $(use_with fontconfig)
3602 - $(use_with ssl gnutls)
3603 - $(use_enable gecko mshtml)
3604 - $(use_with gphoto2 gphoto)
3605 - $(use_with gsm)
3606 - $(use_with gstreamer)
3607 - --without-hal
3608 - $(use_with jpeg)
3609 - $(use_with ldap)
3610 - $(use_enable mono mscoree)
3611 - $(use_with mp3 mpg123)
3612 - $(use_with netapi)
3613 - $(use_with nls gettext)
3614 - $(use_with openal)
3615 - $(use_with opencl)
3616 - $(use_with opengl)
3617 - $(use_with osmesa)
3618 - $(use_with oss)
3619 - $(use_with pcap)
3620 - $(use_with png)
3621 - $(use_with pulseaudio pulse)
3622 - $(use_with threads pthread)
3623 - $(use_with scanner sane)
3624 - $(use_enable test tests)
3625 - $(use_with truetype freetype)
3626 - $(use_with udev)
3627 - $(use_with v4l)
3628 - $(use_with X x)
3629 - $(use_with X xfixes)
3630 - $(use_with xcomposite)
3631 - $(use_with xinerama)
3632 - $(use_with xml)
3633 - $(use_with xml xslt)
3634 - )
3635 -
3636 - use staging && myconf+=(
3637 - --with-xattr
3638 - $(use_with themes gtk3)
3639 - $(use_with vaapi va)
3640 - )
3641 -
3642 - local PKG_CONFIG AR RANLIB
3643 - # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
3644 - # set AR and RANLIB to make QA scripts happy; #483342
3645 - tc-export PKG_CONFIG AR RANLIB
3646 -
3647 - if use amd64; then
3648 - if [[ ${ABI} == amd64 ]]; then
3649 - myconf+=( --enable-win64 )
3650 - else
3651 - myconf+=( --disable-win64 )
3652 - fi
3653 -
3654 - # Note: using --with-wine64 results in problems with multilib.eclass
3655 - # CC/LD hackery. We're using separate tools instead.
3656 - fi
3657 -
3658 - ECONF_SOURCE=${S} \
3659 - econf "${myconf[@]}"
3660 - emake depend
3661 -}
3662 -
3663 -multilib_src_test() {
3664 - # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
3665 - if [[ ${ABI} == x86 ]]; then
3666 - if [[ $(id -u) == 0 ]]; then
3667 - ewarn "Skipping tests since they cannot be run under the root user."
3668 - ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
3669 - return
3670 - fi
3671 -
3672 - WINEPREFIX="${T}/.wine-${ABI}" \
3673 - Xemake test
3674 - fi
3675 -}
3676 -
3677 -multilib_src_install_all() {
3678 - local DOCS=( ANNOUNCE AUTHORS README )
3679 - add_locale_docs() {
3680 - local locale_doc="documentation/README.$1"
3681 - [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
3682 - }
3683 - l10n_for_each_locale_do add_locale_docs
3684 -
3685 - einstalldocs
3686 - prune_libtool_files --all
3687 -
3688 - if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
3689 - rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
3690 - "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
3691 - fi
3692 -
3693 - # Remove wineconsole if neither backend is installed #551124
3694 - if ! use X && ! use ncurses; then
3695 - rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
3696 - rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
3697 - rm_wineconsole() {
3698 - rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
3699 - }
3700 - multilib_foreach_abi rm_wineconsole
3701 - fi
3702 -
3703 - use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
3704 - use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
3705 -
3706 - if use abi_x86_64 && ! use abi_x86_32; then
3707 - dosym wine64 "${MY_PREFIX}"/bin/wine # 404331
3708 - dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader
3709 - fi
3710 -
3711 - # Failglob for bin and man loops
3712 - local glob_state=$(shopt -p failglob)
3713 - shopt -s failglob
3714 -
3715 - # Make wrappers for binaries for handling multiple variants
3716 - # Note: wrappers instead of symlinks because some are shell which use basename
3717 - local b
3718 - for b in "${D%/}${MY_PREFIX}"/bin/*; do
3719 - make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
3720 - done
3721 -
3722 - # respect LINGUAS when installing man pages, #469418
3723 - local l
3724 - for l in de fr pl; do
3725 - use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}*
3726 - done
3727 -
3728 - eval "${glob_state}"
3729 -}
3730 -
3731 -pkg_postinst() {
3732 - eselect wine register ${P}
3733 - if [[ ${PN} == "wine-vanilla" ]]; then
3734 - eselect wine register --vanilla ${P} || die
3735 - else
3736 - if use staging; then
3737 - eselect wine register --staging ${P} || die
3738 - fi
3739 - fi
3740 -
3741 - eselect wine update --all --if-unset || die
3742 -
3743 - xdg_desktop_database_update
3744 -
3745 - if ! use gecko; then
3746 - ewarn "Without Wine Gecko, wine prefixes will not have a default"
3747 - ewarn "implementation of iexplore. Many older windows applications"
3748 - ewarn "rely upon the existence of an iexplore implementation, so"
3749 - ewarn "you will likely need to install an external one, like via winetricks"
3750 - fi
3751 - if ! use mono; then
3752 - ewarn "Without Wine Mono, wine prefixes will not have a default"
3753 - ewarn "implementation of .NET. Many windows applications rely upon"
3754 - ewarn "the existence of a .NET implementation, so you will likely need"
3755 - ewarn "to install an external one, like via winetricks"
3756 - fi
3757 -}
3758 -
3759 -pkg_prerm() {
3760 - eselect wine deregister ${P}
3761 - if [[ ${PN} == "wine-vanilla" ]]; then
3762 - eselect wine deregister --vanilla ${P} || die
3763 - else
3764 - if use staging; then
3765 - eselect wine deregister --staging ${P} || die
3766 - fi
3767 - fi
3768 -
3769 - eselect wine update --all --if-unset || die
3770 -}
3771 -
3772 -pkg_postrm() {
3773 - xdg_desktop_database_update
3774 -}
3775
3776 diff --git a/app-emulation/wine-staging/wine-staging-2.14-r1.ebuild b/app-emulation/wine-staging/wine-staging-2.14-r1.ebuild
3777 deleted file mode 100644
3778 index 9df84ca6f8f..00000000000
3779 --- a/app-emulation/wine-staging/wine-staging-2.14-r1.ebuild
3780 +++ /dev/null
3781 @@ -1,609 +0,0 @@
3782 -# Copyright 1999-2017 Gentoo Foundation
3783 -# Distributed under the terms of the GNU General Public License v2
3784 -
3785 -EAPI=6
3786 -
3787 -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"
3788 -PLOCALE_BACKUP="en"
3789 -
3790 -inherit autotools eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils
3791 -
3792 -MY_PN="${PN%%-*}"
3793 -MY_P="${MY_PN}-${PV}"
3794 -
3795 -if [[ ${PV} == "9999" ]] ; then
3796 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
3797 - EGIT_BRANCH="master"
3798 - inherit git-r3
3799 - SRC_URI=""
3800 - #KEYWORDS=""
3801 -else
3802 - MAJOR_V=$(get_version_component_range 1)
3803 - SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
3804 - KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
3805 -fi
3806 -S="${WORKDIR}/${MY_P}"
3807 -
3808 -STAGING_P="wine-staging-${PV}"
3809 -STAGING_DIR="${WORKDIR}/${STAGING_P}"
3810 -GWP_V="20170830"
3811 -PATCHDIR="${WORKDIR}/gentoo-wine-patches"
3812 -
3813 -DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset"
3814 -HOMEPAGE="https://www.winehq.org/"
3815 -SRC_URI="${SRC_URI}
3816 - https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
3817 -"
3818 -
3819 -if [[ ${PV} == "9999" ]] ; then
3820 - STAGING_EGIT_REPO_URI="https://github.com/wine-compholio/wine-staging.git"
3821 -else
3822 - SRC_URI="${SRC_URI}
3823 - staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
3824 -fi
3825 -
3826 -LICENSE="LGPL-2.1"
3827 -SLOT="${PV}"
3828 -IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags 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"
3829 -REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
3830 - X? ( truetype )
3831 - elibc_glibc? ( threads )
3832 - osmesa? ( opengl )
3833 - pipelight? ( staging )
3834 - s3tc? ( staging )
3835 - test? ( abi_x86_32 )
3836 - themes? ( staging )
3837 - vaapi? ( staging )" # osmesa-opengl #286560 # X-truetype #551124
3838 -
3839 -# FIXME: the test suite is unsuitable for us; many tests require net access
3840 -# or fail due to Xvfb's opengl limitations.
3841 -RESTRICT="test"
3842 -
3843 -COMMON_DEPEND="
3844 - X? (
3845 - x11-libs/libXcursor[${MULTILIB_USEDEP}]
3846 - x11-libs/libXext[${MULTILIB_USEDEP}]
3847 - x11-libs/libXfixes[${MULTILIB_USEDEP}]
3848 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
3849 - x11-libs/libXi[${MULTILIB_USEDEP}]
3850 - x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
3851 - )
3852 - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
3853 - capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
3854 - cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
3855 - fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
3856 - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
3857 - gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
3858 - gstreamer? (
3859 - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
3860 - media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
3861 - )
3862 - jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
3863 - lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
3864 - ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
3865 - mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
3866 - ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] )
3867 - netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
3868 - nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
3869 - odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
3870 - openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
3871 - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
3872 - opengl? (
3873 - virtual/glu[${MULTILIB_USEDEP}]
3874 - virtual/opengl[${MULTILIB_USEDEP}]
3875 - )
3876 - osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] )
3877 - pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
3878 - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
3879 - pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
3880 - scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
3881 - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
3882 - staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
3883 - themes? (
3884 - dev-libs/glib:2[${MULTILIB_USEDEP}]
3885 - x11-libs/cairo[${MULTILIB_USEDEP}]
3886 - x11-libs/gtk+:3[${MULTILIB_USEDEP}]
3887 - )
3888 - truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
3889 - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
3890 - udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
3891 - v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
3892 - vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
3893 - xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
3894 - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
3895 - xml? (
3896 - dev-libs/libxml2[${MULTILIB_USEDEP}]
3897 - dev-libs/libxslt[${MULTILIB_USEDEP}]
3898 - )
3899 - abi_x86_32? (
3900 - !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
3901 - !<app-emulation/emul-linux-x86-baselibs-20140508-r14
3902 - !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
3903 - !<app-emulation/emul-linux-x86-db-20140508-r3
3904 - !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
3905 - !<app-emulation/emul-linux-x86-medialibs-20140508-r6
3906 - !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
3907 - !<app-emulation/emul-linux-x86-opengl-20140508-r1
3908 - !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
3909 - !<app-emulation/emul-linux-x86-sdl-20140508-r1
3910 - !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
3911 - !<app-emulation/emul-linux-x86-soundlibs-20140508
3912 - !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
3913 - !<app-emulation/emul-linux-x86-xlibs-20140508
3914 - )"
3915 -
3916 -RDEPEND="${COMMON_DEPEND}
3917 - app-emulation/wine-desktop-common
3918 - >app-eselect/eselect-wine-0.3
3919 - !app-emulation/wine:0
3920 - dos? ( >=games-emulation/dosbox-0.74_p20160629 )
3921 - gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
3922 - mono? ( app-emulation/wine-mono:4.7.1 )
3923 - perl? (
3924 - dev-lang/perl
3925 - dev-perl/XML-Simple
3926 - )
3927 - pulseaudio? (
3928 - realtime? ( sys-auth/rtkit )
3929 - )
3930 - s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] )
3931 - samba? ( >=net-fs/samba-3.0.25[winbind] )
3932 - selinux? ( sec-policy/selinux-wine )
3933 - udisks? ( sys-fs/udisks:2 )"
3934 -
3935 -# tools/make_requests requires perl
3936 -DEPEND="${COMMON_DEPEND}
3937 - sys-devel/flex
3938 - >=sys-kernel/linux-headers-2.6
3939 - virtual/pkgconfig
3940 - virtual/yacc
3941 - X? (
3942 - x11-proto/inputproto
3943 - x11-proto/xextproto
3944 - x11-proto/xf86vidmodeproto
3945 - )
3946 - prelink? ( sys-devel/prelink )
3947 - staging? (
3948 - dev-lang/perl
3949 - dev-perl/XML-Simple
3950 - )
3951 - xinerama? ( x11-proto/xineramaproto )"
3952 -
3953 -# These use a non-standard "Wine" category, which is provided by
3954 -# /etc/xdg/applications-merged/wine.menu
3955 -QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
3956 -usr/share/applications/wine-notepad.desktop
3957 -usr/share/applications/wine-uninstaller.desktop
3958 -usr/share/applications/wine-winecfg.desktop"
3959 -
3960 -PATCHES=(
3961 - "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
3962 - "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
3963 - "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
3964 - "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
3965 - "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
3966 - "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
3967 -)
3968 -PATCHES_BIN=(
3969 - "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
3970 -)
3971 -
3972 -# https://bugs.gentoo.org/show_bug.cgi?id=635222
3973 -if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then
3974 - DEPEND+=" dev-util/patchbin"
3975 -fi
3976 -
3977 -wine_compiler_check() {
3978 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
3979 -
3980 - # GCC-specific bugs
3981 - if tc-is-gcc; then
3982 - # bug #549768
3983 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
3984 - ebegin "Checking for gcc-5 ms_abi compiler bug"
3985 - $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
3986 - # Run in subshell to prevent "Aborted" message
3987 - ( "${T}"/pr66838 || false ) >/dev/null 2>&1
3988 - if ! eend $?; then
3989 - eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
3990 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
3991 - eerror "or use gcc-config to select a different compiler version."
3992 - eerror "See https://bugs.gentoo.org/549768"
3993 - eerror
3994 - return 1
3995 - fi
3996 - fi
3997 - # bug #574044
3998 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
3999 - ebegin "Checking for gcc-5-3 stack realignment compiler bug"
4000 - # Compile in subshell to prevent "Aborted" message
4001 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
4002 - if ! eend $?; then
4003 - eerror "Wine cannot be built with this version of gcc-5.3"
4004 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
4005 - eerror "or use gcc-config to select a different compiler version."
4006 - eerror "See https://bugs.gentoo.org/574044"
4007 - eerror
4008 - return 1
4009 - fi
4010 - fi
4011 - fi
4012 -
4013 - # Ensure compiler support
4014 - if use abi_x86_64; then
4015 - ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
4016 - # Compile in subshell to prevent "Aborted" message
4017 - ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
4018 - if ! eend $?; then
4019 - eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
4020 - eerror
4021 - eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine"
4022 - eerror
4023 - return 1
4024 - fi
4025 - fi
4026 -}
4027 -
4028 -wine_build_environment_check() {
4029 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
4030 -
4031 - if use abi_x86_64; then
4032 - if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
4033 - eerror "You need gcc-4.4+ to compile 64-bit wine"
4034 - die
4035 - elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
4036 - eerror "You need clang-3.8+ to compile 64-bit wine"
4037 - die
4038 - fi
4039 - fi
4040 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
4041 - ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
4042 - ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
4043 - ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
4044 - fi
4045 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
4046 - if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
4047 - ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work"
4048 - ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
4049 - ewarn "See package.env in man 5 portage for more information on how to do this."
4050 - ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
4051 - fi
4052 - fi
4053 -
4054 - if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then
4055 - eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
4056 - eerror "See https://bugs.gentoo.org/487864 for more details."
4057 - eerror
4058 - return 1
4059 - fi
4060 -}
4061 -
4062 -wine_env_vcs_vars() {
4063 - local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
4064 - local pn_live_val="${pn_live_var}"
4065 - eval pn_live_val='$'${pn_live_val}
4066 - if [[ ! -z ${pn_live_val} ]]; then
4067 - if use staging; then
4068 - eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}"
4069 - eerror "cannot be used to set the commit. Instead, you may use the"
4070 - eerror "environmental variables WINE_COMMIT, and STAGING_COMMIT."
4071 - eerror
4072 - return 1
4073 - fi
4074 - fi
4075 - if [[ ! -z ${EGIT_COMMIT} ]]; then
4076 - eerror "Commits must now be specified using the environmental variables"
4077 - eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT"
4078 - eerror
4079 - return 1
4080 - fi
4081 -}
4082 -
4083 -pkg_pretend() {
4084 - wine_build_environment_check || die
4085 -
4086 - # Verify OSS support
4087 - if use oss && ! use kernel_FreeBSD; then
4088 - if ! has_version ">=media-sound/oss-4"; then
4089 - eerror "You cannot build wine with USE=oss without having support from a"
4090 - eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)"
4091 - eerror
4092 - die
4093 - fi
4094 - fi
4095 -}
4096 -
4097 -pkg_setup() {
4098 - wine_build_environment_check || die
4099 - wine_env_vcs_vars || die
4100 -
4101 - WINE_VARIANT="${PN#wine}-${PV}"
4102 - WINE_VARIANT="${WINE_VARIANT#-}"
4103 -
4104 - MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
4105 - MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
4106 - MY_DATADIR="${MY_DATAROOTDIR}"
4107 - MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
4108 - MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
4109 - MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
4110 - MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
4111 - MY_MANDIR="${MY_DATADIR}/man"
4112 -}
4113 -
4114 -src_unpack() {
4115 - if [[ ${PV} == "9999" ]] ; then
4116 - EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
4117 - if use staging; then
4118 - local CURRENT_WINE_COMMIT=${EGIT_VERSION}
4119 -
4120 - git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}"
4121 - git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}"
4122 -
4123 - local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die
4124 -
4125 - if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then
4126 - einfo "The current Staging patchset is not guaranteed to apply on this WINE commit."
4127 - einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT."
4128 - einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine"
4129 - fi
4130 - fi
4131 - fi
4132 -
4133 - default
4134 -
4135 - l10n_find_plocales_changes "${S}/po" "" ".po"
4136 -}
4137 -
4138 -src_prepare() {
4139 -
4140 - eapply_bin(){
4141 - local patch
4142 - for patch in ${PATCHES_BIN[@]}; do
4143 - patchbin --nogit < "${patch}" || die
4144 - done
4145 - }
4146 -
4147 - local md5="$(md5sum server/protocol.def)"
4148 -
4149 - if use staging; then
4150 - ewarn "Applying the Wine-Staging patchset. Any bug reports to the"
4151 - ewarn "Wine bugzilla should explicitly state that staging was used."
4152 -
4153 - local STAGING_EXCLUDE=""
4154 - STAGING_EXCLUDE="${STAGING_EXCLUDE} -W winhlp32-Flex_Workaround" # Avoid double patching https://bugs.winehq.org/show_bug.cgi?id=42132
4155 - use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
4156 -
4157 - # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches
4158 - ebegin "Running Wine-Staging patch installer"
4159 - (
4160 - set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE}
4161 - cd "${STAGING_DIR}/patches"
4162 - source "${STAGING_DIR}/patches/patchinstall.sh"
4163 - )
4164 - eend $? || die "Failed to apply Wine-Staging patches"
4165 - fi
4166 -
4167 - default
4168 - eapply_bin
4169 - eautoreconf
4170 -
4171 - # Modification of the server protocol requires regenerating the server requests
4172 - if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
4173 - einfo "server/protocol.def was patched; running tools/make_requests"
4174 - tools/make_requests || die #432348
4175 - fi
4176 - sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
4177 - if ! use run-exes; then
4178 - sed -i '/^MimeType/d' loader/wine.desktop || die #117785
4179 - fi
4180 -
4181 - # Edit wine.desktop to work for specific variant
4182 - sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
4183 -
4184 - # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
4185 - cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
4186 -
4187 - l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
4188 -}
4189 -
4190 -src_configure() {
4191 - wine_compiler_check || die
4192 -
4193 - export LDCONFIG=/bin/true
4194 - use custom-cflags || strip-flags
4195 -
4196 - multilib-minimal_src_configure
4197 -}
4198 -
4199 -multilib_src_configure() {
4200 - local myconf=(
4201 - --prefix="${MY_PREFIX}"
4202 - --datarootdir="${MY_DATAROOTDIR}"
4203 - --datadir="${MY_DATADIR}"
4204 - --docdir="${MY_DOCDIR}"
4205 - --includedir="${MY_INCLUDEDIR}"
4206 - --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
4207 - --libexecdir="${MY_LIBEXECDIR}"
4208 - --localstatedir="${MY_LOCALSTATEDIR}"
4209 - --mandir="${MY_MANDIR}"
4210 - --sysconfdir=/etc/wine
4211 - $(use_with alsa)
4212 - $(use_with capi)
4213 - $(use_with lcms cms)
4214 - $(use_with cups)
4215 - $(use_with ncurses curses)
4216 - $(use_with udisks dbus)
4217 - $(use_with fontconfig)
4218 - $(use_with ssl gnutls)
4219 - $(use_enable gecko mshtml)
4220 - $(use_with gphoto2 gphoto)
4221 - $(use_with gsm)
4222 - $(use_with gstreamer)
4223 - --without-hal
4224 - $(use_with jpeg)
4225 - $(use_with ldap)
4226 - $(use_enable mono mscoree)
4227 - $(use_with mp3 mpg123)
4228 - $(use_with netapi)
4229 - $(use_with nls gettext)
4230 - $(use_with openal)
4231 - $(use_with opencl)
4232 - $(use_with opengl)
4233 - $(use_with osmesa)
4234 - $(use_with oss)
4235 - $(use_with pcap)
4236 - $(use_with png)
4237 - $(use_with pulseaudio pulse)
4238 - $(use_with threads pthread)
4239 - $(use_with scanner sane)
4240 - $(use_enable test tests)
4241 - $(use_with truetype freetype)
4242 - $(use_with udev)
4243 - $(use_with v4l)
4244 - $(use_with X x)
4245 - $(use_with X xfixes)
4246 - $(use_with xcomposite)
4247 - $(use_with xinerama)
4248 - $(use_with xml)
4249 - $(use_with xml xslt)
4250 - )
4251 -
4252 - use staging && myconf+=(
4253 - --with-xattr
4254 - $(use_with themes gtk3)
4255 - $(use_with vaapi va)
4256 - )
4257 -
4258 - local PKG_CONFIG AR RANLIB
4259 - # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
4260 - # set AR and RANLIB to make QA scripts happy; #483342
4261 - tc-export PKG_CONFIG AR RANLIB
4262 -
4263 - if use amd64; then
4264 - if [[ ${ABI} == amd64 ]]; then
4265 - myconf+=( --enable-win64 )
4266 - else
4267 - myconf+=( --disable-win64 )
4268 - fi
4269 -
4270 - # Note: using --with-wine64 results in problems with multilib.eclass
4271 - # CC/LD hackery. We're using separate tools instead.
4272 - fi
4273 -
4274 - ECONF_SOURCE=${S} \
4275 - econf "${myconf[@]}"
4276 - emake depend
4277 -}
4278 -
4279 -multilib_src_test() {
4280 - # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
4281 - if [[ ${ABI} == x86 ]]; then
4282 - if [[ $(id -u) == 0 ]]; then
4283 - ewarn "Skipping tests since they cannot be run under the root user."
4284 - ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
4285 - return
4286 - fi
4287 -
4288 - WINEPREFIX="${T}/.wine-${ABI}" \
4289 - Xemake test
4290 - fi
4291 -}
4292 -
4293 -multilib_src_install_all() {
4294 - local DOCS=( ANNOUNCE AUTHORS README )
4295 - add_locale_docs() {
4296 - local locale_doc="documentation/README.$1"
4297 - [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
4298 - }
4299 - l10n_for_each_locale_do add_locale_docs
4300 -
4301 - einstalldocs
4302 - prune_libtool_files --all
4303 -
4304 - if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
4305 - rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
4306 - "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
4307 - fi
4308 -
4309 - # Remove wineconsole if neither backend is installed #551124
4310 - if ! use X && ! use ncurses; then
4311 - rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
4312 - rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
4313 - rm_wineconsole() {
4314 - rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
4315 - }
4316 - multilib_foreach_abi rm_wineconsole
4317 - fi
4318 -
4319 - use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
4320 - use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
4321 -
4322 - if use abi_x86_64 && ! use abi_x86_32; then
4323 - dosym wine64 "${MY_PREFIX}"/bin/wine # 404331
4324 - dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader
4325 - fi
4326 -
4327 - # Failglob for bin and man loops
4328 - local glob_state=$(shopt -p failglob)
4329 - shopt -s failglob
4330 -
4331 - # Make wrappers for binaries for handling multiple variants
4332 - # Note: wrappers instead of symlinks because some are shell which use basename
4333 - local b
4334 - for b in "${D%/}${MY_PREFIX}"/bin/*; do
4335 - make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
4336 - done
4337 -
4338 - # respect LINGUAS when installing man pages, #469418
4339 - local l
4340 - for l in de fr pl; do
4341 - use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}*
4342 - done
4343 -
4344 - eval "${glob_state}"
4345 -}
4346 -
4347 -pkg_postinst() {
4348 - eselect wine register ${P}
4349 - if [[ ${PN} == "wine-vanilla" ]]; then
4350 - eselect wine register --vanilla ${P} || die
4351 - else
4352 - if use staging; then
4353 - eselect wine register --staging ${P} || die
4354 - fi
4355 - fi
4356 -
4357 - eselect wine update --all --if-unset || die
4358 -
4359 - xdg_desktop_database_update
4360 -
4361 - if ! use gecko; then
4362 - ewarn "Without Wine Gecko, wine prefixes will not have a default"
4363 - ewarn "implementation of iexplore. Many older windows applications"
4364 - ewarn "rely upon the existence of an iexplore implementation, so"
4365 - ewarn "you will likely need to install an external one, like via winetricks"
4366 - fi
4367 - if ! use mono; then
4368 - ewarn "Without Wine Mono, wine prefixes will not have a default"
4369 - ewarn "implementation of .NET. Many windows applications rely upon"
4370 - ewarn "the existence of a .NET implementation, so you will likely need"
4371 - ewarn "to install an external one, like via winetricks"
4372 - fi
4373 -}
4374 -
4375 -pkg_prerm() {
4376 - eselect wine deregister ${P}
4377 - if [[ ${PN} == "wine-vanilla" ]]; then
4378 - eselect wine deregister --vanilla ${P} || die
4379 - else
4380 - if use staging; then
4381 - eselect wine deregister --staging ${P} || die
4382 - fi
4383 - fi
4384 -
4385 - eselect wine update --all --if-unset || die
4386 -}
4387 -
4388 -pkg_postrm() {
4389 - xdg_desktop_database_update
4390 -}
4391
4392 diff --git a/app-emulation/wine-staging/wine-staging-2.15-r1.ebuild b/app-emulation/wine-staging/wine-staging-2.15-r1.ebuild
4393 deleted file mode 100644
4394 index 9df84ca6f8f..00000000000
4395 --- a/app-emulation/wine-staging/wine-staging-2.15-r1.ebuild
4396 +++ /dev/null
4397 @@ -1,609 +0,0 @@
4398 -# Copyright 1999-2017 Gentoo Foundation
4399 -# Distributed under the terms of the GNU General Public License v2
4400 -
4401 -EAPI=6
4402 -
4403 -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"
4404 -PLOCALE_BACKUP="en"
4405 -
4406 -inherit autotools eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils
4407 -
4408 -MY_PN="${PN%%-*}"
4409 -MY_P="${MY_PN}-${PV}"
4410 -
4411 -if [[ ${PV} == "9999" ]] ; then
4412 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
4413 - EGIT_BRANCH="master"
4414 - inherit git-r3
4415 - SRC_URI=""
4416 - #KEYWORDS=""
4417 -else
4418 - MAJOR_V=$(get_version_component_range 1)
4419 - SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
4420 - KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
4421 -fi
4422 -S="${WORKDIR}/${MY_P}"
4423 -
4424 -STAGING_P="wine-staging-${PV}"
4425 -STAGING_DIR="${WORKDIR}/${STAGING_P}"
4426 -GWP_V="20170830"
4427 -PATCHDIR="${WORKDIR}/gentoo-wine-patches"
4428 -
4429 -DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset"
4430 -HOMEPAGE="https://www.winehq.org/"
4431 -SRC_URI="${SRC_URI}
4432 - https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
4433 -"
4434 -
4435 -if [[ ${PV} == "9999" ]] ; then
4436 - STAGING_EGIT_REPO_URI="https://github.com/wine-compholio/wine-staging.git"
4437 -else
4438 - SRC_URI="${SRC_URI}
4439 - staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
4440 -fi
4441 -
4442 -LICENSE="LGPL-2.1"
4443 -SLOT="${PV}"
4444 -IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags 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"
4445 -REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
4446 - X? ( truetype )
4447 - elibc_glibc? ( threads )
4448 - osmesa? ( opengl )
4449 - pipelight? ( staging )
4450 - s3tc? ( staging )
4451 - test? ( abi_x86_32 )
4452 - themes? ( staging )
4453 - vaapi? ( staging )" # osmesa-opengl #286560 # X-truetype #551124
4454 -
4455 -# FIXME: the test suite is unsuitable for us; many tests require net access
4456 -# or fail due to Xvfb's opengl limitations.
4457 -RESTRICT="test"
4458 -
4459 -COMMON_DEPEND="
4460 - X? (
4461 - x11-libs/libXcursor[${MULTILIB_USEDEP}]
4462 - x11-libs/libXext[${MULTILIB_USEDEP}]
4463 - x11-libs/libXfixes[${MULTILIB_USEDEP}]
4464 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
4465 - x11-libs/libXi[${MULTILIB_USEDEP}]
4466 - x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
4467 - )
4468 - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
4469 - capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
4470 - cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
4471 - fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
4472 - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
4473 - gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
4474 - gstreamer? (
4475 - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
4476 - media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
4477 - )
4478 - jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
4479 - lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
4480 - ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
4481 - mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
4482 - ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] )
4483 - netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
4484 - nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
4485 - odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
4486 - openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
4487 - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
4488 - opengl? (
4489 - virtual/glu[${MULTILIB_USEDEP}]
4490 - virtual/opengl[${MULTILIB_USEDEP}]
4491 - )
4492 - osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] )
4493 - pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
4494 - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
4495 - pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
4496 - scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
4497 - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
4498 - staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
4499 - themes? (
4500 - dev-libs/glib:2[${MULTILIB_USEDEP}]
4501 - x11-libs/cairo[${MULTILIB_USEDEP}]
4502 - x11-libs/gtk+:3[${MULTILIB_USEDEP}]
4503 - )
4504 - truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
4505 - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
4506 - udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
4507 - v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
4508 - vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
4509 - xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
4510 - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
4511 - xml? (
4512 - dev-libs/libxml2[${MULTILIB_USEDEP}]
4513 - dev-libs/libxslt[${MULTILIB_USEDEP}]
4514 - )
4515 - abi_x86_32? (
4516 - !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
4517 - !<app-emulation/emul-linux-x86-baselibs-20140508-r14
4518 - !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
4519 - !<app-emulation/emul-linux-x86-db-20140508-r3
4520 - !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
4521 - !<app-emulation/emul-linux-x86-medialibs-20140508-r6
4522 - !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
4523 - !<app-emulation/emul-linux-x86-opengl-20140508-r1
4524 - !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
4525 - !<app-emulation/emul-linux-x86-sdl-20140508-r1
4526 - !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
4527 - !<app-emulation/emul-linux-x86-soundlibs-20140508
4528 - !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
4529 - !<app-emulation/emul-linux-x86-xlibs-20140508
4530 - )"
4531 -
4532 -RDEPEND="${COMMON_DEPEND}
4533 - app-emulation/wine-desktop-common
4534 - >app-eselect/eselect-wine-0.3
4535 - !app-emulation/wine:0
4536 - dos? ( >=games-emulation/dosbox-0.74_p20160629 )
4537 - gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
4538 - mono? ( app-emulation/wine-mono:4.7.1 )
4539 - perl? (
4540 - dev-lang/perl
4541 - dev-perl/XML-Simple
4542 - )
4543 - pulseaudio? (
4544 - realtime? ( sys-auth/rtkit )
4545 - )
4546 - s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] )
4547 - samba? ( >=net-fs/samba-3.0.25[winbind] )
4548 - selinux? ( sec-policy/selinux-wine )
4549 - udisks? ( sys-fs/udisks:2 )"
4550 -
4551 -# tools/make_requests requires perl
4552 -DEPEND="${COMMON_DEPEND}
4553 - sys-devel/flex
4554 - >=sys-kernel/linux-headers-2.6
4555 - virtual/pkgconfig
4556 - virtual/yacc
4557 - X? (
4558 - x11-proto/inputproto
4559 - x11-proto/xextproto
4560 - x11-proto/xf86vidmodeproto
4561 - )
4562 - prelink? ( sys-devel/prelink )
4563 - staging? (
4564 - dev-lang/perl
4565 - dev-perl/XML-Simple
4566 - )
4567 - xinerama? ( x11-proto/xineramaproto )"
4568 -
4569 -# These use a non-standard "Wine" category, which is provided by
4570 -# /etc/xdg/applications-merged/wine.menu
4571 -QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
4572 -usr/share/applications/wine-notepad.desktop
4573 -usr/share/applications/wine-uninstaller.desktop
4574 -usr/share/applications/wine-winecfg.desktop"
4575 -
4576 -PATCHES=(
4577 - "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
4578 - "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
4579 - "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
4580 - "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
4581 - "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
4582 - "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
4583 -)
4584 -PATCHES_BIN=(
4585 - "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
4586 -)
4587 -
4588 -# https://bugs.gentoo.org/show_bug.cgi?id=635222
4589 -if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then
4590 - DEPEND+=" dev-util/patchbin"
4591 -fi
4592 -
4593 -wine_compiler_check() {
4594 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
4595 -
4596 - # GCC-specific bugs
4597 - if tc-is-gcc; then
4598 - # bug #549768
4599 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
4600 - ebegin "Checking for gcc-5 ms_abi compiler bug"
4601 - $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
4602 - # Run in subshell to prevent "Aborted" message
4603 - ( "${T}"/pr66838 || false ) >/dev/null 2>&1
4604 - if ! eend $?; then
4605 - eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
4606 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
4607 - eerror "or use gcc-config to select a different compiler version."
4608 - eerror "See https://bugs.gentoo.org/549768"
4609 - eerror
4610 - return 1
4611 - fi
4612 - fi
4613 - # bug #574044
4614 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
4615 - ebegin "Checking for gcc-5-3 stack realignment compiler bug"
4616 - # Compile in subshell to prevent "Aborted" message
4617 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
4618 - if ! eend $?; then
4619 - eerror "Wine cannot be built with this version of gcc-5.3"
4620 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
4621 - eerror "or use gcc-config to select a different compiler version."
4622 - eerror "See https://bugs.gentoo.org/574044"
4623 - eerror
4624 - return 1
4625 - fi
4626 - fi
4627 - fi
4628 -
4629 - # Ensure compiler support
4630 - if use abi_x86_64; then
4631 - ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
4632 - # Compile in subshell to prevent "Aborted" message
4633 - ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
4634 - if ! eend $?; then
4635 - eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
4636 - eerror
4637 - eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine"
4638 - eerror
4639 - return 1
4640 - fi
4641 - fi
4642 -}
4643 -
4644 -wine_build_environment_check() {
4645 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
4646 -
4647 - if use abi_x86_64; then
4648 - if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
4649 - eerror "You need gcc-4.4+ to compile 64-bit wine"
4650 - die
4651 - elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
4652 - eerror "You need clang-3.8+ to compile 64-bit wine"
4653 - die
4654 - fi
4655 - fi
4656 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
4657 - ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
4658 - ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
4659 - ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
4660 - fi
4661 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
4662 - if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
4663 - ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work"
4664 - ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
4665 - ewarn "See package.env in man 5 portage for more information on how to do this."
4666 - ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
4667 - fi
4668 - fi
4669 -
4670 - if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then
4671 - eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
4672 - eerror "See https://bugs.gentoo.org/487864 for more details."
4673 - eerror
4674 - return 1
4675 - fi
4676 -}
4677 -
4678 -wine_env_vcs_vars() {
4679 - local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
4680 - local pn_live_val="${pn_live_var}"
4681 - eval pn_live_val='$'${pn_live_val}
4682 - if [[ ! -z ${pn_live_val} ]]; then
4683 - if use staging; then
4684 - eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}"
4685 - eerror "cannot be used to set the commit. Instead, you may use the"
4686 - eerror "environmental variables WINE_COMMIT, and STAGING_COMMIT."
4687 - eerror
4688 - return 1
4689 - fi
4690 - fi
4691 - if [[ ! -z ${EGIT_COMMIT} ]]; then
4692 - eerror "Commits must now be specified using the environmental variables"
4693 - eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT"
4694 - eerror
4695 - return 1
4696 - fi
4697 -}
4698 -
4699 -pkg_pretend() {
4700 - wine_build_environment_check || die
4701 -
4702 - # Verify OSS support
4703 - if use oss && ! use kernel_FreeBSD; then
4704 - if ! has_version ">=media-sound/oss-4"; then
4705 - eerror "You cannot build wine with USE=oss without having support from a"
4706 - eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)"
4707 - eerror
4708 - die
4709 - fi
4710 - fi
4711 -}
4712 -
4713 -pkg_setup() {
4714 - wine_build_environment_check || die
4715 - wine_env_vcs_vars || die
4716 -
4717 - WINE_VARIANT="${PN#wine}-${PV}"
4718 - WINE_VARIANT="${WINE_VARIANT#-}"
4719 -
4720 - MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
4721 - MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
4722 - MY_DATADIR="${MY_DATAROOTDIR}"
4723 - MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
4724 - MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
4725 - MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
4726 - MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
4727 - MY_MANDIR="${MY_DATADIR}/man"
4728 -}
4729 -
4730 -src_unpack() {
4731 - if [[ ${PV} == "9999" ]] ; then
4732 - EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
4733 - if use staging; then
4734 - local CURRENT_WINE_COMMIT=${EGIT_VERSION}
4735 -
4736 - git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}"
4737 - git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}"
4738 -
4739 - local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die
4740 -
4741 - if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then
4742 - einfo "The current Staging patchset is not guaranteed to apply on this WINE commit."
4743 - einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT."
4744 - einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine"
4745 - fi
4746 - fi
4747 - fi
4748 -
4749 - default
4750 -
4751 - l10n_find_plocales_changes "${S}/po" "" ".po"
4752 -}
4753 -
4754 -src_prepare() {
4755 -
4756 - eapply_bin(){
4757 - local patch
4758 - for patch in ${PATCHES_BIN[@]}; do
4759 - patchbin --nogit < "${patch}" || die
4760 - done
4761 - }
4762 -
4763 - local md5="$(md5sum server/protocol.def)"
4764 -
4765 - if use staging; then
4766 - ewarn "Applying the Wine-Staging patchset. Any bug reports to the"
4767 - ewarn "Wine bugzilla should explicitly state that staging was used."
4768 -
4769 - local STAGING_EXCLUDE=""
4770 - STAGING_EXCLUDE="${STAGING_EXCLUDE} -W winhlp32-Flex_Workaround" # Avoid double patching https://bugs.winehq.org/show_bug.cgi?id=42132
4771 - use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
4772 -
4773 - # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches
4774 - ebegin "Running Wine-Staging patch installer"
4775 - (
4776 - set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE}
4777 - cd "${STAGING_DIR}/patches"
4778 - source "${STAGING_DIR}/patches/patchinstall.sh"
4779 - )
4780 - eend $? || die "Failed to apply Wine-Staging patches"
4781 - fi
4782 -
4783 - default
4784 - eapply_bin
4785 - eautoreconf
4786 -
4787 - # Modification of the server protocol requires regenerating the server requests
4788 - if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
4789 - einfo "server/protocol.def was patched; running tools/make_requests"
4790 - tools/make_requests || die #432348
4791 - fi
4792 - sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
4793 - if ! use run-exes; then
4794 - sed -i '/^MimeType/d' loader/wine.desktop || die #117785
4795 - fi
4796 -
4797 - # Edit wine.desktop to work for specific variant
4798 - sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
4799 -
4800 - # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
4801 - cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
4802 -
4803 - l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
4804 -}
4805 -
4806 -src_configure() {
4807 - wine_compiler_check || die
4808 -
4809 - export LDCONFIG=/bin/true
4810 - use custom-cflags || strip-flags
4811 -
4812 - multilib-minimal_src_configure
4813 -}
4814 -
4815 -multilib_src_configure() {
4816 - local myconf=(
4817 - --prefix="${MY_PREFIX}"
4818 - --datarootdir="${MY_DATAROOTDIR}"
4819 - --datadir="${MY_DATADIR}"
4820 - --docdir="${MY_DOCDIR}"
4821 - --includedir="${MY_INCLUDEDIR}"
4822 - --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
4823 - --libexecdir="${MY_LIBEXECDIR}"
4824 - --localstatedir="${MY_LOCALSTATEDIR}"
4825 - --mandir="${MY_MANDIR}"
4826 - --sysconfdir=/etc/wine
4827 - $(use_with alsa)
4828 - $(use_with capi)
4829 - $(use_with lcms cms)
4830 - $(use_with cups)
4831 - $(use_with ncurses curses)
4832 - $(use_with udisks dbus)
4833 - $(use_with fontconfig)
4834 - $(use_with ssl gnutls)
4835 - $(use_enable gecko mshtml)
4836 - $(use_with gphoto2 gphoto)
4837 - $(use_with gsm)
4838 - $(use_with gstreamer)
4839 - --without-hal
4840 - $(use_with jpeg)
4841 - $(use_with ldap)
4842 - $(use_enable mono mscoree)
4843 - $(use_with mp3 mpg123)
4844 - $(use_with netapi)
4845 - $(use_with nls gettext)
4846 - $(use_with openal)
4847 - $(use_with opencl)
4848 - $(use_with opengl)
4849 - $(use_with osmesa)
4850 - $(use_with oss)
4851 - $(use_with pcap)
4852 - $(use_with png)
4853 - $(use_with pulseaudio pulse)
4854 - $(use_with threads pthread)
4855 - $(use_with scanner sane)
4856 - $(use_enable test tests)
4857 - $(use_with truetype freetype)
4858 - $(use_with udev)
4859 - $(use_with v4l)
4860 - $(use_with X x)
4861 - $(use_with X xfixes)
4862 - $(use_with xcomposite)
4863 - $(use_with xinerama)
4864 - $(use_with xml)
4865 - $(use_with xml xslt)
4866 - )
4867 -
4868 - use staging && myconf+=(
4869 - --with-xattr
4870 - $(use_with themes gtk3)
4871 - $(use_with vaapi va)
4872 - )
4873 -
4874 - local PKG_CONFIG AR RANLIB
4875 - # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
4876 - # set AR and RANLIB to make QA scripts happy; #483342
4877 - tc-export PKG_CONFIG AR RANLIB
4878 -
4879 - if use amd64; then
4880 - if [[ ${ABI} == amd64 ]]; then
4881 - myconf+=( --enable-win64 )
4882 - else
4883 - myconf+=( --disable-win64 )
4884 - fi
4885 -
4886 - # Note: using --with-wine64 results in problems with multilib.eclass
4887 - # CC/LD hackery. We're using separate tools instead.
4888 - fi
4889 -
4890 - ECONF_SOURCE=${S} \
4891 - econf "${myconf[@]}"
4892 - emake depend
4893 -}
4894 -
4895 -multilib_src_test() {
4896 - # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
4897 - if [[ ${ABI} == x86 ]]; then
4898 - if [[ $(id -u) == 0 ]]; then
4899 - ewarn "Skipping tests since they cannot be run under the root user."
4900 - ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
4901 - return
4902 - fi
4903 -
4904 - WINEPREFIX="${T}/.wine-${ABI}" \
4905 - Xemake test
4906 - fi
4907 -}
4908 -
4909 -multilib_src_install_all() {
4910 - local DOCS=( ANNOUNCE AUTHORS README )
4911 - add_locale_docs() {
4912 - local locale_doc="documentation/README.$1"
4913 - [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
4914 - }
4915 - l10n_for_each_locale_do add_locale_docs
4916 -
4917 - einstalldocs
4918 - prune_libtool_files --all
4919 -
4920 - if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
4921 - rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
4922 - "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
4923 - fi
4924 -
4925 - # Remove wineconsole if neither backend is installed #551124
4926 - if ! use X && ! use ncurses; then
4927 - rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
4928 - rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
4929 - rm_wineconsole() {
4930 - rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
4931 - }
4932 - multilib_foreach_abi rm_wineconsole
4933 - fi
4934 -
4935 - use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
4936 - use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
4937 -
4938 - if use abi_x86_64 && ! use abi_x86_32; then
4939 - dosym wine64 "${MY_PREFIX}"/bin/wine # 404331
4940 - dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader
4941 - fi
4942 -
4943 - # Failglob for bin and man loops
4944 - local glob_state=$(shopt -p failglob)
4945 - shopt -s failglob
4946 -
4947 - # Make wrappers for binaries for handling multiple variants
4948 - # Note: wrappers instead of symlinks because some are shell which use basename
4949 - local b
4950 - for b in "${D%/}${MY_PREFIX}"/bin/*; do
4951 - make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
4952 - done
4953 -
4954 - # respect LINGUAS when installing man pages, #469418
4955 - local l
4956 - for l in de fr pl; do
4957 - use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}*
4958 - done
4959 -
4960 - eval "${glob_state}"
4961 -}
4962 -
4963 -pkg_postinst() {
4964 - eselect wine register ${P}
4965 - if [[ ${PN} == "wine-vanilla" ]]; then
4966 - eselect wine register --vanilla ${P} || die
4967 - else
4968 - if use staging; then
4969 - eselect wine register --staging ${P} || die
4970 - fi
4971 - fi
4972 -
4973 - eselect wine update --all --if-unset || die
4974 -
4975 - xdg_desktop_database_update
4976 -
4977 - if ! use gecko; then
4978 - ewarn "Without Wine Gecko, wine prefixes will not have a default"
4979 - ewarn "implementation of iexplore. Many older windows applications"
4980 - ewarn "rely upon the existence of an iexplore implementation, so"
4981 - ewarn "you will likely need to install an external one, like via winetricks"
4982 - fi
4983 - if ! use mono; then
4984 - ewarn "Without Wine Mono, wine prefixes will not have a default"
4985 - ewarn "implementation of .NET. Many windows applications rely upon"
4986 - ewarn "the existence of a .NET implementation, so you will likely need"
4987 - ewarn "to install an external one, like via winetricks"
4988 - fi
4989 -}
4990 -
4991 -pkg_prerm() {
4992 - eselect wine deregister ${P}
4993 - if [[ ${PN} == "wine-vanilla" ]]; then
4994 - eselect wine deregister --vanilla ${P} || die
4995 - else
4996 - if use staging; then
4997 - eselect wine deregister --staging ${P} || die
4998 - fi
4999 - fi
5000 -
5001 - eselect wine update --all --if-unset || die
5002 -}
5003 -
5004 -pkg_postrm() {
5005 - xdg_desktop_database_update
5006 -}
5007
5008 diff --git a/app-emulation/wine-staging/wine-staging-2.16-r1.ebuild b/app-emulation/wine-staging/wine-staging-2.16-r1.ebuild
5009 deleted file mode 100644
5010 index 9df84ca6f8f..00000000000
5011 --- a/app-emulation/wine-staging/wine-staging-2.16-r1.ebuild
5012 +++ /dev/null
5013 @@ -1,609 +0,0 @@
5014 -# Copyright 1999-2017 Gentoo Foundation
5015 -# Distributed under the terms of the GNU General Public License v2
5016 -
5017 -EAPI=6
5018 -
5019 -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"
5020 -PLOCALE_BACKUP="en"
5021 -
5022 -inherit autotools eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils
5023 -
5024 -MY_PN="${PN%%-*}"
5025 -MY_P="${MY_PN}-${PV}"
5026 -
5027 -if [[ ${PV} == "9999" ]] ; then
5028 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
5029 - EGIT_BRANCH="master"
5030 - inherit git-r3
5031 - SRC_URI=""
5032 - #KEYWORDS=""
5033 -else
5034 - MAJOR_V=$(get_version_component_range 1)
5035 - SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
5036 - KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
5037 -fi
5038 -S="${WORKDIR}/${MY_P}"
5039 -
5040 -STAGING_P="wine-staging-${PV}"
5041 -STAGING_DIR="${WORKDIR}/${STAGING_P}"
5042 -GWP_V="20170830"
5043 -PATCHDIR="${WORKDIR}/gentoo-wine-patches"
5044 -
5045 -DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset"
5046 -HOMEPAGE="https://www.winehq.org/"
5047 -SRC_URI="${SRC_URI}
5048 - https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
5049 -"
5050 -
5051 -if [[ ${PV} == "9999" ]] ; then
5052 - STAGING_EGIT_REPO_URI="https://github.com/wine-compholio/wine-staging.git"
5053 -else
5054 - SRC_URI="${SRC_URI}
5055 - staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
5056 -fi
5057 -
5058 -LICENSE="LGPL-2.1"
5059 -SLOT="${PV}"
5060 -IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags 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"
5061 -REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
5062 - X? ( truetype )
5063 - elibc_glibc? ( threads )
5064 - osmesa? ( opengl )
5065 - pipelight? ( staging )
5066 - s3tc? ( staging )
5067 - test? ( abi_x86_32 )
5068 - themes? ( staging )
5069 - vaapi? ( staging )" # osmesa-opengl #286560 # X-truetype #551124
5070 -
5071 -# FIXME: the test suite is unsuitable for us; many tests require net access
5072 -# or fail due to Xvfb's opengl limitations.
5073 -RESTRICT="test"
5074 -
5075 -COMMON_DEPEND="
5076 - X? (
5077 - x11-libs/libXcursor[${MULTILIB_USEDEP}]
5078 - x11-libs/libXext[${MULTILIB_USEDEP}]
5079 - x11-libs/libXfixes[${MULTILIB_USEDEP}]
5080 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
5081 - x11-libs/libXi[${MULTILIB_USEDEP}]
5082 - x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
5083 - )
5084 - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
5085 - capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
5086 - cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
5087 - fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
5088 - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
5089 - gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
5090 - gstreamer? (
5091 - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
5092 - media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
5093 - )
5094 - jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
5095 - lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
5096 - ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
5097 - mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
5098 - ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] )
5099 - netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
5100 - nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
5101 - odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
5102 - openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
5103 - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
5104 - opengl? (
5105 - virtual/glu[${MULTILIB_USEDEP}]
5106 - virtual/opengl[${MULTILIB_USEDEP}]
5107 - )
5108 - osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] )
5109 - pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
5110 - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
5111 - pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
5112 - scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
5113 - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
5114 - staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
5115 - themes? (
5116 - dev-libs/glib:2[${MULTILIB_USEDEP}]
5117 - x11-libs/cairo[${MULTILIB_USEDEP}]
5118 - x11-libs/gtk+:3[${MULTILIB_USEDEP}]
5119 - )
5120 - truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
5121 - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
5122 - udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
5123 - v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
5124 - vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
5125 - xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
5126 - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
5127 - xml? (
5128 - dev-libs/libxml2[${MULTILIB_USEDEP}]
5129 - dev-libs/libxslt[${MULTILIB_USEDEP}]
5130 - )
5131 - abi_x86_32? (
5132 - !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
5133 - !<app-emulation/emul-linux-x86-baselibs-20140508-r14
5134 - !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
5135 - !<app-emulation/emul-linux-x86-db-20140508-r3
5136 - !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
5137 - !<app-emulation/emul-linux-x86-medialibs-20140508-r6
5138 - !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
5139 - !<app-emulation/emul-linux-x86-opengl-20140508-r1
5140 - !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
5141 - !<app-emulation/emul-linux-x86-sdl-20140508-r1
5142 - !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
5143 - !<app-emulation/emul-linux-x86-soundlibs-20140508
5144 - !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
5145 - !<app-emulation/emul-linux-x86-xlibs-20140508
5146 - )"
5147 -
5148 -RDEPEND="${COMMON_DEPEND}
5149 - app-emulation/wine-desktop-common
5150 - >app-eselect/eselect-wine-0.3
5151 - !app-emulation/wine:0
5152 - dos? ( >=games-emulation/dosbox-0.74_p20160629 )
5153 - gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
5154 - mono? ( app-emulation/wine-mono:4.7.1 )
5155 - perl? (
5156 - dev-lang/perl
5157 - dev-perl/XML-Simple
5158 - )
5159 - pulseaudio? (
5160 - realtime? ( sys-auth/rtkit )
5161 - )
5162 - s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] )
5163 - samba? ( >=net-fs/samba-3.0.25[winbind] )
5164 - selinux? ( sec-policy/selinux-wine )
5165 - udisks? ( sys-fs/udisks:2 )"
5166 -
5167 -# tools/make_requests requires perl
5168 -DEPEND="${COMMON_DEPEND}
5169 - sys-devel/flex
5170 - >=sys-kernel/linux-headers-2.6
5171 - virtual/pkgconfig
5172 - virtual/yacc
5173 - X? (
5174 - x11-proto/inputproto
5175 - x11-proto/xextproto
5176 - x11-proto/xf86vidmodeproto
5177 - )
5178 - prelink? ( sys-devel/prelink )
5179 - staging? (
5180 - dev-lang/perl
5181 - dev-perl/XML-Simple
5182 - )
5183 - xinerama? ( x11-proto/xineramaproto )"
5184 -
5185 -# These use a non-standard "Wine" category, which is provided by
5186 -# /etc/xdg/applications-merged/wine.menu
5187 -QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
5188 -usr/share/applications/wine-notepad.desktop
5189 -usr/share/applications/wine-uninstaller.desktop
5190 -usr/share/applications/wine-winecfg.desktop"
5191 -
5192 -PATCHES=(
5193 - "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
5194 - "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
5195 - "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
5196 - "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
5197 - "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
5198 - "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
5199 -)
5200 -PATCHES_BIN=(
5201 - "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
5202 -)
5203 -
5204 -# https://bugs.gentoo.org/show_bug.cgi?id=635222
5205 -if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then
5206 - DEPEND+=" dev-util/patchbin"
5207 -fi
5208 -
5209 -wine_compiler_check() {
5210 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
5211 -
5212 - # GCC-specific bugs
5213 - if tc-is-gcc; then
5214 - # bug #549768
5215 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
5216 - ebegin "Checking for gcc-5 ms_abi compiler bug"
5217 - $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
5218 - # Run in subshell to prevent "Aborted" message
5219 - ( "${T}"/pr66838 || false ) >/dev/null 2>&1
5220 - if ! eend $?; then
5221 - eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
5222 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
5223 - eerror "or use gcc-config to select a different compiler version."
5224 - eerror "See https://bugs.gentoo.org/549768"
5225 - eerror
5226 - return 1
5227 - fi
5228 - fi
5229 - # bug #574044
5230 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
5231 - ebegin "Checking for gcc-5-3 stack realignment compiler bug"
5232 - # Compile in subshell to prevent "Aborted" message
5233 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
5234 - if ! eend $?; then
5235 - eerror "Wine cannot be built with this version of gcc-5.3"
5236 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
5237 - eerror "or use gcc-config to select a different compiler version."
5238 - eerror "See https://bugs.gentoo.org/574044"
5239 - eerror
5240 - return 1
5241 - fi
5242 - fi
5243 - fi
5244 -
5245 - # Ensure compiler support
5246 - if use abi_x86_64; then
5247 - ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
5248 - # Compile in subshell to prevent "Aborted" message
5249 - ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
5250 - if ! eend $?; then
5251 - eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
5252 - eerror
5253 - eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine"
5254 - eerror
5255 - return 1
5256 - fi
5257 - fi
5258 -}
5259 -
5260 -wine_build_environment_check() {
5261 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
5262 -
5263 - if use abi_x86_64; then
5264 - if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
5265 - eerror "You need gcc-4.4+ to compile 64-bit wine"
5266 - die
5267 - elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
5268 - eerror "You need clang-3.8+ to compile 64-bit wine"
5269 - die
5270 - fi
5271 - fi
5272 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
5273 - ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
5274 - ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
5275 - ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
5276 - fi
5277 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
5278 - if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
5279 - ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work"
5280 - ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
5281 - ewarn "See package.env in man 5 portage for more information on how to do this."
5282 - ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
5283 - fi
5284 - fi
5285 -
5286 - if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then
5287 - eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
5288 - eerror "See https://bugs.gentoo.org/487864 for more details."
5289 - eerror
5290 - return 1
5291 - fi
5292 -}
5293 -
5294 -wine_env_vcs_vars() {
5295 - local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
5296 - local pn_live_val="${pn_live_var}"
5297 - eval pn_live_val='$'${pn_live_val}
5298 - if [[ ! -z ${pn_live_val} ]]; then
5299 - if use staging; then
5300 - eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}"
5301 - eerror "cannot be used to set the commit. Instead, you may use the"
5302 - eerror "environmental variables WINE_COMMIT, and STAGING_COMMIT."
5303 - eerror
5304 - return 1
5305 - fi
5306 - fi
5307 - if [[ ! -z ${EGIT_COMMIT} ]]; then
5308 - eerror "Commits must now be specified using the environmental variables"
5309 - eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT"
5310 - eerror
5311 - return 1
5312 - fi
5313 -}
5314 -
5315 -pkg_pretend() {
5316 - wine_build_environment_check || die
5317 -
5318 - # Verify OSS support
5319 - if use oss && ! use kernel_FreeBSD; then
5320 - if ! has_version ">=media-sound/oss-4"; then
5321 - eerror "You cannot build wine with USE=oss without having support from a"
5322 - eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)"
5323 - eerror
5324 - die
5325 - fi
5326 - fi
5327 -}
5328 -
5329 -pkg_setup() {
5330 - wine_build_environment_check || die
5331 - wine_env_vcs_vars || die
5332 -
5333 - WINE_VARIANT="${PN#wine}-${PV}"
5334 - WINE_VARIANT="${WINE_VARIANT#-}"
5335 -
5336 - MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
5337 - MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
5338 - MY_DATADIR="${MY_DATAROOTDIR}"
5339 - MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
5340 - MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
5341 - MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
5342 - MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
5343 - MY_MANDIR="${MY_DATADIR}/man"
5344 -}
5345 -
5346 -src_unpack() {
5347 - if [[ ${PV} == "9999" ]] ; then
5348 - EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
5349 - if use staging; then
5350 - local CURRENT_WINE_COMMIT=${EGIT_VERSION}
5351 -
5352 - git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}"
5353 - git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}"
5354 -
5355 - local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die
5356 -
5357 - if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then
5358 - einfo "The current Staging patchset is not guaranteed to apply on this WINE commit."
5359 - einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT."
5360 - einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine"
5361 - fi
5362 - fi
5363 - fi
5364 -
5365 - default
5366 -
5367 - l10n_find_plocales_changes "${S}/po" "" ".po"
5368 -}
5369 -
5370 -src_prepare() {
5371 -
5372 - eapply_bin(){
5373 - local patch
5374 - for patch in ${PATCHES_BIN[@]}; do
5375 - patchbin --nogit < "${patch}" || die
5376 - done
5377 - }
5378 -
5379 - local md5="$(md5sum server/protocol.def)"
5380 -
5381 - if use staging; then
5382 - ewarn "Applying the Wine-Staging patchset. Any bug reports to the"
5383 - ewarn "Wine bugzilla should explicitly state that staging was used."
5384 -
5385 - local STAGING_EXCLUDE=""
5386 - STAGING_EXCLUDE="${STAGING_EXCLUDE} -W winhlp32-Flex_Workaround" # Avoid double patching https://bugs.winehq.org/show_bug.cgi?id=42132
5387 - use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
5388 -
5389 - # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches
5390 - ebegin "Running Wine-Staging patch installer"
5391 - (
5392 - set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE}
5393 - cd "${STAGING_DIR}/patches"
5394 - source "${STAGING_DIR}/patches/patchinstall.sh"
5395 - )
5396 - eend $? || die "Failed to apply Wine-Staging patches"
5397 - fi
5398 -
5399 - default
5400 - eapply_bin
5401 - eautoreconf
5402 -
5403 - # Modification of the server protocol requires regenerating the server requests
5404 - if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
5405 - einfo "server/protocol.def was patched; running tools/make_requests"
5406 - tools/make_requests || die #432348
5407 - fi
5408 - sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
5409 - if ! use run-exes; then
5410 - sed -i '/^MimeType/d' loader/wine.desktop || die #117785
5411 - fi
5412 -
5413 - # Edit wine.desktop to work for specific variant
5414 - sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
5415 -
5416 - # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
5417 - cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
5418 -
5419 - l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
5420 -}
5421 -
5422 -src_configure() {
5423 - wine_compiler_check || die
5424 -
5425 - export LDCONFIG=/bin/true
5426 - use custom-cflags || strip-flags
5427 -
5428 - multilib-minimal_src_configure
5429 -}
5430 -
5431 -multilib_src_configure() {
5432 - local myconf=(
5433 - --prefix="${MY_PREFIX}"
5434 - --datarootdir="${MY_DATAROOTDIR}"
5435 - --datadir="${MY_DATADIR}"
5436 - --docdir="${MY_DOCDIR}"
5437 - --includedir="${MY_INCLUDEDIR}"
5438 - --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
5439 - --libexecdir="${MY_LIBEXECDIR}"
5440 - --localstatedir="${MY_LOCALSTATEDIR}"
5441 - --mandir="${MY_MANDIR}"
5442 - --sysconfdir=/etc/wine
5443 - $(use_with alsa)
5444 - $(use_with capi)
5445 - $(use_with lcms cms)
5446 - $(use_with cups)
5447 - $(use_with ncurses curses)
5448 - $(use_with udisks dbus)
5449 - $(use_with fontconfig)
5450 - $(use_with ssl gnutls)
5451 - $(use_enable gecko mshtml)
5452 - $(use_with gphoto2 gphoto)
5453 - $(use_with gsm)
5454 - $(use_with gstreamer)
5455 - --without-hal
5456 - $(use_with jpeg)
5457 - $(use_with ldap)
5458 - $(use_enable mono mscoree)
5459 - $(use_with mp3 mpg123)
5460 - $(use_with netapi)
5461 - $(use_with nls gettext)
5462 - $(use_with openal)
5463 - $(use_with opencl)
5464 - $(use_with opengl)
5465 - $(use_with osmesa)
5466 - $(use_with oss)
5467 - $(use_with pcap)
5468 - $(use_with png)
5469 - $(use_with pulseaudio pulse)
5470 - $(use_with threads pthread)
5471 - $(use_with scanner sane)
5472 - $(use_enable test tests)
5473 - $(use_with truetype freetype)
5474 - $(use_with udev)
5475 - $(use_with v4l)
5476 - $(use_with X x)
5477 - $(use_with X xfixes)
5478 - $(use_with xcomposite)
5479 - $(use_with xinerama)
5480 - $(use_with xml)
5481 - $(use_with xml xslt)
5482 - )
5483 -
5484 - use staging && myconf+=(
5485 - --with-xattr
5486 - $(use_with themes gtk3)
5487 - $(use_with vaapi va)
5488 - )
5489 -
5490 - local PKG_CONFIG AR RANLIB
5491 - # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
5492 - # set AR and RANLIB to make QA scripts happy; #483342
5493 - tc-export PKG_CONFIG AR RANLIB
5494 -
5495 - if use amd64; then
5496 - if [[ ${ABI} == amd64 ]]; then
5497 - myconf+=( --enable-win64 )
5498 - else
5499 - myconf+=( --disable-win64 )
5500 - fi
5501 -
5502 - # Note: using --with-wine64 results in problems with multilib.eclass
5503 - # CC/LD hackery. We're using separate tools instead.
5504 - fi
5505 -
5506 - ECONF_SOURCE=${S} \
5507 - econf "${myconf[@]}"
5508 - emake depend
5509 -}
5510 -
5511 -multilib_src_test() {
5512 - # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
5513 - if [[ ${ABI} == x86 ]]; then
5514 - if [[ $(id -u) == 0 ]]; then
5515 - ewarn "Skipping tests since they cannot be run under the root user."
5516 - ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
5517 - return
5518 - fi
5519 -
5520 - WINEPREFIX="${T}/.wine-${ABI}" \
5521 - Xemake test
5522 - fi
5523 -}
5524 -
5525 -multilib_src_install_all() {
5526 - local DOCS=( ANNOUNCE AUTHORS README )
5527 - add_locale_docs() {
5528 - local locale_doc="documentation/README.$1"
5529 - [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
5530 - }
5531 - l10n_for_each_locale_do add_locale_docs
5532 -
5533 - einstalldocs
5534 - prune_libtool_files --all
5535 -
5536 - if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
5537 - rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
5538 - "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
5539 - fi
5540 -
5541 - # Remove wineconsole if neither backend is installed #551124
5542 - if ! use X && ! use ncurses; then
5543 - rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
5544 - rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
5545 - rm_wineconsole() {
5546 - rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
5547 - }
5548 - multilib_foreach_abi rm_wineconsole
5549 - fi
5550 -
5551 - use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
5552 - use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
5553 -
5554 - if use abi_x86_64 && ! use abi_x86_32; then
5555 - dosym wine64 "${MY_PREFIX}"/bin/wine # 404331
5556 - dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader
5557 - fi
5558 -
5559 - # Failglob for bin and man loops
5560 - local glob_state=$(shopt -p failglob)
5561 - shopt -s failglob
5562 -
5563 - # Make wrappers for binaries for handling multiple variants
5564 - # Note: wrappers instead of symlinks because some are shell which use basename
5565 - local b
5566 - for b in "${D%/}${MY_PREFIX}"/bin/*; do
5567 - make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
5568 - done
5569 -
5570 - # respect LINGUAS when installing man pages, #469418
5571 - local l
5572 - for l in de fr pl; do
5573 - use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}*
5574 - done
5575 -
5576 - eval "${glob_state}"
5577 -}
5578 -
5579 -pkg_postinst() {
5580 - eselect wine register ${P}
5581 - if [[ ${PN} == "wine-vanilla" ]]; then
5582 - eselect wine register --vanilla ${P} || die
5583 - else
5584 - if use staging; then
5585 - eselect wine register --staging ${P} || die
5586 - fi
5587 - fi
5588 -
5589 - eselect wine update --all --if-unset || die
5590 -
5591 - xdg_desktop_database_update
5592 -
5593 - if ! use gecko; then
5594 - ewarn "Without Wine Gecko, wine prefixes will not have a default"
5595 - ewarn "implementation of iexplore. Many older windows applications"
5596 - ewarn "rely upon the existence of an iexplore implementation, so"
5597 - ewarn "you will likely need to install an external one, like via winetricks"
5598 - fi
5599 - if ! use mono; then
5600 - ewarn "Without Wine Mono, wine prefixes will not have a default"
5601 - ewarn "implementation of .NET. Many windows applications rely upon"
5602 - ewarn "the existence of a .NET implementation, so you will likely need"
5603 - ewarn "to install an external one, like via winetricks"
5604 - fi
5605 -}
5606 -
5607 -pkg_prerm() {
5608 - eselect wine deregister ${P}
5609 - if [[ ${PN} == "wine-vanilla" ]]; then
5610 - eselect wine deregister --vanilla ${P} || die
5611 - else
5612 - if use staging; then
5613 - eselect wine deregister --staging ${P} || die
5614 - fi
5615 - fi
5616 -
5617 - eselect wine update --all --if-unset || die
5618 -}
5619 -
5620 -pkg_postrm() {
5621 - xdg_desktop_database_update
5622 -}
5623
5624 diff --git a/app-emulation/wine-staging/wine-staging-2.2-r1.ebuild b/app-emulation/wine-staging/wine-staging-2.2-r1.ebuild
5625 deleted file mode 100644
5626 index 1177c5533ac..00000000000
5627 --- a/app-emulation/wine-staging/wine-staging-2.2-r1.ebuild
5628 +++ /dev/null
5629 @@ -1,607 +0,0 @@
5630 -# Copyright 1999-2017 Gentoo Foundation
5631 -# Distributed under the terms of the GNU General Public License v2
5632 -
5633 -EAPI=6
5634 -
5635 -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"
5636 -PLOCALE_BACKUP="en"
5637 -
5638 -inherit autotools eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils
5639 -
5640 -MY_PN="${PN%%-*}"
5641 -MY_P="${MY_PN}-${PV}"
5642 -
5643 -if [[ ${PV} == "9999" ]] ; then
5644 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
5645 - EGIT_BRANCH="master"
5646 - inherit git-r3
5647 - SRC_URI=""
5648 - #KEYWORDS=""
5649 -else
5650 - MAJOR_V=$(get_version_component_range 1)
5651 - SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
5652 - KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
5653 -fi
5654 -S="${WORKDIR}/${MY_P}"
5655 -
5656 -STAGING_P="wine-staging-${PV}"
5657 -STAGING_DIR="${WORKDIR}/${STAGING_P}"
5658 -GWP_V="20170830"
5659 -PATCHDIR="${WORKDIR}/gentoo-wine-patches"
5660 -
5661 -DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset"
5662 -HOMEPAGE="https://www.winehq.org/"
5663 -SRC_URI="${SRC_URI}
5664 - https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
5665 -"
5666 -
5667 -if [[ ${PV} == "9999" ]] ; then
5668 - STAGING_EGIT_REPO_URI="https://github.com/wine-compholio/wine-staging.git"
5669 -else
5670 - SRC_URI="${SRC_URI}
5671 - staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
5672 -fi
5673 -
5674 -LICENSE="LGPL-2.1"
5675 -SLOT="${PV}"
5676 -IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags 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"
5677 -REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
5678 - X? ( truetype )
5679 - elibc_glibc? ( threads )
5680 - osmesa? ( opengl )
5681 - pipelight? ( staging )
5682 - s3tc? ( staging )
5683 - test? ( abi_x86_32 )
5684 - themes? ( staging )
5685 - vaapi? ( staging )" # osmesa-opengl #286560 # X-truetype #551124
5686 -
5687 -# FIXME: the test suite is unsuitable for us; many tests require net access
5688 -# or fail due to Xvfb's opengl limitations.
5689 -RESTRICT="test"
5690 -
5691 -COMMON_DEPEND="
5692 - X? (
5693 - x11-libs/libXcursor[${MULTILIB_USEDEP}]
5694 - x11-libs/libXext[${MULTILIB_USEDEP}]
5695 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
5696 - x11-libs/libXi[${MULTILIB_USEDEP}]
5697 - x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
5698 - )
5699 - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
5700 - capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
5701 - cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
5702 - fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
5703 - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
5704 - gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
5705 - gstreamer? (
5706 - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
5707 - media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
5708 - )
5709 - jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
5710 - lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
5711 - ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
5712 - mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
5713 - ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] )
5714 - netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
5715 - nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
5716 - odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
5717 - openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
5718 - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
5719 - opengl? (
5720 - virtual/glu[${MULTILIB_USEDEP}]
5721 - virtual/opengl[${MULTILIB_USEDEP}]
5722 - )
5723 - osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] )
5724 - pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
5725 - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
5726 - pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
5727 - scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
5728 - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
5729 - staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
5730 - themes? (
5731 - dev-libs/glib:2[${MULTILIB_USEDEP}]
5732 - x11-libs/cairo[${MULTILIB_USEDEP}]
5733 - x11-libs/gtk+:3[${MULTILIB_USEDEP}]
5734 - )
5735 - truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
5736 - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
5737 - udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
5738 - v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
5739 - vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
5740 - xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
5741 - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
5742 - xml? (
5743 - dev-libs/libxml2[${MULTILIB_USEDEP}]
5744 - dev-libs/libxslt[${MULTILIB_USEDEP}]
5745 - )
5746 - abi_x86_32? (
5747 - !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
5748 - !<app-emulation/emul-linux-x86-baselibs-20140508-r14
5749 - !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
5750 - !<app-emulation/emul-linux-x86-db-20140508-r3
5751 - !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
5752 - !<app-emulation/emul-linux-x86-medialibs-20140508-r6
5753 - !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
5754 - !<app-emulation/emul-linux-x86-opengl-20140508-r1
5755 - !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
5756 - !<app-emulation/emul-linux-x86-sdl-20140508-r1
5757 - !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
5758 - !<app-emulation/emul-linux-x86-soundlibs-20140508
5759 - !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
5760 - !<app-emulation/emul-linux-x86-xlibs-20140508
5761 - )"
5762 -
5763 -RDEPEND="${COMMON_DEPEND}
5764 - app-emulation/wine-desktop-common
5765 - >app-eselect/eselect-wine-0.3
5766 - !app-emulation/wine:0
5767 - dos? ( >=games-emulation/dosbox-0.74_p20160629 )
5768 - gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
5769 - mono? ( app-emulation/wine-mono:4.6.4 )
5770 - perl? (
5771 - dev-lang/perl
5772 - dev-perl/XML-Simple
5773 - )
5774 - pulseaudio? (
5775 - realtime? ( sys-auth/rtkit )
5776 - )
5777 - s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] )
5778 - samba? ( >=net-fs/samba-3.0.25[winbind] )
5779 - selinux? ( sec-policy/selinux-wine )
5780 - udisks? ( sys-fs/udisks:2 )"
5781 -
5782 -# tools/make_requests requires perl
5783 -DEPEND="${COMMON_DEPEND}
5784 - sys-devel/flex
5785 - >=sys-kernel/linux-headers-2.6
5786 - virtual/pkgconfig
5787 - virtual/yacc
5788 - X? (
5789 - x11-proto/inputproto
5790 - x11-proto/xextproto
5791 - x11-proto/xf86vidmodeproto
5792 - )
5793 - prelink? ( sys-devel/prelink )
5794 - staging? (
5795 - dev-lang/perl
5796 - dev-perl/XML-Simple
5797 - )
5798 - xinerama? ( x11-proto/xineramaproto )"
5799 -
5800 -# These use a non-standard "Wine" category, which is provided by
5801 -# /etc/xdg/applications-merged/wine.menu
5802 -QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
5803 -usr/share/applications/wine-notepad.desktop
5804 -usr/share/applications/wine-uninstaller.desktop
5805 -usr/share/applications/wine-winecfg.desktop"
5806 -
5807 -PATCHES=(
5808 - "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
5809 - "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
5810 - "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
5811 - "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
5812 - "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
5813 - "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
5814 -)
5815 -PATCHES_BIN=(
5816 - "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
5817 -)
5818 -
5819 -# https://bugs.gentoo.org/show_bug.cgi?id=635222
5820 -if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then
5821 - DEPEND+=" dev-util/patchbin"
5822 -fi
5823 -
5824 -wine_compiler_check() {
5825 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
5826 -
5827 - # GCC-specific bugs
5828 - if tc-is-gcc; then
5829 - # bug #549768
5830 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
5831 - ebegin "Checking for gcc-5 ms_abi compiler bug"
5832 - $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
5833 - # Run in subshell to prevent "Aborted" message
5834 - ( "${T}"/pr66838 || false ) >/dev/null 2>&1
5835 - if ! eend $?; then
5836 - eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
5837 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
5838 - eerror "or use gcc-config to select a different compiler version."
5839 - eerror "See https://bugs.gentoo.org/549768"
5840 - eerror
5841 - return 1
5842 - fi
5843 - fi
5844 - # bug #574044
5845 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
5846 - ebegin "Checking for gcc-5-3 stack realignment compiler bug"
5847 - # Compile in subshell to prevent "Aborted" message
5848 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
5849 - if ! eend $?; then
5850 - eerror "Wine cannot be built with this version of gcc-5.3"
5851 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
5852 - eerror "or use gcc-config to select a different compiler version."
5853 - eerror "See https://bugs.gentoo.org/574044"
5854 - eerror
5855 - return 1
5856 - fi
5857 - fi
5858 - fi
5859 -
5860 - # Ensure compiler support
5861 - if use abi_x86_64; then
5862 - ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
5863 - # Compile in subshell to prevent "Aborted" message
5864 - ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
5865 - if ! eend $?; then
5866 - eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
5867 - eerror
5868 - eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine"
5869 - eerror
5870 - return 1
5871 - fi
5872 - fi
5873 -}
5874 -
5875 -wine_build_environment_check() {
5876 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
5877 -
5878 - if use abi_x86_64; then
5879 - if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
5880 - eerror "You need gcc-4.4+ to compile 64-bit wine"
5881 - die
5882 - elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
5883 - eerror "You need clang-3.8+ to compile 64-bit wine"
5884 - die
5885 - fi
5886 - fi
5887 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
5888 - ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
5889 - ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
5890 - ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
5891 - fi
5892 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
5893 - if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
5894 - ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work"
5895 - ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
5896 - ewarn "See package.env in man 5 portage for more information on how to do this."
5897 - ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
5898 - fi
5899 - fi
5900 -
5901 - if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then
5902 - eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
5903 - eerror "See https://bugs.gentoo.org/487864 for more details."
5904 - eerror
5905 - return 1
5906 - fi
5907 -}
5908 -
5909 -wine_env_vcs_vars() {
5910 - local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
5911 - local pn_live_val="${pn_live_var}"
5912 - eval pn_live_val='$'${pn_live_val}
5913 - if [[ ! -z ${pn_live_val} ]]; then
5914 - if use staging; then
5915 - eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}"
5916 - eerror "cannot be used to set the commit. Instead, you may use the"
5917 - eerror "environmental variables WINE_COMMIT, and STAGING_COMMIT."
5918 - eerror
5919 - return 1
5920 - fi
5921 - fi
5922 - if [[ ! -z ${EGIT_COMMIT} ]]; then
5923 - eerror "Commits must now be specified using the environmental variables"
5924 - eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT"
5925 - eerror
5926 - return 1
5927 - fi
5928 -}
5929 -
5930 -pkg_pretend() {
5931 - wine_build_environment_check || die
5932 -
5933 - # Verify OSS support
5934 - if use oss && ! use kernel_FreeBSD; then
5935 - if ! has_version ">=media-sound/oss-4"; then
5936 - eerror "You cannot build wine with USE=oss without having support from a"
5937 - eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)"
5938 - eerror
5939 - die
5940 - fi
5941 - fi
5942 -}
5943 -
5944 -pkg_setup() {
5945 - wine_build_environment_check || die
5946 - wine_env_vcs_vars || die
5947 -
5948 - WINE_VARIANT="${PN#wine}-${PV}"
5949 - WINE_VARIANT="${WINE_VARIANT#-}"
5950 -
5951 - MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
5952 - MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
5953 - MY_DATADIR="${MY_DATAROOTDIR}"
5954 - MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
5955 - MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
5956 - MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
5957 - MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
5958 - MY_MANDIR="${MY_DATADIR}/man"
5959 -}
5960 -
5961 -src_unpack() {
5962 - if [[ ${PV} == "9999" ]] ; then
5963 - EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
5964 - if use staging; then
5965 - local CURRENT_WINE_COMMIT=${EGIT_VERSION}
5966 -
5967 - git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}"
5968 - git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}"
5969 -
5970 - local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die
5971 -
5972 - if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then
5973 - einfo "The current Staging patchset is not guaranteed to apply on this WINE commit."
5974 - einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT."
5975 - einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine"
5976 - fi
5977 - fi
5978 - fi
5979 -
5980 - default
5981 -
5982 - l10n_find_plocales_changes "${S}/po" "" ".po"
5983 -}
5984 -
5985 -src_prepare() {
5986 -
5987 - eapply_bin(){
5988 - local patch
5989 - for patch in ${PATCHES_BIN[@]}; do
5990 - patchbin --nogit < "${patch}" || die
5991 - done
5992 - }
5993 -
5994 - local md5="$(md5sum server/protocol.def)"
5995 -
5996 - if use staging; then
5997 - ewarn "Applying the Wine-Staging patchset. Any bug reports to the"
5998 - ewarn "Wine bugzilla should explicitly state that staging was used."
5999 -
6000 - local STAGING_EXCLUDE=""
6001 - STAGING_EXCLUDE="${STAGING_EXCLUDE} -W winhlp32-Flex_Workaround" # Avoid double patching https://bugs.winehq.org/show_bug.cgi?id=42132
6002 - use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
6003 -
6004 - # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches
6005 - ebegin "Running Wine-Staging patch installer"
6006 - (
6007 - set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE}
6008 - cd "${STAGING_DIR}/patches"
6009 - source "${STAGING_DIR}/patches/patchinstall.sh"
6010 - )
6011 - eend $? || die "Failed to apply Wine-Staging patches"
6012 - fi
6013 -
6014 - default
6015 - eapply_bin
6016 - eautoreconf
6017 -
6018 - # Modification of the server protocol requires regenerating the server requests
6019 - if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
6020 - einfo "server/protocol.def was patched; running tools/make_requests"
6021 - tools/make_requests || die #432348
6022 - fi
6023 - sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
6024 - if ! use run-exes; then
6025 - sed -i '/^MimeType/d' loader/wine.desktop || die #117785
6026 - fi
6027 -
6028 - # Edit wine.desktop to work for specific variant
6029 - sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
6030 -
6031 - # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
6032 - cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
6033 -
6034 - l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
6035 -}
6036 -
6037 -src_configure() {
6038 - wine_compiler_check || die
6039 -
6040 - export LDCONFIG=/bin/true
6041 - use custom-cflags || strip-flags
6042 -
6043 - multilib-minimal_src_configure
6044 -}
6045 -
6046 -multilib_src_configure() {
6047 - local myconf=(
6048 - --prefix="${MY_PREFIX}"
6049 - --datarootdir="${MY_DATAROOTDIR}"
6050 - --datadir="${MY_DATADIR}"
6051 - --docdir="${MY_DOCDIR}"
6052 - --includedir="${MY_INCLUDEDIR}"
6053 - --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
6054 - --libexecdir="${MY_LIBEXECDIR}"
6055 - --localstatedir="${MY_LOCALSTATEDIR}"
6056 - --mandir="${MY_MANDIR}"
6057 - --sysconfdir=/etc/wine
6058 - $(use_with alsa)
6059 - $(use_with capi)
6060 - $(use_with lcms cms)
6061 - $(use_with cups)
6062 - $(use_with ncurses curses)
6063 - $(use_with udisks dbus)
6064 - $(use_with fontconfig)
6065 - $(use_with ssl gnutls)
6066 - $(use_enable gecko mshtml)
6067 - $(use_with gphoto2 gphoto)
6068 - $(use_with gsm)
6069 - $(use_with gstreamer)
6070 - --without-hal
6071 - $(use_with jpeg)
6072 - $(use_with ldap)
6073 - $(use_enable mono mscoree)
6074 - $(use_with mp3 mpg123)
6075 - $(use_with netapi)
6076 - $(use_with nls gettext)
6077 - $(use_with openal)
6078 - $(use_with opencl)
6079 - $(use_with opengl)
6080 - $(use_with osmesa)
6081 - $(use_with oss)
6082 - $(use_with pcap)
6083 - $(use_with png)
6084 - $(use_with pulseaudio pulse)
6085 - $(use_with threads pthread)
6086 - $(use_with scanner sane)
6087 - $(use_enable test tests)
6088 - $(use_with truetype freetype)
6089 - $(use_with udev)
6090 - $(use_with v4l)
6091 - $(use_with X x)
6092 - $(use_with xcomposite)
6093 - $(use_with xinerama)
6094 - $(use_with xml)
6095 - $(use_with xml xslt)
6096 - )
6097 -
6098 - use staging && myconf+=(
6099 - --with-xattr
6100 - $(use_with themes gtk3)
6101 - $(use_with vaapi va)
6102 - )
6103 -
6104 - local PKG_CONFIG AR RANLIB
6105 - # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
6106 - # set AR and RANLIB to make QA scripts happy; #483342
6107 - tc-export PKG_CONFIG AR RANLIB
6108 -
6109 - if use amd64; then
6110 - if [[ ${ABI} == amd64 ]]; then
6111 - myconf+=( --enable-win64 )
6112 - else
6113 - myconf+=( --disable-win64 )
6114 - fi
6115 -
6116 - # Note: using --with-wine64 results in problems with multilib.eclass
6117 - # CC/LD hackery. We're using separate tools instead.
6118 - fi
6119 -
6120 - ECONF_SOURCE=${S} \
6121 - econf "${myconf[@]}"
6122 - emake depend
6123 -}
6124 -
6125 -multilib_src_test() {
6126 - # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
6127 - if [[ ${ABI} == x86 ]]; then
6128 - if [[ $(id -u) == 0 ]]; then
6129 - ewarn "Skipping tests since they cannot be run under the root user."
6130 - ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
6131 - return
6132 - fi
6133 -
6134 - WINEPREFIX="${T}/.wine-${ABI}" \
6135 - Xemake test
6136 - fi
6137 -}
6138 -
6139 -multilib_src_install_all() {
6140 - local DOCS=( ANNOUNCE AUTHORS README )
6141 - add_locale_docs() {
6142 - local locale_doc="documentation/README.$1"
6143 - [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
6144 - }
6145 - l10n_for_each_locale_do add_locale_docs
6146 -
6147 - einstalldocs
6148 - prune_libtool_files --all
6149 -
6150 - if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
6151 - rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
6152 - "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
6153 - fi
6154 -
6155 - # Remove wineconsole if neither backend is installed #551124
6156 - if ! use X && ! use ncurses; then
6157 - rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
6158 - rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
6159 - rm_wineconsole() {
6160 - rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
6161 - }
6162 - multilib_foreach_abi rm_wineconsole
6163 - fi
6164 -
6165 - use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
6166 - use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
6167 -
6168 - if use abi_x86_64 && ! use abi_x86_32; then
6169 - dosym wine64 "${MY_PREFIX}"/bin/wine # 404331
6170 - dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader
6171 - fi
6172 -
6173 - # Failglob for bin and man loops
6174 - local glob_state=$(shopt -p failglob)
6175 - shopt -s failglob
6176 -
6177 - # Make wrappers for binaries for handling multiple variants
6178 - # Note: wrappers instead of symlinks because some are shell which use basename
6179 - local b
6180 - for b in "${D%/}${MY_PREFIX}"/bin/*; do
6181 - make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
6182 - done
6183 -
6184 - # respect LINGUAS when installing man pages, #469418
6185 - local l
6186 - for l in de fr pl; do
6187 - use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}*
6188 - done
6189 -
6190 - eval "${glob_state}"
6191 -}
6192 -
6193 -pkg_postinst() {
6194 - eselect wine register ${P}
6195 - if [[ ${PN} == "wine-vanilla" ]]; then
6196 - eselect wine register --vanilla ${P} || die
6197 - else
6198 - if use staging; then
6199 - eselect wine register --staging ${P} || die
6200 - fi
6201 - fi
6202 -
6203 - eselect wine update --all --if-unset || die
6204 -
6205 - xdg_desktop_database_update
6206 -
6207 - if ! use gecko; then
6208 - ewarn "Without Wine Gecko, wine prefixes will not have a default"
6209 - ewarn "implementation of iexplore. Many older windows applications"
6210 - ewarn "rely upon the existence of an iexplore implementation, so"
6211 - ewarn "you will likely need to install an external one, like via winetricks"
6212 - fi
6213 - if ! use mono; then
6214 - ewarn "Without Wine Mono, wine prefixes will not have a default"
6215 - ewarn "implementation of .NET. Many windows applications rely upon"
6216 - ewarn "the existence of a .NET implementation, so you will likely need"
6217 - ewarn "to install an external one, like via winetricks"
6218 - fi
6219 -}
6220 -
6221 -pkg_prerm() {
6222 - eselect wine deregister ${P}
6223 - if [[ ${PN} == "wine-vanilla" ]]; then
6224 - eselect wine deregister --vanilla ${P} || die
6225 - else
6226 - if use staging; then
6227 - eselect wine deregister --staging ${P} || die
6228 - fi
6229 - fi
6230 -
6231 - eselect wine update --all --if-unset || die
6232 -}
6233 -
6234 -pkg_postrm() {
6235 - xdg_desktop_database_update
6236 -}
6237
6238 diff --git a/app-emulation/wine-staging/wine-staging-2.3-r1.ebuild b/app-emulation/wine-staging/wine-staging-2.3-r1.ebuild
6239 deleted file mode 100644
6240 index 1177c5533ac..00000000000
6241 --- a/app-emulation/wine-staging/wine-staging-2.3-r1.ebuild
6242 +++ /dev/null
6243 @@ -1,607 +0,0 @@
6244 -# Copyright 1999-2017 Gentoo Foundation
6245 -# Distributed under the terms of the GNU General Public License v2
6246 -
6247 -EAPI=6
6248 -
6249 -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"
6250 -PLOCALE_BACKUP="en"
6251 -
6252 -inherit autotools eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils
6253 -
6254 -MY_PN="${PN%%-*}"
6255 -MY_P="${MY_PN}-${PV}"
6256 -
6257 -if [[ ${PV} == "9999" ]] ; then
6258 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
6259 - EGIT_BRANCH="master"
6260 - inherit git-r3
6261 - SRC_URI=""
6262 - #KEYWORDS=""
6263 -else
6264 - MAJOR_V=$(get_version_component_range 1)
6265 - SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
6266 - KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
6267 -fi
6268 -S="${WORKDIR}/${MY_P}"
6269 -
6270 -STAGING_P="wine-staging-${PV}"
6271 -STAGING_DIR="${WORKDIR}/${STAGING_P}"
6272 -GWP_V="20170830"
6273 -PATCHDIR="${WORKDIR}/gentoo-wine-patches"
6274 -
6275 -DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset"
6276 -HOMEPAGE="https://www.winehq.org/"
6277 -SRC_URI="${SRC_URI}
6278 - https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
6279 -"
6280 -
6281 -if [[ ${PV} == "9999" ]] ; then
6282 - STAGING_EGIT_REPO_URI="https://github.com/wine-compholio/wine-staging.git"
6283 -else
6284 - SRC_URI="${SRC_URI}
6285 - staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
6286 -fi
6287 -
6288 -LICENSE="LGPL-2.1"
6289 -SLOT="${PV}"
6290 -IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags 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"
6291 -REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
6292 - X? ( truetype )
6293 - elibc_glibc? ( threads )
6294 - osmesa? ( opengl )
6295 - pipelight? ( staging )
6296 - s3tc? ( staging )
6297 - test? ( abi_x86_32 )
6298 - themes? ( staging )
6299 - vaapi? ( staging )" # osmesa-opengl #286560 # X-truetype #551124
6300 -
6301 -# FIXME: the test suite is unsuitable for us; many tests require net access
6302 -# or fail due to Xvfb's opengl limitations.
6303 -RESTRICT="test"
6304 -
6305 -COMMON_DEPEND="
6306 - X? (
6307 - x11-libs/libXcursor[${MULTILIB_USEDEP}]
6308 - x11-libs/libXext[${MULTILIB_USEDEP}]
6309 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
6310 - x11-libs/libXi[${MULTILIB_USEDEP}]
6311 - x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
6312 - )
6313 - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
6314 - capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
6315 - cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
6316 - fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
6317 - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
6318 - gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
6319 - gstreamer? (
6320 - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
6321 - media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
6322 - )
6323 - jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
6324 - lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
6325 - ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
6326 - mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
6327 - ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] )
6328 - netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
6329 - nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
6330 - odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
6331 - openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
6332 - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
6333 - opengl? (
6334 - virtual/glu[${MULTILIB_USEDEP}]
6335 - virtual/opengl[${MULTILIB_USEDEP}]
6336 - )
6337 - osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] )
6338 - pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
6339 - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
6340 - pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
6341 - scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
6342 - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
6343 - staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
6344 - themes? (
6345 - dev-libs/glib:2[${MULTILIB_USEDEP}]
6346 - x11-libs/cairo[${MULTILIB_USEDEP}]
6347 - x11-libs/gtk+:3[${MULTILIB_USEDEP}]
6348 - )
6349 - truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
6350 - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
6351 - udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
6352 - v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
6353 - vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
6354 - xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
6355 - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
6356 - xml? (
6357 - dev-libs/libxml2[${MULTILIB_USEDEP}]
6358 - dev-libs/libxslt[${MULTILIB_USEDEP}]
6359 - )
6360 - abi_x86_32? (
6361 - !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
6362 - !<app-emulation/emul-linux-x86-baselibs-20140508-r14
6363 - !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
6364 - !<app-emulation/emul-linux-x86-db-20140508-r3
6365 - !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
6366 - !<app-emulation/emul-linux-x86-medialibs-20140508-r6
6367 - !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
6368 - !<app-emulation/emul-linux-x86-opengl-20140508-r1
6369 - !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
6370 - !<app-emulation/emul-linux-x86-sdl-20140508-r1
6371 - !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
6372 - !<app-emulation/emul-linux-x86-soundlibs-20140508
6373 - !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
6374 - !<app-emulation/emul-linux-x86-xlibs-20140508
6375 - )"
6376 -
6377 -RDEPEND="${COMMON_DEPEND}
6378 - app-emulation/wine-desktop-common
6379 - >app-eselect/eselect-wine-0.3
6380 - !app-emulation/wine:0
6381 - dos? ( >=games-emulation/dosbox-0.74_p20160629 )
6382 - gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
6383 - mono? ( app-emulation/wine-mono:4.6.4 )
6384 - perl? (
6385 - dev-lang/perl
6386 - dev-perl/XML-Simple
6387 - )
6388 - pulseaudio? (
6389 - realtime? ( sys-auth/rtkit )
6390 - )
6391 - s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] )
6392 - samba? ( >=net-fs/samba-3.0.25[winbind] )
6393 - selinux? ( sec-policy/selinux-wine )
6394 - udisks? ( sys-fs/udisks:2 )"
6395 -
6396 -# tools/make_requests requires perl
6397 -DEPEND="${COMMON_DEPEND}
6398 - sys-devel/flex
6399 - >=sys-kernel/linux-headers-2.6
6400 - virtual/pkgconfig
6401 - virtual/yacc
6402 - X? (
6403 - x11-proto/inputproto
6404 - x11-proto/xextproto
6405 - x11-proto/xf86vidmodeproto
6406 - )
6407 - prelink? ( sys-devel/prelink )
6408 - staging? (
6409 - dev-lang/perl
6410 - dev-perl/XML-Simple
6411 - )
6412 - xinerama? ( x11-proto/xineramaproto )"
6413 -
6414 -# These use a non-standard "Wine" category, which is provided by
6415 -# /etc/xdg/applications-merged/wine.menu
6416 -QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
6417 -usr/share/applications/wine-notepad.desktop
6418 -usr/share/applications/wine-uninstaller.desktop
6419 -usr/share/applications/wine-winecfg.desktop"
6420 -
6421 -PATCHES=(
6422 - "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
6423 - "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
6424 - "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
6425 - "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
6426 - "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
6427 - "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
6428 -)
6429 -PATCHES_BIN=(
6430 - "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
6431 -)
6432 -
6433 -# https://bugs.gentoo.org/show_bug.cgi?id=635222
6434 -if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then
6435 - DEPEND+=" dev-util/patchbin"
6436 -fi
6437 -
6438 -wine_compiler_check() {
6439 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
6440 -
6441 - # GCC-specific bugs
6442 - if tc-is-gcc; then
6443 - # bug #549768
6444 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
6445 - ebegin "Checking for gcc-5 ms_abi compiler bug"
6446 - $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
6447 - # Run in subshell to prevent "Aborted" message
6448 - ( "${T}"/pr66838 || false ) >/dev/null 2>&1
6449 - if ! eend $?; then
6450 - eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
6451 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
6452 - eerror "or use gcc-config to select a different compiler version."
6453 - eerror "See https://bugs.gentoo.org/549768"
6454 - eerror
6455 - return 1
6456 - fi
6457 - fi
6458 - # bug #574044
6459 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
6460 - ebegin "Checking for gcc-5-3 stack realignment compiler bug"
6461 - # Compile in subshell to prevent "Aborted" message
6462 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
6463 - if ! eend $?; then
6464 - eerror "Wine cannot be built with this version of gcc-5.3"
6465 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
6466 - eerror "or use gcc-config to select a different compiler version."
6467 - eerror "See https://bugs.gentoo.org/574044"
6468 - eerror
6469 - return 1
6470 - fi
6471 - fi
6472 - fi
6473 -
6474 - # Ensure compiler support
6475 - if use abi_x86_64; then
6476 - ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
6477 - # Compile in subshell to prevent "Aborted" message
6478 - ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
6479 - if ! eend $?; then
6480 - eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
6481 - eerror
6482 - eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine"
6483 - eerror
6484 - return 1
6485 - fi
6486 - fi
6487 -}
6488 -
6489 -wine_build_environment_check() {
6490 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
6491 -
6492 - if use abi_x86_64; then
6493 - if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
6494 - eerror "You need gcc-4.4+ to compile 64-bit wine"
6495 - die
6496 - elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
6497 - eerror "You need clang-3.8+ to compile 64-bit wine"
6498 - die
6499 - fi
6500 - fi
6501 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
6502 - ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
6503 - ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
6504 - ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
6505 - fi
6506 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
6507 - if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
6508 - ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work"
6509 - ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
6510 - ewarn "See package.env in man 5 portage for more information on how to do this."
6511 - ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
6512 - fi
6513 - fi
6514 -
6515 - if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then
6516 - eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
6517 - eerror "See https://bugs.gentoo.org/487864 for more details."
6518 - eerror
6519 - return 1
6520 - fi
6521 -}
6522 -
6523 -wine_env_vcs_vars() {
6524 - local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
6525 - local pn_live_val="${pn_live_var}"
6526 - eval pn_live_val='$'${pn_live_val}
6527 - if [[ ! -z ${pn_live_val} ]]; then
6528 - if use staging; then
6529 - eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}"
6530 - eerror "cannot be used to set the commit. Instead, you may use the"
6531 - eerror "environmental variables WINE_COMMIT, and STAGING_COMMIT."
6532 - eerror
6533 - return 1
6534 - fi
6535 - fi
6536 - if [[ ! -z ${EGIT_COMMIT} ]]; then
6537 - eerror "Commits must now be specified using the environmental variables"
6538 - eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT"
6539 - eerror
6540 - return 1
6541 - fi
6542 -}
6543 -
6544 -pkg_pretend() {
6545 - wine_build_environment_check || die
6546 -
6547 - # Verify OSS support
6548 - if use oss && ! use kernel_FreeBSD; then
6549 - if ! has_version ">=media-sound/oss-4"; then
6550 - eerror "You cannot build wine with USE=oss without having support from a"
6551 - eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)"
6552 - eerror
6553 - die
6554 - fi
6555 - fi
6556 -}
6557 -
6558 -pkg_setup() {
6559 - wine_build_environment_check || die
6560 - wine_env_vcs_vars || die
6561 -
6562 - WINE_VARIANT="${PN#wine}-${PV}"
6563 - WINE_VARIANT="${WINE_VARIANT#-}"
6564 -
6565 - MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
6566 - MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
6567 - MY_DATADIR="${MY_DATAROOTDIR}"
6568 - MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
6569 - MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
6570 - MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
6571 - MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
6572 - MY_MANDIR="${MY_DATADIR}/man"
6573 -}
6574 -
6575 -src_unpack() {
6576 - if [[ ${PV} == "9999" ]] ; then
6577 - EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
6578 - if use staging; then
6579 - local CURRENT_WINE_COMMIT=${EGIT_VERSION}
6580 -
6581 - git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}"
6582 - git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}"
6583 -
6584 - local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die
6585 -
6586 - if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then
6587 - einfo "The current Staging patchset is not guaranteed to apply on this WINE commit."
6588 - einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT."
6589 - einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine"
6590 - fi
6591 - fi
6592 - fi
6593 -
6594 - default
6595 -
6596 - l10n_find_plocales_changes "${S}/po" "" ".po"
6597 -}
6598 -
6599 -src_prepare() {
6600 -
6601 - eapply_bin(){
6602 - local patch
6603 - for patch in ${PATCHES_BIN[@]}; do
6604 - patchbin --nogit < "${patch}" || die
6605 - done
6606 - }
6607 -
6608 - local md5="$(md5sum server/protocol.def)"
6609 -
6610 - if use staging; then
6611 - ewarn "Applying the Wine-Staging patchset. Any bug reports to the"
6612 - ewarn "Wine bugzilla should explicitly state that staging was used."
6613 -
6614 - local STAGING_EXCLUDE=""
6615 - STAGING_EXCLUDE="${STAGING_EXCLUDE} -W winhlp32-Flex_Workaround" # Avoid double patching https://bugs.winehq.org/show_bug.cgi?id=42132
6616 - use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
6617 -
6618 - # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches
6619 - ebegin "Running Wine-Staging patch installer"
6620 - (
6621 - set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE}
6622 - cd "${STAGING_DIR}/patches"
6623 - source "${STAGING_DIR}/patches/patchinstall.sh"
6624 - )
6625 - eend $? || die "Failed to apply Wine-Staging patches"
6626 - fi
6627 -
6628 - default
6629 - eapply_bin
6630 - eautoreconf
6631 -
6632 - # Modification of the server protocol requires regenerating the server requests
6633 - if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
6634 - einfo "server/protocol.def was patched; running tools/make_requests"
6635 - tools/make_requests || die #432348
6636 - fi
6637 - sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
6638 - if ! use run-exes; then
6639 - sed -i '/^MimeType/d' loader/wine.desktop || die #117785
6640 - fi
6641 -
6642 - # Edit wine.desktop to work for specific variant
6643 - sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
6644 -
6645 - # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
6646 - cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
6647 -
6648 - l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
6649 -}
6650 -
6651 -src_configure() {
6652 - wine_compiler_check || die
6653 -
6654 - export LDCONFIG=/bin/true
6655 - use custom-cflags || strip-flags
6656 -
6657 - multilib-minimal_src_configure
6658 -}
6659 -
6660 -multilib_src_configure() {
6661 - local myconf=(
6662 - --prefix="${MY_PREFIX}"
6663 - --datarootdir="${MY_DATAROOTDIR}"
6664 - --datadir="${MY_DATADIR}"
6665 - --docdir="${MY_DOCDIR}"
6666 - --includedir="${MY_INCLUDEDIR}"
6667 - --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
6668 - --libexecdir="${MY_LIBEXECDIR}"
6669 - --localstatedir="${MY_LOCALSTATEDIR}"
6670 - --mandir="${MY_MANDIR}"
6671 - --sysconfdir=/etc/wine
6672 - $(use_with alsa)
6673 - $(use_with capi)
6674 - $(use_with lcms cms)
6675 - $(use_with cups)
6676 - $(use_with ncurses curses)
6677 - $(use_with udisks dbus)
6678 - $(use_with fontconfig)
6679 - $(use_with ssl gnutls)
6680 - $(use_enable gecko mshtml)
6681 - $(use_with gphoto2 gphoto)
6682 - $(use_with gsm)
6683 - $(use_with gstreamer)
6684 - --without-hal
6685 - $(use_with jpeg)
6686 - $(use_with ldap)
6687 - $(use_enable mono mscoree)
6688 - $(use_with mp3 mpg123)
6689 - $(use_with netapi)
6690 - $(use_with nls gettext)
6691 - $(use_with openal)
6692 - $(use_with opencl)
6693 - $(use_with opengl)
6694 - $(use_with osmesa)
6695 - $(use_with oss)
6696 - $(use_with pcap)
6697 - $(use_with png)
6698 - $(use_with pulseaudio pulse)
6699 - $(use_with threads pthread)
6700 - $(use_with scanner sane)
6701 - $(use_enable test tests)
6702 - $(use_with truetype freetype)
6703 - $(use_with udev)
6704 - $(use_with v4l)
6705 - $(use_with X x)
6706 - $(use_with xcomposite)
6707 - $(use_with xinerama)
6708 - $(use_with xml)
6709 - $(use_with xml xslt)
6710 - )
6711 -
6712 - use staging && myconf+=(
6713 - --with-xattr
6714 - $(use_with themes gtk3)
6715 - $(use_with vaapi va)
6716 - )
6717 -
6718 - local PKG_CONFIG AR RANLIB
6719 - # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
6720 - # set AR and RANLIB to make QA scripts happy; #483342
6721 - tc-export PKG_CONFIG AR RANLIB
6722 -
6723 - if use amd64; then
6724 - if [[ ${ABI} == amd64 ]]; then
6725 - myconf+=( --enable-win64 )
6726 - else
6727 - myconf+=( --disable-win64 )
6728 - fi
6729 -
6730 - # Note: using --with-wine64 results in problems with multilib.eclass
6731 - # CC/LD hackery. We're using separate tools instead.
6732 - fi
6733 -
6734 - ECONF_SOURCE=${S} \
6735 - econf "${myconf[@]}"
6736 - emake depend
6737 -}
6738 -
6739 -multilib_src_test() {
6740 - # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
6741 - if [[ ${ABI} == x86 ]]; then
6742 - if [[ $(id -u) == 0 ]]; then
6743 - ewarn "Skipping tests since they cannot be run under the root user."
6744 - ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
6745 - return
6746 - fi
6747 -
6748 - WINEPREFIX="${T}/.wine-${ABI}" \
6749 - Xemake test
6750 - fi
6751 -}
6752 -
6753 -multilib_src_install_all() {
6754 - local DOCS=( ANNOUNCE AUTHORS README )
6755 - add_locale_docs() {
6756 - local locale_doc="documentation/README.$1"
6757 - [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
6758 - }
6759 - l10n_for_each_locale_do add_locale_docs
6760 -
6761 - einstalldocs
6762 - prune_libtool_files --all
6763 -
6764 - if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
6765 - rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
6766 - "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
6767 - fi
6768 -
6769 - # Remove wineconsole if neither backend is installed #551124
6770 - if ! use X && ! use ncurses; then
6771 - rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
6772 - rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
6773 - rm_wineconsole() {
6774 - rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
6775 - }
6776 - multilib_foreach_abi rm_wineconsole
6777 - fi
6778 -
6779 - use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
6780 - use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
6781 -
6782 - if use abi_x86_64 && ! use abi_x86_32; then
6783 - dosym wine64 "${MY_PREFIX}"/bin/wine # 404331
6784 - dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader
6785 - fi
6786 -
6787 - # Failglob for bin and man loops
6788 - local glob_state=$(shopt -p failglob)
6789 - shopt -s failglob
6790 -
6791 - # Make wrappers for binaries for handling multiple variants
6792 - # Note: wrappers instead of symlinks because some are shell which use basename
6793 - local b
6794 - for b in "${D%/}${MY_PREFIX}"/bin/*; do
6795 - make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
6796 - done
6797 -
6798 - # respect LINGUAS when installing man pages, #469418
6799 - local l
6800 - for l in de fr pl; do
6801 - use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}*
6802 - done
6803 -
6804 - eval "${glob_state}"
6805 -}
6806 -
6807 -pkg_postinst() {
6808 - eselect wine register ${P}
6809 - if [[ ${PN} == "wine-vanilla" ]]; then
6810 - eselect wine register --vanilla ${P} || die
6811 - else
6812 - if use staging; then
6813 - eselect wine register --staging ${P} || die
6814 - fi
6815 - fi
6816 -
6817 - eselect wine update --all --if-unset || die
6818 -
6819 - xdg_desktop_database_update
6820 -
6821 - if ! use gecko; then
6822 - ewarn "Without Wine Gecko, wine prefixes will not have a default"
6823 - ewarn "implementation of iexplore. Many older windows applications"
6824 - ewarn "rely upon the existence of an iexplore implementation, so"
6825 - ewarn "you will likely need to install an external one, like via winetricks"
6826 - fi
6827 - if ! use mono; then
6828 - ewarn "Without Wine Mono, wine prefixes will not have a default"
6829 - ewarn "implementation of .NET. Many windows applications rely upon"
6830 - ewarn "the existence of a .NET implementation, so you will likely need"
6831 - ewarn "to install an external one, like via winetricks"
6832 - fi
6833 -}
6834 -
6835 -pkg_prerm() {
6836 - eselect wine deregister ${P}
6837 - if [[ ${PN} == "wine-vanilla" ]]; then
6838 - eselect wine deregister --vanilla ${P} || die
6839 - else
6840 - if use staging; then
6841 - eselect wine deregister --staging ${P} || die
6842 - fi
6843 - fi
6844 -
6845 - eselect wine update --all --if-unset || die
6846 -}
6847 -
6848 -pkg_postrm() {
6849 - xdg_desktop_database_update
6850 -}
6851
6852 diff --git a/app-emulation/wine-staging/wine-staging-2.4-r1.ebuild b/app-emulation/wine-staging/wine-staging-2.4-r1.ebuild
6853 deleted file mode 100644
6854 index f4d14b26fc4..00000000000
6855 --- a/app-emulation/wine-staging/wine-staging-2.4-r1.ebuild
6856 +++ /dev/null
6857 @@ -1,607 +0,0 @@
6858 -# Copyright 1999-2017 Gentoo Foundation
6859 -# Distributed under the terms of the GNU General Public License v2
6860 -
6861 -EAPI=6
6862 -
6863 -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"
6864 -PLOCALE_BACKUP="en"
6865 -
6866 -inherit autotools eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils
6867 -
6868 -MY_PN="${PN%%-*}"
6869 -MY_P="${MY_PN}-${PV}"
6870 -
6871 -if [[ ${PV} == "9999" ]] ; then
6872 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
6873 - EGIT_BRANCH="master"
6874 - inherit git-r3
6875 - SRC_URI=""
6876 - #KEYWORDS=""
6877 -else
6878 - MAJOR_V=$(get_version_component_range 1)
6879 - SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
6880 - KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
6881 -fi
6882 -S="${WORKDIR}/${MY_P}"
6883 -
6884 -STAGING_P="wine-staging-${PV}"
6885 -STAGING_DIR="${WORKDIR}/${STAGING_P}"
6886 -GWP_V="20170830"
6887 -PATCHDIR="${WORKDIR}/gentoo-wine-patches"
6888 -
6889 -DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset"
6890 -HOMEPAGE="https://www.winehq.org/"
6891 -SRC_URI="${SRC_URI}
6892 - https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
6893 -"
6894 -
6895 -if [[ ${PV} == "9999" ]] ; then
6896 - STAGING_EGIT_REPO_URI="https://github.com/wine-compholio/wine-staging.git"
6897 -else
6898 - SRC_URI="${SRC_URI}
6899 - staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
6900 -fi
6901 -
6902 -LICENSE="LGPL-2.1"
6903 -SLOT="${PV}"
6904 -IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags 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"
6905 -REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
6906 - X? ( truetype )
6907 - elibc_glibc? ( threads )
6908 - osmesa? ( opengl )
6909 - pipelight? ( staging )
6910 - s3tc? ( staging )
6911 - test? ( abi_x86_32 )
6912 - themes? ( staging )
6913 - vaapi? ( staging )" # osmesa-opengl #286560 # X-truetype #551124
6914 -
6915 -# FIXME: the test suite is unsuitable for us; many tests require net access
6916 -# or fail due to Xvfb's opengl limitations.
6917 -RESTRICT="test"
6918 -
6919 -COMMON_DEPEND="
6920 - X? (
6921 - x11-libs/libXcursor[${MULTILIB_USEDEP}]
6922 - x11-libs/libXext[${MULTILIB_USEDEP}]
6923 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
6924 - x11-libs/libXi[${MULTILIB_USEDEP}]
6925 - x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
6926 - )
6927 - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
6928 - capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
6929 - cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
6930 - fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
6931 - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
6932 - gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
6933 - gstreamer? (
6934 - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
6935 - media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
6936 - )
6937 - jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
6938 - lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
6939 - ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
6940 - mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
6941 - ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] )
6942 - netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
6943 - nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
6944 - odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
6945 - openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
6946 - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
6947 - opengl? (
6948 - virtual/glu[${MULTILIB_USEDEP}]
6949 - virtual/opengl[${MULTILIB_USEDEP}]
6950 - )
6951 - osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] )
6952 - pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
6953 - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
6954 - pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
6955 - scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
6956 - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
6957 - staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
6958 - themes? (
6959 - dev-libs/glib:2[${MULTILIB_USEDEP}]
6960 - x11-libs/cairo[${MULTILIB_USEDEP}]
6961 - x11-libs/gtk+:3[${MULTILIB_USEDEP}]
6962 - )
6963 - truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
6964 - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
6965 - udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
6966 - v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
6967 - vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
6968 - xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
6969 - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
6970 - xml? (
6971 - dev-libs/libxml2[${MULTILIB_USEDEP}]
6972 - dev-libs/libxslt[${MULTILIB_USEDEP}]
6973 - )
6974 - abi_x86_32? (
6975 - !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
6976 - !<app-emulation/emul-linux-x86-baselibs-20140508-r14
6977 - !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
6978 - !<app-emulation/emul-linux-x86-db-20140508-r3
6979 - !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
6980 - !<app-emulation/emul-linux-x86-medialibs-20140508-r6
6981 - !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
6982 - !<app-emulation/emul-linux-x86-opengl-20140508-r1
6983 - !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
6984 - !<app-emulation/emul-linux-x86-sdl-20140508-r1
6985 - !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
6986 - !<app-emulation/emul-linux-x86-soundlibs-20140508
6987 - !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
6988 - !<app-emulation/emul-linux-x86-xlibs-20140508
6989 - )"
6990 -
6991 -RDEPEND="${COMMON_DEPEND}
6992 - app-emulation/wine-desktop-common
6993 - >app-eselect/eselect-wine-0.3
6994 - !app-emulation/wine:0
6995 - dos? ( >=games-emulation/dosbox-0.74_p20160629 )
6996 - gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
6997 - mono? ( app-emulation/wine-mono:4.7.0 )
6998 - perl? (
6999 - dev-lang/perl
7000 - dev-perl/XML-Simple
7001 - )
7002 - pulseaudio? (
7003 - realtime? ( sys-auth/rtkit )
7004 - )
7005 - s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] )
7006 - samba? ( >=net-fs/samba-3.0.25[winbind] )
7007 - selinux? ( sec-policy/selinux-wine )
7008 - udisks? ( sys-fs/udisks:2 )"
7009 -
7010 -# tools/make_requests requires perl
7011 -DEPEND="${COMMON_DEPEND}
7012 - sys-devel/flex
7013 - >=sys-kernel/linux-headers-2.6
7014 - virtual/pkgconfig
7015 - virtual/yacc
7016 - X? (
7017 - x11-proto/inputproto
7018 - x11-proto/xextproto
7019 - x11-proto/xf86vidmodeproto
7020 - )
7021 - prelink? ( sys-devel/prelink )
7022 - staging? (
7023 - dev-lang/perl
7024 - dev-perl/XML-Simple
7025 - )
7026 - xinerama? ( x11-proto/xineramaproto )"
7027 -
7028 -# These use a non-standard "Wine" category, which is provided by
7029 -# /etc/xdg/applications-merged/wine.menu
7030 -QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
7031 -usr/share/applications/wine-notepad.desktop
7032 -usr/share/applications/wine-uninstaller.desktop
7033 -usr/share/applications/wine-winecfg.desktop"
7034 -
7035 -PATCHES=(
7036 - "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
7037 - "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
7038 - "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
7039 - "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
7040 - "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
7041 - "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
7042 -)
7043 -PATCHES_BIN=(
7044 - "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
7045 -)
7046 -
7047 -# https://bugs.gentoo.org/show_bug.cgi?id=635222
7048 -if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then
7049 - DEPEND+=" dev-util/patchbin"
7050 -fi
7051 -
7052 -wine_compiler_check() {
7053 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
7054 -
7055 - # GCC-specific bugs
7056 - if tc-is-gcc; then
7057 - # bug #549768
7058 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
7059 - ebegin "Checking for gcc-5 ms_abi compiler bug"
7060 - $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
7061 - # Run in subshell to prevent "Aborted" message
7062 - ( "${T}"/pr66838 || false ) >/dev/null 2>&1
7063 - if ! eend $?; then
7064 - eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
7065 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
7066 - eerror "or use gcc-config to select a different compiler version."
7067 - eerror "See https://bugs.gentoo.org/549768"
7068 - eerror
7069 - return 1
7070 - fi
7071 - fi
7072 - # bug #574044
7073 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
7074 - ebegin "Checking for gcc-5-3 stack realignment compiler bug"
7075 - # Compile in subshell to prevent "Aborted" message
7076 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
7077 - if ! eend $?; then
7078 - eerror "Wine cannot be built with this version of gcc-5.3"
7079 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
7080 - eerror "or use gcc-config to select a different compiler version."
7081 - eerror "See https://bugs.gentoo.org/574044"
7082 - eerror
7083 - return 1
7084 - fi
7085 - fi
7086 - fi
7087 -
7088 - # Ensure compiler support
7089 - if use abi_x86_64; then
7090 - ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
7091 - # Compile in subshell to prevent "Aborted" message
7092 - ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
7093 - if ! eend $?; then
7094 - eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
7095 - eerror
7096 - eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine"
7097 - eerror
7098 - return 1
7099 - fi
7100 - fi
7101 -}
7102 -
7103 -wine_build_environment_check() {
7104 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
7105 -
7106 - if use abi_x86_64; then
7107 - if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
7108 - eerror "You need gcc-4.4+ to compile 64-bit wine"
7109 - die
7110 - elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
7111 - eerror "You need clang-3.8+ to compile 64-bit wine"
7112 - die
7113 - fi
7114 - fi
7115 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
7116 - ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
7117 - ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
7118 - ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
7119 - fi
7120 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
7121 - if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
7122 - ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work"
7123 - ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
7124 - ewarn "See package.env in man 5 portage for more information on how to do this."
7125 - ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
7126 - fi
7127 - fi
7128 -
7129 - if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then
7130 - eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
7131 - eerror "See https://bugs.gentoo.org/487864 for more details."
7132 - eerror
7133 - return 1
7134 - fi
7135 -}
7136 -
7137 -wine_env_vcs_vars() {
7138 - local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
7139 - local pn_live_val="${pn_live_var}"
7140 - eval pn_live_val='$'${pn_live_val}
7141 - if [[ ! -z ${pn_live_val} ]]; then
7142 - if use staging; then
7143 - eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}"
7144 - eerror "cannot be used to set the commit. Instead, you may use the"
7145 - eerror "environmental variables WINE_COMMIT, and STAGING_COMMIT."
7146 - eerror
7147 - return 1
7148 - fi
7149 - fi
7150 - if [[ ! -z ${EGIT_COMMIT} ]]; then
7151 - eerror "Commits must now be specified using the environmental variables"
7152 - eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT"
7153 - eerror
7154 - return 1
7155 - fi
7156 -}
7157 -
7158 -pkg_pretend() {
7159 - wine_build_environment_check || die
7160 -
7161 - # Verify OSS support
7162 - if use oss && ! use kernel_FreeBSD; then
7163 - if ! has_version ">=media-sound/oss-4"; then
7164 - eerror "You cannot build wine with USE=oss without having support from a"
7165 - eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)"
7166 - eerror
7167 - die
7168 - fi
7169 - fi
7170 -}
7171 -
7172 -pkg_setup() {
7173 - wine_build_environment_check || die
7174 - wine_env_vcs_vars || die
7175 -
7176 - WINE_VARIANT="${PN#wine}-${PV}"
7177 - WINE_VARIANT="${WINE_VARIANT#-}"
7178 -
7179 - MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
7180 - MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
7181 - MY_DATADIR="${MY_DATAROOTDIR}"
7182 - MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
7183 - MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
7184 - MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
7185 - MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
7186 - MY_MANDIR="${MY_DATADIR}/man"
7187 -}
7188 -
7189 -src_unpack() {
7190 - if [[ ${PV} == "9999" ]] ; then
7191 - EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
7192 - if use staging; then
7193 - local CURRENT_WINE_COMMIT=${EGIT_VERSION}
7194 -
7195 - git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}"
7196 - git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}"
7197 -
7198 - local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die
7199 -
7200 - if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then
7201 - einfo "The current Staging patchset is not guaranteed to apply on this WINE commit."
7202 - einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT."
7203 - einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine"
7204 - fi
7205 - fi
7206 - fi
7207 -
7208 - default
7209 -
7210 - l10n_find_plocales_changes "${S}/po" "" ".po"
7211 -}
7212 -
7213 -src_prepare() {
7214 -
7215 - eapply_bin(){
7216 - local patch
7217 - for patch in ${PATCHES_BIN[@]}; do
7218 - patchbin --nogit < "${patch}" || die
7219 - done
7220 - }
7221 -
7222 - local md5="$(md5sum server/protocol.def)"
7223 -
7224 - if use staging; then
7225 - ewarn "Applying the Wine-Staging patchset. Any bug reports to the"
7226 - ewarn "Wine bugzilla should explicitly state that staging was used."
7227 -
7228 - local STAGING_EXCLUDE=""
7229 - STAGING_EXCLUDE="${STAGING_EXCLUDE} -W winhlp32-Flex_Workaround" # Avoid double patching https://bugs.winehq.org/show_bug.cgi?id=42132
7230 - use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
7231 -
7232 - # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches
7233 - ebegin "Running Wine-Staging patch installer"
7234 - (
7235 - set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE}
7236 - cd "${STAGING_DIR}/patches"
7237 - source "${STAGING_DIR}/patches/patchinstall.sh"
7238 - )
7239 - eend $? || die "Failed to apply Wine-Staging patches"
7240 - fi
7241 -
7242 - default
7243 - eapply_bin
7244 - eautoreconf
7245 -
7246 - # Modification of the server protocol requires regenerating the server requests
7247 - if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
7248 - einfo "server/protocol.def was patched; running tools/make_requests"
7249 - tools/make_requests || die #432348
7250 - fi
7251 - sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
7252 - if ! use run-exes; then
7253 - sed -i '/^MimeType/d' loader/wine.desktop || die #117785
7254 - fi
7255 -
7256 - # Edit wine.desktop to work for specific variant
7257 - sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
7258 -
7259 - # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
7260 - cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
7261 -
7262 - l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
7263 -}
7264 -
7265 -src_configure() {
7266 - wine_compiler_check || die
7267 -
7268 - export LDCONFIG=/bin/true
7269 - use custom-cflags || strip-flags
7270 -
7271 - multilib-minimal_src_configure
7272 -}
7273 -
7274 -multilib_src_configure() {
7275 - local myconf=(
7276 - --prefix="${MY_PREFIX}"
7277 - --datarootdir="${MY_DATAROOTDIR}"
7278 - --datadir="${MY_DATADIR}"
7279 - --docdir="${MY_DOCDIR}"
7280 - --includedir="${MY_INCLUDEDIR}"
7281 - --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
7282 - --libexecdir="${MY_LIBEXECDIR}"
7283 - --localstatedir="${MY_LOCALSTATEDIR}"
7284 - --mandir="${MY_MANDIR}"
7285 - --sysconfdir=/etc/wine
7286 - $(use_with alsa)
7287 - $(use_with capi)
7288 - $(use_with lcms cms)
7289 - $(use_with cups)
7290 - $(use_with ncurses curses)
7291 - $(use_with udisks dbus)
7292 - $(use_with fontconfig)
7293 - $(use_with ssl gnutls)
7294 - $(use_enable gecko mshtml)
7295 - $(use_with gphoto2 gphoto)
7296 - $(use_with gsm)
7297 - $(use_with gstreamer)
7298 - --without-hal
7299 - $(use_with jpeg)
7300 - $(use_with ldap)
7301 - $(use_enable mono mscoree)
7302 - $(use_with mp3 mpg123)
7303 - $(use_with netapi)
7304 - $(use_with nls gettext)
7305 - $(use_with openal)
7306 - $(use_with opencl)
7307 - $(use_with opengl)
7308 - $(use_with osmesa)
7309 - $(use_with oss)
7310 - $(use_with pcap)
7311 - $(use_with png)
7312 - $(use_with pulseaudio pulse)
7313 - $(use_with threads pthread)
7314 - $(use_with scanner sane)
7315 - $(use_enable test tests)
7316 - $(use_with truetype freetype)
7317 - $(use_with udev)
7318 - $(use_with v4l)
7319 - $(use_with X x)
7320 - $(use_with xcomposite)
7321 - $(use_with xinerama)
7322 - $(use_with xml)
7323 - $(use_with xml xslt)
7324 - )
7325 -
7326 - use staging && myconf+=(
7327 - --with-xattr
7328 - $(use_with themes gtk3)
7329 - $(use_with vaapi va)
7330 - )
7331 -
7332 - local PKG_CONFIG AR RANLIB
7333 - # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
7334 - # set AR and RANLIB to make QA scripts happy; #483342
7335 - tc-export PKG_CONFIG AR RANLIB
7336 -
7337 - if use amd64; then
7338 - if [[ ${ABI} == amd64 ]]; then
7339 - myconf+=( --enable-win64 )
7340 - else
7341 - myconf+=( --disable-win64 )
7342 - fi
7343 -
7344 - # Note: using --with-wine64 results in problems with multilib.eclass
7345 - # CC/LD hackery. We're using separate tools instead.
7346 - fi
7347 -
7348 - ECONF_SOURCE=${S} \
7349 - econf "${myconf[@]}"
7350 - emake depend
7351 -}
7352 -
7353 -multilib_src_test() {
7354 - # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
7355 - if [[ ${ABI} == x86 ]]; then
7356 - if [[ $(id -u) == 0 ]]; then
7357 - ewarn "Skipping tests since they cannot be run under the root user."
7358 - ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
7359 - return
7360 - fi
7361 -
7362 - WINEPREFIX="${T}/.wine-${ABI}" \
7363 - Xemake test
7364 - fi
7365 -}
7366 -
7367 -multilib_src_install_all() {
7368 - local DOCS=( ANNOUNCE AUTHORS README )
7369 - add_locale_docs() {
7370 - local locale_doc="documentation/README.$1"
7371 - [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
7372 - }
7373 - l10n_for_each_locale_do add_locale_docs
7374 -
7375 - einstalldocs
7376 - prune_libtool_files --all
7377 -
7378 - if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
7379 - rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
7380 - "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
7381 - fi
7382 -
7383 - # Remove wineconsole if neither backend is installed #551124
7384 - if ! use X && ! use ncurses; then
7385 - rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
7386 - rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
7387 - rm_wineconsole() {
7388 - rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
7389 - }
7390 - multilib_foreach_abi rm_wineconsole
7391 - fi
7392 -
7393 - use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
7394 - use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
7395 -
7396 - if use abi_x86_64 && ! use abi_x86_32; then
7397 - dosym wine64 "${MY_PREFIX}"/bin/wine # 404331
7398 - dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader
7399 - fi
7400 -
7401 - # Failglob for bin and man loops
7402 - local glob_state=$(shopt -p failglob)
7403 - shopt -s failglob
7404 -
7405 - # Make wrappers for binaries for handling multiple variants
7406 - # Note: wrappers instead of symlinks because some are shell which use basename
7407 - local b
7408 - for b in "${D%/}${MY_PREFIX}"/bin/*; do
7409 - make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
7410 - done
7411 -
7412 - # respect LINGUAS when installing man pages, #469418
7413 - local l
7414 - for l in de fr pl; do
7415 - use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}*
7416 - done
7417 -
7418 - eval "${glob_state}"
7419 -}
7420 -
7421 -pkg_postinst() {
7422 - eselect wine register ${P}
7423 - if [[ ${PN} == "wine-vanilla" ]]; then
7424 - eselect wine register --vanilla ${P} || die
7425 - else
7426 - if use staging; then
7427 - eselect wine register --staging ${P} || die
7428 - fi
7429 - fi
7430 -
7431 - eselect wine update --all --if-unset || die
7432 -
7433 - xdg_desktop_database_update
7434 -
7435 - if ! use gecko; then
7436 - ewarn "Without Wine Gecko, wine prefixes will not have a default"
7437 - ewarn "implementation of iexplore. Many older windows applications"
7438 - ewarn "rely upon the existence of an iexplore implementation, so"
7439 - ewarn "you will likely need to install an external one, like via winetricks"
7440 - fi
7441 - if ! use mono; then
7442 - ewarn "Without Wine Mono, wine prefixes will not have a default"
7443 - ewarn "implementation of .NET. Many windows applications rely upon"
7444 - ewarn "the existence of a .NET implementation, so you will likely need"
7445 - ewarn "to install an external one, like via winetricks"
7446 - fi
7447 -}
7448 -
7449 -pkg_prerm() {
7450 - eselect wine deregister ${P}
7451 - if [[ ${PN} == "wine-vanilla" ]]; then
7452 - eselect wine deregister --vanilla ${P} || die
7453 - else
7454 - if use staging; then
7455 - eselect wine deregister --staging ${P} || die
7456 - fi
7457 - fi
7458 -
7459 - eselect wine update --all --if-unset || die
7460 -}
7461 -
7462 -pkg_postrm() {
7463 - xdg_desktop_database_update
7464 -}
7465
7466 diff --git a/app-emulation/wine-staging/wine-staging-2.5-r1.ebuild b/app-emulation/wine-staging/wine-staging-2.5-r1.ebuild
7467 deleted file mode 100644
7468 index f4d14b26fc4..00000000000
7469 --- a/app-emulation/wine-staging/wine-staging-2.5-r1.ebuild
7470 +++ /dev/null
7471 @@ -1,607 +0,0 @@
7472 -# Copyright 1999-2017 Gentoo Foundation
7473 -# Distributed under the terms of the GNU General Public License v2
7474 -
7475 -EAPI=6
7476 -
7477 -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"
7478 -PLOCALE_BACKUP="en"
7479 -
7480 -inherit autotools eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils
7481 -
7482 -MY_PN="${PN%%-*}"
7483 -MY_P="${MY_PN}-${PV}"
7484 -
7485 -if [[ ${PV} == "9999" ]] ; then
7486 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
7487 - EGIT_BRANCH="master"
7488 - inherit git-r3
7489 - SRC_URI=""
7490 - #KEYWORDS=""
7491 -else
7492 - MAJOR_V=$(get_version_component_range 1)
7493 - SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
7494 - KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
7495 -fi
7496 -S="${WORKDIR}/${MY_P}"
7497 -
7498 -STAGING_P="wine-staging-${PV}"
7499 -STAGING_DIR="${WORKDIR}/${STAGING_P}"
7500 -GWP_V="20170830"
7501 -PATCHDIR="${WORKDIR}/gentoo-wine-patches"
7502 -
7503 -DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset"
7504 -HOMEPAGE="https://www.winehq.org/"
7505 -SRC_URI="${SRC_URI}
7506 - https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
7507 -"
7508 -
7509 -if [[ ${PV} == "9999" ]] ; then
7510 - STAGING_EGIT_REPO_URI="https://github.com/wine-compholio/wine-staging.git"
7511 -else
7512 - SRC_URI="${SRC_URI}
7513 - staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
7514 -fi
7515 -
7516 -LICENSE="LGPL-2.1"
7517 -SLOT="${PV}"
7518 -IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags 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"
7519 -REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
7520 - X? ( truetype )
7521 - elibc_glibc? ( threads )
7522 - osmesa? ( opengl )
7523 - pipelight? ( staging )
7524 - s3tc? ( staging )
7525 - test? ( abi_x86_32 )
7526 - themes? ( staging )
7527 - vaapi? ( staging )" # osmesa-opengl #286560 # X-truetype #551124
7528 -
7529 -# FIXME: the test suite is unsuitable for us; many tests require net access
7530 -# or fail due to Xvfb's opengl limitations.
7531 -RESTRICT="test"
7532 -
7533 -COMMON_DEPEND="
7534 - X? (
7535 - x11-libs/libXcursor[${MULTILIB_USEDEP}]
7536 - x11-libs/libXext[${MULTILIB_USEDEP}]
7537 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
7538 - x11-libs/libXi[${MULTILIB_USEDEP}]
7539 - x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
7540 - )
7541 - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
7542 - capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
7543 - cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
7544 - fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
7545 - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
7546 - gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
7547 - gstreamer? (
7548 - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
7549 - media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
7550 - )
7551 - jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
7552 - lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
7553 - ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
7554 - mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
7555 - ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] )
7556 - netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
7557 - nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
7558 - odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
7559 - openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
7560 - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
7561 - opengl? (
7562 - virtual/glu[${MULTILIB_USEDEP}]
7563 - virtual/opengl[${MULTILIB_USEDEP}]
7564 - )
7565 - osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] )
7566 - pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
7567 - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
7568 - pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
7569 - scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
7570 - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
7571 - staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
7572 - themes? (
7573 - dev-libs/glib:2[${MULTILIB_USEDEP}]
7574 - x11-libs/cairo[${MULTILIB_USEDEP}]
7575 - x11-libs/gtk+:3[${MULTILIB_USEDEP}]
7576 - )
7577 - truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
7578 - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
7579 - udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
7580 - v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
7581 - vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
7582 - xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
7583 - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
7584 - xml? (
7585 - dev-libs/libxml2[${MULTILIB_USEDEP}]
7586 - dev-libs/libxslt[${MULTILIB_USEDEP}]
7587 - )
7588 - abi_x86_32? (
7589 - !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
7590 - !<app-emulation/emul-linux-x86-baselibs-20140508-r14
7591 - !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
7592 - !<app-emulation/emul-linux-x86-db-20140508-r3
7593 - !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
7594 - !<app-emulation/emul-linux-x86-medialibs-20140508-r6
7595 - !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
7596 - !<app-emulation/emul-linux-x86-opengl-20140508-r1
7597 - !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
7598 - !<app-emulation/emul-linux-x86-sdl-20140508-r1
7599 - !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
7600 - !<app-emulation/emul-linux-x86-soundlibs-20140508
7601 - !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
7602 - !<app-emulation/emul-linux-x86-xlibs-20140508
7603 - )"
7604 -
7605 -RDEPEND="${COMMON_DEPEND}
7606 - app-emulation/wine-desktop-common
7607 - >app-eselect/eselect-wine-0.3
7608 - !app-emulation/wine:0
7609 - dos? ( >=games-emulation/dosbox-0.74_p20160629 )
7610 - gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
7611 - mono? ( app-emulation/wine-mono:4.7.0 )
7612 - perl? (
7613 - dev-lang/perl
7614 - dev-perl/XML-Simple
7615 - )
7616 - pulseaudio? (
7617 - realtime? ( sys-auth/rtkit )
7618 - )
7619 - s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] )
7620 - samba? ( >=net-fs/samba-3.0.25[winbind] )
7621 - selinux? ( sec-policy/selinux-wine )
7622 - udisks? ( sys-fs/udisks:2 )"
7623 -
7624 -# tools/make_requests requires perl
7625 -DEPEND="${COMMON_DEPEND}
7626 - sys-devel/flex
7627 - >=sys-kernel/linux-headers-2.6
7628 - virtual/pkgconfig
7629 - virtual/yacc
7630 - X? (
7631 - x11-proto/inputproto
7632 - x11-proto/xextproto
7633 - x11-proto/xf86vidmodeproto
7634 - )
7635 - prelink? ( sys-devel/prelink )
7636 - staging? (
7637 - dev-lang/perl
7638 - dev-perl/XML-Simple
7639 - )
7640 - xinerama? ( x11-proto/xineramaproto )"
7641 -
7642 -# These use a non-standard "Wine" category, which is provided by
7643 -# /etc/xdg/applications-merged/wine.menu
7644 -QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
7645 -usr/share/applications/wine-notepad.desktop
7646 -usr/share/applications/wine-uninstaller.desktop
7647 -usr/share/applications/wine-winecfg.desktop"
7648 -
7649 -PATCHES=(
7650 - "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
7651 - "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
7652 - "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
7653 - "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
7654 - "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
7655 - "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
7656 -)
7657 -PATCHES_BIN=(
7658 - "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
7659 -)
7660 -
7661 -# https://bugs.gentoo.org/show_bug.cgi?id=635222
7662 -if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then
7663 - DEPEND+=" dev-util/patchbin"
7664 -fi
7665 -
7666 -wine_compiler_check() {
7667 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
7668 -
7669 - # GCC-specific bugs
7670 - if tc-is-gcc; then
7671 - # bug #549768
7672 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
7673 - ebegin "Checking for gcc-5 ms_abi compiler bug"
7674 - $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
7675 - # Run in subshell to prevent "Aborted" message
7676 - ( "${T}"/pr66838 || false ) >/dev/null 2>&1
7677 - if ! eend $?; then
7678 - eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
7679 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
7680 - eerror "or use gcc-config to select a different compiler version."
7681 - eerror "See https://bugs.gentoo.org/549768"
7682 - eerror
7683 - return 1
7684 - fi
7685 - fi
7686 - # bug #574044
7687 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
7688 - ebegin "Checking for gcc-5-3 stack realignment compiler bug"
7689 - # Compile in subshell to prevent "Aborted" message
7690 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
7691 - if ! eend $?; then
7692 - eerror "Wine cannot be built with this version of gcc-5.3"
7693 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
7694 - eerror "or use gcc-config to select a different compiler version."
7695 - eerror "See https://bugs.gentoo.org/574044"
7696 - eerror
7697 - return 1
7698 - fi
7699 - fi
7700 - fi
7701 -
7702 - # Ensure compiler support
7703 - if use abi_x86_64; then
7704 - ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
7705 - # Compile in subshell to prevent "Aborted" message
7706 - ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
7707 - if ! eend $?; then
7708 - eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
7709 - eerror
7710 - eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine"
7711 - eerror
7712 - return 1
7713 - fi
7714 - fi
7715 -}
7716 -
7717 -wine_build_environment_check() {
7718 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
7719 -
7720 - if use abi_x86_64; then
7721 - if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
7722 - eerror "You need gcc-4.4+ to compile 64-bit wine"
7723 - die
7724 - elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
7725 - eerror "You need clang-3.8+ to compile 64-bit wine"
7726 - die
7727 - fi
7728 - fi
7729 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
7730 - ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
7731 - ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
7732 - ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
7733 - fi
7734 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
7735 - if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
7736 - ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work"
7737 - ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
7738 - ewarn "See package.env in man 5 portage for more information on how to do this."
7739 - ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
7740 - fi
7741 - fi
7742 -
7743 - if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then
7744 - eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
7745 - eerror "See https://bugs.gentoo.org/487864 for more details."
7746 - eerror
7747 - return 1
7748 - fi
7749 -}
7750 -
7751 -wine_env_vcs_vars() {
7752 - local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
7753 - local pn_live_val="${pn_live_var}"
7754 - eval pn_live_val='$'${pn_live_val}
7755 - if [[ ! -z ${pn_live_val} ]]; then
7756 - if use staging; then
7757 - eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}"
7758 - eerror "cannot be used to set the commit. Instead, you may use the"
7759 - eerror "environmental variables WINE_COMMIT, and STAGING_COMMIT."
7760 - eerror
7761 - return 1
7762 - fi
7763 - fi
7764 - if [[ ! -z ${EGIT_COMMIT} ]]; then
7765 - eerror "Commits must now be specified using the environmental variables"
7766 - eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT"
7767 - eerror
7768 - return 1
7769 - fi
7770 -}
7771 -
7772 -pkg_pretend() {
7773 - wine_build_environment_check || die
7774 -
7775 - # Verify OSS support
7776 - if use oss && ! use kernel_FreeBSD; then
7777 - if ! has_version ">=media-sound/oss-4"; then
7778 - eerror "You cannot build wine with USE=oss without having support from a"
7779 - eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)"
7780 - eerror
7781 - die
7782 - fi
7783 - fi
7784 -}
7785 -
7786 -pkg_setup() {
7787 - wine_build_environment_check || die
7788 - wine_env_vcs_vars || die
7789 -
7790 - WINE_VARIANT="${PN#wine}-${PV}"
7791 - WINE_VARIANT="${WINE_VARIANT#-}"
7792 -
7793 - MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
7794 - MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
7795 - MY_DATADIR="${MY_DATAROOTDIR}"
7796 - MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
7797 - MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
7798 - MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
7799 - MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
7800 - MY_MANDIR="${MY_DATADIR}/man"
7801 -}
7802 -
7803 -src_unpack() {
7804 - if [[ ${PV} == "9999" ]] ; then
7805 - EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
7806 - if use staging; then
7807 - local CURRENT_WINE_COMMIT=${EGIT_VERSION}
7808 -
7809 - git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}"
7810 - git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}"
7811 -
7812 - local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die
7813 -
7814 - if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then
7815 - einfo "The current Staging patchset is not guaranteed to apply on this WINE commit."
7816 - einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT."
7817 - einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine"
7818 - fi
7819 - fi
7820 - fi
7821 -
7822 - default
7823 -
7824 - l10n_find_plocales_changes "${S}/po" "" ".po"
7825 -}
7826 -
7827 -src_prepare() {
7828 -
7829 - eapply_bin(){
7830 - local patch
7831 - for patch in ${PATCHES_BIN[@]}; do
7832 - patchbin --nogit < "${patch}" || die
7833 - done
7834 - }
7835 -
7836 - local md5="$(md5sum server/protocol.def)"
7837 -
7838 - if use staging; then
7839 - ewarn "Applying the Wine-Staging patchset. Any bug reports to the"
7840 - ewarn "Wine bugzilla should explicitly state that staging was used."
7841 -
7842 - local STAGING_EXCLUDE=""
7843 - STAGING_EXCLUDE="${STAGING_EXCLUDE} -W winhlp32-Flex_Workaround" # Avoid double patching https://bugs.winehq.org/show_bug.cgi?id=42132
7844 - use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
7845 -
7846 - # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches
7847 - ebegin "Running Wine-Staging patch installer"
7848 - (
7849 - set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE}
7850 - cd "${STAGING_DIR}/patches"
7851 - source "${STAGING_DIR}/patches/patchinstall.sh"
7852 - )
7853 - eend $? || die "Failed to apply Wine-Staging patches"
7854 - fi
7855 -
7856 - default
7857 - eapply_bin
7858 - eautoreconf
7859 -
7860 - # Modification of the server protocol requires regenerating the server requests
7861 - if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
7862 - einfo "server/protocol.def was patched; running tools/make_requests"
7863 - tools/make_requests || die #432348
7864 - fi
7865 - sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
7866 - if ! use run-exes; then
7867 - sed -i '/^MimeType/d' loader/wine.desktop || die #117785
7868 - fi
7869 -
7870 - # Edit wine.desktop to work for specific variant
7871 - sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
7872 -
7873 - # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
7874 - cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
7875 -
7876 - l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
7877 -}
7878 -
7879 -src_configure() {
7880 - wine_compiler_check || die
7881 -
7882 - export LDCONFIG=/bin/true
7883 - use custom-cflags || strip-flags
7884 -
7885 - multilib-minimal_src_configure
7886 -}
7887 -
7888 -multilib_src_configure() {
7889 - local myconf=(
7890 - --prefix="${MY_PREFIX}"
7891 - --datarootdir="${MY_DATAROOTDIR}"
7892 - --datadir="${MY_DATADIR}"
7893 - --docdir="${MY_DOCDIR}"
7894 - --includedir="${MY_INCLUDEDIR}"
7895 - --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
7896 - --libexecdir="${MY_LIBEXECDIR}"
7897 - --localstatedir="${MY_LOCALSTATEDIR}"
7898 - --mandir="${MY_MANDIR}"
7899 - --sysconfdir=/etc/wine
7900 - $(use_with alsa)
7901 - $(use_with capi)
7902 - $(use_with lcms cms)
7903 - $(use_with cups)
7904 - $(use_with ncurses curses)
7905 - $(use_with udisks dbus)
7906 - $(use_with fontconfig)
7907 - $(use_with ssl gnutls)
7908 - $(use_enable gecko mshtml)
7909 - $(use_with gphoto2 gphoto)
7910 - $(use_with gsm)
7911 - $(use_with gstreamer)
7912 - --without-hal
7913 - $(use_with jpeg)
7914 - $(use_with ldap)
7915 - $(use_enable mono mscoree)
7916 - $(use_with mp3 mpg123)
7917 - $(use_with netapi)
7918 - $(use_with nls gettext)
7919 - $(use_with openal)
7920 - $(use_with opencl)
7921 - $(use_with opengl)
7922 - $(use_with osmesa)
7923 - $(use_with oss)
7924 - $(use_with pcap)
7925 - $(use_with png)
7926 - $(use_with pulseaudio pulse)
7927 - $(use_with threads pthread)
7928 - $(use_with scanner sane)
7929 - $(use_enable test tests)
7930 - $(use_with truetype freetype)
7931 - $(use_with udev)
7932 - $(use_with v4l)
7933 - $(use_with X x)
7934 - $(use_with xcomposite)
7935 - $(use_with xinerama)
7936 - $(use_with xml)
7937 - $(use_with xml xslt)
7938 - )
7939 -
7940 - use staging && myconf+=(
7941 - --with-xattr
7942 - $(use_with themes gtk3)
7943 - $(use_with vaapi va)
7944 - )
7945 -
7946 - local PKG_CONFIG AR RANLIB
7947 - # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
7948 - # set AR and RANLIB to make QA scripts happy; #483342
7949 - tc-export PKG_CONFIG AR RANLIB
7950 -
7951 - if use amd64; then
7952 - if [[ ${ABI} == amd64 ]]; then
7953 - myconf+=( --enable-win64 )
7954 - else
7955 - myconf+=( --disable-win64 )
7956 - fi
7957 -
7958 - # Note: using --with-wine64 results in problems with multilib.eclass
7959 - # CC/LD hackery. We're using separate tools instead.
7960 - fi
7961 -
7962 - ECONF_SOURCE=${S} \
7963 - econf "${myconf[@]}"
7964 - emake depend
7965 -}
7966 -
7967 -multilib_src_test() {
7968 - # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
7969 - if [[ ${ABI} == x86 ]]; then
7970 - if [[ $(id -u) == 0 ]]; then
7971 - ewarn "Skipping tests since they cannot be run under the root user."
7972 - ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
7973 - return
7974 - fi
7975 -
7976 - WINEPREFIX="${T}/.wine-${ABI}" \
7977 - Xemake test
7978 - fi
7979 -}
7980 -
7981 -multilib_src_install_all() {
7982 - local DOCS=( ANNOUNCE AUTHORS README )
7983 - add_locale_docs() {
7984 - local locale_doc="documentation/README.$1"
7985 - [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
7986 - }
7987 - l10n_for_each_locale_do add_locale_docs
7988 -
7989 - einstalldocs
7990 - prune_libtool_files --all
7991 -
7992 - if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
7993 - rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
7994 - "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
7995 - fi
7996 -
7997 - # Remove wineconsole if neither backend is installed #551124
7998 - if ! use X && ! use ncurses; then
7999 - rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
8000 - rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
8001 - rm_wineconsole() {
8002 - rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
8003 - }
8004 - multilib_foreach_abi rm_wineconsole
8005 - fi
8006 -
8007 - use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
8008 - use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
8009 -
8010 - if use abi_x86_64 && ! use abi_x86_32; then
8011 - dosym wine64 "${MY_PREFIX}"/bin/wine # 404331
8012 - dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader
8013 - fi
8014 -
8015 - # Failglob for bin and man loops
8016 - local glob_state=$(shopt -p failglob)
8017 - shopt -s failglob
8018 -
8019 - # Make wrappers for binaries for handling multiple variants
8020 - # Note: wrappers instead of symlinks because some are shell which use basename
8021 - local b
8022 - for b in "${D%/}${MY_PREFIX}"/bin/*; do
8023 - make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
8024 - done
8025 -
8026 - # respect LINGUAS when installing man pages, #469418
8027 - local l
8028 - for l in de fr pl; do
8029 - use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}*
8030 - done
8031 -
8032 - eval "${glob_state}"
8033 -}
8034 -
8035 -pkg_postinst() {
8036 - eselect wine register ${P}
8037 - if [[ ${PN} == "wine-vanilla" ]]; then
8038 - eselect wine register --vanilla ${P} || die
8039 - else
8040 - if use staging; then
8041 - eselect wine register --staging ${P} || die
8042 - fi
8043 - fi
8044 -
8045 - eselect wine update --all --if-unset || die
8046 -
8047 - xdg_desktop_database_update
8048 -
8049 - if ! use gecko; then
8050 - ewarn "Without Wine Gecko, wine prefixes will not have a default"
8051 - ewarn "implementation of iexplore. Many older windows applications"
8052 - ewarn "rely upon the existence of an iexplore implementation, so"
8053 - ewarn "you will likely need to install an external one, like via winetricks"
8054 - fi
8055 - if ! use mono; then
8056 - ewarn "Without Wine Mono, wine prefixes will not have a default"
8057 - ewarn "implementation of .NET. Many windows applications rely upon"
8058 - ewarn "the existence of a .NET implementation, so you will likely need"
8059 - ewarn "to install an external one, like via winetricks"
8060 - fi
8061 -}
8062 -
8063 -pkg_prerm() {
8064 - eselect wine deregister ${P}
8065 - if [[ ${PN} == "wine-vanilla" ]]; then
8066 - eselect wine deregister --vanilla ${P} || die
8067 - else
8068 - if use staging; then
8069 - eselect wine deregister --staging ${P} || die
8070 - fi
8071 - fi
8072 -
8073 - eselect wine update --all --if-unset || die
8074 -}
8075 -
8076 -pkg_postrm() {
8077 - xdg_desktop_database_update
8078 -}
8079
8080 diff --git a/app-emulation/wine-staging/wine-staging-2.6-r1.ebuild b/app-emulation/wine-staging/wine-staging-2.6-r1.ebuild
8081 deleted file mode 100644
8082 index f4d14b26fc4..00000000000
8083 --- a/app-emulation/wine-staging/wine-staging-2.6-r1.ebuild
8084 +++ /dev/null
8085 @@ -1,607 +0,0 @@
8086 -# Copyright 1999-2017 Gentoo Foundation
8087 -# Distributed under the terms of the GNU General Public License v2
8088 -
8089 -EAPI=6
8090 -
8091 -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"
8092 -PLOCALE_BACKUP="en"
8093 -
8094 -inherit autotools eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils
8095 -
8096 -MY_PN="${PN%%-*}"
8097 -MY_P="${MY_PN}-${PV}"
8098 -
8099 -if [[ ${PV} == "9999" ]] ; then
8100 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
8101 - EGIT_BRANCH="master"
8102 - inherit git-r3
8103 - SRC_URI=""
8104 - #KEYWORDS=""
8105 -else
8106 - MAJOR_V=$(get_version_component_range 1)
8107 - SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
8108 - KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
8109 -fi
8110 -S="${WORKDIR}/${MY_P}"
8111 -
8112 -STAGING_P="wine-staging-${PV}"
8113 -STAGING_DIR="${WORKDIR}/${STAGING_P}"
8114 -GWP_V="20170830"
8115 -PATCHDIR="${WORKDIR}/gentoo-wine-patches"
8116 -
8117 -DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset"
8118 -HOMEPAGE="https://www.winehq.org/"
8119 -SRC_URI="${SRC_URI}
8120 - https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
8121 -"
8122 -
8123 -if [[ ${PV} == "9999" ]] ; then
8124 - STAGING_EGIT_REPO_URI="https://github.com/wine-compholio/wine-staging.git"
8125 -else
8126 - SRC_URI="${SRC_URI}
8127 - staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
8128 -fi
8129 -
8130 -LICENSE="LGPL-2.1"
8131 -SLOT="${PV}"
8132 -IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags 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"
8133 -REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
8134 - X? ( truetype )
8135 - elibc_glibc? ( threads )
8136 - osmesa? ( opengl )
8137 - pipelight? ( staging )
8138 - s3tc? ( staging )
8139 - test? ( abi_x86_32 )
8140 - themes? ( staging )
8141 - vaapi? ( staging )" # osmesa-opengl #286560 # X-truetype #551124
8142 -
8143 -# FIXME: the test suite is unsuitable for us; many tests require net access
8144 -# or fail due to Xvfb's opengl limitations.
8145 -RESTRICT="test"
8146 -
8147 -COMMON_DEPEND="
8148 - X? (
8149 - x11-libs/libXcursor[${MULTILIB_USEDEP}]
8150 - x11-libs/libXext[${MULTILIB_USEDEP}]
8151 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
8152 - x11-libs/libXi[${MULTILIB_USEDEP}]
8153 - x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
8154 - )
8155 - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
8156 - capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
8157 - cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
8158 - fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
8159 - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
8160 - gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
8161 - gstreamer? (
8162 - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
8163 - media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
8164 - )
8165 - jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
8166 - lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
8167 - ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
8168 - mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
8169 - ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] )
8170 - netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
8171 - nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
8172 - odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
8173 - openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
8174 - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
8175 - opengl? (
8176 - virtual/glu[${MULTILIB_USEDEP}]
8177 - virtual/opengl[${MULTILIB_USEDEP}]
8178 - )
8179 - osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] )
8180 - pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
8181 - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
8182 - pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
8183 - scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
8184 - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
8185 - staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
8186 - themes? (
8187 - dev-libs/glib:2[${MULTILIB_USEDEP}]
8188 - x11-libs/cairo[${MULTILIB_USEDEP}]
8189 - x11-libs/gtk+:3[${MULTILIB_USEDEP}]
8190 - )
8191 - truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
8192 - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
8193 - udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
8194 - v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
8195 - vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
8196 - xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
8197 - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
8198 - xml? (
8199 - dev-libs/libxml2[${MULTILIB_USEDEP}]
8200 - dev-libs/libxslt[${MULTILIB_USEDEP}]
8201 - )
8202 - abi_x86_32? (
8203 - !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
8204 - !<app-emulation/emul-linux-x86-baselibs-20140508-r14
8205 - !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
8206 - !<app-emulation/emul-linux-x86-db-20140508-r3
8207 - !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
8208 - !<app-emulation/emul-linux-x86-medialibs-20140508-r6
8209 - !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
8210 - !<app-emulation/emul-linux-x86-opengl-20140508-r1
8211 - !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
8212 - !<app-emulation/emul-linux-x86-sdl-20140508-r1
8213 - !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
8214 - !<app-emulation/emul-linux-x86-soundlibs-20140508
8215 - !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
8216 - !<app-emulation/emul-linux-x86-xlibs-20140508
8217 - )"
8218 -
8219 -RDEPEND="${COMMON_DEPEND}
8220 - app-emulation/wine-desktop-common
8221 - >app-eselect/eselect-wine-0.3
8222 - !app-emulation/wine:0
8223 - dos? ( >=games-emulation/dosbox-0.74_p20160629 )
8224 - gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
8225 - mono? ( app-emulation/wine-mono:4.7.0 )
8226 - perl? (
8227 - dev-lang/perl
8228 - dev-perl/XML-Simple
8229 - )
8230 - pulseaudio? (
8231 - realtime? ( sys-auth/rtkit )
8232 - )
8233 - s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] )
8234 - samba? ( >=net-fs/samba-3.0.25[winbind] )
8235 - selinux? ( sec-policy/selinux-wine )
8236 - udisks? ( sys-fs/udisks:2 )"
8237 -
8238 -# tools/make_requests requires perl
8239 -DEPEND="${COMMON_DEPEND}
8240 - sys-devel/flex
8241 - >=sys-kernel/linux-headers-2.6
8242 - virtual/pkgconfig
8243 - virtual/yacc
8244 - X? (
8245 - x11-proto/inputproto
8246 - x11-proto/xextproto
8247 - x11-proto/xf86vidmodeproto
8248 - )
8249 - prelink? ( sys-devel/prelink )
8250 - staging? (
8251 - dev-lang/perl
8252 - dev-perl/XML-Simple
8253 - )
8254 - xinerama? ( x11-proto/xineramaproto )"
8255 -
8256 -# These use a non-standard "Wine" category, which is provided by
8257 -# /etc/xdg/applications-merged/wine.menu
8258 -QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
8259 -usr/share/applications/wine-notepad.desktop
8260 -usr/share/applications/wine-uninstaller.desktop
8261 -usr/share/applications/wine-winecfg.desktop"
8262 -
8263 -PATCHES=(
8264 - "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
8265 - "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
8266 - "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
8267 - "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
8268 - "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
8269 - "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
8270 -)
8271 -PATCHES_BIN=(
8272 - "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
8273 -)
8274 -
8275 -# https://bugs.gentoo.org/show_bug.cgi?id=635222
8276 -if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then
8277 - DEPEND+=" dev-util/patchbin"
8278 -fi
8279 -
8280 -wine_compiler_check() {
8281 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
8282 -
8283 - # GCC-specific bugs
8284 - if tc-is-gcc; then
8285 - # bug #549768
8286 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
8287 - ebegin "Checking for gcc-5 ms_abi compiler bug"
8288 - $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
8289 - # Run in subshell to prevent "Aborted" message
8290 - ( "${T}"/pr66838 || false ) >/dev/null 2>&1
8291 - if ! eend $?; then
8292 - eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
8293 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
8294 - eerror "or use gcc-config to select a different compiler version."
8295 - eerror "See https://bugs.gentoo.org/549768"
8296 - eerror
8297 - return 1
8298 - fi
8299 - fi
8300 - # bug #574044
8301 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
8302 - ebegin "Checking for gcc-5-3 stack realignment compiler bug"
8303 - # Compile in subshell to prevent "Aborted" message
8304 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
8305 - if ! eend $?; then
8306 - eerror "Wine cannot be built with this version of gcc-5.3"
8307 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
8308 - eerror "or use gcc-config to select a different compiler version."
8309 - eerror "See https://bugs.gentoo.org/574044"
8310 - eerror
8311 - return 1
8312 - fi
8313 - fi
8314 - fi
8315 -
8316 - # Ensure compiler support
8317 - if use abi_x86_64; then
8318 - ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
8319 - # Compile in subshell to prevent "Aborted" message
8320 - ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
8321 - if ! eend $?; then
8322 - eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
8323 - eerror
8324 - eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine"
8325 - eerror
8326 - return 1
8327 - fi
8328 - fi
8329 -}
8330 -
8331 -wine_build_environment_check() {
8332 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
8333 -
8334 - if use abi_x86_64; then
8335 - if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
8336 - eerror "You need gcc-4.4+ to compile 64-bit wine"
8337 - die
8338 - elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
8339 - eerror "You need clang-3.8+ to compile 64-bit wine"
8340 - die
8341 - fi
8342 - fi
8343 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
8344 - ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
8345 - ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
8346 - ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
8347 - fi
8348 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
8349 - if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
8350 - ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work"
8351 - ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
8352 - ewarn "See package.env in man 5 portage for more information on how to do this."
8353 - ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
8354 - fi
8355 - fi
8356 -
8357 - if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then
8358 - eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
8359 - eerror "See https://bugs.gentoo.org/487864 for more details."
8360 - eerror
8361 - return 1
8362 - fi
8363 -}
8364 -
8365 -wine_env_vcs_vars() {
8366 - local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
8367 - local pn_live_val="${pn_live_var}"
8368 - eval pn_live_val='$'${pn_live_val}
8369 - if [[ ! -z ${pn_live_val} ]]; then
8370 - if use staging; then
8371 - eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}"
8372 - eerror "cannot be used to set the commit. Instead, you may use the"
8373 - eerror "environmental variables WINE_COMMIT, and STAGING_COMMIT."
8374 - eerror
8375 - return 1
8376 - fi
8377 - fi
8378 - if [[ ! -z ${EGIT_COMMIT} ]]; then
8379 - eerror "Commits must now be specified using the environmental variables"
8380 - eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT"
8381 - eerror
8382 - return 1
8383 - fi
8384 -}
8385 -
8386 -pkg_pretend() {
8387 - wine_build_environment_check || die
8388 -
8389 - # Verify OSS support
8390 - if use oss && ! use kernel_FreeBSD; then
8391 - if ! has_version ">=media-sound/oss-4"; then
8392 - eerror "You cannot build wine with USE=oss without having support from a"
8393 - eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)"
8394 - eerror
8395 - die
8396 - fi
8397 - fi
8398 -}
8399 -
8400 -pkg_setup() {
8401 - wine_build_environment_check || die
8402 - wine_env_vcs_vars || die
8403 -
8404 - WINE_VARIANT="${PN#wine}-${PV}"
8405 - WINE_VARIANT="${WINE_VARIANT#-}"
8406 -
8407 - MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
8408 - MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
8409 - MY_DATADIR="${MY_DATAROOTDIR}"
8410 - MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
8411 - MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
8412 - MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
8413 - MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
8414 - MY_MANDIR="${MY_DATADIR}/man"
8415 -}
8416 -
8417 -src_unpack() {
8418 - if [[ ${PV} == "9999" ]] ; then
8419 - EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
8420 - if use staging; then
8421 - local CURRENT_WINE_COMMIT=${EGIT_VERSION}
8422 -
8423 - git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}"
8424 - git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}"
8425 -
8426 - local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die
8427 -
8428 - if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then
8429 - einfo "The current Staging patchset is not guaranteed to apply on this WINE commit."
8430 - einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT."
8431 - einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine"
8432 - fi
8433 - fi
8434 - fi
8435 -
8436 - default
8437 -
8438 - l10n_find_plocales_changes "${S}/po" "" ".po"
8439 -}
8440 -
8441 -src_prepare() {
8442 -
8443 - eapply_bin(){
8444 - local patch
8445 - for patch in ${PATCHES_BIN[@]}; do
8446 - patchbin --nogit < "${patch}" || die
8447 - done
8448 - }
8449 -
8450 - local md5="$(md5sum server/protocol.def)"
8451 -
8452 - if use staging; then
8453 - ewarn "Applying the Wine-Staging patchset. Any bug reports to the"
8454 - ewarn "Wine bugzilla should explicitly state that staging was used."
8455 -
8456 - local STAGING_EXCLUDE=""
8457 - STAGING_EXCLUDE="${STAGING_EXCLUDE} -W winhlp32-Flex_Workaround" # Avoid double patching https://bugs.winehq.org/show_bug.cgi?id=42132
8458 - use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
8459 -
8460 - # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches
8461 - ebegin "Running Wine-Staging patch installer"
8462 - (
8463 - set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE}
8464 - cd "${STAGING_DIR}/patches"
8465 - source "${STAGING_DIR}/patches/patchinstall.sh"
8466 - )
8467 - eend $? || die "Failed to apply Wine-Staging patches"
8468 - fi
8469 -
8470 - default
8471 - eapply_bin
8472 - eautoreconf
8473 -
8474 - # Modification of the server protocol requires regenerating the server requests
8475 - if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
8476 - einfo "server/protocol.def was patched; running tools/make_requests"
8477 - tools/make_requests || die #432348
8478 - fi
8479 - sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
8480 - if ! use run-exes; then
8481 - sed -i '/^MimeType/d' loader/wine.desktop || die #117785
8482 - fi
8483 -
8484 - # Edit wine.desktop to work for specific variant
8485 - sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
8486 -
8487 - # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
8488 - cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
8489 -
8490 - l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
8491 -}
8492 -
8493 -src_configure() {
8494 - wine_compiler_check || die
8495 -
8496 - export LDCONFIG=/bin/true
8497 - use custom-cflags || strip-flags
8498 -
8499 - multilib-minimal_src_configure
8500 -}
8501 -
8502 -multilib_src_configure() {
8503 - local myconf=(
8504 - --prefix="${MY_PREFIX}"
8505 - --datarootdir="${MY_DATAROOTDIR}"
8506 - --datadir="${MY_DATADIR}"
8507 - --docdir="${MY_DOCDIR}"
8508 - --includedir="${MY_INCLUDEDIR}"
8509 - --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
8510 - --libexecdir="${MY_LIBEXECDIR}"
8511 - --localstatedir="${MY_LOCALSTATEDIR}"
8512 - --mandir="${MY_MANDIR}"
8513 - --sysconfdir=/etc/wine
8514 - $(use_with alsa)
8515 - $(use_with capi)
8516 - $(use_with lcms cms)
8517 - $(use_with cups)
8518 - $(use_with ncurses curses)
8519 - $(use_with udisks dbus)
8520 - $(use_with fontconfig)
8521 - $(use_with ssl gnutls)
8522 - $(use_enable gecko mshtml)
8523 - $(use_with gphoto2 gphoto)
8524 - $(use_with gsm)
8525 - $(use_with gstreamer)
8526 - --without-hal
8527 - $(use_with jpeg)
8528 - $(use_with ldap)
8529 - $(use_enable mono mscoree)
8530 - $(use_with mp3 mpg123)
8531 - $(use_with netapi)
8532 - $(use_with nls gettext)
8533 - $(use_with openal)
8534 - $(use_with opencl)
8535 - $(use_with opengl)
8536 - $(use_with osmesa)
8537 - $(use_with oss)
8538 - $(use_with pcap)
8539 - $(use_with png)
8540 - $(use_with pulseaudio pulse)
8541 - $(use_with threads pthread)
8542 - $(use_with scanner sane)
8543 - $(use_enable test tests)
8544 - $(use_with truetype freetype)
8545 - $(use_with udev)
8546 - $(use_with v4l)
8547 - $(use_with X x)
8548 - $(use_with xcomposite)
8549 - $(use_with xinerama)
8550 - $(use_with xml)
8551 - $(use_with xml xslt)
8552 - )
8553 -
8554 - use staging && myconf+=(
8555 - --with-xattr
8556 - $(use_with themes gtk3)
8557 - $(use_with vaapi va)
8558 - )
8559 -
8560 - local PKG_CONFIG AR RANLIB
8561 - # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
8562 - # set AR and RANLIB to make QA scripts happy; #483342
8563 - tc-export PKG_CONFIG AR RANLIB
8564 -
8565 - if use amd64; then
8566 - if [[ ${ABI} == amd64 ]]; then
8567 - myconf+=( --enable-win64 )
8568 - else
8569 - myconf+=( --disable-win64 )
8570 - fi
8571 -
8572 - # Note: using --with-wine64 results in problems with multilib.eclass
8573 - # CC/LD hackery. We're using separate tools instead.
8574 - fi
8575 -
8576 - ECONF_SOURCE=${S} \
8577 - econf "${myconf[@]}"
8578 - emake depend
8579 -}
8580 -
8581 -multilib_src_test() {
8582 - # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
8583 - if [[ ${ABI} == x86 ]]; then
8584 - if [[ $(id -u) == 0 ]]; then
8585 - ewarn "Skipping tests since they cannot be run under the root user."
8586 - ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
8587 - return
8588 - fi
8589 -
8590 - WINEPREFIX="${T}/.wine-${ABI}" \
8591 - Xemake test
8592 - fi
8593 -}
8594 -
8595 -multilib_src_install_all() {
8596 - local DOCS=( ANNOUNCE AUTHORS README )
8597 - add_locale_docs() {
8598 - local locale_doc="documentation/README.$1"
8599 - [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
8600 - }
8601 - l10n_for_each_locale_do add_locale_docs
8602 -
8603 - einstalldocs
8604 - prune_libtool_files --all
8605 -
8606 - if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
8607 - rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
8608 - "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
8609 - fi
8610 -
8611 - # Remove wineconsole if neither backend is installed #551124
8612 - if ! use X && ! use ncurses; then
8613 - rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
8614 - rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
8615 - rm_wineconsole() {
8616 - rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
8617 - }
8618 - multilib_foreach_abi rm_wineconsole
8619 - fi
8620 -
8621 - use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
8622 - use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
8623 -
8624 - if use abi_x86_64 && ! use abi_x86_32; then
8625 - dosym wine64 "${MY_PREFIX}"/bin/wine # 404331
8626 - dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader
8627 - fi
8628 -
8629 - # Failglob for bin and man loops
8630 - local glob_state=$(shopt -p failglob)
8631 - shopt -s failglob
8632 -
8633 - # Make wrappers for binaries for handling multiple variants
8634 - # Note: wrappers instead of symlinks because some are shell which use basename
8635 - local b
8636 - for b in "${D%/}${MY_PREFIX}"/bin/*; do
8637 - make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
8638 - done
8639 -
8640 - # respect LINGUAS when installing man pages, #469418
8641 - local l
8642 - for l in de fr pl; do
8643 - use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}*
8644 - done
8645 -
8646 - eval "${glob_state}"
8647 -}
8648 -
8649 -pkg_postinst() {
8650 - eselect wine register ${P}
8651 - if [[ ${PN} == "wine-vanilla" ]]; then
8652 - eselect wine register --vanilla ${P} || die
8653 - else
8654 - if use staging; then
8655 - eselect wine register --staging ${P} || die
8656 - fi
8657 - fi
8658 -
8659 - eselect wine update --all --if-unset || die
8660 -
8661 - xdg_desktop_database_update
8662 -
8663 - if ! use gecko; then
8664 - ewarn "Without Wine Gecko, wine prefixes will not have a default"
8665 - ewarn "implementation of iexplore. Many older windows applications"
8666 - ewarn "rely upon the existence of an iexplore implementation, so"
8667 - ewarn "you will likely need to install an external one, like via winetricks"
8668 - fi
8669 - if ! use mono; then
8670 - ewarn "Without Wine Mono, wine prefixes will not have a default"
8671 - ewarn "implementation of .NET. Many windows applications rely upon"
8672 - ewarn "the existence of a .NET implementation, so you will likely need"
8673 - ewarn "to install an external one, like via winetricks"
8674 - fi
8675 -}
8676 -
8677 -pkg_prerm() {
8678 - eselect wine deregister ${P}
8679 - if [[ ${PN} == "wine-vanilla" ]]; then
8680 - eselect wine deregister --vanilla ${P} || die
8681 - else
8682 - if use staging; then
8683 - eselect wine deregister --staging ${P} || die
8684 - fi
8685 - fi
8686 -
8687 - eselect wine update --all --if-unset || die
8688 -}
8689 -
8690 -pkg_postrm() {
8691 - xdg_desktop_database_update
8692 -}
8693
8694 diff --git a/app-emulation/wine-staging/wine-staging-2.7-r1.ebuild b/app-emulation/wine-staging/wine-staging-2.7-r1.ebuild
8695 deleted file mode 100644
8696 index f4d14b26fc4..00000000000
8697 --- a/app-emulation/wine-staging/wine-staging-2.7-r1.ebuild
8698 +++ /dev/null
8699 @@ -1,607 +0,0 @@
8700 -# Copyright 1999-2017 Gentoo Foundation
8701 -# Distributed under the terms of the GNU General Public License v2
8702 -
8703 -EAPI=6
8704 -
8705 -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"
8706 -PLOCALE_BACKUP="en"
8707 -
8708 -inherit autotools eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils
8709 -
8710 -MY_PN="${PN%%-*}"
8711 -MY_P="${MY_PN}-${PV}"
8712 -
8713 -if [[ ${PV} == "9999" ]] ; then
8714 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
8715 - EGIT_BRANCH="master"
8716 - inherit git-r3
8717 - SRC_URI=""
8718 - #KEYWORDS=""
8719 -else
8720 - MAJOR_V=$(get_version_component_range 1)
8721 - SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
8722 - KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
8723 -fi
8724 -S="${WORKDIR}/${MY_P}"
8725 -
8726 -STAGING_P="wine-staging-${PV}"
8727 -STAGING_DIR="${WORKDIR}/${STAGING_P}"
8728 -GWP_V="20170830"
8729 -PATCHDIR="${WORKDIR}/gentoo-wine-patches"
8730 -
8731 -DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset"
8732 -HOMEPAGE="https://www.winehq.org/"
8733 -SRC_URI="${SRC_URI}
8734 - https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
8735 -"
8736 -
8737 -if [[ ${PV} == "9999" ]] ; then
8738 - STAGING_EGIT_REPO_URI="https://github.com/wine-compholio/wine-staging.git"
8739 -else
8740 - SRC_URI="${SRC_URI}
8741 - staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
8742 -fi
8743 -
8744 -LICENSE="LGPL-2.1"
8745 -SLOT="${PV}"
8746 -IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags 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"
8747 -REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
8748 - X? ( truetype )
8749 - elibc_glibc? ( threads )
8750 - osmesa? ( opengl )
8751 - pipelight? ( staging )
8752 - s3tc? ( staging )
8753 - test? ( abi_x86_32 )
8754 - themes? ( staging )
8755 - vaapi? ( staging )" # osmesa-opengl #286560 # X-truetype #551124
8756 -
8757 -# FIXME: the test suite is unsuitable for us; many tests require net access
8758 -# or fail due to Xvfb's opengl limitations.
8759 -RESTRICT="test"
8760 -
8761 -COMMON_DEPEND="
8762 - X? (
8763 - x11-libs/libXcursor[${MULTILIB_USEDEP}]
8764 - x11-libs/libXext[${MULTILIB_USEDEP}]
8765 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
8766 - x11-libs/libXi[${MULTILIB_USEDEP}]
8767 - x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
8768 - )
8769 - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
8770 - capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
8771 - cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
8772 - fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
8773 - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
8774 - gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
8775 - gstreamer? (
8776 - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
8777 - media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
8778 - )
8779 - jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
8780 - lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
8781 - ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
8782 - mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
8783 - ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] )
8784 - netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
8785 - nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
8786 - odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
8787 - openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
8788 - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
8789 - opengl? (
8790 - virtual/glu[${MULTILIB_USEDEP}]
8791 - virtual/opengl[${MULTILIB_USEDEP}]
8792 - )
8793 - osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] )
8794 - pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
8795 - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
8796 - pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
8797 - scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
8798 - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
8799 - staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
8800 - themes? (
8801 - dev-libs/glib:2[${MULTILIB_USEDEP}]
8802 - x11-libs/cairo[${MULTILIB_USEDEP}]
8803 - x11-libs/gtk+:3[${MULTILIB_USEDEP}]
8804 - )
8805 - truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
8806 - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
8807 - udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
8808 - v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
8809 - vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
8810 - xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
8811 - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
8812 - xml? (
8813 - dev-libs/libxml2[${MULTILIB_USEDEP}]
8814 - dev-libs/libxslt[${MULTILIB_USEDEP}]
8815 - )
8816 - abi_x86_32? (
8817 - !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
8818 - !<app-emulation/emul-linux-x86-baselibs-20140508-r14
8819 - !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
8820 - !<app-emulation/emul-linux-x86-db-20140508-r3
8821 - !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
8822 - !<app-emulation/emul-linux-x86-medialibs-20140508-r6
8823 - !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
8824 - !<app-emulation/emul-linux-x86-opengl-20140508-r1
8825 - !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
8826 - !<app-emulation/emul-linux-x86-sdl-20140508-r1
8827 - !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
8828 - !<app-emulation/emul-linux-x86-soundlibs-20140508
8829 - !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
8830 - !<app-emulation/emul-linux-x86-xlibs-20140508
8831 - )"
8832 -
8833 -RDEPEND="${COMMON_DEPEND}
8834 - app-emulation/wine-desktop-common
8835 - >app-eselect/eselect-wine-0.3
8836 - !app-emulation/wine:0
8837 - dos? ( >=games-emulation/dosbox-0.74_p20160629 )
8838 - gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
8839 - mono? ( app-emulation/wine-mono:4.7.0 )
8840 - perl? (
8841 - dev-lang/perl
8842 - dev-perl/XML-Simple
8843 - )
8844 - pulseaudio? (
8845 - realtime? ( sys-auth/rtkit )
8846 - )
8847 - s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] )
8848 - samba? ( >=net-fs/samba-3.0.25[winbind] )
8849 - selinux? ( sec-policy/selinux-wine )
8850 - udisks? ( sys-fs/udisks:2 )"
8851 -
8852 -# tools/make_requests requires perl
8853 -DEPEND="${COMMON_DEPEND}
8854 - sys-devel/flex
8855 - >=sys-kernel/linux-headers-2.6
8856 - virtual/pkgconfig
8857 - virtual/yacc
8858 - X? (
8859 - x11-proto/inputproto
8860 - x11-proto/xextproto
8861 - x11-proto/xf86vidmodeproto
8862 - )
8863 - prelink? ( sys-devel/prelink )
8864 - staging? (
8865 - dev-lang/perl
8866 - dev-perl/XML-Simple
8867 - )
8868 - xinerama? ( x11-proto/xineramaproto )"
8869 -
8870 -# These use a non-standard "Wine" category, which is provided by
8871 -# /etc/xdg/applications-merged/wine.menu
8872 -QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
8873 -usr/share/applications/wine-notepad.desktop
8874 -usr/share/applications/wine-uninstaller.desktop
8875 -usr/share/applications/wine-winecfg.desktop"
8876 -
8877 -PATCHES=(
8878 - "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
8879 - "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
8880 - "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
8881 - "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
8882 - "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
8883 - "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
8884 -)
8885 -PATCHES_BIN=(
8886 - "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
8887 -)
8888 -
8889 -# https://bugs.gentoo.org/show_bug.cgi?id=635222
8890 -if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then
8891 - DEPEND+=" dev-util/patchbin"
8892 -fi
8893 -
8894 -wine_compiler_check() {
8895 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
8896 -
8897 - # GCC-specific bugs
8898 - if tc-is-gcc; then
8899 - # bug #549768
8900 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
8901 - ebegin "Checking for gcc-5 ms_abi compiler bug"
8902 - $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
8903 - # Run in subshell to prevent "Aborted" message
8904 - ( "${T}"/pr66838 || false ) >/dev/null 2>&1
8905 - if ! eend $?; then
8906 - eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
8907 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
8908 - eerror "or use gcc-config to select a different compiler version."
8909 - eerror "See https://bugs.gentoo.org/549768"
8910 - eerror
8911 - return 1
8912 - fi
8913 - fi
8914 - # bug #574044
8915 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
8916 - ebegin "Checking for gcc-5-3 stack realignment compiler bug"
8917 - # Compile in subshell to prevent "Aborted" message
8918 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
8919 - if ! eend $?; then
8920 - eerror "Wine cannot be built with this version of gcc-5.3"
8921 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
8922 - eerror "or use gcc-config to select a different compiler version."
8923 - eerror "See https://bugs.gentoo.org/574044"
8924 - eerror
8925 - return 1
8926 - fi
8927 - fi
8928 - fi
8929 -
8930 - # Ensure compiler support
8931 - if use abi_x86_64; then
8932 - ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
8933 - # Compile in subshell to prevent "Aborted" message
8934 - ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
8935 - if ! eend $?; then
8936 - eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
8937 - eerror
8938 - eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine"
8939 - eerror
8940 - return 1
8941 - fi
8942 - fi
8943 -}
8944 -
8945 -wine_build_environment_check() {
8946 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
8947 -
8948 - if use abi_x86_64; then
8949 - if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
8950 - eerror "You need gcc-4.4+ to compile 64-bit wine"
8951 - die
8952 - elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
8953 - eerror "You need clang-3.8+ to compile 64-bit wine"
8954 - die
8955 - fi
8956 - fi
8957 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
8958 - ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
8959 - ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
8960 - ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
8961 - fi
8962 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
8963 - if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
8964 - ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work"
8965 - ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
8966 - ewarn "See package.env in man 5 portage for more information on how to do this."
8967 - ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
8968 - fi
8969 - fi
8970 -
8971 - if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then
8972 - eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
8973 - eerror "See https://bugs.gentoo.org/487864 for more details."
8974 - eerror
8975 - return 1
8976 - fi
8977 -}
8978 -
8979 -wine_env_vcs_vars() {
8980 - local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
8981 - local pn_live_val="${pn_live_var}"
8982 - eval pn_live_val='$'${pn_live_val}
8983 - if [[ ! -z ${pn_live_val} ]]; then
8984 - if use staging; then
8985 - eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}"
8986 - eerror "cannot be used to set the commit. Instead, you may use the"
8987 - eerror "environmental variables WINE_COMMIT, and STAGING_COMMIT."
8988 - eerror
8989 - return 1
8990 - fi
8991 - fi
8992 - if [[ ! -z ${EGIT_COMMIT} ]]; then
8993 - eerror "Commits must now be specified using the environmental variables"
8994 - eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT"
8995 - eerror
8996 - return 1
8997 - fi
8998 -}
8999 -
9000 -pkg_pretend() {
9001 - wine_build_environment_check || die
9002 -
9003 - # Verify OSS support
9004 - if use oss && ! use kernel_FreeBSD; then
9005 - if ! has_version ">=media-sound/oss-4"; then
9006 - eerror "You cannot build wine with USE=oss without having support from a"
9007 - eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)"
9008 - eerror
9009 - die
9010 - fi
9011 - fi
9012 -}
9013 -
9014 -pkg_setup() {
9015 - wine_build_environment_check || die
9016 - wine_env_vcs_vars || die
9017 -
9018 - WINE_VARIANT="${PN#wine}-${PV}"
9019 - WINE_VARIANT="${WINE_VARIANT#-}"
9020 -
9021 - MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
9022 - MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
9023 - MY_DATADIR="${MY_DATAROOTDIR}"
9024 - MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
9025 - MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
9026 - MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
9027 - MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
9028 - MY_MANDIR="${MY_DATADIR}/man"
9029 -}
9030 -
9031 -src_unpack() {
9032 - if [[ ${PV} == "9999" ]] ; then
9033 - EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
9034 - if use staging; then
9035 - local CURRENT_WINE_COMMIT=${EGIT_VERSION}
9036 -
9037 - git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}"
9038 - git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}"
9039 -
9040 - local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die
9041 -
9042 - if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then
9043 - einfo "The current Staging patchset is not guaranteed to apply on this WINE commit."
9044 - einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT."
9045 - einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine"
9046 - fi
9047 - fi
9048 - fi
9049 -
9050 - default
9051 -
9052 - l10n_find_plocales_changes "${S}/po" "" ".po"
9053 -}
9054 -
9055 -src_prepare() {
9056 -
9057 - eapply_bin(){
9058 - local patch
9059 - for patch in ${PATCHES_BIN[@]}; do
9060 - patchbin --nogit < "${patch}" || die
9061 - done
9062 - }
9063 -
9064 - local md5="$(md5sum server/protocol.def)"
9065 -
9066 - if use staging; then
9067 - ewarn "Applying the Wine-Staging patchset. Any bug reports to the"
9068 - ewarn "Wine bugzilla should explicitly state that staging was used."
9069 -
9070 - local STAGING_EXCLUDE=""
9071 - STAGING_EXCLUDE="${STAGING_EXCLUDE} -W winhlp32-Flex_Workaround" # Avoid double patching https://bugs.winehq.org/show_bug.cgi?id=42132
9072 - use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
9073 -
9074 - # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches
9075 - ebegin "Running Wine-Staging patch installer"
9076 - (
9077 - set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE}
9078 - cd "${STAGING_DIR}/patches"
9079 - source "${STAGING_DIR}/patches/patchinstall.sh"
9080 - )
9081 - eend $? || die "Failed to apply Wine-Staging patches"
9082 - fi
9083 -
9084 - default
9085 - eapply_bin
9086 - eautoreconf
9087 -
9088 - # Modification of the server protocol requires regenerating the server requests
9089 - if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
9090 - einfo "server/protocol.def was patched; running tools/make_requests"
9091 - tools/make_requests || die #432348
9092 - fi
9093 - sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
9094 - if ! use run-exes; then
9095 - sed -i '/^MimeType/d' loader/wine.desktop || die #117785
9096 - fi
9097 -
9098 - # Edit wine.desktop to work for specific variant
9099 - sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
9100 -
9101 - # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
9102 - cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
9103 -
9104 - l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
9105 -}
9106 -
9107 -src_configure() {
9108 - wine_compiler_check || die
9109 -
9110 - export LDCONFIG=/bin/true
9111 - use custom-cflags || strip-flags
9112 -
9113 - multilib-minimal_src_configure
9114 -}
9115 -
9116 -multilib_src_configure() {
9117 - local myconf=(
9118 - --prefix="${MY_PREFIX}"
9119 - --datarootdir="${MY_DATAROOTDIR}"
9120 - --datadir="${MY_DATADIR}"
9121 - --docdir="${MY_DOCDIR}"
9122 - --includedir="${MY_INCLUDEDIR}"
9123 - --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
9124 - --libexecdir="${MY_LIBEXECDIR}"
9125 - --localstatedir="${MY_LOCALSTATEDIR}"
9126 - --mandir="${MY_MANDIR}"
9127 - --sysconfdir=/etc/wine
9128 - $(use_with alsa)
9129 - $(use_with capi)
9130 - $(use_with lcms cms)
9131 - $(use_with cups)
9132 - $(use_with ncurses curses)
9133 - $(use_with udisks dbus)
9134 - $(use_with fontconfig)
9135 - $(use_with ssl gnutls)
9136 - $(use_enable gecko mshtml)
9137 - $(use_with gphoto2 gphoto)
9138 - $(use_with gsm)
9139 - $(use_with gstreamer)
9140 - --without-hal
9141 - $(use_with jpeg)
9142 - $(use_with ldap)
9143 - $(use_enable mono mscoree)
9144 - $(use_with mp3 mpg123)
9145 - $(use_with netapi)
9146 - $(use_with nls gettext)
9147 - $(use_with openal)
9148 - $(use_with opencl)
9149 - $(use_with opengl)
9150 - $(use_with osmesa)
9151 - $(use_with oss)
9152 - $(use_with pcap)
9153 - $(use_with png)
9154 - $(use_with pulseaudio pulse)
9155 - $(use_with threads pthread)
9156 - $(use_with scanner sane)
9157 - $(use_enable test tests)
9158 - $(use_with truetype freetype)
9159 - $(use_with udev)
9160 - $(use_with v4l)
9161 - $(use_with X x)
9162 - $(use_with xcomposite)
9163 - $(use_with xinerama)
9164 - $(use_with xml)
9165 - $(use_with xml xslt)
9166 - )
9167 -
9168 - use staging && myconf+=(
9169 - --with-xattr
9170 - $(use_with themes gtk3)
9171 - $(use_with vaapi va)
9172 - )
9173 -
9174 - local PKG_CONFIG AR RANLIB
9175 - # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
9176 - # set AR and RANLIB to make QA scripts happy; #483342
9177 - tc-export PKG_CONFIG AR RANLIB
9178 -
9179 - if use amd64; then
9180 - if [[ ${ABI} == amd64 ]]; then
9181 - myconf+=( --enable-win64 )
9182 - else
9183 - myconf+=( --disable-win64 )
9184 - fi
9185 -
9186 - # Note: using --with-wine64 results in problems with multilib.eclass
9187 - # CC/LD hackery. We're using separate tools instead.
9188 - fi
9189 -
9190 - ECONF_SOURCE=${S} \
9191 - econf "${myconf[@]}"
9192 - emake depend
9193 -}
9194 -
9195 -multilib_src_test() {
9196 - # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
9197 - if [[ ${ABI} == x86 ]]; then
9198 - if [[ $(id -u) == 0 ]]; then
9199 - ewarn "Skipping tests since they cannot be run under the root user."
9200 - ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
9201 - return
9202 - fi
9203 -
9204 - WINEPREFIX="${T}/.wine-${ABI}" \
9205 - Xemake test
9206 - fi
9207 -}
9208 -
9209 -multilib_src_install_all() {
9210 - local DOCS=( ANNOUNCE AUTHORS README )
9211 - add_locale_docs() {
9212 - local locale_doc="documentation/README.$1"
9213 - [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
9214 - }
9215 - l10n_for_each_locale_do add_locale_docs
9216 -
9217 - einstalldocs
9218 - prune_libtool_files --all
9219 -
9220 - if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
9221 - rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
9222 - "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
9223 - fi
9224 -
9225 - # Remove wineconsole if neither backend is installed #551124
9226 - if ! use X && ! use ncurses; then
9227 - rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
9228 - rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
9229 - rm_wineconsole() {
9230 - rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
9231 - }
9232 - multilib_foreach_abi rm_wineconsole
9233 - fi
9234 -
9235 - use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
9236 - use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
9237 -
9238 - if use abi_x86_64 && ! use abi_x86_32; then
9239 - dosym wine64 "${MY_PREFIX}"/bin/wine # 404331
9240 - dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader
9241 - fi
9242 -
9243 - # Failglob for bin and man loops
9244 - local glob_state=$(shopt -p failglob)
9245 - shopt -s failglob
9246 -
9247 - # Make wrappers for binaries for handling multiple variants
9248 - # Note: wrappers instead of symlinks because some are shell which use basename
9249 - local b
9250 - for b in "${D%/}${MY_PREFIX}"/bin/*; do
9251 - make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
9252 - done
9253 -
9254 - # respect LINGUAS when installing man pages, #469418
9255 - local l
9256 - for l in de fr pl; do
9257 - use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}*
9258 - done
9259 -
9260 - eval "${glob_state}"
9261 -}
9262 -
9263 -pkg_postinst() {
9264 - eselect wine register ${P}
9265 - if [[ ${PN} == "wine-vanilla" ]]; then
9266 - eselect wine register --vanilla ${P} || die
9267 - else
9268 - if use staging; then
9269 - eselect wine register --staging ${P} || die
9270 - fi
9271 - fi
9272 -
9273 - eselect wine update --all --if-unset || die
9274 -
9275 - xdg_desktop_database_update
9276 -
9277 - if ! use gecko; then
9278 - ewarn "Without Wine Gecko, wine prefixes will not have a default"
9279 - ewarn "implementation of iexplore. Many older windows applications"
9280 - ewarn "rely upon the existence of an iexplore implementation, so"
9281 - ewarn "you will likely need to install an external one, like via winetricks"
9282 - fi
9283 - if ! use mono; then
9284 - ewarn "Without Wine Mono, wine prefixes will not have a default"
9285 - ewarn "implementation of .NET. Many windows applications rely upon"
9286 - ewarn "the existence of a .NET implementation, so you will likely need"
9287 - ewarn "to install an external one, like via winetricks"
9288 - fi
9289 -}
9290 -
9291 -pkg_prerm() {
9292 - eselect wine deregister ${P}
9293 - if [[ ${PN} == "wine-vanilla" ]]; then
9294 - eselect wine deregister --vanilla ${P} || die
9295 - else
9296 - if use staging; then
9297 - eselect wine deregister --staging ${P} || die
9298 - fi
9299 - fi
9300 -
9301 - eselect wine update --all --if-unset || die
9302 -}
9303 -
9304 -pkg_postrm() {
9305 - xdg_desktop_database_update
9306 -}
9307
9308 diff --git a/app-emulation/wine-staging/wine-staging-2.8-r1.ebuild b/app-emulation/wine-staging/wine-staging-2.8-r1.ebuild
9309 deleted file mode 100644
9310 index f4d14b26fc4..00000000000
9311 --- a/app-emulation/wine-staging/wine-staging-2.8-r1.ebuild
9312 +++ /dev/null
9313 @@ -1,607 +0,0 @@
9314 -# Copyright 1999-2017 Gentoo Foundation
9315 -# Distributed under the terms of the GNU General Public License v2
9316 -
9317 -EAPI=6
9318 -
9319 -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"
9320 -PLOCALE_BACKUP="en"
9321 -
9322 -inherit autotools eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils
9323 -
9324 -MY_PN="${PN%%-*}"
9325 -MY_P="${MY_PN}-${PV}"
9326 -
9327 -if [[ ${PV} == "9999" ]] ; then
9328 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
9329 - EGIT_BRANCH="master"
9330 - inherit git-r3
9331 - SRC_URI=""
9332 - #KEYWORDS=""
9333 -else
9334 - MAJOR_V=$(get_version_component_range 1)
9335 - SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
9336 - KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
9337 -fi
9338 -S="${WORKDIR}/${MY_P}"
9339 -
9340 -STAGING_P="wine-staging-${PV}"
9341 -STAGING_DIR="${WORKDIR}/${STAGING_P}"
9342 -GWP_V="20170830"
9343 -PATCHDIR="${WORKDIR}/gentoo-wine-patches"
9344 -
9345 -DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset"
9346 -HOMEPAGE="https://www.winehq.org/"
9347 -SRC_URI="${SRC_URI}
9348 - https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
9349 -"
9350 -
9351 -if [[ ${PV} == "9999" ]] ; then
9352 - STAGING_EGIT_REPO_URI="https://github.com/wine-compholio/wine-staging.git"
9353 -else
9354 - SRC_URI="${SRC_URI}
9355 - staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
9356 -fi
9357 -
9358 -LICENSE="LGPL-2.1"
9359 -SLOT="${PV}"
9360 -IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags 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"
9361 -REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
9362 - X? ( truetype )
9363 - elibc_glibc? ( threads )
9364 - osmesa? ( opengl )
9365 - pipelight? ( staging )
9366 - s3tc? ( staging )
9367 - test? ( abi_x86_32 )
9368 - themes? ( staging )
9369 - vaapi? ( staging )" # osmesa-opengl #286560 # X-truetype #551124
9370 -
9371 -# FIXME: the test suite is unsuitable for us; many tests require net access
9372 -# or fail due to Xvfb's opengl limitations.
9373 -RESTRICT="test"
9374 -
9375 -COMMON_DEPEND="
9376 - X? (
9377 - x11-libs/libXcursor[${MULTILIB_USEDEP}]
9378 - x11-libs/libXext[${MULTILIB_USEDEP}]
9379 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
9380 - x11-libs/libXi[${MULTILIB_USEDEP}]
9381 - x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
9382 - )
9383 - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
9384 - capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
9385 - cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
9386 - fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
9387 - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
9388 - gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
9389 - gstreamer? (
9390 - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
9391 - media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
9392 - )
9393 - jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
9394 - lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
9395 - ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
9396 - mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
9397 - ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] )
9398 - netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
9399 - nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
9400 - odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
9401 - openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
9402 - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
9403 - opengl? (
9404 - virtual/glu[${MULTILIB_USEDEP}]
9405 - virtual/opengl[${MULTILIB_USEDEP}]
9406 - )
9407 - osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] )
9408 - pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
9409 - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
9410 - pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
9411 - scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
9412 - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
9413 - staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
9414 - themes? (
9415 - dev-libs/glib:2[${MULTILIB_USEDEP}]
9416 - x11-libs/cairo[${MULTILIB_USEDEP}]
9417 - x11-libs/gtk+:3[${MULTILIB_USEDEP}]
9418 - )
9419 - truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
9420 - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
9421 - udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
9422 - v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
9423 - vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
9424 - xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
9425 - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
9426 - xml? (
9427 - dev-libs/libxml2[${MULTILIB_USEDEP}]
9428 - dev-libs/libxslt[${MULTILIB_USEDEP}]
9429 - )
9430 - abi_x86_32? (
9431 - !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
9432 - !<app-emulation/emul-linux-x86-baselibs-20140508-r14
9433 - !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
9434 - !<app-emulation/emul-linux-x86-db-20140508-r3
9435 - !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
9436 - !<app-emulation/emul-linux-x86-medialibs-20140508-r6
9437 - !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
9438 - !<app-emulation/emul-linux-x86-opengl-20140508-r1
9439 - !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
9440 - !<app-emulation/emul-linux-x86-sdl-20140508-r1
9441 - !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
9442 - !<app-emulation/emul-linux-x86-soundlibs-20140508
9443 - !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
9444 - !<app-emulation/emul-linux-x86-xlibs-20140508
9445 - )"
9446 -
9447 -RDEPEND="${COMMON_DEPEND}
9448 - app-emulation/wine-desktop-common
9449 - >app-eselect/eselect-wine-0.3
9450 - !app-emulation/wine:0
9451 - dos? ( >=games-emulation/dosbox-0.74_p20160629 )
9452 - gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
9453 - mono? ( app-emulation/wine-mono:4.7.0 )
9454 - perl? (
9455 - dev-lang/perl
9456 - dev-perl/XML-Simple
9457 - )
9458 - pulseaudio? (
9459 - realtime? ( sys-auth/rtkit )
9460 - )
9461 - s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] )
9462 - samba? ( >=net-fs/samba-3.0.25[winbind] )
9463 - selinux? ( sec-policy/selinux-wine )
9464 - udisks? ( sys-fs/udisks:2 )"
9465 -
9466 -# tools/make_requests requires perl
9467 -DEPEND="${COMMON_DEPEND}
9468 - sys-devel/flex
9469 - >=sys-kernel/linux-headers-2.6
9470 - virtual/pkgconfig
9471 - virtual/yacc
9472 - X? (
9473 - x11-proto/inputproto
9474 - x11-proto/xextproto
9475 - x11-proto/xf86vidmodeproto
9476 - )
9477 - prelink? ( sys-devel/prelink )
9478 - staging? (
9479 - dev-lang/perl
9480 - dev-perl/XML-Simple
9481 - )
9482 - xinerama? ( x11-proto/xineramaproto )"
9483 -
9484 -# These use a non-standard "Wine" category, which is provided by
9485 -# /etc/xdg/applications-merged/wine.menu
9486 -QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
9487 -usr/share/applications/wine-notepad.desktop
9488 -usr/share/applications/wine-uninstaller.desktop
9489 -usr/share/applications/wine-winecfg.desktop"
9490 -
9491 -PATCHES=(
9492 - "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
9493 - "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
9494 - "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
9495 - "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
9496 - "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
9497 - "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
9498 -)
9499 -PATCHES_BIN=(
9500 - "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
9501 -)
9502 -
9503 -# https://bugs.gentoo.org/show_bug.cgi?id=635222
9504 -if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then
9505 - DEPEND+=" dev-util/patchbin"
9506 -fi
9507 -
9508 -wine_compiler_check() {
9509 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
9510 -
9511 - # GCC-specific bugs
9512 - if tc-is-gcc; then
9513 - # bug #549768
9514 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
9515 - ebegin "Checking for gcc-5 ms_abi compiler bug"
9516 - $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
9517 - # Run in subshell to prevent "Aborted" message
9518 - ( "${T}"/pr66838 || false ) >/dev/null 2>&1
9519 - if ! eend $?; then
9520 - eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
9521 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
9522 - eerror "or use gcc-config to select a different compiler version."
9523 - eerror "See https://bugs.gentoo.org/549768"
9524 - eerror
9525 - return 1
9526 - fi
9527 - fi
9528 - # bug #574044
9529 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
9530 - ebegin "Checking for gcc-5-3 stack realignment compiler bug"
9531 - # Compile in subshell to prevent "Aborted" message
9532 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
9533 - if ! eend $?; then
9534 - eerror "Wine cannot be built with this version of gcc-5.3"
9535 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
9536 - eerror "or use gcc-config to select a different compiler version."
9537 - eerror "See https://bugs.gentoo.org/574044"
9538 - eerror
9539 - return 1
9540 - fi
9541 - fi
9542 - fi
9543 -
9544 - # Ensure compiler support
9545 - if use abi_x86_64; then
9546 - ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
9547 - # Compile in subshell to prevent "Aborted" message
9548 - ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
9549 - if ! eend $?; then
9550 - eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
9551 - eerror
9552 - eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine"
9553 - eerror
9554 - return 1
9555 - fi
9556 - fi
9557 -}
9558 -
9559 -wine_build_environment_check() {
9560 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
9561 -
9562 - if use abi_x86_64; then
9563 - if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
9564 - eerror "You need gcc-4.4+ to compile 64-bit wine"
9565 - die
9566 - elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
9567 - eerror "You need clang-3.8+ to compile 64-bit wine"
9568 - die
9569 - fi
9570 - fi
9571 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
9572 - ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
9573 - ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
9574 - ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
9575 - fi
9576 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
9577 - if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
9578 - ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work"
9579 - ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
9580 - ewarn "See package.env in man 5 portage for more information on how to do this."
9581 - ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
9582 - fi
9583 - fi
9584 -
9585 - if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then
9586 - eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
9587 - eerror "See https://bugs.gentoo.org/487864 for more details."
9588 - eerror
9589 - return 1
9590 - fi
9591 -}
9592 -
9593 -wine_env_vcs_vars() {
9594 - local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
9595 - local pn_live_val="${pn_live_var}"
9596 - eval pn_live_val='$'${pn_live_val}
9597 - if [[ ! -z ${pn_live_val} ]]; then
9598 - if use staging; then
9599 - eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}"
9600 - eerror "cannot be used to set the commit. Instead, you may use the"
9601 - eerror "environmental variables WINE_COMMIT, and STAGING_COMMIT."
9602 - eerror
9603 - return 1
9604 - fi
9605 - fi
9606 - if [[ ! -z ${EGIT_COMMIT} ]]; then
9607 - eerror "Commits must now be specified using the environmental variables"
9608 - eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT"
9609 - eerror
9610 - return 1
9611 - fi
9612 -}
9613 -
9614 -pkg_pretend() {
9615 - wine_build_environment_check || die
9616 -
9617 - # Verify OSS support
9618 - if use oss && ! use kernel_FreeBSD; then
9619 - if ! has_version ">=media-sound/oss-4"; then
9620 - eerror "You cannot build wine with USE=oss without having support from a"
9621 - eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)"
9622 - eerror
9623 - die
9624 - fi
9625 - fi
9626 -}
9627 -
9628 -pkg_setup() {
9629 - wine_build_environment_check || die
9630 - wine_env_vcs_vars || die
9631 -
9632 - WINE_VARIANT="${PN#wine}-${PV}"
9633 - WINE_VARIANT="${WINE_VARIANT#-}"
9634 -
9635 - MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
9636 - MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
9637 - MY_DATADIR="${MY_DATAROOTDIR}"
9638 - MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
9639 - MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
9640 - MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
9641 - MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
9642 - MY_MANDIR="${MY_DATADIR}/man"
9643 -}
9644 -
9645 -src_unpack() {
9646 - if [[ ${PV} == "9999" ]] ; then
9647 - EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
9648 - if use staging; then
9649 - local CURRENT_WINE_COMMIT=${EGIT_VERSION}
9650 -
9651 - git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}"
9652 - git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}"
9653 -
9654 - local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die
9655 -
9656 - if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then
9657 - einfo "The current Staging patchset is not guaranteed to apply on this WINE commit."
9658 - einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT."
9659 - einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine"
9660 - fi
9661 - fi
9662 - fi
9663 -
9664 - default
9665 -
9666 - l10n_find_plocales_changes "${S}/po" "" ".po"
9667 -}
9668 -
9669 -src_prepare() {
9670 -
9671 - eapply_bin(){
9672 - local patch
9673 - for patch in ${PATCHES_BIN[@]}; do
9674 - patchbin --nogit < "${patch}" || die
9675 - done
9676 - }
9677 -
9678 - local md5="$(md5sum server/protocol.def)"
9679 -
9680 - if use staging; then
9681 - ewarn "Applying the Wine-Staging patchset. Any bug reports to the"
9682 - ewarn "Wine bugzilla should explicitly state that staging was used."
9683 -
9684 - local STAGING_EXCLUDE=""
9685 - STAGING_EXCLUDE="${STAGING_EXCLUDE} -W winhlp32-Flex_Workaround" # Avoid double patching https://bugs.winehq.org/show_bug.cgi?id=42132
9686 - use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
9687 -
9688 - # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches
9689 - ebegin "Running Wine-Staging patch installer"
9690 - (
9691 - set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE}
9692 - cd "${STAGING_DIR}/patches"
9693 - source "${STAGING_DIR}/patches/patchinstall.sh"
9694 - )
9695 - eend $? || die "Failed to apply Wine-Staging patches"
9696 - fi
9697 -
9698 - default
9699 - eapply_bin
9700 - eautoreconf
9701 -
9702 - # Modification of the server protocol requires regenerating the server requests
9703 - if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
9704 - einfo "server/protocol.def was patched; running tools/make_requests"
9705 - tools/make_requests || die #432348
9706 - fi
9707 - sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
9708 - if ! use run-exes; then
9709 - sed -i '/^MimeType/d' loader/wine.desktop || die #117785
9710 - fi
9711 -
9712 - # Edit wine.desktop to work for specific variant
9713 - sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
9714 -
9715 - # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
9716 - cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
9717 -
9718 - l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
9719 -}
9720 -
9721 -src_configure() {
9722 - wine_compiler_check || die
9723 -
9724 - export LDCONFIG=/bin/true
9725 - use custom-cflags || strip-flags
9726 -
9727 - multilib-minimal_src_configure
9728 -}
9729 -
9730 -multilib_src_configure() {
9731 - local myconf=(
9732 - --prefix="${MY_PREFIX}"
9733 - --datarootdir="${MY_DATAROOTDIR}"
9734 - --datadir="${MY_DATADIR}"
9735 - --docdir="${MY_DOCDIR}"
9736 - --includedir="${MY_INCLUDEDIR}"
9737 - --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
9738 - --libexecdir="${MY_LIBEXECDIR}"
9739 - --localstatedir="${MY_LOCALSTATEDIR}"
9740 - --mandir="${MY_MANDIR}"
9741 - --sysconfdir=/etc/wine
9742 - $(use_with alsa)
9743 - $(use_with capi)
9744 - $(use_with lcms cms)
9745 - $(use_with cups)
9746 - $(use_with ncurses curses)
9747 - $(use_with udisks dbus)
9748 - $(use_with fontconfig)
9749 - $(use_with ssl gnutls)
9750 - $(use_enable gecko mshtml)
9751 - $(use_with gphoto2 gphoto)
9752 - $(use_with gsm)
9753 - $(use_with gstreamer)
9754 - --without-hal
9755 - $(use_with jpeg)
9756 - $(use_with ldap)
9757 - $(use_enable mono mscoree)
9758 - $(use_with mp3 mpg123)
9759 - $(use_with netapi)
9760 - $(use_with nls gettext)
9761 - $(use_with openal)
9762 - $(use_with opencl)
9763 - $(use_with opengl)
9764 - $(use_with osmesa)
9765 - $(use_with oss)
9766 - $(use_with pcap)
9767 - $(use_with png)
9768 - $(use_with pulseaudio pulse)
9769 - $(use_with threads pthread)
9770 - $(use_with scanner sane)
9771 - $(use_enable test tests)
9772 - $(use_with truetype freetype)
9773 - $(use_with udev)
9774 - $(use_with v4l)
9775 - $(use_with X x)
9776 - $(use_with xcomposite)
9777 - $(use_with xinerama)
9778 - $(use_with xml)
9779 - $(use_with xml xslt)
9780 - )
9781 -
9782 - use staging && myconf+=(
9783 - --with-xattr
9784 - $(use_with themes gtk3)
9785 - $(use_with vaapi va)
9786 - )
9787 -
9788 - local PKG_CONFIG AR RANLIB
9789 - # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
9790 - # set AR and RANLIB to make QA scripts happy; #483342
9791 - tc-export PKG_CONFIG AR RANLIB
9792 -
9793 - if use amd64; then
9794 - if [[ ${ABI} == amd64 ]]; then
9795 - myconf+=( --enable-win64 )
9796 - else
9797 - myconf+=( --disable-win64 )
9798 - fi
9799 -
9800 - # Note: using --with-wine64 results in problems with multilib.eclass
9801 - # CC/LD hackery. We're using separate tools instead.
9802 - fi
9803 -
9804 - ECONF_SOURCE=${S} \
9805 - econf "${myconf[@]}"
9806 - emake depend
9807 -}
9808 -
9809 -multilib_src_test() {
9810 - # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
9811 - if [[ ${ABI} == x86 ]]; then
9812 - if [[ $(id -u) == 0 ]]; then
9813 - ewarn "Skipping tests since they cannot be run under the root user."
9814 - ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
9815 - return
9816 - fi
9817 -
9818 - WINEPREFIX="${T}/.wine-${ABI}" \
9819 - Xemake test
9820 - fi
9821 -}
9822 -
9823 -multilib_src_install_all() {
9824 - local DOCS=( ANNOUNCE AUTHORS README )
9825 - add_locale_docs() {
9826 - local locale_doc="documentation/README.$1"
9827 - [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
9828 - }
9829 - l10n_for_each_locale_do add_locale_docs
9830 -
9831 - einstalldocs
9832 - prune_libtool_files --all
9833 -
9834 - if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
9835 - rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
9836 - "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
9837 - fi
9838 -
9839 - # Remove wineconsole if neither backend is installed #551124
9840 - if ! use X && ! use ncurses; then
9841 - rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
9842 - rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
9843 - rm_wineconsole() {
9844 - rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
9845 - }
9846 - multilib_foreach_abi rm_wineconsole
9847 - fi
9848 -
9849 - use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
9850 - use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
9851 -
9852 - if use abi_x86_64 && ! use abi_x86_32; then
9853 - dosym wine64 "${MY_PREFIX}"/bin/wine # 404331
9854 - dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader
9855 - fi
9856 -
9857 - # Failglob for bin and man loops
9858 - local glob_state=$(shopt -p failglob)
9859 - shopt -s failglob
9860 -
9861 - # Make wrappers for binaries for handling multiple variants
9862 - # Note: wrappers instead of symlinks because some are shell which use basename
9863 - local b
9864 - for b in "${D%/}${MY_PREFIX}"/bin/*; do
9865 - make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
9866 - done
9867 -
9868 - # respect LINGUAS when installing man pages, #469418
9869 - local l
9870 - for l in de fr pl; do
9871 - use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}*
9872 - done
9873 -
9874 - eval "${glob_state}"
9875 -}
9876 -
9877 -pkg_postinst() {
9878 - eselect wine register ${P}
9879 - if [[ ${PN} == "wine-vanilla" ]]; then
9880 - eselect wine register --vanilla ${P} || die
9881 - else
9882 - if use staging; then
9883 - eselect wine register --staging ${P} || die
9884 - fi
9885 - fi
9886 -
9887 - eselect wine update --all --if-unset || die
9888 -
9889 - xdg_desktop_database_update
9890 -
9891 - if ! use gecko; then
9892 - ewarn "Without Wine Gecko, wine prefixes will not have a default"
9893 - ewarn "implementation of iexplore. Many older windows applications"
9894 - ewarn "rely upon the existence of an iexplore implementation, so"
9895 - ewarn "you will likely need to install an external one, like via winetricks"
9896 - fi
9897 - if ! use mono; then
9898 - ewarn "Without Wine Mono, wine prefixes will not have a default"
9899 - ewarn "implementation of .NET. Many windows applications rely upon"
9900 - ewarn "the existence of a .NET implementation, so you will likely need"
9901 - ewarn "to install an external one, like via winetricks"
9902 - fi
9903 -}
9904 -
9905 -pkg_prerm() {
9906 - eselect wine deregister ${P}
9907 - if [[ ${PN} == "wine-vanilla" ]]; then
9908 - eselect wine deregister --vanilla ${P} || die
9909 - else
9910 - if use staging; then
9911 - eselect wine deregister --staging ${P} || die
9912 - fi
9913 - fi
9914 -
9915 - eselect wine update --all --if-unset || die
9916 -}
9917 -
9918 -pkg_postrm() {
9919 - xdg_desktop_database_update
9920 -}
9921
9922 diff --git a/app-emulation/wine-staging/wine-staging-2.9-r1.ebuild b/app-emulation/wine-staging/wine-staging-2.9-r1.ebuild
9923 deleted file mode 100644
9924 index b119a5cd863..00000000000
9925 --- a/app-emulation/wine-staging/wine-staging-2.9-r1.ebuild
9926 +++ /dev/null
9927 @@ -1,609 +0,0 @@
9928 -# Copyright 1999-2017 Gentoo Foundation
9929 -# Distributed under the terms of the GNU General Public License v2
9930 -
9931 -EAPI=6
9932 -
9933 -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"
9934 -PLOCALE_BACKUP="en"
9935 -
9936 -inherit autotools eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils
9937 -
9938 -MY_PN="${PN%%-*}"
9939 -MY_P="${MY_PN}-${PV}"
9940 -
9941 -if [[ ${PV} == "9999" ]] ; then
9942 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
9943 - EGIT_BRANCH="master"
9944 - inherit git-r3
9945 - SRC_URI=""
9946 - #KEYWORDS=""
9947 -else
9948 - MAJOR_V=$(get_version_component_range 1)
9949 - SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
9950 - KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
9951 -fi
9952 -S="${WORKDIR}/${MY_P}"
9953 -
9954 -STAGING_P="wine-staging-${PV}"
9955 -STAGING_DIR="${WORKDIR}/${STAGING_P}"
9956 -GWP_V="20170830"
9957 -PATCHDIR="${WORKDIR}/gentoo-wine-patches"
9958 -
9959 -DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset"
9960 -HOMEPAGE="https://www.winehq.org/"
9961 -SRC_URI="${SRC_URI}
9962 - https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
9963 -"
9964 -
9965 -if [[ ${PV} == "9999" ]] ; then
9966 - STAGING_EGIT_REPO_URI="https://github.com/wine-compholio/wine-staging.git"
9967 -else
9968 - SRC_URI="${SRC_URI}
9969 - staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
9970 -fi
9971 -
9972 -LICENSE="LGPL-2.1"
9973 -SLOT="${PV}"
9974 -IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags 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"
9975 -REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
9976 - X? ( truetype )
9977 - elibc_glibc? ( threads )
9978 - osmesa? ( opengl )
9979 - pipelight? ( staging )
9980 - s3tc? ( staging )
9981 - test? ( abi_x86_32 )
9982 - themes? ( staging )
9983 - vaapi? ( staging )" # osmesa-opengl #286560 # X-truetype #551124
9984 -
9985 -# FIXME: the test suite is unsuitable for us; many tests require net access
9986 -# or fail due to Xvfb's opengl limitations.
9987 -RESTRICT="test"
9988 -
9989 -COMMON_DEPEND="
9990 - X? (
9991 - x11-libs/libXcursor[${MULTILIB_USEDEP}]
9992 - x11-libs/libXext[${MULTILIB_USEDEP}]
9993 - x11-libs/libXfixes[${MULTILIB_USEDEP}]
9994 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
9995 - x11-libs/libXi[${MULTILIB_USEDEP}]
9996 - x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
9997 - )
9998 - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
9999 - capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
10000 - cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
10001 - fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
10002 - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
10003 - gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
10004 - gstreamer? (
10005 - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
10006 - media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
10007 - )
10008 - jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
10009 - lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
10010 - ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
10011 - mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
10012 - ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] )
10013 - netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
10014 - nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
10015 - odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
10016 - openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
10017 - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
10018 - opengl? (
10019 - virtual/glu[${MULTILIB_USEDEP}]
10020 - virtual/opengl[${MULTILIB_USEDEP}]
10021 - )
10022 - osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] )
10023 - pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
10024 - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
10025 - pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
10026 - scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
10027 - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
10028 - staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
10029 - themes? (
10030 - dev-libs/glib:2[${MULTILIB_USEDEP}]
10031 - x11-libs/cairo[${MULTILIB_USEDEP}]
10032 - x11-libs/gtk+:3[${MULTILIB_USEDEP}]
10033 - )
10034 - truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
10035 - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
10036 - udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
10037 - v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
10038 - vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
10039 - xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
10040 - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
10041 - xml? (
10042 - dev-libs/libxml2[${MULTILIB_USEDEP}]
10043 - dev-libs/libxslt[${MULTILIB_USEDEP}]
10044 - )
10045 - abi_x86_32? (
10046 - !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
10047 - !<app-emulation/emul-linux-x86-baselibs-20140508-r14
10048 - !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
10049 - !<app-emulation/emul-linux-x86-db-20140508-r3
10050 - !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
10051 - !<app-emulation/emul-linux-x86-medialibs-20140508-r6
10052 - !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
10053 - !<app-emulation/emul-linux-x86-opengl-20140508-r1
10054 - !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
10055 - !<app-emulation/emul-linux-x86-sdl-20140508-r1
10056 - !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
10057 - !<app-emulation/emul-linux-x86-soundlibs-20140508
10058 - !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
10059 - !<app-emulation/emul-linux-x86-xlibs-20140508
10060 - )"
10061 -
10062 -RDEPEND="${COMMON_DEPEND}
10063 - app-emulation/wine-desktop-common
10064 - >app-eselect/eselect-wine-0.3
10065 - !app-emulation/wine:0
10066 - dos? ( >=games-emulation/dosbox-0.74_p20160629 )
10067 - gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
10068 - mono? ( app-emulation/wine-mono:4.7.0 )
10069 - perl? (
10070 - dev-lang/perl
10071 - dev-perl/XML-Simple
10072 - )
10073 - pulseaudio? (
10074 - realtime? ( sys-auth/rtkit )
10075 - )
10076 - s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] )
10077 - samba? ( >=net-fs/samba-3.0.25[winbind] )
10078 - selinux? ( sec-policy/selinux-wine )
10079 - udisks? ( sys-fs/udisks:2 )"
10080 -
10081 -# tools/make_requests requires perl
10082 -DEPEND="${COMMON_DEPEND}
10083 - sys-devel/flex
10084 - >=sys-kernel/linux-headers-2.6
10085 - virtual/pkgconfig
10086 - virtual/yacc
10087 - X? (
10088 - x11-proto/inputproto
10089 - x11-proto/xextproto
10090 - x11-proto/xf86vidmodeproto
10091 - )
10092 - prelink? ( sys-devel/prelink )
10093 - staging? (
10094 - dev-lang/perl
10095 - dev-perl/XML-Simple
10096 - )
10097 - xinerama? ( x11-proto/xineramaproto )"
10098 -
10099 -# These use a non-standard "Wine" category, which is provided by
10100 -# /etc/xdg/applications-merged/wine.menu
10101 -QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
10102 -usr/share/applications/wine-notepad.desktop
10103 -usr/share/applications/wine-uninstaller.desktop
10104 -usr/share/applications/wine-winecfg.desktop"
10105 -
10106 -PATCHES=(
10107 - "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
10108 - "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
10109 - "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
10110 - "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
10111 - "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
10112 - "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
10113 -)
10114 -PATCHES_BIN=(
10115 - "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
10116 -)
10117 -
10118 -# https://bugs.gentoo.org/show_bug.cgi?id=635222
10119 -if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then
10120 - DEPEND+=" dev-util/patchbin"
10121 -fi
10122 -
10123 -wine_compiler_check() {
10124 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
10125 -
10126 - # GCC-specific bugs
10127 - if tc-is-gcc; then
10128 - # bug #549768
10129 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
10130 - ebegin "Checking for gcc-5 ms_abi compiler bug"
10131 - $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
10132 - # Run in subshell to prevent "Aborted" message
10133 - ( "${T}"/pr66838 || false ) >/dev/null 2>&1
10134 - if ! eend $?; then
10135 - eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
10136 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
10137 - eerror "or use gcc-config to select a different compiler version."
10138 - eerror "See https://bugs.gentoo.org/549768"
10139 - eerror
10140 - return 1
10141 - fi
10142 - fi
10143 - # bug #574044
10144 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
10145 - ebegin "Checking for gcc-5-3 stack realignment compiler bug"
10146 - # Compile in subshell to prevent "Aborted" message
10147 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
10148 - if ! eend $?; then
10149 - eerror "Wine cannot be built with this version of gcc-5.3"
10150 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
10151 - eerror "or use gcc-config to select a different compiler version."
10152 - eerror "See https://bugs.gentoo.org/574044"
10153 - eerror
10154 - return 1
10155 - fi
10156 - fi
10157 - fi
10158 -
10159 - # Ensure compiler support
10160 - if use abi_x86_64; then
10161 - ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
10162 - # Compile in subshell to prevent "Aborted" message
10163 - ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
10164 - if ! eend $?; then
10165 - eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
10166 - eerror
10167 - eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine"
10168 - eerror
10169 - return 1
10170 - fi
10171 - fi
10172 -}
10173 -
10174 -wine_build_environment_check() {
10175 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
10176 -
10177 - if use abi_x86_64; then
10178 - if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
10179 - eerror "You need gcc-4.4+ to compile 64-bit wine"
10180 - die
10181 - elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
10182 - eerror "You need clang-3.8+ to compile 64-bit wine"
10183 - die
10184 - fi
10185 - fi
10186 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
10187 - ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
10188 - ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
10189 - ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
10190 - fi
10191 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
10192 - if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
10193 - ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work"
10194 - ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
10195 - ewarn "See package.env in man 5 portage for more information on how to do this."
10196 - ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
10197 - fi
10198 - fi
10199 -
10200 - if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then
10201 - eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
10202 - eerror "See https://bugs.gentoo.org/487864 for more details."
10203 - eerror
10204 - return 1
10205 - fi
10206 -}
10207 -
10208 -wine_env_vcs_vars() {
10209 - local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
10210 - local pn_live_val="${pn_live_var}"
10211 - eval pn_live_val='$'${pn_live_val}
10212 - if [[ ! -z ${pn_live_val} ]]; then
10213 - if use staging; then
10214 - eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}"
10215 - eerror "cannot be used to set the commit. Instead, you may use the"
10216 - eerror "environmental variables WINE_COMMIT, and STAGING_COMMIT."
10217 - eerror
10218 - return 1
10219 - fi
10220 - fi
10221 - if [[ ! -z ${EGIT_COMMIT} ]]; then
10222 - eerror "Commits must now be specified using the environmental variables"
10223 - eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT"
10224 - eerror
10225 - return 1
10226 - fi
10227 -}
10228 -
10229 -pkg_pretend() {
10230 - wine_build_environment_check || die
10231 -
10232 - # Verify OSS support
10233 - if use oss && ! use kernel_FreeBSD; then
10234 - if ! has_version ">=media-sound/oss-4"; then
10235 - eerror "You cannot build wine with USE=oss without having support from a"
10236 - eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)"
10237 - eerror
10238 - die
10239 - fi
10240 - fi
10241 -}
10242 -
10243 -pkg_setup() {
10244 - wine_build_environment_check || die
10245 - wine_env_vcs_vars || die
10246 -
10247 - WINE_VARIANT="${PN#wine}-${PV}"
10248 - WINE_VARIANT="${WINE_VARIANT#-}"
10249 -
10250 - MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
10251 - MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
10252 - MY_DATADIR="${MY_DATAROOTDIR}"
10253 - MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
10254 - MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
10255 - MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
10256 - MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
10257 - MY_MANDIR="${MY_DATADIR}/man"
10258 -}
10259 -
10260 -src_unpack() {
10261 - if [[ ${PV} == "9999" ]] ; then
10262 - EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
10263 - if use staging; then
10264 - local CURRENT_WINE_COMMIT=${EGIT_VERSION}
10265 -
10266 - git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}"
10267 - git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}"
10268 -
10269 - local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die
10270 -
10271 - if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then
10272 - einfo "The current Staging patchset is not guaranteed to apply on this WINE commit."
10273 - einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT."
10274 - einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine"
10275 - fi
10276 - fi
10277 - fi
10278 -
10279 - default
10280 -
10281 - l10n_find_plocales_changes "${S}/po" "" ".po"
10282 -}
10283 -
10284 -src_prepare() {
10285 -
10286 - eapply_bin(){
10287 - local patch
10288 - for patch in ${PATCHES_BIN[@]}; do
10289 - patchbin --nogit < "${patch}" || die
10290 - done
10291 - }
10292 -
10293 - local md5="$(md5sum server/protocol.def)"
10294 -
10295 - if use staging; then
10296 - ewarn "Applying the Wine-Staging patchset. Any bug reports to the"
10297 - ewarn "Wine bugzilla should explicitly state that staging was used."
10298 -
10299 - local STAGING_EXCLUDE=""
10300 - STAGING_EXCLUDE="${STAGING_EXCLUDE} -W winhlp32-Flex_Workaround" # Avoid double patching https://bugs.winehq.org/show_bug.cgi?id=42132
10301 - use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
10302 -
10303 - # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches
10304 - ebegin "Running Wine-Staging patch installer"
10305 - (
10306 - set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE}
10307 - cd "${STAGING_DIR}/patches"
10308 - source "${STAGING_DIR}/patches/patchinstall.sh"
10309 - )
10310 - eend $? || die "Failed to apply Wine-Staging patches"
10311 - fi
10312 -
10313 - default
10314 - eapply_bin
10315 - eautoreconf
10316 -
10317 - # Modification of the server protocol requires regenerating the server requests
10318 - if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
10319 - einfo "server/protocol.def was patched; running tools/make_requests"
10320 - tools/make_requests || die #432348
10321 - fi
10322 - sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
10323 - if ! use run-exes; then
10324 - sed -i '/^MimeType/d' loader/wine.desktop || die #117785
10325 - fi
10326 -
10327 - # Edit wine.desktop to work for specific variant
10328 - sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
10329 -
10330 - # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
10331 - cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
10332 -
10333 - l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
10334 -}
10335 -
10336 -src_configure() {
10337 - wine_compiler_check || die
10338 -
10339 - export LDCONFIG=/bin/true
10340 - use custom-cflags || strip-flags
10341 -
10342 - multilib-minimal_src_configure
10343 -}
10344 -
10345 -multilib_src_configure() {
10346 - local myconf=(
10347 - --prefix="${MY_PREFIX}"
10348 - --datarootdir="${MY_DATAROOTDIR}"
10349 - --datadir="${MY_DATADIR}"
10350 - --docdir="${MY_DOCDIR}"
10351 - --includedir="${MY_INCLUDEDIR}"
10352 - --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
10353 - --libexecdir="${MY_LIBEXECDIR}"
10354 - --localstatedir="${MY_LOCALSTATEDIR}"
10355 - --mandir="${MY_MANDIR}"
10356 - --sysconfdir=/etc/wine
10357 - $(use_with alsa)
10358 - $(use_with capi)
10359 - $(use_with lcms cms)
10360 - $(use_with cups)
10361 - $(use_with ncurses curses)
10362 - $(use_with udisks dbus)
10363 - $(use_with fontconfig)
10364 - $(use_with ssl gnutls)
10365 - $(use_enable gecko mshtml)
10366 - $(use_with gphoto2 gphoto)
10367 - $(use_with gsm)
10368 - $(use_with gstreamer)
10369 - --without-hal
10370 - $(use_with jpeg)
10371 - $(use_with ldap)
10372 - $(use_enable mono mscoree)
10373 - $(use_with mp3 mpg123)
10374 - $(use_with netapi)
10375 - $(use_with nls gettext)
10376 - $(use_with openal)
10377 - $(use_with opencl)
10378 - $(use_with opengl)
10379 - $(use_with osmesa)
10380 - $(use_with oss)
10381 - $(use_with pcap)
10382 - $(use_with png)
10383 - $(use_with pulseaudio pulse)
10384 - $(use_with threads pthread)
10385 - $(use_with scanner sane)
10386 - $(use_enable test tests)
10387 - $(use_with truetype freetype)
10388 - $(use_with udev)
10389 - $(use_with v4l)
10390 - $(use_with X x)
10391 - $(use_with X xfixes)
10392 - $(use_with xcomposite)
10393 - $(use_with xinerama)
10394 - $(use_with xml)
10395 - $(use_with xml xslt)
10396 - )
10397 -
10398 - use staging && myconf+=(
10399 - --with-xattr
10400 - $(use_with themes gtk3)
10401 - $(use_with vaapi va)
10402 - )
10403 -
10404 - local PKG_CONFIG AR RANLIB
10405 - # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
10406 - # set AR and RANLIB to make QA scripts happy; #483342
10407 - tc-export PKG_CONFIG AR RANLIB
10408 -
10409 - if use amd64; then
10410 - if [[ ${ABI} == amd64 ]]; then
10411 - myconf+=( --enable-win64 )
10412 - else
10413 - myconf+=( --disable-win64 )
10414 - fi
10415 -
10416 - # Note: using --with-wine64 results in problems with multilib.eclass
10417 - # CC/LD hackery. We're using separate tools instead.
10418 - fi
10419 -
10420 - ECONF_SOURCE=${S} \
10421 - econf "${myconf[@]}"
10422 - emake depend
10423 -}
10424 -
10425 -multilib_src_test() {
10426 - # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
10427 - if [[ ${ABI} == x86 ]]; then
10428 - if [[ $(id -u) == 0 ]]; then
10429 - ewarn "Skipping tests since they cannot be run under the root user."
10430 - ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
10431 - return
10432 - fi
10433 -
10434 - WINEPREFIX="${T}/.wine-${ABI}" \
10435 - Xemake test
10436 - fi
10437 -}
10438 -
10439 -multilib_src_install_all() {
10440 - local DOCS=( ANNOUNCE AUTHORS README )
10441 - add_locale_docs() {
10442 - local locale_doc="documentation/README.$1"
10443 - [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
10444 - }
10445 - l10n_for_each_locale_do add_locale_docs
10446 -
10447 - einstalldocs
10448 - prune_libtool_files --all
10449 -
10450 - if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
10451 - rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
10452 - "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
10453 - fi
10454 -
10455 - # Remove wineconsole if neither backend is installed #551124
10456 - if ! use X && ! use ncurses; then
10457 - rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
10458 - rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
10459 - rm_wineconsole() {
10460 - rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
10461 - }
10462 - multilib_foreach_abi rm_wineconsole
10463 - fi
10464 -
10465 - use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
10466 - use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
10467 -
10468 - if use abi_x86_64 && ! use abi_x86_32; then
10469 - dosym wine64 "${MY_PREFIX}"/bin/wine # 404331
10470 - dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader
10471 - fi
10472 -
10473 - # Failglob for bin and man loops
10474 - local glob_state=$(shopt -p failglob)
10475 - shopt -s failglob
10476 -
10477 - # Make wrappers for binaries for handling multiple variants
10478 - # Note: wrappers instead of symlinks because some are shell which use basename
10479 - local b
10480 - for b in "${D%/}${MY_PREFIX}"/bin/*; do
10481 - make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
10482 - done
10483 -
10484 - # respect LINGUAS when installing man pages, #469418
10485 - local l
10486 - for l in de fr pl; do
10487 - use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}*
10488 - done
10489 -
10490 - eval "${glob_state}"
10491 -}
10492 -
10493 -pkg_postinst() {
10494 - eselect wine register ${P}
10495 - if [[ ${PN} == "wine-vanilla" ]]; then
10496 - eselect wine register --vanilla ${P} || die
10497 - else
10498 - if use staging; then
10499 - eselect wine register --staging ${P} || die
10500 - fi
10501 - fi
10502 -
10503 - eselect wine update --all --if-unset || die
10504 -
10505 - xdg_desktop_database_update
10506 -
10507 - if ! use gecko; then
10508 - ewarn "Without Wine Gecko, wine prefixes will not have a default"
10509 - ewarn "implementation of iexplore. Many older windows applications"
10510 - ewarn "rely upon the existence of an iexplore implementation, so"
10511 - ewarn "you will likely need to install an external one, like via winetricks"
10512 - fi
10513 - if ! use mono; then
10514 - ewarn "Without Wine Mono, wine prefixes will not have a default"
10515 - ewarn "implementation of .NET. Many windows applications rely upon"
10516 - ewarn "the existence of a .NET implementation, so you will likely need"
10517 - ewarn "to install an external one, like via winetricks"
10518 - fi
10519 -}
10520 -
10521 -pkg_prerm() {
10522 - eselect wine deregister ${P}
10523 - if [[ ${PN} == "wine-vanilla" ]]; then
10524 - eselect wine deregister --vanilla ${P} || die
10525 - else
10526 - if use staging; then
10527 - eselect wine deregister --staging ${P} || die
10528 - fi
10529 - fi
10530 -
10531 - eselect wine update --all --if-unset || die
10532 -}
10533 -
10534 -pkg_postrm() {
10535 - xdg_desktop_database_update
10536 -}