app-emulation/wine: Version bump to 1.8.1. Includes GST 1.0 backport
authorNP-Hardass <NP-Hardass@gentoo.org>
Sat, 9 Apr 2016 04:26:08 +0000 (00:26 -0400)
committerNP-Hardass <NP-Hardass@gentoo.org>
Sat, 9 Apr 2016 06:01:26 +0000 (02:01 -0400)
Package-Manager: portage-2.2.26

app-emulation/wine/Manifest
app-emulation/wine/wine-1.8.1.ebuild [new file with mode: 0644]
app-emulation/wine/wine-9999.ebuild

index ed36f76465032dbe55d2a7305b7d91aac633fd18..5dd75613fc4684cbc48132b1a0c92e972c778abc 100644 (file)
@@ -42,6 +42,8 @@ DIST wine-1.7.55-gstreamer-v5.patch.bz2 5800 SHA256 9ce03b6bc404dec4ed82208dcaa5
 DIST wine-1.7.55.tar.bz2 22814631 SHA256 a148f6c9cb45a75ef1a15e60a7db9c22fce985e0e58fe1350e7931dfe5d36119 SHA512 f47025017836ce1bbf2ed69c7d7421bd8a2f33ff94ced4a5caf92f4fabdf336119c80a28aeb8ba1ebe0239871a6ac62d8af8435d220c317624c17aabc2100dd7 WHIRLPOOL c5575d2ef687caccbdb5cc09a0c6a4ba9f65ec9674cbe3f23ecfced62710dcb0019a11ff66f2ec4c2eafdb30d9891abad158ac4f865cc580a2878067de7304d7
 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-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.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
@@ -79,6 +81,7 @@ DIST wine-staging-1.7.52.tar.gz 9654310 SHA256 84354a10e4226b5e456abb6d5727f4514
 DIST wine-staging-1.7.53.tar.gz 9638222 SHA256 438f41165987a57635694dba2f67cc435cd630581b13cafe0c85daacf37a102a SHA512 716840c44923848a28b481f6b4e422ef84fe33bef33a650c183c62be0dbec34471375fe2b1911382282f293fd5135ce133cdb775acd7df98029be2e4646b6d9e WHIRLPOOL 702555a706e50521ca6864b7b29ee4a4774fc8d770775c5186728b19e2c71ba6040ce98f86a772435c0d2f0a4363bc2a1e8f0b13ffbbe9395c072d3d89d1118c
 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.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.1.ebuild b/app-emulation/wine/wine-1.8.1.ebuild
new file mode 100644 (file)
index 0000000..466e8f5
--- /dev/null
@@ -0,0 +1,455 @@
+# 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 )
+       )
+       gstreamer? ( https://dev.gentoo.org/~np-hardass/distfiles/${PN}/${GST_P}.patch.bz2 )
+       mono? ( https://dl.winehq.org/wine/wine-mono/${MV}/wine-mono-${MV}.msi )
+       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 )
+       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 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
+
+       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;
+                       unset 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"
+       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
+               "${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 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
+               [[ ! -z ${SUFFIX} ]] && \
+                       sed -i "s/(Staging)/(Staging [Unofficial])/" libs/wine/Makefile.in || die
+       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
+}
index 96af59e1aefe65590c00d00b1304ec408be67ee5..89b9b2368048a9997d4d92b4acdd3f793a9a114c 100644 (file)
@@ -24,8 +24,9 @@ fi
 
 GV="2.44"
 MV="4.6.0"
+[[ ${MAJOR_V} == "1.8" ]] && SUFFIX="-unofficial"
 STAGING_P="wine-staging-${PV}"
-STAGING_DIR="${WORKDIR}/${STAGING_P}"
+STAGING_DIR="${WORKDIR}/${STAGING_P}${SUFFIX}"
 WINE_GENTOO="wine-gentoo-2015.03.07"
 DESCRIPTION="Free implementation of Windows(tm) on Unix"
 HOMEPAGE="http://www.winehq.org/"
@@ -41,7 +42,7 @@ 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 )"
+       staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}${SUFFIX}.tar.gz -> ${STAGING_P}.tar.gz )"
 fi
 
 LICENSE="LGPL-2.1"
@@ -262,7 +263,12 @@ src_prepare() {
                        source "${STAGING_DIR}/patches/patchinstall.sh"
                )
                eend $?
+
+               # To differentiate unofficial staging releases
+               [[ ! -z ${SUFFIX} ]] && \
+                       sed -i "s/(Staging)/(Staging [Unofficial])/" libs/wine/Makefile.in || die
        fi
+
        autotools-utils_src_prepare
 
        # Modification of the server protocol requires regenerating the server requests