summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation/wine')
-rw-r--r--app-emulation/wine/Manifest2
-rw-r--r--app-emulation/wine/wine-1.8.2.ebuild456
2 files changed, 458 insertions, 0 deletions
diff --git a/app-emulation/wine/Manifest b/app-emulation/wine/Manifest
index 13e9093690d3..c3a99a04deb0 100644
--- a/app-emulation/wine/Manifest
+++ b/app-emulation/wine/Manifest
@@ -43,6 +43,7 @@ DIST wine-1.7.8.tar.bz2 21463503 SHA256 30e17f5f863a09416f3d229666566b318dbb40f6
DIST wine-1.7.9.tar.bz2 21323337 SHA256 79f99ecc24696915439c474c4953bb77652ab53f16b41daa4da270fe43279c5a SHA512 29f8aa715ebe47c8a06bd5f6a80cac3fb75b2ca7aa81648cc8aed5461cfd825e4da68b6209ca672dce42b968521cfd9bffffaadd2d85b904b55d99687a1c83d0 WHIRLPOOL 333fee72b2a0e9d6ab8a003712c38166bd27aaff384a2b940c089ecc846f7669c59efbeb5cdc2fc87a46d63b0d29d0335873bb7c22f05913bad430b81990241a
DIST wine-1.8-gstreamer-1.0.patch.bz2 30908 SHA256 00cc1e943e2dffb7d588bb5befd444655a661bc0a0e51e49651af47e9421c501 SHA512 46901b549b1c84f7d8f8ff4485d1faf60a108cdf84feddc754739aff918e1e979b0b8a1a2604e5df6693bdfb02a3324516a187187f019bea13bc5485fc51aec9 WHIRLPOOL afe4caaf7b3d7ab07a9d8f6ea32125c1838745d399eb9ef2211c669bcd445ae5020991bd729b0460a6804fe5d44a2f42c32d94b2de32cc4b338f9391dcc6f78c
DIST wine-1.8.1.tar.bz2 22839063 SHA256 149ad3daaf8593b36c5c061285df0ec2a25e20ea48c61323be91088c4d22ca97 SHA512 e4cc3d00f28a616326f3069c7eeb94dc07759018b719bc37fe733b0f5e5d17f54ed2e877a964e9ea235362c49bf45bb3ec7072fba3d66648e6c7d55568e863cb WHIRLPOOL 8970d900c769add34a079f84c0562fca2d7e303ee9aa15de0fe2fde059de01256951c5ffeddb7b0a126599636e83d0d4ebdb8c0df5cde218fe8858e8b2451a0a
+DIST wine-1.8.2.tar.bz2 23635449 SHA256 031b465cb5252f9b3cc62b2b7c16545e1138aea4896170eab19b6674f4311e94 SHA512 7861fce21aa9891d7086343591e4ea241e476e0d4c54485f7ce687bfc2b5e0fc7bc025e4b83a9f6ca3a99d50597bcb1ab5fc4983f4c59eb699cc584385c6cadf WHIRLPOOL bf2b42e8ce973af760b080998aef22881cc20a6865cdfe81d941212ea164dd1b0e91f1115ad516055b8b498bc224d767716d47e3fdaa7a0cbf52427e5e5f1c88
DIST wine-1.8.tar.bz2 22843418 SHA256 f33b45c18112b2071fbf9edee0e8c575407f9e2a9855ca4ee918ed33efa7c6f4 SHA512 34308e82e04dee714fdbd10f29cd6cf6326e5e6e9134f7076e58b09988211065b8c6584881b7e5dcbc9b3906a819ab8a72b612b060cb9aa50b5b67f03bdab089 WHIRLPOOL 335a48f1b34cd1038d62290e52c3189b842d4077b7cf0bcb9d003595992360dc36eac1c592d31db44598de68010f3934daa1f4bcd0a2ca74aa130a39a74f7ce3
DIST wine-1.9.4.tar.bz2 22974777 SHA256 75c1eab6b980870b367a73db6e57eb0dc9242c2be8546f94084577a0ed0bbbb8 SHA512 e7b35290ec8f451163a08e841c559698a6b7264b320058e38ac788bdde66042efbb88511b30fa38383844425eaf0b6f4ed4b8412feb843ed405cb510a4a9000c WHIRLPOOL 875e11e9163df8c3473aa7b79deb5c6783a2068e678c4008cacf730d81c2f141490264a10f4345ceadd7aba100d3fc71bdfda7858f89d966d339cc2772cd8190
DIST wine-1.9.5.tar.bz2 23034629 SHA256 fb526308e7ac5e202c0f0b663d4c7a943419d9eec766af6831caf23914300f09 SHA512 cae779353bff61c215d0969288afe6e6e5192cdf0f86f8b15073861f0a22cb6b508ceb084e9b2cb5c5c658abfec5751edf9cb48930bc97c43ecbd6953427fc07 WHIRLPOOL 7f0c29b13b67660d364b2bbc86982a92f73409cfca3e8a31817c39df36d9ad476a9762f135d85fbb947746367277576a97fb6a012f346c11454c43ef75ac9fa7
@@ -85,6 +86,7 @@ DIST wine-staging-1.7.53.tar.gz 9638222 SHA256 438f41165987a57635694dba2f67cc435
DIST wine-staging-1.7.54.tar.gz 9647030 SHA256 b244ab05326e0a4c149beba0684afc100d44dca8e6ff606bcfee883b21b27303 SHA512 f6e58be01ba10121d6904cb238b2d91dd79cb7d14d623c00a897e655adb88332bea125cedf3fad85e680c76aacfbab16dd5035c322278155defd3b493054aa23 WHIRLPOOL 4c053ad96e67f4e82c93d3cfa9b6f885c4c3fe693946dd0e2a30cef556aac55f9dcafb5c56ced0f714f8ea9448cb4e22f144ea7f3561cfdb5bbff1b049d34f07
DIST wine-staging-1.7.55.tar.gz 9604441 SHA256 856b630fe95250e3d2dfc80588529e42e92e37f2e974ce8d3da37b39bf5cc3c3 SHA512 a6fbfa01b6d6efc75f79235aea86091c32ddf91ca300c73325c8347949c627f53ceb0fe085d6c212602797b0496d36c0a79f08eae4644a17774e95906332032d WHIRLPOOL ad232568c9df5d436a79a3557c82e231eed121356d8db1f5a3c0e7249b6c2760d87bb433ff30d6db53ce190b2d49401aa387b06f0c3f74925aefea7b1d73f112
DIST wine-staging-1.8.1.tar.gz 9598557 SHA256 12a4e54376515e2ab8ad79855ba724ba065c8de619c5da192ec528cc365f9c97 SHA512 d24bb78aed1e50ad73e742608048a68097d40e3c6563c1bd5adc2fab6abe0838dbce2d9f700ef71d876c6dfee232e97bef91bbc8f6b6c9092ff8db5a2d0f05ac WHIRLPOOL cb1400586860d4e6dad3f3bad78bdde27f8ea9fb703180533f5852368041879efe93e716df8f54bbeabba38b7d921ec0e2737bc6121c8cb5fd5af8d117d7e538
+DIST wine-staging-1.8.2.tar.gz 9618287 SHA256 5edc355bac1e65d721cedd325ee3ccf16bf2775993ceaed607c5398d54626d9c SHA512 4f8f2716ac7d215c33f1bbfad93bf3bf76ca4a928fa273d555eeaece4810a39fb19231042b66904f8d23985e3643bea973c08cfe955c40108a3dcbeca60e0a7e WHIRLPOOL 792930a860886d9bce100a9798d28a244d23b0efcb0700af3f188ca0a1ca5775d818cc805e1f9e60f926d880e78c3b6ee5c42765658d9e6904bed01b593132c0
DIST wine-staging-1.8.tar.gz 9632566 SHA256 c66f3dd6a760d516affe7467c4fb2d15ea8e2f0c72bcda1982219948dcdff11b SHA512 7b030b217ed0b37b8037d782406f75fcdb681c81371eafcab87175c0e6ac8b50fc58fe364e933e79eff168c1755412276fae3f914b7c36a6937aea1f6e35b022 WHIRLPOOL 8cff5d1d4c23405b820dbf9e7f73f7bba785e04ec2d9087b0977bb7aa1e6b84c2e6c3ac2f9cc72ba3c16f2b9c8c3607ea02ef1cd52d428a2b441333a424d9a21
DIST wine-staging-1.9.4.tar.gz 9719676 SHA256 1b3c6bb3e21e549fb8657cd9a2117946b7e78140b400c614dd41b041b6dc2674 SHA512 2c81b9f0315ed4f68d1874482805c9b6d3f2f9611f6dd1477ad0632d17f66e7f5e75720e5c7cef3a873876541c9d7d212fa8803a57cbec415aca32793a734634 WHIRLPOOL 0a66f53327976dd63532b9350d64461df3dcb0ea2fdc63d3498eac94d92387cf4bd53054c693c4a902f7fbba8ad0f2fdf59682e8622f3920a9a426344c656f54
DIST wine-staging-1.9.5.tar.gz 9889302 SHA256 e12c5fb741e6c5b55b99c37d6bba1746b0f40317f27198406e63f260ede3600c SHA512 aaaf08449e956f5f2b42440f8becf7233a22f2f807041b5524fae3c25c80078b86a84e6000803e014a5d2fc089e3df78cb66f0d1fe35675ae0f4ffdfa7ba3f10 WHIRLPOOL 692da1ec383b7efbcb12c8fa4078ed9b4143eb101baa06523f5bd85c749f0b87fe9a550e4d60e3c33e3d896782c9bc957f61171d01dcadbc8847ecbbc57c40ff
diff --git a/app-emulation/wine/wine-1.8.2.ebuild b/app-emulation/wine/wine-1.8.2.ebuild
new file mode 100644
index 000000000000..2a66a51b442b
--- /dev/null
+++ b/app-emulation/wine/wine-1.8.2.ebuild
@@ -0,0 +1,456 @@
+# 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
+
+GV="2.40"
+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}
+ gecko? (
+ abi_x86_32? ( https://dl.winehq.org/wine/wine-gecko/${GV}/wine_gecko-${GV}-x86.msi )
+ abi_x86_64? ( https://dl.winehq.org/wine/wine-gecko/${GV}/wine_gecko-${GV}-x86_64.msi )
+ )
+ mono? ( https://dl.winehq.org/wine/wine-mono/${MV}/wine-mono-${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 +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:0=[${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:1.0[${MULTILIB_USEDEP}]
+ media-plugins/gst-plugins-meta:1.0[${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[winbind] )
+ 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 use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+ einfo "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
+ if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; 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
+ einfo "Checking for gcc-5-3 stack realignment compiler bug ..."
+ # Compile in subshell to prevent "Aborted" message
+ if ! ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${FILESDIR}"/pr69140.c -o "${T}"/pr69140 || false ) >/dev/null 2>&1; then
+ eerror "Wine cannot be built with this version of gcc-5.3"
+ eerror "due to compiler bugs; please use gcc-config to select a"
+ eerror "different compiler version."
+ eerror "See https://bugs.gentoo.org/574044"
+ eerror
+ return 1
+ fi
+ 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
+ local WINE_COMMIT=${EGIT_VERSION}
+
+ EGIT_REPO_URI=${STAGING_EGIT_REPO_URI}
+ unset ${PN}_LIVE_{REPO,BRANCH,COMMIT} EGIT_COMMIT;
+
+ EGIT_CHECKOUT_DIR=${STAGING_DIR} git-r3_src_unpack
+
+ local STAGING_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die
+
+ if [[ "${WINE_COMMIT}" != "${STAGING_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: EGIT_COMMIT=${STAGING_COMMIT} emerge -1 wine"
+ fi
+ fi
+ else
+ unpack ${P}.tar.bz2
+ use staging && unpack "${STAGING_P}.tar.gz"
+ fi
+
+ unpack "${WINE_GENTOO}.tar.bz2"
+ 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.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"
+ "${FILESDIR}"/${PN}-sysmacros.patch #580046
+ )
+ 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 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 $?
+
+ # 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 # 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 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
+
+ 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
+}