commit:     f571360338db4448832bfcb960265bde133460e0
Author:     NP-Hardass <NP-Hardass <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 20 06:46:26 2018 +0000
Commit:     NP Hardass <np-hardass <AT> gentoo <DOT> org>
CommitDate: Sat Jan 20 06:46:26 2018 +0000
URL:        https://gitweb.gentoo.org/repo/proj/wine.git/commit/?id=f5713603

app-emulation/wine-d3d9: Fix manpage generation

Bug: https://bugs.gentoo.org/617864
Package-Manager: Portage-2.3.19, Repoman-2.3.6

 app-emulation/wine-d3d9/Manifest                 |  2 +-
 app-emulation/wine-d3d9/wine-d3d9-2.0-r1.ebuild  | 38 +++++++++++++++++-------
 app-emulation/wine-d3d9/wine-d3d9-2.1-r1.ebuild  | 38 +++++++++++++++++-------
 app-emulation/wine-d3d9/wine-d3d9-2.10-r1.ebuild | 38 +++++++++++++++++-------
 app-emulation/wine-d3d9/wine-d3d9-2.11-r1.ebuild | 38 +++++++++++++++++-------
 app-emulation/wine-d3d9/wine-d3d9-2.12-r1.ebuild | 38 +++++++++++++++++-------
 app-emulation/wine-d3d9/wine-d3d9-2.13-r1.ebuild | 38 +++++++++++++++++-------
 app-emulation/wine-d3d9/wine-d3d9-2.14-r1.ebuild | 38 +++++++++++++++++-------
 app-emulation/wine-d3d9/wine-d3d9-2.15-r1.ebuild | 38 +++++++++++++++++-------
 app-emulation/wine-d3d9/wine-d3d9-2.16-r1.ebuild | 38 +++++++++++++++++-------
 app-emulation/wine-d3d9/wine-d3d9-2.17-r1.ebuild | 38 +++++++++++++++++-------
 app-emulation/wine-d3d9/wine-d3d9-2.18.ebuild    | 38 +++++++++++++++++-------
 app-emulation/wine-d3d9/wine-d3d9-2.19.ebuild    | 38 +++++++++++++++++-------
 app-emulation/wine-d3d9/wine-d3d9-2.2-r1.ebuild  | 38 +++++++++++++++++-------
 app-emulation/wine-d3d9/wine-d3d9-2.20.ebuild    | 38 +++++++++++++++++-------
 app-emulation/wine-d3d9/wine-d3d9-2.21.ebuild    | 38 +++++++++++++++++-------
 app-emulation/wine-d3d9/wine-d3d9-2.3-r1.ebuild  | 38 +++++++++++++++++-------
 app-emulation/wine-d3d9/wine-d3d9-2.4-r1.ebuild  | 38 +++++++++++++++++-------
 app-emulation/wine-d3d9/wine-d3d9-2.5-r1.ebuild  | 38 +++++++++++++++++-------
 app-emulation/wine-d3d9/wine-d3d9-2.6-r1.ebuild  | 38 +++++++++++++++++-------
 app-emulation/wine-d3d9/wine-d3d9-2.7-r1.ebuild  | 38 +++++++++++++++++-------
 app-emulation/wine-d3d9/wine-d3d9-2.8-r1.ebuild  | 38 +++++++++++++++++-------
 app-emulation/wine-d3d9/wine-d3d9-2.9-r1.ebuild  | 38 +++++++++++++++++-------
 app-emulation/wine-d3d9/wine-d3d9-9999.ebuild    | 38 +++++++++++++++++-------
 24 files changed, 645 insertions(+), 231 deletions(-)

diff --git a/app-emulation/wine-d3d9/Manifest b/app-emulation/wine-d3d9/Manifest
index 212d3de..c07ff88 100644
--- a/app-emulation/wine-d3d9/Manifest
+++ b/app-emulation/wine-d3d9/Manifest
@@ -1,4 +1,4 @@
-DIST gentoo-wine-patches-20170830.tar.xz 58456 SHA256 
fb7781d0ae360cbc3860c2d2e81527a1b903da824c01f5d5040e95aaf99a3970 SHA512 
5e5159e3252b246bba0ef7fdba345db3ab1071c5b8b8b625f98eda18779d4024c5b76bdbf49ce7bd5c6b01b422807adf76820beddb2b4a6ee9e67d13052cc575
 WHIRLPOOL 
a79be264bab3fcdeee06fef47efd28e6e1125254ac7f82300cb6ba2591ef69cd76b5fed8f778b1849a0659e680e9fc785f0273d55cb2ed95648a74dffa5e22d2
+DIST gentoo-wine-patches-20180119.tar.xz 58688 SHA256 
bb8f634241e7a4ba528bb6e0db78512889c4d25773773e87d76a2452dde72360 SHA512 
3e605bf613dca333e501b5578d9c92a42d351a23f8d7d9d6a545a7dc043dcc4c7f52918e6ad46db63a6f00f3ace4b77055f8343176afb976e6a04590dcee64b7
 WHIRLPOOL 
46dfe36cce8e46a916b5e6f49e6674d9f9612b6ebbd3fd1ba47e6ff34bc68d95a916b76d1a61b0b25ddf97840dd78dffa2d7d0239e6fc0d3cbd74cc0c1868e9a
 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.10.tar.xz 19209580 SHA256 
488df7ffd2e81da455bf428fc9eb784bb4273a890334500895665711bd52f179 SHA512 
8807e16a571bf45d99097ad5fdfb9fe755f6dbe84010a330fed82f1d48c76b7f19589bfc0e5dde0b9e49a608fd0501db3f7e3e129e4d9d34bcae03bc51a73139
 WHIRLPOOL 
e9a8248aac31593fbac28a3d8d4e62bfce14a7c41cc416ebfca8606518d28efd31b32196133da211f75f48bd228bd5d21fcbbc0479293e813ed99b258b37126e

diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.0-r1.ebuild 
b/app-emulation/wine-d3d9/wine-d3d9-2.0-r1.ebuild
index b254fbf..3f8f071 100644
--- a/app-emulation/wine-d3d9/wine-d3d9-2.0-r1.ebuild
+++ b/app-emulation/wine-d3d9/wine-d3d9-2.0-r1.ebuild
@@ -26,7 +26,7 @@ S="${WORKDIR}/${MY_P}"
 
 D3D9_P="wine-d3d9-${PV}"
 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
-GWP_V="20170830"
+GWP_V="20180119"
 PATCHDIR="${WORKDIR}/gentoo-wine-patches"
 
 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine 
