summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNP-Hardass <NP-Hardass@gentoo.org>2016-09-03 18:24:33 -0400
committerNP-Hardass <NP-Hardass@gentoo.org>2016-09-04 23:31:28 -0400
commitcfa1c5c2360263bc40e435cf9671ae66c445c77c (patch)
tree3abf7bc56f17dd7cb1f9333f13764af6be960b1c /app-emulation
parentprofiles: package.mask: remove obsolete entries (diff)
downloadgentoo-cfa1c5c2360263bc40e435cf9671ae66c445c77c.tar.gz
gentoo-cfa1c5c2360263bc40e435cf9671ae66c445c77c.tar.bz2
gentoo-cfa1c5c2360263bc40e435cf9671ae66c445c77c.zip
app-emulation/wine: Bump to 1.8.4
Package-Manager: portage-2.3.0
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/wine/Manifest2
-rw-r--r--app-emulation/wine/wine-1.8.4.ebuild540
2 files changed, 542 insertions, 0 deletions
diff --git a/app-emulation/wine/Manifest b/app-emulation/wine/Manifest
index 9a012c36cc2e..ac63439e928e 100644
--- a/app-emulation/wine/Manifest
+++ b/app-emulation/wine/Manifest
@@ -2,6 +2,7 @@ DIST wine-1.8-gstreamer-1.0.patch.bz2 30908 SHA256 00cc1e943e2dffb7d588bb5befd44
DIST wine-1.8.1.tar.bz2 22839063 SHA256 149ad3daaf8593b36c5c061285df0ec2a25e20ea48c61323be91088c4d22ca97 SHA512 e4cc3d00f28a616326f3069c7eeb94dc07759018b719bc37fe733b0f5e5d17f54ed2e877a964e9ea235362c49bf45bb3ec7072fba3d66648e6c7d55568e863cb WHIRLPOOL 8970d900c769add34a079f84c0562fca2d7e303ee9aa15de0fe2fde059de01256951c5ffeddb7b0a126599636e83d0d4ebdb8c0df5cde218fe8858e8b2451a0a
DIST wine-1.8.2.tar.bz2 22857786 SHA256 51624fadf0145e87f0c01e7ce8524ea1e8d9d360c3e8a86e78cd26a52ce55a6f SHA512 ed4883443b29c00409143932de40c543a65acfc01ce61f223e6ed852e6869d1936e5d6c1c3942335d2fb6c9ee923f6187ba9f3207af9900911c4258c0266a321 WHIRLPOOL 6e658ad3def7b3784753df00534ba67f6b634691a058e20bfefcf4dc44c126e5afc1789135b9e6925e1d79afa82d1c2c39ff696b6a0318d080774d829c5e978d
DIST wine-1.8.3.tar.bz2 22901016 SHA256 d7cecdf7aab93bfe950e6f83ec526681b8770788c7b2a802bfe50ff97fc17a6c SHA512 16e0e0161ded64d6abd4503e4a458e62cc630fd1ce7f8eee885404c42be784159213144aa049ff6628924828e13438453071d29b6975747ea4101c9da7e89f28 WHIRLPOOL 2f31ee6e261bd38ecbdcadedaf94d8fcb24324edfc1f85703b6ab91922a95c36a7b958375e499a26529cdfa190e6d6e065f396f9efec02027e04c001db694ed7
+DIST wine-1.8.4.tar.bz2 22907393 SHA256 515d10439777a4816fe5b0a0fc9a4ce498a2ecfd23eba0c25dc00f3d6c805079 SHA512 fa4d24e064683a0b9995dc506e54cbd1ea306a531d2ed11c951b50c19e43735da4616b325891647bf731ade218cc25ae684fb21af3db2758333e2ada6ffba0ea WHIRLPOOL b62126d02a7e538eb3dffdc22e8c386218148cbc8bf0108e4a64ff05f2506405303e96678df3f57027aa6084e03c9f2862504482c3147c16ac5b115039ddf791
DIST wine-1.8.tar.bz2 22843418 SHA256 f33b45c18112b2071fbf9edee0e8c575407f9e2a9855ca4ee918ed33efa7c6f4 SHA512 34308e82e04dee714fdbd10f29cd6cf6326e5e6e9134f7076e58b09988211065b8c6584881b7e5dcbc9b3906a819ab8a72b612b060cb9aa50b5b67f03bdab089 WHIRLPOOL 335a48f1b34cd1038d62290e52c3189b842d4077b7cf0bcb9d003595992360dc36eac1c592d31db44598de68010f3934daa1f4bcd0a2ca74aa130a39a74f7ce3
DIST wine-1.9.10.tar.bz2 23139814 SHA256 8d4900dff6542c973c3e6112fe23da6d85c28be9a4f842a9d0041e8530861bbf SHA512 0a81171d42b38ec3eb549ac1a4b31dd6230c5b4bd1accbb0ec05e29dc901336a995cea648a4463eb5cba2a34fd34389980e848f748d48cd43e4dbbdd3bf48c30 WHIRLPOOL 052d25f4b7183588107f14f41545ccf2430e65369629992999a8d985470ecc924be4dba5d94f4399fa9146a55832ba96b8cde71f7af3abfe30b410dac4e32ad6
DIST wine-1.9.11.tar.bz2 23165061 SHA256 728f794280fcb5b5d8814e38542d769e2d54ee0d6bf27c7ed74de34fbacdab96 SHA512 3c2037558b0e3dc833b68e18bee91642f22d19b201c604cd95c09a33ebe72ee1252139e2eb138efea666cf24bb727232b12d4c456459068ab228bfe951c793b2 WHIRLPOOL 7a911377b0c8a78fd18ca158c1b492fb58399a1404cc033ddd33e7abead617551d55d33e2ef9184c7df1b669a8074d41aa9b896a81120be930bb5730428026ee
@@ -34,6 +35,7 @@ DIST wine-mono-4.6.3.msi 45591040 SHA256 f883e88ae78c7ea3d887c24023aa1ed03bb71a8
DIST wine-staging-1.8.1.tar.gz 9598557 SHA256 12a4e54376515e2ab8ad79855ba724ba065c8de619c5da192ec528cc365f9c97 SHA512 d24bb78aed1e50ad73e742608048a68097d40e3c6563c1bd5adc2fab6abe0838dbce2d9f700ef71d876c6dfee232e97bef91bbc8f6b6c9092ff8db5a2d0f05ac WHIRLPOOL cb1400586860d4e6dad3f3bad78bdde27f8ea9fb703180533f5852368041879efe93e716df8f54bbeabba38b7d921ec0e2737bc6121c8cb5fd5af8d117d7e538
DIST wine-staging-1.8.2.tar.gz 9593817 SHA256 388cdcdfcb80df56df10c0487c03b1f2a5d5ad5762eaf4036ea59dacd43eb64c SHA512 8dc795b99cecdc852d9725c90250de1441f2a9ba8abb96f9c7340115541cd670efd1e8640d34502c15a6e3eb77a1d9fc581f5464109976e148665ab25465b7b9 WHIRLPOOL 0a54f239fb21201bc72e72aa3fd5f94b5411a8fdbda85515b53cf04d77439d7d98db3c385a175036b1d3478af071e478f1fb16050823c6455078f719ab85b2b6
DIST wine-staging-1.8.3.tar.gz 9581722 SHA256 f217439b29c296f9f61f5bfc84b17d97ae86e2fe87e3a2a0b259889c4dcdb65e SHA512 762f1d6569d5b585540e9adf2cfe9a4a76b958e5f4e4442265b19abc1e621b2020ca77896c6aa7c34d19b792084693468ca0f07ec6e90361f5e8a95c5bbec8da WHIRLPOOL a23cfaa28d7abd78cba8306b57a5900ce2d6a720aa6f580ec7dacd159c4648442ad994d68d428ce9690e35713d4c75d4b42a18d307897a51230bc0183999e752
+DIST wine-staging-1.8.4.tar.gz 9577341 SHA256 db489655677d95e4028f4cbbada3ce61e8c1d5d4a309264a6cdf5d401ddf0d92 SHA512 59c09d1d9e564cbbae29534cdc899eb396975c3b2f8244ceef48abc005ade73dee514ebcbd39fae99a4b83d598e420562723868c65219a8ed72061c9cdabaa66 WHIRLPOOL b4551a4cdd6d4de139d5098fe902f671e52d0a225b91af47713eca268a70acce719f4ffa79775079441da678b1b2b3c12581da81a693bb664b31c89d102404cc
DIST wine-staging-1.8.tar.gz 9632566 SHA256 c66f3dd6a760d516affe7467c4fb2d15ea8e2f0c72bcda1982219948dcdff11b SHA512 7b030b217ed0b37b8037d782406f75fcdb681c81371eafcab87175c0e6ac8b50fc58fe364e933e79eff168c1755412276fae3f914b7c36a6937aea1f6e35b022 WHIRLPOOL 8cff5d1d4c23405b820dbf9e7f73f7bba785e04ec2d9087b0977bb7aa1e6b84c2e6c3ac2f9cc72ba3c16f2b9c8c3607ea02ef1cd52d428a2b441333a424d9a21
DIST wine-staging-1.9.10.tar.gz 9951778 SHA256 9f5218622565b00e5caa1026a28bdb2b2756886b1a55fed2f1e64a76b9716046 SHA512 f694a113240adfa0181ee6681b6558ff86fd9e8e4d0b24399c310121fdc8d9d3bd85086ce75cb21bc838132a1ff4c834029da9a1a7d5e0841a22b63d265a52d3 WHIRLPOOL 6597a0db47defeeff87c208ce5dc55f8b8ef799efdc8cc6c72f85b9836e71cdf8fb6d763f499afd6e1ec83498f08d7f90d2575d994a270fd7035539d017b7d53
DIST wine-staging-1.9.11.tar.gz 9960530 SHA256 2497b88d2c6ce4e8ea2f149e9f764cf4610b52e521a9c0bf0f56b61668e49c66 SHA512 9a3f558def08d8997811e5d1dbed43901829dc65733887864fbc78f814f63adae43008a753493485e9db045fba028d9ec082fd6ba7e72d5be994027e10a5c0eb WHIRLPOOL 8aaa3bbaf3ba35bf134543e1acbb1d0db2b6f2146d69d98cb58498cb6a52d918b9a52e2ae2af26db861607eacdd58e906d995bcc482746828cdd54470f41845f
diff --git a/app-emulation/wine/wine-1.8.4.ebuild b/app-emulation/wine/wine-1.8.4.ebuild
new file mode 100644
index 000000000000..3a81b95035e3
--- /dev/null
+++ b/app-emulation/wine/wine-1.8.4.ebuild
@@ -0,0 +1,540 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+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 eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator
+
+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
+ MAJOR_V=$(get_version_component_range 1-2)
+ SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}/${P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+fi
+
+VANILLA_GV="2.40"
+VANILLA_MV="4.5.6"
+STAGING_GV="2.40"
+STAGING_MV="4.5.6"
+[[ ${MAJOR_V} == "1.8" ]] && SUFFIX="-unofficial"
+STAGING_P="wine-staging-${PV}"
+STAGING_DIR="${WORKDIR}/${STAGING_P}${SUFFIX}"
+WINE_GENTOO="wine-gentoo-2015.03.07"
+GST_P="wine-1.8-gstreamer-1.0"
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+ !staging? (
+ gecko? (
+ abi_x86_32? ( https://dl.winehq.org/wine/wine-gecko/${VANILLA_GV}/wine_gecko-${VANILLA_GV}-x86.msi )
+ abi_x86_64? ( https://dl.winehq.org/wine/wine-gecko/${VANILLA_GV}/wine_gecko-${VANILLA_GV}-x86_64.msi )
+ )
+ mono? ( https://dl.winehq.org/wine/wine-mono/${VANILLA_MV}/wine-mono-${VANILLA_MV}.msi )
+ )
+ staging? (
+ gecko? (
+ abi_x86_32? ( https://dl.winehq.org/wine/wine-gecko/${STAGING_GV}/wine_gecko-${STAGING_GV}-x86.msi )
+ abi_x86_64? ( https://dl.winehq.org/wine/wine-gecko/${STAGING_GV}/wine_gecko-${STAGING_GV}-x86_64.msi )
+ )
+ mono? ( https://dl.winehq.org/wine/wine-mono/${STAGING_MV}/wine-mono-${STAGING_MV}.msi )
+ )
+ https://dev.gentoo.org/~np-hardass/distfiles/${PN}/${GST_P}.patch.bz2
+ https://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}${SUFFIX}.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 kernel_FreeBSD +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl pcap pipelight +png prelink pulseaudio +realtime +run-exes s3tc samba scanner selinux +ssl staging test themes +threads +truetype +udisks v4l vaapi +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+ X? ( truetype )
+ elibc_glibc? ( threads )
+ mono? ( abi_x86_32 )
+ osmesa? ( opengl )
+ pipelight? ( staging )
+ s3tc? ( staging )
+ test? ( abi_x86_32 )
+ themes? ( staging )
+ vaapi? ( staging )" # osmesa-opengl #286560 # X-truetype #551124
+
+# 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="
+ 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}]
+ )
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+ capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
+ gstreamer? (
+ media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
+ media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
+ )
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
+ ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] )
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+ opengl? (
+ virtual/glu[${MULTILIB_USEDEP}]
+ virtual/opengl[${MULTILIB_USEDEP}]
+ )
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
+ themes? (
+ dev-libs/glib:2[${MULTILIB_USEDEP}]
+ x11-libs/cairo[${MULTILIB_USEDEP}]
+ x11-libs/gtk+:3[${MULTILIB_USEDEP}]
+ )
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ xml? (
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+ dev-libs/libxslt[${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-0.74_p20160629 )
+ perl? (
+ dev-lang/perl
+ dev-perl/XML-Simple
+ )
+ pulseaudio? (
+ realtime? ( sys-auth/rtkit )
+ )
+ s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] )
+ samba? ( >=net-fs/samba-3.0.25[winbind] )
+ selinux? ( sec-policy/selinux-wine )
+ udisks? ( sys-fs/udisks:2 )"
+
+# tools/make_requests requires perl
+DEPEND="${COMMON_DEPEND}
+ sys-devel/flex
+ >=sys-kernel/linux-headers-2.6
+ virtual/pkgconfig
+ virtual/yacc
+ X? (
+ x11-proto/inputproto
+ x11-proto/xextproto
+ x11-proto/xf86vidmodeproto
+ )
+ prelink? ( sys-devel/prelink )
+ staging? (
+ dev-lang/perl
+ dev-perl/XML-Simple
+ )
+ xinerama? ( x11-proto/xineramaproto )"
+
+# 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_compiler_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ # GCC-specific bugs
+ if tc-is-gcc; then
+ # bug #549768
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+ ebegin "Checking for gcc-5 ms_abi compiler bug"
+ $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+ # Run in subshell to prevent "Aborted" message
+ ( "${T}"/pr66838 || false ) >/dev/null 2>&1
+ if ! eend $?; then
+ eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+ eerror "or use gcc-config to select a different compiler version."
+ eerror "See https://bugs.gentoo.org/549768"
+ eerror
+ return 1
+ fi
+ fi
+ # bug #574044
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
+ ebegin "Checking for gcc-5-3 stack realignment compiler bug"
+ # Compile in subshell to prevent "Aborted" message
+ ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${FILESDIR}"/pr69140.c -o "${T}"/pr69140 ) >/dev/null 2>&1
+ if ! eend $?; then
+ eerror "Wine cannot be built with this version of gcc-5.3"
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
+ eerror "or use gcc-config to select a different compiler version."
+ eerror "See https://bugs.gentoo.org/574044"
+ eerror
+ return 1
+ fi
+ fi
+ fi
+
+ # Ensure compiler support
+ if use abi_x86_64; then
+ ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
+ # Compile in subshell to prevent "Aborted" message
+ ( $(tc-getCC) -O2 "${FILESDIR}"/builtin_ms_va_list.c -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
+ if ! eend $?; then
+ eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
+ eerror
+ eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine"
+ eerror
+ return 1
+ fi
+ fi
+}
+
+wine_build_environment_check() {
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0
+
+ if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; 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
+}
+
+wine_env_vcs_vars() {
+ local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
+ local pn_live_val="${pn_live_var}"
+ eval pn_live_val='$'${pn_live_val}
+ if [[ ! -z ${pn_live_val} ]]; then
+ if use staging || use d3d9; then
+ eerror "Because of the multi-repo nature of ${PN}, ${pn_live_var}"
+ eerror "cannot be used to set the commit. Instead, you may use the"
+ eerror "environmental variables WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT."
+ eerror
+ return 1
+ fi
+ fi
+ if [[ ! -z ${EGIT_COMMIT} ]]; then
+ eerror "Commits must now be specified using the environmental variables"
+ eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT"
+ eerror
+ return 1
+ fi
+}
+
+pkg_pretend() {
+ wine_compiler_check || die
+ wine_build_environment_check || die
+
+ # Verify OSS support
+ if use oss && ! use kernel_FreeBSD; then
+ if ! has_version ">=media-sound/oss-4"; then
+ eerror "You cannot build wine with USE=oss without having support from a"
+ eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)"
+ eerror
+ die
+ fi
+ fi
+}
+
+pkg_setup() {
+ wine_build_environment_check || die
+ wine_env_vcs_vars || die
+ if ! use staging; then
+ GV=${VANILLA_GV}
+ MV=${VANILLA_MV}
+ else
+ GV=${STAGING_GV}
+ MV=${STAGING_MV}
+ fi
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
+ if use staging; then
+ local CURRENT_WINE_COMMIT=${EGIT_VERSION}
+
+ git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}"
+ git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}"
+
+ local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die
+
+ if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then
+ einfo "The current Staging patchset is not guaranteed to apply on this WINE commit."
+ einfo "If src_prepare fails, try emerging with the env var EGIT_COMMIT."
+ einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine"
+ fi
+ fi
+ fi
+
+ default
+
+ 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.9.5-multilib-portage.patch #395615
+ "${FILESDIR}"/${PN}-1.7.12-osmesa-check.patch #429386
+ "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508
+ "${WORKDIR}/${GST_P}.patch"
+ )
+ if use staging; then
+ ewarn "Applying the Wine-Staging patchset. Any bug reports to the"
+ ewarn "Wine bugzilla should explicitly state that staging was used."
+
+ local STAGING_EXCLUDE=""
+ use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
+
+ # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches
+ ebegin "Running Wine-Staging patch installer"
+ (
+ set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE}
+ cd "${STAGING_DIR}/patches"
+ source "${STAGING_DIR}/patches/patchinstall.sh"
+ )
+ eend $? || die "Failed to apply Wine-Staging patches"
+
+ # To differentiate unofficial staging releases
+ if [[ ! -z ${SUFFIX} ]]; then
+ sed -i "s/(Staging)/(Staging [Unofficial])/" libs/wine/Makefile.in || die
+ fi
+ fi
+
+ default
+ eautoreconf
+
+ # 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' loader/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 || die # 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 pulseaudio pulse)
+ $(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 staging && myconf+=(
+ --with-xattr
+ $(use_with themes gtk3)
+ $(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
+
+ # Remove wineconsole if neither backend is installed #551124
+ if ! use X && ! use ncurses; then
+ rm "${D}"/usr/{bin/,man/man1/}wineconsole* || die
+ use abi_x86_32 && rm "${D}"/usr/lib32/wine/{,fakedlls/}wineconsole.exe* || die
+ use abi_x86_64 && rm "${D}"/usr/lib64/wine/{,fakedlls/}wineconsole.exe* || 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
+
+ if use gstreamer; then
+ ewarn "This package uses a Gentoo specific patchset to provide"
+ ewarn "GStreamer 1.0 support. Any bugs related to GStreamer should"
+ ewarn "be filed at Gentoo's bugzilla, not upstream's."
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}