diff options
author | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2017-11-29 03:22:56 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2017-11-29 03:22:56 +0300 |
commit | 1f8d7b29673ec452bc027afb26587816f1887043 (patch) | |
tree | 233ed1267eea30b617d0dea3f700219fc740691f | |
parent | 62b2db1103910799da63e43aba15b55ab87d2d89 (diff) |
wine: merged with recent gentoo changes
-rw-r--r-- | app-emulation/wine-staging/files/wine-1.5.26-winegcc.patch (renamed from app-emulation/wine/files/wine-1.5.26-winegcc.patch) | 0 | ||||
-rw-r--r-- | app-emulation/wine-staging/files/wine-1.6-memset-O3.patch (renamed from app-emulation/wine/files/wine-1.6-memset-O3.patch) | 0 | ||||
-rw-r--r-- | app-emulation/wine-staging/files/wine-1.7.12-osmesa-check.patch (renamed from app-emulation/wine/files/wine-1.7.12-osmesa-check.patch) | 0 | ||||
-rw-r--r-- | app-emulation/wine-staging/files/wine-1.7.55-gstreamer-v5-staging-post.patch (renamed from app-emulation/wine/files/wine-1.7.55-gstreamer-v5-staging-post.patch) | 0 | ||||
-rw-r--r-- | app-emulation/wine-staging/files/wine-1.7.55-gstreamer-v5-staging-pre.patch (renamed from app-emulation/wine/files/wine-1.7.55-gstreamer-v5-staging-pre.patch) | 0 | ||||
-rw-r--r-- | app-emulation/wine-staging/files/wine-1.9.5-multilib-portage.patch (renamed from app-emulation/wine/files/wine-1.9.5-multilib-portage.patch) | 0 | ||||
-rw-r--r-- | app-emulation/wine-staging/files/wine-gcc-4.9-null-pointer.patch (renamed from app-emulation/wine/files/wine-gcc-4.9-null-pointer.patch) | 0 | ||||
-rw-r--r-- | app-emulation/wine-staging/wine-staging-scm.ebuild (renamed from app-emulation/wine/wine-scm.ebuild) | 293 |
8 files changed, 172 insertions, 121 deletions
diff --git a/app-emulation/wine/files/wine-1.5.26-winegcc.patch b/app-emulation/wine-staging/files/wine-1.5.26-winegcc.patch index 2045e34..2045e34 100644 --- a/app-emulation/wine/files/wine-1.5.26-winegcc.patch +++ b/app-emulation/wine-staging/files/wine-1.5.26-winegcc.patch diff --git a/app-emulation/wine/files/wine-1.6-memset-O3.patch b/app-emulation/wine-staging/files/wine-1.6-memset-O3.patch index 75372f8..75372f8 100644 --- a/app-emulation/wine/files/wine-1.6-memset-O3.patch +++ b/app-emulation/wine-staging/files/wine-1.6-memset-O3.patch diff --git a/app-emulation/wine/files/wine-1.7.12-osmesa-check.patch b/app-emulation/wine-staging/files/wine-1.7.12-osmesa-check.patch index 7cafcd4..7cafcd4 100644 --- a/app-emulation/wine/files/wine-1.7.12-osmesa-check.patch +++ b/app-emulation/wine-staging/files/wine-1.7.12-osmesa-check.patch diff --git a/app-emulation/wine/files/wine-1.7.55-gstreamer-v5-staging-post.patch b/app-emulation/wine-staging/files/wine-1.7.55-gstreamer-v5-staging-post.patch index c36dd4d..c36dd4d 100644 --- a/app-emulation/wine/files/wine-1.7.55-gstreamer-v5-staging-post.patch +++ b/app-emulation/wine-staging/files/wine-1.7.55-gstreamer-v5-staging-post.patch diff --git a/app-emulation/wine/files/wine-1.7.55-gstreamer-v5-staging-pre.patch b/app-emulation/wine-staging/files/wine-1.7.55-gstreamer-v5-staging-pre.patch index e9c9ac1..e9c9ac1 100644 --- a/app-emulation/wine/files/wine-1.7.55-gstreamer-v5-staging-pre.patch +++ b/app-emulation/wine-staging/files/wine-1.7.55-gstreamer-v5-staging-pre.patch diff --git a/app-emulation/wine/files/wine-1.9.5-multilib-portage.patch b/app-emulation/wine-staging/files/wine-1.9.5-multilib-portage.patch index 2166865..2166865 100644 --- a/app-emulation/wine/files/wine-1.9.5-multilib-portage.patch +++ b/app-emulation/wine-staging/files/wine-1.9.5-multilib-portage.patch diff --git a/app-emulation/wine/files/wine-gcc-4.9-null-pointer.patch b/app-emulation/wine-staging/files/wine-gcc-4.9-null-pointer.patch index 213f2c6..213f2c6 100644 --- a/app-emulation/wine/files/wine-gcc-4.9-null-pointer.patch +++ b/app-emulation/wine-staging/files/wine-gcc-4.9-null-pointer.patch diff --git a/app-emulation/wine/wine-scm.ebuild b/app-emulation/wine-staging/wine-staging-scm.ebuild index 62bd522..733cff4 100644 --- a/app-emulation/wine/wine-scm.ebuild +++ b/app-emulation/wine-staging/wine-staging-scm.ebuild @@ -1,55 +1,39 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Id$ EAPI=6 PLOCALES="ar bg ca cs da de el en en_US eo es fa fi fr he hi hr hu it ja ko lt ml nb_NO nl or pa pl pt_BR pt_PT rm ro ru sk sl sr_RS@cyrillic sr_RS@latin sv te th tr uk wa zh_CN zh_TW" PLOCALE_BACKUP="en" -inherit autotools eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator +inherit autotools eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils -EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git" +MY_PN="${PN%%-*}" +MY_P="${MY_PN}-${PV}" + +EGIT_REPO_URI="https://source.winehq.org/git/wine.git" EGIT_BRANCH="master" inherit git-r3 SRC_URI="" #KEYWORDS="" +S="${WORKDIR}/${MY_P}" -VANILLA_GV="2.47" -VANILLA_MV="4.6.3" -STAGING_GV="2.47" -STAGING_MV="4.6.3" -[[ ${MAJOR_V} == "1.8" ]] && SUFFIX="-unofficial" STAGING_P="wine-staging-${PV}" -STAGING_DIR="${WORKDIR}/${STAGING_P}${SUFFIX}" -D3D9_P="wine-d3d9-${PV}" -D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}" -WINE_GENTOO="wine-gentoo-2015.03.07" -DESCRIPTION="Free implementation of Windows(tm) on Unix" -HOMEPAGE="http://www.winehq.org/" +STAGING_DIR="${WORKDIR}/${STAGING_P}" +GWP_V="20170830" +PATCHDIR="${WORKDIR}/gentoo-wine-patches" + +DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset" +HOMEPAGE="https://www.winehq.org/" SRC_URI="${SRC_URI} - !staging? ( - gecko? ( - abi_x86_32? ( https://dl.winehq.org/wine/wine-gecko/${VANILLA_GV}/wine_gecko-${VANILLA_GV}-x86.msi ) - abi_x86_64? ( https://dl.winehq.org/wine/wine-gecko/${VANILLA_GV}/wine_gecko-${VANILLA_GV}-x86_64.msi ) - ) - mono? ( https://dl.winehq.org/wine/wine-mono/${VANILLA_MV}/wine-mono-${VANILLA_MV}.msi ) - ) - staging? ( - gecko? ( - abi_x86_32? ( https://dl.winehq.org/wine/wine-gecko/${STAGING_GV}/wine_gecko-${STAGING_GV}-x86.msi ) - abi_x86_64? ( https://dl.winehq.org/wine/wine-gecko/${STAGING_GV}/wine_gecko-${STAGING_GV}-x86_64.msi ) - ) - mono? ( https://dl.winehq.org/wine/wine-mono/${STAGING_MV}/wine-mono-${STAGING_MV}.msi ) - ) - https://dev.gentoo.org/~tetromino/distfiles/${PN}/${WINE_GENTOO}.tar.bz2" + https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz +" -STAGING_EGIT_REPO_URI="git://github.com/wine-compholio/wine-staging.git" -D3D9_EGIT_REPO_URI="git://github.com/sarnex/wine-d3d9-patches.git" +STAGING_EGIT_REPO_URI="https://github.com/wine-compholio/wine-staging.git" LICENSE="LGPL-2.1" -SLOT="0" -IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags d3d9 dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg kernel_FreeBSD +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl pcap pipelight +png prelink pulseaudio +realtime +run-exes s3tc samba scanner selinux +ssl staging test themes +threads +truetype udev +udisks v4l vaapi +X +xcomposite xinerama +xml" +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 pipelight +png prelink pulseaudio +realtime +run-exes s3tc samba scanner selinux +ssl staging test themes +threads +truetype udev +udisks v4l vaapi +X +xcomposite xinerama +xml" REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) X? ( truetype ) elibc_glibc? ( threads ) @@ -68,6 +52,7 @@ COMMON_DEPEND=" X? ( x11-libs/libXcursor[${MULTILIB_USEDEP}] x11-libs/libXext[${MULTILIB_USEDEP}] + x11-libs/libXfixes[${MULTILIB_USEDEP}] x11-libs/libXrandr[${MULTILIB_USEDEP}] x11-libs/libXi[${MULTILIB_USEDEP}] x11-libs/libXxf86vm[${MULTILIB_USEDEP}] @@ -75,12 +60,6 @@ COMMON_DEPEND=" alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] ) cups? ( net-print/cups:=[${MULTILIB_USEDEP}] ) - d3d9? ( - media-libs/mesa[d3d9,egl,${MULTILIB_USEDEP}] - x11-libs/libX11[${MULTILIB_USEDEP}] - x11-libs/libXext[${MULTILIB_USEDEP}] - x11-libs/libxcb[${MULTILIB_USEDEP}] - ) fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] ) gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] ) @@ -102,7 +81,7 @@ COMMON_DEPEND=" virtual/glu[${MULTILIB_USEDEP}] virtual/opengl[${MULTILIB_USEDEP}] ) - osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] ) + osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] ) pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] ) @@ -143,7 +122,12 @@ COMMON_DEPEND=" )" 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.1 ) perl? ( dev-lang/perl dev-perl/XML-Simple @@ -181,6 +165,19 @@ usr/share/applications/wine-notepad.desktop usr/share/applications/wine-uninstaller.desktop usr/share/applications/wine-winecfg.desktop" +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" +) +PATCHES_BIN=() + +# https://bugs.gentoo.org/show_bug.cgi?id=635222 +if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then + DEPEND+=" dev-util/patchbin" +fi + wine_compiler_check() { [[ ${MERGE_TYPE} = "binary" ]] && return 0 @@ -189,7 +186,7 @@ wine_compiler_check() { # 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 + $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die # Run in subshell to prevent "Aborted" message ( "${T}"/pr66838 || false ) >/dev/null 2>&1 if ! eend $?; then @@ -205,7 +202,7 @@ wine_compiler_check() { 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 + ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/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," @@ -218,23 +215,46 @@ wine_compiler_check() { 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 + 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 "${PATCHDIR}/files/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." @@ -248,10 +268,10 @@ wine_env_vcs_vars() { local pn_live_val="${pn_live_var}" eval pn_live_val='$'${pn_live_val} if [[ ! -z ${pn_live_val} ]]; then - if use staging || use d3d9; then - eerror "Because of the multi-repo nature of ${PN}, ${pn_live_var}" + if use staging; then + eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}" eerror "cannot be used to set the commit. Instead, you may use the" - eerror "environmental variables WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT." + eerror "environmental variables WINE_COMMIT, and STAGING_COMMIT." eerror return 1 fi @@ -265,7 +285,6 @@ wine_env_vcs_vars() { } pkg_pretend() { - wine_compiler_check || die wine_build_environment_check || die # Verify OSS support @@ -282,17 +301,22 @@ pkg_pretend() { pkg_setup() { wine_build_environment_check || die wine_env_vcs_vars || die - if ! use staging; then - GV=${VANILLA_GV} - MV=${VANILLA_MV} - else - GV=${STAGING_GV} - MV=${STAGING_MV} - fi + + 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() { - EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack + EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack if use staging; then local CURRENT_WINE_COMMIT=${EGIT_VERSION} @@ -307,10 +331,6 @@ src_unpack() { einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine" fi fi - if use d3d9; then - git-r3_fetch "${D3D9_EGIT_REPO_URI}" "${D3D9_COMMIT}" - git-r3_checkout "${D3D9_EGIT_REPO_URI}" "${D3D9_DIR}" - fi default @@ -318,18 +338,22 @@ src_unpack() { } src_prepare() { + + eapply_bin(){ + local patch + for patch in ${PATCHES_BIN[@]}; do + patchbin --nogit < "${patch}" || die + done + } + local md5="$(md5sum server/protocol.def)" - local PATCHES=( - "${FILESDIR}"/${PN}-1.5.26-winegcc.patch #260726 -# "${FILESDIR}"/${PN}-1.9.5-multilib-portage.patch #395615 -# "${FILESDIR}"/${PN}-1.7.12-osmesa-check.patch #429386 - "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508 - ) + if use staging; then ewarn "Applying the Wine-Staging patchset. Any bug reports to the" ewarn "Wine bugzilla should explicitly state that staging was used." local STAGING_EXCLUDE="" + STAGING_EXCLUDE="${STAGING_EXCLUDE} -W winhlp32-Flex_Workaround" # Avoid double patching https://bugs.winehq.org/show_bug.cgi?id=42132 use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight" # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches @@ -340,22 +364,10 @@ src_prepare() { source "${STAGING_DIR}/patches/patchinstall.sh" ) eend $? || die "Failed to apply Wine-Staging patches" - - # To differentiate unofficial staging releases - if [[ ! -z ${SUFFIX} ]]; then - sed -i "s/(Staging)/(Staging [Unofficial])/" libs/wine/Makefile.in || die - fi - fi - if use d3d9; then - if use staging; then - PATCHES+=( "${D3D9_DIR}/staging-helper.patch" ) - else - PATCHES+=( "${D3D9_DIR}/d3d9-helper.patch" ) - fi - PATCHES+=( "${D3D9_DIR}/wine-d3d9.patch" ) fi default + eapply_bin eautoreconf # Modification of the server protocol requires regenerating the server requests @@ -368,13 +380,18 @@ src_prepare() { sed -i '/^MimeType/d' loader/wine.desktop || die #117785 fi - # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652 - cp "${WORKDIR}"/${WINE_GENTOO}/icons/oic_winlogo.ico dlls/user32/resources/ || die + # 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, https://bugs.winehq.org/show_bug.cgi?id=24652 + cp "${PATCHDIR}/files/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 @@ -383,6 +400,15 @@ 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) @@ -418,6 +444,7 @@ multilib_src_configure() { $(use_with udev) $(use_with v4l) $(use_with X x) + $(use_with X xfixes) $(use_with xcomposite) $(use_with xinerama) $(use_with xml) @@ -429,7 +456,6 @@ multilib_src_configure() { $(use_with themes gtk3) $(use_with vaapi va) ) - use d3d9 && myconf+=( $(use_with d3d9 d3d9-nine) ) local PKG_CONFIG AR RANLIB # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038 @@ -457,7 +483,7 @@ multilib_src_test() { if [[ ${ABI} == x86 ]]; then if [[ $(id -u) == 0 ]]; then ewarn "Skipping tests since they cannot be run under the root user." - ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf" + ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf" return fi @@ -468,7 +494,6 @@ multilib_src_test() { 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} ) @@ -478,48 +503,62 @@ multilib_src_install_all() { einstalldocs prune_libtool_files --all - emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}" - if use gecko ; then - insinto /usr/share/wine/gecko - use abi_x86_32 && doins "${DISTDIR}"/wine_gecko-${GV}-x86.msi - use abi_x86_64 && doins "${DISTDIR}"/wine_gecko-${GV}-x86_64.msi - fi - if use mono ; then - insinto /usr/share/wine/mono - doins "${DISTDIR}"/wine-mono-${MV}.msi - fi if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script - rm "${D}"usr/bin/{wine{dump,maker},function_grep.pl} "${D}"usr/share/man/man1/wine{dump,maker}.1 || die + 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}"/usr/{bin/,man/man1/}wineconsole* || die - use abi_x86_32 && rm "${D}"/usr/lib32/wine/{,fakedlls/}wineconsole.exe* || die - use abi_x86_64 && rm "${D}"/usr/lib64/wine/{,fakedlls/}wineconsole.exe* || die + 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}"usr/bin/wine{,-preloader} #255055 - use abi_x86_64 && pax-mark psmr "${D}"usr/bin/wine64{,-preloader} + 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 /usr/bin/wine{64,} # 404331 - dosym /usr/bin/wine{64,}-preloader + dosym wine64 "${MY_PREFIX}"/bin/wine # 404331 + dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader fi + # Failglob for bin and man loops + local glob_state=$(shopt -p failglob) + shopt -s failglob + + # Make wrappers for binaries for handling multiple variants + # Note: wrappers instead of symlinks because some are shell which use basename + local b + 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 - use linguas_${l} || rm -r "${D}"usr/share/man/${l}* + use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}* done -} -pkg_preinst() { - gnome2_icon_savelist + eval "${glob_state}" } pkg_postinst() { - gnome2_icon_cache_update - fdo-mime_desktop_database_update + eselect wine register ${P} + if [[ ${PN} == "wine-vanilla" ]]; then + eselect wine register --vanilla ${P} || die + else + if use staging; then + eselect wine register --staging ${P} || die + fi + fi + + eselect wine update --all --if-unset || die + + xdg_desktop_database_update if ! use gecko; then ewarn "Without Wine Gecko, wine prefixes will not have a default" @@ -535,7 +574,19 @@ pkg_postinst() { fi } +pkg_prerm() { + eselect wine deregister ${P} + if [[ ${PN} == "wine-vanilla" ]]; then + eselect wine deregister --vanilla ${P} || die + else + if use staging; then + eselect wine deregister --staging ${P} || die + fi + fi + + eselect wine update --all --if-unset || die +} + pkg_postrm() { - gnome2_icon_cache_update - fdo-mime_desktop_database_update + xdg_desktop_database_update } |