wine.eclass
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
Exported Phases
-
pkg_postrm -
pkg_preinst -
pkg_postinst -
src_compile -
src_install -
src_prepare -
src_configure -
pkg_pretend
Functions
- wine_pkg_pretend
-
Verifies if crossdev-mingw is used properly, ignored if
MINGW_BYPASSis 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
wineconfargsarray.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
Can adjust cross toolchain using CROSSCC, CROSSCC_amd64/x86/arm64, CROSS{C,LD}FLAGS, CROSS{C,LD}FLAGS_amd64/x86/arm64, and likewise for CROSSCXX (variable naming is mostly historical because wine itself used to recognize CROSSCC). Be warned that changing FLAGS is fragile and unsupported. If USE=custom-cflags, the native toolchain's FLAGS will be used, otherwise the default is just -O2.
- wine_src_compile
-
Handle running emake.
- wine_src_install
-
Handle running emake install, creating slot wrappers, and stripping binaries built for Windows.
- wine_pkg_preinst
-
This should not be called directly, if need to declare your own pkg_preinst, then simply do not call this.
This is a temporary helper to warn about a default USE change, that should be removed after 6+ months of >=wine-11.0 being stable (also remove the pkg_preinst EXPORT and warning in wine_pkg_postinst).
- wine_pkg_postinst
-
Provide generic warnings about missing 32bit support, and run eselect wine update.
- wine_pkg_postrm
-
Run eselect wine update if available.
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 about always 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/