summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-emulation/wine
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-emulation/wine')
-rw-r--r--app-emulation/wine/Manifest79
-rw-r--r--app-emulation/wine/files/wine-1.4_rc2-multilib-portage.patch40
-rw-r--r--app-emulation/wine/files/wine-1.5.17-osmesa-check.patch38
-rw-r--r--app-emulation/wine/files/wine-1.5.26-winegcc.patch59
-rw-r--r--app-emulation/wine/files/wine-1.6-memset-O3.patch21
-rw-r--r--app-emulation/wine/files/wine-1.7.0-freetype-header-location.patch351
-rw-r--r--app-emulation/wine/files/wine-1.7.12-osmesa-check.patch38
-rw-r--r--app-emulation/wine/files/wine-1.7.19-makefile-race-cond.patch15
-rw-r--r--app-emulation/wine/files/wine-1.7.2-osmesa-check.patch38
-rw-r--r--app-emulation/wine/files/wine-1.7.38-gstreamer-v5-staging-post.patch58
-rw-r--r--app-emulation/wine/files/wine-1.7.38-gstreamer-v5-staging-pre.patch48
-rw-r--r--app-emulation/wine/files/wine-1.7.39-gstreamer-v5-staging-post.patch38
-rw-r--r--app-emulation/wine/files/wine-1.7.39-gstreamer-v5-staging-pre.patch40
-rw-r--r--app-emulation/wine/files/wine-1.7.45-libunwind-osx-only.patch64
-rw-r--r--app-emulation/wine/files/wine-1.7.47-critical-security-cookie-fix.patch82
-rw-r--r--app-emulation/wine/files/wine-gcc-4.9-null-pointer.patch35
-rw-r--r--app-emulation/wine/metadata.xml35
-rw-r--r--app-emulation/wine/wine-1.6.2-r1.ebuild368
-rw-r--r--app-emulation/wine/wine-1.6.2.ebuild376
-rw-r--r--app-emulation/wine/wine-1.7.10-r1.ebuild370
-rw-r--r--app-emulation/wine/wine-1.7.11-r1.ebuild370
-rw-r--r--app-emulation/wine/wine-1.7.12-r1.ebuild370
-rw-r--r--app-emulation/wine/wine-1.7.13-r1.ebuild370
-rw-r--r--app-emulation/wine/wine-1.7.14-r1.ebuild370
-rw-r--r--app-emulation/wine/wine-1.7.15-r1.ebuild370
-rw-r--r--app-emulation/wine/wine-1.7.16-r1.ebuild370
-rw-r--r--app-emulation/wine/wine-1.7.17-r1.ebuild370
-rw-r--r--app-emulation/wine/wine-1.7.18-r1.ebuild370
-rw-r--r--app-emulation/wine/wine-1.7.19-r2.ebuild415
-rw-r--r--app-emulation/wine/wine-1.7.20-r1.ebuild417
-rw-r--r--app-emulation/wine/wine-1.7.21-r1.ebuild424
-rw-r--r--app-emulation/wine/wine-1.7.22-r1.ebuild424
-rw-r--r--app-emulation/wine/wine-1.7.28-r1.ebuild427
-rw-r--r--app-emulation/wine/wine-1.7.29-r1.ebuild427
-rw-r--r--app-emulation/wine/wine-1.7.3-r1.ebuild369
-rw-r--r--app-emulation/wine/wine-1.7.33-r1.ebuild430
-rw-r--r--app-emulation/wine/wine-1.7.34.ebuild427
-rw-r--r--app-emulation/wine/wine-1.7.35.ebuild422
-rw-r--r--app-emulation/wine/wine-1.7.36.ebuild421
-rw-r--r--app-emulation/wine/wine-1.7.37.ebuild424
-rw-r--r--app-emulation/wine/wine-1.7.38-r1.ebuild434
-rw-r--r--app-emulation/wine/wine-1.7.39-r1.ebuild436
-rw-r--r--app-emulation/wine/wine-1.7.4-r1.ebuild369
-rw-r--r--app-emulation/wine/wine-1.7.40-r1.ebuild436
-rw-r--r--app-emulation/wine/wine-1.7.41.ebuild436
-rw-r--r--app-emulation/wine/wine-1.7.42.ebuild436
-rw-r--r--app-emulation/wine/wine-1.7.43.ebuild436
-rw-r--r--app-emulation/wine/wine-1.7.44.ebuild436
-rw-r--r--app-emulation/wine/wine-1.7.45.ebuild430
-rw-r--r--app-emulation/wine/wine-1.7.46.ebuild436
-rw-r--r--app-emulation/wine/wine-1.7.47.ebuild438
-rw-r--r--app-emulation/wine/wine-1.7.8-r1.ebuild370
-rw-r--r--app-emulation/wine/wine-1.7.9-r1.ebuild370
-rw-r--r--app-emulation/wine/wine-9999.ebuild436
54 files changed, 16079 insertions, 0 deletions
diff --git a/app-emulation/wine/Manifest b/app-emulation/wine/Manifest
new file mode 100644
index 000000000000..8c0e8d84485c
--- /dev/null
+++ b/app-emulation/wine/Manifest
@@ -0,0 +1,79 @@
+DIST wine-1.6.2.tar.bz2 21252985 SHA256 f0ab9eede5a0ccacbf6e50682649f9377b9199e49cf55641f1787cf72405acbe SHA512 81c83566dc2cab276ab7b9cfb5edc5fbca0f003dcb78044a0197c9a4d9a05a40f9045e5b4981c9219c3c39dab52fe519ef3cb338d79ee01e1fe66e3c056e8397 WHIRLPOOL 7d2d995a9996d63e17ff3ef5871f3818945dcd90c4a22798506f0d0c31ed999462bc5718f5cc562b9da64fdd7af6b240380bfa2901eabd23fb036aebfc7c554c
+DIST wine-1.7.10.tar.bz2 21312974 SHA256 44270e4b97ef930e4e4b59088e6e3972e91e85bacf9a9a4d8712a877c9d5cbdb SHA512 157fe4146df3c174643cc1ac29748778aa90fb9e602b417ad772d3da2af3a86307ca818ded860722513efdba57b85e06a2db2869a69a3f579255829dc3d8ac55 WHIRLPOOL eaba07f65c416ce93b9243df402ad0fb5a2f5e7bce43f40b73941f2ea7baddbcab9ce3a999d9086faeaead7552f5d34234cc3b3f3798db2fb98982ef22a98b71
+DIST wine-1.7.11.tar.bz2 21359534 SHA256 c07d2771ed96c45d428bb11d164c5e4bbe48d6857a0a4cba2e0b73c5f1044f93 SHA512 9743c4cf382b6846d98aa383d9db22cb99bca510ec2db3e9224f10d08095c4a3fe4449b3019d5a6f401458a98696d096a454d00584c667074aed618c47544dcf WHIRLPOOL 38356b5df2c9f5a78b9eb66c6e0f09f7371c57d84f601e6614228b64c629a2c9c222696078d7627df850792a0111e7876fe460c4575bac4accf2f56a391315c6
+DIST wine-1.7.12.tar.bz2 21366705 SHA256 2dcdff7bf8bac2bc10da85e3e632e8add830f22cf416173e53abca4ec580b392 SHA512 7b5be06dd6d71512884bbcc386fb021725125fb95a4493a033624c2b801eaec7fb4be4b70894ee914da138d8e310da3ac49b8a32538ee21d127201cebc44b449 WHIRLPOOL fb04306058403f82df8cf3e88d21d8011bd2e7cdfa4c31f28e64ea0d24393cd6ed8f61724839a1b5cde272ac8dd854c6c6185e7dee8271881b9b3eb1612f4bbe
+DIST wine-1.7.13.tar.bz2 21385204 SHA256 a72fdee6e1898007b38f3b30584f86d996567ad8d2f1cc0fe3a877be0493b9df SHA512 ba01933770c0fbaf056fe252b77eb7f2c160f5455450cace638bc288683fb8f6d97421927ec935795eda9aae500bfeb19e6ca8d632822c345f8bfb34b3d27d15 WHIRLPOOL e500fb6cebee9d87aa0c9ed788df37e2f744c0cb1453a6dc20e447dabd9e1becabb00f93ea9272856aa35015703e98b7512c2e233f98e67143abc80b1ae7f182
+DIST wine-1.7.14.tar.bz2 21444526 SHA256 2df1937e28936ba33e70a42fddcee01097ca0fbdd4dbf2c2f05d8a2ff5263e09 SHA512 0bd3d74b375c14b3f3601a4e590e4dd1808ff60f6d3d87241596ea8649c910968a2e95bd5031d5065253b6b938ce9002bad159c95457578f2cd9c34e06bac8e6 WHIRLPOOL 31b94611bf5d3c9123829fc9375b8c9306b6e044ed07c08ee0f4d5db47f88c38570f98514e45a0bc326d9352abb385375b9587e84fc23a70152f6696793eb622
+DIST wine-1.7.15.tar.bz2 21463370 SHA256 519137adc562d32035fcf7b110d6e65fdd7721af0b176567a2187397c63f1380 SHA512 7ac95fa4c873570ff04c2ab4adca40d3898cb0f0d5bea081208bb8d16787470f75a9f6f20a1f7123eebbf2acd977391ae35b107c59e25fa48ef3b0bcdcb559b6 WHIRLPOOL d114d2022e91c663e33181213260eecf63d10d515167c27e4fca75bd47f3036a02943c5d5f5ee103202732b9b7c2ae2964724bd88892aeec2c15e634132f5aef
+DIST wine-1.7.16.tar.bz2 21478085 SHA256 071ed89d9c76219aa73df6472b99f9f0b35e4977235e2b8e388c11416a2d1c6a SHA512 7baa99280f78eb8881dba470c3a17ab093f9cfb0950eb4dea1a89849ee0794ddda373049fda2fde5551963b231e4548345892e759cf4690ab047c49147fa504e WHIRLPOOL b6ef7a096837d406b0f9a67f6719dae85c12e2f0d00dc9fdcefacd9db5485fccacdfa788e68abf0a279c20daee246ab7d25aeb14f1e96c5bb3187f38550157c1
+DIST wine-1.7.17.tar.bz2 21531865 SHA256 bb6fbd7fd70f9aafba557995d9ce537ded56e750e0a89a062e3318d584a8abef SHA512 32ff77d201200cb8a159395fe5d410b118bf4db16a89a9708128dbb7c25e45457c80d76e2821edf06db99525e5a93b6b1a7ee7166d7972f7ceb7fc47aaf8784b WHIRLPOOL 55f6fe3fced59c6344b2656a22eeba478be4a138ec26c28306316cb0dfdaed0c41f71584dbda683070a1a03a45a010fdd2989a8cb95a81294fa2d8b13c55cbaf
+DIST wine-1.7.18.tar.bz2 21595718 SHA256 dab6d12e620e2097a6838a3f6928f3b2ca3aab0b70521b53107ee1998303d378 SHA512 059f60318508f158cceef029c111c2b11bdf334def95aa96361163358ad7632f87fe0d1d9a05060a5b76ddcb367d8490fd31a1b512ecf7cd01f7be82a8ff8677 WHIRLPOOL 8b2dfdb85a7271a447fc827f4afb697bebc3fa3f52463b0debb1631e3c156fe46b00839d94b7e27be1407009608f54f07acb211c68fb6448f7ad30ccbdacf55d
+DIST wine-1.7.19.tar.bz2 21633142 SHA256 c5ea9b00c9029ecf47a25881b284d8ea02079dfbabc22aa789d6d07e38b32ff2 SHA512 3bf6399027752150469046c3ea51ff0c7e56bca7ed8db7def16c16c41f31c118c5217bb67882b7de88eb710f2af4a89e2858b82071523d5f9cd00ec66dd0348c WHIRLPOOL b125e2ec48801349bc73483527213daee20674a2e93f30f41e6fe138884ec7a4dbe0698b15ed69ed1062f0a045e11526fab8f23ed701147c85ebc1db0afb7f2d
+DIST wine-1.7.20.tar.bz2 21635815 SHA256 9c431b0b96222d0c27a2c2326ed88298ac0dae50ea783ef764c48c4373bf5f15 SHA512 ffc168ff4342fb5d8fb4a4a242c37f91613e983d644bd6b6d8798110b12339806d58d3abca8856855c286e40b9e4344a17fc834731dd03a42ea0743d1f24bd44 WHIRLPOOL 5ad69f9355897b4ce72c18c239dca2909d0c6094ff2c763731834d5b313fe04806648966e9d60408a14c0cf0dcb981587ffc0edaec8af07fe0a138364062fa53
+DIST wine-1.7.21.tar.bz2 21635330 SHA256 a14723104135c21414c61e146144a2c527430057255f8c35a3a7d354e68b9401 SHA512 73db3256d04c681ea7a4524767f9f93c24a4cc96aa901c6fdfd700c7e8968cdb127a110df56f10423cac90aadc783ceafcd0dc571e36ea096c1de03c619164d8 WHIRLPOOL 32bcf10f8665dab43339e79240b534f3fa29087787acd752553b4b717f6c26f8e98d36185f61e928e2c5ef9a3663b9eac7ec42cd9898800ba12efab74c78634c
+DIST wine-1.7.22.tar.bz2 21661089 SHA256 60374c94c64110d58939e716c3ef4916059c691a2953d8340a9a140a208a7c63 SHA512 f4646f85f3e5ff25d299e544f8736390bafab63dbe44c38dfbd78bea3a047fd269dcad67e0beca088aab77464c3aadb5040af9606f57c91cc4e4b0f8e916dd55 WHIRLPOOL c214c9e8a9592b7d17a8942ef14f46fd936674dfcd95838b396176e02b74cbe1e3d295a8183ba76c53987c9f1d55d6b5f3de46df8fb9f6a9547dc934a9b048a9
+DIST wine-1.7.28-gstreamer-v4.patch.bz2 5447 SHA256 64dad250bde6b10d77e688b316217b1b508f3dfb8195a33f6420dc1dfb18ac8a SHA512 65e84d79da9898c3c0508c392182f148384abf8f007c0662c6468414eebb69dec918c6099a3fbff7ffa2dd4a942a1aa1d91dffba494ac37a6f572a7f0162ea0c WHIRLPOOL 0cc7cf63c0f9ed718e2219da01cc05fca0814b0ca98c916141ccb254da91f32ea03ec47c6e106d558d6ca10b3346a9cbd9a1c74ef66cb9983dddd1e50506c940
+DIST wine-1.7.28.tar.bz2 21811422 SHA256 67c3f157b9e720971d1f7dc582e9f0b16879ef660b5ba284a77f8bdfc6fc2313 SHA512 dffbfeb53d9503ec882941c9d01c4b795c6da6046a2eab5d1ccb4db68a07952cfdbb14600869981b050f45247548d459bd054a390af6baecb232dc0c075ec7ab WHIRLPOOL a55e2acc86435f7254220f05871487e7272318a79dbea00fbfe36faebb5ca70281561ece1c8b79db2e59aea070d2f2d7146d94490925f65c641c52d45c82cf2a
+DIST wine-1.7.29.tar.bz2 21823063 SHA256 ae48190d35533197811eeabed989ed9fd3201c44af917107f35ec0bf75b8de62 SHA512 ced6ced1bfdf1b847242399bf54a4a63d0f8a16f3dc1a11c6f2af1baf12d2daa679a5377fe284724b8487cb0573383694c68e363ff2b98230f79c873c4dbbba9 WHIRLPOOL 3db7234f4ba12ea483c0bb8336dcb8becf7bd73298b63700aa7fec61a4723b5bbb7b03b32bd0c8ab1c66b45f6e60bf4dbd30e0da325cf75dc698ca6b69df2993
+DIST wine-1.7.3.tar.bz2 21489049 SHA256 c66c93c2ffec8d1d9922fbaa226b169d62deb77fcbfd0fbd7379b77dbd97d47f SHA512 41109866b259a5f939c9ca4c26ed0a5ca74fa9cafa2f348b83510dd386459c87ac044a6f954f2f83ce00961d866a6e636ed96aa9e94584b7a79486d434b406cc WHIRLPOOL 90e6aed8930e3496701292415ce87f29a87870a1d00ad26d4f3c4adf33cd296093d0ef3d363bf5cead1ebd5ab4e86907ccb015c10d85f6f90d5f48cd81681b0f
+DIST wine-1.7.33.tar.bz2 21908969 SHA256 e3519d6fa2c0bb91e58da38f14f02607cf366a0154ff1effe528966106d49275 SHA512 a9bb47383b88e9c60edef7883c3ce25f5ad0895b67cdb4393c1c3f9b9ab7245e8d8318df193722a7b8c87ff57cd554df53a24c988566d1dce808b939ed731451 WHIRLPOOL 3747cc9df638e7cba5aaff8cb6bfa26e5588ba87e5bdc9d5e3202f30973bc2c06b0d65027f113066dce82d851c1591ce86421ce6e7d90944f5206d341f7ed51d
+DIST wine-1.7.34-gstreamer-v5.patch.bz2 5703 SHA256 c3bb6f669f46d9f2d7ba494a2264cee457349f559d4b0758db80e39eb22f2aee SHA512 e780394e8739a58593d264322c462bfe9040c1cabce93b84d24f09040026368efb4ac34a6a302beb6048d14b4ac835b87a0c515b52c1a0c143aa4e15691eb01b WHIRLPOOL 1befbb0fbd026d6e833c5d72341064dd6e12157e1b7df58e349b9985648bfbc63f70e9cab45b61155515ac65057968e30ba313e71e183b8027153c9392d89192
+DIST wine-1.7.34.tar.bz2 21956792 SHA256 4d5a3b25450fb232aa9d0d0dd859b7d50b8ffb6180f24aefb6eb4e400d32330b SHA512 55d8c42ecd146fb92c1d91737e9c6e51d6cc36682964bfc8ef73a4495edf884d84fddca173d297b7553823abbddaf4dbc115a5474419be0611f2723beab00b6c WHIRLPOOL 8842bc71632b04a736e51eb3a016395a5a72b1798d43d1a3343956854d4fa1d9b973498abca0a28717ae5c2fd947970066820d5606dfdedb67e3235ded3de2ce
+DIST wine-1.7.35.tar.bz2 22005666 SHA256 eb2ef652a302c366d3f6ee9315790f162b1c0913d442cb5a856d9f7d95e31cfb SHA512 52d8947b1cedeead1e9bc559aa234fcb2237db493bc0556a6832968bde495c70d6eb2e4ee81d698e6525982d5373d6421b072af97a6d6b05b05e28b4bf71c9b6 WHIRLPOOL 99f3d2c03c1c1a98913a1925105102ec3f4f8f408168c3c812077feb5e87fbef7f9ac4e672b43ebaa19fe3dd41bd9c376f3b97a152bc7d3924e70f3349d7fa61
+DIST wine-1.7.36.tar.bz2 22010371 SHA256 21aabf3ab2c6055ae66c77647b123c978094f0c135817ceeaeaeebc5d8efe3bd SHA512 c2d9687e1ab0a53ebff6973fdd83e4b54c397e2b51c172b7c58297776228a8bbb3d5321de27aac4b61f756575b60c6534d5e0a9bb4b830d429496b3e8b95b39f WHIRLPOOL 5042e6142839cda3b83fa20e8e418f0da9d57e347b96e241160372af5ef1415a5b7f961ec024cd5a186c93943985ea652fa50e6cbe4fcadade7100f4f5c16139
+DIST wine-1.7.37.tar.bz2 22034021 SHA256 6730ec79bc8d5f61ab90d9cb51daab26a57c1a79e2804e03731f060dea4af305 SHA512 235cdac2c037eaf95ec78634769534dcd10c844bbcd8b8b2f66d457a80779277d4c608d930a10e381a35d33bd30044de7242cd8ce148ecae62085e097e1bccc7 WHIRLPOOL 324dc54ec3a8d1fa661a617708a27435d6f366252deab483238f95f91be351dcfead31f7a3cfa118d66781565dc1a856bf9e10dfef99b915b4845dcd662a7d6d
+DIST wine-1.7.38.tar.bz2 22027786 SHA256 981ee93e7db6b2b8d1ee16999cdff915a9411b1566539edc56137f9cd4d36bc0 SHA512 36793b8b2fd678b9542ff2c32582234a175e9795682b93c0df881dc1adac65dff8d33509511fe7400d8b099880df8d6f13ecc18e0c8b72827d9ac009770ddc81 WHIRLPOOL 646a36cd4f50c3c81fafc95e11e5c8df68e7c14e7b582b6cd7f5f99d3f37afebd9655e8b0c28bb7995c957d87f96913ac13c2fc425075406e32cbf9a23440add
+DIST wine-1.7.39.tar.bz2 22122289 SHA256 6affb007fe772eb5588c584e3bdb62db96d8291c7fc8e75a5fd0bb098391335c SHA512 0eda88c4c092c2d596097548a341f62128dc39ffd6c88c514378639864dfbeedad3cb436065a85981cb2d9399a4cf439d1c301ec651a7e21eac886931218b6f5 WHIRLPOOL 9cb9d99d94e5abecbf5c6717165b58c7c23784aef0a4ffe2edaca2aef63e5706f17aa1102e00424fd849b30598f5d3b8206ea6b473c4337bb486211d7c3daf46
+DIST wine-1.7.4.tar.bz2 21500746 SHA256 517b3465dbf5b516d3fe886c0f9d4f310dc1d4a38ca4e5580c5d66bab3fb6969 SHA512 4267eb43311fe53537a1864a70e88e4bf444b8979dc858725a1170ed06af4e727604a22bafb3deb448eeb62c170ce67ce8eb8082bce040f5488b1a4c4bc6bb95 WHIRLPOOL 7bb14e0dfd4f9a7411e1d5484dba62f8584a0e03997cc3c6192893dccbc7de316eb79a1e5b0ccf96d20e74cf512ebc79e760076ff4882625bc81b410ad8be0bf
+DIST wine-1.7.40.tar.bz2 22183479 SHA256 0d82e639a553765437f9a3f864f383e8e4e1eb0f1dd815263f9fda1c78d5cab6 SHA512 3d812b8eefa14f3fea908345b9a8950e9a409e5e45b38d73105c181bfc3fa5f9ef82a022cffcc2efd45f79220ab9ff139b3729410b7708ed6ff960647761dd61 WHIRLPOOL c9935e5daf077b3bb66209fe572b494ca8250c16f76a13122f61899112559a010344ff9e2046a9132d904b0396e519291eba641ebc8add364dda85becfd5d14b
+DIST wine-1.7.41.tar.bz2 22237972 SHA256 6fa622b1dacb257fab671ddd689439daf6bb1cfb9e632c324db16a5db6372f97 SHA512 e5f040a07fdeea44a5a48630bfb70a81ce6cede462d40aaa55277481faa4176f1f0df290bf7afe7452a695b3457ebc43dde474feca74b48d041cb5bb0a5df85f WHIRLPOOL e8dff1a0543aab21802ce54e231c2be9c9e4aee0bf476db7615a519a7eab25c7f95da0fef4899cbd8c458366bd15ae340ebdd1025136dcc944cca4d1a2ba1e7b
+DIST wine-1.7.42.tar.bz2 22229770 SHA256 5a7f5c82b120bfe1eca572bd8d7a4ede7e6baf330ce3087199eb5cd175233ba2 SHA512 f290860614ad83f0fdf50d3b063f5edf8ea59449d30292ee837531b26a1b5ab871b2f70305c5a132d3727db7471ca67e2aa7356df8b35745bd38602b54a56781 WHIRLPOOL de7292e08201ed9bcab03da2490213abcaa39e44dcd156c19d154c3af9ce74f73ccf079fd2ca4578d0c91b046c21d24e38fe85f47135b6e4b311b8986975c241
+DIST wine-1.7.43.tar.bz2 22246396 SHA256 53d49b9affcb836443cf25111c2906dfcae9ff1fc8170dffbd81755405907822 SHA512 676f3eddff3004044e1ce8b1f9d3023e1a37f8e89db20724f71b18c789c856c7bb5cfc8ec4ea3f7b2ab215e19cd0073b51e14a93a748512b366d472f4da6fe01 WHIRLPOOL b000c218c45a86d995b06900691f2bce580658f8545600c734383032b47c980a1e0d3534ac4e72be786b4c00520e482e999059fbb8437cb704bb707f8d4aea7e
+DIST wine-1.7.44.tar.bz2 22308686 SHA256 d2e3290d4b312d235ab8ac214eaae8f81c751fb610b15b40c2620904bd38d8bb SHA512 55cc555a5f40fe802d6cca65c7bc3d294c10c79dee93e602c4ccefd540002174bc1a1ca8c5cb56311b94782f7b5af7002420c20110fd4c913f1d1bdb380dc82d WHIRLPOOL f9d6b2eb38b78a97c096408775ca36d7d010eb120f1ee59f5da8db93b19e91a4bdd74d337626ab9b81338ddcfc9d58441919975152b1dd1c2379a1a7154467cc
+DIST wine-1.7.45.tar.bz2 22312840 SHA256 a30cef1ee4ceaee4b6c9c2ad96df3b8a8847278246e7727624db314c68adaa23 SHA512 409e7c5b75e5311b02697b993b5d6a5cd08cf7e2e2b4feb295b8a5b88b4edf5034c3bd9feafd208892b05082970a198542e046d31ca3629edd6e505d4bbff45e WHIRLPOOL f662ae6370003f7f31e4be5397fa69b4847581770d2d5d72b6de0ac88617995fb0e3206957075bc7d247cc9f11ae5a29a8e82344fd1c22b480edfc307d25c48f
+DIST wine-1.7.46.tar.bz2 22356320 SHA256 9ab4046cc676de3054f9f2560e7d757b25324f72dd9a9cfed0d4aa48cc87350b SHA512 42710c39436fcd66d2a245da9d8242f3c909c58e0f0178a74562ae9d5360e8dc5908a336633edd8f717fb5c5ba07310fc24a2ec57cb447900ff8f57b59e5ec1d WHIRLPOOL 8ca9a25301559001176eb542defbfae279760a4e758b6563431900608ca4efa1ea01a2f3ea56039c4116052be58ee7c4a8ab6df773c3c6fdd65599e1ed376b60
+DIST wine-1.7.47.tar.bz2 22398577 SHA256 ba74f75aec400dc4b1d64ddc29560e4946837e73cb19d9c231604ff0147bbb2e SHA512 588bc143fc371c013b3565044ac14a22176c63fb79e7798a32cd75ec2dbf6b52a73529638254809aa3a4b3105067e96289b555436099c41622b8ffeb2b97a601 WHIRLPOOL 6545baa254f181fbe7a35b19e319faf7b21b838b91fddcab46ae65d8331407d62b36f78f20a19f97895c5c16059f18b3d23d6659658f8939611b171a408478ef
+DIST wine-1.7.8.tar.bz2 21463503 SHA256 30e17f5f863a09416f3d229666566b318dbb40f683d4ca6630012c60bb511804 SHA512 1fdaddb7909f818050854bf351d20f445cf6a5906b1bcc789c96ee8d5058c90815a91bbbc6444f3e4527748764f03ab5297585c174b433093a3354a827402fea WHIRLPOOL 3b5b18384ff04b80b936160c2c6e03676d69663c023f484981305c9272d0601b74cda5c5f7d56008b3900d702b1a4fe1929f16b1fba304a6480b076ffede663a
+DIST wine-1.7.9.tar.bz2 21323337 SHA256 79f99ecc24696915439c474c4953bb77652ab53f16b41daa4da270fe43279c5a SHA512 29f8aa715ebe47c8a06bd5f6a80cac3fb75b2ca7aa81648cc8aed5461cfd825e4da68b6209ca672dce42b968521cfd9bffffaadd2d85b904b55d99687a1c83d0 WHIRLPOOL 333fee72b2a0e9d6ab8a003712c38166bd27aaff384a2b940c089ecc846f7669c59efbeb5cdc2fc87a46d63b0d29d0335873bb7c22f05913bad430b81990241a
+DIST wine-gentoo-2013.06.24.tar.bz2 85442 SHA256 bfbf6b25e98f717320de2ede467e3628fbc749d936b8449f8477c9dc6f41e04b SHA512 b6819889314f6a6ea16c1332f4b177c43623116763969c31b23b61754cd304dd085f5d3eafbe847159331eb97dddd9b4c10699430129ea4a71da418c1fe175f0 WHIRLPOOL 227e0ac6569736d4ad5813cef49f775dae956f4fc9255de95753d5d3cba1bf6cf3db31d23d3702bb54d2e60c5a6f779b602f0efb2096e4c827c924565b273d00
+DIST wine-gentoo-2015.03.07.tar.bz2 85419 SHA256 f13f93dc49bbc33a294c4d511b6e01aec2d38bff77a1e44d07668291add1ab04 SHA512 bae1d2d5575d340d01f44008104f0e5ec0c4a4982995dec37d501594cd21d07a2b4ad4465c4273646d5bf6521996b4b82471097864be75342abe3e7d478a56bd WHIRLPOOL 0f254dd692e87a1f71dd19f6c1c8c59b8a91b994e75912a2e6e3ba5e875b85119fe497a331a95c2ce33bbf5f064143d23ee00275da92c494227de0807c9abb06
+DIST wine-mono-0.0.8.msi 46967296 SHA256 3dfc23bbc29015e4e538dab8b83cb825d3248a0e5cf3b3318503ee7331115402 SHA512 d3009f2301b0a006136e880025a736f24612faa7a954956896124ec7282d35b678f02658e8be12b1c02ee217e594a2c728a9258c36ccb346b186a4781951adbd WHIRLPOOL 1d4b2e88ebab1f603326a238cc908982c7e135a33340087e8645572838d2b6034764e9fe787bb890792dea4c0531d26f9a6a811a7c200edb99ab82f975179389
+DIST wine-mono-4.5.2.msi 52502528 SHA256 d9124edb41ba4418af10eba519dafb25ab4338c567d25ce0eb4ce1e1b4d7eaad SHA512 73c907f63b73836d5afd0753197358aaea43a74a47800f929ef0627112298256f1fa46d1b9ff297b117468d953cdeab21fb5962db13c5debbcb71004462df609 WHIRLPOOL 18d3544c6753c5a01917bfc1b694f31ce45213108527f13317ec0bb8b2d2339ce41800534967e067cd15cd186ef9e186a5d3252275e443dfa1a6ae3641d4d17c
+DIST wine-mono-4.5.4.msi 53706752 SHA256 20bced7fee01f25279edf07670c5033d25c2c9834a839e7a20410ce1c611d6f2 SHA512 307fab2ac50c4eaa5c3fb8446ceb2df0d95c0a9d7c1e6289ef1ec5cc660fa8fcb26025c9723ce2bc01afcaf7e9c4dd9939d1beba877f4f95f6f80d92d8187221 WHIRLPOOL ccd1fed03158dd309d2a1f88558e5ad0e2e43de5ba61ab82702132bd0cdf75db75dcc1a61b5cb2775fdf0ad51464f34d2b3629538b1737cbedb410b859ef092a
+DIST wine-mono-4.5.6.msi 53705216 SHA256 ac681f737f83742d786706529eb85f4bc8d6bdddd8dcdfa9e2e336b71973bc25 SHA512 4d8df04c1d0da09d1abe423dd271e5dd14a193d607fb54e214d2e340827f7c33829342d1580b6907d7cf466e70993d743c6e1ca9a026d4b6225dd7c1fc8b1386 WHIRLPOOL 9a68e502da0be6768e92d88f2ccace607300f3a331e0f9e1b6d60e9c6c2d4eb635b902f03e13aad73461dd5f0c2691c7b41958356ebb7f445e8def4282c675d3
+DIST wine-staging-1.7.18-1.tar.gz 874958 SHA256 127b1754928297883ab5423c0814c59afa8a60444603b5c3b74ae726e41442e6 SHA512 ac7e59914436cfd58fe1e5edc94956f8470bbf3f517f8e1017ca3d201b872aca6a277bb3074527b614db8123663cadf4d10faeeb048d011d7e81fdfe5c582819 WHIRLPOOL ac1913deddc127c55d90d9f7c5249f2866757fb86295bf61fed8641a39751dbfbf57d3c6234086f8cff9c5b1ec8c45effeef40f5973e9aa8550412134809938a
+DIST wine-staging-1.7.20.tar.gz 887293 SHA256 ac55daab4c6062e7c3f7eadd4ea632ddc01702c1abf859bc4928bb9691cc7d22 SHA512 2f5bd5b3bfe85c0dd0d611fc2512f5f4ecac11d639eb578a7319c01a426b8cf788031fd299ecb5b5ff2c0bb7fa72dcfb1541bb9c987913068843a5b712099fc1 WHIRLPOOL 9c19e8e371e121009bed38ffe0e8789e35a4b9629a39aace1b44b8f830bf1e30c0cbca1c3eae45960373bedde39a912b4e1178b7af942c92263c6e4f278148d0
+DIST wine-staging-1.7.21.tar.gz 883814 SHA256 d107eba41706adf039befe5a584e45225e7ebc502a11257227c378581ec22b96 SHA512 770ed2d46f5975de4a728314c3c38834c20f8c49bc5fa7eee36c870b9708404c157f6e1ac4b9ec9e5799ed3b14f825c0653d30a17d332f6b805c6255da0ddf28 WHIRLPOOL 898db4f1a3606e5645a7a1132e0b83264fa5d7c00f94a14fce067702ec3accb397db93fa0c0449df7962800c44e00825fa1cac55b76b5abe42670ad412d67e21
+DIST wine-staging-1.7.22.tar.gz 888759 SHA256 1aedbae07bb4b436eee680ef19633b99e2e34764803be717c5cf32f1a1e45c3c SHA512 75f1fe0de2c3d488cfd5c4365ab3b8cbbfdc88bda5edf89657c8c372e29b6240977db74a194f94c67748520eff35244be7da3b684c37571b2427a7ef36adf95f WHIRLPOOL 66a45a3e733c453beeefe829df235cde8ebb734abfd40662480eccc65a2134f469e4925b6f7ea8e7b24bee212f7f58783596745e4fe20b2afb6f4c67c80e910d
+DIST wine-staging-1.7.28.tar.gz 8388699 SHA256 2ce3f4329befb33fec80f856105ea9ada7ba3f4bdf6d07edca485d15b55fff34 SHA512 4100d1ba0f9c69108053e367fe603348e1e9da9863f16a027d2a7b576453c8f31e198019f82664ebc74771a8aa429c7a6c068e0ef191c6d00c4ad848533be77f WHIRLPOOL 62e71420c5ce2b42b6e12ba511fcd2e732d7a5df0353670ad3282b5b7b138781f87f697c9482baad604fe0c21f0bfc06e6988058698eef8051955ed0e962a8c4
+DIST wine-staging-1.7.29.tar.gz 8423703 SHA256 27fab2e3a16f1af4580328ec399bd383915cd8827855f7e77d69d8ddddee2ade SHA512 a923c8b46c50f013f2b5f87dc554a9cfeb77b60a8ee7822775f38922a2ef90b30967e2489c77a8f5cecc1771a5b19e81e43e17ca74ff904485e7ea13c115d1d2 WHIRLPOOL 32a0f1c7c7ce71354e2aae5c870caaf2b210f5bc2cfc4ac2ab0a1e14bc2ee913fad5c487cd3cca9cc5fe58482b7b3110bf59c8576b690c68ff5e31fb567b2d59
+DIST wine-staging-1.7.33.tar.gz 8759402 SHA256 30b7ecee549514ecd186689ae8eac15ed37507755025c8272d31e8fd4808b3f2 SHA512 b3b939c8d5af419a9305a16de93486f75197d28bc39be4ca0abdea3e194745bfb401ecf6e092f93c59f68255aa7f051ee847ad3c8521ce87ecbf91abccc900f6 WHIRLPOOL 657bc4d642e1c799c6e0b39ef627c8f6852ab8d511e86f96c54065d87fb144d25a97b1a2572e87a029084d568fda7bbdab7c2ba5255dc07f02691f46e9796960
+DIST wine-staging-1.7.34.tar.gz 8865976 SHA256 9e71b5d3ce0cd8c4c511c375bcdae74de33d96dbda1d1e70fc7eb8708ee018dc SHA512 8c6b269eec6890ac0e724553c7a537c91b2420dc7d2ee96ba6fba911ad959d6b17e71a4e690539f3024450f4a7801be516977b1d1351e5f22820fdd44c78b7b1 WHIRLPOOL 93d32676f7150184ecfd676310c666299c4fc5ee0b0c04d2020ab06f330c982f54fde38c0d8986e51a9515a349d36b4fbf9cb31fefb378671eee8f112eb69fd3
+DIST wine-staging-1.7.35.tar.gz 8896849 SHA256 f1663938c29ab20c493569a5eaba7711a0f0d47cf5e4b9988f97140de2599b16 SHA512 5bc3fa7dcd9a79c2b067ed4b4b1b02a047bb94b4fbfe6f35b8fbb857ed1cda53ea9de18873504025c535197ffd81b0819b422aa3c9ade57a255d01c6696f4e13 WHIRLPOOL 193c1c86abd62b7132ec5984db2ce8d297dae9a4e7ec6a8b99bbd9e2d101d3cc3e5a950ccb7eec30f60d10e1ecd4e3d0ea977e13648f427f0ffb9d09190d13eb
+DIST wine-staging-1.7.36.tar.gz 8966590 SHA256 1debec42e30fd5521498df7935f3eafd863921e353ed25e52c4e844c520bcc25 SHA512 8a059a510e2b60ded80e0cfc9da8aa2c57d3f5669d20e98b5010036f1d6f3522a7277ef83a2bd1b3777395309268f9f29e250e32b0abe85b1f5e80479b413a74 WHIRLPOOL f1622db4d1b6afab76296ae425fef7d26e47d683bf43ea848aae2e9579e91406c4cbbe02b32ebb8e55fbedc67fb5f8a5f8d897eedd3b57e2b05dafe181a87f7f
+DIST wine-staging-1.7.37.tar.gz 9001155 SHA256 db13e8d8f9319afefb73624a9c630b125613102eace9a1ef5e65e8113d65ff3f SHA512 598a98c3368a6a9879243253a6ec33fcbd687701c877b90d1490651a020424cef78bfea9957c83c120bb3cd1139da5008099c6e2fb92a9c3b4978608b957a9fd WHIRLPOOL d85e2b340f137783da661d7636acf4cb0e3f36878b9884450329935651bdd7f67ebc203696c43493170021fe7dd8ff7b5a5aa93883e227ac884ce39405cefd76
+DIST wine-staging-1.7.38.tar.gz 9047747 SHA256 b77fc0913c972c0cb2b3fcc3d7627a838ba05cb876396cab526f518564f2f936 SHA512 125937505308a974840d810beb9df10d57cf488b173836c5debf71a96cc11cd3dfee666960768db361edd3b280858f2e6db5eaa8d81f4b487b7c53a0f8fef13c WHIRLPOOL c5cb14dd7527752a0496e343d7b12a53c9df629c027d746e33ac3c25ad20bfebd22c40ceb31bd5e70d3ea2a9188efe076eceab30c3c3f2d519fb31164f189f5a
+DIST wine-staging-1.7.39.tar.gz 9096658 SHA256 b7b3ba39e2a8829a6fd6aef4b3701dd0009eebc85539ac946e31de6d7fe36649 SHA512 d14780c30303a17f575f22adeab5cc026c2f41520d47dbb7ec70b939252eae656070eb8532cf1a42cca2b1c9c589a44081d12b2647b0d97c3c90b896a7433d23 WHIRLPOOL 8d71a49c3172261e83193ccfe85dfbd94421ee20063f4127ecb328450916cddbea742c59c09c34e10035d9f2fa0df0ebd0d68bbc6e90b92c1aa1a1071a26b055
+DIST wine-staging-1.7.40.tar.gz 9129843 SHA256 d2cafa5e847e1aecb82bb1dd42ea7729f749176c3ddc549c6b422c8ba74b89d5 SHA512 7688f9e2178335b8c1606673921368faa1532c766bf2a60c9be1d9640719acf024122270084afc892195878bfcadb6aea6cbf971a6bb2112260b3840d94ab994 WHIRLPOOL b58e5dcdbbb1632ed8d8bf98c34396c0a8e1d108d557d130ab9aceaa9efd9b9002eef38c7829196eae0736c1002a1e1c723bcdcf0a819e48a1394e615c997262
+DIST wine-staging-1.7.41.tar.gz 9136024 SHA256 c34f773003e25195fd761bbaff517f31deaebb8d46fc94de14b9581728138174 SHA512 89d867b6c869221f441b7bd5cb473f4179c2fa5453ac86df8801838dc5eca64fd2d33c38a73b74972cc2fd97c1f762c1fd60f2857074c71942687cd027e08bdb WHIRLPOOL 91a17eb37ae65ca41e397935994b22b45e4d2eac3b3bbf3cffcfc400084fa83e43ee5e29248a028363430251b1485b499ae37fe2e0668df971d8eb77aa495257
+DIST wine-staging-1.7.42.tar.gz 9146373 SHA256 71dc4b0063446347769234075e7b76e5214a54eccee445a72cb7467bd0a85b3d SHA512 9d8a468e4eb74ec45ca2554d4d6c38e32e8bfdfcb768e4bbe484204fb884bd8194ffadc2fc4dcfa561492e5605667a6aac24704fbff17e2adbf9407dcbc7e3a9 WHIRLPOOL 3560c07b95b8555d81425fa42e689a0040cf62a1a17ec6c2d081c4d4b8acf53176c7041be0db94b438b91b3a20d4994ea127c66e287a75286b0d436cc6466d54
+DIST wine-staging-1.7.43.tar.gz 9181556 SHA256 bed2db992bf7926e8f2cf45c4cbfe37a15e13a10639cd69be290b658f5e5b9f5 SHA512 b2e0ae99acdc77717a00ba1c25274c0d0cc4ff6cfc3d794ed691c9ab5fa320c15f0e3bd793dfee3e9c86985e676608c7a6916eb4c47c94eae907e6c498fe80c8 WHIRLPOOL e010e9c59e7553219f2866884c37014fbb76556fe808aca9d00dcbdb8c0cb111ffccb07bd323ece84261e5cd50e32dedcba9ca4ae3c1d692e64e232e6d561829
+DIST wine-staging-1.7.44.tar.gz 9194166 SHA256 ae2db1fe506c936f9e3c5664584126d58db8305c47b8155c636b8a8843a0ae20 SHA512 e01ff7d458a3162ad19577d127660bcf953c048201a2f98aa23fc5bf19e232af3e155e64e2d0fac33fdf01a9508be6e45a663e4151ee5b50b6ea2ce56a1e0beb WHIRLPOOL 915426aab0142a4142938a119339541f7a72d6a3e1c7fbd46c0dc9ad7178a56951e5a996f4b13f50bf7581a13607d15e3ae9796cd39974e069928c358400cc3f
+DIST wine-staging-1.7.45.tar.gz 9216075 SHA256 06180e1189e8669892e8b3d640810306b0310c508842272eccc65034534e9411 SHA512 051f10237306cac13dcfba0ee3453facbadf821a2eb5751d507bfcf86a936a08a236e1787d025378e3039e0fe91958bbb64b1fa90f5ea1a1b53d1d53788a5eb2 WHIRLPOOL 0277059d933cad1ae3449ec4028e7935f5a73c2790629ed0d0d6321bac0804caeaed282eef9fa1282ab85454123781c8cf2061e0220478685fc76405f3876757
+DIST wine-staging-1.7.46.tar.gz 9204220 SHA256 a3b681f38917889bc6dce3ea3e78e91da75789f212b69fd1a10a5bac329761d3 SHA512 24861e1adf882465c3f9f6e0aee47776dd18418342eff500007d36eacfadc166bdea40a53318c7fce3871742559904a1d757ea9a9c0f0624da678a3e9ea2d400 WHIRLPOOL d091925e99dc830ff1a6e49ec9c6f7cd1fc7e40920be2e4a5a10c4b7bc3a5b2109487eb32c5426f31b22baf53216b9b7caeb1b4faf6be8c2b5ecc8233d4ae198
+DIST wine-staging-1.7.47.tar.gz 9166592 SHA256 75aef17c68d1e54b922529832edadca5951e6a37637aad696cfe5abb93d9ca15 SHA512 b3feb61040a727b50fc3efb08441a800b08b4f7d61a00fc68175a6187486a701cc4737f9543119c32ed0c5f141d73ace396114337082cf7978a3437f4217844a WHIRLPOOL 69bead0fa0748dab8d0480d20052b3a75798d42bc32d55b9b254fba7774dddda48642c4e2f116f2c3d813f97e0827232945b3adaad22a827a43be8de12698bbc
+DIST wine_gecko-2.21-x86.msi 20871680 SHA256 f01fafa6d7aab995c38add77315c4cbc2f32f52d5d6a9350056f42b62d631fd8 SHA512 f4ca9ca5b876dc39e906991e58c6da8ef4103782f83ba781ff27556c0ebdab7fe10c14f0551e900442a5d57a2c619da6e5ed6ed42323edcdd55ce9789c4c83ac WHIRLPOOL d1db97175b047652499c97c968b71c08c5b44774423f22ae626f89b4dde3d03b46295e5caae228f1f8614209e943e8246854b478eef3abb186e8de4c341b0a0d
+DIST wine_gecko-2.21-x86_64.msi 21646336 SHA256 bc370bdc899f66d98f31c4d410a6952aa82c0c9c0a0ec27f2a11243c9b412c3f SHA512 2a48a7697beba4e45816a9eff09e181de353d8c93e02a70108fa77d27136cd5cd75b21c42caa7702a09f86544669ae2bbfc6975b1fc0d7fcb20150a4bc4ea514 WHIRLPOOL 2fce9b9a190a52c173551d47428dd8b8dc54d5878682733e0006a3f06f216cd9f47a88ada49f92fa5697ece8b2942a88f937bd2722b4cb85d2c35c19bda29b85
+DIST wine_gecko-2.24-x86.msi 22373888 SHA256 6e38acae87ea66e2c1e8f2f0afe88f89eed3e6e0b431cd3da38dea814b71202c SHA512 f158d28ca09bc900a2680892e7ac10770e06050a9251e1ec3a953fee0bf9b1c326e166f92fb88a4648297b6587c91a5ef5af35f267bb2ba5f679da4c8fdb6898 WHIRLPOOL bbe7a2572d89dc5e0347ba11b2014bac79fc4427d7551655313a46b147a79c1607b7f46596877c459ddaa0e202337fb3d217429ddd6a4df49ee33b373a788487
+DIST wine_gecko-2.24-x86_64.msi 23608320 SHA256 47557da68bcb2aedaebb93af73275aac96ba23e896bd98f25f2acbfd216d9cc8 SHA512 45ce0dcf42c3e2fe2198092812242e3467b19db4a4946e0b1a2d6327fd48aa936fb85cc1930bace6eaba0c61bff3a6536767ba0a91a0f085f307d1bddd171f0c WHIRLPOOL b6ba7c784d3a79d7afc11f0e12f0372b52b9f194eedfd083abed36a461e7301d2dd936be3be12619364f6ac5aae9cfbfb7fc47141bff92b62826f209365210ec
+DIST wine_gecko-2.34-x86.msi 28269568 SHA256 956c26bf302b1864f4d7cb6caee4fc83d4c1281157731761af6395b876e29ca7 SHA512 abc5a4ef496ee407579cd2f284cbcb03306a08cbf3cc4952f3339286aefb36737d2d641d8e72b10a02a4d71478964e676812452c12ff7cb6aaeaf5210408c358 WHIRLPOOL ef72209b4c63fc81f787644046c5fd168b8a5a4e7e5c8652eb7a78ce3b433d888512bdd5aab6ea07248c9c148175006666cd7a800bcfb2b3a73de3f50d1fab76
+DIST wine_gecko-2.34-x86_64.msi 29802496 SHA256 0f2c1b24c4cd1b3fa3fb3fe31dcd9ee162446b1f3370c0a18c8cb03a0c1a1070 SHA512 6bc69e1c8612533b3f37c16782833bca0e3aaa8ae872fe9f347ee081575c55c03866d6c71a5fb767bf4c3b012ae72f7d9c384d6d25c2584bf349126521e8f463 WHIRLPOOL a03df2c16088cf573c9273a59ba6998455917a49e0bf84028136d0ecff65a91f20edbecec55455b742682dcee5f5e618b8f2e8c15c71625642cd8b67a7774bd0
+DIST wine_gecko-2.36-x86.msi 29718016 SHA256 afa457ce8f9885225b6e549dd6f154713ce15bf063c23e38c1327d2f869e128a SHA512 6099240fb76368ed9bb6b775d5972b6124972ace92ccfe1051caeb8884d9e12d40c35220419f0d02443584bf2d82799dfca8206410d171470ce15903703924f0 WHIRLPOOL 4b8fc20a8b228268f3407ca425427a2d91f81ff9e6f0860d4f3eb156c97e3ec1ea83ca3510ee10bfb37598f91c3323a46ba75eace3334632b26cbd45959dc908
+DIST wine_gecko-2.36-x86_64.msi 31222784 SHA256 701b84004bf584a2dae7c1296121172c933321cb795c3817b64435fd3364ed44 SHA512 814b13268beeac4d0ace4ab62dbc29ccd92fc13a135499b8ea5a14355992d576268e1e401b28906e8379a826159c5bb051ad274a1e64dd0d5424d495f8e10e10 WHIRLPOOL dbd0e275bdca2ff7a1930daa62d23fd438a90f71b0fed1096b34b8d00a3f51cb91468ce61acaa9361a57deb9f3cfe70a21d16fc23de95cb4e0f7f957d4727010
+DIST winepulse-patches-1.7.10.tar.bz2 49205 SHA256 7330b4552b572244bbe99c16005d725eaf382995c986add170474381b90df468 SHA512 ef3a5477bc5803bfba609dc3299a7c07833958628d1aff01d100da57c0d270344ee326649206708c50c2a12b025f987a4e0f1dee9126e52e2778b256c45ba567 WHIRLPOOL b40088d8665f3cc57b4936774ac6dc2e6b005d75aa7c7385248ce35e5cf6e168ae212771f771b68dbf91fc5034b7ba54f907e93283cc2eddaa18e825d9b734a9
+DIST winepulse-patches-1.7.12.tar.bz2 49171 SHA256 6c5b3f46ea1c4615c49ee0f6f65936cf650cce6640f0feb4236c707064a9d392 SHA512 ec41f6024d6e2325f14f8caa15bbe38c8dca6c69beb5343063365f58dd8b7edbbc4d24ad176de72cf0e37acae03eb9769b68fcbd40a672680e06156f4a59b12c WHIRLPOOL de8a33ee784606e76a60166e3e29a1fb748ce4b3af1db136558888bd09bb0a044e4a1a9a61ce3de59d55f93c98575ac8d77c3ff17de4d69cda3b8fbd8f6c33c5
+DIST winepulse-patches-1.7.20.tar.bz2 52583 SHA256 95d0febb72baa73d5faeb82de774b49eaa9e38aa74448ea313c62f6eb1f4faf3 SHA512 9d7108fd2076d9a19dff5e72a25aa57f0946e6d17cfcc07422cce3fca34dfe04521d09cbfe611701781e10ad1f0d00562cba974214a4d189b16f6ded96ef61bf WHIRLPOOL 815d1cbf43b64a7a1a3aae965c6521ee3c6147458913f13236ccec7848340663d8372280f53eed381f3f68969bb06b272c30c605c290e31a678fc8d01575a766
+DIST winepulse-patches-1.7.21.tar.bz2 52679 SHA256 38daf95ea99cf831c56634e1dd4a4ea5fa4c11f570dfbddff06ceb7cd05e7303 SHA512 8feb729461a0e9791eeae11bd354407bdb389aefd1d30454781cd56072deeb507dccf5a825e580194d1a26c2c83b631d38967011c5360c46340dc3ceb7c0096d WHIRLPOOL e5cd496a7a66036825cff73dcdb76d787948b05d604b26042b024f7c9e991f4ea61efbd41a53fe667bd023e04cd5763f806166ab3aa9de757105ee3fbe6f65e8
+DIST winepulse-patches-1.7.3.tar.bz2 49163 SHA256 893dc6251984f6a7306dc8064c50a6a605921094f84feb436c23be3b9e5d077a SHA512 f04b33479c92ce31df74ea49b8582cee2f9d7a4cdf132f212f021da89b19dda8e5a4b0daaec81533b100ef0af023157cf43581ab75fa263da3c1a5d712ec3e9d WHIRLPOOL ae2a599d7bdb49ce77cc56844ff74c7fd62b1f1164e9f7fdec499244fd609799c0fd7421d29ffda7e9fb599962f75c2ebe44ce72e0f0a80677e140f759ab22f9
+DIST winepulse-patches-1.7.4.tar.bz2 49182 SHA256 26cc1ab6d91c45b4d83f07bbd7f43c9824470700a58325f0a1bfc1b76bfe419f SHA512 55095dcd3ebd1560316382ee5f625203589ba8ac2437f7993bee0edf61004d3c0cdba0aabc2e9aed3d195d8eda4088241766dde4c44564e81ea99cc47404cdff WHIRLPOOL 978f3bcc3cc14098b604cd737d9fa6911a5c3b76773a060586ba183a055cdc25e3b436c262c813094c7c2158ae607bcb3020738da16bbe2c48c595728755f98c
+DIST winepulse-patches-1.7.8.tar.bz2 49140 SHA256 0fd31ea7fec8817561a7b304bbfad6bdd014eb566b0c533e15773064bca555ad SHA512 18c88d4da37714d0216c01929eb92c99161fdf7024d8516512fc2585bc8d5a700fb1b5eb9fb667149e104305f366c867973f41b688a04f63e7cce76f5d85389a WHIRLPOOL 60dfeeb1d51c9ea7730ff1e9263d44fbcf3509e6ae68df1e3d30d965999f19525979f64617494bb1c3e1712c7117f30bebfbcbc75b1b08ba1f1e033720b0cacc
diff --git a/app-emulation/wine/files/wine-1.4_rc2-multilib-portage.patch b/app-emulation/wine/files/wine-1.4_rc2-multilib-portage.patch
new file mode 100644
index 000000000000..be6ffc56d7cc
--- /dev/null
+++ b/app-emulation/wine/files/wine-1.4_rc2-multilib-portage.patch
@@ -0,0 +1,40 @@
+https://bugs.gentoo.org/show_bug.cgi?id=395615
+
+Explicitly add the required -m32/m64 to *FLAGS; this overrides any
+arch-specific -m* flags that may have been appended by multilib-portage.
+
+Even though -m32/m64 is now added to *FLAGS, -m32/m64 still has to be
+explicitly added to CC and CXX due to wine's build system. For example,
+winegcc saves the build-time value of CC and uses it at runtime.
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -133,12 +133,18 @@
+ then
+ CC="$CC -m64"
+ CXX="$CXX -m64"
++ CFLAGS="$CFLAGS -m64"
++ LDFLAGS="$LDFLAGS -m64"
++ CXXFLAGS="$CXXFLAGS -m64"
+ host_cpu="x86_64"
+ notice_platform="64-bit "
+ AC_SUBST(TARGETFLAGS,"-m64")
+ else
+ CC="$CC -m32"
+ CXX="$CXX -m32"
++ CFLAGS="$CFLAGS -m32"
++ LDFLAGS="$LDFLAGS -m32"
++ CXXFLAGS="$CXXFLAGS -m32"
+ host_cpu="i386"
+ notice_platform="32-bit "
+ AC_SUBST(TARGETFLAGS,"-m32")
+@@ -150,6 +156,9 @@
+ then
+ CC="$CC -m32"
+ CXX="$CXX -m32"
++ CFLAGS="$CFLAGS -m32"
++ LDFLAGS="$LDFLAGS -m32"
++ CXXFLAGS="$CXXFLAGS -m32"
+ AC_MSG_CHECKING([whether $CC works])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM()],AC_MSG_RESULT([yes]),
+ [AC_MSG_RESULT([no])
diff --git a/app-emulation/wine/files/wine-1.5.17-osmesa-check.patch b/app-emulation/wine/files/wine-1.5.17-osmesa-check.patch
new file mode 100644
index 000000000000..823619271315
--- /dev/null
+++ b/app-emulation/wine/files/wine-1.5.17-osmesa-check.patch
@@ -0,0 +1,38 @@
+From 1ede664b18bd8a88359a3cebb291ad49833ee033 Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gentoo.org>
+Date: Tue, 7 Aug 2012 01:29:01 -0400
+Subject: [PATCH] Do not check for libGL symbols when checking libOSMesa
+
+If mesa had been built with shared glapi, glAccum is not available in
+libOSMesa without explicitly linking to libGL. In addition, in
+mesa-8.0.x and earlier, libOSMesa needs to be explicitly linked to
+libglapi if mesa was built with shared glapi, see
+https://bugs.gentoo.org/show_bug.cgi?id=399813
+And in mesa-8.1.x, libOSMesa in addition needs libdl, libpthread, and
+libstdc++, see https://bugs.gentoo.org/show_bug.cgi?id=431832
+---
+ configure.ac | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index cc32c24..275b792 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1128,7 +1128,13 @@ This probably prevents linking to OpenGL. Try deleting the file and restarting c
+
+ if test "x$with_osmesa" != "xno"
+ then
+- WINE_CHECK_SONAME(OSMesa,glAccum,,,[$X_LIBS $X_PRE_LIBS $XLIB -lm $X_EXTRA_LIBS])
++ WINE_CHECK_SONAME(OSMesa,OSMesaCreateContext,,,[$X_LIBS $X_PRE_LIBS $XLIB -lm $X_EXTRA_LIBS])
++ if test "x$ac_cv_lib_soname_OSMesa" = "x"; then
++ osmesa_save_CC=$CC
++ CC=$CXX
++ WINE_CHECK_SONAME(OSMesa,OSMesaCreateContext,,,[-lglapi -lpthread -ldl $X_LIBS $X_PRE_LIBS $XLIB -lm $X_EXTRA_LIBS])
++ CC=$osmesa_save_CC
++ fi
+ WINE_NOTICE_WITH(osmesa,[test "x$ac_cv_lib_soname_OSMesa" = "x"],
+ [libOSMesa ${notice_platform}development files not found (or too old), OpenGL rendering in bitmaps won't be supported.])
+ fi
+--
+1.8.0
+
diff --git a/app-emulation/wine/files/wine-1.5.26-winegcc.patch b/app-emulation/wine/files/wine-1.5.26-winegcc.patch
new file mode 100644
index 000000000000..2045e343401b
--- /dev/null
+++ b/app-emulation/wine/files/wine-1.5.26-winegcc.patch
@@ -0,0 +1,59 @@
+http://bugs.gentoo.org/260726
+
+diff --git a/tools/winebuild/main.c b/tools/winebuild/main.c
+index 16b4165..5c77267 100644
+--- a/tools/winebuild/main.c
++++ b/tools/winebuild/main.c
+@@ -48,10 +48,13 @@ int link_ext_symbols = 0;
+ int force_pointer_size = 0;
+ int unwind_tables = 0;
+
++#undef FORCE_POINTER_SIZE
+ #ifdef __i386__
+ enum target_cpu target_cpu = CPU_x86;
++#define FORCE_POINTER_SIZE
+ #elif defined(__x86_64__)
+ enum target_cpu target_cpu = CPU_x86_64;
++#define FORCE_POINTER_SIZE
+ #elif defined(__powerpc__)
+ enum target_cpu target_cpu = CPU_POWERPC;
+ #elif defined(__arm__)
+@@ -611,6 +614,10 @@ int main(int argc, char **argv)
+ signal( SIGTERM, exit_on_signal );
+ signal( SIGINT, exit_on_signal );
+
++#ifdef FORCE_POINTER_SIZE
++ force_pointer_size = sizeof(size_t);
++#endif
++
+ output_file = stdout;
+ argv = parse_options( argc, argv, spec );
+
+diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
+index 06aa200..c44d2e3 100644
+--- a/tools/winegcc/winegcc.c
++++ b/tools/winegcc/winegcc.c
+@@ -213,10 +213,13 @@ struct options
+ strarray* files;
+ };
+
++#undef FORCE_POINTER_SIZE
+ #ifdef __i386__
+ static const enum target_cpu build_cpu = CPU_x86;
++#define FORCE_POINTER_SIZE
+ #elif defined(__x86_64__)
+ static const enum target_cpu build_cpu = CPU_x86_64;
++#define FORCE_POINTER_SIZE
+ #elif defined(__powerpc__)
+ static const enum target_cpu build_cpu = CPU_POWERPC;
+ #elif defined(__arm__)
+@@ -1258,6 +1261,9 @@ int main(int argc, char **argv)
+ opts.linker_args = strarray_alloc();
+ opts.compiler_args = strarray_alloc();
+ opts.winebuild_args = strarray_alloc();
++#ifdef FORCE_POINTER_SIZE
++ opts.force_pointer_size = sizeof(size_t);
++#endif
+
+ /* determine the processor type */
+ if (strendswith(argv[0], "winecpp")) opts.processor = proc_cpp;
diff --git a/app-emulation/wine/files/wine-1.6-memset-O3.patch b/app-emulation/wine/files/wine-1.6-memset-O3.patch
new file mode 100644
index 000000000000..75372f869141
--- /dev/null
+++ b/app-emulation/wine/files/wine-1.6-memset-O3.patch
@@ -0,0 +1,21 @@
+Avoid "undefined reference to `memset'" error when building with
+USE=custom-cflags and -O3 in CFLAGS with gcc-4.8.
+
+See:
+
+http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56888
+http://bugs.winehq.org/show_bug.cgi?id=33521
+https://bugs.gentoo.org/show_bug.cgi?id=480508
+
+diff --git a/configure.ac b/configure.ac
+index d8033cf..fe7cc7d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1767,6 +1767,7 @@ then
+
+ dnl Check for some compiler flags
+ WINE_TRY_CFLAGS([-fno-builtin],[AC_SUBST(BUILTINFLAG,"-fno-builtin")])
++ WINE_TRY_CFLAGS([-fno-tree-loop-distribute-patterns])
+ WINE_TRY_CFLAGS([-fno-strict-aliasing])
+ dnl clang needs to be told to fail on unknown options
+ saved_CFLAGS=$CFLAGS
diff --git a/app-emulation/wine/files/wine-1.7.0-freetype-header-location.patch b/app-emulation/wine/files/wine-1.7.0-freetype-header-location.patch
new file mode 100644
index 000000000000..aba4b89860ea
--- /dev/null
+++ b/app-emulation/wine/files/wine-1.7.0-freetype-header-location.patch
@@ -0,0 +1,351 @@
+From 67f9b6e3c5d2397446d39ab454f691c1ee46d2c0 Mon Sep 17 00:00:00 2001
+From: Alexandre Julliard <julliard@winehq.org>
+Date: Sat, 30 Nov 2013 11:22:25 +0100
+Subject: [PATCH] configure: Update FreeType configure checks for the changed
+ headers location.
+
+---
+ configure | 78 +++++++++++++++------------------------------------
+ configure.ac | 40 +++++++-------------------
+ dlls/gdi32/freetype.c | 62 ++++++++++++++--------------------------
+ include/config.h.in | 33 ----------------------
+ 4 files changed, 54 insertions(+), 159 deletions(-)
+
+diff --git a/configure b/configure
+index 80348f3..9b2f2c2 100755
+--- a/configure
++++ b/configure
+@@ -11419,7 +11419,21 @@ test "$cross_compiling" = yes || FREETYPE_LIBS=${FREETYPE_LIBS:-`(freetype-confi
+ FREETYPE_LIBS=${FREETYPE_LIBS:-"-lfreetype"}
+ ac_save_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -lfreetype" >&5
++for ac_header in ft2build.h
++do :
++ ac_fn_c_check_header_mongrel "$LINENO" "ft2build.h" "ac_cv_header_ft2build_h" "$ac_includes_default"
++if test "x$ac_cv_header_ft2build_h" = xyes; then :
++ cat >>confdefs.h <<_ACEOF
++#define HAVE_FT2BUILD_H 1
++_ACEOF
++
++fi
++
++done
++
++ if test "$ac_cv_header_ft2build_h" = "yes"
++ then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -lfreetype" >&5
+ $as_echo_n "checking for -lfreetype... " >&6; }
+ if ${ac_cv_lib_soname_freetype+:} false; then :
+ $as_echo_n "(cached) " >&6
+@@ -11461,7 +11475,7 @@ fi
+ if test "x$ac_cv_lib_soname_freetype" = "x"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+ $as_echo "not found" >&6; }
+- ft_lib=no
++ FREETYPE_LIBS=""
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_soname_freetype" >&5
+ $as_echo "$ac_cv_lib_soname_freetype" >&6; }
+@@ -11470,51 +11484,11 @@ cat >>confdefs.h <<_ACEOF
+ #define SONAME_LIBFREETYPE "$ac_cv_lib_soname_freetype"
+ _ACEOF
+
+- ft_lib=yes
+-fi
+- if test "$ft_lib" = "yes"
+- then
+- for ac_header in ft2build.h \
+- freetype/freetype.h \
+- freetype/ftglyph.h \
+- freetype/fttypes.h \
+- freetype/tttables.h \
+- freetype/ftsnames.h \
+- freetype/ttnameid.h \
+- freetype/ftoutln.h \
+- freetype/ftwinfnt.h \
+- freetype/ftmodapi.h \
+- freetype/ftlcdfil.h
+-do :
+- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_FT2BUILD_H
+-# include <ft2build.h>
+-#endif
+-"
+-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+- cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+-_ACEOF
+-
+-fi
+-
+-done
+-
+- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+-/* end confdefs.h. */
+-#include <ft2build.h>
+-#include <freetype/fttrigon.h>
+-_ACEOF
+-if ac_fn_c_try_cpp "$LINENO"; then :
+
+-$as_echo "#define HAVE_FREETYPE_FTTRIGON_H 1" >>confdefs.h
++$as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
+
+- wine_cv_fttrigon=yes
+-else
+- wine_cv_fttrigon=no
+-fi
+-rm -f conftest.err conftest.i conftest.$ac_ext
+- ac_fn_c_check_type "$LINENO" "FT_TrueTypeEngineType" "ac_cv_type_FT_TrueTypeEngineType" "#include <freetype/ftmodapi.h>
++ ac_fn_c_check_type "$LINENO" "FT_TrueTypeEngineType" "ac_cv_type_FT_TrueTypeEngineType" "#include <ft2build.h>
++#include FT_MODULE_H
+ "
+ if test "x$ac_cv_type_FT_TrueTypeEngineType" = xyes; then :
+
+@@ -11525,15 +11499,9 @@ _ACEOF
+
+ fi
+
+- if test "$ac_cv_header_freetype_freetype_h" = "yes" -a "$wine_cv_fttrigon" = "yes"
+- then
+-
+-$as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
+-
+- else
+- FREETYPE_LIBS=""
+- fi
++fi
+ else
++ FREETYPE_CFLAGS=""
+ FREETYPE_LIBS=""
+ fi
+ CPPFLAGS=$ac_save_CPPFLAGS
+@@ -11541,14 +11509,14 @@ test -z "$FREETYPE_CFLAGS" || FREETYPE_CFLAGS=`echo " $FREETYPE_CFLAGS" | sed 's
+ test -z "$FREETYPE_LIBS" || FREETYPE_LIBS=`echo " $FREETYPE_LIBS" | sed 's/ -L\([^/]\)/ -L\$(top_builddir)\/\1/g'`
+
+ fi
+-if test "x$ac_cv_header_freetype_freetype_h" != xyes -o "x$wine_cv_fttrigon" != xyes; then :
++if test "x$ac_cv_lib_soname_freetype" = x; then :
+ case "x$with_freetype" in
+ xno) ;;
+ *) as_fn_error $? "FreeType ${notice_platform}development files not found. Fonts will not be built.
+ Use the --without-freetype option if you really want this." "$LINENO" 5 ;;
+ esac
+ fi
+-test "x$ac_cv_header_freetype_freetype_h" = xyes -a "x$wine_cv_fttrigon" = xyes || enable_fonts=${enable_fonts:-no}
++test "x$ac_cv_lib_soname_freetype" = x && enable_fonts=${enable_fonts:-no}
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for parport header/ppdev.h" >&5
+ $as_echo_n "checking for parport header/ppdev.h... " >&6; }
+diff --git a/configure.ac b/configure.ac
+index 81b7027..c4021b4 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1463,42 +1463,22 @@ then
+ WINE_PACKAGE_FLAGS(FREETYPE,[freetype2],[-lfreetype],
+ [`(freetype-config --cflags || freetype2-config --cflags) 2>/dev/null`],
+ [`(freetype-config --libs || freetype2-config --libs) 2>/dev/null`],
+- [WINE_CHECK_SONAME(freetype,FT_Init_FreeType,[ft_lib=yes],[ft_lib=no],[$FREETYPE_LIBS])
+- if test "$ft_lib" = "yes"
++ [AC_CHECK_HEADERS([ft2build.h])
++ if test "$ac_cv_header_ft2build_h" = "yes"
+ then
+- AC_CHECK_HEADERS(ft2build.h \
+- freetype/freetype.h \
+- freetype/ftglyph.h \
+- freetype/fttypes.h \
+- freetype/tttables.h \
+- freetype/ftsnames.h \
+- freetype/ttnameid.h \
+- freetype/ftoutln.h \
+- freetype/ftwinfnt.h \
+- freetype/ftmodapi.h \
+- freetype/ftlcdfil.h,,,
+- [#ifdef HAVE_FT2BUILD_H
+-# include <ft2build.h>
+-#endif])
+- AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <ft2build.h>
+-#include <freetype/fttrigon.h>]])],[AC_DEFINE(HAVE_FREETYPE_FTTRIGON_H, 1,
+- [Define if you have the <freetype/fttrigon.h> header file.])
+- wine_cv_fttrigon=yes],[wine_cv_fttrigon=no])
+- AC_CHECK_TYPES(FT_TrueTypeEngineType,,,[#include <freetype/ftmodapi.h>])
+- dnl Check that we have at least freetype/freetype.h
+- if test "$ac_cv_header_freetype_freetype_h" = "yes" -a "$wine_cv_fttrigon" = "yes"
+- then
+- AC_DEFINE(HAVE_FREETYPE, 1, [Define if FreeType 2 is installed])
+- else
+- FREETYPE_LIBS=""
+- fi
++ WINE_CHECK_SONAME(freetype,FT_Init_FreeType,
++ [AC_DEFINE(HAVE_FREETYPE, 1, [Define if FreeType 2 is installed])
++ AC_CHECK_TYPES(FT_TrueTypeEngineType,,,[#include <ft2build.h>
++#include FT_MODULE_H])],
++ [FREETYPE_LIBS=""],[$FREETYPE_LIBS])
+ else
++ FREETYPE_CFLAGS=""
+ FREETYPE_LIBS=""
+ fi])
+ fi
+-WINE_ERROR_WITH(freetype,[test "x$ac_cv_header_freetype_freetype_h" != xyes -o "x$wine_cv_fttrigon" != xyes],
++WINE_ERROR_WITH(freetype,[test "x$ac_cv_lib_soname_freetype" = x],
+ [FreeType ${notice_platform}development files not found. Fonts will not be built.])
+-test "x$ac_cv_header_freetype_freetype_h" = xyes -a "x$wine_cv_fttrigon" = xyes || enable_fonts=${enable_fonts:-no}
++test "x$ac_cv_lib_soname_freetype" = x && enable_fonts=${enable_fonts:-no}
+
+ dnl **** Check for parport (currently Linux only) ****
+ AC_CACHE_CHECK([for parport header/ppdev.h], ac_cv_c_ppdev,
+diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
+index fb4f2af..e230299 100644
+--- a/dlls/gdi32/freetype.c
++++ b/dlls/gdi32/freetype.c
+@@ -77,6 +77,23 @@
+ #undef SetRectRgn
+ #endif /* HAVE_CARBON_CARBON_H */
+
++#ifdef HAVE_FT2BUILD_H
++#include <ft2build.h>
++#include FT_FREETYPE_H
++#include FT_GLYPH_H
++#include FT_TYPES_H
++#include FT_TRUETYPE_TABLES_H
++#include FT_SFNT_NAMES_H
++#include FT_TRUETYPE_IDS_H
++#include FT_OUTLINE_H
++#include FT_TRIGONOMETRY_H
++#include FT_MODULE_H
++#include FT_WINFONTS_H
++#ifdef FT_LCD_FILTER_H
++#include FT_LCD_FILTER_H
++#endif
++#endif /* HAVE_FT2BUILD_H */
++
+ #include "windef.h"
+ #include "winbase.h"
+ #include "winternl.h"
+@@ -95,43 +112,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(font);
+
+ #ifdef HAVE_FREETYPE
+
+-#ifdef HAVE_FT2BUILD_H
+-#include <ft2build.h>
+-#endif
+-#ifdef HAVE_FREETYPE_FREETYPE_H
+-#include <freetype/freetype.h>
+-#endif
+-#ifdef HAVE_FREETYPE_FTGLYPH_H
+-#include <freetype/ftglyph.h>
+-#endif
+-#ifdef HAVE_FREETYPE_TTTABLES_H
+-#include <freetype/tttables.h>
+-#endif
+-#ifdef HAVE_FREETYPE_FTTYPES_H
+-#include <freetype/fttypes.h>
+-#endif
+-#ifdef HAVE_FREETYPE_FTSNAMES_H
+-#include <freetype/ftsnames.h>
+-#endif
+-#ifdef HAVE_FREETYPE_TTNAMEID_H
+-#include <freetype/ttnameid.h>
+-#endif
+-#ifdef HAVE_FREETYPE_FTOUTLN_H
+-#include <freetype/ftoutln.h>
+-#endif
+-#ifdef HAVE_FREETYPE_FTTRIGON_H
+-#include <freetype/fttrigon.h>
+-#endif
+-#ifdef HAVE_FREETYPE_FTWINFNT_H
+-#include <freetype/ftwinfnt.h>
+-#endif
+-#ifdef HAVE_FREETYPE_FTMODAPI_H
+-#include <freetype/ftmodapi.h>
+-#endif
+-#ifdef HAVE_FREETYPE_FTLCDFIL_H
+-#include <freetype/ftlcdfil.h>
+-#endif
+-
+ #ifndef HAVE_FT_TRUETYPEENGINETYPE
+ typedef enum
+ {
+@@ -186,7 +166,7 @@ MAKE_FUNCPTR(FT_Vector_Transform);
+ MAKE_FUNCPTR(FT_Vector_Unit);
+ static FT_Error (*pFT_Outline_Embolden)(FT_Outline *, FT_Pos);
+ static FT_TrueTypeEngineType (*pFT_Get_TrueType_Engine_Type)(FT_Library);
+-#ifdef HAVE_FREETYPE_FTLCDFIL_H
++#ifdef FT_LCD_FILTER_H
+ static FT_Error (*pFT_Library_SetLcdFilter)(FT_Library, FT_LcdFilter);
+ #endif
+
+@@ -924,7 +904,7 @@ static BOOL is_hinting_enabled(void)
+
+ static BOOL is_subpixel_rendering_enabled( void )
+ {
+-#ifdef HAVE_FREETYPE_FTLCDFIL_H
++#ifdef FT_LCD_FILTER_H
+ static int enabled = -1;
+ if (enabled == -1)
+ {
+@@ -3918,7 +3898,7 @@ static BOOL init_freetype(void)
+ /* Don't warn if these ones are missing */
+ pFT_Outline_Embolden = wine_dlsym(ft_handle, "FT_Outline_Embolden", NULL, 0);
+ pFT_Get_TrueType_Engine_Type = wine_dlsym(ft_handle, "FT_Get_TrueType_Engine_Type", NULL, 0);
+-#ifdef HAVE_FREETYPE_FTLCDFIL_H
++#ifdef FT_LCD_FILTER_H
+ pFT_Library_SetLcdFilter = wine_dlsym(ft_handle, "FT_Library_SetLcdFilter", NULL, 0);
+ #endif
+
+@@ -6706,7 +6686,7 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format,
+ case WINE_GGO_HBGR_BITMAP:
+ case WINE_GGO_VRGB_BITMAP:
+ case WINE_GGO_VBGR_BITMAP:
+-#ifdef HAVE_FREETYPE_FTLCDFIL_H
++#ifdef FT_LCD_FILTER_H
+ {
+ switch (ft_face->glyph->format)
+ {
+diff --git a/include/config.h.in b/include/config.h.in
+index a14db5b..79f8b45 100644
+--- a/include/config.h.in
++++ b/include/config.h.in
+@@ -132,39 +132,6 @@
+ /* Define if FreeType 2 is installed */
+ #undef HAVE_FREETYPE
+
+-/* Define to 1 if you have the <freetype/freetype.h> header file. */
+-#undef HAVE_FREETYPE_FREETYPE_H
+-
+-/* Define to 1 if you have the <freetype/ftglyph.h> header file. */
+-#undef HAVE_FREETYPE_FTGLYPH_H
+-
+-/* Define to 1 if you have the <freetype/ftlcdfil.h> header file. */
+-#undef HAVE_FREETYPE_FTLCDFIL_H
+-
+-/* Define to 1 if you have the <freetype/ftmodapi.h> header file. */
+-#undef HAVE_FREETYPE_FTMODAPI_H
+-
+-/* Define to 1 if you have the <freetype/ftoutln.h> header file. */
+-#undef HAVE_FREETYPE_FTOUTLN_H
+-
+-/* Define to 1 if you have the <freetype/ftsnames.h> header file. */
+-#undef HAVE_FREETYPE_FTSNAMES_H
+-
+-/* Define if you have the <freetype/fttrigon.h> header file. */
+-#undef HAVE_FREETYPE_FTTRIGON_H
+-
+-/* Define to 1 if you have the <freetype/fttypes.h> header file. */
+-#undef HAVE_FREETYPE_FTTYPES_H
+-
+-/* Define to 1 if you have the <freetype/ftwinfnt.h> header file. */
+-#undef HAVE_FREETYPE_FTWINFNT_H
+-
+-/* Define to 1 if you have the <freetype/ttnameid.h> header file. */
+-#undef HAVE_FREETYPE_TTNAMEID_H
+-
+-/* Define to 1 if you have the <freetype/tttables.h> header file. */
+-#undef HAVE_FREETYPE_TTTABLES_H
+-
+ /* Define to 1 if the system has the type `fsblkcnt_t'. */
+ #undef HAVE_FSBLKCNT_T
+
+--
+1.9.1
+
diff --git a/app-emulation/wine/files/wine-1.7.12-osmesa-check.patch b/app-emulation/wine/files/wine-1.7.12-osmesa-check.patch
new file mode 100644
index 000000000000..7cafcd4e6dc8
--- /dev/null
+++ b/app-emulation/wine/files/wine-1.7.12-osmesa-check.patch
@@ -0,0 +1,38 @@
+From 6932b9a17c4f64c13f7060895d46334bc7022430 Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gentoo.org>
+Date: Tue, 7 Aug 2012 01:29:01 -0400
+Subject: [PATCH] Do not check for libGL symbols when checking libOSMesa
+
+If mesa had been built with shared glapi, glAccum is not available in
+libOSMesa without explicitly linking to libGL. In addition, in
+mesa-8.0.x and earlier, libOSMesa needs to be explicitly linked to
+libglapi if mesa was built with shared glapi, see
+https://bugs.gentoo.org/show_bug.cgi?id=399813
+And in mesa-8.1.x, libOSMesa in addition needs libdl, libpthread, and
+libstdc++, see https://bugs.gentoo.org/show_bug.cgi?id=431832
+---
+ configure.ac | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index de807d2..a2e8684 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1233,7 +1233,13 @@ This probably prevents linking to OpenGL. Try deleting the file and restarting c
+
+ if test "x$with_osmesa" != "xno"
+ then
+- WINE_CHECK_SONAME(OSMesa,glAccum,,,[$X_LIBS -lm $X_EXTRA_LIBS])
++ WINE_CHECK_SONAME(OSMesa,OSMesaCreateContext,,,[$X_LIBS -lm $X_EXTRA_LIBS])
++ if test "x$ac_cv_lib_soname_OSMesa" = "x"; then
++ osmesa_save_CC=$CC
++ CC=$CXX
++ WINE_CHECK_SONAME(OSMesa,OSMesaCreateContext,,,[-lglapi -lpthread -ldl $X_LIBS -lm $X_EXTRA_LIBS])
++ CC=$osmesa_save_CC
++ fi
+ WINE_NOTICE_WITH(osmesa,[test "x$ac_cv_lib_soname_OSMesa" = "x"],
+ [libOSMesa ${notice_platform}development files not found (or too old), OpenGL rendering in bitmaps won't be supported.])
+ fi
+--
+1.8.5.3
+
diff --git a/app-emulation/wine/files/wine-1.7.19-makefile-race-cond.patch b/app-emulation/wine/files/wine-1.7.19-makefile-race-cond.patch
new file mode 100644
index 000000000000..294b5ae93943
--- /dev/null
+++ b/app-emulation/wine/files/wine-1.7.19-makefile-race-cond.patch
@@ -0,0 +1,15 @@
+diff --git a/Makefile.in b/Makefile.in
+index 5c163b8..b600cf7 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -52,7 +52,8 @@ __tooldeps__: libs/port libs/wine libs/wpp
+ __builddeps__: __tooldeps__ include
+ .PHONY: depend check test testclean crosstest __tooldeps__ __builddeps__
+
+-loader server: libs/port libs/wine tools
++loader: libs/port libs/wine tools
++server: libs/port libs/wine tools include
+ fonts: tools/sfnt2fon
+ include: tools tools/widl
+ libs/wine tools: libs/port
+
diff --git a/app-emulation/wine/files/wine-1.7.2-osmesa-check.patch b/app-emulation/wine/files/wine-1.7.2-osmesa-check.patch
new file mode 100644
index 000000000000..e20ea2c28dcd
--- /dev/null
+++ b/app-emulation/wine/files/wine-1.7.2-osmesa-check.patch
@@ -0,0 +1,38 @@
+From b7eb1ff48dd1210aa3e1002afc503d5df75d50b9 Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gentoo.org>
+Date: Tue, 7 Aug 2012 01:29:01 -0400
+Subject: [PATCH] Do not check for libGL symbols when checking libOSMesa
+
+If mesa had been built with shared glapi, glAccum is not available in
+libOSMesa without explicitly linking to libGL. In addition, in
+mesa-8.0.x and earlier, libOSMesa needs to be explicitly linked to
+libglapi if mesa was built with shared glapi, see
+https://bugs.gentoo.org/show_bug.cgi?id=399813
+And in mesa-8.1.x, libOSMesa in addition needs libdl, libpthread, and
+libstdc++, see https://bugs.gentoo.org/show_bug.cgi?id=431832
+---
+ configure.ac | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 66b4dd6..0303d87 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1213,7 +1213,13 @@ This probably prevents linking to OpenGL. Try deleting the file and restarting c
+
+ if test "x$with_osmesa" != "xno"
+ then
+- WINE_CHECK_SONAME(OSMesa,glAccum,,,[$X_LIBS $XLIB -lm $X_EXTRA_LIBS])
++ WINE_CHECK_SONAME(OSMesa,OSMesaCreateContext,,,[$X_LIBS $XLIB -lm $X_EXTRA_LIBS])
++ if test "x$ac_cv_lib_soname_OSMesa" = "x"; then
++ osmesa_save_CC=$CC
++ CC=$CXX
++ WINE_CHECK_SONAME(OSMesa,OSMesaCreateContext,,,[-lglapi -lpthread -ldl $X_LIBS $XLIB -lm $X_EXTRA_LIBS])
++ CC=$osmesa_save_CC
++ fi
+ WINE_NOTICE_WITH(osmesa,[test "x$ac_cv_lib_soname_OSMesa" = "x"],
+ [libOSMesa ${notice_platform}development files not found (or too old), OpenGL rendering in bitmaps won't be supported.])
+ fi
+--
+1.8.3.2
+
diff --git a/app-emulation/wine/files/wine-1.7.38-gstreamer-v5-staging-post.patch b/app-emulation/wine/files/wine-1.7.38-gstreamer-v5-staging-post.patch
new file mode 100644
index 000000000000..3d653993385c
--- /dev/null
+++ b/app-emulation/wine/files/wine-1.7.38-gstreamer-v5-staging-post.patch
@@ -0,0 +1,58 @@
+From 695c19cdd2fc24aaa7ed89976c4965b376707131 Mon Sep 17 00:00:00 2001
+From: Sebastian Lackner <sebastian@fds-team.de>
+Date: Wed, 25 Feb 2015 22:45:42 +0100
+Subject: ntdll: Fix race-condition when threads are killed during shutdown.
+
+When exit_thread is executed, nb_threads is decremented before the thread is
+fully shutdown. When another thread runs ExitProcess() this will cause a SIGQUIT
+signal to all threads, effectively decrementing nb_threads twice. The process
+will terminate with a wrong exitcode then because the refcount reaches zero too
+early.
+
+Currently Wine has no locking protection of LdrShutdownProcess(), so it can
+only be executed safely when all other threads have terminated before. Most
+likely there are more Wine bugs in this area, but the attached patch should
+fix the most critical one (messed up refcounting of threads) for now.
+
+[Alexandre Rostovtsev <tetromino@gentoo.org> : rebase to be applied after
+ Maarten Lankhorst's "override pthreads to fix gstreamer v5" patch.]
+---
+ dlls/ntdll/thread.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
+index 4f181dc..1bdbcbf 100755
+--- a/dlls/ntdll/thread.c
++++ b/dlls/ntdll/thread.c
+@@ -461,6 +461,7 @@ static void exit_thread_common( int status )
+ static void *prev_teb;
+ TEB *teb;
+ #endif
++ sigset_t sigset;
+
+ if (status) /* send the exit code to the server (0 is already the default) */
+ {
+@@ -473,7 +474,7 @@ static void exit_thread_common( int status )
+ SERVER_END_REQ;
+ }
+
+- if (interlocked_xchg_add( &nb_threads, -1 ) <= 1)
++ if (interlocked_xchg_add( &nb_threads, 0 ) <= 1)
+ {
+ LdrShutdownProcess();
+ exit( status );
+@@ -499,6 +500,11 @@ static void exit_thread_common( int status )
+ reap_thread(NtCurrentTeb());
+ #endif
+
++ sigemptyset( &sigset );
++ sigaddset( &sigset, SIGQUIT );
++ pthread_sigmask( SIG_BLOCK, &sigset, NULL );
++ if (interlocked_xchg_add( &nb_threads, -1 ) <= 1) _exit( status );
++
+ close( ntdll_get_thread_data()->wait_fd[0] );
+ close( ntdll_get_thread_data()->wait_fd[1] );
+ close( ntdll_get_thread_data()->reply_fd );
+--
+2.3.1
+
diff --git a/app-emulation/wine/files/wine-1.7.38-gstreamer-v5-staging-pre.patch b/app-emulation/wine/files/wine-1.7.38-gstreamer-v5-staging-pre.patch
new file mode 100644
index 000000000000..eee42ff900f8
--- /dev/null
+++ b/app-emulation/wine/files/wine-1.7.38-gstreamer-v5-staging-pre.patch
@@ -0,0 +1,48 @@
+From 0d92921d264d5d0d1041c66353f022f1bc88577f Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gentoo.org>
+Date: Sun, 8 Mar 2015 00:10:31 -0500
+Subject: [PATCH] Revert "ntdll: Fix race-condition when threads are killed
+ during shutdown."
+
+This reverts Sebastian Lackner's Wine-Staging patch to allow Maarten
+Lankhorst's "override pthreads to fix gstreamer v5" to apply
+---
+ dlls/ntdll/thread.c | 8 +-------
+ 1 file changed, 1 insertion(+), 7 deletions(-)
+
+diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
+index 74e64c9..3696c8e 100644
+--- a/dlls/ntdll/thread.c
++++ b/dlls/ntdll/thread.c
+@@ -370,7 +370,6 @@ void terminate_thread( int status )
+ void exit_thread( int status )
+ {
+ static void *prev_teb;
+- sigset_t sigset;
+ TEB *teb;
+
+ if (status) /* send the exit code to the server (0 is already the default) */
+@@ -384,7 +383,7 @@ void exit_thread( int status )
+ SERVER_END_REQ;
+ }
+
+- if (interlocked_xchg_add( &nb_threads, 0 ) <= 1)
++ if (interlocked_xchg_add( &nb_threads, -1 ) <= 1)
+ {
+ LdrShutdownProcess();
+ exit( status );
+@@ -406,11 +405,6 @@ void exit_thread( int status )
+ }
+ }
+
+- sigemptyset( &sigset );
+- sigaddset( &sigset, SIGQUIT );
+- pthread_sigmask( SIG_BLOCK, &sigset, NULL );
+- if (interlocked_xchg_add( &nb_threads, -1 ) <= 1) _exit( status );
+-
+ close( ntdll_get_thread_data()->wait_fd[0] );
+ close( ntdll_get_thread_data()->wait_fd[1] );
+ close( ntdll_get_thread_data()->reply_fd );
+--
+2.3.1
+
diff --git a/app-emulation/wine/files/wine-1.7.39-gstreamer-v5-staging-post.patch b/app-emulation/wine/files/wine-1.7.39-gstreamer-v5-staging-post.patch
new file mode 100644
index 000000000000..25eb2357f9b3
--- /dev/null
+++ b/app-emulation/wine/files/wine-1.7.39-gstreamer-v5-staging-post.patch
@@ -0,0 +1,38 @@
+From b97783fd33b4d9897c149d7a14747aa4969bd9e9 Mon Sep 17 00:00:00 2001
+From: Sebastian Lackner <sebastian@fds-team.de>
+Date: Thu, 19 Mar 2015 07:56:04 +0100
+Subject: Reapply various changes conflicting with Maarten Lankhorst's
+ gstreamer hack v5.
+
+---
+ dlls/ntdll/thread.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
+index 1e7f231..cf0461d 100644
+--- a/dlls/ntdll/thread.c
++++ b/dlls/ntdll/thread.c
+@@ -461,6 +461,8 @@ static void exit_thread_common( int status )
+ static void *prev_teb;
+ TEB *teb;
+ #endif
++ shmlocal_t *shmlocal;
++ sigset_t sigset;
+
+ if (status) /* send the exit code to the server (0 is already the default) */
+ {
+@@ -502,6 +504,11 @@ static void exit_thread_common( int status )
+ reap_thread(NtCurrentTeb());
+ #endif
+
++ sigemptyset( &sigset );
++ sigaddset( &sigset, SIGQUIT );
++ pthread_sigmask( SIG_BLOCK, &sigset, NULL );
++ if (interlocked_xchg_add( &nb_threads, -1 ) <= 1) _exit( status );
++
+ close( ntdll_get_thread_data()->wait_fd[0] );
+ close( ntdll_get_thread_data()->wait_fd[1] );
+ close( ntdll_get_thread_data()->reply_fd );
+--
+2.3.2
+
diff --git a/app-emulation/wine/files/wine-1.7.39-gstreamer-v5-staging-pre.patch b/app-emulation/wine/files/wine-1.7.39-gstreamer-v5-staging-pre.patch
new file mode 100644
index 000000000000..81aa699be94c
--- /dev/null
+++ b/app-emulation/wine/files/wine-1.7.39-gstreamer-v5-staging-pre.patch
@@ -0,0 +1,40 @@
+From 1527fb44c331f2c61224514beb758895a5f85c8d Mon Sep 17 00:00:00 2001
+From: Sebastian Lackner <sebastian@fds-team.de>
+Date: Thu, 19 Mar 2015 07:51:48 +0100
+Subject: Revert various changes conflicting with Maarten Lankhorst's gstreamer
+ hack v5.
+
+Note: These changes have to be reapplied with the corresponding -post patchset
+afterwards.
+---
+ dlls/ntdll/thread.c | 7 -------
+ 1 file changed, 7 deletions(-)
+
+diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
+index 30a4720..843be0f 100644
+--- a/dlls/ntdll/thread.c
++++ b/dlls/ntdll/thread.c
+@@ -385,8 +385,6 @@ void terminate_thread( int status )
+ void exit_thread( int status )
+ {
+ static void *prev_teb;
+- shmlocal_t *shmlocal;
+- sigset_t sigset;
+ TEB *teb;
+
+ if (status) /* send the exit code to the server (0 is already the default) */
+@@ -425,11 +423,6 @@ void exit_thread( int status )
+ }
+ }
+
+- sigemptyset( &sigset );
+- sigaddset( &sigset, SIGQUIT );
+- pthread_sigmask( SIG_BLOCK, &sigset, NULL );
+- if (interlocked_xchg_add( &nb_threads, -1 ) <= 1) _exit( status );
+-
+ close( ntdll_get_thread_data()->wait_fd[0] );
+ close( ntdll_get_thread_data()->wait_fd[1] );
+ close( ntdll_get_thread_data()->reply_fd );
+--
+2.3.2
+
diff --git a/app-emulation/wine/files/wine-1.7.45-libunwind-osx-only.patch b/app-emulation/wine/files/wine-1.7.45-libunwind-osx-only.patch
new file mode 100644
index 000000000000..e7a7905589ca
--- /dev/null
+++ b/app-emulation/wine/files/wine-1.7.45-libunwind-osx-only.patch
@@ -0,0 +1,64 @@
+From 36a9f9dd05c3b9df77c44c91663e9bd6cae1c848 Mon Sep 17 00:00:00 2001
+From: Ken Thomases <ken@codeweavers.com>
+Date: Mon, 15 Jun 2015 20:42:33 -0500
+Subject: [PATCH 1/1] configure: Only check for libunwind.h on OS X.
+
+---
+ configure | 13 ++++++++++++-
+ configure.ac | 2 +-
+ 2 files changed, 13 insertions(+), 2 deletions(-)
+
+diff --git a/configure b/configure
+index a104097..c0951db 100755
+--- a/configure
++++ b/configure
+@@ -6626,7 +6626,6 @@ for ac_header in \
+ lber.h \
+ ldap.h \
+ libproc.h \
+- libunwind.h \
+ link.h \
+ linux/cdrom.h \
+ linux/compiler.h \
+@@ -7849,6 +7848,18 @@ uninstall::
+ ;;
+
+ darwin*|macosx*)
++ for ac_header in libunwind.h
++do :
++ ac_fn_c_check_header_mongrel "$LINENO" "libunwind.h" "ac_cv_header_libunwind_h" "$ac_includes_default"
++if test "x$ac_cv_header_libunwind_h" = xyes; then :
++ cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBUNWIND_H 1
++_ACEOF
++
++fi
++
++done
++
+ LIBEXT="dylib"
+ DLLFLAGS="$DLLFLAGS -fPIC"
+ LIBWINE_LDFLAGS="-multiply_defined suppress"
+diff --git a/configure.ac b/configure.ac
+index df28b27..f9df3f0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -424,7 +424,6 @@ AC_CHECK_HEADERS(\
+ lber.h \
+ ldap.h \
+ libproc.h \
+- libunwind.h \
+ link.h \
+ linux/cdrom.h \
+ linux/compiler.h \
+@@ -751,6 +750,7 @@ uninstall::
+ ;;
+
+ darwin*|macosx*)
++ AC_CHECK_HEADERS(libunwind.h)
+ LIBEXT="dylib"
+ DLLFLAGS="$DLLFLAGS -fPIC"
+ LIBWINE_LDFLAGS="-multiply_defined suppress"
+--
+1.9.1
+
diff --git a/app-emulation/wine/files/wine-1.7.47-critical-security-cookie-fix.patch b/app-emulation/wine/files/wine-1.7.47-critical-security-cookie-fix.patch
new file mode 100644
index 000000000000..9168654a841f
--- /dev/null
+++ b/app-emulation/wine/files/wine-1.7.47-critical-security-cookie-fix.patch
@@ -0,0 +1,82 @@
+From: Erich E. Hoover <erich.e.hoover@wine-staging.com>
+Date: Fri, 10 Jul 2015 20:52:33 +0000 (-0600)
+Subject: ntdll: Only set the security cookie if it has not already been set.
+X-Git-Url: http://source.winehq.org/git/wine.git/commitdiff_plain/e9d7cf99ada80ea8345c301481c63a24780f2b63
+
+ntdll: Only set the security cookie if it has not already been set.
+---
+
+diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
+index 410e060..ff947da 100644
+--- a/dlls/ntdll/virtual.c
++++ b/dlls/ntdll/virtual.c
+@@ -61,6 +61,12 @@ WINE_DECLARE_DEBUG_CHANNEL(module);
+ #define MAP_NORESERVE 0
+ #endif
+
++#ifdef _WIN64
++#define DEFAULT_SECURITY_COOKIE_64 (((ULONGLONG)0x00002b99 << 32) | 0x2ddfa232)
++#endif
++#define DEFAULT_SECURITY_COOKIE_32 0xbb40e64e
++#define DEFAULT_SECURITY_COOKIE_16 (DEFAULT_SECURITY_COOKIE_32 >> 16)
++
+ /* File view */
+ struct file_view
+ {
+@@ -1053,6 +1059,36 @@ static NTSTATUS stat_mapping_file( struct file_view *view, struct stat *st )
+ return status;
+ }
+
++/***********************************************************************
++ * set_security_cookie
++ *
++ * Create a random security cookie for buffer overflow protection. Make
++ * sure it does not accidentally match the default cookie value.
++ */
++static void set_security_cookie(ULONG_PTR *cookie)
++{
++ static ULONG seed;
++
++ if (!cookie) return;
++ if (!seed) seed = NtGetTickCount() ^ GetCurrentProcessId();
++ while (1)
++ {
++ if (*cookie == DEFAULT_SECURITY_COOKIE_16)
++ *cookie = RtlRandom( &seed ) >> 16; /* leave the high word clear */
++ else if (*cookie == DEFAULT_SECURITY_COOKIE_32)
++ *cookie = RtlRandom( &seed );
++#ifdef DEFAULT_SECURITY_COOKIE_64
++ else if (*cookie == DEFAULT_SECURITY_COOKIE_64)
++ {
++ *cookie = RtlRandom( &seed );
++ /* fill up, but keep the highest word clear */
++ *cookie ^= (ULONG_PTR)RtlRandom( &seed ) << 16;
++ }
++#endif
++ else
++ break;
++ }
++}
+
+ /***********************************************************************
+ * map_image
+@@ -1285,18 +1321,7 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, SIZE_T total_siz
+ loadcfg = RtlImageDirectoryEntryToData( (HMODULE)ptr, TRUE,
+ IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG, &loadcfg_size );
+ if (loadcfg && loadcfg_size >= sizeof(*loadcfg))
+- {
+- static ULONG seed;
+- ULONG_PTR *cookie = (ULONG_PTR *)loadcfg->SecurityCookie;
+-
+- if (!seed) seed = NtGetTickCount() ^ GetCurrentProcessId();
+- if (cookie)
+- {
+- *cookie = RtlRandom( &seed );
+- if (sizeof(ULONG_PTR) > sizeof(ULONG)) /* fill up, but keep the highest word clear */
+- *cookie ^= (ULONG_PTR)RtlRandom( &seed ) << 16;
+- }
+- }
++ set_security_cookie((ULONG_PTR *)loadcfg->SecurityCookie);
+
+ /* set the image protections */
+
diff --git a/app-emulation/wine/files/wine-gcc-4.9-null-pointer.patch b/app-emulation/wine/files/wine-gcc-4.9-null-pointer.patch
new file mode 100644
index 000000000000..213f2c6c52c7
--- /dev/null
+++ b/app-emulation/wine/files/wine-gcc-4.9-null-pointer.patch
@@ -0,0 +1,35 @@
+From deb274226783ab886bdb44876944e156757efe2b Mon Sep 17 00:00:00 2001
+From: Daniel Beitler <dan@dablabs.com>
+Date: Sun, 18 May 2014 13:27:42 -0400
+Subject: [PATCH] msi: Prevent call to memset with a null pointer in
+ get_tablecolumns function.
+
+---
+ dlls/msi/table.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/dlls/msi/table.c b/dlls/msi/table.c
+index 8012369..9ed9421 100644
+--- a/dlls/msi/table.c
++++ b/dlls/msi/table.c
+@@ -671,7 +671,7 @@ static UINT get_tablecolumns( MSIDATABASE *db, LPCWSTR szTableName, MSICOLUMNINF
+ /* Note: _Columns table doesn't have non-persistent data */
+
+ /* if maxcount is non-zero, assume it's exactly right for this table */
+- memset( colinfo, 0, maxcount * sizeof(*colinfo) );
++ if (colinfo) memset( colinfo, 0, maxcount * sizeof(*colinfo) );
+ count = table->row_count;
+ for (i = 0; i < count; i++)
+ {
+@@ -684,7 +684,7 @@ static UINT get_tablecolumns( MSIDATABASE *db, LPCWSTR szTableName, MSICOLUMNINF
+ /* check the column number is in range */
+ if (col < 1 || col > maxcount)
+ {
+- ERR("column %d out of range\n", col);
++ ERR("column %d out of range (maxcount: %d)\n", col, maxcount);
+ continue;
+ }
+ /* check if this column was already set */
+--
+1.9.1
+
diff --git a/app-emulation/wine/metadata.xml b/app-emulation/wine/metadata.xml
new file mode 100644
index 000000000000..fbf2c5b68295
--- /dev/null
+++ b/app-emulation/wine/metadata.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>wine</herd>
+ <longdescription>
+Wine is an Open Source implementation of the Windows API on top of X and Unix.
+
+Think of Wine as a compatibility layer for running Windows programs. Wine does not require Microsoft Windows, as it is a completely free alternative implementation of the Windows API consisting of 100% non-Microsoft code, however Wine can optionally use native Windows DLLs if they are available. Wine provides both a development toolkit for porting Windows source code to Unix as well as a program loader, allowing many unmodified Windows programs to run on x86-based Unixes, including Linux, FreeBSD, and Solaris.
+ </longdescription>
+ <use>
+ <flag name="capi">Enable ISDN support via CAPI</flag>
+ <flag name="custom-cflags">Bypass strip-flags; use at your own peril</flag>
+ <flag name="dos">Pull in <pkg>games-emulation/dosbox</pkg> to run DOS applications</flag>
+ <flag name="gecko">Add support for the Gecko engine when using iexplore</flag>
+ <flag name="mono">Add support for .NET using Wine's Mono add-on</flag>
+ <flag name="netapi">Use libnetapi from <pkg>net-fs/samba</pkg> to support Windows networks in netapi32.dll</flag>
+ <flag name="opencl">Enable OpenCL support</flag>
+ <flag name="osmesa">Add support for OpenGL in bitmaps using libOSMesa</flag>
+ <flag name="pcap">Support packet capture software (e.g. wireshark)</flag>
+ <flag name="perl">Install helpers written in perl (winedump/winemaker)</flag>
+ <flag name="pipelight">Apply unofficial Wine-Staging patches for Pipelight/Silverlight support</flag>
+ <flag name="prelink">Run prelink on DLLs during build -- do not disable if you do not know what this means as it can break things at runtime</flag>
+ <flag name="realtime">Pull in <pkg>sys-auth/rtkit</pkg> for low-latency pulseaudio support</flag>
+ <flag name="run-exes">Use Wine to open and run .EXE and .MSI files</flag>
+ <flag name="s3tc">Pull in <pkg>media-libs/libtxc_dxtn</pkg> for DXTn texture compression, needed for many games</flag>
+ <flag name="samba">Add support for NTLM auth. see
+ http://wiki.winehq.org/NtlmAuthSetupGuide and
+ http://wiki.winehq.org/NtlmSigningAndSealing</flag>
+ <flag name="staging">Apply unofficial Wine-Staging patches for advanced feature support that haven't made it into upstream Wine yet</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">wine-compholio/wine-staging</remote-id>
+ <remote-id type="sourceforge">wine</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-emulation/wine/wine-1.6.2-r1.ebuild b/app-emulation/wine/wine-1.6.2-r1.ebuild
new file mode 100644
index 000000000000..7d6275dd37cb
--- /dev/null
+++ b/app-emulation/wine/wine-1.6.2-r1.ebuild
@@ -0,0 +1,368 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.21"
+MV="0.0.8"
+PULSE_PATCHES="winepulse-patches-1.7.8"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ pulseaudio? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${PULSE_PATCHES}.tar.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +lcms ldap +mono mp3 ncurses nls odbc openal opencl +opengl osmesa oss +perl +png +prelink pulseaudio +realtime +run-exes samba scanner selinux +ssl test +threads +truetype +udisks v4l +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ osmesa? ( opengl )" #286560
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+DEPEND="${COMMON_DEPEND}
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ else
+ unpack ${MY_P}.tar.bz2
+ fi
+
+ use pulseaudio && unpack "${PULSE_PATCHES}.tar.bz2"
+ unpack "${WINE_GENTOO}.tar.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.2-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ "${FILESDIR}"/${PN}-gcc-4.9-null-pointer.patch #543446
+ )
+ use pulseaudio && PATCHES+=(
+ "../${PULSE_PATCHES}"/*.patch #421365
+ )
+
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ use pulseaudio && myconf+=( --with-pulse )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.6.2.ebuild b/app-emulation/wine/wine-1.6.2.ebuild
new file mode 100644
index 000000000000..013b8def3f52
--- /dev/null
+++ b/app-emulation/wine/wine-1.6.2.ebuild
@@ -0,0 +1,376 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-multilib eutils fdo-mime flag-o-matic gnome2-utils l10n multilib pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git"
+ inherit git-2
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* amd64 x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.21"
+MV="0.0.8"
+PULSE_PATCHES="winepulse-patches-1.7.8"
+WINE_GENTOO="wine-gentoo-2013.06.24"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ pulseaudio? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${PULSE_PATCHES}.tar.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg lcms ldap +mono mp3 ncurses nls odbc openal opencl +opengl osmesa oss +perl +png +prelink pulseaudio +realtime +run-exes samba scanner selinux +ssl test +threads +truetype +udisks v4l +X xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ osmesa? ( opengl )" #286560
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+NATIVE_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0 )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:= )
+ udisks? ( sys-apps/dbus )
+ fontconfig? ( media-libs/fontconfig:= )
+ gphoto2? ( media-libs/libgphoto2:= )
+ openal? ( media-libs/openal:= )
+ gstreamer? ( media-libs/gstreamer:0.10 media-libs/gst-plugins-base:0.10 )
+ X? (
+ x11-libs/libXcursor
+ x11-libs/libXext
+ x11-libs/libXrandr
+ x11-libs/libXi
+ x11-libs/libXxf86vm
+ )
+ xinerama? ( x11-libs/libXinerama )
+ alsa? ( media-libs/alsa-lib )
+ cups? ( net-print/cups:= )
+ opencl? ( virtual/opencl )
+ opengl? (
+ virtual/glu
+ virtual/opengl
+ )
+ gsm? ( media-sound/gsm:= )
+ jpeg? ( virtual/jpeg:0= )
+ ldap? ( net-nds/openldap:= )
+ lcms? ( media-libs/lcms:2= )
+ mp3? ( >=media-sound/mpg123-1.5.0 )
+ nls? ( sys-devel/gettext )
+ odbc? ( dev-db/unixODBC:= )
+ osmesa? ( media-libs/mesa[osmesa] )
+ pulseaudio? ( media-sound/pulseaudio )
+ xml? ( dev-libs/libxml2 dev-libs/libxslt )
+ scanner? ( media-gfx/sane-backends:= )
+ ssl? ( net-libs/gnutls:= )
+ png? ( media-libs/libpng:0= )
+ v4l? ( media-libs/libv4l )
+ xcomposite? ( x11-libs/libXcomposite )"
+
+COMMON_DEPEND="
+ !amd64? ( ${NATIVE_DEPEND} )
+ amd64? (
+ abi_x86_64? ( ${NATIVE_DEPEND} )
+ abi_x86_32? (
+ truetype? ( >=media-libs/freetype-2.5.0.1[abi_x86_32(-)] )
+ ncurses? ( >=sys-libs/ncurses-5.9-r3[abi_x86_32(-)] )
+ udisks? ( >=sys-apps/dbus-1.6.18-r1[abi_x86_32(-)] )
+ fontconfig? ( >=media-libs/fontconfig-2.10.92[abi_x86_32(-)] )
+ gphoto2? ( >=media-libs/libgphoto2-2.5.3.1[abi_x86_32(-)] )
+ openal? ( >=media-libs/openal-1.15.1[abi_x86_32(-)] )
+ gstreamer? (
+ >=media-libs/gstreamer-0.10.36-r2:0.10[abi_x86_32(-)]
+ >=media-libs/gst-plugins-base-0.10.36:0.10[abi_x86_32(-)]
+ )
+ X? (
+ >=x11-libs/libXcursor-1.1.14[abi_x86_32(-)]
+ >=x11-libs/libXext-1.3.2[abi_x86_32(-)]
+ >=x11-libs/libXrandr-1.4.2[abi_x86_32(-)]
+ >=x11-libs/libXi-1.7.2[abi_x86_32(-)]
+ >=x11-libs/libXxf86vm-1.1.3[abi_x86_32(-)]
+ )
+ xinerama? ( >=x11-libs/libXinerama-1.1.3[abi_x86_32(-)] )
+ alsa? ( >=media-libs/alsa-lib-1.0.27.2[abi_x86_32(-)] )
+ cups? ( >=net-print/cups-1.7.1-r1[abi_x86_32(-)] )
+ opencl? ( >=virtual/opencl-0-r3[abi_x86_32(-)] )
+ opengl? (
+ >=virtual/glu-9.0-r1[abi_x86_32(-)]
+ >=virtual/opengl-7.0-r1[abi_x86_32(-)]
+ )
+ gsm? ( >=media-sound/gsm-1.0.13-r1[abi_x86_32(-)] )
+ jpeg? ( >=virtual/jpeg-0-r2:0[abi_x86_32(-)] )
+ ldap? ( >=net-nds/openldap-2.4.38-r1:=[abi_x86_32(-)] )
+ lcms? ( >=media-libs/lcms-2.5:2[abi_x86_32(-)] )
+ mp3? ( >=media-sound/mpg123-1.15.4[abi_x86_32(-)] )
+ nls? ( >=sys-devel/gettext-0.18.3.2[abi_x86_32(-)] )
+ odbc? ( >=dev-db/unixODBC-2.3.2:=[abi_x86_32(-)] )
+ osmesa? ( >=media-libs/mesa-9.1.6[osmesa,abi_x86_32(-)] )
+ pulseaudio? ( >=media-sound/pulseaudio-5.0[abi_x86_32(-)] )
+ xml? (
+ >=dev-libs/libxml2-2.9.1-r4[abi_x86_32(-)]
+ >=dev-libs/libxslt-1.1.28-r1[abi_x86_32(-)]
+ )
+ scanner? ( >=media-gfx/sane-backends-1.0.23:=[abi_x86_32(-)] )
+ ssl? ( >=net-libs/gnutls-2.12.23-r6:=[abi_x86_32(-)] )
+ png? ( >=media-libs/libpng-1.6.10:0[abi_x86_32(-)] )
+ v4l? ( >=media-libs/libv4l-0.9.5[abi_x86_32(-)] )
+ xcomposite? ( >=x11-libs/libXcomposite-0.4.4-r1[abi_x86_32(-)] )
+ )
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+DEPEND="${COMMON_DEPEND}
+ amd64? ( abi_x86_32? ( !abi_x86_64? ( ${NATIVE_DEPEND} ) ) )
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-2_src_unpack
+ else
+ unpack ${MY_P}.tar.bz2
+ fi
+
+ use pulseaudio && unpack "${PULSE_PATCHES}.tar.bz2"
+ unpack "${WINE_GENTOO}.tar.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.2-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ )
+ use pulseaudio && PATCHES+=(
+ "../${PULSE_PATCHES}"/*.patch #421365
+ )
+
+ autotools-utils_src_prepare
+
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+do_configure() {
+ local myeconfargs=( "${myeconfargs[@]}" )
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myeconfargs+=( --enable-win64 )
+ else
+ myeconfargs+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ autotools-utils_src_configure
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ local myeconfargs=( # common
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_with mp3 mpg123)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ use pulseaudio && myeconfargs+=( --with-pulse )
+
+ if use amd64 && use abi_x86_32; then
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+ fi
+
+ multilib_parallel_foreach_abi do_configure
+}
+
+src_compile() {
+ autotools-multilib_src_compile depend
+ autotools-multilib_src_compile all
+}
+
+src_test() {
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ multilib_toolchain_setup x86
+ local BUILD_DIR="${S}-${ABI}"
+ cd "${BUILD_DIR}" || die
+ WINEPREFIX="${T}/.wine-${ABI}" Xemake test
+}
+
+src_install() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS=( "${DOCS[@]}" ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+ autotools-multilib_src_install
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.7.10-r1.ebuild b/app-emulation/wine/wine-1.7.10-r1.ebuild
new file mode 100644
index 000000000000..721c4a54f8b8
--- /dev/null
+++ b/app-emulation/wine/wine-1.7.10-r1.ebuild
@@ -0,0 +1,370 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.24"
+MV="4.5.2"
+PULSE_PATCHES="winepulse-patches-1.7.10"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ pulseaudio? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${PULSE_PATCHES}.tar.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl +png +prelink pulseaudio +realtime +run-exes samba scanner selinux +ssl test +threads +truetype +udisks v4l +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ osmesa? ( opengl )" #286560
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+DEPEND="${COMMON_DEPEND}
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ else
+ unpack ${MY_P}.tar.bz2
+ fi
+
+ use pulseaudio && unpack "${PULSE_PATCHES}.tar.bz2"
+ unpack "${WINE_GENTOO}.tar.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.2-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ "${FILESDIR}"/${PN}-gcc-4.9-null-pointer.patch #543446
+ )
+ use pulseaudio && PATCHES+=(
+ "../${PULSE_PATCHES}"/*.patch #421365
+ )
+
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with netapi)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ use pulseaudio && myconf+=( --with-pulse )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.7.11-r1.ebuild b/app-emulation/wine/wine-1.7.11-r1.ebuild
new file mode 100644
index 000000000000..721c4a54f8b8
--- /dev/null
+++ b/app-emulation/wine/wine-1.7.11-r1.ebuild
@@ -0,0 +1,370 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.24"
+MV="4.5.2"
+PULSE_PATCHES="winepulse-patches-1.7.10"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ pulseaudio? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${PULSE_PATCHES}.tar.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl +png +prelink pulseaudio +realtime +run-exes samba scanner selinux +ssl test +threads +truetype +udisks v4l +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ osmesa? ( opengl )" #286560
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+DEPEND="${COMMON_DEPEND}
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ else
+ unpack ${MY_P}.tar.bz2
+ fi
+
+ use pulseaudio && unpack "${PULSE_PATCHES}.tar.bz2"
+ unpack "${WINE_GENTOO}.tar.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.2-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ "${FILESDIR}"/${PN}-gcc-4.9-null-pointer.patch #543446
+ )
+ use pulseaudio && PATCHES+=(
+ "../${PULSE_PATCHES}"/*.patch #421365
+ )
+
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with netapi)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ use pulseaudio && myconf+=( --with-pulse )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.7.12-r1.ebuild b/app-emulation/wine/wine-1.7.12-r1.ebuild
new file mode 100644
index 000000000000..398f2f235049
--- /dev/null
+++ b/app-emulation/wine/wine-1.7.12-r1.ebuild
@@ -0,0 +1,370 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.24"
+MV="4.5.2"
+PULSE_PATCHES="winepulse-patches-1.7.12"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ pulseaudio? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${PULSE_PATCHES}.tar.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl +png +prelink pulseaudio +realtime +run-exes samba scanner selinux +ssl test +threads +truetype +udisks v4l +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ osmesa? ( opengl )" #286560
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+DEPEND="${COMMON_DEPEND}
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ else
+ unpack ${MY_P}.tar.bz2
+ fi
+
+ use pulseaudio && unpack "${PULSE_PATCHES}.tar.bz2"
+ unpack "${WINE_GENTOO}.tar.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.12-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ "${FILESDIR}"/${PN}-gcc-4.9-null-pointer.patch #543446
+ )
+ use pulseaudio && PATCHES+=(
+ "../${PULSE_PATCHES}"/*.patch #421365
+ )
+
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with netapi)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ use pulseaudio && myconf+=( --with-pulse )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.7.13-r1.ebuild b/app-emulation/wine/wine-1.7.13-r1.ebuild
new file mode 100644
index 000000000000..398f2f235049
--- /dev/null
+++ b/app-emulation/wine/wine-1.7.13-r1.ebuild
@@ -0,0 +1,370 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.24"
+MV="4.5.2"
+PULSE_PATCHES="winepulse-patches-1.7.12"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ pulseaudio? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${PULSE_PATCHES}.tar.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl +png +prelink pulseaudio +realtime +run-exes samba scanner selinux +ssl test +threads +truetype +udisks v4l +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ osmesa? ( opengl )" #286560
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+DEPEND="${COMMON_DEPEND}
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ else
+ unpack ${MY_P}.tar.bz2
+ fi
+
+ use pulseaudio && unpack "${PULSE_PATCHES}.tar.bz2"
+ unpack "${WINE_GENTOO}.tar.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.12-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ "${FILESDIR}"/${PN}-gcc-4.9-null-pointer.patch #543446
+ )
+ use pulseaudio && PATCHES+=(
+ "../${PULSE_PATCHES}"/*.patch #421365
+ )
+
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with netapi)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ use pulseaudio && myconf+=( --with-pulse )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.7.14-r1.ebuild b/app-emulation/wine/wine-1.7.14-r1.ebuild
new file mode 100644
index 000000000000..398f2f235049
--- /dev/null
+++ b/app-emulation/wine/wine-1.7.14-r1.ebuild
@@ -0,0 +1,370 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.24"
+MV="4.5.2"
+PULSE_PATCHES="winepulse-patches-1.7.12"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ pulseaudio? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${PULSE_PATCHES}.tar.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl +png +prelink pulseaudio +realtime +run-exes samba scanner selinux +ssl test +threads +truetype +udisks v4l +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ osmesa? ( opengl )" #286560
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+DEPEND="${COMMON_DEPEND}
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ else
+ unpack ${MY_P}.tar.bz2
+ fi
+
+ use pulseaudio && unpack "${PULSE_PATCHES}.tar.bz2"
+ unpack "${WINE_GENTOO}.tar.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.12-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ "${FILESDIR}"/${PN}-gcc-4.9-null-pointer.patch #543446
+ )
+ use pulseaudio && PATCHES+=(
+ "../${PULSE_PATCHES}"/*.patch #421365
+ )
+
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with netapi)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ use pulseaudio && myconf+=( --with-pulse )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.7.15-r1.ebuild b/app-emulation/wine/wine-1.7.15-r1.ebuild
new file mode 100644
index 000000000000..398f2f235049
--- /dev/null
+++ b/app-emulation/wine/wine-1.7.15-r1.ebuild
@@ -0,0 +1,370 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.24"
+MV="4.5.2"
+PULSE_PATCHES="winepulse-patches-1.7.12"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ pulseaudio? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${PULSE_PATCHES}.tar.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl +png +prelink pulseaudio +realtime +run-exes samba scanner selinux +ssl test +threads +truetype +udisks v4l +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ osmesa? ( opengl )" #286560
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+DEPEND="${COMMON_DEPEND}
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ else
+ unpack ${MY_P}.tar.bz2
+ fi
+
+ use pulseaudio && unpack "${PULSE_PATCHES}.tar.bz2"
+ unpack "${WINE_GENTOO}.tar.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.12-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ "${FILESDIR}"/${PN}-gcc-4.9-null-pointer.patch #543446
+ )
+ use pulseaudio && PATCHES+=(
+ "../${PULSE_PATCHES}"/*.patch #421365
+ )
+
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with netapi)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ use pulseaudio && myconf+=( --with-pulse )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.7.16-r1.ebuild b/app-emulation/wine/wine-1.7.16-r1.ebuild
new file mode 100644
index 000000000000..398f2f235049
--- /dev/null
+++ b/app-emulation/wine/wine-1.7.16-r1.ebuild
@@ -0,0 +1,370 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.24"
+MV="4.5.2"
+PULSE_PATCHES="winepulse-patches-1.7.12"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ pulseaudio? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${PULSE_PATCHES}.tar.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl +png +prelink pulseaudio +realtime +run-exes samba scanner selinux +ssl test +threads +truetype +udisks v4l +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ osmesa? ( opengl )" #286560
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+DEPEND="${COMMON_DEPEND}
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ else
+ unpack ${MY_P}.tar.bz2
+ fi
+
+ use pulseaudio && unpack "${PULSE_PATCHES}.tar.bz2"
+ unpack "${WINE_GENTOO}.tar.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.12-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ "${FILESDIR}"/${PN}-gcc-4.9-null-pointer.patch #543446
+ )
+ use pulseaudio && PATCHES+=(
+ "../${PULSE_PATCHES}"/*.patch #421365
+ )
+
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with netapi)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ use pulseaudio && myconf+=( --with-pulse )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.7.17-r1.ebuild b/app-emulation/wine/wine-1.7.17-r1.ebuild
new file mode 100644
index 000000000000..398f2f235049
--- /dev/null
+++ b/app-emulation/wine/wine-1.7.17-r1.ebuild
@@ -0,0 +1,370 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.24"
+MV="4.5.2"
+PULSE_PATCHES="winepulse-patches-1.7.12"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ pulseaudio? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${PULSE_PATCHES}.tar.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl +png +prelink pulseaudio +realtime +run-exes samba scanner selinux +ssl test +threads +truetype +udisks v4l +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ osmesa? ( opengl )" #286560
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+DEPEND="${COMMON_DEPEND}
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ else
+ unpack ${MY_P}.tar.bz2
+ fi
+
+ use pulseaudio && unpack "${PULSE_PATCHES}.tar.bz2"
+ unpack "${WINE_GENTOO}.tar.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.12-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ "${FILESDIR}"/${PN}-gcc-4.9-null-pointer.patch #543446
+ )
+ use pulseaudio && PATCHES+=(
+ "../${PULSE_PATCHES}"/*.patch #421365
+ )
+
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with netapi)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ use pulseaudio && myconf+=( --with-pulse )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.7.18-r1.ebuild b/app-emulation/wine/wine-1.7.18-r1.ebuild
new file mode 100644
index 000000000000..398f2f235049
--- /dev/null
+++ b/app-emulation/wine/wine-1.7.18-r1.ebuild
@@ -0,0 +1,370 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.24"
+MV="4.5.2"
+PULSE_PATCHES="winepulse-patches-1.7.12"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ pulseaudio? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${PULSE_PATCHES}.tar.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl +png +prelink pulseaudio +realtime +run-exes samba scanner selinux +ssl test +threads +truetype +udisks v4l +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ osmesa? ( opengl )" #286560
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+DEPEND="${COMMON_DEPEND}
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ else
+ unpack ${MY_P}.tar.bz2
+ fi
+
+ use pulseaudio && unpack "${PULSE_PATCHES}.tar.bz2"
+ unpack "${WINE_GENTOO}.tar.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.12-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ "${FILESDIR}"/${PN}-gcc-4.9-null-pointer.patch #543446
+ )
+ use pulseaudio && PATCHES+=(
+ "../${PULSE_PATCHES}"/*.patch #421365
+ )
+
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with netapi)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ use pulseaudio && myconf+=( --with-pulse )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.7.19-r2.ebuild b/app-emulation/wine/wine-1.7.19-r2.ebuild
new file mode 100644
index 000000000000..e8e0c0b43a85
--- /dev/null
+++ b/app-emulation/wine/wine-1.7.19-r2.ebuild
@@ -0,0 +1,415 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.24"
+MV="4.5.2"
+STAGING_P="wine-staging-1.7.18-1"
+STAGING_DIR="${WORKDIR}/wine-staging-1.7.19"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+PULSE_PATCHES="winepulse-patches-1.7.12"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ pulseaudio? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${PULSE_PATCHES}.tar.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+if [[ ${PV} == "9999" ]] ; then
+ STAGING_EGIT_REPO_URI="git://github.com/wine-compholio/wine-staging.git"
+else
+ SRC_URI="${SRC_URI}
+ staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
+fi
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl pipelight +png +prelink pulseaudio +realtime +run-exes samba scanner selinux +ssl staging test +threads +truetype +udisks v4l +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ pipelight? ( staging )
+ osmesa? ( opengl )" #286560
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+# tools/make_requests requires perl
+DEPEND="${COMMON_DEPEND}
+ staging? ( dev-lang/perl dev-perl/XML-Simple )
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ if use staging; then
+ EGIT_REPO_URI=${STAGING_EGIT_REPO_URI}
+ unset ${PN}_LIVE_REPO;
+ EGIT_CHECKOUT_DIR=${STAGING_DIR} git-r3_src_unpack
+ fi
+ else
+ unpack ${MY_P}.tar.bz2
+ use staging && unpack "${STAGING_P}.tar.gz"
+ fi
+
+ use pulseaudio && unpack "${PULSE_PATCHES}.tar.bz2"
+ if use staging; then
+ # we use a separate pulseaudio patchset
+ rm -r "${STAGING_DIR}/patches/06-winepulse" || die
+ # ... and need special tools for binary patches
+ mv "${STAGING_DIR}/patches/10-Missing_Fonts" "${T}" || die
+ if ! use pipelight; then
+ rm -r "${STAGING_DIR}/patches/97-Pipelight" || die
+ fi
+ fi
+ unpack "${WINE_GENTOO}.tar.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local f
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.12-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ )
+ use pulseaudio && PATCHES+=(
+ "../${PULSE_PATCHES}"/*.patch #421365
+ )
+ if use staging; then
+ ewarn "Applying the unofficial Wine-Staging patchset which is unsupported"
+ ewarn "by Wine developers. Please don't report bugs to Wine bugzilla"
+ ewarn "unless you can reproduce them with USE=-staging"
+
+ PATCHES+=(
+ "${FILESDIR}/wine-1.7.19-makefile-race-cond.patch"
+ "${STAGING_DIR}/patches"/*/*.patch #507950
+ "${STAGING_DIR}/patches/patch-list.patch"
+ )
+ # epatch doesn't support binary patches
+ ebegin "Applying Staging font patches"
+ for f in "${T}/10-Missing_Fonts"/*.patch; do
+ "${STAGING_DIR}/debian/tools/gitapply.sh" < "${f}" || die "Failed to apply Compholio font patches"
+ done
+ eend
+ fi
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with netapi)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ use pulseaudio && myconf+=( --with-pulse )
+ use staging && myconf+=( --with-xattr )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.7.20-r1.ebuild b/app-emulation/wine/wine-1.7.20-r1.ebuild
new file mode 100644
index 000000000000..af857ee80075
--- /dev/null
+++ b/app-emulation/wine/wine-1.7.20-r1.ebuild
@@ -0,0 +1,417 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.24"
+MV="4.5.2"
+STAGING_P="wine-staging-${PV}"
+STAGING_DIR="${WORKDIR}/${STAGING_P}"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+PULSE_PATCHES="winepulse-patches-1.7.20"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ pulseaudio? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${PULSE_PATCHES}.tar.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+if [[ ${PV} == "9999" ]] ; then
+ STAGING_EGIT_REPO_URI="git://github.com/wine-compholio/wine-staging.git"
+else
+ SRC_URI="${SRC_URI}
+ staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
+fi
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl pipelight +png +prelink pulseaudio +realtime +run-exes samba scanner selinux +ssl staging test +threads +truetype +udisks v4l +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ gstreamer? ( pulseaudio )
+ mono? ( abi_x86_32 )
+ pipelight? ( staging )
+ osmesa? ( opengl )" #286560
+# winepulse patches needed for gstreamer due to http://bugs.winehq.org/show_bug.cgi?id=30557
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+# tools/make_requests requires perl
+DEPEND="${COMMON_DEPEND}
+ staging? ( dev-lang/perl dev-perl/XML-Simple )
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ if use staging; then
+ EGIT_REPO_URI=${STAGING_EGIT_REPO_URI}
+ unset ${PN}_LIVE_REPO;
+ EGIT_CHECKOUT_DIR=${STAGING_DIR} git-r3_src_unpack
+ fi
+ else
+ unpack ${MY_P}.tar.bz2
+ use staging && unpack "${STAGING_P}.tar.gz"
+ fi
+
+ use pulseaudio && unpack "${PULSE_PATCHES}.tar.bz2"
+ if use staging; then
+ # we use a separate pulseaudio patchset
+ rm -r "${STAGING_DIR}/patches/06-winepulse" || die
+ # ... and need special tools for binary patches
+ mv "${STAGING_DIR}/patches/10-Missing_Fonts" "${T}" || die
+ if ! use pipelight; then
+ rm -r "${STAGING_DIR}/patches/97-Pipelight" || die
+ fi
+ fi
+ unpack "${WINE_GENTOO}.tar.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local f
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.12-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ )
+ use pulseaudio && PATCHES+=(
+ "../${PULSE_PATCHES}"/*.patch #421365
+ )
+ if use staging; then
+ ewarn "Applying the unofficial Wine-Staging patchset which is unsupported"
+ ewarn "by Wine developers. Please don't report bugs to Wine bugzilla"
+ ewarn "unless you can reproduce them with USE=-staging"
+
+ PATCHES+=(
+ "${FILESDIR}/wine-1.7.19-makefile-race-cond.patch"
+ "${STAGING_DIR}/patches"/*/*.patch #507950
+ "${STAGING_DIR}/patches/patch-list.patch"
+ )
+ # epatch doesn't support binary patches
+ ebegin "Applying Staging font patches"
+ for f in "${T}/10-Missing_Fonts"/*.patch; do
+ "${STAGING_DIR}/debian/tools/gitapply.sh" < "${f}" || die "Failed to apply Compholio font patches"
+ done
+ eend
+ fi
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with netapi)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ use pulseaudio && myconf+=( --with-pulse )
+ use staging && myconf+=( --with-xattr )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.7.21-r1.ebuild b/app-emulation/wine/wine-1.7.21-r1.ebuild
new file mode 100644
index 000000000000..2f82806743f3
--- /dev/null
+++ b/app-emulation/wine/wine-1.7.21-r1.ebuild
@@ -0,0 +1,424 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.24"
+MV="4.5.2"
+STAGING_P="wine-staging-${PV}"
+STAGING_DIR="${WORKDIR}/${STAGING_P}"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+PULSE_PATCHES="winepulse-patches-1.7.21"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ pulseaudio? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${PULSE_PATCHES}.tar.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+if [[ ${PV} == "9999" ]] ; then
+ STAGING_EGIT_REPO_URI="git://github.com/wine-compholio/wine-staging.git"
+else
+ SRC_URI="${SRC_URI}
+ staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
+fi
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl pipelight +png +prelink pulseaudio +realtime +run-exes samba scanner selinux +ssl staging test +threads +truetype +udisks v4l +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ gstreamer? ( pulseaudio )
+ mono? ( abi_x86_32 )
+ pipelight? ( staging )
+ osmesa? ( opengl )" #286560
+# winepulse patches needed for gstreamer due to http://bugs.winehq.org/show_bug.cgi?id=30557
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+# tools/make_requests requires perl
+DEPEND="${COMMON_DEPEND}
+ staging? ( dev-lang/perl dev-perl/XML-Simple )
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ if use staging; then
+ EGIT_REPO_URI=${STAGING_EGIT_REPO_URI}
+ unset ${PN}_LIVE_REPO;
+ EGIT_CHECKOUT_DIR=${STAGING_DIR} git-r3_src_unpack
+ fi
+ else
+ unpack ${MY_P}.tar.bz2
+ use staging && unpack "${STAGING_P}.tar.gz"
+ fi
+
+ use pulseaudio && unpack "${PULSE_PATCHES}.tar.bz2"
+ if use staging; then
+ # we use a separate pulseaudio patchset
+ rm -r "${STAGING_DIR}/patches/06-winepulse" || die
+ # ... and need special tools for binary patches
+ mv "${STAGING_DIR}/patches/10-Missing_Fonts" "${T}" || die
+ if ! use pipelight; then
+ rm -r "${STAGING_DIR}/patches/97-Pipelight" || die
+ fi
+ fi
+ unpack "${WINE_GENTOO}.tar.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local f
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.12-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ )
+ use pulseaudio && PATCHES+=(
+ "../${PULSE_PATCHES}"/*.patch #421365
+ )
+ if use gstreamer; then
+ # See http://bugs.winehq.org/show_bug.cgi?id=30557
+ ewarn "Applying experimental patch to fix GStreamer support. Note that"
+ ewarn "this patch has been reported to cause crashes in certain games."
+
+ PATCHES+=( "../${PULSE_PATCHES}"/gstreamer/*.patch )
+ fi
+ if use staging; then
+ ewarn "Applying the unofficial Wine-Staging patchset which is unsupported"
+ ewarn "by Wine developers. Please don't report bugs to Wine bugzilla"
+ ewarn "unless you can reproduce them with USE=-staging"
+
+ PATCHES+=(
+ "${FILESDIR}/wine-1.7.19-makefile-race-cond.patch"
+ "${STAGING_DIR}/patches"/*/*.patch #507950
+ "${STAGING_DIR}/patches/patch-list.patch"
+ )
+ # epatch doesn't support binary patches
+ ebegin "Applying Staging font patches"
+ for f in "${T}/10-Missing_Fonts"/*.patch; do
+ "${STAGING_DIR}/debian/tools/gitapply.sh" < "${f}" || die "Failed to apply Compholio font patches"
+ done
+ eend
+ fi
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with netapi)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ use pulseaudio && myconf+=( --with-pulse )
+ use staging && myconf+=( --with-xattr )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.7.22-r1.ebuild b/app-emulation/wine/wine-1.7.22-r1.ebuild
new file mode 100644
index 000000000000..2f82806743f3
--- /dev/null
+++ b/app-emulation/wine/wine-1.7.22-r1.ebuild
@@ -0,0 +1,424 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.24"
+MV="4.5.2"
+STAGING_P="wine-staging-${PV}"
+STAGING_DIR="${WORKDIR}/${STAGING_P}"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+PULSE_PATCHES="winepulse-patches-1.7.21"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ pulseaudio? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${PULSE_PATCHES}.tar.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+if [[ ${PV} == "9999" ]] ; then
+ STAGING_EGIT_REPO_URI="git://github.com/wine-compholio/wine-staging.git"
+else
+ SRC_URI="${SRC_URI}
+ staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
+fi
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl pipelight +png +prelink pulseaudio +realtime +run-exes samba scanner selinux +ssl staging test +threads +truetype +udisks v4l +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ gstreamer? ( pulseaudio )
+ mono? ( abi_x86_32 )
+ pipelight? ( staging )
+ osmesa? ( opengl )" #286560
+# winepulse patches needed for gstreamer due to http://bugs.winehq.org/show_bug.cgi?id=30557
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+# tools/make_requests requires perl
+DEPEND="${COMMON_DEPEND}
+ staging? ( dev-lang/perl dev-perl/XML-Simple )
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ if use staging; then
+ EGIT_REPO_URI=${STAGING_EGIT_REPO_URI}
+ unset ${PN}_LIVE_REPO;
+ EGIT_CHECKOUT_DIR=${STAGING_DIR} git-r3_src_unpack
+ fi
+ else
+ unpack ${MY_P}.tar.bz2
+ use staging && unpack "${STAGING_P}.tar.gz"
+ fi
+
+ use pulseaudio && unpack "${PULSE_PATCHES}.tar.bz2"
+ if use staging; then
+ # we use a separate pulseaudio patchset
+ rm -r "${STAGING_DIR}/patches/06-winepulse" || die
+ # ... and need special tools for binary patches
+ mv "${STAGING_DIR}/patches/10-Missing_Fonts" "${T}" || die
+ if ! use pipelight; then
+ rm -r "${STAGING_DIR}/patches/97-Pipelight" || die
+ fi
+ fi
+ unpack "${WINE_GENTOO}.tar.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local f
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.12-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ )
+ use pulseaudio && PATCHES+=(
+ "../${PULSE_PATCHES}"/*.patch #421365
+ )
+ if use gstreamer; then
+ # See http://bugs.winehq.org/show_bug.cgi?id=30557
+ ewarn "Applying experimental patch to fix GStreamer support. Note that"
+ ewarn "this patch has been reported to cause crashes in certain games."
+
+ PATCHES+=( "../${PULSE_PATCHES}"/gstreamer/*.patch )
+ fi
+ if use staging; then
+ ewarn "Applying the unofficial Wine-Staging patchset which is unsupported"
+ ewarn "by Wine developers. Please don't report bugs to Wine bugzilla"
+ ewarn "unless you can reproduce them with USE=-staging"
+
+ PATCHES+=(
+ "${FILESDIR}/wine-1.7.19-makefile-race-cond.patch"
+ "${STAGING_DIR}/patches"/*/*.patch #507950
+ "${STAGING_DIR}/patches/patch-list.patch"
+ )
+ # epatch doesn't support binary patches
+ ebegin "Applying Staging font patches"
+ for f in "${T}/10-Missing_Fonts"/*.patch; do
+ "${STAGING_DIR}/debian/tools/gitapply.sh" < "${f}" || die "Failed to apply Compholio font patches"
+ done
+ eend
+ fi
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with netapi)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ use pulseaudio && myconf+=( --with-pulse )
+ use staging && myconf+=( --with-xattr )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.7.28-r1.ebuild b/app-emulation/wine/wine-1.7.28-r1.ebuild
new file mode 100644
index 000000000000..35b3e88e756b
--- /dev/null
+++ b/app-emulation/wine/wine-1.7.28-r1.ebuild
@@ -0,0 +1,427 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.24"
+MV="4.5.2"
+STAGING_P="wine-staging-${PV}"
+STAGING_DIR="${WORKDIR}/${STAGING_P}"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+GST_P="wine-1.7.28-gstreamer-v4"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ gstreamer? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${GST_P}.patch.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+if [[ ${PV} == "9999" ]] ; then
+ STAGING_EGIT_REPO_URI="git://github.com/wine-compholio/wine-staging.git"
+else
+ SRC_URI="${SRC_URI}
+ staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )
+ pulseaudio? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
+fi
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl pcap pipelight +png +prelink pulseaudio +realtime +run-exes samba scanner selinux +ssl staging test +threads +truetype +udisks v4l +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ pipelight? ( staging )
+ osmesa? ( opengl )" #286560
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+# tools/make_requests requires perl
+DEPEND="${COMMON_DEPEND}
+ staging? ( dev-lang/perl dev-perl/XML-Simple )
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ if use staging || use pulseaudio; then
+ EGIT_REPO_URI=${STAGING_EGIT_REPO_URI}
+ unset ${PN}_LIVE_REPO;
+ EGIT_CHECKOUT_DIR=${STAGING_DIR} git-r3_src_unpack
+ fi
+ else
+ unpack ${MY_P}.tar.bz2
+ use staging || use pulseaudio && unpack "${STAGING_P}.tar.gz"
+ fi
+
+ unpack "${WINE_GENTOO}.tar.bz2"
+ use gstreamer && unpack "${GST_P}.patch.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local f
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.12-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ )
+
+ local STAGING_MAKE_ARGS="-W fonts-Missing_Fonts.ok"
+
+ use pipelight || STAGING_MAKE_ARGS="${STAGING_MAKE_ARGS} -W winepulse-PulseAudio_Support.ok"
+ if use gstreamer; then
+ # See http://bugs.winehq.org/show_bug.cgi?id=30557
+ ewarn "Applying experimental patch to fix GStreamer support. Note that"
+ ewarn "this patch has been reported to cause crashes in certain games."
+
+ PATCHES+=( "${WORKDIR}/${GST_P}.patch" )
+ fi
+ if use staging; then
+ ewarn "Applying the unofficial Wine-Staging patchset which is unsupported"
+ ewarn "by Wine developers. Please don't report bugs to Wine bugzilla"
+ ewarn "unless you can reproduce them with USE=-staging"
+
+ # epatch doesn't support binary patches and we ship our own pulse patches
+ emake -C "${STAGING_DIR}/patches" \
+ $(echo ${STAGING_MAKE_ARGS}) \
+ series
+
+ PATCHES+=( $(sed -e "s:^:${STAGING_DIR}/patches/:" \
+ "${STAGING_DIR}/patches/series") )
+
+ # epatch doesn't support binary patches
+ ebegin "Applying Wine-Staging font patches"
+ for f in "${STAGING_DIR}/patches/fonts-Missing_Fonts"/*.patch; do
+ "${STAGING_DIR}/debian/tools/gitapply.sh" < "${f}" \
+ || die "Failed to apply ${f}"
+ done
+ eend
+ elif use pulseaudio; then
+ PATCHES+=( "${STAGING_DIR}/patches/winepulse-PulseAudio_Support"/*.patch )
+ fi
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with netapi)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with pcap)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ if use pulseaudio || use staging; then
+ myconf+=( $(use_with pulseaudio pulse) )
+ fi
+ use staging && myconf+=(
+ --with-xattr
+ )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.7.29-r1.ebuild b/app-emulation/wine/wine-1.7.29-r1.ebuild
new file mode 100644
index 000000000000..35b3e88e756b
--- /dev/null
+++ b/app-emulation/wine/wine-1.7.29-r1.ebuild
@@ -0,0 +1,427 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.24"
+MV="4.5.2"
+STAGING_P="wine-staging-${PV}"
+STAGING_DIR="${WORKDIR}/${STAGING_P}"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+GST_P="wine-1.7.28-gstreamer-v4"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ gstreamer? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${GST_P}.patch.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+if [[ ${PV} == "9999" ]] ; then
+ STAGING_EGIT_REPO_URI="git://github.com/wine-compholio/wine-staging.git"
+else
+ SRC_URI="${SRC_URI}
+ staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )
+ pulseaudio? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
+fi
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl pcap pipelight +png +prelink pulseaudio +realtime +run-exes samba scanner selinux +ssl staging test +threads +truetype +udisks v4l +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ pipelight? ( staging )
+ osmesa? ( opengl )" #286560
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+# tools/make_requests requires perl
+DEPEND="${COMMON_DEPEND}
+ staging? ( dev-lang/perl dev-perl/XML-Simple )
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ if use staging || use pulseaudio; then
+ EGIT_REPO_URI=${STAGING_EGIT_REPO_URI}
+ unset ${PN}_LIVE_REPO;
+ EGIT_CHECKOUT_DIR=${STAGING_DIR} git-r3_src_unpack
+ fi
+ else
+ unpack ${MY_P}.tar.bz2
+ use staging || use pulseaudio && unpack "${STAGING_P}.tar.gz"
+ fi
+
+ unpack "${WINE_GENTOO}.tar.bz2"
+ use gstreamer && unpack "${GST_P}.patch.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local f
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.12-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ )
+
+ local STAGING_MAKE_ARGS="-W fonts-Missing_Fonts.ok"
+
+ use pipelight || STAGING_MAKE_ARGS="${STAGING_MAKE_ARGS} -W winepulse-PulseAudio_Support.ok"
+ if use gstreamer; then
+ # See http://bugs.winehq.org/show_bug.cgi?id=30557
+ ewarn "Applying experimental patch to fix GStreamer support. Note that"
+ ewarn "this patch has been reported to cause crashes in certain games."
+
+ PATCHES+=( "${WORKDIR}/${GST_P}.patch" )
+ fi
+ if use staging; then
+ ewarn "Applying the unofficial Wine-Staging patchset which is unsupported"
+ ewarn "by Wine developers. Please don't report bugs to Wine bugzilla"
+ ewarn "unless you can reproduce them with USE=-staging"
+
+ # epatch doesn't support binary patches and we ship our own pulse patches
+ emake -C "${STAGING_DIR}/patches" \
+ $(echo ${STAGING_MAKE_ARGS}) \
+ series
+
+ PATCHES+=( $(sed -e "s:^:${STAGING_DIR}/patches/:" \
+ "${STAGING_DIR}/patches/series") )
+
+ # epatch doesn't support binary patches
+ ebegin "Applying Wine-Staging font patches"
+ for f in "${STAGING_DIR}/patches/fonts-Missing_Fonts"/*.patch; do
+ "${STAGING_DIR}/debian/tools/gitapply.sh" < "${f}" \
+ || die "Failed to apply ${f}"
+ done
+ eend
+ elif use pulseaudio; then
+ PATCHES+=( "${STAGING_DIR}/patches/winepulse-PulseAudio_Support"/*.patch )
+ fi
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with netapi)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with pcap)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ if use pulseaudio || use staging; then
+ myconf+=( $(use_with pulseaudio pulse) )
+ fi
+ use staging && myconf+=(
+ --with-xattr
+ )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.7.3-r1.ebuild b/app-emulation/wine/wine-1.7.3-r1.ebuild
new file mode 100644
index 000000000000..180ee2cf3799
--- /dev/null
+++ b/app-emulation/wine/wine-1.7.3-r1.ebuild
@@ -0,0 +1,369 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.24"
+MV="0.0.8"
+PULSE_PATCHES="winepulse-patches-1.7.3"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ pulseaudio? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${PULSE_PATCHES}.tar.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +lcms ldap +mono mp3 ncurses nls odbc openal opencl +opengl osmesa oss +perl +png +prelink pulseaudio +realtime +run-exes samba scanner selinux +ssl test +threads +truetype +udisks v4l +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ osmesa? ( opengl )" #286560
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+DEPEND="${COMMON_DEPEND}
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ else
+ unpack ${MY_P}.tar.bz2
+ fi
+
+ use pulseaudio && unpack "${PULSE_PATCHES}.tar.bz2"
+ unpack "${WINE_GENTOO}.tar.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.2-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ "${FILESDIR}"/${PN}-1.7.0-freetype-header-location.patch #539830
+ "${FILESDIR}"/${PN}-gcc-4.9-null-pointer.patch #543446
+ )
+ use pulseaudio && PATCHES+=(
+ "../${PULSE_PATCHES}"/*.patch #421365
+ )
+
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ use pulseaudio && myconf+=( --with-pulse )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.7.33-r1.ebuild b/app-emulation/wine/wine-1.7.33-r1.ebuild
new file mode 100644
index 000000000000..f5149d6d1cd0
--- /dev/null
+++ b/app-emulation/wine/wine-1.7.33-r1.ebuild
@@ -0,0 +1,430 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.34"
+MV="4.5.4"
+STAGING_P="wine-staging-${PV}"
+STAGING_DIR="${WORKDIR}/${STAGING_P}"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+GST_P="wine-1.7.28-gstreamer-v4"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ gstreamer? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${GST_P}.patch.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+if [[ ${PV} == "9999" ]] ; then
+ STAGING_EGIT_REPO_URI="git://github.com/wine-compholio/wine-staging.git"
+else
+ SRC_URI="${SRC_URI}
+ staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )
+ pulseaudio? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
+fi
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +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 +threads +truetype +udisks v4l +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ pipelight? ( staging )
+ s3tc? ( staging )
+ osmesa? ( opengl )" #286560
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ s3tc? ( media-libs/libtxc_dxtn[${MULTILIB_USEDEP}] )
+ staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+# tools/make_requests requires perl
+DEPEND="${COMMON_DEPEND}
+ staging? ( dev-lang/perl dev-perl/XML-Simple )
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ if use staging || use pulseaudio; then
+ EGIT_REPO_URI=${STAGING_EGIT_REPO_URI}
+ unset ${PN}_LIVE_REPO;
+ EGIT_CHECKOUT_DIR=${STAGING_DIR} git-r3_src_unpack
+ fi
+ else
+ unpack ${MY_P}.tar.bz2
+ use staging || use pulseaudio && unpack "${STAGING_P}.tar.gz"
+ fi
+
+ unpack "${WINE_GENTOO}.tar.bz2"
+ use gstreamer && unpack "${GST_P}.patch.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local f
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.12-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ )
+
+ local STAGING_MAKE_ARGS="-W fonts-Missing_Fonts.ok"
+
+ use pipelight || STAGING_MAKE_ARGS="${STAGING_MAKE_ARGS} -W Pipelight.ok"
+ if use gstreamer; then
+ # See http://bugs.winehq.org/show_bug.cgi?id=30557
+ ewarn "Applying experimental patch to fix GStreamer support. Note that"
+ ewarn "this patch has been reported to cause crashes in certain games."
+
+ PATCHES+=( "${WORKDIR}/${GST_P}.patch" )
+ fi
+ if use staging; then
+ ewarn "Applying the unofficial Wine-Staging patchset which is unsupported"
+ ewarn "by Wine developers. Please don't report bugs to Wine bugzilla"
+ ewarn "unless you can reproduce them with USE=-staging"
+
+ # epatch doesn't support binary patches and we ship our own pulse patches
+ emake -C "${STAGING_DIR}/patches" \
+ $(echo ${STAGING_MAKE_ARGS}) \
+ series
+
+ PATCHES+=( $(sed -e "s:^:${STAGING_DIR}/patches/:" \
+ "${STAGING_DIR}/patches/series") )
+
+ # epatch doesn't support binary patches
+ ebegin "Applying Wine-Staging font patches"
+ for f in "${STAGING_DIR}/patches/fonts-Missing_Fonts"/*.patch; do
+ "${STAGING_DIR}/debian/tools/gitapply.sh" < "${f}" \
+ || die "Failed to apply ${f}"
+ done
+ eend
+ elif use pulseaudio; then
+ PATCHES+=( "${STAGING_DIR}/patches/winepulse-PulseAudio_Support"/*.patch )
+ fi
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with netapi)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with pcap)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ if use pulseaudio || use staging; then
+ myconf+=( $(use_with pulseaudio pulse) )
+ fi
+ use staging && myconf+=(
+ --with-xattr
+ $(use_with s3tc txc_dxtn)
+ )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.7.34.ebuild b/app-emulation/wine/wine-1.7.34.ebuild
new file mode 100644
index 000000000000..1a98e86da9e4
--- /dev/null
+++ b/app-emulation/wine/wine-1.7.34.ebuild
@@ -0,0 +1,427 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.34"
+MV="4.5.4"
+STAGING_P="wine-staging-${PV}"
+STAGING_DIR="${WORKDIR}/${STAGING_P}"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+GST_P="wine-1.7.34-gstreamer-v5"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ gstreamer? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${GST_P}.patch.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+if [[ ${PV} == "9999" ]] ; then
+ STAGING_EGIT_REPO_URI="git://github.com/wine-compholio/wine-staging.git"
+else
+ SRC_URI="${SRC_URI}
+ staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )
+ pulseaudio? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
+fi
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +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 +threads +truetype +udisks v4l +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ pipelight? ( staging )
+ s3tc? ( staging )
+ osmesa? ( opengl )" #286560
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ s3tc? ( media-libs/libtxc_dxtn[${MULTILIB_USEDEP}] )
+ staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+# tools/make_requests requires perl
+DEPEND="${COMMON_DEPEND}
+ staging? ( dev-lang/perl dev-perl/XML-Simple )
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ if use staging || use pulseaudio; then
+ EGIT_REPO_URI=${STAGING_EGIT_REPO_URI}
+ unset ${PN}_LIVE_REPO;
+ EGIT_CHECKOUT_DIR=${STAGING_DIR} git-r3_src_unpack
+ fi
+ else
+ unpack ${MY_P}.tar.bz2
+ use staging || use pulseaudio && unpack "${STAGING_P}.tar.gz"
+ fi
+
+ unpack "${WINE_GENTOO}.tar.bz2"
+ use gstreamer && unpack "${GST_P}.patch.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.12-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ )
+
+ if use gstreamer; then
+ # See http://bugs.winehq.org/show_bug.cgi?id=30557
+ ewarn "Applying experimental patch to fix GStreamer support. Note that"
+ ewarn "this patch has been reported to cause crashes in certain games."
+
+ PATCHES+=( "${WORKDIR}/${GST_P}.patch" )
+ fi
+ if use staging; then
+ ewarn "Applying the unofficial Wine-Staging patchset which is unsupported"
+ ewarn "by Wine developers. Please don't report bugs to Wine bugzilla"
+ ewarn "unless you can reproduce them with USE=-staging"
+
+ # Apply temporary patch to wine-staging to allow for epatch as a backend to wine-staging's new patch script
+ pushd "${STAGING_DIR}"
+ epatch "${FILESDIR}"/wine-staging-gentoo-epatch-support.patch
+ popd
+
+ local STAGING_EXCLUDE=""
+ use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
+
+ # Launch wine-staging patcher in a subshell, using epatch as a backend, and gitapply.sh as a backend for binary patches
+ ebegin "Running Wine-Staging patch installer"
+ (
+ set -- DESTDIR="${S}" --backend=epatch --no-autoconf --all ${STAGING_EXCLUDE}
+ cd "${STAGING_DIR}/patches"
+ source "${STAGING_DIR}/patches/patchinstall.sh"
+ )
+ eend $?
+ elif use pulseaudio; then
+ PATCHES+=( "${STAGING_DIR}/patches/winepulse-PulseAudio_Support"/*.patch )
+ fi
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with netapi)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with pcap)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ if use pulseaudio || use staging; then
+ myconf+=( $(use_with pulseaudio pulse) )
+ fi
+ use staging && myconf+=(
+ --with-xattr
+ $(use_with s3tc txc_dxtn)
+ )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.7.35.ebuild b/app-emulation/wine/wine-1.7.35.ebuild
new file mode 100644
index 000000000000..991374736da0
--- /dev/null
+++ b/app-emulation/wine/wine-1.7.35.ebuild
@@ -0,0 +1,422 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.34"
+MV="4.5.4"
+STAGING_P="wine-staging-${PV}"
+STAGING_DIR="${WORKDIR}/${STAGING_P}"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+GST_P="wine-1.7.34-gstreamer-v5"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ gstreamer? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${GST_P}.patch.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+if [[ ${PV} == "9999" ]] ; then
+ STAGING_EGIT_REPO_URI="git://github.com/wine-compholio/wine-staging.git"
+else
+ SRC_URI="${SRC_URI}
+ staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )
+ pulseaudio? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
+fi
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +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 +threads +truetype +udisks v4l +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ pipelight? ( staging )
+ s3tc? ( staging )
+ osmesa? ( opengl )" #286560
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ s3tc? ( media-libs/libtxc_dxtn[${MULTILIB_USEDEP}] )
+ staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+# tools/make_requests requires perl
+DEPEND="${COMMON_DEPEND}
+ staging? ( dev-lang/perl dev-perl/XML-Simple )
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ if use staging || use pulseaudio; then
+ EGIT_REPO_URI=${STAGING_EGIT_REPO_URI}
+ unset ${PN}_LIVE_REPO;
+ EGIT_CHECKOUT_DIR=${STAGING_DIR} git-r3_src_unpack
+ fi
+ else
+ unpack ${MY_P}.tar.bz2
+ use staging || use pulseaudio && unpack "${STAGING_P}.tar.gz"
+ fi
+
+ unpack "${WINE_GENTOO}.tar.bz2"
+ use gstreamer && unpack "${GST_P}.patch.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.12-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ )
+
+ if use gstreamer; then
+ # See http://bugs.winehq.org/show_bug.cgi?id=30557
+ ewarn "Applying experimental patch to fix GStreamer support. Note that"
+ ewarn "this patch has been reported to cause crashes in certain games."
+
+ PATCHES+=( "${WORKDIR}/${GST_P}.patch" )
+ fi
+ if use staging; then
+ ewarn "Applying the unofficial Wine-Staging patchset which is unsupported"
+ ewarn "by Wine developers. Please don't report bugs to Wine bugzilla"
+ ewarn "unless you can reproduce them with USE=-staging"
+
+ local STAGING_EXCLUDE=""
+ use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
+
+ # Launch wine-staging patcher in a subshell, using epatch as a backend, and gitapply.sh as a backend for binary patches
+ ebegin "Running Wine-Staging patch installer"
+ (
+ set -- DESTDIR="${S}" --backend=epatch --no-autoconf --all ${STAGING_EXCLUDE}
+ cd "${STAGING_DIR}/patches"
+ source "${STAGING_DIR}/patches/patchinstall.sh"
+ )
+ eend $?
+ elif use pulseaudio; then
+ PATCHES+=( "${STAGING_DIR}/patches/winepulse-PulseAudio_Support"/*.patch )
+ fi
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with netapi)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with pcap)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ if use pulseaudio || use staging; then
+ myconf+=( $(use_with pulseaudio pulse) )
+ fi
+ use staging && myconf+=(
+ --with-xattr
+ $(use_with s3tc txc_dxtn)
+ )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.7.36.ebuild b/app-emulation/wine/wine-1.7.36.ebuild
new file mode 100644
index 000000000000..b0ed2dd66aad
--- /dev/null
+++ b/app-emulation/wine/wine-1.7.36.ebuild
@@ -0,0 +1,421 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.34"
+MV="4.5.4"
+STAGING_P="wine-staging-${PV}"
+STAGING_DIR="${WORKDIR}/${STAGING_P}"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+GST_P="wine-1.7.34-gstreamer-v5"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ gstreamer? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${GST_P}.patch.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+if [[ ${PV} == "9999" ]] ; then
+ STAGING_EGIT_REPO_URI="git://github.com/wine-compholio/wine-staging.git"
+else
+ SRC_URI="${SRC_URI}
+ staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )
+ pulseaudio? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
+fi
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +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 +threads +truetype +udisks v4l +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ pipelight? ( staging )
+ s3tc? ( staging )
+ osmesa? ( opengl )" #286560
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
+ staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
+ s3tc? ( media-libs/libtxc_dxtn[${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+# tools/make_requests requires perl
+DEPEND="${COMMON_DEPEND}
+ staging? ( dev-lang/perl dev-perl/XML-Simple )
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ if use staging || use pulseaudio; then
+ EGIT_REPO_URI=${STAGING_EGIT_REPO_URI}
+ unset ${PN}_LIVE_REPO;
+ EGIT_CHECKOUT_DIR=${STAGING_DIR} git-r3_src_unpack
+ fi
+ else
+ unpack ${MY_P}.tar.bz2
+ use staging || use pulseaudio && unpack "${STAGING_P}.tar.gz"
+ fi
+
+ unpack "${WINE_GENTOO}.tar.bz2"
+ use gstreamer && unpack "${GST_P}.patch.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.12-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ )
+
+ if use gstreamer; then
+ # See http://bugs.winehq.org/show_bug.cgi?id=30557
+ ewarn "Applying experimental patch to fix GStreamer support. Note that"
+ ewarn "this patch has been reported to cause crashes in certain games."
+
+ PATCHES+=( "${WORKDIR}/${GST_P}.patch" )
+ fi
+ if use staging; then
+ ewarn "Applying the unofficial Wine-Staging patchset which is unsupported"
+ ewarn "by Wine developers. Please don't report bugs to Wine bugzilla"
+ ewarn "unless you can reproduce them with USE=-staging"
+
+ local STAGING_EXCLUDE=""
+ use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
+
+ # Launch wine-staging patcher in a subshell, using epatch as a backend, and gitapply.sh as a backend for binary patches
+ ebegin "Running Wine-Staging patch installer"
+ (
+ set -- DESTDIR="${S}" --backend=epatch --no-autoconf --all ${STAGING_EXCLUDE}
+ cd "${STAGING_DIR}/patches"
+ source "${STAGING_DIR}/patches/patchinstall.sh"
+ )
+ eend $?
+ elif use pulseaudio; then
+ PATCHES+=( "${STAGING_DIR}/patches/winepulse-PulseAudio_Support"/*.patch )
+ fi
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with netapi)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with pcap)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ if use pulseaudio || use staging; then
+ myconf+=( $(use_with pulseaudio pulse) )
+ fi
+ use staging && myconf+=(
+ --with-xattr
+ $(use_with s3tc txc_dxtn)
+ )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.7.37.ebuild b/app-emulation/wine/wine-1.7.37.ebuild
new file mode 100644
index 000000000000..d0c75483f2e4
--- /dev/null
+++ b/app-emulation/wine/wine-1.7.37.ebuild
@@ -0,0 +1,424 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.34"
+MV="4.5.4"
+STAGING_P="wine-staging-${PV}"
+STAGING_DIR="${WORKDIR}/${STAGING_P}"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+GST_P="wine-1.7.34-gstreamer-v5"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ gstreamer? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${GST_P}.patch.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+if [[ ${PV} == "9999" ]] ; then
+ STAGING_EGIT_REPO_URI="git://github.com/wine-compholio/wine-staging.git"
+else
+ SRC_URI="${SRC_URI}
+ staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )
+ pulseaudio? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
+fi
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +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 +threads +truetype +udisks v4l vaapi +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ pipelight? ( staging )
+ s3tc? ( staging )
+ vaapi? ( staging )
+ osmesa? ( opengl )" #286560
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+# tools/make_requests requires perl
+DEPEND="${COMMON_DEPEND}
+ staging? ( dev-lang/perl dev-perl/XML-Simple )
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ if use staging || use pulseaudio; then
+ EGIT_REPO_URI=${STAGING_EGIT_REPO_URI}
+ unset ${PN}_LIVE_REPO;
+ EGIT_CHECKOUT_DIR=${STAGING_DIR} git-r3_src_unpack
+ fi
+ else
+ unpack ${MY_P}.tar.bz2
+ use staging || use pulseaudio && unpack "${STAGING_P}.tar.gz"
+ fi
+
+ unpack "${WINE_GENTOO}.tar.bz2"
+ use gstreamer && unpack "${GST_P}.patch.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.12-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ )
+
+ if use gstreamer; then
+ # See http://bugs.winehq.org/show_bug.cgi?id=30557
+ ewarn "Applying experimental patch to fix GStreamer support. Note that"
+ ewarn "this patch has been reported to cause crashes in certain games."
+
+ PATCHES+=( "${WORKDIR}/${GST_P}.patch" )
+ fi
+ if use staging; then
+ ewarn "Applying the unofficial Wine-Staging patchset which is unsupported"
+ ewarn "by Wine developers. Please don't report bugs to Wine bugzilla"
+ ewarn "unless you can reproduce them with USE=-staging"
+
+ local STAGING_EXCLUDE=""
+ use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
+
+ # Launch wine-staging patcher in a subshell, using epatch as a backend, and gitapply.sh as a backend for binary patches
+ ebegin "Running Wine-Staging patch installer"
+ (
+ set -- DESTDIR="${S}" --backend=epatch --no-autoconf --all ${STAGING_EXCLUDE}
+ cd "${STAGING_DIR}/patches"
+ source "${STAGING_DIR}/patches/patchinstall.sh"
+ )
+ eend $?
+ elif use pulseaudio; then
+ PATCHES+=( "${STAGING_DIR}/patches/winepulse-PulseAudio_Support"/*.patch )
+ fi
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with netapi)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with pcap)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ if use pulseaudio || use staging; then
+ myconf+=( $(use_with pulseaudio pulse) )
+ fi
+ use staging && myconf+=(
+ --with-xattr
+ $(use_with vaapi va)
+ )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.7.38-r1.ebuild b/app-emulation/wine/wine-1.7.38-r1.ebuild
new file mode 100644
index 000000000000..df03a2013cd1
--- /dev/null
+++ b/app-emulation/wine/wine-1.7.38-r1.ebuild
@@ -0,0 +1,434 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.36"
+MV="4.5.6"
+STAGING_P="wine-staging-${PV}"
+STAGING_DIR="${WORKDIR}/${STAGING_P}"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+GST_P="wine-1.7.34-gstreamer-v5"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ gstreamer? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${GST_P}.patch.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+if [[ ${PV} == "9999" ]] ; then
+ STAGING_EGIT_REPO_URI="git://github.com/wine-compholio/wine-staging.git"
+else
+ SRC_URI="${SRC_URI}
+ staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )
+ pulseaudio? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
+fi
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +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 +threads +truetype +udisks v4l vaapi +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ pipelight? ( staging )
+ s3tc? ( staging )
+ vaapi? ( staging )
+ osmesa? ( opengl )" #286560
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+# tools/make_requests requires perl
+DEPEND="${COMMON_DEPEND}
+ staging? ( dev-lang/perl dev-perl/XML-Simple )
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ if use staging || use pulseaudio; then
+ EGIT_REPO_URI=${STAGING_EGIT_REPO_URI}
+ unset ${PN}_LIVE_REPO;
+ EGIT_CHECKOUT_DIR=${STAGING_DIR} git-r3_src_unpack
+ fi
+ else
+ unpack ${MY_P}.tar.bz2
+ use staging || use pulseaudio && unpack "${STAGING_P}.tar.gz"
+ fi
+
+ unpack "${WINE_GENTOO}.tar.bz2"
+ use gstreamer && unpack "${GST_P}.patch.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.12-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ )
+ if use gstreamer; then
+ # See http://bugs.winehq.org/show_bug.cgi?id=30557
+ ewarn "Applying experimental patch to fix GStreamer support. Note that"
+ ewarn "this patch has been reported to cause crashes in certain games."
+
+ # Wine-Staging 1.7.38 "ntdll: Fix race-condition when threads are killed
+ # during shutdown" patch prevents the gstreamer patch from applying cleanly.
+ # So undo the staging patch, apply gstreamer, then re-apply rebased staging
+ # patch on top.
+ if use staging; then
+ PATCHES+=(
+ "${FILESDIR}/${PN}-1.7.38-gstreamer-v5-staging-pre.patch"
+ "${WORKDIR}/${GST_P}.patch"
+ "${FILESDIR}/${PN}-1.7.38-gstreamer-v5-staging-post.patch" )
+ else
+ PATCHES+=( "${WORKDIR}/${GST_P}.patch" )
+ fi
+ fi
+ if use staging; then
+ ewarn "Applying the unofficial Wine-Staging patchset which is unsupported"
+ ewarn "by Wine developers. Please don't report bugs to Wine bugzilla"
+ ewarn "unless you can reproduce them with USE=-staging"
+
+ local STAGING_EXCLUDE=""
+ use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
+
+ # Launch wine-staging patcher in a subshell, using epatch as a backend, and gitapply.sh as a backend for binary patches
+ ebegin "Running Wine-Staging patch installer"
+ (
+ set -- DESTDIR="${S}" --backend=epatch --no-autoconf --all ${STAGING_EXCLUDE}
+ cd "${STAGING_DIR}/patches"
+ source "${STAGING_DIR}/patches/patchinstall.sh"
+ )
+ eend $?
+ elif use pulseaudio; then
+ PATCHES+=( "${STAGING_DIR}/patches/winepulse-PulseAudio_Support"/*.patch )
+ fi
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with netapi)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with pcap)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ if use pulseaudio || use staging; then
+ myconf+=( $(use_with pulseaudio pulse) )
+ fi
+ use staging && myconf+=(
+ --with-xattr
+ $(use_with vaapi va)
+ )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.7.39-r1.ebuild b/app-emulation/wine/wine-1.7.39-r1.ebuild
new file mode 100644
index 000000000000..6705349e0602
--- /dev/null
+++ b/app-emulation/wine/wine-1.7.39-r1.ebuild
@@ -0,0 +1,436 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.36"
+MV="4.5.6"
+STAGING_P="wine-staging-${PV}"
+STAGING_DIR="${WORKDIR}/${STAGING_P}"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+GST_P="wine-1.7.34-gstreamer-v5"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ gstreamer? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${GST_P}.patch.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+if [[ ${PV} == "9999" ]] ; then
+ STAGING_EGIT_REPO_URI="git://github.com/wine-compholio/wine-staging.git"
+else
+ SRC_URI="${SRC_URI}
+ staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )
+ pulseaudio? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
+fi
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +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 +threads +truetype +udisks v4l vaapi +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ pipelight? ( staging )
+ s3tc? ( staging )
+ vaapi? ( staging )
+ osmesa? ( opengl )" #286560
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+# tools/make_requests requires perl
+DEPEND="${COMMON_DEPEND}
+ staging? ( dev-lang/perl dev-perl/XML-Simple )
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ if use staging || use pulseaudio; then
+ EGIT_REPO_URI=${STAGING_EGIT_REPO_URI}
+ unset ${PN}_LIVE_REPO;
+ EGIT_CHECKOUT_DIR=${STAGING_DIR} git-r3_src_unpack
+ fi
+ else
+ unpack ${MY_P}.tar.bz2
+ use staging || use pulseaudio && unpack "${STAGING_P}.tar.gz"
+ fi
+
+ unpack "${WINE_GENTOO}.tar.bz2"
+ use gstreamer && unpack "${GST_P}.patch.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.12-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ )
+ if use gstreamer; then
+ # See http://bugs.winehq.org/show_bug.cgi?id=30557
+ ewarn "Applying experimental patch to fix GStreamer support. Note that"
+ ewarn "this patch has been reported to cause crashes in certain games."
+
+ # Wine-Staging 1.7.38 "ntdll: Fix race-condition when threads are killed
+ # during shutdown" patch and "Added patch to implement shared memory
+ # wineserver communication for various user32 functions" prevents the
+ # gstreamer patch from applying cleanly.
+ # So undo the staging patch, apply gstreamer, then re-apply rebased staging
+ # patch on top.
+ if use staging; then
+ PATCHES+=(
+ "${FILESDIR}/${PN}-1.7.39-gstreamer-v5-staging-pre.patch"
+ "${WORKDIR}/${GST_P}.patch"
+ "${FILESDIR}/${PN}-1.7.39-gstreamer-v5-staging-post.patch" )
+ else
+ PATCHES+=( "${WORKDIR}/${GST_P}.patch" )
+ fi
+ fi
+ if use staging; then
+ ewarn "Applying the unofficial Wine-Staging patchset which is unsupported"
+ ewarn "by Wine developers. Please don't report bugs to Wine bugzilla"
+ ewarn "unless you can reproduce them with USE=-staging"
+
+ local STAGING_EXCLUDE=""
+ use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
+
+ # Launch wine-staging patcher in a subshell, using epatch as a backend, and gitapply.sh as a backend for binary patches
+ ebegin "Running Wine-Staging patch installer"
+ (
+ set -- DESTDIR="${S}" --backend=epatch --no-autoconf --all ${STAGING_EXCLUDE}
+ cd "${STAGING_DIR}/patches"
+ source "${STAGING_DIR}/patches/patchinstall.sh"
+ )
+ eend $?
+ elif use pulseaudio; then
+ PATCHES+=( "${STAGING_DIR}/patches/winepulse-PulseAudio_Support"/*.patch )
+ fi
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with netapi)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with pcap)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ if use pulseaudio || use staging; then
+ myconf+=( $(use_with pulseaudio pulse) )
+ fi
+ use staging && myconf+=(
+ --with-xattr
+ $(use_with vaapi va)
+ )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.7.4-r1.ebuild b/app-emulation/wine/wine-1.7.4-r1.ebuild
new file mode 100644
index 000000000000..2d53b2ee5da6
--- /dev/null
+++ b/app-emulation/wine/wine-1.7.4-r1.ebuild
@@ -0,0 +1,369 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.24"
+MV="0.0.8"
+PULSE_PATCHES="winepulse-patches-1.7.4"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ pulseaudio? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${PULSE_PATCHES}.tar.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +lcms ldap +mono mp3 ncurses nls odbc openal opencl +opengl osmesa oss +perl +png +prelink pulseaudio +realtime +run-exes samba scanner selinux +ssl test +threads +truetype +udisks v4l +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ osmesa? ( opengl )" #286560
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+DEPEND="${COMMON_DEPEND}
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ else
+ unpack ${MY_P}.tar.bz2
+ fi
+
+ use pulseaudio && unpack "${PULSE_PATCHES}.tar.bz2"
+ unpack "${WINE_GENTOO}.tar.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.2-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ "${FILESDIR}"/${PN}-1.7.0-freetype-header-location.patch #539830
+ "${FILESDIR}"/${PN}-gcc-4.9-null-pointer.patch #543446
+ )
+ use pulseaudio && PATCHES+=(
+ "../${PULSE_PATCHES}"/*.patch #421365
+ )
+
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ use pulseaudio && myconf+=( --with-pulse )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.7.40-r1.ebuild b/app-emulation/wine/wine-1.7.40-r1.ebuild
new file mode 100644
index 000000000000..6705349e0602
--- /dev/null
+++ b/app-emulation/wine/wine-1.7.40-r1.ebuild
@@ -0,0 +1,436 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.36"
+MV="4.5.6"
+STAGING_P="wine-staging-${PV}"
+STAGING_DIR="${WORKDIR}/${STAGING_P}"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+GST_P="wine-1.7.34-gstreamer-v5"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ gstreamer? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${GST_P}.patch.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+if [[ ${PV} == "9999" ]] ; then
+ STAGING_EGIT_REPO_URI="git://github.com/wine-compholio/wine-staging.git"
+else
+ SRC_URI="${SRC_URI}
+ staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )
+ pulseaudio? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
+fi
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +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 +threads +truetype +udisks v4l vaapi +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ pipelight? ( staging )
+ s3tc? ( staging )
+ vaapi? ( staging )
+ osmesa? ( opengl )" #286560
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+# tools/make_requests requires perl
+DEPEND="${COMMON_DEPEND}
+ staging? ( dev-lang/perl dev-perl/XML-Simple )
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ if use staging || use pulseaudio; then
+ EGIT_REPO_URI=${STAGING_EGIT_REPO_URI}
+ unset ${PN}_LIVE_REPO;
+ EGIT_CHECKOUT_DIR=${STAGING_DIR} git-r3_src_unpack
+ fi
+ else
+ unpack ${MY_P}.tar.bz2
+ use staging || use pulseaudio && unpack "${STAGING_P}.tar.gz"
+ fi
+
+ unpack "${WINE_GENTOO}.tar.bz2"
+ use gstreamer && unpack "${GST_P}.patch.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.12-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ )
+ if use gstreamer; then
+ # See http://bugs.winehq.org/show_bug.cgi?id=30557
+ ewarn "Applying experimental patch to fix GStreamer support. Note that"
+ ewarn "this patch has been reported to cause crashes in certain games."
+
+ # Wine-Staging 1.7.38 "ntdll: Fix race-condition when threads are killed
+ # during shutdown" patch and "Added patch to implement shared memory
+ # wineserver communication for various user32 functions" prevents the
+ # gstreamer patch from applying cleanly.
+ # So undo the staging patch, apply gstreamer, then re-apply rebased staging
+ # patch on top.
+ if use staging; then
+ PATCHES+=(
+ "${FILESDIR}/${PN}-1.7.39-gstreamer-v5-staging-pre.patch"
+ "${WORKDIR}/${GST_P}.patch"
+ "${FILESDIR}/${PN}-1.7.39-gstreamer-v5-staging-post.patch" )
+ else
+ PATCHES+=( "${WORKDIR}/${GST_P}.patch" )
+ fi
+ fi
+ if use staging; then
+ ewarn "Applying the unofficial Wine-Staging patchset which is unsupported"
+ ewarn "by Wine developers. Please don't report bugs to Wine bugzilla"
+ ewarn "unless you can reproduce them with USE=-staging"
+
+ local STAGING_EXCLUDE=""
+ use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
+
+ # Launch wine-staging patcher in a subshell, using epatch as a backend, and gitapply.sh as a backend for binary patches
+ ebegin "Running Wine-Staging patch installer"
+ (
+ set -- DESTDIR="${S}" --backend=epatch --no-autoconf --all ${STAGING_EXCLUDE}
+ cd "${STAGING_DIR}/patches"
+ source "${STAGING_DIR}/patches/patchinstall.sh"
+ )
+ eend $?
+ elif use pulseaudio; then
+ PATCHES+=( "${STAGING_DIR}/patches/winepulse-PulseAudio_Support"/*.patch )
+ fi
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with netapi)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with pcap)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ if use pulseaudio || use staging; then
+ myconf+=( $(use_with pulseaudio pulse) )
+ fi
+ use staging && myconf+=(
+ --with-xattr
+ $(use_with vaapi va)
+ )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.7.41.ebuild b/app-emulation/wine/wine-1.7.41.ebuild
new file mode 100644
index 000000000000..6705349e0602
--- /dev/null
+++ b/app-emulation/wine/wine-1.7.41.ebuild
@@ -0,0 +1,436 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.36"
+MV="4.5.6"
+STAGING_P="wine-staging-${PV}"
+STAGING_DIR="${WORKDIR}/${STAGING_P}"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+GST_P="wine-1.7.34-gstreamer-v5"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ gstreamer? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${GST_P}.patch.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+if [[ ${PV} == "9999" ]] ; then
+ STAGING_EGIT_REPO_URI="git://github.com/wine-compholio/wine-staging.git"
+else
+ SRC_URI="${SRC_URI}
+ staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )
+ pulseaudio? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
+fi
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +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 +threads +truetype +udisks v4l vaapi +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ pipelight? ( staging )
+ s3tc? ( staging )
+ vaapi? ( staging )
+ osmesa? ( opengl )" #286560
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+# tools/make_requests requires perl
+DEPEND="${COMMON_DEPEND}
+ staging? ( dev-lang/perl dev-perl/XML-Simple )
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ if use staging || use pulseaudio; then
+ EGIT_REPO_URI=${STAGING_EGIT_REPO_URI}
+ unset ${PN}_LIVE_REPO;
+ EGIT_CHECKOUT_DIR=${STAGING_DIR} git-r3_src_unpack
+ fi
+ else
+ unpack ${MY_P}.tar.bz2
+ use staging || use pulseaudio && unpack "${STAGING_P}.tar.gz"
+ fi
+
+ unpack "${WINE_GENTOO}.tar.bz2"
+ use gstreamer && unpack "${GST_P}.patch.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.12-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ )
+ if use gstreamer; then
+ # See http://bugs.winehq.org/show_bug.cgi?id=30557
+ ewarn "Applying experimental patch to fix GStreamer support. Note that"
+ ewarn "this patch has been reported to cause crashes in certain games."
+
+ # Wine-Staging 1.7.38 "ntdll: Fix race-condition when threads are killed
+ # during shutdown" patch and "Added patch to implement shared memory
+ # wineserver communication for various user32 functions" prevents the
+ # gstreamer patch from applying cleanly.
+ # So undo the staging patch, apply gstreamer, then re-apply rebased staging
+ # patch on top.
+ if use staging; then
+ PATCHES+=(
+ "${FILESDIR}/${PN}-1.7.39-gstreamer-v5-staging-pre.patch"
+ "${WORKDIR}/${GST_P}.patch"
+ "${FILESDIR}/${PN}-1.7.39-gstreamer-v5-staging-post.patch" )
+ else
+ PATCHES+=( "${WORKDIR}/${GST_P}.patch" )
+ fi
+ fi
+ if use staging; then
+ ewarn "Applying the unofficial Wine-Staging patchset which is unsupported"
+ ewarn "by Wine developers. Please don't report bugs to Wine bugzilla"
+ ewarn "unless you can reproduce them with USE=-staging"
+
+ local STAGING_EXCLUDE=""
+ use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
+
+ # Launch wine-staging patcher in a subshell, using epatch as a backend, and gitapply.sh as a backend for binary patches
+ ebegin "Running Wine-Staging patch installer"
+ (
+ set -- DESTDIR="${S}" --backend=epatch --no-autoconf --all ${STAGING_EXCLUDE}
+ cd "${STAGING_DIR}/patches"
+ source "${STAGING_DIR}/patches/patchinstall.sh"
+ )
+ eend $?
+ elif use pulseaudio; then
+ PATCHES+=( "${STAGING_DIR}/patches/winepulse-PulseAudio_Support"/*.patch )
+ fi
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with netapi)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with pcap)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ if use pulseaudio || use staging; then
+ myconf+=( $(use_with pulseaudio pulse) )
+ fi
+ use staging && myconf+=(
+ --with-xattr
+ $(use_with vaapi va)
+ )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.7.42.ebuild b/app-emulation/wine/wine-1.7.42.ebuild
new file mode 100644
index 000000000000..6705349e0602
--- /dev/null
+++ b/app-emulation/wine/wine-1.7.42.ebuild
@@ -0,0 +1,436 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.36"
+MV="4.5.6"
+STAGING_P="wine-staging-${PV}"
+STAGING_DIR="${WORKDIR}/${STAGING_P}"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+GST_P="wine-1.7.34-gstreamer-v5"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ gstreamer? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${GST_P}.patch.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+if [[ ${PV} == "9999" ]] ; then
+ STAGING_EGIT_REPO_URI="git://github.com/wine-compholio/wine-staging.git"
+else
+ SRC_URI="${SRC_URI}
+ staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )
+ pulseaudio? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
+fi
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +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 +threads +truetype +udisks v4l vaapi +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ pipelight? ( staging )
+ s3tc? ( staging )
+ vaapi? ( staging )
+ osmesa? ( opengl )" #286560
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+# tools/make_requests requires perl
+DEPEND="${COMMON_DEPEND}
+ staging? ( dev-lang/perl dev-perl/XML-Simple )
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ if use staging || use pulseaudio; then
+ EGIT_REPO_URI=${STAGING_EGIT_REPO_URI}
+ unset ${PN}_LIVE_REPO;
+ EGIT_CHECKOUT_DIR=${STAGING_DIR} git-r3_src_unpack
+ fi
+ else
+ unpack ${MY_P}.tar.bz2
+ use staging || use pulseaudio && unpack "${STAGING_P}.tar.gz"
+ fi
+
+ unpack "${WINE_GENTOO}.tar.bz2"
+ use gstreamer && unpack "${GST_P}.patch.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.12-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ )
+ if use gstreamer; then
+ # See http://bugs.winehq.org/show_bug.cgi?id=30557
+ ewarn "Applying experimental patch to fix GStreamer support. Note that"
+ ewarn "this patch has been reported to cause crashes in certain games."
+
+ # Wine-Staging 1.7.38 "ntdll: Fix race-condition when threads are killed
+ # during shutdown" patch and "Added patch to implement shared memory
+ # wineserver communication for various user32 functions" prevents the
+ # gstreamer patch from applying cleanly.
+ # So undo the staging patch, apply gstreamer, then re-apply rebased staging
+ # patch on top.
+ if use staging; then
+ PATCHES+=(
+ "${FILESDIR}/${PN}-1.7.39-gstreamer-v5-staging-pre.patch"
+ "${WORKDIR}/${GST_P}.patch"
+ "${FILESDIR}/${PN}-1.7.39-gstreamer-v5-staging-post.patch" )
+ else
+ PATCHES+=( "${WORKDIR}/${GST_P}.patch" )
+ fi
+ fi
+ if use staging; then
+ ewarn "Applying the unofficial Wine-Staging patchset which is unsupported"
+ ewarn "by Wine developers. Please don't report bugs to Wine bugzilla"
+ ewarn "unless you can reproduce them with USE=-staging"
+
+ local STAGING_EXCLUDE=""
+ use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
+
+ # Launch wine-staging patcher in a subshell, using epatch as a backend, and gitapply.sh as a backend for binary patches
+ ebegin "Running Wine-Staging patch installer"
+ (
+ set -- DESTDIR="${S}" --backend=epatch --no-autoconf --all ${STAGING_EXCLUDE}
+ cd "${STAGING_DIR}/patches"
+ source "${STAGING_DIR}/patches/patchinstall.sh"
+ )
+ eend $?
+ elif use pulseaudio; then
+ PATCHES+=( "${STAGING_DIR}/patches/winepulse-PulseAudio_Support"/*.patch )
+ fi
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with netapi)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with pcap)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ if use pulseaudio || use staging; then
+ myconf+=( $(use_with pulseaudio pulse) )
+ fi
+ use staging && myconf+=(
+ --with-xattr
+ $(use_with vaapi va)
+ )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.7.43.ebuild b/app-emulation/wine/wine-1.7.43.ebuild
new file mode 100644
index 000000000000..6705349e0602
--- /dev/null
+++ b/app-emulation/wine/wine-1.7.43.ebuild
@@ -0,0 +1,436 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.36"
+MV="4.5.6"
+STAGING_P="wine-staging-${PV}"
+STAGING_DIR="${WORKDIR}/${STAGING_P}"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+GST_P="wine-1.7.34-gstreamer-v5"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ gstreamer? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${GST_P}.patch.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+if [[ ${PV} == "9999" ]] ; then
+ STAGING_EGIT_REPO_URI="git://github.com/wine-compholio/wine-staging.git"
+else
+ SRC_URI="${SRC_URI}
+ staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )
+ pulseaudio? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
+fi
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +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 +threads +truetype +udisks v4l vaapi +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ pipelight? ( staging )
+ s3tc? ( staging )
+ vaapi? ( staging )
+ osmesa? ( opengl )" #286560
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+# tools/make_requests requires perl
+DEPEND="${COMMON_DEPEND}
+ staging? ( dev-lang/perl dev-perl/XML-Simple )
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ if use staging || use pulseaudio; then
+ EGIT_REPO_URI=${STAGING_EGIT_REPO_URI}
+ unset ${PN}_LIVE_REPO;
+ EGIT_CHECKOUT_DIR=${STAGING_DIR} git-r3_src_unpack
+ fi
+ else
+ unpack ${MY_P}.tar.bz2
+ use staging || use pulseaudio && unpack "${STAGING_P}.tar.gz"
+ fi
+
+ unpack "${WINE_GENTOO}.tar.bz2"
+ use gstreamer && unpack "${GST_P}.patch.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.12-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ )
+ if use gstreamer; then
+ # See http://bugs.winehq.org/show_bug.cgi?id=30557
+ ewarn "Applying experimental patch to fix GStreamer support. Note that"
+ ewarn "this patch has been reported to cause crashes in certain games."
+
+ # Wine-Staging 1.7.38 "ntdll: Fix race-condition when threads are killed
+ # during shutdown" patch and "Added patch to implement shared memory
+ # wineserver communication for various user32 functions" prevents the
+ # gstreamer patch from applying cleanly.
+ # So undo the staging patch, apply gstreamer, then re-apply rebased staging
+ # patch on top.
+ if use staging; then
+ PATCHES+=(
+ "${FILESDIR}/${PN}-1.7.39-gstreamer-v5-staging-pre.patch"
+ "${WORKDIR}/${GST_P}.patch"
+ "${FILESDIR}/${PN}-1.7.39-gstreamer-v5-staging-post.patch" )
+ else
+ PATCHES+=( "${WORKDIR}/${GST_P}.patch" )
+ fi
+ fi
+ if use staging; then
+ ewarn "Applying the unofficial Wine-Staging patchset which is unsupported"
+ ewarn "by Wine developers. Please don't report bugs to Wine bugzilla"
+ ewarn "unless you can reproduce them with USE=-staging"
+
+ local STAGING_EXCLUDE=""
+ use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
+
+ # Launch wine-staging patcher in a subshell, using epatch as a backend, and gitapply.sh as a backend for binary patches
+ ebegin "Running Wine-Staging patch installer"
+ (
+ set -- DESTDIR="${S}" --backend=epatch --no-autoconf --all ${STAGING_EXCLUDE}
+ cd "${STAGING_DIR}/patches"
+ source "${STAGING_DIR}/patches/patchinstall.sh"
+ )
+ eend $?
+ elif use pulseaudio; then
+ PATCHES+=( "${STAGING_DIR}/patches/winepulse-PulseAudio_Support"/*.patch )
+ fi
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with netapi)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with pcap)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ if use pulseaudio || use staging; then
+ myconf+=( $(use_with pulseaudio pulse) )
+ fi
+ use staging && myconf+=(
+ --with-xattr
+ $(use_with vaapi va)
+ )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.7.44.ebuild b/app-emulation/wine/wine-1.7.44.ebuild
new file mode 100644
index 000000000000..6705349e0602
--- /dev/null
+++ b/app-emulation/wine/wine-1.7.44.ebuild
@@ -0,0 +1,436 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.36"
+MV="4.5.6"
+STAGING_P="wine-staging-${PV}"
+STAGING_DIR="${WORKDIR}/${STAGING_P}"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+GST_P="wine-1.7.34-gstreamer-v5"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ gstreamer? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${GST_P}.patch.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+if [[ ${PV} == "9999" ]] ; then
+ STAGING_EGIT_REPO_URI="git://github.com/wine-compholio/wine-staging.git"
+else
+ SRC_URI="${SRC_URI}
+ staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )
+ pulseaudio? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
+fi
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +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 +threads +truetype +udisks v4l vaapi +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ pipelight? ( staging )
+ s3tc? ( staging )
+ vaapi? ( staging )
+ osmesa? ( opengl )" #286560
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+# tools/make_requests requires perl
+DEPEND="${COMMON_DEPEND}
+ staging? ( dev-lang/perl dev-perl/XML-Simple )
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ if use staging || use pulseaudio; then
+ EGIT_REPO_URI=${STAGING_EGIT_REPO_URI}
+ unset ${PN}_LIVE_REPO;
+ EGIT_CHECKOUT_DIR=${STAGING_DIR} git-r3_src_unpack
+ fi
+ else
+ unpack ${MY_P}.tar.bz2
+ use staging || use pulseaudio && unpack "${STAGING_P}.tar.gz"
+ fi
+
+ unpack "${WINE_GENTOO}.tar.bz2"
+ use gstreamer && unpack "${GST_P}.patch.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.12-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ )
+ if use gstreamer; then
+ # See http://bugs.winehq.org/show_bug.cgi?id=30557
+ ewarn "Applying experimental patch to fix GStreamer support. Note that"
+ ewarn "this patch has been reported to cause crashes in certain games."
+
+ # Wine-Staging 1.7.38 "ntdll: Fix race-condition when threads are killed
+ # during shutdown" patch and "Added patch to implement shared memory
+ # wineserver communication for various user32 functions" prevents the
+ # gstreamer patch from applying cleanly.
+ # So undo the staging patch, apply gstreamer, then re-apply rebased staging
+ # patch on top.
+ if use staging; then
+ PATCHES+=(
+ "${FILESDIR}/${PN}-1.7.39-gstreamer-v5-staging-pre.patch"
+ "${WORKDIR}/${GST_P}.patch"
+ "${FILESDIR}/${PN}-1.7.39-gstreamer-v5-staging-post.patch" )
+ else
+ PATCHES+=( "${WORKDIR}/${GST_P}.patch" )
+ fi
+ fi
+ if use staging; then
+ ewarn "Applying the unofficial Wine-Staging patchset which is unsupported"
+ ewarn "by Wine developers. Please don't report bugs to Wine bugzilla"
+ ewarn "unless you can reproduce them with USE=-staging"
+
+ local STAGING_EXCLUDE=""
+ use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
+
+ # Launch wine-staging patcher in a subshell, using epatch as a backend, and gitapply.sh as a backend for binary patches
+ ebegin "Running Wine-Staging patch installer"
+ (
+ set -- DESTDIR="${S}" --backend=epatch --no-autoconf --all ${STAGING_EXCLUDE}
+ cd "${STAGING_DIR}/patches"
+ source "${STAGING_DIR}/patches/patchinstall.sh"
+ )
+ eend $?
+ elif use pulseaudio; then
+ PATCHES+=( "${STAGING_DIR}/patches/winepulse-PulseAudio_Support"/*.patch )
+ fi
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with netapi)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with pcap)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ if use pulseaudio || use staging; then
+ myconf+=( $(use_with pulseaudio pulse) )
+ fi
+ use staging && myconf+=(
+ --with-xattr
+ $(use_with vaapi va)
+ )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.7.45.ebuild b/app-emulation/wine/wine-1.7.45.ebuild
new file mode 100644
index 000000000000..ec49c87428f2
--- /dev/null
+++ b/app-emulation/wine/wine-1.7.45.ebuild
@@ -0,0 +1,430 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.36"
+MV="4.5.6"
+STAGING_P="wine-staging-${PV}"
+STAGING_DIR="${WORKDIR}/${STAGING_P}"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+GST_P="wine-1.7.34-gstreamer-v5"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ gstreamer? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${GST_P}.patch.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+if [[ ${PV} == "9999" ]] ; then
+ STAGING_EGIT_REPO_URI="git://github.com/wine-compholio/wine-staging.git"
+else
+ SRC_URI="${SRC_URI}
+ staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )
+ pulseaudio? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
+fi
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +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 +threads +truetype +udisks v4l vaapi +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ pipelight? ( staging )
+ s3tc? ( staging )
+ vaapi? ( staging )
+ osmesa? ( opengl )" #286560
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+# tools/make_requests requires perl
+DEPEND="${COMMON_DEPEND}
+ staging? ( dev-lang/perl dev-perl/XML-Simple )
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ if use staging || use pulseaudio; then
+ EGIT_REPO_URI=${STAGING_EGIT_REPO_URI}
+ unset ${PN}_LIVE_REPO;
+ EGIT_CHECKOUT_DIR=${STAGING_DIR} git-r3_src_unpack
+ fi
+ else
+ unpack ${MY_P}.tar.bz2
+ use staging || use pulseaudio && unpack "${STAGING_P}.tar.gz"
+ fi
+
+ unpack "${WINE_GENTOO}.tar.bz2"
+ use gstreamer && unpack "${GST_P}.patch.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.12-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ "${FILESDIR}"/${PN}-1.7.45-libunwind-osx-only.patch # only applies to this version
+ )
+ if use gstreamer; then
+ # See http://bugs.winehq.org/show_bug.cgi?id=30557
+ ewarn "Applying experimental patch to fix GStreamer support. Note that"
+ ewarn "this patch has been reported to cause crashes in certain games."
+
+ # Wine-Staging 1.7.38 "ntdll: Fix race-condition when threads are killed
+ # during shutdown" patch and "Added patch to implement shared memory
+ # wineserver communication for various user32 functions" prevents the
+ # gstreamer patch from applying cleanly.
+ # So undo the staging patch, apply gstreamer, then re-apply rebased staging
+ # patch on top.
+ if use staging; then
+ PATCHES+=(
+ "${FILESDIR}/${PN}-1.7.39-gstreamer-v5-staging-pre.patch"
+ "${WORKDIR}/${GST_P}.patch"
+ "${FILESDIR}/${PN}-1.7.39-gstreamer-v5-staging-post.patch" )
+ else
+ PATCHES+=( "${WORKDIR}/${GST_P}.patch" )
+ fi
+ fi
+ if use staging; then
+ ewarn "Applying the unofficial Wine-Staging patchset which is unsupported"
+ ewarn "by Wine developers. Please don't report bugs to Wine bugzilla"
+ ewarn "unless you can reproduce them with USE=-staging"
+
+ local STAGING_EXCLUDE=""
+ use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
+
+ # Launch wine-staging patcher in a subshell, using epatch as a backend, and gitapply.sh as a backend for binary patches
+ ebegin "Running Wine-Staging patch installer"
+ (
+ set -- DESTDIR="${S}" --backend=epatch --no-autoconf --all ${STAGING_EXCLUDE}
+ cd "${STAGING_DIR}/patches"
+ source "${STAGING_DIR}/patches/patchinstall.sh"
+ )
+ eend $?
+ elif use pulseaudio; then
+ PATCHES+=( "${STAGING_DIR}/patches/winepulse-PulseAudio_Support"/*.patch )
+ fi
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with netapi)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with pcap)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ if use pulseaudio || use staging; then
+ myconf+=( $(use_with pulseaudio pulse) )
+ fi
+ use staging && myconf+=(
+ --with-xattr
+ $(use_with vaapi va)
+ )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.7.46.ebuild b/app-emulation/wine/wine-1.7.46.ebuild
new file mode 100644
index 000000000000..6705349e0602
--- /dev/null
+++ b/app-emulation/wine/wine-1.7.46.ebuild
@@ -0,0 +1,436 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.36"
+MV="4.5.6"
+STAGING_P="wine-staging-${PV}"
+STAGING_DIR="${WORKDIR}/${STAGING_P}"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+GST_P="wine-1.7.34-gstreamer-v5"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ gstreamer? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${GST_P}.patch.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+if [[ ${PV} == "9999" ]] ; then
+ STAGING_EGIT_REPO_URI="git://github.com/wine-compholio/wine-staging.git"
+else
+ SRC_URI="${SRC_URI}
+ staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )
+ pulseaudio? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
+fi
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +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 +threads +truetype +udisks v4l vaapi +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ pipelight? ( staging )
+ s3tc? ( staging )
+ vaapi? ( staging )
+ osmesa? ( opengl )" #286560
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+# tools/make_requests requires perl
+DEPEND="${COMMON_DEPEND}
+ staging? ( dev-lang/perl dev-perl/XML-Simple )
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ if use staging || use pulseaudio; then
+ EGIT_REPO_URI=${STAGING_EGIT_REPO_URI}
+ unset ${PN}_LIVE_REPO;
+ EGIT_CHECKOUT_DIR=${STAGING_DIR} git-r3_src_unpack
+ fi
+ else
+ unpack ${MY_P}.tar.bz2
+ use staging || use pulseaudio && unpack "${STAGING_P}.tar.gz"
+ fi
+
+ unpack "${WINE_GENTOO}.tar.bz2"
+ use gstreamer && unpack "${GST_P}.patch.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.12-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ )
+ if use gstreamer; then
+ # See http://bugs.winehq.org/show_bug.cgi?id=30557
+ ewarn "Applying experimental patch to fix GStreamer support. Note that"
+ ewarn "this patch has been reported to cause crashes in certain games."
+
+ # Wine-Staging 1.7.38 "ntdll: Fix race-condition when threads are killed
+ # during shutdown" patch and "Added patch to implement shared memory
+ # wineserver communication for various user32 functions" prevents the
+ # gstreamer patch from applying cleanly.
+ # So undo the staging patch, apply gstreamer, then re-apply rebased staging
+ # patch on top.
+ if use staging; then
+ PATCHES+=(
+ "${FILESDIR}/${PN}-1.7.39-gstreamer-v5-staging-pre.patch"
+ "${WORKDIR}/${GST_P}.patch"
+ "${FILESDIR}/${PN}-1.7.39-gstreamer-v5-staging-post.patch" )
+ else
+ PATCHES+=( "${WORKDIR}/${GST_P}.patch" )
+ fi
+ fi
+ if use staging; then
+ ewarn "Applying the unofficial Wine-Staging patchset which is unsupported"
+ ewarn "by Wine developers. Please don't report bugs to Wine bugzilla"
+ ewarn "unless you can reproduce them with USE=-staging"
+
+ local STAGING_EXCLUDE=""
+ use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
+
+ # Launch wine-staging patcher in a subshell, using epatch as a backend, and gitapply.sh as a backend for binary patches
+ ebegin "Running Wine-Staging patch installer"
+ (
+ set -- DESTDIR="${S}" --backend=epatch --no-autoconf --all ${STAGING_EXCLUDE}
+ cd "${STAGING_DIR}/patches"
+ source "${STAGING_DIR}/patches/patchinstall.sh"
+ )
+ eend $?
+ elif use pulseaudio; then
+ PATCHES+=( "${STAGING_DIR}/patches/winepulse-PulseAudio_Support"/*.patch )
+ fi
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with netapi)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with pcap)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ if use pulseaudio || use staging; then
+ myconf+=( $(use_with pulseaudio pulse) )
+ fi
+ use staging && myconf+=(
+ --with-xattr
+ $(use_with vaapi va)
+ )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.7.47.ebuild b/app-emulation/wine/wine-1.7.47.ebuild
new file mode 100644
index 000000000000..4bb95bf5bcdc
--- /dev/null
+++ b/app-emulation/wine/wine-1.7.47.ebuild
@@ -0,0 +1,438 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.36"
+MV="4.5.6"
+STAGING_P="wine-staging-${PV}"
+STAGING_DIR="${WORKDIR}/${STAGING_P}"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+GST_P="wine-1.7.34-gstreamer-v5"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ gstreamer? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${GST_P}.patch.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+if [[ ${PV} == "9999" ]] ; then
+ STAGING_EGIT_REPO_URI="git://github.com/wine-compholio/wine-staging.git"
+else
+ SRC_URI="${SRC_URI}
+ staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )
+ pulseaudio? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
+fi
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +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 +threads +truetype +udisks v4l vaapi +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ pipelight? ( staging )
+ s3tc? ( staging )
+ vaapi? ( staging )
+ osmesa? ( opengl )" #286560
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+# tools/make_requests requires perl
+DEPEND="${COMMON_DEPEND}
+ staging? ( dev-lang/perl dev-perl/XML-Simple )
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ if use staging || use pulseaudio; then
+ EGIT_REPO_URI=${STAGING_EGIT_REPO_URI}
+ unset ${PN}_LIVE_REPO;
+ EGIT_CHECKOUT_DIR=${STAGING_DIR} git-r3_src_unpack
+ fi
+ else
+ unpack ${MY_P}.tar.bz2
+ use staging || use pulseaudio && unpack "${STAGING_P}.tar.gz"
+ fi
+
+ unpack "${WINE_GENTOO}.tar.bz2"
+ use gstreamer && unpack "${GST_P}.patch.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.12-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ "${FILESDIR}"/${PN}-1.7.47-critical-security-cookie-fix.patch # only necessary for this version, upstream #38895
+ )
+ if use gstreamer; then
+ # See http://bugs.winehq.org/show_bug.cgi?id=30557
+ ewarn "Applying experimental patch to fix GStreamer support. Note that"
+ ewarn "this patch has been reported to cause crashes in certain games."
+
+ # Wine-Staging 1.7.38 "ntdll: Fix race-condition when threads are killed
+ # during shutdown" patch and "Added patch to implement shared memory
+ # wineserver communication for various user32 functions" prevents the
+ # gstreamer patch from applying cleanly.
+ # So undo the staging patch, apply gstreamer, then re-apply rebased staging
+ # patch on top.
+ if use staging; then
+ PATCHES+=(
+ "${FILESDIR}/${PN}-1.7.39-gstreamer-v5-staging-pre.patch"
+ "${WORKDIR}/${GST_P}.patch"
+ "${FILESDIR}/${PN}-1.7.39-gstreamer-v5-staging-post.patch" )
+ else
+ PATCHES+=( "${WORKDIR}/${GST_P}.patch" )
+ fi
+ fi
+ if use staging; then
+ ewarn "Applying the unofficial Wine-Staging patchset which is unsupported"
+ ewarn "by Wine developers. Please don't report bugs to Wine bugzilla"
+ ewarn "unless you can reproduce them with USE=-staging"
+
+ local STAGING_EXCLUDE=""
+ STAGING_EXCLUDE="${STAGING_EXCLUDE} -W ntdll-Revert_Security_Cookie" # only necessary in this version
+ use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
+
+ # Launch wine-staging patcher in a subshell, using epatch as a backend, and gitapply.sh as a backend for binary patches
+ ebegin "Running Wine-Staging patch installer"
+ (
+ set -- DESTDIR="${S}" --backend=epatch --no-autoconf --all ${STAGING_EXCLUDE}
+ cd "${STAGING_DIR}/patches"
+ source "${STAGING_DIR}/patches/patchinstall.sh"
+ )
+ eend $?
+ elif use pulseaudio; then
+ PATCHES+=( "${STAGING_DIR}/patches/winepulse-PulseAudio_Support"/*.patch )
+ fi
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with netapi)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with pcap)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ if use pulseaudio || use staging; then
+ myconf+=( $(use_with pulseaudio pulse) )
+ fi
+ use staging && myconf+=(
+ --with-xattr
+ $(use_with vaapi va)
+ )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.7.8-r1.ebuild b/app-emulation/wine/wine-1.7.8-r1.ebuild
new file mode 100644
index 000000000000..0ca1fd9741e6
--- /dev/null
+++ b/app-emulation/wine/wine-1.7.8-r1.ebuild
@@ -0,0 +1,370 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.24"
+MV="4.5.2"
+PULSE_PATCHES="winepulse-patches-1.7.8"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ pulseaudio? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${PULSE_PATCHES}.tar.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl +png +prelink pulseaudio +realtime +run-exes samba scanner selinux +ssl test +threads +truetype +udisks v4l +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ osmesa? ( opengl )" #286560
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+DEPEND="${COMMON_DEPEND}
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ else
+ unpack ${MY_P}.tar.bz2
+ fi
+
+ use pulseaudio && unpack "${PULSE_PATCHES}.tar.bz2"
+ unpack "${WINE_GENTOO}.tar.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.2-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ "${FILESDIR}"/${PN}-gcc-4.9-null-pointer.patch #543446
+ )
+ use pulseaudio && PATCHES+=(
+ "../${PULSE_PATCHES}"/*.patch #421365
+ )
+
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with netapi)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ use pulseaudio && myconf+=( --with-pulse )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-1.7.9-r1.ebuild b/app-emulation/wine/wine-1.7.9-r1.ebuild
new file mode 100644
index 000000000000..0ca1fd9741e6
--- /dev/null
+++ b/app-emulation/wine/wine-1.7.9-r1.ebuild
@@ -0,0 +1,370 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.24"
+MV="4.5.2"
+PULSE_PATCHES="winepulse-patches-1.7.8"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ pulseaudio? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${PULSE_PATCHES}.tar.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl +png +prelink pulseaudio +realtime +run-exes samba scanner selinux +ssl test +threads +truetype +udisks v4l +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ osmesa? ( opengl )" #286560
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+DEPEND="${COMMON_DEPEND}
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ else
+ unpack ${MY_P}.tar.bz2
+ fi
+
+ use pulseaudio && unpack "${PULSE_PATCHES}.tar.bz2"
+ unpack "${WINE_GENTOO}.tar.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.2-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ "${FILESDIR}"/${PN}-gcc-4.9-null-pointer.patch #543446
+ )
+ use pulseaudio && PATCHES+=(
+ "../${PULSE_PATCHES}"/*.patch #421365
+ )
+
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with netapi)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ use pulseaudio && myconf+=( --with-pulse )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-emulation/wine/wine-9999.ebuild b/app-emulation/wine/wine-9999.ebuild
new file mode 100644
index 000000000000..6705349e0602
--- /dev/null
+++ b/app-emulation/wine/wine-9999.ebuild
@@ -0,0 +1,436 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+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"
+PLOCALE_BACKUP="en"
+
+inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ MY_P="${PN}-${PV/_/-}"
+ SRC_URI="mirror://sourceforge/${PN}/Source/${MY_P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+ S=${WORKDIR}/${MY_P}
+fi
+
+GV="2.36"
+MV="4.5.6"
+STAGING_P="wine-staging-${PV}"
+STAGING_DIR="${WORKDIR}/${STAGING_P}"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+GST_P="wine-1.7.34-gstreamer-v5"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ gecko? (
+ abi_x86_32? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( mirror://sourceforge/${PN}/Wine%20Gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( mirror://sourceforge/${PN}/Wine%20Mono/${MV}/wine-mono-${MV}.msi )
+ gstreamer? ( http://dev.gentoo.org/~tetromino/distfiles/${PN}/${GST_P}.patch.bz2 )
+ http://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2"
+
+if [[ ${PV} == "9999" ]] ; then
+ STAGING_EGIT_REPO_URI="git://github.com/wine-compholio/wine-staging.git"
+else
+ SRC_URI="${SRC_URI}
+ staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )
+ pulseaudio? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
+fi
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg +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 +threads +truetype +udisks v4l vaapi +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ test? ( abi_x86_32 )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ pipelight? ( staging )
+ s3tc? ( staging )
+ vaapi? ( staging )
+ osmesa? ( opengl )" #286560
+
+# FIXME: the test suite is unsuitable for us; many tests require net access
+# or fail due to Xvfb's opengl limitations.
+RESTRICT="test"
+
+COMMON_DEPEND="
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ capi? ( net-dialup/capi4k-utils )
+ ncurses? ( >=sys-libs/ncurses-5.2:=[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
+ media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}]
+ )
+ X? (
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libXi[${MULTILIB_USEDEP}]
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+ )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${MULTILIB_USEDEP}]
+ )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-db-20140508-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-soundlibs-20140508
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
+ !<app-emulation/emul-linux-x86-xlibs-20140508
+ )"
+
+RDEPEND="${COMMON_DEPEND}
+ dos? ( games-emulation/dosbox )
+ perl? ( dev-lang/perl dev-perl/XML-Simple )
+ s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] )
+ samba? ( >=net-fs/samba-3.0.25 )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )
+ pulseaudio? ( realtime? ( sys-auth/rtkit ) )"
+
+# tools/make_requests requires perl
+DEPEND="${COMMON_DEPEND}
+ staging? ( dev-lang/perl dev-perl/XML-Simple )
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ xinerama? ( x11-proto/xineramaproto )
+ prelink? ( sys-devel/prelink )
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ sys-devel/flex"
+
+# These use a non-standard "Wine" category, which is provided by
+# /etc/xdg/applications-merged/wine.menu
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
+usr/share/applications/wine-notepad.desktop
+usr/share/applications/wine-uninstaller.desktop
+usr/share/applications/wine-winecfg.desktop"
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # bug #549768
+ if [[ $(gcc-major-version) = 5 ]]; then
+ eerror "You need gcc-4.x to build wine; see https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
+ eerror "You need gcc-4.4+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+
+ if use abi_x86_32 && use opencl && [[ x$(eselect opencl show 2> /dev/null) = "xintel" ]]; then
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
+ eerror "See https://bugs.gentoo.org/487864 for more details."
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_build_environment_check || die
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ if use staging || use pulseaudio; then
+ EGIT_REPO_URI=${STAGING_EGIT_REPO_URI}
+ unset ${PN}_LIVE_REPO;
+ EGIT_CHECKOUT_DIR=${STAGING_DIR} git-r3_src_unpack
+ fi
+ else
+ unpack ${MY_P}.tar.bz2
+ use staging || use pulseaudio && unpack "${STAGING_P}.tar.gz"
+ fi
+
+ unpack "${WINE_GENTOO}.tar.bz2"
+ use gstreamer && unpack "${GST_P}.patch.bz2"
+
+ l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+ local md5="$(md5sum server/protocol.def)"
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726
+ "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.12-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ )
+ if use gstreamer; then
+ # See http://bugs.winehq.org/show_bug.cgi?id=30557
+ ewarn "Applying experimental patch to fix GStreamer support. Note that"
+ ewarn "this patch has been reported to cause crashes in certain games."
+
+ # Wine-Staging 1.7.38 "ntdll: Fix race-condition when threads are killed
+ # during shutdown" patch and "Added patch to implement shared memory
+ # wineserver communication for various user32 functions" prevents the
+ # gstreamer patch from applying cleanly.
+ # So undo the staging patch, apply gstreamer, then re-apply rebased staging
+ # patch on top.
+ if use staging; then
+ PATCHES+=(
+ "${FILESDIR}/${PN}-1.7.39-gstreamer-v5-staging-pre.patch"
+ "${WORKDIR}/${GST_P}.patch"
+ "${FILESDIR}/${PN}-1.7.39-gstreamer-v5-staging-post.patch" )
+ else
+ PATCHES+=( "${WORKDIR}/${GST_P}.patch" )
+ fi
+ fi
+ if use staging; then
+ ewarn "Applying the unofficial Wine-Staging patchset which is unsupported"
+ ewarn "by Wine developers. Please don't report bugs to Wine bugzilla"
+ ewarn "unless you can reproduce them with USE=-staging"
+
+ local STAGING_EXCLUDE=""
+ use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
+
+ # Launch wine-staging patcher in a subshell, using epatch as a backend, and gitapply.sh as a backend for binary patches
+ ebegin "Running Wine-Staging patch installer"
+ (
+ set -- DESTDIR="${S}" --backend=epatch --no-autoconf --all ${STAGING_EXCLUDE}
+ cd "${STAGING_DIR}/patches"
+ source "${STAGING_DIR}/patches/patchinstall.sh"
+ )
+ eend $?
+ elif use pulseaudio; then
+ PATCHES+=( "${STAGING_DIR}/patches/winepulse-PulseAudio_Support"/*.patch )
+ fi
+ autotools-utils_src_prepare
+
+ # Modification of the server protocol requires regenerating the server requests
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
+ einfo "server/protocol.def was patched; running tools/make_requests"
+ tools/make_requests || die #432348
+ fi
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
+ if ! use run-exes; then
+ sed -i '/^MimeType/d' tools/wine.desktop || die #117785
+ fi
+
+ # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+ cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die
+
+ l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+ export LDCONFIG=/bin/true
+ use custom-cflags || strip-flags
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --sysconfdir=/etc/wine
+ $(use_with alsa)
+ $(use_with capi)
+ $(use_with lcms cms)
+ $(use_with cups)
+ $(use_with ncurses curses)
+ $(use_with udisks dbus)
+ $(use_with fontconfig)
+ $(use_with ssl gnutls)
+ $(use_enable gecko mshtml)
+ $(use_with gphoto2 gphoto)
+ $(use_with gsm)
+ $(use_with gstreamer)
+ --without-hal
+ $(use_with jpeg)
+ $(use_with ldap)
+ $(use_enable mono mscoree)
+ $(use_with mp3 mpg123)
+ $(use_with netapi)
+ $(use_with nls gettext)
+ $(use_with openal)
+ $(use_with opencl)
+ $(use_with opengl)
+ $(use_with osmesa)
+ $(use_with oss)
+ $(use_with pcap)
+ $(use_with png)
+ $(use_with threads pthread)
+ $(use_with scanner sane)
+ $(use_enable test tests)
+ $(use_with truetype freetype)
+ $(use_with v4l)
+ $(use_with X x)
+ $(use_with xcomposite)
+ $(use_with xinerama)
+ $(use_with xml)
+ $(use_with xml xslt)
+ )
+
+ if use pulseaudio || use staging; then
+ myconf+=( $(use_with pulseaudio pulse) )
+ fi
+ use staging && myconf+=(
+ --with-xattr
+ $(use_with vaapi va)
+ )
+
+ local PKG_CONFIG AR RANLIB
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
+ # set AR and RANLIB to make QA scripts happy; #483342
+ tc-export PKG_CONFIG AR RANLIB
+
+ if use amd64; then
+ if [[ ${ABI} == amd64 ]]; then
+ myconf+=( --enable-win64 )
+ else
+ myconf+=( --disable-win64 )
+ fi
+
+ # Note: using --with-wine64 results in problems with multilib.eclass
+ # CC/LD hackery. We're using separate tools instead.
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+ emake depend
+}
+
+multilib_src_test() {
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
+ if [[ ${ABI} == x86 ]]; then
+ if [[ $(id -u) == 0 ]]; then
+ ewarn "Skipping tests since they cannot be run under the root user."
+ ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf"
+ return
+ fi
+
+ WINEPREFIX="${T}/.wine-${ABI}" \
+ Xemake test
+ fi
+}
+
+multilib_src_install_all() {
+ local DOCS=( ANNOUNCE AUTHORS README )
+ local l
+ add_locale_docs() {
+ local locale_doc="documentation/README.$1"
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
+ }
+ l10n_for_each_locale_do add_locale_docs
+
+ einstalldocs
+ prune_libtool_files --all
+
+ emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}"
+ if use gecko ; then
+ insinto /usr/share/wine/gecko
+ use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi
+ use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi
+ fi
+ if use mono ; then
+ insinto /usr/share/wine/mono
+ doins "${DISTDIR}"/wine-mono-${MV}.msi
+ fi
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+ rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die
+ fi
+
+ use abi_x86_32 && pax-mark psmr "${D}"usr/bin/wine{,-preloader} #255055
+ use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader}
+
+ if use abi_x86_64 && ! use abi_x86_32; then
+ dosym /usr/bin/wine{64,} # 404331
+ dosym /usr/bin/wine{64,}-preloader
+ fi
+
+ # respect LINGUAS when installing man pages, #469418
+ for l in de fr pl; do
+ use linguas_${l} || rm -r "${D}"usr/share/man/${l}*
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+
+ if ! use gecko; then
+ ewarn "Without Wine Gecko, wine prefixes will not have a default"
+ ewarn "implementation of iexplore. Many older windows applications"
+ ewarn "rely upon the existence of an iexplore implementation, so"
+ ewarn "you will likely need to install an external one, like via winetricks"
+ fi
+ if ! use mono; then
+ ewarn "Without Wine Mono, wine prefixes will not have a default"
+ ewarn "implementation of .NET. Many windows applications rely upon"
+ ewarn "the existence of a .NET implementation, so you will likely need"
+ ewarn "to install an external one, like via winetricks"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}