--- wine-1.7.19-r1.ebuild 2014-05-21 21:37:13.000000000 +0200 +++ wine-1.7.19-r1.ebuild 2014-05-24 23:54:17.840231482 +0200 @@ -8,7 +8,7 @@ AUTOTOOLS_AUTORECONF=1 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-multilib eutils fdo-mime flag-o-matic gnome2-utils l10n multilib pax-utils toolchain-funcs virtualx +inherit autotools-utils eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx if [[ ${PV} == "9999" ]] ; then EGIT_REPO_URI="git://source.winehq.org/git/wine.git" @@ -340,33 +340,15 @@ src_prepare() { l10n_get_locales > po/LINGUAS # otherwise wine doesn't respect LINGUAS } -do_configure() { - local myeconfargs=( "${myeconfargs[@]}" ) - - if use amd64; then - if [[ ${ABI} == amd64 ]]; then - myeconfargs+=( --enable-win64 ) - else - use netapi && ewarn "Disabling netapi in wine32; see https://bugs.gentoo.org/494394" - # We currently don't have 32-bit libnetapi on amd64; #494394 - myeconfargs+=( - --without-netapi - --disable-win64 - ) - fi - - # Note: using --with-wine64 results in problems with multilib.eclass - # CC/LD hackery. We're using separate tools instead. - fi - - autotools-utils_src_configure -} - src_configure() { export LDCONFIG=/bin/true use custom-cflags || strip-flags - local myeconfargs=( # common + multilib-minimal_src_configure +} + +multilib_src_configure() { + local myconf=( --sysconfdir=/etc/wine $(use_with alsa) $(use_with capi) @@ -383,7 +365,8 @@ src_configure() { $(use_with jpeg) $(use_with ldap) $(use_with mp3 mpg123) - $(use_with netapi) + # We currently do not have 32-bit libnetapi on amd64; #494394 + $(multilib_native_use_with netapi) $(use_with nls gettext) $(use_with openal) $(use_with opencl) @@ -403,46 +386,58 @@ src_configure() { $(use_with xml xslt) ) - use pulseaudio && myeconfargs+=( --with-pulse ) - use pipelight && myeconfargs+=( --with-xattr ) + use pulseaudio && myconf+=( --with-pulse ) + use pipelight && myconf+=( --with-xattr ) - if use amd64 && use abi_x86_32; then - # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038 - # set AR and RANLIB to make QA scripts happy; #483342 - tc-export PKG_CONFIG AR RANLIB + local PKG_CONFIG AR RANLIB + # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038 + # set AR and RANLIB to make QA scripts happy; #483342 + tc-export PKG_CONFIG AR RANLIB + + if use amd64; then + if [[ ${ABI} == amd64 ]]; then + myconf+=( --enable-win64 ) + else + use netapi && ewarn "Disabling netapi in wine32; see https://bugs.gentoo.org/494394" + myconf+=( + --disable-win64 + ) + fi + + # Note: using --with-wine64 results in problems with multilib.eclass + # CC/LD hackery. We're using separate tools instead. fi - multilib_parallel_foreach_abi do_configure + ECONF_SOURCE=${S} \ + econf "${myconf[@]}" + emake depend } -src_compile() { - autotools-multilib_src_compile depend - autotools-multilib_src_compile all -} +multilib_src_test() { + # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader" + if [[ ${ABI} == x86 ]]; then + if [[ $(id -u) == 0 ]]; then + ewarn "Skipping tests since they cannot be run under the root user." + ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf" + return + fi -src_test() { - if [[ $(id -u) == 0 ]]; then - ewarn "Skipping tests since they cannot be run under the root user." - ewarn "To run the test ${PN} suite, add userpriv to FEATURES in make.conf" - return + WINEPREFIX="${T}/.wine-${ABI}" \ + Xemake test fi - - # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader" - multilib_toolchain_setup x86 - local BUILD_DIR="${S}-${ABI}" - cd "${BUILD_DIR}" || die - WINEPREFIX="${T}/.wine-${ABI}" Xemake test } -src_install() { +multilib_src_install_all() { local DOCS=( ANNOUNCE AUTHORS README ) local l add_locale_docs() { local locale_doc="documentation/README.$1" - [[ ! -e ${locale_doc} ]] || DOCS=( "${DOCS[@]}" ${locale_doc} ) + [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} ) } l10n_for_each_locale_do add_locale_docs - autotools-multilib_src_install + + einstalldocs + prune_libtool_files --all emake -C "../${WINE_GENTOO}" install DESTDIR="${D}" EPREFIX="${EPREFIX}" if use gecko ; then @@ -470,7 +465,6 @@ src_install() { for l in de fr pl; do use linguas_${l} || rm -r "${D}"usr/share/man/${l}* done - } pkg_preinst() {