public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-emulation/wine-vanilla/files/, app-emulation/wine-vanilla/
@ 2017-04-10 17:22 NP Hardass
  0 siblings, 0 replies; 8+ messages in thread
From: NP Hardass @ 2017-04-10 17:22 UTC (permalink / raw
  To: gentoo-commits

commit:     ec754953b6fd1c29ba7e8c367b5ca345ee48842a
Author:     NP-Hardass <NP-Hardass <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 10 17:11:29 2017 +0000
Commit:     NP Hardass <np-hardass <AT> gentoo <DOT> org>
CommitDate: Mon Apr 10 17:21:56 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec754953

app-emulation/wine-vanilla: Wine without external patchsets, multislot

Imported from wine-a-holics overlay

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 app-emulation/wine-vanilla/Manifest                |   7 +
 .../wine-vanilla/files/builtin_ms_va_list.c        |   9 +
 app-emulation/wine-vanilla/files/pr66838.c         |  36 ++
 app-emulation/wine-vanilla/files/pr69140.c         |  37 ++
 .../wine-vanilla/files/wine-1.5.26-winegcc.patch   |  59 +++
 .../wine-vanilla/files/wine-1.6-memset-O3.patch    |  21 +
 .../files/wine-1.7.12-osmesa-check.patch           |  38 ++
 .../files/wine-1.9.5-multilib-portage.patch        |  31 ++
 .../files/wine-2.0-multislot-apploader.patch       |  14 +
 app-emulation/wine-vanilla/metadata.xml            |  38 ++
 app-emulation/wine-vanilla/wine-vanilla-2.0.ebuild | 507 +++++++++++++++++++++
 app-emulation/wine-vanilla/wine-vanilla-2.1.ebuild | 507 +++++++++++++++++++++
 app-emulation/wine-vanilla/wine-vanilla-2.2.ebuild | 507 +++++++++++++++++++++
 app-emulation/wine-vanilla/wine-vanilla-2.3.ebuild | 507 +++++++++++++++++++++
 app-emulation/wine-vanilla/wine-vanilla-2.4.ebuild | 507 +++++++++++++++++++++
 app-emulation/wine-vanilla/wine-vanilla-2.5.ebuild | 507 +++++++++++++++++++++
 .../wine-vanilla/wine-vanilla-9999.ebuild          | 507 +++++++++++++++++++++
 17 files changed, 3839 insertions(+)

diff --git a/app-emulation/wine-vanilla/Manifest b/app-emulation/wine-vanilla/Manifest
new file mode 100644
index 00000000000..0c5f4ca012d
--- /dev/null
+++ b/app-emulation/wine-vanilla/Manifest
@@ -0,0 +1,7 @@
+DIST wine-2.0.tar.bz2 23662707 SHA256 9756f5a2129b6a83ba701e546173cbff86caa671b0af73eb8f72c03b20c066c6 SHA512 b0a57ba8202d9fc396e5bfb7a7718d6bababbed8f3351e7fdc36afa37f35a871e04903757618f73427aeb71a52b2d323977d79e48f8b38d636f23fd404441186 WHIRLPOOL fa9f774d87dae73c7d1f3b86dc3b03ea27065eb6140f1cac13c82fe16f7ebff8f8365ed447220cf5c2788b9f4aae7c482e4f9e2e69f47e5435209e148f5dbdfe
+DIST wine-2.1.tar.xz 18887032 SHA256 bfb9abf63691c93df28d9599aaa866dc2b4e27209b3b7b546df8a37d7d9d1e6e SHA512 03d678ee6e89c2804813f2827255fcf59e96ca9a45b7d8ac441cfc84f835e5e5689c70a79a41a04c631e1add7807fa4a5758acef3bd7aadfb2e92e68958c6ef6 WHIRLPOOL 063d935f1ff0922100641f2f53cdac23d2993a83182d45e028e485fd7d0a13bc5cfb77bca76550b1537b3f42fecacef7fd64785adbf6425af823f56f96973b54
+DIST wine-2.2.tar.xz 18916364 SHA256 64cb57e1d8aa07f5c89ef26743b494f2d3ef9c0f4e50d3ee896a93535f7751f4 SHA512 0700868244d397c1442948716321e5ff030c667edce464570f76aa4340199489a422872aa3975bc0a57b8285c9d59fc04e223a4bde094169fc6db460acb626c4 WHIRLPOOL ffc3d357a76592651b589c6ac6608720d0258474890faf8fe3e20ac29cdd1496d569721256f9389d347bf2734a556099154fd18ef1b56f45bb46c4c15771d6ca
+DIST wine-2.3.tar.xz 18931732 SHA256 afc95c7a87cc8f0730b462c50a5dfc9c462eb02c6bf5874b4fa99946f49e067e SHA512 bea78e8468555ff9e08dedf3918da5ea82721549c43984869989bbdafeea00e454820ff9558aa29925c97a165a9b01e5cd1fd397f133833c58824984a6686171 WHIRLPOOL 1f5ec8e5c32d124277e4c71d95726d3a5337575757c3029567c77165d65fcfec2ddf33d3863b4bf55c9eff7c3582c1ec7dbd76d84ed8bbbe89dd16db6b0128c1
+DIST wine-2.4.tar.xz 18953748 SHA256 87b5df07e4781fecce2f92415a4717208ea253a20a0df8b36b9f90b69b72748e SHA512 15ae7e97dc72a8636b2c15c93803ed430fa456d673add61457cf3e479e769559c682b40949b5d38828f6681f13183e560fcb4a2eb0f0ba25e6eade46f7d3d7c0 WHIRLPOOL 558ab7b7517ad5e03366b4db974047eba776585e958a5b71bb2e93993e21bc725ea7a8bcf2a4354f34ca38c94ba99ccd15f2f8b5e4b58066bf339d3517eec56c
+DIST wine-2.5.tar.xz 18993176 SHA256 13f92b7ab483323aaabbc6519851e688ad4372ea30569961c831d40d6d3bccd2 SHA512 7b6faf6d8aa3d41465ad93ebae055581136f736c7eb8b4c61682e5a05589c83a0ff2c85e0f9abbca016f31b6f1c1435617c4994f1913f715a8707ebee3f28467 WHIRLPOOL 5acd2ac65df5dee1c860ddca72b8df8e021a0b95a3a1870d15468ce4591d569fa15bf8a0a6d341bcd3a624d13d0affe5b0263e67f9dfcbbf3ae7b59218dcded9
+DIST wine-desktop-common-20150204.tar.gz 99491 SHA256 444ad6b52b5290ec7d160e2cc40e4ba0910b4c4983dba1ceb054b81b09b24b5e SHA512 1f3d7022c5cff87ed3b8fd3b7cd14397c6f23b98fe6a7c583ac0d2f439ff29d943f57375f23687aa6519ff1d84ff07624a9a712d6f19fa207fd26d01edcb6688 WHIRLPOOL e9810b2952d25c05d831000e00e423de86809ec31b9a033fd4c64a70709da7338a9afc9e632e678f49c789a8a3702fbd0113226770cdb806623f2de371a16f54

diff --git a/app-emulation/wine-vanilla/files/builtin_ms_va_list.c b/app-emulation/wine-vanilla/files/builtin_ms_va_list.c
new file mode 100644
index 00000000000..f36fc2609a0
--- /dev/null
+++ b/app-emulation/wine-vanilla/files/builtin_ms_va_list.c
@@ -0,0 +1,9 @@
+/* Taken from Wine's configure script. LGPL 2.1+ */
+
+#include <stdarg.h>
+
+int main(void)
+{
+    void func(__builtin_ms_va_list *args);
+    return 0;
+}

diff --git a/app-emulation/wine-vanilla/files/pr66838.c b/app-emulation/wine-vanilla/files/pr66838.c
new file mode 100644
index 00000000000..cd616859427
--- /dev/null
+++ b/app-emulation/wine-vanilla/files/pr66838.c
@@ -0,0 +1,36 @@
+/* From gcc svn, /branches/gcc-5-branch/gcc/testsuite/gcc.target/i386/pr66838.c */
+/* Copyrighted and distributed under the same terms as gcc */
+
+void abort (void);
+
+char global;
+
+__attribute__((sysv_abi, noinline, noclone))
+void sysv_abi_func(char const *desc, void *local)
+{
+  register int esi asm ("esi");
+  register int edi asm ("edi");
+  
+  if (local != &global)
+    abort ();
+
+  /* Clobber some of the extra SYSV ABI registers.  */
+  asm volatile ("movl\t%2, %0\n\tmovl\t%2, %1"
+		: "=r" (esi), "=r" (edi)
+		: "i" (0xdeadbeef));
+}
+
+__attribute__((ms_abi, noinline, noclone))
+void ms_abi_func ()
+{
+  sysv_abi_func ("1st call", &global);
+  sysv_abi_func ("2nd call", &global);
+  sysv_abi_func ("3rd call", &global);
+}
+
+int
+main(void)
+{
+  ms_abi_func();
+  return 0;
+}

diff --git a/app-emulation/wine-vanilla/files/pr69140.c b/app-emulation/wine-vanilla/files/pr69140.c
new file mode 100644
index 00000000000..7c9e001f301
--- /dev/null
+++ b/app-emulation/wine-vanilla/files/pr69140.c
@@ -0,0 +1,37 @@
+/* { dg-do compile { target lp64 } } */
+/* { dg-options "-O2 -mincoming-stack-boundary=3" } */
+
+typedef struct {
+  unsigned int buf[4];
+  unsigned char in[64];
+} MD4_CTX;
+
+static void
+MD4Transform (unsigned int buf[4], const unsigned int in[16])
+{
+  unsigned int a, b, c, d;
+  (b) += ((((c)) & ((d))) | ((~(c)) & ((a)))) + (in[7]);
+  (a) += ((((b)) & ((c))) | ((~(b)) & ((d)))) + (in[8]);
+  (d) += ((((a)) & ((b))) | ((~(a)) & ((c)))) + (in[9]);
+  buf[3] += d;
+}
+
+void __attribute__((ms_abi))
+MD4Update (MD4_CTX *ctx, const unsigned char *buf)
+{
+  MD4Transform( ctx->buf, (unsigned int *)ctx->in);
+  MD4Transform( ctx->buf, (unsigned int *)ctx->in);
+}
+
+int
+main(void)
+{
+	MD4_CTX ctx_test = 
+    {
+        { 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476 },
+        { 0, 0 }
+    };
+	unsigned char	buf[64];
+
+	MD4Update(&ctx_test, (const unsigned char *) &buf);
+}

diff --git a/app-emulation/wine-vanilla/files/wine-1.5.26-winegcc.patch b/app-emulation/wine-vanilla/files/wine-1.5.26-winegcc.patch
new file mode 100644
index 00000000000..2045e343401
--- /dev/null
+++ b/app-emulation/wine-vanilla/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-vanilla/files/wine-1.6-memset-O3.patch b/app-emulation/wine-vanilla/files/wine-1.6-memset-O3.patch
new file mode 100644
index 00000000000..75372f86914
--- /dev/null
+++ b/app-emulation/wine-vanilla/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-vanilla/files/wine-1.7.12-osmesa-check.patch b/app-emulation/wine-vanilla/files/wine-1.7.12-osmesa-check.patch
new file mode 100644
index 00000000000..7cafcd4e6dc
--- /dev/null
+++ b/app-emulation/wine-vanilla/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-vanilla/files/wine-1.9.5-multilib-portage.patch b/app-emulation/wine-vanilla/files/wine-1.9.5-multilib-portage.patch
new file mode 100644
index 00000000000..c19d0d8a0b0
--- /dev/null
+++ b/app-emulation/wine-vanilla/files/wine-1.9.5-multilib-portage.patch
@@ -0,0 +1,31 @@
+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	2016-03-05 20:53:50.574628728 -0500
++++ b/configure.ac	2016-03-05 20:57:54.945617833 -0500
+@@ -141,6 +141,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])
+@@ -160,6 +163,9 @@
+       fi
+       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")

