WINE.ECLASS

Section: eclass-manpages (5)
Updated: Apr 2025
Index Return to Main Contents

NAME

wine.eclass - Common functions for app-emuluation/wine-* ebuilds

DESCRIPTION

Given the large amount of Wine ebuilds (and variants) that need duplicated code, this is used to offload the more complex bits (primarily toolchain and slotting) and leave ebuilds to only need to deal with dependencies and configure options like any other.

Note to overlays: this can be used to package other variants of Wine, but there is currently no garantee that eclass changes may not break these ebuilds now and then without real warnings

SUPPORTED EAPIS

8

FUNCTIONS

wine_pkg_pretend
Verifies if crossdev-mingw is used properly, ignored if ``MINGW_BYPASS`` is set.
wine_src_prepare
Apply various minor adjustments, run eautoreconf, make_requests, and perform a version mismatch sanity check if WINE_GECKO and WINE_MONO are set.

If need more than make_requests, it should be either handled in the ebuild or (for users) optionally through portage hooks, e.g.

echo "post_src_prepare() { tools/make_specfiles || die; }" \
   > /etc/portage/env/app-emulation/wine-vanilla

wine_src_configure
Setup toolchain and run ./configure by passing the ``wineconfargs`` array.

The following options are handled automatically and do not need to be passed: --prefix (and similar), --enable-archs, --enable-win64 --with-mingw, and --with-wine64

Not truly supported, but cross toolchain can be customised using CROSSCC, CROSSCC_amd64/x86/arm64, CROSSCFLAGS and CROSSLDFLAGS (based on what wine's configure also recognize, or used to for CC).

wine_src_compile
Handle running emake.
wine_src_install
Handle running emake install, creating slot wrappers, and stripping binaries built for Windows.
wine_pkg_postinst
Provide generic warnings about missing 32bit support, and run eselect wine update.
wine_pkg_postrm
Run eselect wine update if available.

ECLASS VARIABLES

WINE_USEDEP = "abi_x86_32(-)?,abi_x86_64(-)?"
Meant be used like multilib-build.eclass' MULTILIB_USEDEP. Handled specially here given Wine ebuilds are not *really* multilib and are abusing abi_x86_* with some specific requirements.

TODO: when the *new* wow64 mode (aka USE=wow64) is mature enough to be preferred over abi_x86_32, this should be removed and support for 32bit-only-on-64bit be dropped matching how /no-multilib/ handles it

WINE_SKIP_INSTALL = ()
Array of files to delete from the installation relative to ${ED}, must be set before running wine_src_install.

AUTHORS

Ionen Wolkens <ionen@gentoo.org>

MAINTAINERS

Wine <wine@gentoo.org>

REPORTING BUGS

Please report bugs via https://bugs.gentoo.org/

FILES

wine.eclass

SEE ALSO

ebuild(5)
https://gitweb.gentoo.org/repo/gentoo.git/log/eclass/wine.eclass


Index

NAME
DESCRIPTION
SUPPORTED EAPIS
FUNCTIONS
ECLASS VARIABLES
AUTHORS
MAINTAINERS
REPORTING BUGS
FILES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 03:27:00 GMT, April 26, 2025