patchset"
@@ -169,9 +169,10 @@ PATCHES=(
        "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
        "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
        "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
-       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
+       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
        "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
        "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
+       
"${PATCHDIR}/patches/${MY_PN}-2.0-prevent-build-of-localized-manpages.patch" 
#469418 #617864
 )
 PATCHES_BIN=(
        "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
@@ -370,6 +371,31 @@ src_prepare() {
        cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
 
        l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect 
LINGUAS
+
+       # Fix manpage generation for locales #469418 and abi_x86_64 #617864
+       # Depends on wine-2.0-prevent-build-of-localized-manpages.patch"
+       # Duplicate manpages input for wine64
+       local man
+       for man in loader/*.man.in; do
+               cp ${man} ${man/wine/wine64} || die
+       done
+       # Add in proper manpages to Makefile
+       local search_text="wine.man.in"
+       if use abi_x86_64; then
+               sed -i "/${search_text}/i \
+                       "$'\\\t'"wine64.man.in "$'\\\\' loader/Makefile.in || 
die
+       fi
+       local l
+       for l in de fr pl; do
+               if has ${l} ${LINGUAS-${l}}; then
+                       sed -i "/${search_text}/i \
+                               "$'\\\t'"wine.${l}.UTF-8.man.in "$'\\\\' 
loader/Makefile.in || die
+                       if use abi_x86_64; then
+                               sed -i "/${search_text}/i \
+                                       "$'\\\t'"wine64.${l}.UTF-8.man.in 
"$'\\\\' loader/Makefile.in || die
+                       fi
+               fi
+       done
 }
 
 src_configure() {
@@ -514,14 +540,6 @@ multilib_src_install_all() {
        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
-       local l
-       for l in de fr pl; do
-               has ${l} ${LINGUAS-${l}} || rm -rf "${D%/}${MY_MANDIR}"/${l}*
-       done
-
-       eval "${glob_state}"
 }
 
 pkg_postinst() {

diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.1-r1.ebuild 
b/app-emulation/wine-d3d9/wine-d3d9-2.1-r1.ebuild
index 5c2d674..4963c3a 100644
--- a/app-emulation/wine-d3d9/wine-d3d9-2.1-r1.ebuild
+++ b/app-emulation/wine-d3d9/wine-d3d9-2.1-r1.ebuild
@@ -26,7 +26,7 @@ S="${WORKDIR}/${MY_P}"
 
 D3D9_P="wine-d3d9-${PV}"
 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
-GWP_V="20170830"
+GWP_V="20180119"
 PATCHDIR="${WORKDIR}/gentoo-wine-patches"
 
 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine 
patchset"
@@ -169,9 +169,10 @@ PATCHES=(
        "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
        "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
        "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
-       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
+       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
        "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
        "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
+       
"${PATCHDIR}/patches/${MY_PN}-2.0-prevent-build-of-localized-manpages.patch" 
#469418 #617864
 )
 PATCHES_BIN=(
        "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
@@ -370,6 +371,31 @@ src_prepare() {
        cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
 
        l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect 
LINGUAS
+
+       # Fix manpage generation for locales #469418 and abi_x86_64 #617864
+       # Depends on wine-2.0-prevent-build-of-localized-manpages.patch"
+       # Duplicate manpages input for wine64
+       local man
+       for man in loader/*.man.in; do
+               cp ${man} ${man/wine/wine64} || die
+       done
+       # Add in proper manpages to Makefile
+       local search_text="wine.man.in"
+       if use abi_x86_64; then
+               sed -i "/${search_text}/i \
+                       "$'\\\t'"wine64.man.in "$'\\\\' loader/Makefile.in || 
die
+       fi
+       local l
+       for l in de fr pl; do
+               if has ${l} ${LINGUAS-${l}}; then
+                       sed -i "/${search_text}/i \
+                               "$'\\\t'"wine.${l}.UTF-8.man.in "$'\\\\' 
loader/Makefile.in || die
+                       if use abi_x86_64; then
+                               sed -i "/${search_text}/i \
+                                       "$'\\\t'"wine64.${l}.UTF-8.man.in 
"$'\\\\' loader/Makefile.in || die
+                       fi
+               fi
+       done
 }
 
 src_configure() {
@@ -514,14 +540,6 @@ multilib_src_install_all() {
        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
-       local l
-       for l in de fr pl; do
-               has ${l} ${LINGUAS-${l}} || rm -rf "${D%/}${MY_MANDIR}"/${l}*
-       done
-
-       eval "${glob_state}"
 }
 
 pkg_postinst() {

diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.10-r1.ebuild 
b/app-emulation/wine-d3d9/wine-d3d9-2.10-r1.ebuild
index 73b1646..4c3f847 100644
--- a/app-emulation/wine-d3d9/wine-d3d9-2.10-r1.ebuild
+++ b/app-emulation/wine-d3d9/wine-d3d9-2.10-r1.ebuild
@@ -26,7 +26,7 @@ S="${WORKDIR}/${MY_P}"
 
 D3D9_P="wine-d3d9-${PV}"
 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
-GWP_V="20170830"
+GWP_V="20180119"
 PATCHDIR="${WORKDIR}/gentoo-wine-patches"
 
 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine 
patchset"
@@ -170,9 +170,10 @@ PATCHES=(
        "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
        "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
        "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
-       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
+       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
        "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
        "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
+       
"${PATCHDIR}/patches/${MY_PN}-2.0-prevent-build-of-localized-manpages.patch" 
#469418 #617864
 )
 PATCHES_BIN=(
        "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
@@ -371,6 +372,31 @@ src_prepare() {
        cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
 
        l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect 
LINGUAS
+
+       # Fix manpage generation for locales #469418 and abi_x86_64 #617864
+       # Depends on wine-2.0-prevent-build-of-localized-manpages.patch"
+       # Duplicate manpages input for wine64
+       local man
+       for man in loader/*.man.in; do
+               cp ${man} ${man/wine/wine64} || die
+       done
+       # Add in proper manpages to Makefile
+       local search_text="wine.man.in"
+       if use abi_x86_64; then
+               sed -i "/${search_text}/i \
+                       "$'\\\t'"wine64.man.in "$'\\\\' loader/Makefile.in || 
die
+       fi
+       local l
+       for l in de fr pl; do
+               if has ${l} ${LINGUAS-${l}}; then
+                       sed -i "/${search_text}/i \
+                               "$'\\\t'"wine.${l}.UTF-8.man.in "$'\\\\' 
loader/Makefile.in || die
+                       if use abi_x86_64; then
+                               sed -i "/${search_text}/i \
+                                       "$'\\\t'"wine64.${l}.UTF-8.man.in 
"$'\\\\' loader/Makefile.in || die
+                       fi
+               fi
+       done
 }
 
 src_configure() {
@@ -516,14 +542,6 @@ multilib_src_install_all() {
        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
-       local l
-       for l in de fr pl; do
-               has ${l} ${LINGUAS-${l}} || rm -rf "${D%/}${MY_MANDIR}"/${l}*
-       done
-
-       eval "${glob_state}"
 }
 
 pkg_postinst() {

diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.11-r1.ebuild 
b/app-emulation/wine-d3d9/wine-d3d9-2.11-r1.ebuild
index 73b1646..4c3f847 100644
--- a/app-emulation/wine-d3d9/wine-d3d9-2.11-r1.ebuild
+++ b/app-emulation/wine-d3d9/wine-d3d9-2.11-r1.ebuild
@@ -26,7 +26,7 @@ S="${WORKDIR}/${MY_P}"
 
 D3D9_P="wine-d3d9-${PV}"
 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
-GWP_V="20170830"
+GWP_V="20180119"
 PATCHDIR="${WORKDIR}/gentoo-wine-patches"
 
 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine 
patchset"
@@ -170,9 +170,10 @@ PATCHES=(
        "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
        "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
        "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
-       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
+       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
        "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
        "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
+       
"${PATCHDIR}/patches/${MY_PN}-2.0-prevent-build-of-localized-manpages.patch" 
#469418 #617864
 )
 PATCHES_BIN=(
        "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
@@ -371,6 +372,31 @@ src_prepare() {
        cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
 
        l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect 
LINGUAS
+
+       # Fix manpage generation for locales #469418 and abi_x86_64 #617864
+       # Depends on wine-2.0-prevent-build-of-localized-manpages.patch"
+       # Duplicate manpages input for wine64
+       local man
+       for man in loader/*.man.in; do
+               cp ${man} ${man/wine/wine64} || die
+       done
+       # Add in proper manpages to Makefile
+       local search_text="wine.man.in"
+       if use abi_x86_64; then
+               sed -i "/${search_text}/i \
+                       "$'\\\t'"wine64.man.in "$'\\\\' loader/Makefile.in || 
die
+       fi
+       local l
+       for l in de fr pl; do
+               if has ${l} ${LINGUAS-${l}}; then
+                       sed -i "/${search_text}/i \
+                               "$'\\\t'"wine.${l}.UTF-8.man.in "$'\\\\' 
loader/Makefile.in || die
+                       if use abi_x86_64; then
+                               sed -i "/${search_text}/i \
+                                       "$'\\\t'"wine64.${l}.UTF-8.man.in 
"$'\\\\' loader/Makefile.in || die
+                       fi
+               fi
+       done
 }
 
 src_configure() {
@@ -516,14 +542,6 @@ multilib_src_install_all() {
        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
-       local l
-       for l in de fr pl; do
-               has ${l} ${LINGUAS-${l}} || rm -rf "${D%/}${MY_MANDIR}"/${l}*
-       done
-
-       eval "${glob_state}"
 }
 
 pkg_postinst() {

diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.12-r1.ebuild 
b/app-emulation/wine-d3d9/wine-d3d9-2.12-r1.ebuild
index 73b1646..4c3f847 100644
--- a/app-emulation/wine-d3d9/wine-d3d9-2.12-r1.ebuild
+++ b/app-emulation/wine-d3d9/wine-d3d9-2.12-r1.ebuild
@@ -26,7 +26,7 @@ S="${WORKDIR}/${MY_P}"
 
 D3D9_P="wine-d3d9-${PV}"
 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
-GWP_V="20170830"
+GWP_V="20180119"
 PATCHDIR="${WORKDIR}/gentoo-wine-patches"
 
 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine 
patchset"
@@ -170,9 +170,10 @@ PATCHES=(
        "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
        "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
        "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
-       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
+       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
        "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
        "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
+       
"${PATCHDIR}/patches/${MY_PN}-2.0-prevent-build-of-localized-manpages.patch" 
#469418 #617864
 )
 PATCHES_BIN=(
        "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
@@ -371,6 +372,31 @@ src_prepare() {
        cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
 
        l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect 
LINGUAS
+
+       # Fix manpage generation for locales #469418 and abi_x86_64 #617864
+       # Depends on wine-2.0-prevent-build-of-localized-manpages.patch"
+       # Duplicate manpages input for wine64
+       local man
+       for man in loader/*.man.in; do
+               cp ${man} ${man/wine/wine64} || die
+       done
+       # Add in proper manpages to Makefile
+       local search_text="wine.man.in"
+       if use abi_x86_64; then
+               sed -i "/${search_text}/i \
+                       "$'\\\t'"wine64.man.in "$'\\\\' loader/Makefile.in || 
die
+       fi
+       local l
+       for l in de fr pl; do
+               if has ${l} ${LINGUAS-${l}}; then
+                       sed -i "/${search_text}/i \
+                               "$'\\\t'"wine.${l}.UTF-8.man.in "$'\\\\' 
loader/Makefile.in || die
+                       if use abi_x86_64; then
+                               sed -i "/${search_text}/i \
+                                       "$'\\\t'"wine64.${l}.UTF-8.man.in 
"$'\\\\' loader/Makefile.in || die
+                       fi
+               fi
+       done
 }
 
 src_configure() {
@@ -516,14 +542,6 @@ multilib_src_install_all() {
        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
-       local l
-       for l in de fr pl; do
-               has ${l} ${LINGUAS-${l}} || rm -rf "${D%/}${MY_MANDIR}"/${l}*
-       done
-
-       eval "${glob_state}"
 }
 
 pkg_postinst() {

diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.13-r1.ebuild 
b/app-emulation/wine-d3d9/wine-d3d9-2.13-r1.ebuild
index 73b1646..4c3f847 100644
--- a/app-emulation/wine-d3d9/wine-d3d9-2.13-r1.ebuild
+++ b/app-emulation/wine-d3d9/wine-d3d9-2.13-r1.ebuild
@@ -26,7 +26,7 @@ S="${WORKDIR}/${MY_P}"
 
 D3D9_P="wine-d3d9-${PV}"
 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
-GWP_V="20170830"
+GWP_V="20180119"
 PATCHDIR="${WORKDIR}/gentoo-wine-patches"
 
 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine 
patchset"
@@ -170,9 +170,10 @@ PATCHES=(
        "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
        "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
        "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
-       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
+       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
        "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
        "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
+       
"${PATCHDIR}/patches/${MY_PN}-2.0-prevent-build-of-localized-manpages.patch" 
#469418 #617864
 )
 PATCHES_BIN=(
        "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
@@ -371,6 +372,31 @@ src_prepare() {
        cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
 
        l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect 
LINGUAS
+
+       # Fix manpage generation for locales #469418 and abi_x86_64 #617864
+       # Depends on wine-2.0-prevent-build-of-localized-manpages.patch"
+       # Duplicate manpages input for wine64
+       local man
+       for man in loader/*.man.in; do
+               cp ${man} ${man/wine/wine64} || die
+       done
+       # Add in proper manpages to Makefile
+       local search_text="wine.man.in"
+       if use abi_x86_64; then
+               sed -i "/${search_text}/i \
+                       "$'\\\t'"wine64.man.in "$'\\\\' loader/Makefile.in || 
die
+       fi
+       local l
+       for l in de fr pl; do
+               if has ${l} ${LINGUAS-${l}}; then
+                       sed -i "/${search_text}/i \
+                               "$'\\\t'"wine.${l}.UTF-8.man.in "$'\\\\' 
loader/Makefile.in || die
+                       if use abi_x86_64; then
+                               sed -i "/${search_text}/i \
+                                       "$'\\\t'"wine64.${l}.UTF-8.man.in 
"$'\\\\' loader/Makefile.in || die
+                       fi
+               fi
+       done
 }
 
 src_configure() {
@@ -516,14 +542,6 @@ multilib_src_install_all() {
        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
-       local l
-       for l in de fr pl; do
-               has ${l} ${LINGUAS-${l}} || rm -rf "${D%/}${MY_MANDIR}"/${l}*
-       done
-
-       eval "${glob_state}"
 }
 
 pkg_postinst() {

diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.14-r1.ebuild 
b/app-emulation/wine-d3d9/wine-d3d9-2.14-r1.ebuild
index 7353ee3..63b5cb6 100644
--- a/app-emulation/wine-d3d9/wine-d3d9-2.14-r1.ebuild
+++ b/app-emulation/wine-d3d9/wine-d3d9-2.14-r1.ebuild
@@ -26,7 +26,7 @@ S="${WORKDIR}/${MY_P}"
 
 D3D9_P="wine-d3d9-${PV}"
 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
-GWP_V="20170830"
+GWP_V="20180119"
 PATCHDIR="${WORKDIR}/gentoo-wine-patches"
 
 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine 
patchset"
@@ -170,9 +170,10 @@ PATCHES=(
        "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
        "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
        "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
-       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
+       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
        "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
        "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
+       
"${PATCHDIR}/patches/${MY_PN}-2.0-prevent-build-of-localized-manpages.patch" 
#469418 #617864
 )
 PATCHES_BIN=(
        "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
@@ -371,6 +372,31 @@ src_prepare() {
        cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
 
        l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect 
LINGUAS
+
+       # Fix manpage generation for locales #469418 and abi_x86_64 #617864
+       # Depends on wine-2.0-prevent-build-of-localized-manpages.patch"
+       # Duplicate manpages input for wine64
+       local man
+       for man in loader/*.man.in; do
+               cp ${man} ${man/wine/wine64} || die
+       done
+       # Add in proper manpages to Makefile
+       local search_text="wine.man.in"
+       if use abi_x86_64; then
+               sed -i "/${search_text}/i \
+                       "$'\\\t'"wine64.man.in "$'\\\\' loader/Makefile.in || 
die
+       fi
+       local l
+       for l in de fr pl; do
+               if has ${l} ${LINGUAS-${l}}; then
+                       sed -i "/${search_text}/i \
+                               "$'\\\t'"wine.${l}.UTF-8.man.in "$'\\\\' 
loader/Makefile.in || die
+                       if use abi_x86_64; then
+                               sed -i "/${search_text}/i \
+                                       "$'\\\t'"wine64.${l}.UTF-8.man.in 
"$'\\\\' loader/Makefile.in || die
+                       fi
+               fi
+       done
 }
 
 src_configure() {
@@ -516,14 +542,6 @@ multilib_src_install_all() {
        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
-       local l
-       for l in de fr pl; do
-               has ${l} ${LINGUAS-${l}} || rm -rf "${D%/}${MY_MANDIR}"/${l}*
-       done
-
-       eval "${glob_state}"
 }
 
 pkg_postinst() {

diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.15-r1.ebuild 
b/app-emulation/wine-d3d9/wine-d3d9-2.15-r1.ebuild
index 7353ee3..63b5cb6 100644
--- a/app-emulation/wine-d3d9/wine-d3d9-2.15-r1.ebuild
+++ b/app-emulation/wine-d3d9/wine-d3d9-2.15-r1.ebuild
@@ -26,7 +26,7 @@ S="${WORKDIR}/${MY_P}"
 
 D3D9_P="wine-d3d9-${PV}"
 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
-GWP_V="20170830"
+GWP_V="20180119"
 PATCHDIR="${WORKDIR}/gentoo-wine-patches"
 
 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine 
patchset"
@@ -170,9 +170,10 @@ PATCHES=(
        "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
        "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
        "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
-       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
+       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
        "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
        "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
+       
"${PATCHDIR}/patches/${MY_PN}-2.0-prevent-build-of-localized-manpages.patch" 
#469418 #617864
 )
 PATCHES_BIN=(
        "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
@@ -371,6 +372,31 @@ src_prepare() {
        cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
 
        l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect 
LINGUAS
+
+       # Fix manpage generation for locales #469418 and abi_x86_64 #617864
+       # Depends on wine-2.0-prevent-build-of-localized-manpages.patch"
+       # Duplicate manpages input for wine64
+       local man
+       for man in loader/*.man.in; do
+               cp ${man} ${man/wine/wine64} || die
+       done
+       # Add in proper manpages to Makefile
+       local search_text="wine.man.in"
+       if use abi_x86_64; then
+               sed -i "/${search_text}/i \
+                       "$'\\\t'"wine64.man.in "$'\\\\' loader/Makefile.in || 
die
+       fi
+       local l
+       for l in de fr pl; do
+               if has ${l} ${LINGUAS-${l}}; then
+                       sed -i "/${search_text}/i \
+                               "$'\\\t'"wine.${l}.UTF-8.man.in "$'\\\\' 
loader/Makefile.in || die
+                       if use abi_x86_64; then
+                               sed -i "/${search_text}/i \
+                                       "$'\\\t'"wine64.${l}.UTF-8.man.in 
"$'\\\\' loader/Makefile.in || die
+                       fi
+               fi
+       done
 }
 
 src_configure() {
@@ -516,14 +542,6 @@ multilib_src_install_all() {
        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
-       local l
-       for l in de fr pl; do
-               has ${l} ${LINGUAS-${l}} || rm -rf "${D%/}${MY_MANDIR}"/${l}*
-       done
-
-       eval "${glob_state}"
 }
 
 pkg_postinst() {

diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.16-r1.ebuild 
b/app-emulation/wine-d3d9/wine-d3d9-2.16-r1.ebuild
index 7353ee3..63b5cb6 100644
--- a/app-emulation/wine-d3d9/wine-d3d9-2.16-r1.ebuild
+++ b/app-emulation/wine-d3d9/wine-d3d9-2.16-r1.ebuild
@@ -26,7 +26,7 @@ S="${WORKDIR}/${MY_P}"
 
 D3D9_P="wine-d3d9-${PV}"
 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
-GWP_V="20170830"
+GWP_V="20180119"
 PATCHDIR="${WORKDIR}/gentoo-wine-patches"
 
 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine 
patchset"
@@ -170,9 +170,10 @@ PATCHES=(
        "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
        "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
        "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
-       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
+       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
        "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
        "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
+       
"${PATCHDIR}/patches/${MY_PN}-2.0-prevent-build-of-localized-manpages.patch" 
#469418 #617864
 )
 PATCHES_BIN=(
        "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
@@ -371,6 +372,31 @@ src_prepare() {
        cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
 
        l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect 
LINGUAS
+
+       # Fix manpage generation for locales #469418 and abi_x86_64 #617864
+       # Depends on wine-2.0-prevent-build-of-localized-manpages.patch"
+       # Duplicate manpages input for wine64
+       local man
+       for man in loader/*.man.in; do
+               cp ${man} ${man/wine/wine64} || die
+       done
+       # Add in proper manpages to Makefile
+       local search_text="wine.man.in"
+       if use abi_x86_64; then
+               sed -i "/${search_text}/i \
+                       "$'\\\t'"wine64.man.in "$'\\\\' loader/Makefile.in || 
die
+       fi
+       local l
+       for l in de fr pl; do
+               if has ${l} ${LINGUAS-${l}}; then
+                       sed -i "/${search_text}/i \
+                               "$'\\\t'"wine.${l}.UTF-8.man.in "$'\\\\' 
loader/Makefile.in || die
+                       if use abi_x86_64; then
+                               sed -i "/${search_text}/i \
+                                       "$'\\\t'"wine64.${l}.UTF-8.man.in 
"$'\\\\' loader/Makefile.in || die
+                       fi
+               fi
+       done
 }
 
 src_configure() {
@@ -516,14 +542,6 @@ multilib_src_install_all() {
        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
-       local l
-       for l in de fr pl; do
-               has ${l} ${LINGUAS-${l}} || rm -rf "${D%/}${MY_MANDIR}"/${l}*
-       done
-
-       eval "${glob_state}"
 }
 
 pkg_postinst() {

diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.17-r1.ebuild 
b/app-emulation/wine-d3d9/wine-d3d9-2.17-r1.ebuild
index 7353ee3..63b5cb6 100644
--- a/app-emulation/wine-d3d9/wine-d3d9-2.17-r1.ebuild
+++ b/app-emulation/wine-d3d9/wine-d3d9-2.17-r1.ebuild
@@ -26,7 +26,7 @@ S="${WORKDIR}/${MY_P}"
 
 D3D9_P="wine-d3d9-${PV}"
 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
-GWP_V="20170830"
+GWP_V="20180119"
 PATCHDIR="${WORKDIR}/gentoo-wine-patches"
 
 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine 
patchset"
@@ -170,9 +170,10 @@ PATCHES=(
        "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
        "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
        "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
-       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
+       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
        "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
        "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
+       
"${PATCHDIR}/patches/${MY_PN}-2.0-prevent-build-of-localized-manpages.patch" 
#469418 #617864
 )
 PATCHES_BIN=(
        "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
@@ -371,6 +372,31 @@ src_prepare() {
        cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
 
        l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect 
LINGUAS
+
+       # Fix manpage generation for locales #469418 and abi_x86_64 #617864
+       # Depends on wine-2.0-prevent-build-of-localized-manpages.patch"
+       # Duplicate manpages input for wine64
+       local man
+       for man in loader/*.man.in; do
+               cp ${man} ${man/wine/wine64} || die
+       done
+       # Add in proper manpages to Makefile
+       local search_text="wine.man.in"
+       if use abi_x86_64; then
+               sed -i "/${search_text}/i \
+                       "$'\\\t'"wine64.man.in "$'\\\\' loader/Makefile.in || 
die
+       fi
+       local l
+       for l in de fr pl; do
+               if has ${l} ${LINGUAS-${l}}; then
+                       sed -i "/${search_text}/i \
+                               "$'\\\t'"wine.${l}.UTF-8.man.in "$'\\\\' 
loader/Makefile.in || die
+                       if use abi_x86_64; then
+                               sed -i "/${search_text}/i \
+                                       "$'\\\t'"wine64.${l}.UTF-8.man.in 
"$'\\\\' loader/Makefile.in || die
+                       fi
+               fi
+       done
 }
 
 src_configure() {
@@ -516,14 +542,6 @@ multilib_src_install_all() {
        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
-       local l
-       for l in de fr pl; do
-               has ${l} ${LINGUAS-${l}} || rm -rf "${D%/}${MY_MANDIR}"/${l}*
-       done
-
-       eval "${glob_state}"
 }
 
 pkg_postinst() {

diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.18.ebuild 
b/app-emulation/wine-d3d9/wine-d3d9-2.18.ebuild
index 27e4223..0df97c3 100644
--- a/app-emulation/wine-d3d9/wine-d3d9-2.18.ebuild
+++ b/app-emulation/wine-d3d9/wine-d3d9-2.18.ebuild
@@ -26,7 +26,7 @@ S="${WORKDIR}/${MY_P}"
 
 D3D9_P="wine-d3d9-${PV}"
 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
-GWP_V="20170830"
+GWP_V="20180119"
 PATCHDIR="${WORKDIR}/gentoo-wine-patches"
 
 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine 
patchset"
@@ -170,7 +170,8 @@ PATCHES=(
        "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
        "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
        "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
-       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
+       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
+       
"${PATCHDIR}/patches/${MY_PN}-2.0-prevent-build-of-localized-manpages.patch" 
#469418 #617864
 )
 PATCHES_BIN=()
 
@@ -367,6 +368,31 @@ src_prepare() {
        cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
 
        l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect 
LINGUAS
+
+       # Fix manpage generation for locales #469418 and abi_x86_64 #617864
+       # Depends on wine-2.0-prevent-build-of-localized-manpages.patch"
+       # Duplicate manpages input for wine64
+       local man
+       for man in loader/*.man.in; do
+               cp ${man} ${man/wine/wine64} || die
+       done
+       # Add in proper manpages to Makefile
+       local search_text="wine.man.in"
+       if use abi_x86_64; then
+               sed -i "/${search_text}/i \
+                       "$'\\\t'"wine64.man.in "$'\\\\' loader/Makefile.in || 
die
+       fi
+       local l
+       for l in de fr pl; do
+               if has ${l} ${LINGUAS-${l}}; then
+                       sed -i "/${search_text}/i \
+                               "$'\\\t'"wine.${l}.UTF-8.man.in "$'\\\\' 
loader/Makefile.in || die
+                       if use abi_x86_64; then
+                               sed -i "/${search_text}/i \
+                                       "$'\\\t'"wine64.${l}.UTF-8.man.in 
"$'\\\\' loader/Makefile.in || die
+                       fi
+               fi
+       done
 }
 
 src_configure() {
@@ -512,14 +538,6 @@ multilib_src_install_all() {
        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
-       local l
-       for l in de fr pl; do
-               has ${l} ${LINGUAS-${l}} || rm -rf "${D%/}${MY_MANDIR}"/${l}*
-       done
-
-       eval "${glob_state}"
 }
 
 pkg_postinst() {

diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.19.ebuild 
b/app-emulation/wine-d3d9/wine-d3d9-2.19.ebuild
index 27e4223..0df97c3 100644
--- a/app-emulation/wine-d3d9/wine-d3d9-2.19.ebuild
+++ b/app-emulation/wine-d3d9/wine-d3d9-2.19.ebuild
@@ -26,7 +26,7 @@ S="${WORKDIR}/${MY_P}"
 
 D3D9_P="wine-d3d9-${PV}"
 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
-GWP_V="20170830"
+GWP_V="20180119"
 PATCHDIR="${WORKDIR}/gentoo-wine-patches"
 
 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine 
patchset"
@@ -170,7 +170,8 @@ PATCHES=(
        "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
        "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
        "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
-       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
+       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
+       
"${PATCHDIR}/patches/${MY_PN}-2.0-prevent-build-of-localized-manpages.patch" 
#469418 #617864
 )
 PATCHES_BIN=()
 
@@ -367,6 +368,31 @@ src_prepare() {
        cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
 
        l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect 
LINGUAS
+
+       # Fix manpage generation for locales #469418 and abi_x86_64 #617864
+       # Depends on wine-2.0-prevent-build-of-localized-manpages.patch"
+       # Duplicate manpages input for wine64
+       local man
+       for man in loader/*.man.in; do
+               cp ${man} ${man/wine/wine64} || die
+       done
+       # Add in proper manpages to Makefile
+       local search_text="wine.man.in"
+       if use abi_x86_64; then
+               sed -i "/${search_text}/i \
+                       "$'\\\t'"wine64.man.in "$'\\\\' loader/Makefile.in || 
die
+       fi
+       local l
+       for l in de fr pl; do
+               if has ${l} ${LINGUAS-${l}}; then
+                       sed -i "/${search_text}/i \
+                               "$'\\\t'"wine.${l}.UTF-8.man.in "$'\\\\' 
loader/Makefile.in || die
+                       if use abi_x86_64; then
+                               sed -i "/${search_text}/i \
+                                       "$'\\\t'"wine64.${l}.UTF-8.man.in 
"$'\\\\' loader/Makefile.in || die
+                       fi
+               fi
+       done
 }
 
 src_configure() {
@@ -512,14 +538,6 @@ multilib_src_install_all() {
        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
-       local l
-       for l in de fr pl; do
-               has ${l} ${LINGUAS-${l}} || rm -rf "${D%/}${MY_MANDIR}"/${l}*
-       done
-
-       eval "${glob_state}"
 }
 
 pkg_postinst() {

diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.2-r1.ebuild 
b/app-emulation/wine-d3d9/wine-d3d9-2.2-r1.ebuild
index 5c2d674..4963c3a 100644
--- a/app-emulation/wine-d3d9/wine-d3d9-2.2-r1.ebuild
+++ b/app-emulation/wine-d3d9/wine-d3d9-2.2-r1.ebuild
@@ -26,7 +26,7 @@ S="${WORKDIR}/${MY_P}"
 
 D3D9_P="wine-d3d9-${PV}"
 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
-GWP_V="20170830"
+GWP_V="20180119"
 PATCHDIR="${WORKDIR}/gentoo-wine-patches"
 
 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine 
patchset"
@@ -169,9 +169,10 @@ PATCHES=(
        "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
        "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
        "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
-       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
+       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
        "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
        "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
+       
"${PATCHDIR}/patches/${MY_PN}-2.0-prevent-build-of-localized-manpages.patch" 
#469418 #617864
 )
 PATCHES_BIN=(
        "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
@@ -370,6 +371,31 @@ src_prepare() {
        cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
 
        l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect 
LINGUAS
+
+       # Fix manpage generation for locales #469418 and abi_x86_64 #617864
+       # Depends on wine-2.0-prevent-build-of-localized-manpages.patch"
+       # Duplicate manpages input for wine64
+       local man
+       for man in loader/*.man.in; do
+               cp ${man} ${man/wine/wine64} || die
+       done
+       # Add in proper manpages to Makefile
+       local search_text="wine.man.in"
+       if use abi_x86_64; then
+               sed -i "/${search_text}/i \
+                       "$'\\\t'"wine64.man.in "$'\\\\' loader/Makefile.in || 
die
+       fi
+       local l
+       for l in de fr pl; do
+               if has ${l} ${LINGUAS-${l}}; then
+                       sed -i "/${search_text}/i \
+                               "$'\\\t'"wine.${l}.UTF-8.man.in "$'\\\\' 
loader/Makefile.in || die
+                       if use abi_x86_64; then
+                               sed -i "/${search_text}/i \
+                                       "$'\\\t'"wine64.${l}.UTF-8.man.in 
"$'\\\\' loader/Makefile.in || die
+                       fi
+               fi
+       done
 }
 
 src_configure() {
@@ -514,14 +540,6 @@ multilib_src_install_all() {
        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
-       local l
-       for l in de fr pl; do
-               has ${l} ${LINGUAS-${l}} || rm -rf "${D%/}${MY_MANDIR}"/${l}*
-       done
-
-       eval "${glob_state}"
 }
 
 pkg_postinst() {

diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.20.ebuild 
b/app-emulation/wine-d3d9/wine-d3d9-2.20.ebuild
index 836647a..7f16ff6 100644
--- a/app-emulation/wine-d3d9/wine-d3d9-2.20.ebuild
+++ b/app-emulation/wine-d3d9/wine-d3d9-2.20.ebuild
@@ -26,7 +26,7 @@ S="${WORKDIR}/${MY_P}"
 
 D3D9_P="wine-d3d9-${PV}"
 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
-GWP_V="20170830"
+GWP_V="20180119"
 PATCHDIR="${WORKDIR}/gentoo-wine-patches"
 
 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine 
patchset"
@@ -171,7 +171,8 @@ PATCHES=(
        "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
        "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
        "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
-       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
+       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
+       
"${PATCHDIR}/patches/${MY_PN}-2.0-prevent-build-of-localized-manpages.patch" 
#469418 #617864
 )
 PATCHES_BIN=()
 
@@ -368,6 +369,31 @@ src_prepare() {
        cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
 
        l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect 
LINGUAS
+
+       # Fix manpage generation for locales #469418 and abi_x86_64 #617864
+       # Depends on wine-2.0-prevent-build-of-localized-manpages.patch"
+       # Duplicate manpages input for wine64
+       local man
+       for man in loader/*.man.in; do
+               cp ${man} ${man/wine/wine64} || die
+       done
+       # Add in proper manpages to Makefile
+       local search_text="wine.man.in"
+       if use abi_x86_64; then
+               sed -i "/${search_text}/i \
+                       "$'\\\t'"wine64.man.in "$'\\\\' loader/Makefile.in || 
die
+       fi
+       local l
+       for l in de fr pl; do
+               if has ${l} ${LINGUAS-${l}}; then
+                       sed -i "/${search_text}/i \
+                               "$'\\\t'"wine.${l}.UTF-8.man.in "$'\\\\' 
loader/Makefile.in || die
+                       if use abi_x86_64; then
+                               sed -i "/${search_text}/i \
+                                       "$'\\\t'"wine64.${l}.UTF-8.man.in 
"$'\\\\' loader/Makefile.in || die
+                       fi
+               fi
+       done
 }
 
 src_configure() {
@@ -514,14 +540,6 @@ multilib_src_install_all() {
        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
-       local l
-       for l in de fr pl; do
-               has ${l} ${LINGUAS-${l}} || rm -rf "${D%/}${MY_MANDIR}"/${l}*
-       done
-
-       eval "${glob_state}"
 }
 
 pkg_postinst() {

diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.21.ebuild 
b/app-emulation/wine-d3d9/wine-d3d9-2.21.ebuild
index 836647a..7f16ff6 100644
--- a/app-emulation/wine-d3d9/wine-d3d9-2.21.ebuild
+++ b/app-emulation/wine-d3d9/wine-d3d9-2.21.ebuild
@@ -26,7 +26,7 @@ S="${WORKDIR}/${MY_P}"
 
 D3D9_P="wine-d3d9-${PV}"
 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
-GWP_V="20170830"
+GWP_V="20180119"
 PATCHDIR="${WORKDIR}/gentoo-wine-patches"
 
 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine 
patchset"
@@ -171,7 +171,8 @@ PATCHES=(
        "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
        "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
        "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
-       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
+       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
+       
"${PATCHDIR}/patches/${MY_PN}-2.0-prevent-build-of-localized-manpages.patch" 
#469418 #617864
 )
 PATCHES_BIN=()
 
@@ -368,6 +369,31 @@ src_prepare() {
        cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
 
        l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect 
LINGUAS
+
+       # Fix manpage generation for locales #469418 and abi_x86_64 #617864
+       # Depends on wine-2.0-prevent-build-of-localized-manpages.patch"
+       # Duplicate manpages input for wine64
+       local man
+       for man in loader/*.man.in; do
+               cp ${man} ${man/wine/wine64} || die
+       done
+       # Add in proper manpages to Makefile
+       local search_text="wine.man.in"
+       if use abi_x86_64; then
+               sed -i "/${search_text}/i \
+                       "$'\\\t'"wine64.man.in "$'\\\\' loader/Makefile.in || 
die
+       fi
+       local l
+       for l in de fr pl; do
+               if has ${l} ${LINGUAS-${l}}; then
+                       sed -i "/${search_text}/i \
+                               "$'\\\t'"wine.${l}.UTF-8.man.in "$'\\\\' 
loader/Makefile.in || die
+                       if use abi_x86_64; then
+                               sed -i "/${search_text}/i \
+                                       "$'\\\t'"wine64.${l}.UTF-8.man.in 
"$'\\\\' loader/Makefile.in || die
+                       fi
+               fi
+       done
 }
 
 src_configure() {
@@ -514,14 +540,6 @@ multilib_src_install_all() {
        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
-       local l
-       for l in de fr pl; do
-               has ${l} ${LINGUAS-${l}} || rm -rf "${D%/}${MY_MANDIR}"/${l}*
-       done
-
-       eval "${glob_state}"
 }
 
 pkg_postinst() {

diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.3-r1.ebuild 
b/app-emulation/wine-d3d9/wine-d3d9-2.3-r1.ebuild
index 5c2d674..4963c3a 100644
--- a/app-emulation/wine-d3d9/wine-d3d9-2.3-r1.ebuild
+++ b/app-emulation/wine-d3d9/wine-d3d9-2.3-r1.ebuild
@@ -26,7 +26,7 @@ S="${WORKDIR}/${MY_P}"
 
 D3D9_P="wine-d3d9-${PV}"
 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
-GWP_V="20170830"
+GWP_V="20180119"
 PATCHDIR="${WORKDIR}/gentoo-wine-patches"
 
 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine 
patchset"
@@ -169,9 +169,10 @@ PATCHES=(
        "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
        "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
        "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
-       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
+       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
        "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
        "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
+       
"${PATCHDIR}/patches/${MY_PN}-2.0-prevent-build-of-localized-manpages.patch" 
#469418 #617864
 )
 PATCHES_BIN=(
        "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
@@ -370,6 +371,31 @@ src_prepare() {
        cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
 
        l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect 
LINGUAS
+
+       # Fix manpage generation for locales #469418 and abi_x86_64 #617864
+       # Depends on wine-2.0-prevent-build-of-localized-manpages.patch"
+       # Duplicate manpages input for wine64
+       local man
+       for man in loader/*.man.in; do
+               cp ${man} ${man/wine/wine64} || die
+       done
+       # Add in proper manpages to Makefile
+       local search_text="wine.man.in"
+       if use abi_x86_64; then
+               sed -i "/${search_text}/i \
+                       "$'\\\t'"wine64.man.in "$'\\\\' loader/Makefile.in || 
die
+       fi
+       local l
+       for l in de fr pl; do
+               if has ${l} ${LINGUAS-${l}}; then
+                       sed -i "/${search_text}/i \
+                               "$'\\\t'"wine.${l}.UTF-8.man.in "$'\\\\' 
loader/Makefile.in || die
+                       if use abi_x86_64; then
+                               sed -i "/${search_text}/i \
+                                       "$'\\\t'"wine64.${l}.UTF-8.man.in 
"$'\\\\' loader/Makefile.in || die
+                       fi
+               fi
+       done
 }
 
 src_configure() {
@@ -514,14 +540,6 @@ multilib_src_install_all() {
        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
-       local l
-       for l in de fr pl; do
-               has ${l} ${LINGUAS-${l}} || rm -rf "${D%/}${MY_MANDIR}"/${l}*
-       done
-
-       eval "${glob_state}"
 }
 
 pkg_postinst() {

diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.4-r1.ebuild 
b/app-emulation/wine-d3d9/wine-d3d9-2.4-r1.ebuild
index 565f3d3..73d161b 100644
--- a/app-emulation/wine-d3d9/wine-d3d9-2.4-r1.ebuild
+++ b/app-emulation/wine-d3d9/wine-d3d9-2.4-r1.ebuild
@@ -26,7 +26,7 @@ S="${WORKDIR}/${MY_P}"
 
 D3D9_P="wine-d3d9-${PV}"
 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
-GWP_V="20170830"
+GWP_V="20180119"
 PATCHDIR="${WORKDIR}/gentoo-wine-patches"
 
 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine 
patchset"
@@ -169,9 +169,10 @@ PATCHES=(
        "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
        "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
        "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
-       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
+       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
        "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
        "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
+       
"${PATCHDIR}/patches/${MY_PN}-2.0-prevent-build-of-localized-manpages.patch" 
#469418 #617864
 )
 PATCHES_BIN=(
        "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
@@ -370,6 +371,31 @@ src_prepare() {
        cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
 
        l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect 
LINGUAS
+
+       # Fix manpage generation for locales #469418 and abi_x86_64 #617864
+       # Depends on wine-2.0-prevent-build-of-localized-manpages.patch"
+       # Duplicate manpages input for wine64
+       local man
+       for man in loader/*.man.in; do
+               cp ${man} ${man/wine/wine64} || die
+       done
+       # Add in proper manpages to Makefile
+       local search_text="wine.man.in"
+       if use abi_x86_64; then
+               sed -i "/${search_text}/i \
+                       "$'\\\t'"wine64.man.in "$'\\\\' loader/Makefile.in || 
die
+       fi
+       local l
+       for l in de fr pl; do
+               if has ${l} ${LINGUAS-${l}}; then
+                       sed -i "/${search_text}/i \
+                               "$'\\\t'"wine.${l}.UTF-8.man.in "$'\\\\' 
loader/Makefile.in || die
+                       if use abi_x86_64; then
+                               sed -i "/${search_text}/i \
+                                       "$'\\\t'"wine64.${l}.UTF-8.man.in 
"$'\\\\' loader/Makefile.in || die
+                       fi
+               fi
+       done
 }
 
 src_configure() {
@@ -514,14 +540,6 @@ multilib_src_install_all() {
        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
-       local l
-       for l in de fr pl; do
-               has ${l} ${LINGUAS-${l}} || rm -rf "${D%/}${MY_MANDIR}"/${l}*
-       done
-
-       eval "${glob_state}"
 }
 
 pkg_postinst() {

diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.5-r1.ebuild 
b/app-emulation/wine-d3d9/wine-d3d9-2.5-r1.ebuild
index 565f3d3..73d161b 100644
--- a/app-emulation/wine-d3d9/wine-d3d9-2.5-r1.ebuild
+++ b/app-emulation/wine-d3d9/wine-d3d9-2.5-r1.ebuild
@@ -26,7 +26,7 @@ S="${WORKDIR}/${MY_P}"
 
 D3D9_P="wine-d3d9-${PV}"
 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
-GWP_V="20170830"
+GWP_V="20180119"
 PATCHDIR="${WORKDIR}/gentoo-wine-patches"
 
 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine 
patchset"
@@ -169,9 +169,10 @@ PATCHES=(
        "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
        "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
        "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
-       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
+       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
        "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
        "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
+       
"${PATCHDIR}/patches/${MY_PN}-2.0-prevent-build-of-localized-manpages.patch" 
#469418 #617864
 )
 PATCHES_BIN=(
        "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
@@ -370,6 +371,31 @@ src_prepare() {
        cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
 
        l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect 
LINGUAS
+
+       # Fix manpage generation for locales #469418 and abi_x86_64 #617864
+       # Depends on wine-2.0-prevent-build-of-localized-manpages.patch"
+       # Duplicate manpages input for wine64
+       local man
+       for man in loader/*.man.in; do
+               cp ${man} ${man/wine/wine64} || die
+       done
+       # Add in proper manpages to Makefile
+       local search_text="wine.man.in"
+       if use abi_x86_64; then
+               sed -i "/${search_text}/i \
+                       "$'\\\t'"wine64.man.in "$'\\\\' loader/Makefile.in || 
die
+       fi
+       local l
+       for l in de fr pl; do
+               if has ${l} ${LINGUAS-${l}}; then
+                       sed -i "/${search_text}/i \
+                               "$'\\\t'"wine.${l}.UTF-8.man.in "$'\\\\' 
loader/Makefile.in || die
+                       if use abi_x86_64; then
+                               sed -i "/${search_text}/i \
+                                       "$'\\\t'"wine64.${l}.UTF-8.man.in 
"$'\\\\' loader/Makefile.in || die
+                       fi
+               fi
+       done
 }
 
 src_configure() {
@@ -514,14 +540,6 @@ multilib_src_install_all() {
        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
-       local l
-       for l in de fr pl; do
-               has ${l} ${LINGUAS-${l}} || rm -rf "${D%/}${MY_MANDIR}"/${l}*
-       done
-
-       eval "${glob_state}"
 }
 
 pkg_postinst() {

diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.6-r1.ebuild 
b/app-emulation/wine-d3d9/wine-d3d9-2.6-r1.ebuild
index 565f3d3..73d161b 100644
--- a/app-emulation/wine-d3d9/wine-d3d9-2.6-r1.ebuild
+++ b/app-emulation/wine-d3d9/wine-d3d9-2.6-r1.ebuild
@@ -26,7 +26,7 @@ S="${WORKDIR}/${MY_P}"
 
 D3D9_P="wine-d3d9-${PV}"
 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
-GWP_V="20170830"
+GWP_V="20180119"
 PATCHDIR="${WORKDIR}/gentoo-wine-patches"
 
 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine 
patchset"
@@ -169,9 +169,10 @@ PATCHES=(
        "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
        "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
        "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
-       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
+       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
        "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
        "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
+       
"${PATCHDIR}/patches/${MY_PN}-2.0-prevent-build-of-localized-manpages.patch" 
#469418 #617864
 )
 PATCHES_BIN=(
        "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
@@ -370,6 +371,31 @@ src_prepare() {
        cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
 
        l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect 
LINGUAS
+
+       # Fix manpage generation for locales #469418 and abi_x86_64 #617864
+       # Depends on wine-2.0-prevent-build-of-localized-manpages.patch"
+       # Duplicate manpages input for wine64
+       local man
+       for man in loader/*.man.in; do
+               cp ${man} ${man/wine/wine64} || die
+       done
+       # Add in proper manpages to Makefile
+       local search_text="wine.man.in"
+       if use abi_x86_64; then
+               sed -i "/${search_text}/i \
+                       "$'\\\t'"wine64.man.in "$'\\\\' loader/Makefile.in || 
die
+       fi
+       local l
+       for l in de fr pl; do
+               if has ${l} ${LINGUAS-${l}}; then
+                       sed -i "/${search_text}/i \
+                               "$'\\\t'"wine.${l}.UTF-8.man.in "$'\\\\' 
loader/Makefile.in || die
+                       if use abi_x86_64; then
+                               sed -i "/${search_text}/i \
+                                       "$'\\\t'"wine64.${l}.UTF-8.man.in 
"$'\\\\' loader/Makefile.in || die
+                       fi
+               fi
+       done
 }
 
 src_configure() {
@@ -514,14 +540,6 @@ multilib_src_install_all() {
        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
-       local l
-       for l in de fr pl; do
-               has ${l} ${LINGUAS-${l}} || rm -rf "${D%/}${MY_MANDIR}"/${l}*
-       done
-
-       eval "${glob_state}"
 }
 
 pkg_postinst() {

diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.7-r1.ebuild 
b/app-emulation/wine-d3d9/wine-d3d9-2.7-r1.ebuild
index 565f3d3..73d161b 100644
--- a/app-emulation/wine-d3d9/wine-d3d9-2.7-r1.ebuild
+++ b/app-emulation/wine-d3d9/wine-d3d9-2.7-r1.ebuild
@@ -26,7 +26,7 @@ S="${WORKDIR}/${MY_P}"
 
 D3D9_P="wine-d3d9-${PV}"
 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
-GWP_V="20170830"
+GWP_V="20180119"
 PATCHDIR="${WORKDIR}/gentoo-wine-patches"
 
 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine 
patchset"
@@ -169,9 +169,10 @@ PATCHES=(
        "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
        "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
        "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
-       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
+       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
        "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
        "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
+       
"${PATCHDIR}/patches/${MY_PN}-2.0-prevent-build-of-localized-manpages.patch" 
#469418 #617864
 )
 PATCHES_BIN=(
        "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
@@ -370,6 +371,31 @@ src_prepare() {
        cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
 
        l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect 
LINGUAS
+
+       # Fix manpage generation for locales #469418 and abi_x86_64 #617864
+       # Depends on wine-2.0-prevent-build-of-localized-manpages.patch"
+       # Duplicate manpages input for wine64
+       local man
+       for man in loader/*.man.in; do
+               cp ${man} ${man/wine/wine64} || die
+       done
+       # Add in proper manpages to Makefile
+       local search_text="wine.man.in"
+       if use abi_x86_64; then
+               sed -i "/${search_text}/i \
+                       "$'\\\t'"wine64.man.in "$'\\\\' loader/Makefile.in || 
die
+       fi
+       local l
+       for l in de fr pl; do
+               if has ${l} ${LINGUAS-${l}}; then
+                       sed -i "/${search_text}/i \
+                               "$'\\\t'"wine.${l}.UTF-8.man.in "$'\\\\' 
loader/Makefile.in || die
+                       if use abi_x86_64; then
+                               sed -i "/${search_text}/i \
+                                       "$'\\\t'"wine64.${l}.UTF-8.man.in 
"$'\\\\' loader/Makefile.in || die
+                       fi
+               fi
+       done
 }
 
 src_configure() {
@@ -514,14 +540,6 @@ multilib_src_install_all() {
        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
-       local l
-       for l in de fr pl; do
-               has ${l} ${LINGUAS-${l}} || rm -rf "${D%/}${MY_MANDIR}"/${l}*
-       done
-
-       eval "${glob_state}"
 }
 
 pkg_postinst() {

diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.8-r1.ebuild 
b/app-emulation/wine-d3d9/wine-d3d9-2.8-r1.ebuild
index 565f3d3..73d161b 100644
--- a/app-emulation/wine-d3d9/wine-d3d9-2.8-r1.ebuild
+++ b/app-emulation/wine-d3d9/wine-d3d9-2.8-r1.ebuild
@@ -26,7 +26,7 @@ S="${WORKDIR}/${MY_P}"
 
 D3D9_P="wine-d3d9-${PV}"
 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
-GWP_V="20170830"
+GWP_V="20180119"
 PATCHDIR="${WORKDIR}/gentoo-wine-patches"
 
 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine 
patchset"
@@ -169,9 +169,10 @@ PATCHES=(
        "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
        "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
        "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
-       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
+       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
        "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
        "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
+       
"${PATCHDIR}/patches/${MY_PN}-2.0-prevent-build-of-localized-manpages.patch" 
#469418 #617864
 )
 PATCHES_BIN=(
        "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
@@ -370,6 +371,31 @@ src_prepare() {
        cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
 
        l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect 
LINGUAS
+
+       # Fix manpage generation for locales #469418 and abi_x86_64 #617864
+       # Depends on wine-2.0-prevent-build-of-localized-manpages.patch"
+       # Duplicate manpages input for wine64
+       local man
+       for man in loader/*.man.in; do
+               cp ${man} ${man/wine/wine64} || die
+       done
+       # Add in proper manpages to Makefile
+       local search_text="wine.man.in"
+       if use abi_x86_64; then
+               sed -i "/${search_text}/i \
+                       "$'\\\t'"wine64.man.in "$'\\\\' loader/Makefile.in || 
die
+       fi
+       local l
+       for l in de fr pl; do
+               if has ${l} ${LINGUAS-${l}}; then
+                       sed -i "/${search_text}/i \
+                               "$'\\\t'"wine.${l}.UTF-8.man.in "$'\\\\' 
loader/Makefile.in || die
+                       if use abi_x86_64; then
+                               sed -i "/${search_text}/i \
+                                       "$'\\\t'"wine64.${l}.UTF-8.man.in 
"$'\\\\' loader/Makefile.in || die
+                       fi
+               fi
+       done
 }
 
 src_configure() {
@@ -514,14 +540,6 @@ multilib_src_install_all() {
        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
-       local l
-       for l in de fr pl; do
-               has ${l} ${LINGUAS-${l}} || rm -rf "${D%/}${MY_MANDIR}"/${l}*
-       done
-
-       eval "${glob_state}"
 }
 
 pkg_postinst() {

diff --git a/app-emulation/wine-d3d9/wine-d3d9-2.9-r1.ebuild 
b/app-emulation/wine-d3d9/wine-d3d9-2.9-r1.ebuild
index 73b1646..4c3f847 100644
--- a/app-emulation/wine-d3d9/wine-d3d9-2.9-r1.ebuild
+++ b/app-emulation/wine-d3d9/wine-d3d9-2.9-r1.ebuild
@@ -26,7 +26,7 @@ S="${WORKDIR}/${MY_P}"
 
 D3D9_P="wine-d3d9-${PV}"
 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
-GWP_V="20170830"
+GWP_V="20180119"
 PATCHDIR="${WORKDIR}/gentoo-wine-patches"
 
 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine 
patchset"
@@ -170,9 +170,10 @@ PATCHES=(
        "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
        "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
        "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
-       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
+       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
        "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676
        "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376
+       
"${PATCHDIR}/patches/${MY_PN}-2.0-prevent-build-of-localized-manpages.patch" 
#469418 #617864
 )
 PATCHES_BIN=(
        "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376
@@ -371,6 +372,31 @@ src_prepare() {
        cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
 
        l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect 
LINGUAS
+
+       # Fix manpage generation for locales #469418 and abi_x86_64 #617864
+       # Depends on wine-2.0-prevent-build-of-localized-manpages.patch"
+       # Duplicate manpages input for wine64
+       local man
+       for man in loader/*.man.in; do
+               cp ${man} ${man/wine/wine64} || die
+       done
+       # Add in proper manpages to Makefile
+       local search_text="wine.man.in"
+       if use abi_x86_64; then
+               sed -i "/${search_text}/i \
+                       "$'\\\t'"wine64.man.in "$'\\\\' loader/Makefile.in || 
die
+       fi
+       local l
+       for l in de fr pl; do
+               if has ${l} ${LINGUAS-${l}}; then
+                       sed -i "/${search_text}/i \
+                               "$'\\\t'"wine.${l}.UTF-8.man.in "$'\\\\' 
loader/Makefile.in || die
+                       if use abi_x86_64; then
+                               sed -i "/${search_text}/i \
+                                       "$'\\\t'"wine64.${l}.UTF-8.man.in 
"$'\\\\' loader/Makefile.in || die
+                       fi
+               fi
+       done
 }
 
 src_configure() {
@@ -516,14 +542,6 @@ multilib_src_install_all() {
        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
-       local l
-       for l in de fr pl; do
-               has ${l} ${LINGUAS-${l}} || rm -rf "${D%/}${MY_MANDIR}"/${l}*
-       done
-
-       eval "${glob_state}"
 }
 
 pkg_postinst() {

diff --git a/app-emulation/wine-d3d9/wine-d3d9-9999.ebuild 
b/app-emulation/wine-d3d9/wine-d3d9-9999.ebuild
index 836647a..7f16ff6 100644
--- a/app-emulation/wine-d3d9/wine-d3d9-9999.ebuild
+++ b/app-emulation/wine-d3d9/wine-d3d9-9999.ebuild
@@ -26,7 +26,7 @@ S="${WORKDIR}/${MY_P}"
 
 D3D9_P="wine-d3d9-${PV}"
 D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
-GWP_V="20170830"
+GWP_V="20180119"
 PATCHDIR="${WORKDIR}/gentoo-wine-patches"
 
 DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine 
patchset"
@@ -171,7 +171,8 @@ PATCHES=(
        "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
        "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
        "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
-       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
+       "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
+       
"${PATCHDIR}/patches/${MY_PN}-2.0-prevent-build-of-localized-manpages.patch" 
#469418 #617864
 )
 PATCHES_BIN=()
 
@@ -368,6 +369,31 @@ src_prepare() {
        cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
 
        l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect 
LINGUAS
+
+       # Fix manpage generation for locales #469418 and abi_x86_64 #617864
+       # Depends on wine-2.0-prevent-build-of-localized-manpages.patch"
+       # Duplicate manpages input for wine64
+       local man
+       for man in loader/*.man.in; do
+               cp ${man} ${man/wine/wine64} || die
+       done
+       # Add in proper manpages to Makefile
+       local search_text="wine.man.in"
+       if use abi_x86_64; then
+               sed -i "/${search_text}/i \
+                       "$'\\\t'"wine64.man.in "$'\\\\' loader/Makefile.in || 
die
+       fi
+       local l
+       for l in de fr pl; do
+               if has ${l} ${LINGUAS-${l}}; then
+                       sed -i "/${search_text}/i \
+                               "$'\\\t'"wine.${l}.UTF-8.man.in "$'\\\\' 
loader/Makefile.in || die
+                       if use abi_x86_64; then
+                               sed -i "/${search_text}/i \
+                                       "$'\\\t'"wine64.${l}.UTF-8.man.in 
"$'\\\\' loader/Makefile.in || die
+                       fi
+               fi
+       done
 }
 
 src_configure() {
@@ -514,14 +540,6 @@ multilib_src_install_all() {
        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
-       local l
-       for l in de fr pl; do
-               has ${l} ${LINGUAS-${l}} || rm -rf "${D%/}${MY_MANDIR}"/${l}*
-       done
-
-       eval "${glob_state}"
 }
 
 pkg_postinst() {

Reply via email to