diff --git a/app-emulation/wine-vanilla/files/wine-2.0-multislot-apploader.patch b/app-emulation/wine-vanilla/files/wine-2.0-multislot-apploader.patch
new file mode 100644
index 00000000000..b336c4f51e8
--- /dev/null
+++ b/app-emulation/wine-vanilla/files/wine-2.0-multislot-apploader.patch
@@ -0,0 +1,14 @@
+diff --git a/tools/wineapploader.in b/tools/wineapploader.in
+index f48d552..14001a0 100755
+--- a/tools/wineapploader.in
++++ b/tools/wineapploader.in
+@@ -20,7 +20,8 @@
+ #
+ 
+ # determine the app Winelib library name
+-appname=`basename "$0" .exe`.exe
++appname=${0##*/}
++appname="${appname%%-*}.exe"
+ 
+ # first try explicit WINELOADER
+ if [ -x "$WINELOADER" ]; then exec "$WINELOADER" "$appname" "$@"; fi

diff --git a/app-emulation/wine-vanilla/metadata.xml b/app-emulation/wine-vanilla/metadata.xml
new file mode 100644
index 00000000000..9f16a5c32fb
--- /dev/null
+++ b/app-emulation/wine-vanilla/metadata.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="project">
+		<email>wine@gentoo.org</email>
+		<name>Wine</name>
+	</maintainer>
+	<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="gstreamer">Use <pkg>media-libs/gstreamer</pkg> to provide DirectShow functionality;</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="prelink">Run prelink on DLLs during build;
+			For versions before wine-1.7.55 or hardened, 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="samba">Add support for NTLM auth. see
+		http://wiki.winehq.org/NtlmAuthSetupGuide and
+		http://wiki.winehq.org/NtlmSigningAndSealing</flag>
+		<flag name="udev">Use <pkg>virtual/libudev</pkg> to provide plug and play support</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-vanilla/wine-vanilla-2.0.ebuild b/app-emulation/wine-vanilla/wine-vanilla-2.0.ebuild
new file mode 100644
index 00000000000..2798232a3dc
--- /dev/null
+++ b/app-emulation/wine-vanilla/wine-vanilla-2.0.ebuild
@@ -0,0 +1,507 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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
+
+MY_PN="${PN%%-*}"
+MY_P="${MY_PN}-${PV}"
+
+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)
+	SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.bz2"
+	KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+fi
+S="${WORKDIR}/${MY_P}"
+
+WDC_V="20150204"
+WINE_DESKTOP_COMMON_P="wine-desktop-common-${WDC_V}"
+
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+	https://github.com/NP-Hardass/wine-desktop-common/archive/${WDC_V}.tar.gz -> ${WINE_DESKTOP_COMMON_P}.tar.gz
+"
+
+LICENSE="LGPL-2.1"
+SLOT="${PV}"
+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 +png prelink pulseaudio +realtime +run-exes samba scanner selinux +ssl test +threads +truetype udev +udisks v4l +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+	X? ( truetype )
+	elibc_glibc? ( threads )
+	osmesa? ( opengl )
+	test? ( abi_x86_32 )" # 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}] )
+	truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+	udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
+	udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+	v4l? ( media-libs/libv4l[${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}
+	app-emulation/wine-desktop-common
+	>app-eselect/eselect-wine-0.3
+	!app-emulation/wine:0
+	dos? ( >=games-emulation/dosbox-0.74_p20160629 )
+	gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
+	mono? ( app-emulation/wine-mono:4.6.4 )
+	perl? (
+		dev-lang/perl
+		dev-perl/XML-Simple
+	)
+	pulseaudio? (
+		realtime? ( sys-auth/rtkit )
+	)
+	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 )
+	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_64; then
+		if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+			eerror "You need gcc-4.4+ to compile 64-bit wine"
+			die
+		elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+			eerror "You need clang-3.8+ to compile 64-bit wine"
+			die
+		fi
+	fi
+	if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
+		ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
+		ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
+		ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
+	fi
+	if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
+		if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
+			ewarn "Compilation can hang with CFLAGS=\"-march=i686\".  You can temporarily work"
+			ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
+			ewarn "See package.env in man 5 portage for more information on how to do this."
+			ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
+		fi
+	fi
+
+	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 ${EGIT_COMMIT} ]]; then
+		eerror "Commits must now be specified using the environmental variables"
+		eerror "WINE_COMMIT"
+		eerror
+		return 1
+	fi
+}
+
+pkg_pretend() {
+	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
+
+	WINE_VARIANT="${PN#wine}-${PV}"
+	WINE_VARIANT="${WINE_VARIANT#-}"
+
+	MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
+	MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
+	MY_DATADIR="${MY_DATAROOTDIR}"
+	MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
+	MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
+	MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
+	MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
+	MY_MANDIR="${MY_DATADIR}/man"
+}
+
+src_unpack() {
+	if [[ ${PV} == "9999" ]] ; then
+		EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
+	fi
+
+	default
+
+	l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+	local md5="$(md5sum server/protocol.def)"
+	local PATCHES=(
+		"${FILESDIR}"/${MY_PN}-1.5.26-winegcc.patch #260726
+		"${FILESDIR}"/${MY_PN}-1.9.5-multilib-portage.patch #395615
+		"${FILESDIR}"/${MY_PN}-1.7.12-osmesa-check.patch #429386
+		"${FILESDIR}"/${MY_PN}-1.6-memset-O3.patch #480508
+		"${FILESDIR}"/${MY_PN}-2.0-multislot-apploader.patch
+	)
+
+	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
+
+	# Edit wine.desktop to work for specific variant
+	sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
+
+	# hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+	cp "${WORKDIR}/${WINE_DESKTOP_COMMON_P}/icons/oic_winlogo.ico" dlls/user32/resources/ || die
+
+	l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+	wine_compiler_check || die
+
+	export LDCONFIG=/bin/true
+	use custom-cflags || strip-flags
+
+	multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+	local myconf=(
+		--prefix="${MY_PREFIX}"
+		--datarootdir="${MY_DATAROOTDIR}"
+		--datadir="${MY_DATADIR}"
+		--docdir="${MY_DOCDIR}"
+		--includedir="${MY_INCLUDEDIR}"
+		--libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
+		--libexecdir="${MY_LIBEXECDIR}"
+		--localstatedir="${MY_LOCALSTATEDIR}"
+		--mandir="${MY_MANDIR}"
+		--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 udev)
+		$(use_with v4l)
+		$(use_with X x)
+		$(use_with xcomposite)
+		$(use_with xinerama)
+		$(use_with xml)
+		$(use_with xml xslt)
+	)
+
+	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 ${MY_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
+
+	if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+		rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
+			"${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
+	fi
+
+	# Remove wineconsole if neither backend is installed #551124
+	if ! use X && ! use ncurses; then
+		rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
+		rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
+		rm_wineconsole() {
+			rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
+		}
+		multilib_foreach_abi rm_wineconsole
+	fi
+
+	use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
+	use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
+
+	if use abi_x86_64 && ! use abi_x86_32; then
+		dosym "${MY_PREFIX}"/bin/wine{64,} # 404331
+		dosym "${MY_PREFIX}"/bin/wine{64,}-preloader
+	fi
+
+	# Make wrappers for binaries for handling multiple variants
+	# Note: wrappers instead of symlinks because some are shell which use basename
+	for b in "${D%/}${MY_PREFIX}"/bin/*; do
+		make_wrapper ${b##*/}-${WINE_VARIANT} "${MY_PREFIX}"/bin/${b##*/}
+	done
+
+	# respect LINGUAS when installing man pages, #469418
+	for l in de fr pl; do
+		use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}*
+	done
+
+	for m in "${D%/}${MY_MANDIR}"/*/*; do
+		new_man=${m##*/}
+		new_man=${new_man%%.1}
+		newman "${m}" ${new_man##*/}-${WINE_VARIANT}.1
+	done
+}
+
+pkg_postinst() {
+	eselect wine register ${P}
+	if [[ ${PN} == "wine-vanilla" ]]; then
+		eselect wine register --vanilla ${P} || die
+	fi
+
+	eselect wine update --all --if-unset || die
+
+	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_prerm() {
+	eselect wine deregister ${P}
+	if [[ ${PN} == "wine-vanilla" ]]; then
+		eselect wine deregister --vanilla ${P} || die
+	fi
+
+	eselect wine update --all --if-unset || die
+}
+
+pkg_postrm() {
+	fdo-mime_desktop_database_update
+}

diff --git a/app-emulation/wine-vanilla/wine-vanilla-2.1.ebuild b/app-emulation/wine-vanilla/wine-vanilla-2.1.ebuild
new file mode 100644
index 00000000000..51cffe1c602
--- /dev/null
+++ b/app-emulation/wine-vanilla/wine-vanilla-2.1.ebuild
@@ -0,0 +1,507 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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
+
+MY_PN="${PN%%-*}"
+MY_P="${MY_PN}-${PV}"
+
+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)
+	SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
+	KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+fi
+S="${WORKDIR}/${MY_P}"
+
+WDC_V="20150204"
+WINE_DESKTOP_COMMON_P="wine-desktop-common-${WDC_V}"
+
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+	https://github.com/NP-Hardass/wine-desktop-common/archive/${WDC_V}.tar.gz -> ${WINE_DESKTOP_COMMON_P}.tar.gz
+"
+
+LICENSE="LGPL-2.1"
+SLOT="${PV}"
+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 +png prelink pulseaudio +realtime +run-exes samba scanner selinux +ssl test +threads +truetype udev +udisks v4l +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+	X? ( truetype )
+	elibc_glibc? ( threads )
+	osmesa? ( opengl )
+	test? ( abi_x86_32 )" # 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}] )
+	truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+	udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
+	udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+	v4l? ( media-libs/libv4l[${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}
+	app-emulation/wine-desktop-common
+	>app-eselect/eselect-wine-0.3
+	!app-emulation/wine:0
+	dos? ( >=games-emulation/dosbox-0.74_p20160629 )
+	gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
+	mono? ( app-emulation/wine-mono:4.6.4 )
+	perl? (
+		dev-lang/perl
+		dev-perl/XML-Simple
+	)
+	pulseaudio? (
+		realtime? ( sys-auth/rtkit )
+	)
+	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 )
+	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_64; then
+		if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+			eerror "You need gcc-4.4+ to compile 64-bit wine"
+			die
+		elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+			eerror "You need clang-3.8+ to compile 64-bit wine"
+			die
+		fi
+	fi
+	if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
+		ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
+		ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
+		ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
+	fi
+	if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
+		if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
+			ewarn "Compilation can hang with CFLAGS=\"-march=i686\".  You can temporarily work"
+			ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
+			ewarn "See package.env in man 5 portage for more information on how to do this."
+			ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
+		fi
+	fi
+
+	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 ${EGIT_COMMIT} ]]; then
+		eerror "Commits must now be specified using the environmental variables"
+		eerror "WINE_COMMIT"
+		eerror
+		return 1
+	fi
+}
+
+pkg_pretend() {
+	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
+
+	WINE_VARIANT="${PN#wine}-${PV}"
+	WINE_VARIANT="${WINE_VARIANT#-}"
+
+	MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
+	MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
+	MY_DATADIR="${MY_DATAROOTDIR}"
+	MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
+	MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
+	MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
+	MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
+	MY_MANDIR="${MY_DATADIR}/man"
+}
+
+src_unpack() {
+	if [[ ${PV} == "9999" ]] ; then
+		EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
+	fi
+
+	default
+
+	l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+	local md5="$(md5sum server/protocol.def)"
+	local PATCHES=(
+		"${FILESDIR}"/${MY_PN}-1.5.26-winegcc.patch #260726
+		"${FILESDIR}"/${MY_PN}-1.9.5-multilib-portage.patch #395615
+		"${FILESDIR}"/${MY_PN}-1.7.12-osmesa-check.patch #429386
+		"${FILESDIR}"/${MY_PN}-1.6-memset-O3.patch #480508
+		"${FILESDIR}"/${MY_PN}-2.0-multislot-apploader.patch
+	)
+
+	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
+
+	# Edit wine.desktop to work for specific variant
+	sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
+
+	# hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+	cp "${WORKDIR}/${WINE_DESKTOP_COMMON_P}/icons/oic_winlogo.ico" dlls/user32/resources/ || die
+
+	l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+	wine_compiler_check || die
+
+	export LDCONFIG=/bin/true
+	use custom-cflags || strip-flags
+
+	multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+	local myconf=(
+		--prefix="${MY_PREFIX}"
+		--datarootdir="${MY_DATAROOTDIR}"
+		--datadir="${MY_DATADIR}"
+		--docdir="${MY_DOCDIR}"
+		--includedir="${MY_INCLUDEDIR}"
+		--libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
+		--libexecdir="${MY_LIBEXECDIR}"
+		--localstatedir="${MY_LOCALSTATEDIR}"
+		--mandir="${MY_MANDIR}"
+		--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 udev)
+		$(use_with v4l)
+		$(use_with X x)
+		$(use_with xcomposite)
+		$(use_with xinerama)
+		$(use_with xml)
+		$(use_with xml xslt)
+	)
+
+	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 ${MY_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
+
+	if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+		rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
+			"${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
+	fi
+
+	# Remove wineconsole if neither backend is installed #551124
+	if ! use X && ! use ncurses; then
+		rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
+		rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
+		rm_wineconsole() {
+			rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
+		}
+		multilib_foreach_abi rm_wineconsole
+	fi
+
+	use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
+	use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
+
+	if use abi_x86_64 && ! use abi_x86_32; then
+		dosym "${MY_PREFIX}"/bin/wine{64,} # 404331
+		dosym "${MY_PREFIX}"/bin/wine{64,}-preloader
+	fi
+
+	# Make wrappers for binaries for handling multiple variants
+	# Note: wrappers instead of symlinks because some are shell which use basename
+	for b in "${D%/}${MY_PREFIX}"/bin/*; do
+		make_wrapper ${b##*/}-${WINE_VARIANT} "${MY_PREFIX}"/bin/${b##*/}
+	done
+
+	# respect LINGUAS when installing man pages, #469418
+	for l in de fr pl; do
+		use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}*
+	done
+
+	for m in "${D%/}${MY_MANDIR}"/*/*; do
+		new_man=${m##*/}
+		new_man=${new_man%%.1}
+		newman "${m}" ${new_man##*/}-${WINE_VARIANT}.1
+	done
+}
+
+pkg_postinst() {
+	eselect wine register ${P}
+	if [[ ${PN} == "wine-vanilla" ]]; then
+		eselect wine register --vanilla ${P} || die
+	fi
+
+	eselect wine update --all --if-unset || die
+
+	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_prerm() {
+	eselect wine deregister ${P}
+	if [[ ${PN} == "wine-vanilla" ]]; then
+		eselect wine deregister --vanilla ${P} || die
+	fi
+
+	eselect wine update --all --if-unset || die
+}
+
+pkg_postrm() {
+	fdo-mime_desktop_database_update
+}

diff --git a/app-emulation/wine-vanilla/wine-vanilla-2.2.ebuild b/app-emulation/wine-vanilla/wine-vanilla-2.2.ebuild
new file mode 100644
index 00000000000..51cffe1c602
--- /dev/null
+++ b/app-emulation/wine-vanilla/wine-vanilla-2.2.ebuild
@@ -0,0 +1,507 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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
+
+MY_PN="${PN%%-*}"
+MY_P="${MY_PN}-${PV}"
+
+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)
+	SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
+	KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+fi
+S="${WORKDIR}/${MY_P}"
+
+WDC_V="20150204"
+WINE_DESKTOP_COMMON_P="wine-desktop-common-${WDC_V}"
+
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+	https://github.com/NP-Hardass/wine-desktop-common/archive/${WDC_V}.tar.gz -> ${WINE_DESKTOP_COMMON_P}.tar.gz
+"
+
+LICENSE="LGPL-2.1"
+SLOT="${PV}"
+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 +png prelink pulseaudio +realtime +run-exes samba scanner selinux +ssl test +threads +truetype udev +udisks v4l +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+	X? ( truetype )
+	elibc_glibc? ( threads )
+	osmesa? ( opengl )
+	test? ( abi_x86_32 )" # 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}] )
+	truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+	udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
+	udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+	v4l? ( media-libs/libv4l[${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}
+	app-emulation/wine-desktop-common
+	>app-eselect/eselect-wine-0.3
+	!app-emulation/wine:0
+	dos? ( >=games-emulation/dosbox-0.74_p20160629 )
+	gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
+	mono? ( app-emulation/wine-mono:4.6.4 )
+	perl? (
+		dev-lang/perl
+		dev-perl/XML-Simple
+	)
+	pulseaudio? (
+		realtime? ( sys-auth/rtkit )
+	)
+	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 )
+	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_64; then
+		if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+			eerror "You need gcc-4.4+ to compile 64-bit wine"
+			die
+		elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+			eerror "You need clang-3.8+ to compile 64-bit wine"
+			die
+		fi
+	fi
+	if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
+		ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
+		ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
+		ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
+	fi
+	if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
+		if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
+			ewarn "Compilation can hang with CFLAGS=\"-march=i686\".  You can temporarily work"
+			ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
+			ewarn "See package.env in man 5 portage for more information on how to do this."
+			ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
+		fi
+	fi
+
+	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 ${EGIT_COMMIT} ]]; then
+		eerror "Commits must now be specified using the environmental variables"
+		eerror "WINE_COMMIT"
+		eerror
+		return 1
+	fi
+}
+
+pkg_pretend() {
+	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
+
+	WINE_VARIANT="${PN#wine}-${PV}"
+	WINE_VARIANT="${WINE_VARIANT#-}"
+
+	MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
+	MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
+	MY_DATADIR="${MY_DATAROOTDIR}"
+	MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
+	MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
+	MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
+	MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
+	MY_MANDIR="${MY_DATADIR}/man"
+}
+
+src_unpack() {
+	if [[ ${PV} == "9999" ]] ; then
+		EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
+	fi
+
+	default
+
+	l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+	local md5="$(md5sum server/protocol.def)"
+	local PATCHES=(
+		"${FILESDIR}"/${MY_PN}-1.5.26-winegcc.patch #260726
+		"${FILESDIR}"/${MY_PN}-1.9.5-multilib-portage.patch #395615
+		"${FILESDIR}"/${MY_PN}-1.7.12-osmesa-check.patch #429386
+		"${FILESDIR}"/${MY_PN}-1.6-memset-O3.patch #480508
+		"${FILESDIR}"/${MY_PN}-2.0-multislot-apploader.patch
+	)
+
+	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
+
+	# Edit wine.desktop to work for specific variant
+	sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
+
+	# hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+	cp "${WORKDIR}/${WINE_DESKTOP_COMMON_P}/icons/oic_winlogo.ico" dlls/user32/resources/ || die
+
+	l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+	wine_compiler_check || die
+
+	export LDCONFIG=/bin/true
+	use custom-cflags || strip-flags
+
+	multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+	local myconf=(
+		--prefix="${MY_PREFIX}"
+		--datarootdir="${MY_DATAROOTDIR}"
+		--datadir="${MY_DATADIR}"
+		--docdir="${MY_DOCDIR}"
+		--includedir="${MY_INCLUDEDIR}"
+		--libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
+		--libexecdir="${MY_LIBEXECDIR}"
+		--localstatedir="${MY_LOCALSTATEDIR}"
+		--mandir="${MY_MANDIR}"
+		--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 udev)
+		$(use_with v4l)
+		$(use_with X x)
+		$(use_with xcomposite)
+		$(use_with xinerama)
+		$(use_with xml)
+		$(use_with xml xslt)
+	)
+
+	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 ${MY_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
+
+	if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+		rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
+			"${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
+	fi
+
+	# Remove wineconsole if neither backend is installed #551124
+	if ! use X && ! use ncurses; then
+		rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
+		rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
+		rm_wineconsole() {
+			rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
+		}
+		multilib_foreach_abi rm_wineconsole
+	fi
+
+	use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
+	use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
+
+	if use abi_x86_64 && ! use abi_x86_32; then
+		dosym "${MY_PREFIX}"/bin/wine{64,} # 404331
+		dosym "${MY_PREFIX}"/bin/wine{64,}-preloader
+	fi
+
+	# Make wrappers for binaries for handling multiple variants
+	# Note: wrappers instead of symlinks because some are shell which use basename
+	for b in "${D%/}${MY_PREFIX}"/bin/*; do
+		make_wrapper ${b##*/}-${WINE_VARIANT} "${MY_PREFIX}"/bin/${b##*/}
+	done
+
+	# respect LINGUAS when installing man pages, #469418
+	for l in de fr pl; do
+		use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}*
+	done
+
+	for m in "${D%/}${MY_MANDIR}"/*/*; do
+		new_man=${m##*/}
+		new_man=${new_man%%.1}
+		newman "${m}" ${new_man##*/}-${WINE_VARIANT}.1
+	done
+}
+
+pkg_postinst() {
+	eselect wine register ${P}
+	if [[ ${PN} == "wine-vanilla" ]]; then
+		eselect wine register --vanilla ${P} || die
+	fi
+
+	eselect wine update --all --if-unset || die
+
+	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_prerm() {
+	eselect wine deregister ${P}
+	if [[ ${PN} == "wine-vanilla" ]]; then
+		eselect wine deregister --vanilla ${P} || die
+	fi
+
+	eselect wine update --all --if-unset || die
+}
+
+pkg_postrm() {
+	fdo-mime_desktop_database_update
+}

diff --git a/app-emulation/wine-vanilla/wine-vanilla-2.3.ebuild b/app-emulation/wine-vanilla/wine-vanilla-2.3.ebuild
new file mode 100644
index 00000000000..51cffe1c602
--- /dev/null
+++ b/app-emulation/wine-vanilla/wine-vanilla-2.3.ebuild
@@ -0,0 +1,507 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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
+
+MY_PN="${PN%%-*}"
+MY_P="${MY_PN}-${PV}"
+
+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)
+	SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
+	KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+fi
+S="${WORKDIR}/${MY_P}"
+
+WDC_V="20150204"
+WINE_DESKTOP_COMMON_P="wine-desktop-common-${WDC_V}"
+
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+	https://github.com/NP-Hardass/wine-desktop-common/archive/${WDC_V}.tar.gz -> ${WINE_DESKTOP_COMMON_P}.tar.gz
+"
+
+LICENSE="LGPL-2.1"
+SLOT="${PV}"
+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 +png prelink pulseaudio +realtime +run-exes samba scanner selinux +ssl test +threads +truetype udev +udisks v4l +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+	X? ( truetype )
+	elibc_glibc? ( threads )
+	osmesa? ( opengl )
+	test? ( abi_x86_32 )" # 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}] )
+	truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+	udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
+	udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+	v4l? ( media-libs/libv4l[${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}
+	app-emulation/wine-desktop-common
+	>app-eselect/eselect-wine-0.3
+	!app-emulation/wine:0
+	dos? ( >=games-emulation/dosbox-0.74_p20160629 )
+	gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
+	mono? ( app-emulation/wine-mono:4.6.4 )
+	perl? (
+		dev-lang/perl
+		dev-perl/XML-Simple
+	)
+	pulseaudio? (
+		realtime? ( sys-auth/rtkit )
+	)
+	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 )
+	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_64; then
+		if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+			eerror "You need gcc-4.4+ to compile 64-bit wine"
+			die
+		elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+			eerror "You need clang-3.8+ to compile 64-bit wine"
+			die
+		fi
+	fi
+	if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
+		ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
+		ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
+		ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
+	fi
+	if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
+		if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
+			ewarn "Compilation can hang with CFLAGS=\"-march=i686\".  You can temporarily work"
+			ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
+			ewarn "See package.env in man 5 portage for more information on how to do this."
+			ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
+		fi
+	fi
+
+	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 ${EGIT_COMMIT} ]]; then
+		eerror "Commits must now be specified using the environmental variables"
+		eerror "WINE_COMMIT"
+		eerror
+		return 1
+	fi
+}
+
+pkg_pretend() {
+	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
+
+	WINE_VARIANT="${PN#wine}-${PV}"
+	WINE_VARIANT="${WINE_VARIANT#-}"
+
+	MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
+	MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
+	MY_DATADIR="${MY_DATAROOTDIR}"
+	MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
+	MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
+	MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
+	MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
+	MY_MANDIR="${MY_DATADIR}/man"
+}
+
+src_unpack() {
+	if [[ ${PV} == "9999" ]] ; then
+		EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
+	fi
+
+	default
+
+	l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+	local md5="$(md5sum server/protocol.def)"
+	local PATCHES=(
+		"${FILESDIR}"/${MY_PN}-1.5.26-winegcc.patch #260726
+		"${FILESDIR}"/${MY_PN}-1.9.5-multilib-portage.patch #395615
+		"${FILESDIR}"/${MY_PN}-1.7.12-osmesa-check.patch #429386
+		"${FILESDIR}"/${MY_PN}-1.6-memset-O3.patch #480508
+		"${FILESDIR}"/${MY_PN}-2.0-multislot-apploader.patch
+	)
+
+	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
+
+	# Edit wine.desktop to work for specific variant
+	sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
+
+	# hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+	cp "${WORKDIR}/${WINE_DESKTOP_COMMON_P}/icons/oic_winlogo.ico" dlls/user32/resources/ || die
+
+	l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+	wine_compiler_check || die
+
+	export LDCONFIG=/bin/true
+	use custom-cflags || strip-flags
+
+	multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+	local myconf=(
+		--prefix="${MY_PREFIX}"
+		--datarootdir="${MY_DATAROOTDIR}"
+		--datadir="${MY_DATADIR}"
+		--docdir="${MY_DOCDIR}"
+		--includedir="${MY_INCLUDEDIR}"
+		--libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
+		--libexecdir="${MY_LIBEXECDIR}"
+		--localstatedir="${MY_LOCALSTATEDIR}"
+		--mandir="${MY_MANDIR}"
+		--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 udev)
+		$(use_with v4l)
+		$(use_with X x)
+		$(use_with xcomposite)
+		$(use_with xinerama)
+		$(use_with xml)
+		$(use_with xml xslt)
+	)
+
+	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 ${MY_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
+
+	if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+		rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
+			"${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
+	fi
+
+	# Remove wineconsole if neither backend is installed #551124
+	if ! use X && ! use ncurses; then
+		rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
+		rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
+		rm_wineconsole() {
+			rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
+		}
+		multilib_foreach_abi rm_wineconsole
+	fi
+
+	use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
+	use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
+
+	if use abi_x86_64 && ! use abi_x86_32; then
+		dosym "${MY_PREFIX}"/bin/wine{64,} # 404331
+		dosym "${MY_PREFIX}"/bin/wine{64,}-preloader
+	fi
+
+	# Make wrappers for binaries for handling multiple variants
+	# Note: wrappers instead of symlinks because some are shell which use basename
+	for b in "${D%/}${MY_PREFIX}"/bin/*; do
+		make_wrapper ${b##*/}-${WINE_VARIANT} "${MY_PREFIX}"/bin/${b##*/}
+	done
+
+	# respect LINGUAS when installing man pages, #469418
+	for l in de fr pl; do
+		use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}*
+	done
+
+	for m in "${D%/}${MY_MANDIR}"/*/*; do
+		new_man=${m##*/}
+		new_man=${new_man%%.1}
+		newman "${m}" ${new_man##*/}-${WINE_VARIANT}.1
+	done
+}
+
+pkg_postinst() {
+	eselect wine register ${P}
+	if [[ ${PN} == "wine-vanilla" ]]; then
+		eselect wine register --vanilla ${P} || die
+	fi
+
+	eselect wine update --all --if-unset || die
+
+	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_prerm() {
+	eselect wine deregister ${P}
+	if [[ ${PN} == "wine-vanilla" ]]; then
+		eselect wine deregister --vanilla ${P} || die
+	fi
+
+	eselect wine update --all --if-unset || die
+}
+
+pkg_postrm() {
+	fdo-mime_desktop_database_update
+}

diff --git a/app-emulation/wine-vanilla/wine-vanilla-2.4.ebuild b/app-emulation/wine-vanilla/wine-vanilla-2.4.ebuild
new file mode 100644
index 00000000000..c21891ba821
--- /dev/null
+++ b/app-emulation/wine-vanilla/wine-vanilla-2.4.ebuild
@@ -0,0 +1,507 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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
+
+MY_PN="${PN%%-*}"
+MY_P="${MY_PN}-${PV}"
+
+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)
+	SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
+	KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+fi
+S="${WORKDIR}/${MY_P}"
+
+WDC_V="20150204"
+WINE_DESKTOP_COMMON_P="wine-desktop-common-${WDC_V}"
+
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+	https://github.com/NP-Hardass/wine-desktop-common/archive/${WDC_V}.tar.gz -> ${WINE_DESKTOP_COMMON_P}.tar.gz
+"
+
+LICENSE="LGPL-2.1"
+SLOT="${PV}"
+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 +png prelink pulseaudio +realtime +run-exes samba scanner selinux +ssl test +threads +truetype udev +udisks v4l +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+	X? ( truetype )
+	elibc_glibc? ( threads )
+	osmesa? ( opengl )
+	test? ( abi_x86_32 )" # 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}] )
+	truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+	udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
+	udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+	v4l? ( media-libs/libv4l[${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}
+	app-emulation/wine-desktop-common
+	>app-eselect/eselect-wine-0.3
+	!app-emulation/wine:0
+	dos? ( >=games-emulation/dosbox-0.74_p20160629 )
+	gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
+	mono? ( app-emulation/wine-mono:4.7.0 )
+	perl? (
+		dev-lang/perl
+		dev-perl/XML-Simple
+	)
+	pulseaudio? (
+		realtime? ( sys-auth/rtkit )
+	)
+	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 )
+	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_64; then
+		if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+			eerror "You need gcc-4.4+ to compile 64-bit wine"
+			die
+		elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+			eerror "You need clang-3.8+ to compile 64-bit wine"
+			die
+		fi
+	fi
+	if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
+		ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
+		ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
+		ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
+	fi
+	if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
+		if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
+			ewarn "Compilation can hang with CFLAGS=\"-march=i686\".  You can temporarily work"
+			ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
+			ewarn "See package.env in man 5 portage for more information on how to do this."
+			ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
+		fi
+	fi
+
+	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 ${EGIT_COMMIT} ]]; then
+		eerror "Commits must now be specified using the environmental variables"
+		eerror "WINE_COMMIT"
+		eerror
+		return 1
+	fi
+}
+
+pkg_pretend() {
+	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
+
+	WINE_VARIANT="${PN#wine}-${PV}"
+	WINE_VARIANT="${WINE_VARIANT#-}"
+
+	MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
+	MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
+	MY_DATADIR="${MY_DATAROOTDIR}"
+	MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
+	MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
+	MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
+	MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
+	MY_MANDIR="${MY_DATADIR}/man"
+}
+
+src_unpack() {
+	if [[ ${PV} == "9999" ]] ; then
+		EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
+	fi
+
+	default
+
+	l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+	local md5="$(md5sum server/protocol.def)"
+	local PATCHES=(
+		"${FILESDIR}"/${MY_PN}-1.5.26-winegcc.patch #260726
+		"${FILESDIR}"/${MY_PN}-1.9.5-multilib-portage.patch #395615
+		"${FILESDIR}"/${MY_PN}-1.7.12-osmesa-check.patch #429386
+		"${FILESDIR}"/${MY_PN}-1.6-memset-O3.patch #480508
+		"${FILESDIR}"/${MY_PN}-2.0-multislot-apploader.patch
+	)
+
+	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
+
+	# Edit wine.desktop to work for specific variant
+	sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
+
+	# hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+	cp "${WORKDIR}/${WINE_DESKTOP_COMMON_P}/icons/oic_winlogo.ico" dlls/user32/resources/ || die
+
+	l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+	wine_compiler_check || die
+
+	export LDCONFIG=/bin/true
+	use custom-cflags || strip-flags
+
+	multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+	local myconf=(
+		--prefix="${MY_PREFIX}"
+		--datarootdir="${MY_DATAROOTDIR}"
+		--datadir="${MY_DATADIR}"
+		--docdir="${MY_DOCDIR}"
+		--includedir="${MY_INCLUDEDIR}"
+		--libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
+		--libexecdir="${MY_LIBEXECDIR}"
+		--localstatedir="${MY_LOCALSTATEDIR}"
+		--mandir="${MY_MANDIR}"
+		--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 udev)
+		$(use_with v4l)
+		$(use_with X x)
+		$(use_with xcomposite)
+		$(use_with xinerama)
+		$(use_with xml)
+		$(use_with xml xslt)
+	)
+
+	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 ${MY_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
+
+	if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+		rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
+			"${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
+	fi
+
+	# Remove wineconsole if neither backend is installed #551124
+	if ! use X && ! use ncurses; then
+		rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
+		rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
+		rm_wineconsole() {
+			rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
+		}
+		multilib_foreach_abi rm_wineconsole
+	fi
+
+	use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
+	use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
+
+	if use abi_x86_64 && ! use abi_x86_32; then
+		dosym "${MY_PREFIX}"/bin/wine{64,} # 404331
+		dosym "${MY_PREFIX}"/bin/wine{64,}-preloader
+	fi
+
+	# Make wrappers for binaries for handling multiple variants
+	# Note: wrappers instead of symlinks because some are shell which use basename
+	for b in "${D%/}${MY_PREFIX}"/bin/*; do
+		make_wrapper ${b##*/}-${WINE_VARIANT} "${MY_PREFIX}"/bin/${b##*/}
+	done
+
+	# respect LINGUAS when installing man pages, #469418
+	for l in de fr pl; do
+		use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}*
+	done
+
+	for m in "${D%/}${MY_MANDIR}"/*/*; do
+		new_man=${m##*/}
+		new_man=${new_man%%.1}
+		newman "${m}" ${new_man##*/}-${WINE_VARIANT}.1
+	done
+}
+
+pkg_postinst() {
+	eselect wine register ${P}
+	if [[ ${PN} == "wine-vanilla" ]]; then
+		eselect wine register --vanilla ${P} || die
+	fi
+
+	eselect wine update --all --if-unset || die
+
+	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_prerm() {
+	eselect wine deregister ${P}
+	if [[ ${PN} == "wine-vanilla" ]]; then
+		eselect wine deregister --vanilla ${P} || die
+	fi
+
+	eselect wine update --all --if-unset || die
+}
+
+pkg_postrm() {
+	fdo-mime_desktop_database_update
+}

diff --git a/app-emulation/wine-vanilla/wine-vanilla-2.5.ebuild b/app-emulation/wine-vanilla/wine-vanilla-2.5.ebuild
new file mode 100644
index 00000000000..c21891ba821
--- /dev/null
+++ b/app-emulation/wine-vanilla/wine-vanilla-2.5.ebuild
@@ -0,0 +1,507 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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
+
+MY_PN="${PN%%-*}"
+MY_P="${MY_PN}-${PV}"
+
+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)
+	SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
+	KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+fi
+S="${WORKDIR}/${MY_P}"
+
+WDC_V="20150204"
+WINE_DESKTOP_COMMON_P="wine-desktop-common-${WDC_V}"
+
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+	https://github.com/NP-Hardass/wine-desktop-common/archive/${WDC_V}.tar.gz -> ${WINE_DESKTOP_COMMON_P}.tar.gz
+"
+
+LICENSE="LGPL-2.1"
+SLOT="${PV}"
+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 +png prelink pulseaudio +realtime +run-exes samba scanner selinux +ssl test +threads +truetype udev +udisks v4l +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+	X? ( truetype )
+	elibc_glibc? ( threads )
+	osmesa? ( opengl )
+	test? ( abi_x86_32 )" # 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}] )
+	truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+	udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
+	udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+	v4l? ( media-libs/libv4l[${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}
+	app-emulation/wine-desktop-common
+	>app-eselect/eselect-wine-0.3
+	!app-emulation/wine:0
+	dos? ( >=games-emulation/dosbox-0.74_p20160629 )
+	gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
+	mono? ( app-emulation/wine-mono:4.7.0 )
+	perl? (
+		dev-lang/perl
+		dev-perl/XML-Simple
+	)
+	pulseaudio? (
+		realtime? ( sys-auth/rtkit )
+	)
+	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 )
+	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_64; then
+		if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+			eerror "You need gcc-4.4+ to compile 64-bit wine"
+			die
+		elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+			eerror "You need clang-3.8+ to compile 64-bit wine"
+			die
+		fi
+	fi
+	if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
+		ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
+		ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
+		ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
+	fi
+	if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
+		if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
+			ewarn "Compilation can hang with CFLAGS=\"-march=i686\".  You can temporarily work"
+			ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
+			ewarn "See package.env in man 5 portage for more information on how to do this."
+			ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
+		fi
+	fi
+
+	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 ${EGIT_COMMIT} ]]; then
+		eerror "Commits must now be specified using the environmental variables"
+		eerror "WINE_COMMIT"
+		eerror
+		return 1
+	fi
+}
+
+pkg_pretend() {
+	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
+
+	WINE_VARIANT="${PN#wine}-${PV}"
+	WINE_VARIANT="${WINE_VARIANT#-}"
+
+	MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
+	MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
+	MY_DATADIR="${MY_DATAROOTDIR}"
+	MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
+	MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
+	MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
+	MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
+	MY_MANDIR="${MY_DATADIR}/man"
+}
+
+src_unpack() {
+	if [[ ${PV} == "9999" ]] ; then
+		EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
+	fi
+
+	default
+
+	l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+	local md5="$(md5sum server/protocol.def)"
+	local PATCHES=(
+		"${FILESDIR}"/${MY_PN}-1.5.26-winegcc.patch #260726
+		"${FILESDIR}"/${MY_PN}-1.9.5-multilib-portage.patch #395615
+		"${FILESDIR}"/${MY_PN}-1.7.12-osmesa-check.patch #429386
+		"${FILESDIR}"/${MY_PN}-1.6-memset-O3.patch #480508
+		"${FILESDIR}"/${MY_PN}-2.0-multislot-apploader.patch
+	)
+
+	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
+
+	# Edit wine.desktop to work for specific variant
+	sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
+
+	# hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+	cp "${WORKDIR}/${WINE_DESKTOP_COMMON_P}/icons/oic_winlogo.ico" dlls/user32/resources/ || die
+
+	l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+	wine_compiler_check || die
+
+	export LDCONFIG=/bin/true
+	use custom-cflags || strip-flags
+
+	multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+	local myconf=(
+		--prefix="${MY_PREFIX}"
+		--datarootdir="${MY_DATAROOTDIR}"
+		--datadir="${MY_DATADIR}"
+		--docdir="${MY_DOCDIR}"
+		--includedir="${MY_INCLUDEDIR}"
+		--libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
+		--libexecdir="${MY_LIBEXECDIR}"
+		--localstatedir="${MY_LOCALSTATEDIR}"
+		--mandir="${MY_MANDIR}"
+		--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 udev)
+		$(use_with v4l)
+		$(use_with X x)
+		$(use_with xcomposite)
+		$(use_with xinerama)
+		$(use_with xml)
+		$(use_with xml xslt)
+	)
+
+	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 ${MY_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
+
+	if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+		rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
+			"${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
+	fi
+
+	# Remove wineconsole if neither backend is installed #551124
+	if ! use X && ! use ncurses; then
+		rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
+		rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
+		rm_wineconsole() {
+			rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
+		}
+		multilib_foreach_abi rm_wineconsole
+	fi
+
+	use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
+	use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
+
+	if use abi_x86_64 && ! use abi_x86_32; then
+		dosym "${MY_PREFIX}"/bin/wine{64,} # 404331
+		dosym "${MY_PREFIX}"/bin/wine{64,}-preloader
+	fi
+
+	# Make wrappers for binaries for handling multiple variants
+	# Note: wrappers instead of symlinks because some are shell which use basename
+	for b in "${D%/}${MY_PREFIX}"/bin/*; do
+		make_wrapper ${b##*/}-${WINE_VARIANT} "${MY_PREFIX}"/bin/${b##*/}
+	done
+
+	# respect LINGUAS when installing man pages, #469418
+	for l in de fr pl; do
+		use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}*
+	done
+
+	for m in "${D%/}${MY_MANDIR}"/*/*; do
+		new_man=${m##*/}
+		new_man=${new_man%%.1}
+		newman "${m}" ${new_man##*/}-${WINE_VARIANT}.1
+	done
+}
+
+pkg_postinst() {
+	eselect wine register ${P}
+	if [[ ${PN} == "wine-vanilla" ]]; then
+		eselect wine register --vanilla ${P} || die
+	fi
+
+	eselect wine update --all --if-unset || die
+
+	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_prerm() {
+	eselect wine deregister ${P}
+	if [[ ${PN} == "wine-vanilla" ]]; then
+		eselect wine deregister --vanilla ${P} || die
+	fi
+
+	eselect wine update --all --if-unset || die
+}
+
+pkg_postrm() {
+	fdo-mime_desktop_database_update
+}

diff --git a/app-emulation/wine-vanilla/wine-vanilla-9999.ebuild b/app-emulation/wine-vanilla/wine-vanilla-9999.ebuild
new file mode 100644
index 00000000000..c21891ba821
--- /dev/null
+++ b/app-emulation/wine-vanilla/wine-vanilla-9999.ebuild
@@ -0,0 +1,507 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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
+
+MY_PN="${PN%%-*}"
+MY_P="${MY_PN}-${PV}"
+
+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)
+	SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
+	KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
+fi
+S="${WORKDIR}/${MY_P}"
+
+WDC_V="20150204"
+WINE_DESKTOP_COMMON_P="wine-desktop-common-${WDC_V}"
+
+DESCRIPTION="Free implementation of Windows(tm) on Unix"
+HOMEPAGE="http://www.winehq.org/"
+SRC_URI="${SRC_URI}
+	https://github.com/NP-Hardass/wine-desktop-common/archive/${WDC_V}.tar.gz -> ${WINE_DESKTOP_COMMON_P}.tar.gz
+"
+
+LICENSE="LGPL-2.1"
+SLOT="${PV}"
+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 +png prelink pulseaudio +realtime +run-exes samba scanner selinux +ssl test +threads +truetype udev +udisks v4l +X +xcomposite xinerama +xml"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
+	X? ( truetype )
+	elibc_glibc? ( threads )
+	osmesa? ( opengl )
+	test? ( abi_x86_32 )" # 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}] )
+	truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
+	udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
+	udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+	v4l? ( media-libs/libv4l[${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}
+	app-emulation/wine-desktop-common
+	>app-eselect/eselect-wine-0.3
+	!app-emulation/wine:0
+	dos? ( >=games-emulation/dosbox-0.74_p20160629 )
+	gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
+	mono? ( app-emulation/wine-mono:4.7.0 )
+	perl? (
+		dev-lang/perl
+		dev-perl/XML-Simple
+	)
+	pulseaudio? (
+		realtime? ( sys-auth/rtkit )
+	)
+	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 )
+	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_64; then
+		if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+			eerror "You need gcc-4.4+ to compile 64-bit wine"
+			die
+		elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+			eerror "You need clang-3.8+ to compile 64-bit wine"
+			die
+		fi
+	fi
+	if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
+		ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
+		ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
+		ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
+	fi
+	if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
+		if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
+			ewarn "Compilation can hang with CFLAGS=\"-march=i686\".  You can temporarily work"
+			ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
+			ewarn "See package.env in man 5 portage for more information on how to do this."
+			ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
+		fi
+	fi
+
+	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 ${EGIT_COMMIT} ]]; then
+		eerror "Commits must now be specified using the environmental variables"
+		eerror "WINE_COMMIT"
+		eerror
+		return 1
+	fi
+}
+
+pkg_pretend() {
+	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
+
+	WINE_VARIANT="${PN#wine}-${PV}"
+	WINE_VARIANT="${WINE_VARIANT#-}"
+
+	MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
+	MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
+	MY_DATADIR="${MY_DATAROOTDIR}"
+	MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
+	MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
+	MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
+	MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
+	MY_MANDIR="${MY_DATADIR}/man"
+}
+
+src_unpack() {
+	if [[ ${PV} == "9999" ]] ; then
+		EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
+	fi
+
+	default
+
+	l10n_find_plocales_changes "${S}/po" "" ".po"
+}
+
+src_prepare() {
+	local md5="$(md5sum server/protocol.def)"
+	local PATCHES=(
+		"${FILESDIR}"/${MY_PN}-1.5.26-winegcc.patch #260726
+		"${FILESDIR}"/${MY_PN}-1.9.5-multilib-portage.patch #395615
+		"${FILESDIR}"/${MY_PN}-1.7.12-osmesa-check.patch #429386
+		"${FILESDIR}"/${MY_PN}-1.6-memset-O3.patch #480508
+		"${FILESDIR}"/${MY_PN}-2.0-multislot-apploader.patch
+	)
+
+	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
+
+	# Edit wine.desktop to work for specific variant
+	sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
+
+	# hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
+	cp "${WORKDIR}/${WINE_DESKTOP_COMMON_P}/icons/oic_winlogo.ico" dlls/user32/resources/ || die
+
+	l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
+}
+
+src_configure() {
+	wine_compiler_check || die
+
+	export LDCONFIG=/bin/true
+	use custom-cflags || strip-flags
+
+	multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+	local myconf=(
+		--prefix="${MY_PREFIX}"
+		--datarootdir="${MY_DATAROOTDIR}"
+		--datadir="${MY_DATADIR}"
+		--docdir="${MY_DOCDIR}"
+		--includedir="${MY_INCLUDEDIR}"
+		--libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
+		--libexecdir="${MY_LIBEXECDIR}"
+		--localstatedir="${MY_LOCALSTATEDIR}"
+		--mandir="${MY_MANDIR}"
+		--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 udev)
+		$(use_with v4l)
+		$(use_with X x)
+		$(use_with xcomposite)
+		$(use_with xinerama)
+		$(use_with xml)
+		$(use_with xml xslt)
+	)
+
+	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 ${MY_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
+
+	if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
+		rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
+			"${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
+	fi
+
+	# Remove wineconsole if neither backend is installed #551124
+	if ! use X && ! use ncurses; then
+		rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
+		rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
+		rm_wineconsole() {
+			rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
+		}
+		multilib_foreach_abi rm_wineconsole
+	fi
+
+	use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
+	use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
+
+	if use abi_x86_64 && ! use abi_x86_32; then
+		dosym "${MY_PREFIX}"/bin/wine{64,} # 404331
+		dosym "${MY_PREFIX}"/bin/wine{64,}-preloader
+	fi
+
+	# Make wrappers for binaries for handling multiple variants
+	# Note: wrappers instead of symlinks because some are shell which use basename
+	for b in "${D%/}${MY_PREFIX}"/bin/*; do
+		make_wrapper ${b##*/}-${WINE_VARIANT} "${MY_PREFIX}"/bin/${b##*/}
+	done
+
+	# respect LINGUAS when installing man pages, #469418
+	for l in de fr pl; do
+		use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}*
+	done
+
+	for m in "${D%/}${MY_MANDIR}"/*/*; do
+		new_man=${m##*/}
+		new_man=${new_man%%.1}
+		newman "${m}" ${new_man##*/}-${WINE_VARIANT}.1
+	done
+}
+
+pkg_postinst() {
+	eselect wine register ${P}
+	if [[ ${PN} == "wine-vanilla" ]]; then
+		eselect wine register --vanilla ${P} || die
+	fi
+
+	eselect wine update --all --if-unset || die
+
+	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_prerm() {
+	eselect wine deregister ${P}
+	if [[ ${PN} == "wine-vanilla" ]]; then
+		eselect wine deregister --vanilla ${P} || die
+	fi
+
+	eselect wine update --all --if-unset || die
+}
+
+pkg_postrm() {
+	fdo-mime_desktop_database_update
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/wine-vanilla/files/, app-emulation/wine-vanilla/
@ 2022-09-13  4:19 Ionen Wolkens
  0 siblings, 0 replies; 8+ messages in thread
From: Ionen Wolkens @ 2022-09-13  4:19 UTC (permalink / raw
  To: gentoo-commits

commit:     2bb5c034ea9e0b6c9ff0df7d37707e0472fc3c0d
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 13 01:47:02 2022 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Tue Sep 13 04:17:36 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2bb5c034

app-emulation/wine-vanilla: fix clang + USE=-llvm-libunwind build

_Unwind_Find_FDE doesn't exist in libunwind but does in gcc's rtlib,
clang instead expects it from llvm-libunwind which leads to undefined
references even with USE=-unwind.

Messy but add extra guards around it.

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../files/wine-vanilla-7.0-llvm-libunwind.patch    |  9 -----
 .../files/wine-vanilla-7.0-unwind.patch            | 40 ++++++++++++++++++++++
 .../wine-vanilla/wine-vanilla-7.0-r3.ebuild        |  2 +-
 .../wine-vanilla/wine-vanilla-7.17.ebuild          |  2 +-
 .../wine-vanilla/wine-vanilla-9999.ebuild          |  2 +-
 5 files changed, 43 insertions(+), 12 deletions(-)

diff --git a/app-emulation/wine-vanilla/files/wine-vanilla-7.0-llvm-libunwind.patch b/app-emulation/wine-vanilla/files/wine-vanilla-7.0-llvm-libunwind.patch
deleted file mode 100644
index eaec4d898b98..000000000000
--- a/app-emulation/wine-vanilla/files/wine-vanilla-7.0-llvm-libunwind.patch
+++ /dev/null
@@ -1,9 +0,0 @@
-Note the dodgy _CONFIG_H_ check can be removed when >=llvm-libunwind-15
-(which adds _VERSION) is well established: https://reviews.llvm.org/D121015
---- a/dlls/ntdll/unix/signal_x86_64.c
-+++ b/dlls/ntdll/unix/signal_x86_64.c
-@@ -1359,3 +1359,3 @@
- 
--#ifdef __APPLE__
-+#if defined(__APPLE__) || defined(_LIBUNWIND_VERSION) || defined(____LIBUNWIND_CONFIG_H__)
-     rc = unw_getcontext( &unw_context );

diff --git a/app-emulation/wine-vanilla/files/wine-vanilla-7.0-unwind.patch b/app-emulation/wine-vanilla/files/wine-vanilla-7.0-unwind.patch
new file mode 100644
index 000000000000..74f22362ea9b
--- /dev/null
+++ b/app-emulation/wine-vanilla/files/wine-vanilla-7.0-unwind.patch
@@ -0,0 +1,40 @@
+Fix build with llvm-libunwind, and also fix for non-llvm libunwind
+when using clang+bfd given clang doesn't have _Unwind_Find_FDE in
+its rtlib and expects it from llvm-libunwind.
+
+The _CONFIG_H_ check is for <llvm-libunwind-15 (adds _VERSION).
+--- a/dlls/ntdll/unix/signal_x86_64.c
++++ b/dlls/ntdll/unix/signal_x86_64.c
+@@ -635,7 +635,9 @@
+     unsigned int cie_offset;
+ };
+ 
++#if defined(_LIBUNWIND_VERSION) || defined(____LIBUNWIND_CONFIG_H__) || !defined(__clang__)
+ extern const struct dwarf_fde *_Unwind_Find_FDE (void *, struct dwarf_eh_bases *);
++#endif
+ 
+ static unsigned char dwarf_get_u1( const unsigned char **p )
+ {
+@@ -1357,7 +1359,7 @@
+     unw_proc_info_t info;
+     int rc;
+ 
+-#ifdef __APPLE__
++#if defined(__APPLE__) || defined(_LIBUNWIND_VERSION) || defined(____LIBUNWIND_CONFIG_H__)
+     rc = unw_getcontext( &unw_context );
+     if (rc == UNW_ESUCCESS)
+         rc = unw_init_local( &cursor, &unw_context );
+@@ -1480,11 +1482,13 @@
+ NTSTATUS CDECL unwind_builtin_dll( ULONG type, DISPATCHER_CONTEXT *dispatch, CONTEXT *context )
+ {
+     struct dwarf_eh_bases bases;
++#if defined(_LIBUNWIND_VERSION) || defined(____LIBUNWIND_CONFIG_H__) || !defined(__clang__)
+     const struct dwarf_fde *fde = _Unwind_Find_FDE( (void *)(context->Rip - 1), &bases );
+ 
+     if (fde)
+         return dwarf_virtual_unwind( context->Rip, &dispatch->EstablisherFrame, context, fde,
+                                      &bases, &dispatch->LanguageHandler, &dispatch->HandlerData );
++#endif
+ #ifdef HAVE_LIBUNWIND
+     return libunwind_virtual_unwind( context->Rip, &dispatch->EstablisherFrame, context,
+                                      &dispatch->LanguageHandler, &dispatch->HandlerData );

diff --git a/app-emulation/wine-vanilla/wine-vanilla-7.0-r3.ebuild b/app-emulation/wine-vanilla/wine-vanilla-7.0-r3.ebuild
index 8aef3c25fdd6..7a2564b15a56 100644
--- a/app-emulation/wine-vanilla/wine-vanilla-7.0-r3.ebuild
+++ b/app-emulation/wine-vanilla/wine-vanilla-7.0-r3.ebuild
@@ -123,8 +123,8 @@ IDEPEND="app-eselect/eselect-wine"
 QA_TEXTRELS="usr/lib/*/wine/i386-unix/*.so" # uses -fno-PIC -Wl,-z,notext
 
 PATCHES=(
-	"${FILESDIR}"/${PN}-7.0-llvm-libunwind.patch
 	"${FILESDIR}"/${PN}-7.0-noexecstack.patch
+	"${FILESDIR}"/${PN}-7.0-unwind.patch
 )
 
 pkg_pretend() {

diff --git a/app-emulation/wine-vanilla/wine-vanilla-7.17.ebuild b/app-emulation/wine-vanilla/wine-vanilla-7.17.ebuild
index a04742503154..f0f96f49dcfd 100644
--- a/app-emulation/wine-vanilla/wine-vanilla-7.17.ebuild
+++ b/app-emulation/wine-vanilla/wine-vanilla-7.17.ebuild
@@ -122,8 +122,8 @@ IDEPEND="app-eselect/eselect-wine"
 QA_TEXTRELS="usr/lib/*/wine/i386-unix/*.so" # uses -fno-PIC -Wl,-z,notext
 
 PATCHES=(
-	"${FILESDIR}"/${PN}-7.0-llvm-libunwind.patch
 	"${FILESDIR}"/${PN}-7.0-noexecstack.patch
+	"${FILESDIR}"/${PN}-7.0-unwind.patch
 )
 
 pkg_pretend() {

diff --git a/app-emulation/wine-vanilla/wine-vanilla-9999.ebuild b/app-emulation/wine-vanilla/wine-vanilla-9999.ebuild
index a04742503154..f0f96f49dcfd 100644
--- a/app-emulation/wine-vanilla/wine-vanilla-9999.ebuild
+++ b/app-emulation/wine-vanilla/wine-vanilla-9999.ebuild
@@ -122,8 +122,8 @@ IDEPEND="app-eselect/eselect-wine"
 QA_TEXTRELS="usr/lib/*/wine/i386-unix/*.so" # uses -fno-PIC -Wl,-z,notext
 
 PATCHES=(
-	"${FILESDIR}"/${PN}-7.0-llvm-libunwind.patch
 	"${FILESDIR}"/${PN}-7.0-noexecstack.patch
+	"${FILESDIR}"/${PN}-7.0-unwind.patch
 )
 
 pkg_pretend() {


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/wine-vanilla/files/, app-emulation/wine-vanilla/
@ 2022-11-01  1:16 Ionen Wolkens
  0 siblings, 0 replies; 8+ messages in thread
From: Ionen Wolkens @ 2022-11-01  1:16 UTC (permalink / raw
  To: gentoo-commits

commit:     5794bfbe7e1b9350a935198713e1cb858bae00c6
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Tue Nov  1 00:11:33 2022 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Tue Nov  1 01:15:29 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5794bfbe

app-emulation/wine-vanilla: add 7.20

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 app-emulation/wine-vanilla/Manifest                |   1 +
 .../files/wine-vanilla-7.20-unwind.patch           |  36 +++
 .../wine-vanilla/wine-vanilla-7.20.ebuild          | 320 +++++++++++++++++++++
 3 files changed, 357 insertions(+)

diff --git a/app-emulation/wine-vanilla/Manifest b/app-emulation/wine-vanilla/Manifest
index 7de32fe8e678..7520a5ca709a 100644
--- a/app-emulation/wine-vanilla/Manifest
+++ b/app-emulation/wine-vanilla/Manifest
@@ -2,3 +2,4 @@ DIST wine-7.0.tar.xz 27120912 BLAKE2B 84bfeb28d56f0f40bb93b1b5bf8954c8be2fd90fde
 DIST wine-7.17.tar.xz 28379876 BLAKE2B 536af8f1ac9c4dd8bae2d16cba226c99c45cd64f0a9a2569022baefee61556801d3ee15f480fd18445baecb6c78dd7950f98542dc88a3282ee5d457d0e4ddfb1 SHA512 fd8017e6174db0047a3957db3045b2ad9024e07b1e2f81800521f0b7e7f7660add6a08e09bc60e3d140816cec70aae8324fe15643bd05e541f22f66ffda52508
 DIST wine-7.18.tar.xz 28412876 BLAKE2B 1f25c8669a2afbead142923a39913b3f21df641e446a6136e7ecd282f6c31bc70578036e83f3dd28d22516d987ddca179198f76effb5c9aca089f4755ffa873e SHA512 e651b18cef73b4619e953b746d0c207c0220279003560aaf195c2569a22308af129e1460651a246e6a87dcfbcfcff08f52f970734035eb55ab45d8970fd56a02
 DIST wine-7.19.tar.xz 28502612 BLAKE2B b7b270656955c7a1e1d84e8bbc7e3e8abff5aedadb5e8a458f0b1109d746875a359f3d2f53b1c9c6caae65d17fd1d205466cd3a884034a8bad6afe9456f13b5d SHA512 f76dbda97cccad4c0f249b5dd4e8d48afa832134f1704ae228650bb73ee82823e628b23bd53a3f8729e06a8933597ff2fffa5551f156fc9c9181b67c066747d5
+DIST wine-7.20.tar.xz 28534920 BLAKE2B 2e0cd49a7820f0c885a2a6dbcded6ebbdb5e1ea5576b03dedb7ee066f74f8c675193450cdd45bf5e0224bd588a890138e47a15f513edbfde1eabf1b65c9abe31 SHA512 6e2e65fba2336985df93165050f0f46b752d6aa94fc1581451c58969e2003748378be4b9e16b647ca2922fbdff77920311b12a17bda630a7bccfc7ee8f03b453

diff --git a/app-emulation/wine-vanilla/files/wine-vanilla-7.20-unwind.patch b/app-emulation/wine-vanilla/files/wine-vanilla-7.20-unwind.patch
new file mode 100644
index 000000000000..63f9a06a5de8
--- /dev/null
+++ b/app-emulation/wine-vanilla/files/wine-vanilla-7.20-unwind.patch
@@ -0,0 +1,36 @@
+Fix build with llvm-libunwind, and also fix for non-llvm libunwind
+when using clang+bfd given clang doesn't have _Unwind_Find_FDE in
+its rtlib and expects it from llvm-libunwind.
+
+The _CONFIG_H_ check is for <llvm-libunwind-15 (adds _VERSION).
+--- a/dlls/ntdll/unix/dwarf.h
++++ b/dlls/ntdll/unix/dwarf.h
+@@ -255,5 +255,7 @@
+ };
+ 
++#if defined(_LIBUNWIND_VERSION) || defined(____LIBUNWIND_CONFIG_H__) || !defined(__clang__)
+ extern const struct dwarf_fde *_Unwind_Find_FDE (void *, struct dwarf_eh_bases *);
++#endif
+ 
+ static unsigned char dwarf_get_u1( const unsigned char **p )
+--- a/dlls/ntdll/unix/signal_x86_64.c
++++ b/dlls/ntdll/unix/signal_x86_64.c
+@@ -623,5 +623,5 @@
+     int rc;
+ 
+-#ifdef __APPLE__
++#if defined(__APPLE__) || defined(_LIBUNWIND_VERSION) || defined(____LIBUNWIND_CONFIG_H__)
+     rc = unw_getcontext( &unw_context );
+     if (rc == UNW_ESUCCESS)
+@@ -746,4 +746,5 @@
+ {
+     struct dwarf_eh_bases bases;
++#if defined(_LIBUNWIND_VERSION) || defined(____LIBUNWIND_CONFIG_H__) || !defined(__clang__)
+     const struct dwarf_fde *fde = _Unwind_Find_FDE( (void *)(context->Rip - 1), &bases );
+ 
+@@ -751,4 +752,5 @@
+         return dwarf_virtual_unwind( context->Rip, &dispatch->EstablisherFrame, context, fde,
+                                      &bases, &dispatch->LanguageHandler, &dispatch->HandlerData );
++#endif
+ #ifdef HAVE_LIBUNWIND
+     return libunwind_virtual_unwind( context->Rip, &dispatch->EstablisherFrame, context,

diff --git a/app-emulation/wine-vanilla/wine-vanilla-7.20.ebuild b/app-emulation/wine-vanilla/wine-vanilla-7.20.ebuild
new file mode 100644
index 000000000000..ddfe07cbf57d
--- /dev/null
+++ b/app-emulation/wine-vanilla/wine-vanilla-7.20.ebuild
@@ -0,0 +1,320 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MULTILIB_COMPAT=( abi_x86_{32,64} )
+inherit autotools flag-o-matic multilib multilib-build toolchain-funcs wrapper
+
+WINE_GECKO=2.47.3
+WINE_MONO=7.4.0
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://gitlab.winehq.org/wine/wine.git"
+else
+	(( $(ver_cut 2) )) && WINE_SDIR=$(ver_cut 1).x || WINE_SDIR=$(ver_cut 1).0
+	SRC_URI="https://dl.winehq.org/wine/source/${WINE_SDIR}/wine-${PV}.tar.xz"
+	S="${WORKDIR}/wine-${PV}"
+	KEYWORDS="-* ~amd64 ~x86"
+fi
+
+DESCRIPTION="Free implementation of Windows(tm) on Unix, without external patchsets"
+HOMEPAGE="https://www.winehq.org/"
+
+LICENSE="LGPL-2.1+ BSD-2 IJG MIT ZLIB gsm libpng2 libtiff"
+SLOT="${PV}"
+IUSE="
+	+X +abi_x86_32 +abi_x86_64 +alsa capi crossdev-mingw cups dos
+	llvm-libunwind debug custom-cflags +fontconfig +gecko gphoto2
+	+gstreamer kerberos ldap +mingw +mono netapi nls odbc openal
+	opencl +opengl osmesa pcap perl pulseaudio samba scanner +sdl
+	selinux +ssl +truetype udev udisks +unwind usb v4l +vulkan
+	+xcomposite xinerama"
+REQUIRED_USE="
+	X? ( truetype )
+	crossdev-mingw? ( mingw )" # bug #551124 for truetype
+
+# tests are non-trivial to run, can hang easily, don't play well with
+# sandbox, and several need real opengl/vulkan or network access
+RESTRICT="test"
+
+# `grep WINE_CHECK_SONAME configure.ac` + if not directly linked
+WINE_DLOPEN_DEPEND="
+	X? (
+		x11-libs/libXcursor[${MULTILIB_USEDEP}]
+		x11-libs/libXfixes[${MULTILIB_USEDEP}]
+		x11-libs/libXi[${MULTILIB_USEDEP}]
+		x11-libs/libXrandr[${MULTILIB_USEDEP}]
+		x11-libs/libXrender[${MULTILIB_USEDEP}]
+		x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+		opengl? (
+			media-libs/libglvnd[X,${MULTILIB_USEDEP}]
+			osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+		)
+		xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+		xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+	)
+	cups? ( net-print/cups[${MULTILIB_USEDEP}] )
+	fontconfig? ( media-libs/fontconfig[${MULTILIB_USEDEP}] )
+	kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
+	netapi? ( net-fs/samba[${MULTILIB_USEDEP}] )
+	odbc? ( dev-db/unixODBC[${MULTILIB_USEDEP}] )
+	sdl? ( media-libs/libsdl2[haptic,joystick,${MULTILIB_USEDEP}] )
+	ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+	truetype? ( media-libs/freetype[${MULTILIB_USEDEP}] )
+	udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+	v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+	vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] )"
+WINE_COMMON_DEPEND="
+	${WINE_DLOPEN_DEPEND}
+	X? (
+		x11-libs/libX11[${MULTILIB_USEDEP}]
+		x11-libs/libXext[${MULTILIB_USEDEP}]
+	)
+	alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+	capi? ( net-libs/libcapi:=[${MULTILIB_USEDEP}] )
+	gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+	gstreamer? (
+		dev-libs/glib:2[${MULTILIB_USEDEP}]
+		media-libs/gst-plugins-base:1.0[${MULTILIB_USEDEP}]
+		media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
+	)
+	ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+	openal? ( media-libs/openal[${MULTILIB_USEDEP}] )
+	opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+	pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
+	pulseaudio? ( media-libs/libpulse[${MULTILIB_USEDEP}] )
+	scanner? ( media-gfx/sane-backends[${MULTILIB_USEDEP}] )
+	udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
+	unwind? (
+		llvm-libunwind? ( sys-libs/llvm-libunwind[${MULTILIB_USEDEP}] )
+		!llvm-libunwind? ( sys-libs/libunwind:=[${MULTILIB_USEDEP}] )
+	)
+	usb? ( dev-libs/libusb:1[${MULTILIB_USEDEP}] )"
+RDEPEND="
+	${WINE_COMMON_DEPEND}
+	app-emulation/wine-desktop-common
+	dos? ( games-emulation/dosbox )
+	gecko? ( app-emulation/wine-gecko:${WINE_GECKO}[${MULTILIB_USEDEP}] )
+	gstreamer? ( media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] )
+	mono? ( app-emulation/wine-mono:${WINE_MONO} )
+	perl? (
+		dev-lang/perl
+		dev-perl/XML-LibXML
+	)
+	samba? ( net-fs/samba[winbind] )
+	selinux? ( sec-policy/selinux-wine )
+	udisks? ( sys-fs/udisks:2 )"
+DEPEND="
+	${WINE_COMMON_DEPEND}
+	sys-kernel/linux-headers
+	X? ( x11-base/xorg-proto )"
+BDEPEND="
+	dev-lang/perl
+	sys-devel/bison
+	sys-devel/flex
+	virtual/pkgconfig
+	mingw? ( !crossdev-mingw? ( dev-util/mingw64-toolchain[${MULTILIB_USEDEP}] ) )
+	nls? ( sys-devel/gettext )"
+IDEPEND="app-eselect/eselect-wine"
+
+QA_TEXTRELS="usr/lib/*/wine/i386-unix/*.so" # uses -fno-PIC -Wl,-z,notext
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-7.0-noexecstack.patch
+	"${FILESDIR}"/${PN}-7.20-unwind.patch
+)
+
+pkg_pretend() {
+	[[ ${MERGE_TYPE} == binary ]] && return
+
+	if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then
+		local mingw=-w64-mingw32
+		for mingw in $(usev abi_x86_64 x86_64${mingw}) $(usev abi_x86_32 i686${mingw}); do
+			if ! type -P ${mingw}-gcc >/dev/null; then
+				eerror "With USE=crossdev-mingw, you must prepare the MinGW toolchain"
+				eerror "yourself by installing sys-devel/crossdev then running:"
+				eerror
+				eerror "    crossdev --target ${mingw}"
+				eerror
+				eerror "For more information, please see: https://wiki.gentoo.org/wiki/Mingw"
+				die "USE=crossdev-mingw is enabled, but ${mingw}-gcc was not found"
+			fi
+		done
+	fi
+}
+
+src_prepare() {
+	# sanity check, bumping these has a history of oversights
+	local geckomono=$(sed -En '/^#define (GECKO|MONO)_VER/{s/[^0-9.]//gp}' \
+		dlls/appwiz.cpl/addons.c || die)
+	if [[ ${WINE_GECKO}$'\n'${WINE_MONO} != "${geckomono}" ]]; then
+		local gmfatal=
+		[[ ${PV} == *9999 ]] && gmfatal=nonfatal
+		${gmfatal} die -n "gecko/mono mismatch in ebuild, has: " ${geckomono} " (please file a bug)"
+	fi
+
+	default
+
+	# ensure .desktop calls this variant + slot
+	sed -i "/^Exec=/s/wine /${P} /" loader/wine.desktop || die
+
+	# always update for patches (including user's wrt #432348)
+	eautoreconf
+	tools/make_requests || die # perl
+}
+
+src_configure() {
+	WINE_PREFIX=/usr/lib/${P}
+	WINE_DATADIR=/usr/share/${P}
+
+	local conf=(
+		--prefix="${EPREFIX}"${WINE_PREFIX}
+		--datadir="${EPREFIX}"${WINE_DATADIR}
+		--includedir="${EPREFIX}"/usr/include/${P}
+		--libdir="${EPREFIX}"${WINE_PREFIX}
+		--mandir="${EPREFIX}"${WINE_DATADIR}/man
+		$(use_enable gecko mshtml)
+		$(use_enable mono mscoree)
+		--disable-tests
+		$(use_with X x)
+		$(use_with alsa)
+		$(use_with capi)
+		$(use_with cups)
+		$(use_with fontconfig)
+		$(use_with gphoto2 gphoto)
+		$(use_with gstreamer)
+		$(use_with kerberos gssapi)
+		$(use_with kerberos krb5)
+		$(use_with ldap)
+		$(use_with mingw)
+		$(use_with netapi)
+		$(use_with nls gettext)
+		$(use_with openal)
+		$(use_with opencl)
+		$(use_with opengl)
+		$(use_with osmesa)
+		--without-oss # media-sound/oss is not packaged (OSSv4)
+		$(use_with pcap)
+		$(use_with pulseaudio pulse)
+		$(use_with scanner sane)
+		$(use_with sdl)
+		$(use_with ssl gnutls)
+		$(use_with truetype freetype)
+		$(use_with udev)
+		$(use_with udisks dbus) # dbus is only used for udisks
+		$(use_with unwind)
+		$(use_with usb)
+		$(use_with v4l v4l2)
+		$(use_with vulkan)
+		$(use_with xcomposite)
+		$(use_with xinerama)
+		$(usev !odbc ac_cv_lib_soname_odbc=)
+	)
+
+	tc-ld-force-bfd #867097
+	use custom-cflags || strip-flags # can break in obscure ways, also no lto
+	use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH}
+
+	# build using upstream's way (--with-wine64)
+	# order matters: configure+compile 64->32, install 32->64
+	local -i bits
+	for bits in $(usev abi_x86_64 64) $(usev abi_x86_32 32); do
+	(
+		einfo "Configuring ${PN} for ${bits}bits in ${WORKDIR}/build${bits} ..."
+
+		mkdir ../build${bits} || die
+		cd ../build${bits} || die
+
+		# CROSSCC_amd64/x86 are unused by Wine, but recognized here for users
+		if (( bits == 64 )); then
+			: "${CROSSCC:=${CROSSCC_amd64:-x86_64-w64-mingw32-gcc}}"
+			conf+=( --enable-win64 )
+		elif use amd64; then
+			conf+=(
+				$(usev abi_x86_64 --with-wine64=../build64)
+				TARGETFLAGS=-m32 # for widl
+			)
+			# _setup is optional, but use over Wine's auto-detect (+#472038)
+			multilib_toolchain_setup x86
+		fi
+		: "${CROSSCC:=${CROSSCC_x86:-i686-w64-mingw32-gcc}}"
+
+		# use *FLAGS for mingw, but strip unsupported (e.g. --hash-style=gnu)
+		if use mingw; then
+			: "${CROSSCFLAGS:=$(
+				filter-flags '-fstack-clash-protection' #758914
+				filter-flags '-fstack-protector*' #870136
+				filter-flags '-mfunction-return=thunk*' #878849
+				CC=${CROSSCC} test-flags-CC ${CFLAGS:--O2})}"
+			: "${CROSSLDFLAGS:=$(
+				filter-flags '-fuse-ld=*'
+				CC=${CROSSCC} test-flags-CCLD ${LDFLAGS})}"
+			export CROSS{CC,{C,LD}FLAGS}
+		fi
+
+		ECONF_SOURCE=${S} econf "${conf[@]}"
+	)
+	done
+}
+
+src_compile() {
+	use abi_x86_64 && emake -C ../build64 # do first
+	use abi_x86_32 && emake -C ../build32
+}
+
+src_install() {
+	use abi_x86_32 && emake DESTDIR="${D}" -C ../build32 install
+	use abi_x86_64 && emake DESTDIR="${D}" -C ../build64 install # do last
+
+	# symlink for plain 'wine' and install its man pages if 64bit-only #404331
+	if use abi_x86_64 && use !abi_x86_32; then
+		dosym wine64 ${WINE_PREFIX}/bin/wine
+		dosym wine64-preloader ${WINE_PREFIX}/bin/wine-preloader
+		local man
+		for man in ../build64/loader/wine.*man; do
+			: "${man##*/wine}"
+			: "${_%.*}"
+			insinto ${WINE_DATADIR}/man/${_:+${_#.}/}man1
+			newins ${man} wine.1
+		done
+	fi
+
+	use perl || rm "${ED}"${WINE_DATADIR}/man/man1/wine{dump,maker}.1 \
+		"${ED}"${WINE_PREFIX}/bin/{function_grep.pl,wine{dump,maker}} || die
+
+	# create variant wrappers for eselect-wine
+	local bin
+	for bin in "${ED}"${WINE_PREFIX}/bin/*; do
+		make_wrapper "${bin##*/}-${P#wine-}" "${bin#"${ED}"}"
+	done
+
+	# don't let portage try to strip PE files with the wrong
+	# strip executable and instead handle it here (saves ~120MB)
+	if use mingw; then
+		dostrip -x ${WINE_PREFIX}/wine/{i386,x86_64}-windows
+		use debug ||
+			find "${ED}"${WINE_PREFIX}/wine/*-windows -regex '.*\.\(a\|dll\|exe\)' \
+				-exec $(usex abi_x86_64 x86_64 i686)-w64-mingw32-strip --strip-unneeded {} + || die
+	fi
+
+	dodoc ANNOUNCE AUTHORS README* documentation/README*
+}
+
+wine-eselect() {
+	ebegin "${1^}ing ${P} using eselect-wine"
+	eselect wine ${1} ${P} &&
+		eselect wine ${1} --${PN#wine-} ${P} &&
+		eselect wine update --if-unset &&
+		eselect wine update --${PN#wine-} --if-unset
+	eend ${?} || die -n "eselect failed, may need to manually handle ${P}"
+}
+
+pkg_postinst() {
+	wine-eselect register
+}
+
+pkg_prerm() {
+	nonfatal wine-eselect deregister
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/wine-vanilla/files/, app-emulation/wine-vanilla/
@ 2022-11-12 11:33 Ionen Wolkens
  0 siblings, 0 replies; 8+ messages in thread
From: Ionen Wolkens @ 2022-11-12 11:33 UTC (permalink / raw
  To: gentoo-commits

commit:     04a1bcdae7f65cf25e07986285357d808c15c6b5
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 12 07:08:54 2022 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Sat Nov 12 11:15:57 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04a1bcda

app-emulation/wine-vanilla: add 7.21

* drop IUSE=openal (support removed upstream)
* workaround some build system changes (see patch, could still
  be some toolchain issues, please report if anything odd)

This version has a new --enable-archs=i386,x86_64 which in theory
could allow building with a single ./configure phase with USE=mingw
and potentially skip (some) multilib dependencies. But this is rather
new and needs more looking into, so build like usual to ensure full
feature set.

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 app-emulation/wine-vanilla/Manifest                |   1 +
 .../files/wine-vanilla-7.21-crossflags.patch       |  29 ++
 .../wine-vanilla/wine-vanilla-7.21.ebuild          | 328 +++++++++++++++++++++
 3 files changed, 358 insertions(+)

diff --git a/app-emulation/wine-vanilla/Manifest b/app-emulation/wine-vanilla/Manifest
index 5525b6e92fe3..f9d14c85aa17 100644
--- a/app-emulation/wine-vanilla/Manifest
+++ b/app-emulation/wine-vanilla/Manifest
@@ -4,3 +4,4 @@ DIST wine-7.17.tar.xz 28379876 BLAKE2B 536af8f1ac9c4dd8bae2d16cba226c99c45cd64f0
 DIST wine-7.18.tar.xz 28412876 BLAKE2B 1f25c8669a2afbead142923a39913b3f21df641e446a6136e7ecd282f6c31bc70578036e83f3dd28d22516d987ddca179198f76effb5c9aca089f4755ffa873e SHA512 e651b18cef73b4619e953b746d0c207c0220279003560aaf195c2569a22308af129e1460651a246e6a87dcfbcfcff08f52f970734035eb55ab45d8970fd56a02
 DIST wine-7.19.tar.xz 28502612 BLAKE2B b7b270656955c7a1e1d84e8bbc7e3e8abff5aedadb5e8a458f0b1109d746875a359f3d2f53b1c9c6caae65d17fd1d205466cd3a884034a8bad6afe9456f13b5d SHA512 f76dbda97cccad4c0f249b5dd4e8d48afa832134f1704ae228650bb73ee82823e628b23bd53a3f8729e06a8933597ff2fffa5551f156fc9c9181b67c066747d5
 DIST wine-7.20.tar.xz 28534920 BLAKE2B 2e0cd49a7820f0c885a2a6dbcded6ebbdb5e1ea5576b03dedb7ee066f74f8c675193450cdd45bf5e0224bd588a890138e47a15f513edbfde1eabf1b65c9abe31 SHA512 6e2e65fba2336985df93165050f0f46b752d6aa94fc1581451c58969e2003748378be4b9e16b647ca2922fbdff77920311b12a17bda630a7bccfc7ee8f03b453
+DIST wine-7.21.tar.xz 28703308 BLAKE2B 8902ded32b9e635f8ccf659ca4055e9ad45d3659f3ad48d0c218dc5a7a334df456ea0e9441dcaff58e8cac0bbd65140b20e61180acaa06230bc70e28a8382c7e SHA512 15c0c9efda972b84890886fd4b1fb18dd462373ba490f5e607004a5436caba9823f643369ceb5abbc2d2d0e26d7ce002e00136299d9984c0a27f729f3ac129c1

diff --git a/app-emulation/wine-vanilla/files/wine-vanilla-7.21-crossflags.patch b/app-emulation/wine-vanilla/files/wine-vanilla-7.21-crossflags.patch
new file mode 100644
index 000000000000..66cb8d7bd004
--- /dev/null
+++ b/app-emulation/wine-vanilla/files/wine-vanilla-7.21-crossflags.patch
@@ -0,0 +1,29 @@
+Restore CROSSLDFLAGS and ensure tested flags are saved in
+{arch}_*FLAGS (e.g. -fno-strict-aliasing)
+
+quickfix, odds are this will be revamped upstream
+--- a/configure.ac
++++ b/configure.ac
+@@ -911,9 +911,9 @@
+     saved_CC=$CC
+     saved_CFLAGS=$CFLAGS
++    saved_LDFLAGS=$LDFLAGS
+ 
+     CFLAGS=${CROSSCFLAGS:-"-g -O2"}
++    LDFLAGS=${CROSSLDFLAGS:-}
+     AS_VAR_COPY([CC],[${wine_arch}_CC])
+-    AS_VAR_COPY([${wine_arch}_CFLAGS],[CFLAGS])
+-    AS_VAR_COPY([${wine_arch}_LDFLAGS],[LDFLAGS])
+     AS_VAR_SET([${wine_arch}_EXTRACFLAGS],["-D__WINE_PE_BUILD -Wall"])
+ 
+@@ -1044,6 +1044,10 @@
+                                           AS_VAR_APPEND([${wine_arch}_LDFLAGS],[" -Wl,--build-id"])])
+ 
++    AS_VAR_COPY([${wine_arch}_CFLAGS],[CFLAGS])
++    AS_VAR_COPY([${wine_arch}_LDFLAGS],[LDFLAGS])
++
+     CC=$saved_CC
+     CFLAGS=$saved_CFLAGS
++    LDFLAGS=$saved_LDFLAGS
+ done
+ 

diff --git a/app-emulation/wine-vanilla/wine-vanilla-7.21.ebuild b/app-emulation/wine-vanilla/wine-vanilla-7.21.ebuild
new file mode 100644
index 000000000000..5b5c6577712d
--- /dev/null
+++ b/app-emulation/wine-vanilla/wine-vanilla-7.21.ebuild
@@ -0,0 +1,328 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MULTILIB_COMPAT=( abi_x86_{32,64} )
+inherit autotools flag-o-matic multilib multilib-build toolchain-funcs wrapper
+
+WINE_GECKO=2.47.3
+WINE_MONO=7.4.0
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://gitlab.winehq.org/wine/wine.git"
+else
+	(( $(ver_cut 2) )) && WINE_SDIR=$(ver_cut 1).x || WINE_SDIR=$(ver_cut 1).0
+	SRC_URI="https://dl.winehq.org/wine/source/${WINE_SDIR}/wine-${PV}.tar.xz"
+	S="${WORKDIR}/wine-${PV}"
+	KEYWORDS="-* ~amd64 ~x86"
+fi
+
+DESCRIPTION="Free implementation of Windows(tm) on Unix, without external patchsets"
+HOMEPAGE="https://www.winehq.org/"
+
+LICENSE="LGPL-2.1+ BSD-2 IJG MIT ZLIB gsm libpng2 libtiff"
+SLOT="${PV}"
+IUSE="
+	+X +abi_x86_32 +abi_x86_64 +alsa capi crossdev-mingw cups dos
+	llvm-libunwind debug custom-cflags +fontconfig +gecko gphoto2
+	+gstreamer kerberos ldap +mingw +mono netapi nls odbc opencl
+	+opengl osmesa pcap perl pulseaudio samba scanner +sdl selinux
+	+ssl +truetype udev udisks +unwind usb v4l +vulkan +xcomposite
+	xinerama"
+REQUIRED_USE="
+	X? ( truetype )
+	crossdev-mingw? ( mingw )" # bug #551124 for truetype
+
+# tests are non-trivial to run, can hang easily, don't play well with
+# sandbox, and several need real opengl/vulkan or network access
+RESTRICT="test"
+
+# `grep WINE_CHECK_SONAME configure.ac` + if not directly linked
+WINE_DLOPEN_DEPEND="
+	X? (
+		x11-libs/libXcursor[${MULTILIB_USEDEP}]
+		x11-libs/libXfixes[${MULTILIB_USEDEP}]
+		x11-libs/libXi[${MULTILIB_USEDEP}]
+		x11-libs/libXrandr[${MULTILIB_USEDEP}]
+		x11-libs/libXrender[${MULTILIB_USEDEP}]
+		x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
+		opengl? (
+			media-libs/libglvnd[X,${MULTILIB_USEDEP}]
+			osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+		)
+		xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+		xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+	)
+	cups? ( net-print/cups[${MULTILIB_USEDEP}] )
+	fontconfig? ( media-libs/fontconfig[${MULTILIB_USEDEP}] )
+	kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
+	netapi? ( net-fs/samba[${MULTILIB_USEDEP}] )
+	odbc? ( dev-db/unixODBC[${MULTILIB_USEDEP}] )
+	sdl? ( media-libs/libsdl2[haptic,joystick,${MULTILIB_USEDEP}] )
+	ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+	truetype? ( media-libs/freetype[${MULTILIB_USEDEP}] )
+	udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+	v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+	vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] )"
+WINE_COMMON_DEPEND="
+	${WINE_DLOPEN_DEPEND}
+	X? (
+		x11-libs/libX11[${MULTILIB_USEDEP}]
+		x11-libs/libXext[${MULTILIB_USEDEP}]
+	)
+	alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
+	capi? ( net-libs/libcapi:=[${MULTILIB_USEDEP}] )
+	gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
+	gstreamer? (
+		dev-libs/glib:2[${MULTILIB_USEDEP}]
+		media-libs/gst-plugins-base:1.0[${MULTILIB_USEDEP}]
+		media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
+	)
+	ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
+	opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
+	pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
+	pulseaudio? ( media-libs/libpulse[${MULTILIB_USEDEP}] )
+	scanner? ( media-gfx/sane-backends[${MULTILIB_USEDEP}] )
+	udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
+	unwind? (
+		llvm-libunwind? ( sys-libs/llvm-libunwind[${MULTILIB_USEDEP}] )
+		!llvm-libunwind? ( sys-libs/libunwind:=[${MULTILIB_USEDEP}] )
+	)
+	usb? ( dev-libs/libusb:1[${MULTILIB_USEDEP}] )"
+RDEPEND="
+	${WINE_COMMON_DEPEND}
+	app-emulation/wine-desktop-common
+	dos? ( games-emulation/dosbox )
+	gecko? ( app-emulation/wine-gecko:${WINE_GECKO}[${MULTILIB_USEDEP}] )
+	gstreamer? ( media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] )
+	mono? ( app-emulation/wine-mono:${WINE_MONO} )
+	perl? (
+		dev-lang/perl
+		dev-perl/XML-LibXML
+	)
+	samba? ( net-fs/samba[winbind] )
+	selinux? ( sec-policy/selinux-wine )
+	udisks? ( sys-fs/udisks:2 )"
+DEPEND="
+	${WINE_COMMON_DEPEND}
+	sys-kernel/linux-headers
+	X? ( x11-base/xorg-proto )"
+BDEPEND="
+	dev-lang/perl
+	sys-devel/bison
+	sys-devel/flex
+	virtual/pkgconfig
+	mingw? ( !crossdev-mingw? (
+		>=dev-util/mingw64-toolchain-10.0.0_p1-r2[${MULTILIB_USEDEP}]
+	) )
+	nls? ( sys-devel/gettext )"
+IDEPEND="app-eselect/eselect-wine"
+
+QA_TEXTRELS="usr/lib/*/wine/i386-unix/*.so" # uses -fno-PIC -Wl,-z,notext
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-7.0-noexecstack.patch
+	"${FILESDIR}"/${PN}-7.20-unwind.patch
+	"${FILESDIR}"/${PN}-7.21-crossflags.patch
+)
+
+pkg_pretend() {
+	[[ ${MERGE_TYPE} == binary ]] && return
+
+	if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then
+		local mingw=-w64-mingw32
+		for mingw in $(usev abi_x86_64 x86_64${mingw}) $(usev abi_x86_32 i686${mingw}); do
+			if ! type -P ${mingw}-gcc >/dev/null; then
+				eerror "With USE=crossdev-mingw, you must prepare the MinGW toolchain"
+				eerror "yourself by installing sys-devel/crossdev then running:"
+				eerror
+				eerror "    crossdev --target ${mingw}"
+				eerror
+				eerror "For more information, please see: https://wiki.gentoo.org/wiki/Mingw"
+				die "USE=crossdev-mingw is enabled, but ${mingw}-gcc was not found"
+			fi
+		done
+	fi
+}
+
+src_prepare() {
+	# sanity check, bumping these has a history of oversights
+	local geckomono=$(sed -En '/^#define (GECKO|MONO)_VER/{s/[^0-9.]//gp}' \
+		dlls/appwiz.cpl/addons.c || die)
+	if [[ ${WINE_GECKO}$'\n'${WINE_MONO} != "${geckomono}" ]]; then
+		local gmfatal=
+		[[ ${PV} == *9999 ]] && gmfatal=nonfatal
+		${gmfatal} die -n "gecko/mono mismatch in ebuild, has: " ${geckomono} " (please file a bug)"
+	fi
+
+	default
+
+	# ensure .desktop calls this variant + slot
+	sed -i "/^Exec=/s/wine /${P} /" loader/wine.desktop || die
+
+	# always update for patches (including user's wrt #432348)
+	eautoreconf
+	tools/make_requests || die # perl
+}
+
+src_configure() {
+	WINE_PREFIX=/usr/lib/${P}
+	WINE_DATADIR=/usr/share/${P}
+
+	local conf=(
+		--prefix="${EPREFIX}"${WINE_PREFIX}
+		--datadir="${EPREFIX}"${WINE_DATADIR}
+		--includedir="${EPREFIX}"/usr/include/${P}
+		--libdir="${EPREFIX}"${WINE_PREFIX}
+		--mandir="${EPREFIX}"${WINE_DATADIR}/man
+		$(use_enable gecko mshtml)
+		$(use_enable mono mscoree)
+		--disable-tests
+		$(use_with X x)
+		$(use_with alsa)
+		$(use_with capi)
+		$(use_with cups)
+		$(use_with fontconfig)
+		$(use_with gphoto2 gphoto)
+		$(use_with gstreamer)
+		$(use_with kerberos gssapi)
+		$(use_with kerberos krb5)
+		$(use_with ldap)
+		$(use_with mingw)
+		$(use_with netapi)
+		$(use_with nls gettext)
+		$(use_with opencl)
+		$(use_with opengl)
+		$(use_with osmesa)
+		--without-oss # media-sound/oss is not packaged (OSSv4)
+		$(use_with pcap)
+		$(use_with pulseaudio pulse)
+		$(use_with scanner sane)
+		$(use_with sdl)
+		$(use_with ssl gnutls)
+		$(use_with truetype freetype)
+		$(use_with udev)
+		$(use_with udisks dbus) # dbus is only used for udisks
+		$(use_with unwind)
+		$(use_with usb)
+		$(use_with v4l v4l2)
+		$(use_with vulkan)
+		$(use_with xcomposite)
+		$(use_with xinerama)
+		$(usev !odbc ac_cv_lib_soname_odbc=)
+	)
+
+	tc-ld-force-bfd #867097
+	use custom-cflags || strip-flags # can break in obscure ways, also no lto
+	use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH}
+
+	# build using upstream's way (--with-wine64)
+	# order matters: configure+compile 64->32, install 32->64
+	local -i bits
+	for bits in $(usev abi_x86_64 64) $(usev abi_x86_32 32); do
+	(
+		einfo "Configuring ${PN} for ${bits}bits in ${WORKDIR}/build${bits} ..."
+
+		mkdir ../build${bits} || die
+		cd ../build${bits} || die
+
+		pe_arch=i386
+		if (( bits == 64 )); then
+			pe_arch=x86_64
+			: "${CROSSCC:=${CROSSCC_amd64:-x86_64-w64-mingw32-gcc}}"
+			conf+=( --enable-win64 )
+		elif use amd64; then
+			conf+=(
+				$(usev abi_x86_64 --with-wine64=../build64)
+				TARGETFLAGS=-m32 # for widl
+			)
+			# _setup is optional, but use over Wine's auto-detect (+#472038)
+			multilib_toolchain_setup x86
+		fi
+		: "${CROSSCC:=${CROSSCC_x86:-i686-w64-mingw32-gcc}}"
+
+		if use mingw; then
+			# CROSSCC is no longer recognized by Wine, but still use for now
+			# (future handling for CROSS* variables is subject to changes)
+			conf+=( ac_cv_prog_${pe_arch}_CC="${CROSSCC}" )
+
+			# use *FLAGS for mingw, but strip unsupported
+			: "${CROSSCFLAGS:=$(
+				filter-flags '-fstack-clash-protection' #758914
+				filter-flags '-fstack-protector*' #870136
+				filter-flags '-mfunction-return=thunk*' #878849
+				CC=${CROSSCC} test-flags-CC ${CFLAGS:--O2})}"
+			: "${CROSSLDFLAGS:=$(
+				filter-flags '-fuse-ld=*'
+				CC=${CROSSCC} test-flags-CCLD ${LDFLAGS})}"
+			export CROSS{C,LD}FLAGS
+		fi
+
+		ECONF_SOURCE=${S} econf "${conf[@]}"
+	)
+	done
+}
+
+src_compile() {
+	use abi_x86_64 && emake -C ../build64 # do first
+	use abi_x86_32 && emake -C ../build32
+}
+
+src_install() {
+	use abi_x86_32 && emake DESTDIR="${D}" -C ../build32 install
+	use abi_x86_64 && emake DESTDIR="${D}" -C ../build64 install # do last
+
+	# symlink for plain 'wine' and install its man pages if 64bit-only #404331
+	if use abi_x86_64 && use !abi_x86_32; then
+		dosym wine64 ${WINE_PREFIX}/bin/wine
+		dosym wine64-preloader ${WINE_PREFIX}/bin/wine-preloader
+		local man
+		for man in ../build64/loader/wine.*man; do
+			: "${man##*/wine}"
+			: "${_%.*}"
+			insinto ${WINE_DATADIR}/man/${_:+${_#.}/}man1
+			newins ${man} wine.1
+		done
+	fi
+
+	use perl || rm "${ED}"${WINE_DATADIR}/man/man1/wine{dump,maker}.1 \
+		"${ED}"${WINE_PREFIX}/bin/{function_grep.pl,wine{dump,maker}} || die
+
+	# create variant wrappers for eselect-wine
+	local bin
+	for bin in "${ED}"${WINE_PREFIX}/bin/*; do
+		make_wrapper "${bin##*/}-${P#wine-}" "${bin#"${ED}"}"
+	done
+
+	# don't let portage try to strip PE files with the wrong
+	# strip executable and instead handle it here (saves ~120MB)
+	if use mingw; then
+		dostrip -x ${WINE_PREFIX}/wine/{i386,x86_64}-windows
+		use debug ||
+			find "${ED}"${WINE_PREFIX}/wine/*-windows -regex '.*\.\(a\|dll\|exe\)' \
+				-exec $(usex abi_x86_64 x86_64 i686)-w64-mingw32-strip --strip-unneeded {} + || die
+	fi
+
+	dodoc ANNOUNCE AUTHORS README* documentation/README*
+}
+
+wine-eselect() {
+	ebegin "${1^}ing ${P} using eselect-wine"
+	eselect wine ${1} ${P} &&
+		eselect wine ${1} --${PN#wine-} ${P} &&
+		eselect wine update --if-unset &&
+		eselect wine update --${PN#wine-} --if-unset
+	eend ${?} || die -n "eselect failed, may need to manually handle ${P}"
+}
+
+pkg_postinst() {
+	wine-eselect register
+}
+
+pkg_prerm() {
+	if [[ ${REPLACED_BY_VERSION%-r*} != ${PV} ]]; then #881035
+		nonfatal wine-eselect deregister
+	fi
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/wine-vanilla/files/, app-emulation/wine-vanilla/
@ 2022-11-24  0:57 Ionen Wolkens
  0 siblings, 0 replies; 8+ messages in thread
From: Ionen Wolkens @ 2022-11-24  0:57 UTC (permalink / raw
  To: gentoo-commits

commit:     a62ccb7245ecaedf4bf99bd1f4101f3b1d02ae49
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 23 23:46:33 2022 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Thu Nov 24 00:54:16 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a62ccb72

app-emulation/wine-vanilla: backport opengl32.dll fix to 7.21

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../files/wine-vanilla-7.21-opengl32.patch         | 73 ++++++++++++++++++++++
 ...lla-7.21.ebuild => wine-vanilla-7.21-r1.ebuild} |  3 +-
 2 files changed, 75 insertions(+), 1 deletion(-)

diff --git a/app-emulation/wine-vanilla/files/wine-vanilla-7.21-opengl32.patch b/app-emulation/wine-vanilla/files/wine-vanilla-7.21-opengl32.patch
new file mode 100644
index 000000000000..9411e05e96fd
--- /dev/null
+++ b/app-emulation/wine-vanilla/files/wine-vanilla-7.21-opengl32.patch
@@ -0,0 +1,73 @@
+Fixes PE opengl32.dll failing to initialize.
+
+https://gitlab.winehq.org/wine/wine/-/commit/34099bba6cb
+From:  Rémi Bernon <rbernon@codeweavers.com>
+Date: Mon, 14 Nov 2022 11:55:51 +0100
+Subject: [PATCH] ntdll: Delay loading unixlibs until the functions are
+ requested.
+
+Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53909
+--- a/dlls/ntdll/unix/virtual.c
++++ b/dlls/ntdll/unix/virtual.c
+@@ -98,6 +98,7 @@ struct builtin_module
+     unsigned int refcount;
+     void        *handle;
+     void        *module;
++    char        *unix_path;
+     void        *unix_handle;
+ };
+ 
+@@ -583,6 +584,7 @@ static void add_builtin_module( void *module, void *handle )
+     builtin->handle      = handle;
+     builtin->module      = module;
+     builtin->refcount    = 1;
++    builtin->unix_path   = NULL;
+     builtin->unix_handle = NULL;
+     list_add_tail( &builtin_modules, &builtin->entry );
+ }
+@@ -603,6 +605,7 @@ void release_builtin_module( void *module )
+             list_remove( &builtin->entry );
+             if (builtin->handle) dlclose( builtin->handle );
+             if (builtin->unix_handle) dlclose( builtin->unix_handle );
++            free( builtin->unix_path );
+             free( builtin );
+         }
+         break;
+@@ -652,6 +655,8 @@ static NTSTATUS get_builtin_unix_funcs( void *module, BOOL wow, const void **fun
+     LIST_FOR_EACH_ENTRY( builtin, &builtin_modules, struct builtin_module, entry )
+     {
+         if (builtin->module != module) continue;
++        if (builtin->unix_path && !builtin->unix_handle)
++            builtin->unix_handle = dlopen( builtin->unix_path, RTLD_NOW );
+         if (builtin->unix_handle)
+         {
+             *funcs = dlsym( builtin->unix_handle, ptr_name );
+@@ -669,26 +674,19 @@ static NTSTATUS get_builtin_unix_funcs( void *module, BOOL wow, const void **fun
+  */
+ NTSTATUS load_builtin_unixlib( void *module, const char *name )
+ {
+-    void *handle;
+     sigset_t sigset;
+-    NTSTATUS status = STATUS_DLL_NOT_FOUND;
++    NTSTATUS status = STATUS_SUCCESS;
+     struct builtin_module *builtin;
+ 
+-    if (!(handle = dlopen( name, RTLD_NOW ))) return status;
+     server_enter_uninterrupted_section( &virtual_mutex, &sigset );
+     LIST_FOR_EACH_ENTRY( builtin, &builtin_modules, struct builtin_module, entry )
+     {
+         if (builtin->module != module) continue;
+-        if (!builtin->unix_handle)
+-        {
+-            builtin->unix_handle = handle;
+-            status = STATUS_SUCCESS;
+-        }
++        if (!builtin->unix_path) builtin->unix_path = strdup( name );
+         else status = STATUS_IMAGE_ALREADY_LOADED;
+         break;
+     }
+     server_leave_uninterrupted_section( &virtual_mutex, &sigset );
+-    if (status) dlclose( handle );
+     return status;
+ }
+ 

diff --git a/app-emulation/wine-vanilla/wine-vanilla-7.21.ebuild b/app-emulation/wine-vanilla/wine-vanilla-7.21-r1.ebuild
similarity index 99%
rename from app-emulation/wine-vanilla/wine-vanilla-7.21.ebuild
rename to app-emulation/wine-vanilla/wine-vanilla-7.21-r1.ebuild
index d931d7219d8d..38fe963828ae 100644
--- a/app-emulation/wine-vanilla/wine-vanilla-7.21.ebuild
+++ b/app-emulation/wine-vanilla/wine-vanilla-7.21-r1.ebuild
@@ -128,7 +128,8 @@ QA_TEXTRELS="usr/lib/*/wine/i386-unix/*.so" # uses -fno-PIC -Wl,-z,notext
 PATCHES=(
 	"${FILESDIR}"/${PN}-7.0-noexecstack.patch
 	"${FILESDIR}"/${PN}-7.20-unwind.patch
-	"${FILESDIR}"/${PN}-7.21-crossflags.patch
+	"${FILESDIR}"/${P}-crossflags.patch
+	"${FILESDIR}"/${P}-opengl32.patch
 )
 
 pkg_pretend() {


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/wine-vanilla/files/, app-emulation/wine-vanilla/
@ 2022-12-29 20:29 Ionen Wolkens
  0 siblings, 0 replies; 8+ messages in thread
From: Ionen Wolkens @ 2022-12-29 20:29 UTC (permalink / raw
  To: gentoo-commits

commit:     d12a4639c4a9e6e094dc06d180984033a3a7ab02
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 29 16:16:57 2022 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Thu Dec 29 20:28:52 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d12a4639

app-emulation/wine-vanilla: drop 7.20, 7.21-r1

Both versions had several quirks and shouldn't be worthwhile
to keep, try 7.19 instead if 7.22 is not suitable (7.19 was
before some more major changes).

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 app-emulation/wine-vanilla/Manifest                |   2 -
 .../files/wine-vanilla-7.21-crossflags.patch       |  29 --
 .../files/wine-vanilla-7.21-opengl32.patch         |  73 -----
 .../wine-vanilla/wine-vanilla-7.20.ebuild          | 321 --------------------
 .../wine-vanilla/wine-vanilla-7.21-r1.ebuild       | 328 ---------------------
 5 files changed, 753 deletions(-)

diff --git a/app-emulation/wine-vanilla/Manifest b/app-emulation/wine-vanilla/Manifest
index bb49c1f10238..56e7617cc7a2 100644
--- a/app-emulation/wine-vanilla/Manifest
+++ b/app-emulation/wine-vanilla/Manifest
@@ -1,5 +1,3 @@
 DIST wine-7.0.1.tar.xz 27167768 BLAKE2B 9bf74e7077fe4b77611f8195feeb53fc6475bdaeac97dab5221942115d6108d8786f93d4a96745bad72afb074b15129fec9b0b2f10261d91c9a9b57bd2240ded SHA512 5a5258132fe30bfb5313454598b85e7d97a74d1e0c7ca7af16aa8c486e316ad34ab74a25fd9a403c98ad1f3280385232f7d159bb824f713e920a4a0dae62c944
 DIST wine-7.19.tar.xz 28502612 BLAKE2B b7b270656955c7a1e1d84e8bbc7e3e8abff5aedadb5e8a458f0b1109d746875a359f3d2f53b1c9c6caae65d17fd1d205466cd3a884034a8bad6afe9456f13b5d SHA512 f76dbda97cccad4c0f249b5dd4e8d48afa832134f1704ae228650bb73ee82823e628b23bd53a3f8729e06a8933597ff2fffa5551f156fc9c9181b67c066747d5
-DIST wine-7.20.tar.xz 28534920 BLAKE2B 2e0cd49a7820f0c885a2a6dbcded6ebbdb5e1ea5576b03dedb7ee066f74f8c675193450cdd45bf5e0224bd588a890138e47a15f513edbfde1eabf1b65c9abe31 SHA512 6e2e65fba2336985df93165050f0f46b752d6aa94fc1581451c58969e2003748378be4b9e16b647ca2922fbdff77920311b12a17bda630a7bccfc7ee8f03b453
-DIST wine-7.21.tar.xz 28703308 BLAKE2B 8902ded32b9e635f8ccf659ca4055e9ad45d3659f3ad48d0c218dc5a7a334df456ea0e9441dcaff58e8cac0bbd65140b20e61180acaa06230bc70e28a8382c7e SHA512 15c0c9efda972b84890886fd4b1fb18dd462373ba490f5e607004a5436caba9823f643369ceb5abbc2d2d0e26d7ce002e00136299d9984c0a27f729f3ac129c1
 DIST wine-7.22.tar.xz 28974052 BLAKE2B c86466964817b916ee8f7b687f193eda8bdd3fb17152ab1565971e36f43b12b540033ac1c5fa5d15576041febd32cf1ea2955732c5386debcbda46fb3acca0f1 SHA512 bf58a5b98bef5b291aff1eca3f94c28da95990e4c8da9af5e9e28b9480d57163d088b501b0c1bca5b568bf586dd9933cdc1ea1f371b78d95c94e2d25d0a65efc

diff --git a/app-emulation/wine-vanilla/files/wine-vanilla-7.21-crossflags.patch b/app-emulation/wine-vanilla/files/wine-vanilla-7.21-crossflags.patch
deleted file mode 100644
index 66cb8d7bd004..000000000000
--- a/app-emulation/wine-vanilla/files/wine-vanilla-7.21-crossflags.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Restore CROSSLDFLAGS and ensure tested flags are saved in
-{arch}_*FLAGS (e.g. -fno-strict-aliasing)
-
-quickfix, odds are this will be revamped upstream
---- a/configure.ac
-+++ b/configure.ac
-@@ -911,9 +911,9 @@
-     saved_CC=$CC
-     saved_CFLAGS=$CFLAGS
-+    saved_LDFLAGS=$LDFLAGS
- 
-     CFLAGS=${CROSSCFLAGS:-"-g -O2"}
-+    LDFLAGS=${CROSSLDFLAGS:-}
-     AS_VAR_COPY([CC],[${wine_arch}_CC])
--    AS_VAR_COPY([${wine_arch}_CFLAGS],[CFLAGS])
--    AS_VAR_COPY([${wine_arch}_LDFLAGS],[LDFLAGS])
-     AS_VAR_SET([${wine_arch}_EXTRACFLAGS],["-D__WINE_PE_BUILD -Wall"])
- 
-@@ -1044,6 +1044,10 @@
-                                           AS_VAR_APPEND([${wine_arch}_LDFLAGS],[" -Wl,--build-id"])])
- 
-+    AS_VAR_COPY([${wine_arch}_CFLAGS],[CFLAGS])
-+    AS_VAR_COPY([${wine_arch}_LDFLAGS],[LDFLAGS])
-+
-     CC=$saved_CC
-     CFLAGS=$saved_CFLAGS
-+    LDFLAGS=$saved_LDFLAGS
- done
- 

diff --git a/app-emulation/wine-vanilla/files/wine-vanilla-7.21-opengl32.patch b/app-emulation/wine-vanilla/files/wine-vanilla-7.21-opengl32.patch
deleted file mode 100644
index 9411e05e96fd..000000000000
--- a/app-emulation/wine-vanilla/files/wine-vanilla-7.21-opengl32.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-Fixes PE opengl32.dll failing to initialize.
-
-https://gitlab.winehq.org/wine/wine/-/commit/34099bba6cb
-From:  Rémi Bernon <rbernon@codeweavers.com>
-Date: Mon, 14 Nov 2022 11:55:51 +0100
-Subject: [PATCH] ntdll: Delay loading unixlibs until the functions are
- requested.
-
-Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53909
---- a/dlls/ntdll/unix/virtual.c
-+++ b/dlls/ntdll/unix/virtual.c
-@@ -98,6 +98,7 @@ struct builtin_module
-     unsigned int refcount;
-     void        *handle;
-     void        *module;
-+    char        *unix_path;
-     void        *unix_handle;
- };
- 
-@@ -583,6 +584,7 @@ static void add_builtin_module( void *module, void *handle )
-     builtin->handle      = handle;
-     builtin->module      = module;
-     builtin->refcount    = 1;
-+    builtin->unix_path   = NULL;
-     builtin->unix_handle = NULL;
-     list_add_tail( &builtin_modules, &builtin->entry );
- }
-@@ -603,6 +605,7 @@ void release_builtin_module( void *module )
-             list_remove( &builtin->entry );
-             if (builtin->handle) dlclose( builtin->handle );
-             if (builtin->unix_handle) dlclose( builtin->unix_handle );
-+            free( builtin->unix_path );
-             free( builtin );
-         }
-         break;
-@@ -652,6 +655,8 @@ static NTSTATUS get_builtin_unix_funcs( void *module, BOOL wow, const void **fun
-     LIST_FOR_EACH_ENTRY( builtin, &builtin_modules, struct builtin_module, entry )
-     {
-         if (builtin->module != module) continue;
-+        if (builtin->unix_path && !builtin->unix_handle)
-+            builtin->unix_handle = dlopen( builtin->unix_path, RTLD_NOW );
-         if (builtin->unix_handle)
-         {
-             *funcs = dlsym( builtin->unix_handle, ptr_name );
-@@ -669,26 +674,19 @@ static NTSTATUS get_builtin_unix_funcs( void *module, BOOL wow, const void **fun
-  */
- NTSTATUS load_builtin_unixlib( void *module, const char *name )
- {
--    void *handle;
-     sigset_t sigset;
--    NTSTATUS status = STATUS_DLL_NOT_FOUND;
-+    NTSTATUS status = STATUS_SUCCESS;
-     struct builtin_module *builtin;
- 
--    if (!(handle = dlopen( name, RTLD_NOW ))) return status;
-     server_enter_uninterrupted_section( &virtual_mutex, &sigset );
-     LIST_FOR_EACH_ENTRY( builtin, &builtin_modules, struct builtin_module, entry )
-     {
-         if (builtin->module != module) continue;
--        if (!builtin->unix_handle)
--        {
--            builtin->unix_handle = handle;
--            status = STATUS_SUCCESS;
--        }
-+        if (!builtin->unix_path) builtin->unix_path = strdup( name );
-         else status = STATUS_IMAGE_ALREADY_LOADED;
-         break;
-     }
-     server_leave_uninterrupted_section( &virtual_mutex, &sigset );
--    if (status) dlclose( handle );
-     return status;
- }
- 

diff --git a/app-emulation/wine-vanilla/wine-vanilla-7.20.ebuild b/app-emulation/wine-vanilla/wine-vanilla-7.20.ebuild
deleted file mode 100644
index 883a0f427034..000000000000
--- a/app-emulation/wine-vanilla/wine-vanilla-7.20.ebuild
+++ /dev/null
@@ -1,321 +0,0 @@
-# Copyright 2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-MULTILIB_COMPAT=( abi_x86_{32,64} )
-inherit autotools flag-o-matic multilib multilib-build toolchain-funcs wrapper
-
-WINE_GECKO=2.47.3
-WINE_MONO=7.4.0
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	EGIT_REPO_URI="https://gitlab.winehq.org/wine/wine.git"
-else
-	(( $(ver_cut 2) )) && WINE_SDIR=$(ver_cut 1).x || WINE_SDIR=$(ver_cut 1).0
-	SRC_URI="https://dl.winehq.org/wine/source/${WINE_SDIR}/wine-${PV}.tar.xz"
-	S="${WORKDIR}/wine-${PV}"
-	KEYWORDS="-* ~amd64 ~x86"
-fi
-
-DESCRIPTION="Free implementation of Windows(tm) on Unix, without external patchsets"
-HOMEPAGE="
-	https://www.winehq.org/
-	https://gitlab.winehq.org/wine/wine/"
-
-LICENSE="LGPL-2.1+ BSD-2 IJG MIT ZLIB gsm libpng2 libtiff"
-SLOT="${PV}"
-IUSE="
-	+X +abi_x86_32 +abi_x86_64 +alsa capi crossdev-mingw cups dos
-	llvm-libunwind debug custom-cflags +fontconfig +gecko gphoto2
-	+gstreamer kerberos ldap +mingw +mono netapi nls odbc openal
-	opencl +opengl osmesa pcap perl pulseaudio samba scanner +sdl
-	selinux +ssl +truetype udev udisks +unwind usb v4l +vulkan
-	+xcomposite xinerama"
-REQUIRED_USE="
-	X? ( truetype )
-	crossdev-mingw? ( mingw )" # bug #551124 for truetype
-
-# tests are non-trivial to run, can hang easily, don't play well with
-# sandbox, and several need real opengl/vulkan or network access
-RESTRICT="test"
-
-# `grep WINE_CHECK_SONAME configure.ac` + if not directly linked
-WINE_DLOPEN_DEPEND="
-	X? (
-		x11-libs/libXcursor[${MULTILIB_USEDEP}]
-		x11-libs/libXfixes[${MULTILIB_USEDEP}]
-		x11-libs/libXi[${MULTILIB_USEDEP}]
-		x11-libs/libXrandr[${MULTILIB_USEDEP}]
-		x11-libs/libXrender[${MULTILIB_USEDEP}]
-		x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
-		opengl? (
-			media-libs/libglvnd[X,${MULTILIB_USEDEP}]
-			osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
-		)
-		xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
-		xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
-	)
-	cups? ( net-print/cups[${MULTILIB_USEDEP}] )
-	fontconfig? ( media-libs/fontconfig[${MULTILIB_USEDEP}] )
-	kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
-	netapi? ( net-fs/samba[${MULTILIB_USEDEP}] )
-	odbc? ( dev-db/unixODBC[${MULTILIB_USEDEP}] )
-	sdl? ( media-libs/libsdl2[haptic,joystick,${MULTILIB_USEDEP}] )
-	ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
-	truetype? ( media-libs/freetype[${MULTILIB_USEDEP}] )
-	udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
-	v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
-	vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] )"
-WINE_COMMON_DEPEND="
-	${WINE_DLOPEN_DEPEND}
-	X? (
-		x11-libs/libX11[${MULTILIB_USEDEP}]
-		x11-libs/libXext[${MULTILIB_USEDEP}]
-	)
-	alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
-	capi? ( net-libs/libcapi:=[${MULTILIB_USEDEP}] )
-	gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
-	gstreamer? (
-		dev-libs/glib:2[${MULTILIB_USEDEP}]
-		media-libs/gst-plugins-base:1.0[${MULTILIB_USEDEP}]
-		media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
-	)
-	ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
-	openal? ( media-libs/openal[${MULTILIB_USEDEP}] )
-	opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
-	pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
-	pulseaudio? ( media-libs/libpulse[${MULTILIB_USEDEP}] )
-	scanner? ( media-gfx/sane-backends[${MULTILIB_USEDEP}] )
-	udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
-	unwind? (
-		llvm-libunwind? ( sys-libs/llvm-libunwind[${MULTILIB_USEDEP}] )
-		!llvm-libunwind? ( sys-libs/libunwind:=[${MULTILIB_USEDEP}] )
-	)
-	usb? ( dev-libs/libusb:1[${MULTILIB_USEDEP}] )"
-RDEPEND="
-	${WINE_COMMON_DEPEND}
-	app-emulation/wine-desktop-common
-	dos? ( games-emulation/dosbox )
-	gecko? ( app-emulation/wine-gecko:${WINE_GECKO}[${MULTILIB_USEDEP}] )
-	gstreamer? ( media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] )
-	mono? ( app-emulation/wine-mono:${WINE_MONO} )
-	perl? (
-		dev-lang/perl
-		dev-perl/XML-LibXML
-	)
-	samba? ( net-fs/samba[winbind] )
-	selinux? ( sec-policy/selinux-wine )
-	udisks? ( sys-fs/udisks:2 )"
-DEPEND="
-	${WINE_COMMON_DEPEND}
-	sys-kernel/linux-headers
-	X? ( x11-base/xorg-proto )"
-BDEPEND="
-	dev-lang/perl
-	sys-devel/binutils
-	sys-devel/bison
-	sys-devel/flex
-	virtual/pkgconfig
-	mingw? ( !crossdev-mingw? ( dev-util/mingw64-toolchain[${MULTILIB_USEDEP}] ) )
-	nls? ( sys-devel/gettext )"
-IDEPEND=">=app-eselect/eselect-wine-2"
-
-QA_TEXTRELS="usr/lib/*/wine/i386-unix/*.so" # uses -fno-PIC -Wl,-z,notext
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-7.0-noexecstack.patch
-	"${FILESDIR}"/${PN}-7.20-unwind.patch
-)
-
-pkg_pretend() {
-	[[ ${MERGE_TYPE} == binary ]] && return
-
-	if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then
-		local mingw=-w64-mingw32
-		for mingw in $(usev abi_x86_64 x86_64${mingw}) $(usev abi_x86_32 i686${mingw}); do
-			if ! type -P ${mingw}-gcc >/dev/null; then
-				eerror "With USE=crossdev-mingw, you must prepare the MinGW toolchain"
-				eerror "yourself by installing sys-devel/crossdev then running:"
-				eerror
-				eerror "    crossdev --target ${mingw}"
-				eerror
-				eerror "For more information, please see: https://wiki.gentoo.org/wiki/Mingw"
-				die "USE=crossdev-mingw is enabled, but ${mingw}-gcc was not found"
-			fi
-		done
-	fi
-}
-
-src_prepare() {
-	# sanity check, bumping these has a history of oversights
-	local geckomono=$(sed -En '/^#define (GECKO|MONO)_VER/{s/[^0-9.]//gp}' \
-		dlls/appwiz.cpl/addons.c || die)
-	if [[ ${WINE_GECKO}$'\n'${WINE_MONO} != "${geckomono}" ]]; then
-		local gmfatal=
-		[[ ${PV} == *9999 ]] && gmfatal=nonfatal
-		${gmfatal} die -n "gecko/mono mismatch in ebuild, has: " ${geckomono} " (please file a bug)"
-	fi
-
-	default
-
-	# ensure .desktop calls this variant + slot
-	sed -i "/^Exec=/s/wine /${P} /" loader/wine.desktop || die
-
-	# always update for patches (including user's wrt #432348)
-	eautoreconf
-	tools/make_requests || die # perl
-}
-
-src_configure() {
-	WINE_PREFIX=/usr/lib/${P}
-	WINE_DATADIR=/usr/share/${P}
-
-	local conf=(
-		--prefix="${EPREFIX}"${WINE_PREFIX}
-		--datadir="${EPREFIX}"${WINE_DATADIR}
-		--includedir="${EPREFIX}"/usr/include/${P}
-		--libdir="${EPREFIX}"${WINE_PREFIX}
-		--mandir="${EPREFIX}"${WINE_DATADIR}/man
-		$(use_enable gecko mshtml)
-		$(use_enable mono mscoree)
-		--disable-tests
-		$(use_with X x)
-		$(use_with alsa)
-		$(use_with capi)
-		$(use_with cups)
-		$(use_with fontconfig)
-		$(use_with gphoto2 gphoto)
-		$(use_with gstreamer)
-		$(use_with kerberos gssapi)
-		$(use_with kerberos krb5)
-		$(use_with ldap)
-		$(use_with mingw)
-		$(use_with netapi)
-		$(use_with nls gettext)
-		$(use_with openal)
-		$(use_with opencl)
-		$(use_with opengl)
-		$(use_with osmesa)
-		--without-oss # media-sound/oss is not packaged (OSSv4)
-		$(use_with pcap)
-		$(use_with pulseaudio pulse)
-		$(use_with scanner sane)
-		$(use_with sdl)
-		$(use_with ssl gnutls)
-		$(use_with truetype freetype)
-		$(use_with udev)
-		$(use_with udisks dbus) # dbus is only used for udisks
-		$(use_with unwind)
-		$(use_with usb)
-		$(use_with v4l v4l2)
-		$(use_with vulkan)
-		$(use_with xcomposite)
-		$(use_with xinerama)
-		$(usev !odbc ac_cv_lib_soname_odbc=)
-	)
-
-	tc-ld-force-bfd # builds with non-bfd but broken at runtime (bug #867097)
-	filter-lto # build failure
-	use mingw || filter-flags -fno-plt # build failure
-	use custom-cflags || strip-flags # can break in obscure ways at runtime
-	use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH}
-
-	# temporary workaround for tc-ld-force-bfd not yet enforcing with mold
-	# https://github.com/gentoo/gentoo/pull/28355
-	[[ $($(tc-getCC) ${LDFLAGS} -Wl,--version 2>/dev/null) == mold* ]] &&
-		append-ldflags -fuse-ld=bfd
-
-	# build using upstream's way (--with-wine64)
-	# order matters: configure+compile 64->32, install 32->64
-	local -i bits
-	for bits in $(usev abi_x86_64 64) $(usev abi_x86_32 32); do
-	(
-		einfo "Configuring ${PN} for ${bits}bits in ${WORKDIR}/build${bits} ..."
-
-		mkdir ../build${bits} || die
-		cd ../build${bits} || die
-
-		# CROSSCC_amd64/x86 are unused by Wine, but recognized here for users
-		if (( bits == 64 )); then
-			: "${CROSSCC:=${CROSSCC_amd64:-x86_64-w64-mingw32-gcc}}"
-			conf+=( --enable-win64 )
-		elif use amd64; then
-			conf+=(
-				$(usev abi_x86_64 --with-wine64=../build64)
-				TARGETFLAGS=-m32 # for widl
-			)
-			# _setup is optional, but use over Wine's auto-detect (+#472038)
-			multilib_toolchain_setup x86
-		fi
-		: "${CROSSCC:=${CROSSCC_x86:-i686-w64-mingw32-gcc}}"
-
-		# use *FLAGS for mingw, but strip unsupported (e.g. --hash-style=gnu)
-		if use mingw; then
-			: "${CROSSCFLAGS:=$(
-				filter-flags '-fstack-clash-protection' #758914
-				filter-flags '-fstack-protector*' #870136
-				filter-flags '-mfunction-return=thunk*' #878849
-				CC=${CROSSCC} test-flags-CC ${CFLAGS:--O2})}"
-			: "${CROSSLDFLAGS:=$(
-				filter-flags '-fuse-ld=*'
-				CC=${CROSSCC} test-flags-CCLD ${LDFLAGS})}"
-			export CROSS{CC,{C,LD}FLAGS}
-		fi
-
-		ECONF_SOURCE=${S} econf "${conf[@]}"
-	)
-	done
-}
-
-src_compile() {
-	use abi_x86_64 && emake -C ../build64 # do first
-	use abi_x86_32 && emake -C ../build32
-}
-
-src_install() {
-	use abi_x86_32 && emake DESTDIR="${D}" -C ../build32 install
-	use abi_x86_64 && emake DESTDIR="${D}" -C ../build64 install # do last
-
-	# symlink for plain 'wine' and install its man pages if 64bit-only #404331
-	if use abi_x86_64 && use !abi_x86_32; then
-		dosym wine64 ${WINE_PREFIX}/bin/wine
-		dosym wine64-preloader ${WINE_PREFIX}/bin/wine-preloader
-		local man
-		for man in ../build64/loader/wine.*man; do
-			: "${man##*/wine}"
-			: "${_%.*}"
-			insinto ${WINE_DATADIR}/man/${_:+${_#.}/}man1
-			newins ${man} wine.1
-		done
-	fi
-
-	use perl || rm "${ED}"${WINE_DATADIR}/man/man1/wine{dump,maker}.1 \
-		"${ED}"${WINE_PREFIX}/bin/{function_grep.pl,wine{dump,maker}} || die
-
-	# create variant wrappers for eselect-wine
-	local bin
-	for bin in "${ED}"${WINE_PREFIX}/bin/*; do
-		make_wrapper "${bin##*/}-${P#wine-}" "${bin#"${ED}"}"
-	done
-
-	# don't let portage try to strip PE files with the wrong
-	# strip executable and instead handle it here (saves ~120MB)
-	if use mingw; then
-		dostrip -x ${WINE_PREFIX}/wine/{i386,x86_64}-windows
-		use debug ||
-			find "${ED}"${WINE_PREFIX}/wine/*-windows -regex '.*\.\(a\|dll\|exe\)' \
-				-exec $(usex abi_x86_64 x86_64 i686)-w64-mingw32-strip --strip-unneeded {} + || die
-	fi
-
-	dodoc ANNOUNCE AUTHORS README* documentation/README*
-}
-
-pkg_postinst() {
-	eselect wine update --if-unset || die
-}
-
-pkg_postrm() {
-	eselect wine update --if-unset || die
-}

diff --git a/app-emulation/wine-vanilla/wine-vanilla-7.21-r1.ebuild b/app-emulation/wine-vanilla/wine-vanilla-7.21-r1.ebuild
deleted file mode 100644
index ed18a224f6b5..000000000000
--- a/app-emulation/wine-vanilla/wine-vanilla-7.21-r1.ebuild
+++ /dev/null
@@ -1,328 +0,0 @@
-# Copyright 2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-MULTILIB_COMPAT=( abi_x86_{32,64} )
-inherit autotools flag-o-matic multilib multilib-build toolchain-funcs wrapper
-
-WINE_GECKO=2.47.3
-WINE_MONO=7.4.0
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	EGIT_REPO_URI="https://gitlab.winehq.org/wine/wine.git"
-else
-	(( $(ver_cut 2) )) && WINE_SDIR=$(ver_cut 1).x || WINE_SDIR=$(ver_cut 1).0
-	SRC_URI="https://dl.winehq.org/wine/source/${WINE_SDIR}/wine-${PV}.tar.xz"
-	S="${WORKDIR}/wine-${PV}"
-	KEYWORDS="-* ~amd64 ~x86"
-fi
-
-DESCRIPTION="Free implementation of Windows(tm) on Unix, without external patchsets"
-HOMEPAGE="
-	https://www.winehq.org/
-	https://gitlab.winehq.org/wine/wine/"
-
-LICENSE="LGPL-2.1+ BSD-2 IJG MIT ZLIB gsm libpng2 libtiff"
-SLOT="${PV}"
-IUSE="
-	+X +abi_x86_32 +abi_x86_64 +alsa capi crossdev-mingw cups dos
-	llvm-libunwind debug custom-cflags +fontconfig +gecko gphoto2
-	+gstreamer kerberos ldap +mingw +mono netapi nls odbc opencl
-	+opengl osmesa pcap perl pulseaudio samba scanner +sdl selinux
-	+ssl +truetype udev udisks +unwind usb v4l +vulkan +xcomposite
-	xinerama"
-REQUIRED_USE="
-	X? ( truetype )
-	crossdev-mingw? ( mingw )" # bug #551124 for truetype
-
-# tests are non-trivial to run, can hang easily, don't play well with
-# sandbox, and several need real opengl/vulkan or network access
-RESTRICT="test"
-
-# `grep WINE_CHECK_SONAME configure.ac` + if not directly linked
-WINE_DLOPEN_DEPEND="
-	X? (
-		x11-libs/libXcursor[${MULTILIB_USEDEP}]
-		x11-libs/libXfixes[${MULTILIB_USEDEP}]
-		x11-libs/libXi[${MULTILIB_USEDEP}]
-		x11-libs/libXrandr[${MULTILIB_USEDEP}]
-		x11-libs/libXrender[${MULTILIB_USEDEP}]
-		x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
-		opengl? (
-			media-libs/libglvnd[X,${MULTILIB_USEDEP}]
-			osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
-		)
-		xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
-		xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
-	)
-	cups? ( net-print/cups[${MULTILIB_USEDEP}] )
-	fontconfig? ( media-libs/fontconfig[${MULTILIB_USEDEP}] )
-	kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
-	netapi? ( net-fs/samba[${MULTILIB_USEDEP}] )
-	odbc? ( dev-db/unixODBC[${MULTILIB_USEDEP}] )
-	sdl? ( media-libs/libsdl2[haptic,joystick,${MULTILIB_USEDEP}] )
-	ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
-	truetype? ( media-libs/freetype[${MULTILIB_USEDEP}] )
-	udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
-	v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
-	vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] )"
-WINE_COMMON_DEPEND="
-	${WINE_DLOPEN_DEPEND}
-	X? (
-		x11-libs/libX11[${MULTILIB_USEDEP}]
-		x11-libs/libXext[${MULTILIB_USEDEP}]
-	)
-	alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
-	capi? ( net-libs/libcapi:=[${MULTILIB_USEDEP}] )
-	gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
-	gstreamer? (
-		dev-libs/glib:2[${MULTILIB_USEDEP}]
-		media-libs/gst-plugins-base:1.0[${MULTILIB_USEDEP}]
-		media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
-	)
-	ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
-	opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
-	pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
-	pulseaudio? ( media-libs/libpulse[${MULTILIB_USEDEP}] )
-	scanner? ( media-gfx/sane-backends[${MULTILIB_USEDEP}] )
-	udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
-	unwind? (
-		llvm-libunwind? ( sys-libs/llvm-libunwind[${MULTILIB_USEDEP}] )
-		!llvm-libunwind? ( sys-libs/libunwind:=[${MULTILIB_USEDEP}] )
-	)
-	usb? ( dev-libs/libusb:1[${MULTILIB_USEDEP}] )"
-RDEPEND="
-	${WINE_COMMON_DEPEND}
-	app-emulation/wine-desktop-common
-	dos? ( games-emulation/dosbox )
-	gecko? ( app-emulation/wine-gecko:${WINE_GECKO}[${MULTILIB_USEDEP}] )
-	gstreamer? ( media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] )
-	mono? ( app-emulation/wine-mono:${WINE_MONO} )
-	perl? (
-		dev-lang/perl
-		dev-perl/XML-LibXML
-	)
-	samba? ( net-fs/samba[winbind] )
-	selinux? ( sec-policy/selinux-wine )
-	udisks? ( sys-fs/udisks:2 )"
-DEPEND="
-	${WINE_COMMON_DEPEND}
-	sys-kernel/linux-headers
-	X? ( x11-base/xorg-proto )"
-BDEPEND="
-	dev-lang/perl
-	sys-devel/binutils
-	sys-devel/bison
-	sys-devel/flex
-	virtual/pkgconfig
-	mingw? ( !crossdev-mingw? (
-		>=dev-util/mingw64-toolchain-10.0.0_p1-r2[${MULTILIB_USEDEP}]
-	) )
-	nls? ( sys-devel/gettext )"
-IDEPEND=">=app-eselect/eselect-wine-2"
-
-QA_TEXTRELS="usr/lib/*/wine/i386-unix/*.so" # uses -fno-PIC -Wl,-z,notext
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-7.0-noexecstack.patch
-	"${FILESDIR}"/${PN}-7.20-unwind.patch
-	"${FILESDIR}"/${P}-crossflags.patch
-	"${FILESDIR}"/${P}-opengl32.patch
-)
-
-pkg_pretend() {
-	[[ ${MERGE_TYPE} == binary ]] && return
-
-	if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then
-		local mingw=-w64-mingw32
-		for mingw in $(usev abi_x86_64 x86_64${mingw}) $(usev abi_x86_32 i686${mingw}); do
-			if ! type -P ${mingw}-gcc >/dev/null; then
-				eerror "With USE=crossdev-mingw, you must prepare the MinGW toolchain"
-				eerror "yourself by installing sys-devel/crossdev then running:"
-				eerror
-				eerror "    crossdev --target ${mingw}"
-				eerror
-				eerror "For more information, please see: https://wiki.gentoo.org/wiki/Mingw"
-				die "USE=crossdev-mingw is enabled, but ${mingw}-gcc was not found"
-			fi
-		done
-	fi
-}
-
-src_prepare() {
-	# sanity check, bumping these has a history of oversights
-	local geckomono=$(sed -En '/^#define (GECKO|MONO)_VER/{s/[^0-9.]//gp}' \
-		dlls/appwiz.cpl/addons.c || die)
-	if [[ ${WINE_GECKO}$'\n'${WINE_MONO} != "${geckomono}" ]]; then
-		local gmfatal=
-		[[ ${PV} == *9999 ]] && gmfatal=nonfatal
-		${gmfatal} die -n "gecko/mono mismatch in ebuild, has: " ${geckomono} " (please file a bug)"
-	fi
-
-	default
-
-	# ensure .desktop calls this variant + slot
-	sed -i "/^Exec=/s/wine /${P} /" loader/wine.desktop || die
-
-	# always update for patches (including user's wrt #432348)
-	eautoreconf
-	tools/make_requests || die # perl
-}
-
-src_configure() {
-	WINE_PREFIX=/usr/lib/${P}
-	WINE_DATADIR=/usr/share/${P}
-
-	local conf=(
-		--prefix="${EPREFIX}"${WINE_PREFIX}
-		--datadir="${EPREFIX}"${WINE_DATADIR}
-		--includedir="${EPREFIX}"/usr/include/${P}
-		--libdir="${EPREFIX}"${WINE_PREFIX}
-		--mandir="${EPREFIX}"${WINE_DATADIR}/man
-		$(use_enable gecko mshtml)
-		$(use_enable mono mscoree)
-		--disable-tests
-		$(use_with X x)
-		$(use_with alsa)
-		$(use_with capi)
-		$(use_with cups)
-		$(use_with fontconfig)
-		$(use_with gphoto2 gphoto)
-		$(use_with gstreamer)
-		$(use_with kerberos gssapi)
-		$(use_with kerberos krb5)
-		$(use_with ldap)
-		$(use_with mingw)
-		$(use_with netapi)
-		$(use_with nls gettext)
-		$(use_with opencl)
-		$(use_with opengl)
-		$(use_with osmesa)
-		--without-oss # media-sound/oss is not packaged (OSSv4)
-		$(use_with pcap)
-		$(use_with pulseaudio pulse)
-		$(use_with scanner sane)
-		$(use_with sdl)
-		$(use_with ssl gnutls)
-		$(use_with truetype freetype)
-		$(use_with udev)
-		$(use_with udisks dbus) # dbus is only used for udisks
-		$(use_with unwind)
-		$(use_with usb)
-		$(use_with v4l v4l2)
-		$(use_with vulkan)
-		$(use_with xcomposite)
-		$(use_with xinerama)
-		$(usev !odbc ac_cv_lib_soname_odbc=)
-	)
-
-	tc-ld-force-bfd # builds with non-bfd but broken at runtime (bug #867097)
-	filter-lto # build failure
-	use mingw || filter-flags -fno-plt # build failure
-	use custom-cflags || strip-flags # can break in obscure ways at runtime
-	use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH}
-
-	# temporary workaround for tc-ld-force-bfd not yet enforcing with mold
-	# https://github.com/gentoo/gentoo/pull/28355
-	[[ $($(tc-getCC) ${LDFLAGS} -Wl,--version 2>/dev/null) == mold* ]] &&
-		append-ldflags -fuse-ld=bfd
-
-	# build using upstream's way (--with-wine64)
-	# order matters: configure+compile 64->32, install 32->64
-	local -i bits
-	for bits in $(usev abi_x86_64 64) $(usev abi_x86_32 32); do
-	(
-		einfo "Configuring ${PN} for ${bits}bits in ${WORKDIR}/build${bits} ..."
-
-		mkdir ../build${bits} || die
-		cd ../build${bits} || die
-
-		pe_arch=i386
-		if (( bits == 64 )); then
-			pe_arch=x86_64
-			: "${CROSSCC:=${CROSSCC_amd64:-x86_64-w64-mingw32-gcc}}"
-			conf+=( --enable-win64 )
-		elif use amd64; then
-			conf+=(
-				$(usev abi_x86_64 --with-wine64=../build64)
-				TARGETFLAGS=-m32 # for widl
-			)
-			# _setup is optional, but use over Wine's auto-detect (+#472038)
-			multilib_toolchain_setup x86
-		fi
-		: "${CROSSCC:=${CROSSCC_x86:-i686-w64-mingw32-gcc}}"
-
-		if use mingw; then
-			# CROSSCC is no longer recognized by Wine, but still use for now
-			# (future handling for CROSS* variables is subject to changes)
-			conf+=( ac_cv_prog_${pe_arch}_CC="${CROSSCC}" )
-
-			# use *FLAGS for mingw, but strip unsupported
-			: "${CROSSCFLAGS:=$(
-				filter-flags '-fstack-clash-protection' #758914
-				filter-flags '-fstack-protector*' #870136
-				filter-flags '-mfunction-return=thunk*' #878849
-				CC=${CROSSCC} test-flags-CC ${CFLAGS:--O2})}"
-			: "${CROSSLDFLAGS:=$(
-				filter-flags '-fuse-ld=*'
-				CC=${CROSSCC} test-flags-CCLD ${LDFLAGS})}"
-			export CROSS{C,LD}FLAGS
-		fi
-
-		ECONF_SOURCE=${S} econf "${conf[@]}"
-	)
-	done
-}
-
-src_compile() {
-	use abi_x86_64 && emake -C ../build64 # do first
-	use abi_x86_32 && emake -C ../build32
-}
-
-src_install() {
-	use abi_x86_32 && emake DESTDIR="${D}" -C ../build32 install
-	use abi_x86_64 && emake DESTDIR="${D}" -C ../build64 install # do last
-
-	# symlink for plain 'wine' and install its man pages if 64bit-only #404331
-	if use abi_x86_64 && use !abi_x86_32; then
-		dosym wine64 ${WINE_PREFIX}/bin/wine
-		dosym wine64-preloader ${WINE_PREFIX}/bin/wine-preloader
-		local man
-		for man in ../build64/loader/wine.*man; do
-			: "${man##*/wine}"
-			: "${_%.*}"
-			insinto ${WINE_DATADIR}/man/${_:+${_#.}/}man1
-			newins ${man} wine.1
-		done
-	fi
-
-	use perl || rm "${ED}"${WINE_DATADIR}/man/man1/wine{dump,maker}.1 \
-		"${ED}"${WINE_PREFIX}/bin/{function_grep.pl,wine{dump,maker}} || die
-
-	# create variant wrappers for eselect-wine
-	local bin
-	for bin in "${ED}"${WINE_PREFIX}/bin/*; do
-		make_wrapper "${bin##*/}-${P#wine-}" "${bin#"${ED}"}"
-	done
-
-	# don't let portage try to strip PE files with the wrong
-	# strip executable and instead handle it here (saves ~120MB)
-	if use mingw; then
-		dostrip -x ${WINE_PREFIX}/wine/{i386,x86_64}-windows
-		use debug ||
-			find "${ED}"${WINE_PREFIX}/wine/*-windows -regex '.*\.\(a\|dll\|exe\)' \
-				-exec $(usex abi_x86_64 x86_64 i686)-w64-mingw32-strip --strip-unneeded {} + || die
-	fi
-
-	dodoc ANNOUNCE AUTHORS README* documentation/README*
-}
-
-pkg_postinst() {
-	eselect wine update --if-unset || die
-}
-
-pkg_postrm() {
-	eselect wine update --if-unset || die
-}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/wine-vanilla/files/, app-emulation/wine-vanilla/
@ 2024-04-22 20:31 Ionen Wolkens
  0 siblings, 0 replies; 8+ messages in thread
From: Ionen Wolkens @ 2024-04-22 20:31 UTC (permalink / raw
  To: gentoo-commits

commit:     a643ce8077a65161bca4fd43bd59e9f609fcca9d
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 22 15:49:13 2024 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Mon Apr 22 20:31:12 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a643ce80

app-emulation/wine-vanilla: drop 9.3, 9.4

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 app-emulation/wine-vanilla/Manifest                |   2 -
 .../files/wine-vanilla-9.4-wayland-egl.patch       |  16 -
 app-emulation/wine-vanilla/wine-vanilla-9.3.ebuild | 430 --------------------
 app-emulation/wine-vanilla/wine-vanilla-9.4.ebuild | 431 ---------------------
 4 files changed, 879 deletions(-)

diff --git a/app-emulation/wine-vanilla/Manifest b/app-emulation/wine-vanilla/Manifest
index ffcd3c5ace1e..cac10378d68e 100644
--- a/app-emulation/wine-vanilla/Manifest
+++ b/app-emulation/wine-vanilla/Manifest
@@ -1,8 +1,6 @@
 DIST wine-7.0.2.tar.xz 27179980 BLAKE2B 721ab574092638b32d3a483b6ae3def0c9d706cc888662ca461ab8c7060b10077e83cede69663ea2a8b97729f3801209fbba5f8e8828ce20454700ffbbd76cb5 SHA512 330c71005a6a8054b5068ac4484e9015e9f8bf55d5a451aaf5f79b7f78a025732b454251c31473abf21504cce3b78e50cf7e3e0d0116bb755dc8396bd790289a
 DIST wine-8.0.2.tar.xz 29060452 BLAKE2B dcffaba6c90c4e02a7bc591a81e11aced06c006370c4c316c8a367b2f5814926063482959fabfe9d674ee1b5a560e59087e9b711e28360ced3aee2bbd6bb8fdb SHA512 e86dd31247d757d48ffb2d24f20edab3fc6ef9c3e395567a7b363951bb681335ba3adb8b84639011b24b6eb274582d56880298d6d95fb100acc072383d4e973f
 DIST wine-9.0.tar.xz 30007216 BLAKE2B cf53177201a2f7eeb35d0d8ce220f80808d979099a928ad60652d1dee92620c433cc105dffab4e9309f41766087ad1544ef49d2922538bb420d62f6dd64117a1 SHA512 838daf2c4581f83f8573b988036f517d57b84894b090a2a17433255d6d044dfa880e6724cdb83082a36c333df9d2083ab68ae53927622a620edd59f33462ada4
-DIST wine-9.3.tar.xz 30098792 BLAKE2B fa6f0c73f0886918b035557a37c0553feeea5692ae15e8d67fc4360c59c1bbab9f7f93e58ae29a41800da50b961b49957cf2d060d6b5da34bd956bf7cb3e5fab SHA512 3d75a0e1360765aca453d120e1f47fb50716119f3cab2be1176003a19bba31a6affae4a845840ce52665d97e0edd46dc78a13462d6d6a7e861cd970a0a3d4d1d
-DIST wine-9.4.tar.xz 30166096 BLAKE2B bd65086e6f6e11bc6c7cd65dba6e6997911851f1a2f25cad0b4f8100d695df3c76b0799768ab9047dfd5d8afc7c749a5e5c88003d2f4ca69f417387cc06d527d SHA512 fbc927b04f75fe48e52efb6599ffc84f27f1a08d180386e782c94b37b54ab2a3540ed6cd387d7a59f5aca4df2c9ac3e3c127c3067c16e2357e57b4b0a0ced99d
 DIST wine-9.5.tar.xz 30371420 BLAKE2B c14ebf02f0f5b91bc2b2517ff3630f22c6af7fdc827c5d024d809a383a65446284a5349c8109835112f5353f361088f4f32de1a3d04299fbf39deacbc0e8e8bf SHA512 8ccad8f6e6b1428886dee9fae771796e2021b4122cd96464350352bede25421406e6a6a0fdd63d8b99b896db8dc529aa6e05d6ac7966bee49ce3055b18a8af91
 DIST wine-9.6.tar.xz 30261488 BLAKE2B 53115a8a80593856679718b2055340860221701bc82a784a111a992f5e67b031d7407a16f6df6d4da67f382f30c35d2dd82af2a671a058a76b621c91199e426e SHA512 cc2ea5597636da8d392d1d63b9c135679eff69ea671dc6b53b6f2d44a890aee0e17275174485f6e8dd99c7db737eb82a800a2b05c4966f15e28167c5a6098922
 DIST wine-9.7.tar.xz 30281616 BLAKE2B 4d27f6f2dfd088a0590bfce7228c7eca25b66a9a04706ddecb25af6364e83100c15a78c8d46f3294a42dc7f3503756506f752a02d7058a72ce16716994b334bc SHA512 0c15c3a0901162a386126f2dc987b276b379cc027fc72d9e31cf3122614742f876f30a5f24a495f546cd9c5bd5efce096bd9ca190d0f378fea3d42a298a06e80

diff --git a/app-emulation/wine-vanilla/files/wine-vanilla-9.4-wayland-egl.patch b/app-emulation/wine-vanilla/files/wine-vanilla-9.4-wayland-egl.patch
deleted file mode 100644
index 0c6f8084f480..000000000000
--- a/app-emulation/wine-vanilla/files/wine-vanilla-9.4-wayland-egl.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Unsure how this check is supposed to work, HAVE_LIBWAYLAND_EGL is never set
-as a variable but rather output as a "#define" line. Assume been last minute
-upstream oversight.
-
-We check the requirements from the ebuild itself, so let's just drop the check
-as a quick fix for now. Assume that it will be fixed in wine-9.5.
---- a/configure.ac
-+++ b/configure.ac
-@@ -1392,7 +1392,2 @@
-                   [WAYLAND_EGL_LIBS=""],[$WAYLAND_EGL_LIBS])])])
--        if test "x$with_wayland" != "x"
--        then
--            WINE_NOTICE_WITH(opengl, [test -z "$ac_cv_lib_soname_EGL" -o -z "$HAVE_LIBWAYLAND_EGL"],
--                [EGL ${notice_platform}development files not found, the Wayland driver won't support OpenGL])
--        fi
-     fi

diff --git a/app-emulation/wine-vanilla/wine-vanilla-9.3.ebuild b/app-emulation/wine-vanilla/wine-vanilla-9.3.ebuild
deleted file mode 100644
index 162e8b9a993c..000000000000
--- a/app-emulation/wine-vanilla/wine-vanilla-9.3.ebuild
+++ /dev/null
@@ -1,430 +0,0 @@
-# Copyright 2022-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-MULTILIB_COMPAT=( abi_x86_{32,64} )
-inherit autotools flag-o-matic multilib multilib-build optfeature
-inherit prefix toolchain-funcs wrapper
-
-WINE_GECKO=2.47.4
-WINE_MONO=9.0.0
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	EGIT_REPO_URI="https://gitlab.winehq.org/wine/wine.git"
-else
-	(( $(ver_cut 2) )) && WINE_SDIR=$(ver_cut 1).x || WINE_SDIR=$(ver_cut 1).0
-	SRC_URI="https://dl.winehq.org/wine/source/${WINE_SDIR}/wine-${PV}.tar.xz"
-	S="${WORKDIR}/wine-${PV}"
-	KEYWORDS="-* ~amd64 ~x86"
-fi
-
-DESCRIPTION="Free implementation of Windows(tm) on Unix, without external patchsets"
-HOMEPAGE="
-	https://www.winehq.org/
-	https://gitlab.winehq.org/wine/wine/
-"
-
-LICENSE="LGPL-2.1+ BSD-2 IJG MIT OPENLDAP ZLIB gsm libpng2 libtiff"
-SLOT="${PV}"
-IUSE="
-	+X +abi_x86_32 +abi_x86_64 +alsa capi crossdev-mingw cups dos
-	llvm-libunwind custom-cflags +fontconfig +gecko gphoto2 +gstreamer
-	kerberos +mingw +mono netapi nls odbc opencl +opengl osmesa pcap
-	perl pulseaudio samba scanner +sdl selinux smartcard +ssl +strip
-	+truetype udev udisks +unwind usb v4l +vulkan wayland wow64
-	+xcomposite xinerama"
-# bug #551124 for truetype
-# TODO?: wow64 can be done without mingw if using clang (needs bug #912237)
-REQUIRED_USE="
-	X? ( truetype )
-	crossdev-mingw? ( mingw )
-	wow64? ( abi_x86_64 !abi_x86_32 mingw )
-"
-
-# tests are non-trivial to run, can hang easily, don't play well with
-# sandbox, and several need real opengl/vulkan or network access
-RESTRICT="test"
-
-# `grep WINE_CHECK_SONAME configure.ac` + if not directly linked
-WINE_DLOPEN_DEPEND="
-	X? (
-		x11-libs/libXcursor[${MULTILIB_USEDEP}]
-		x11-libs/libXfixes[${MULTILIB_USEDEP}]
-		x11-libs/libXi[${MULTILIB_USEDEP}]
-		x11-libs/libXrandr[${MULTILIB_USEDEP}]
-		x11-libs/libXrender[${MULTILIB_USEDEP}]
-		x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
-		opengl? (
-			media-libs/libglvnd[X,${MULTILIB_USEDEP}]
-			osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
-		)
-		xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
-		xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
-	)
-	cups? ( net-print/cups[${MULTILIB_USEDEP}] )
-	fontconfig? ( media-libs/fontconfig[${MULTILIB_USEDEP}] )
-	kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
-	netapi? ( net-fs/samba[${MULTILIB_USEDEP}] )
-	odbc? ( dev-db/unixODBC[${MULTILIB_USEDEP}] )
-	sdl? ( media-libs/libsdl2[haptic,joystick,${MULTILIB_USEDEP}] )
-	ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
-	truetype? ( media-libs/freetype[${MULTILIB_USEDEP}] )
-	udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
-	v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
-	vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] )
-"
-WINE_COMMON_DEPEND="
-	${WINE_DLOPEN_DEPEND}
-	X? (
-		x11-libs/libX11[${MULTILIB_USEDEP}]
-		x11-libs/libXext[${MULTILIB_USEDEP}]
-	)
-	alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
-	capi? ( net-libs/libcapi:=[${MULTILIB_USEDEP}] )
-	gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
-	gstreamer? (
-		dev-libs/glib:2[${MULTILIB_USEDEP}]
-		media-libs/gst-plugins-base:1.0[${MULTILIB_USEDEP}]
-		media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
-	)
-	opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
-	pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
-	pulseaudio? ( media-libs/libpulse[${MULTILIB_USEDEP}] )
-	scanner? ( media-gfx/sane-backends[${MULTILIB_USEDEP}] )
-	smartcard? ( sys-apps/pcsc-lite[${MULTILIB_USEDEP}] )
-	udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
-	unwind? (
-		llvm-libunwind? ( sys-libs/llvm-libunwind[${MULTILIB_USEDEP}] )
-		!llvm-libunwind? ( sys-libs/libunwind:=[${MULTILIB_USEDEP}] )
-	)
-	usb? ( dev-libs/libusb:1[${MULTILIB_USEDEP}] )
-	wayland? (
-		dev-libs/wayland[${MULTILIB_USEDEP}]
-		x11-libs/libxkbcommon[${MULTILIB_USEDEP}]
-	)
-"
-RDEPEND="
-	${WINE_COMMON_DEPEND}
-	app-emulation/wine-desktop-common
-	dos? (
-		|| (
-			games-emulation/dosbox
-			games-emulation/dosbox-staging
-		)
-	)
-	gecko? (
-		app-emulation/wine-gecko:${WINE_GECKO}[${MULTILIB_USEDEP}]
-		wow64? ( app-emulation/wine-gecko[abi_x86_32] )
-	)
-	gstreamer? ( media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] )
-	mono? ( app-emulation/wine-mono:${WINE_MONO} )
-	perl? (
-		dev-lang/perl
-		dev-perl/XML-LibXML
-	)
-	samba? ( net-fs/samba[winbind] )
-	selinux? ( sec-policy/selinux-wine )
-	udisks? ( sys-fs/udisks:2 )
-"
-DEPEND="
-	${WINE_COMMON_DEPEND}
-	sys-kernel/linux-headers
-	X? ( x11-base/xorg-proto )
-"
-BDEPEND="
-	|| (
-		sys-devel/binutils
-		sys-devel/lld
-	)
-	dev-lang/perl
-	sys-devel/bison
-	sys-devel/flex
-	virtual/pkgconfig
-	mingw? ( !crossdev-mingw? (
-		>=dev-util/mingw64-toolchain-10.0.0_p1-r2[${MULTILIB_USEDEP}]
-		wow64? ( dev-util/mingw64-toolchain[abi_x86_32] )
-	) )
-	nls? ( sys-devel/gettext )
-	wayland? ( dev-util/wayland-scanner )
-"
-IDEPEND=">=app-eselect/eselect-wine-2"
-
-QA_CONFIG_IMPL_DECL_SKIP=(
-	__clear_cache # unused on amd64+x86 (bug #900338)
-	res_getservers # false positive
-)
-QA_TEXTRELS="usr/lib/*/wine/i386-unix/*.so" # uses -fno-PIC -Wl,-z,notext
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-7.0-noexecstack.patch
-	"${FILESDIR}"/${PN}-7.20-unwind.patch
-	"${FILESDIR}"/${PN}-8.13-rpath.patch
-)
-
-pkg_pretend() {
-	[[ ${MERGE_TYPE} == binary ]] && return
-
-	if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then
-		local mingw=-w64-mingw32
-		for mingw in $(usev abi_x86_64 x86_64${mingw}) \
-			$(use abi_x86_32 || use wow64 && echo i686${mingw}); do
-			if ! type -P ${mingw}-gcc >/dev/null; then
-				eerror "With USE=crossdev-mingw, you must prepare the MinGW toolchain"
-				eerror "yourself by installing sys-devel/crossdev then running:"
-				eerror
-				eerror "    crossdev --target ${mingw}"
-				eerror
-				eerror "For more information, please see: https://wiki.gentoo.org/wiki/Mingw"
-				die "USE=crossdev-mingw is enabled, but ${mingw}-gcc was not found"
-			fi
-		done
-	fi
-}
-
-src_prepare() {
-	# sanity check, bumping these has a history of oversights
-	local geckomono=$(sed -En '/^#define (GECKO|MONO)_VER/{s/[^0-9.]//gp}' \
-		dlls/appwiz.cpl/addons.c || die)
-	if [[ ${WINE_GECKO}$'\n'${WINE_MONO} != "${geckomono}" ]]; then
-		local gmfatal=
-		[[ ${PV} == *9999 ]] && gmfatal=nonfatal
-		${gmfatal} die -n "gecko/mono mismatch in ebuild, has: " ${geckomono} " (please file a bug)"
-	fi
-
-	default
-
-	if tc-is-clang; then
-		if use mingw; then
-			# -mabi=ms was ignored by <clang:16 then turned error in :17
-			# if used without --target *-windows, then gets used in install
-			# phase despite USE=mingw, drop as a quick fix for now
-			sed -i '/MSVCRTFLAGS=/s/-mabi=ms//' configure.ac || die
-		else
-			# fails in ./configure unless --enable-archs is passed, allow to
-			# bypass with EXTRA_ECONF but is currently considered unsupported
-			# (by Gentoo) as additional work is needed for (proper) support
-			# note: also fails w/ :17, but unsure if safe to drop w/o mingw
-			[[ ${EXTRA_ECONF} == *--enable-archs* ]] ||
-				die "building ${PN} with clang is only supported with USE=mingw"
-		fi
-	fi
-
-	# ensure .desktop calls this variant + slot
-	sed -i "/^Exec=/s/wine /${P} /" loader/wine.desktop || die
-
-	# datadir is not where wine-mono is installed, so prefixy alternate paths
-	hprefixify -w /get_mono_path/ dlls/mscoree/metahost.c
-
-	# always update for patches (including user's wrt #432348)
-	eautoreconf
-	tools/make_requests || die # perl
-	# tip: if need more for user patches, with portage can e.g. do
-	# echo "post_src_prepare() { tools/make_specfiles || die; }" \
-	#     > /etc/portage/env/app-emulation/wine-vanilla
-}
-
-src_configure() {
-	WINE_PREFIX=/usr/lib/${P}
-	WINE_DATADIR=/usr/share/${P}
-
-	local conf=(
-		--prefix="${EPREFIX}"${WINE_PREFIX}
-		--datadir="${EPREFIX}"${WINE_DATADIR}
-		--includedir="${EPREFIX}"/usr/include/${P}
-		--libdir="${EPREFIX}"${WINE_PREFIX}
-		--mandir="${EPREFIX}"${WINE_DATADIR}/man
-
-		$(usev wow64 --enable-archs=x86_64,i386)
-
-		$(use_enable gecko mshtml)
-		$(use_enable mono mscoree)
-		--disable-tests
-
-		$(use_with X x)
-		$(use_with alsa)
-		$(use_with capi)
-		$(use_with cups)
-		$(use_with fontconfig)
-		$(use_with gphoto2 gphoto)
-		$(use_with gstreamer)
-		$(use_with kerberos gssapi)
-		$(use_with kerberos krb5)
-		$(use_with mingw)
-		$(use_with netapi)
-		$(use_with nls gettext)
-		$(use_with opencl)
-		$(use_with opengl)
-		$(use_with osmesa)
-		--without-oss # media-sound/oss is not packaged (OSSv4)
-		$(use_with pcap)
-		$(use_with pulseaudio pulse)
-		$(use_with scanner sane)
-		$(use_with sdl)
-		$(use_with smartcard pcsclite)
-		$(use_with ssl gnutls)
-		$(use_with truetype freetype)
-		$(use_with udev)
-		$(use_with udisks dbus) # dbus is only used for udisks
-		$(use_with unwind)
-		$(use_with usb)
-		$(use_with v4l v4l2)
-		$(use_with vulkan)
-		$(use_with wayland)
-		$(use_with xcomposite)
-		$(use_with xinerama)
-		$(usev !odbc ac_cv_lib_soname_odbc=)
-	)
-
-	filter-lto # build failure
-	use custom-cflags || strip-flags # can break in obscure ways at runtime
-
-	# wine uses linker tricks unlikely to work with non-bfd/lld (bug #867097)
-	# (do self test until https://github.com/gentoo/gentoo/pull/28355)
-	if [[ $(LC_ALL=C $(tc-getCC) ${LDFLAGS} -Wl,--version 2>/dev/null) != @(LLD|GNU\ ld)* ]]
-	then
-		has_version -b sys-devel/binutils &&
-			append-ldflags -fuse-ld=bfd ||
-			append-ldflags -fuse-ld=lld
-		strip-unsupported-flags
-	fi
-
-	if use mingw; then
-		use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH}
-
-		# CROSSCC was formerly recognized by wine, thus been using similar
-		# variables (subject to change, esp. if ever make a mingw.eclass).
-		local mingwcc_amd64=${CROSSCC:-${CROSSCC_amd64:-x86_64-w64-mingw32-gcc}}
-		local mingwcc_x86=${CROSSCC:-${CROSSCC_x86:-i686-w64-mingw32-gcc}}
-		local -n mingwcc=mingwcc_$(usex abi_x86_64 amd64 x86)
-
-		conf+=(
-			ac_cv_prog_x86_64_CC="${mingwcc_amd64}"
-			ac_cv_prog_i386_CC="${mingwcc_x86}"
-
-			CROSSCFLAGS="${CROSSCFLAGS:-$(
-				filter-flags '-fstack-protector*' #870136
-				filter-flags '-mfunction-return=thunk*' #878849
-
-				# some bashrc-mv users tend to do CFLAGS="${LDFLAGS}" and then
-				# strip-unsupported-flags miss these during compile-only tests
-				# (primarily done for 23.0 profiles' -z, not full coverage)
-				filter-flags '-Wl,-z,*'
-
-				CC=${mingwcc} test-flags-CC ${CFLAGS:--O2}
-			)}"
-
-			CROSSLDFLAGS="${CROSSLDFLAGS:-$(
-				filter-flags '-fuse-ld=*'
-
-				CC=${mingwcc} test-flags-CCLD ${LDFLAGS}
-			)}"
-		)
-	fi
-
-	# order matters with multilib: configure+compile 64->32, install 32->64
-	local -i bits
-	for bits in $(usev abi_x86_64 64) $(usev abi_x86_32 32); do
-	(
-		einfo "Configuring ${PN} for ${bits}bits in ${WORKDIR}/build${bits} ..."
-
-		mkdir ../build${bits} || die
-		cd ../build${bits} || die
-
-		if (( bits == 64 )); then
-			conf+=( --enable-win64 )
-		elif use amd64; then
-			conf+=(
-				$(usev abi_x86_64 --with-wine64=../build64)
-				TARGETFLAGS=-m32 # for widl
-			)
-			# _setup is optional, but use over Wine's auto-detect (+#472038)
-			multilib_toolchain_setup x86
-		fi
-
-		ECONF_SOURCE=${S} econf "${conf[@]}"
-	)
-	done
-}
-
-src_compile() {
-	use abi_x86_64 && emake -C ../build64 # do first
-	use abi_x86_32 && emake -C ../build32
-}
-
-src_install() {
-	use abi_x86_32 && emake DESTDIR="${D}" -C ../build32 install
-	use abi_x86_64 && emake DESTDIR="${D}" -C ../build64 install # do last
-
-	# Ensure both wine64 and wine are available if USE=abi_x86_64 (wow64,
-	# -abi_x86_32, and/or EXTRA_ECONF could cause varying scenarios where
-	# one or the other could be missing and that is unexpected for users
-	# and some tools like winetricks)
-	if use abi_x86_64; then
-		if [[ -e ${ED}${WINE_PREFIX}/bin/wine64 && ! -e ${ED}${WINE_PREFIX}/bin/wine ]]; then
-			dosym wine64 ${WINE_PREFIX}/bin/wine
-			dosym wine64-preloader ${WINE_PREFIX}/bin/wine-preloader
-
-			# also install wine(1) man pages (incl. translations)
-			local man
-			for man in ../build64/loader/wine.*man; do
-				: "${man##*/wine}"
-				: "${_%.*}"
-				insinto ${WINE_DATADIR}/man/${_:+${_#.}/}man1
-				newins ${man} wine.1
-			done
-		elif [[ ! -e ${ED}${WINE_PREFIX}/bin/wine64 && -e ${ED}${WINE_PREFIX}/bin/wine ]]; then
-			dosym wine ${WINE_PREFIX}/bin/wine64
-			dosym wine-preloader ${WINE_PREFIX}/bin/wine64-preloader
-		fi
-	fi
-
-	use perl || rm "${ED}"${WINE_DATADIR}/man/man1/wine{dump,maker}.1 \
-		"${ED}"${WINE_PREFIX}/bin/{function_grep.pl,wine{dump,maker}} || die
-
-	# create variant wrappers for eselect-wine
-	local bin
-	for bin in "${ED}"${WINE_PREFIX}/bin/*; do
-		make_wrapper "${bin##*/}-${P#wine-}" "${bin#"${ED}"}"
-	done
-
-	if use mingw; then
-		# don't let portage try to strip PE files with the wrong
-		# strip executable and instead handle it here (saves ~120MB)
-		dostrip -x ${WINE_PREFIX}/wine/{i386,x86_64}-windows
-
-		if use strip; then
-			ebegin "Stripping Windows (PE) binaries"
-			find "${ED}"${WINE_PREFIX}/wine/*-windows -regex '.*\.\(a\|dll\|exe\)' \
-				-exec $(usex abi_x86_64 x86_64 i686)-w64-mingw32-strip --strip-unneeded {} +
-			eend ${?} || die
-		fi
-	fi
-
-	dodoc ANNOUNCE* AUTHORS README* documentation/README*
-}
-
-pkg_postinst() {
-	if use !abi_x86_32 && use !wow64; then
-		ewarn "32bit support is disabled. While 64bit applications themselves will"
-		ewarn "work, be warned that it is not unusual that installers or other helpers"
-		ewarn "will attempt to use 32bit and fail. If do not want full USE=abi_x86_32,"
-		ewarn "note the experimental/WIP USE=wow64 can allow 32bit without multilib."
-	elif use abi_x86_32 && { use opengl || use vulkan; } &&
-		has_version 'x11-drivers/nvidia-drivers[-abi_x86_32]'
-	then
-		ewarn "x11-drivers/nvidia-drivers is installed but is built without"
-		ewarn "USE=abi_x86_32 (ABI_X86=32), hardware acceleration with 32bit"
-		ewarn "applications under ${PN} will likely not be usable."
-	fi
-
-	optfeature "/dev/hidraw* access used for *some* controllers (e.g. DualShock4)" \
-		games-util/game-device-udev-rules
-
-	eselect wine update --if-unset || die
-}
-
-pkg_postrm() {
-	eselect wine update --if-unset || die
-}

diff --git a/app-emulation/wine-vanilla/wine-vanilla-9.4.ebuild b/app-emulation/wine-vanilla/wine-vanilla-9.4.ebuild
deleted file mode 100644
index 559d137dd799..000000000000
--- a/app-emulation/wine-vanilla/wine-vanilla-9.4.ebuild
+++ /dev/null
@@ -1,431 +0,0 @@
-# Copyright 2022-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-MULTILIB_COMPAT=( abi_x86_{32,64} )
-inherit autotools flag-o-matic multilib multilib-build optfeature
-inherit prefix toolchain-funcs wrapper
-
-WINE_GECKO=2.47.4
-WINE_MONO=9.0.0
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	EGIT_REPO_URI="https://gitlab.winehq.org/wine/wine.git"
-else
-	(( $(ver_cut 2) )) && WINE_SDIR=$(ver_cut 1).x || WINE_SDIR=$(ver_cut 1).0
-	SRC_URI="https://dl.winehq.org/wine/source/${WINE_SDIR}/wine-${PV}.tar.xz"
-	S="${WORKDIR}/wine-${PV}"
-	KEYWORDS="-* ~amd64 ~x86"
-fi
-
-DESCRIPTION="Free implementation of Windows(tm) on Unix, without external patchsets"
-HOMEPAGE="
-	https://www.winehq.org/
-	https://gitlab.winehq.org/wine/wine/
-"
-
-LICENSE="LGPL-2.1+ BSD-2 IJG MIT OPENLDAP ZLIB gsm libpng2 libtiff"
-SLOT="${PV}"
-IUSE="
-	+X +abi_x86_32 +abi_x86_64 +alsa capi crossdev-mingw cups dos
-	llvm-libunwind custom-cflags +fontconfig +gecko gphoto2 +gstreamer
-	kerberos +mingw +mono netapi nls odbc opencl +opengl osmesa pcap
-	perl pulseaudio samba scanner +sdl selinux smartcard +ssl +strip
-	+truetype udev udisks +unwind usb v4l +vulkan wayland wow64
-	+xcomposite xinerama"
-# bug #551124 for truetype
-# TODO?: wow64 can be done without mingw if using clang (needs bug #912237)
-REQUIRED_USE="
-	X? ( truetype )
-	crossdev-mingw? ( mingw )
-	wow64? ( abi_x86_64 !abi_x86_32 mingw )
-"
-
-# tests are non-trivial to run, can hang easily, don't play well with
-# sandbox, and several need real opengl/vulkan or network access
-RESTRICT="test"
-
-# `grep WINE_CHECK_SONAME configure.ac` + if not directly linked
-WINE_DLOPEN_DEPEND="
-	X? (
-		x11-libs/libXcursor[${MULTILIB_USEDEP}]
-		x11-libs/libXfixes[${MULTILIB_USEDEP}]
-		x11-libs/libXi[${MULTILIB_USEDEP}]
-		x11-libs/libXrandr[${MULTILIB_USEDEP}]
-		x11-libs/libXrender[${MULTILIB_USEDEP}]
-		x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
-		opengl? (
-			media-libs/libglvnd[X,${MULTILIB_USEDEP}]
-			osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
-		)
-		xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
-		xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
-	)
-	cups? ( net-print/cups[${MULTILIB_USEDEP}] )
-	fontconfig? ( media-libs/fontconfig[${MULTILIB_USEDEP}] )
-	kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
-	netapi? ( net-fs/samba[${MULTILIB_USEDEP}] )
-	odbc? ( dev-db/unixODBC[${MULTILIB_USEDEP}] )
-	sdl? ( media-libs/libsdl2[haptic,joystick,${MULTILIB_USEDEP}] )
-	ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
-	truetype? ( media-libs/freetype[${MULTILIB_USEDEP}] )
-	udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
-	v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
-	vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] )
-"
-WINE_COMMON_DEPEND="
-	${WINE_DLOPEN_DEPEND}
-	X? (
-		x11-libs/libX11[${MULTILIB_USEDEP}]
-		x11-libs/libXext[${MULTILIB_USEDEP}]
-	)
-	alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
-	capi? ( net-libs/libcapi:=[${MULTILIB_USEDEP}] )
-	gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
-	gstreamer? (
-		dev-libs/glib:2[${MULTILIB_USEDEP}]
-		media-libs/gst-plugins-base:1.0[${MULTILIB_USEDEP}]
-		media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
-	)
-	opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
-	pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
-	pulseaudio? ( media-libs/libpulse[${MULTILIB_USEDEP}] )
-	scanner? ( media-gfx/sane-backends[${MULTILIB_USEDEP}] )
-	smartcard? ( sys-apps/pcsc-lite[${MULTILIB_USEDEP}] )
-	udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
-	unwind? (
-		llvm-libunwind? ( sys-libs/llvm-libunwind[${MULTILIB_USEDEP}] )
-		!llvm-libunwind? ( sys-libs/libunwind:=[${MULTILIB_USEDEP}] )
-	)
-	usb? ( dev-libs/libusb:1[${MULTILIB_USEDEP}] )
-	wayland? (
-		dev-libs/wayland[${MULTILIB_USEDEP}]
-		x11-libs/libxkbcommon[${MULTILIB_USEDEP}]
-	)
-"
-RDEPEND="
-	${WINE_COMMON_DEPEND}
-	app-emulation/wine-desktop-common
-	dos? (
-		|| (
-			games-emulation/dosbox
-			games-emulation/dosbox-staging
-		)
-	)
-	gecko? (
-		app-emulation/wine-gecko:${WINE_GECKO}[${MULTILIB_USEDEP}]
-		wow64? ( app-emulation/wine-gecko[abi_x86_32] )
-	)
-	gstreamer? ( media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] )
-	mono? ( app-emulation/wine-mono:${WINE_MONO} )
-	perl? (
-		dev-lang/perl
-		dev-perl/XML-LibXML
-	)
-	samba? ( net-fs/samba[winbind] )
-	selinux? ( sec-policy/selinux-wine )
-	udisks? ( sys-fs/udisks:2 )
-"
-DEPEND="
-	${WINE_COMMON_DEPEND}
-	sys-kernel/linux-headers
-	X? ( x11-base/xorg-proto )
-"
-BDEPEND="
-	|| (
-		sys-devel/binutils
-		sys-devel/lld
-	)
-	dev-lang/perl
-	sys-devel/bison
-	sys-devel/flex
-	virtual/pkgconfig
-	mingw? ( !crossdev-mingw? (
-		>=dev-util/mingw64-toolchain-10.0.0_p1-r2[${MULTILIB_USEDEP}]
-		wow64? ( dev-util/mingw64-toolchain[abi_x86_32] )
-	) )
-	nls? ( sys-devel/gettext )
-	wayland? ( dev-util/wayland-scanner )
-"
-IDEPEND=">=app-eselect/eselect-wine-2"
-
-QA_CONFIG_IMPL_DECL_SKIP=(
-	__clear_cache # unused on amd64+x86 (bug #900338)
-	res_getservers # false positive
-)
-QA_TEXTRELS="usr/lib/*/wine/i386-unix/*.so" # uses -fno-PIC -Wl,-z,notext
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-7.0-noexecstack.patch
-	"${FILESDIR}"/${PN}-7.20-unwind.patch
-	"${FILESDIR}"/${PN}-8.13-rpath.patch
-	"${FILESDIR}"/${P}-wayland-egl.patch
-)
-
-pkg_pretend() {
-	[[ ${MERGE_TYPE} == binary ]] && return
-
-	if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then
-		local mingw=-w64-mingw32
-		for mingw in $(usev abi_x86_64 x86_64${mingw}) \
-			$(use abi_x86_32 || use wow64 && echo i686${mingw}); do
-			if ! type -P ${mingw}-gcc >/dev/null; then
-				eerror "With USE=crossdev-mingw, you must prepare the MinGW toolchain"
-				eerror "yourself by installing sys-devel/crossdev then running:"
-				eerror
-				eerror "    crossdev --target ${mingw}"
-				eerror
-				eerror "For more information, please see: https://wiki.gentoo.org/wiki/Mingw"
-				die "USE=crossdev-mingw is enabled, but ${mingw}-gcc was not found"
-			fi
-		done
-	fi
-}
-
-src_prepare() {
-	# sanity check, bumping these has a history of oversights
-	local geckomono=$(sed -En '/^#define (GECKO|MONO)_VER/{s/[^0-9.]//gp}' \
-		dlls/appwiz.cpl/addons.c || die)
-	if [[ ${WINE_GECKO}$'\n'${WINE_MONO} != "${geckomono}" ]]; then
-		local gmfatal=
-		[[ ${PV} == *9999 ]] && gmfatal=nonfatal
-		${gmfatal} die -n "gecko/mono mismatch in ebuild, has: " ${geckomono} " (please file a bug)"
-	fi
-
-	default
-
-	if tc-is-clang; then
-		if use mingw; then
-			# -mabi=ms was ignored by <clang:16 then turned error in :17
-			# if used without --target *-windows, then gets used in install
-			# phase despite USE=mingw, drop as a quick fix for now
-			sed -i '/MSVCRTFLAGS=/s/-mabi=ms//' configure.ac || die
-		else
-			# fails in ./configure unless --enable-archs is passed, allow to
-			# bypass with EXTRA_ECONF but is currently considered unsupported
-			# (by Gentoo) as additional work is needed for (proper) support
-			# note: also fails w/ :17, but unsure if safe to drop w/o mingw
-			[[ ${EXTRA_ECONF} == *--enable-archs* ]] ||
-				die "building ${PN} with clang is only supported with USE=mingw"
-		fi
-	fi
-
-	# ensure .desktop calls this variant + slot
-	sed -i "/^Exec=/s/wine /${P} /" loader/wine.desktop || die
-
-	# datadir is not where wine-mono is installed, so prefixy alternate paths
-	hprefixify -w /get_mono_path/ dlls/mscoree/metahost.c
-
-	# always update for patches (including user's wrt #432348)
-	eautoreconf
-	tools/make_requests || die # perl
-	# tip: if need more for user patches, with portage can e.g. do
-	# echo "post_src_prepare() { tools/make_specfiles || die; }" \
-	#     > /etc/portage/env/app-emulation/wine-vanilla
-}
-
-src_configure() {
-	WINE_PREFIX=/usr/lib/${P}
-	WINE_DATADIR=/usr/share/${P}
-
-	local conf=(
-		--prefix="${EPREFIX}"${WINE_PREFIX}
-		--datadir="${EPREFIX}"${WINE_DATADIR}
-		--includedir="${EPREFIX}"/usr/include/${P}
-		--libdir="${EPREFIX}"${WINE_PREFIX}
-		--mandir="${EPREFIX}"${WINE_DATADIR}/man
-
-		$(usev wow64 --enable-archs=x86_64,i386)
-
-		$(use_enable gecko mshtml)
-		$(use_enable mono mscoree)
-		--disable-tests
-
-		$(use_with X x)
-		$(use_with alsa)
-		$(use_with capi)
-		$(use_with cups)
-		$(use_with fontconfig)
-		$(use_with gphoto2 gphoto)
-		$(use_with gstreamer)
-		$(use_with kerberos gssapi)
-		$(use_with kerberos krb5)
-		$(use_with mingw)
-		$(use_with netapi)
-		$(use_with nls gettext)
-		$(use_with opencl)
-		$(use_with opengl)
-		$(use_with osmesa)
-		--without-oss # media-sound/oss is not packaged (OSSv4)
-		$(use_with pcap)
-		$(use_with pulseaudio pulse)
-		$(use_with scanner sane)
-		$(use_with sdl)
-		$(use_with smartcard pcsclite)
-		$(use_with ssl gnutls)
-		$(use_with truetype freetype)
-		$(use_with udev)
-		$(use_with udisks dbus) # dbus is only used for udisks
-		$(use_with unwind)
-		$(use_with usb)
-		$(use_with v4l v4l2)
-		$(use_with vulkan)
-		$(use_with wayland)
-		$(use_with xcomposite)
-		$(use_with xinerama)
-		$(usev !odbc ac_cv_lib_soname_odbc=)
-	)
-
-	filter-lto # build failure
-	use custom-cflags || strip-flags # can break in obscure ways at runtime
-
-	# wine uses linker tricks unlikely to work with non-bfd/lld (bug #867097)
-	# (do self test until https://github.com/gentoo/gentoo/pull/28355)
-	if [[ $(LC_ALL=C $(tc-getCC) ${LDFLAGS} -Wl,--version 2>/dev/null) != @(LLD|GNU\ ld)* ]]
-	then
-		has_version -b sys-devel/binutils &&
-			append-ldflags -fuse-ld=bfd ||
-			append-ldflags -fuse-ld=lld
-		strip-unsupported-flags
-	fi
-
-	if use mingw; then
-		use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH}
-
-		# CROSSCC was formerly recognized by wine, thus been using similar
-		# variables (subject to change, esp. if ever make a mingw.eclass).
-		local mingwcc_amd64=${CROSSCC:-${CROSSCC_amd64:-x86_64-w64-mingw32-gcc}}
-		local mingwcc_x86=${CROSSCC:-${CROSSCC_x86:-i686-w64-mingw32-gcc}}
-		local -n mingwcc=mingwcc_$(usex abi_x86_64 amd64 x86)
-
-		conf+=(
-			ac_cv_prog_x86_64_CC="${mingwcc_amd64}"
-			ac_cv_prog_i386_CC="${mingwcc_x86}"
-
-			CROSSCFLAGS="${CROSSCFLAGS:-$(
-				filter-flags '-fstack-protector*' #870136
-				filter-flags '-mfunction-return=thunk*' #878849
-
-				# some bashrc-mv users tend to do CFLAGS="${LDFLAGS}" and then
-				# strip-unsupported-flags miss these during compile-only tests
-				# (primarily done for 23.0 profiles' -z, not full coverage)
-				filter-flags '-Wl,-z,*'
-
-				CC=${mingwcc} test-flags-CC ${CFLAGS:--O2}
-			)}"
-
-			CROSSLDFLAGS="${CROSSLDFLAGS:-$(
-				filter-flags '-fuse-ld=*'
-
-				CC=${mingwcc} test-flags-CCLD ${LDFLAGS}
-			)}"
-		)
-	fi
-
-	# order matters with multilib: configure+compile 64->32, install 32->64
-	local -i bits
-	for bits in $(usev abi_x86_64 64) $(usev abi_x86_32 32); do
-	(
-		einfo "Configuring ${PN} for ${bits}bits in ${WORKDIR}/build${bits} ..."
-
-		mkdir ../build${bits} || die
-		cd ../build${bits} || die
-
-		if (( bits == 64 )); then
-			conf+=( --enable-win64 )
-		elif use amd64; then
-			conf+=(
-				$(usev abi_x86_64 --with-wine64=../build64)
-				TARGETFLAGS=-m32 # for widl
-			)
-			# _setup is optional, but use over Wine's auto-detect (+#472038)
-			multilib_toolchain_setup x86
-		fi
-
-		ECONF_SOURCE=${S} econf "${conf[@]}"
-	)
-	done
-}
-
-src_compile() {
-	use abi_x86_64 && emake -C ../build64 # do first
-	use abi_x86_32 && emake -C ../build32
-}
-
-src_install() {
-	use abi_x86_32 && emake DESTDIR="${D}" -C ../build32 install
-	use abi_x86_64 && emake DESTDIR="${D}" -C ../build64 install # do last
-
-	# Ensure both wine64 and wine are available if USE=abi_x86_64 (wow64,
-	# -abi_x86_32, and/or EXTRA_ECONF could cause varying scenarios where
-	# one or the other could be missing and that is unexpected for users
-	# and some tools like winetricks)
-	if use abi_x86_64; then
-		if [[ -e ${ED}${WINE_PREFIX}/bin/wine64 && ! -e ${ED}${WINE_PREFIX}/bin/wine ]]; then
-			dosym wine64 ${WINE_PREFIX}/bin/wine
-			dosym wine64-preloader ${WINE_PREFIX}/bin/wine-preloader
-
-			# also install wine(1) man pages (incl. translations)
-			local man
-			for man in ../build64/loader/wine.*man; do
-				: "${man##*/wine}"
-				: "${_%.*}"
-				insinto ${WINE_DATADIR}/man/${_:+${_#.}/}man1
-				newins ${man} wine.1
-			done
-		elif [[ ! -e ${ED}${WINE_PREFIX}/bin/wine64 && -e ${ED}${WINE_PREFIX}/bin/wine ]]; then
-			dosym wine ${WINE_PREFIX}/bin/wine64
-			dosym wine-preloader ${WINE_PREFIX}/bin/wine64-preloader
-		fi
-	fi
-
-	use perl || rm "${ED}"${WINE_DATADIR}/man/man1/wine{dump,maker}.1 \
-		"${ED}"${WINE_PREFIX}/bin/{function_grep.pl,wine{dump,maker}} || die
-
-	# create variant wrappers for eselect-wine
-	local bin
-	for bin in "${ED}"${WINE_PREFIX}/bin/*; do
-		make_wrapper "${bin##*/}-${P#wine-}" "${bin#"${ED}"}"
-	done
-
-	if use mingw; then
-		# don't let portage try to strip PE files with the wrong
-		# strip executable and instead handle it here (saves ~120MB)
-		dostrip -x ${WINE_PREFIX}/wine/{i386,x86_64}-windows
-
-		if use strip; then
-			ebegin "Stripping Windows (PE) binaries"
-			find "${ED}"${WINE_PREFIX}/wine/*-windows -regex '.*\.\(a\|dll\|exe\)' \
-				-exec $(usex abi_x86_64 x86_64 i686)-w64-mingw32-strip --strip-unneeded {} +
-			eend ${?} || die
-		fi
-	fi
-
-	dodoc ANNOUNCE* AUTHORS README* documentation/README*
-}
-
-pkg_postinst() {
-	if use !abi_x86_32 && use !wow64; then
-		ewarn "32bit support is disabled. While 64bit applications themselves will"
-		ewarn "work, be warned that it is not unusual that installers or other helpers"
-		ewarn "will attempt to use 32bit and fail. If do not want full USE=abi_x86_32,"
-		ewarn "note the experimental/WIP USE=wow64 can allow 32bit without multilib."
-	elif use abi_x86_32 && { use opengl || use vulkan; } &&
-		has_version 'x11-drivers/nvidia-drivers[-abi_x86_32]'
-	then
-		ewarn "x11-drivers/nvidia-drivers is installed but is built without"
-		ewarn "USE=abi_x86_32 (ABI_X86=32), hardware acceleration with 32bit"
-		ewarn "applications under ${PN} will likely not be usable."
-	fi
-
-	optfeature "/dev/hidraw* access used for *some* controllers (e.g. DualShock4)" \
-		games-util/game-device-udev-rules
-
-	eselect wine update --if-unset || die
-}
-
-pkg_postrm() {
-	eselect wine update --if-unset || die
-}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/wine-vanilla/files/, app-emulation/wine-vanilla/
@ 2024-05-07 10:01 Ionen Wolkens
  0 siblings, 0 replies; 8+ messages in thread
From: Ionen Wolkens @ 2024-05-07 10:01 UTC (permalink / raw
  To: gentoo-commits

commit:     be7b8b731fca352feb69499b08fa3918bcb71309
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Tue May  7 09:44:31 2024 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Tue May  7 09:45:15 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be7b8b73

app-emulation/wine-vanilla: fix build with musl

Closes: https://bugs.gentoo.org/931341
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../wine-vanilla-9.8-musl-ioctls-header.patch      | 30 ++++++++++++++++++++++
 app-emulation/wine-vanilla/wine-vanilla-9.8.ebuild |  1 +
 2 files changed, 31 insertions(+)

diff --git a/app-emulation/wine-vanilla/files/wine-vanilla-9.8-musl-ioctls-header.patch b/app-emulation/wine-vanilla/files/wine-vanilla-9.8-musl-ioctls-header.patch
new file mode 100644
index 000000000000..7aa1a4c00587
--- /dev/null
+++ b/app-emulation/wine-vanilla/files/wine-vanilla-9.8-musl-ioctls-header.patch
@@ -0,0 +1,30 @@
+https://bugs.gentoo.org/931341
+https://gitlab.winehq.org/wine/wine/-/commit/24ca848c568d5a2786abd26f2e7314b2e3f509f3
+From: Fotios Valasiadis <fvalasiad@gmail.com>
+Date: Sun, 5 May 2024 03:34:57 +0300
+Subject: [PATCH] ntdll/unix: Fix building on musl by explicitly including
+ asm/ioctls.h.
+
+After commit 898ab8dab19d498c17859f39a55e317ee7e367a5 wine would no longer
+build on musl.
+
+Issue is that apparently TCSETS2 isn't defined when including sys/ioctl.h.
+
+A little digging shows that glibc goes ahead and includes asm/ioctls.h in
+sys/ioctl.h, providing said macro.  Musl on the other hand doesn't and relies
+on bits/ioctl.h, which lacks said macro.
+
+Signed-off-by: Fotios Valasiadis <fvalasiad@gmail.com>
+--- a/dlls/ntdll/unix/serial.c
++++ b/dlls/ntdll/unix/serial.c
+@@ -33,6 +33,7 @@
+ #include <stdio.h>
+ #ifdef HAVE_ASM_TERMBITS_H
+ # include <asm/termbits.h>
++# include <asm/ioctls.h>
+ #else
+ # include <termios.h>
+ #endif
+-- 
+GitLab
+

diff --git a/app-emulation/wine-vanilla/wine-vanilla-9.8.ebuild b/app-emulation/wine-vanilla/wine-vanilla-9.8.ebuild
index 13bbfdc159ea..7a5546bbfd70 100644
--- a/app-emulation/wine-vanilla/wine-vanilla-9.8.ebuild
+++ b/app-emulation/wine-vanilla/wine-vanilla-9.8.ebuild
@@ -161,6 +161,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-7.0-noexecstack.patch
 	"${FILESDIR}"/${PN}-7.20-unwind.patch
 	"${FILESDIR}"/${PN}-8.13-rpath.patch
+	"${FILESDIR}"/${P}-musl-ioctls-header.patch
 )
 
 pkg_pretend() {


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-05-07 10:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-07 10:01 [gentoo-commits] repo/gentoo:master commit in: app-emulation/wine-vanilla/files/, app-emulation/wine-vanilla/ Ionen Wolkens
  -- strict thread matches above, loose matches on Subject: below --
2024-04-22 20:31 Ionen Wolkens
2022-12-29 20:29 Ionen Wolkens
2022-11-24  0:57 Ionen Wolkens
2022-11-12 11:33 Ionen Wolkens
2022-11-01  1:16 Ionen Wolkens
2022-09-13  4:19 Ionen Wolkens
2017-04-10 17:22 NP Hardass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox