diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-02-13 23:36:16 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-02-13 23:36:16 +0000 |
commit | 5ee866097f7722d669e9a3b4ca2906105852e6ec (patch) | |
tree | 890944c963175a5008b706f03c1fb949a657f9ef /app-emulation/gallium-nine-standalone/gallium-nine-standalone-0.9-r1.ebuild | |
parent | 8234174b0455dd6d6656a24155014c4fba8fad49 (diff) |
gentoo auto-resync : 13:02:2024 - 23:36:16
Diffstat (limited to 'app-emulation/gallium-nine-standalone/gallium-nine-standalone-0.9-r1.ebuild')
-rw-r--r-- | app-emulation/gallium-nine-standalone/gallium-nine-standalone-0.9-r1.ebuild | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/app-emulation/gallium-nine-standalone/gallium-nine-standalone-0.9-r1.ebuild b/app-emulation/gallium-nine-standalone/gallium-nine-standalone-0.9-r1.ebuild new file mode 100644 index 000000000000..c34f0b868b29 --- /dev/null +++ b/app-emulation/gallium-nine-standalone/gallium-nine-standalone-0.9-r1.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit meson-multilib toolchain-funcs + +MY_PN="wine-nine-standalone" +DESCRIPTION="A standalone version of the WINE parts of Gallium Nine" +HOMEPAGE="https://github.com/iXit/wine-nine-standalone" + +if [[ ${PV} = 9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/iXit/${MY_PN}.git" +else + SRC_URI="https://github.com/iXit/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/${MY_PN}-${PV}" + KEYWORDS="-* ~amd64 ~x86" +fi + +LICENSE="LGPL-2.1+" +SLOT="0" + +# We don't put Wine in RDEPEND because you can also use this with +# Steam's Proton. + +RDEPEND=" + media-libs/mesa[d3d9,X(+),${MULTILIB_USEDEP}] + x11-libs/libX11[${MULTILIB_USEDEP}] + x11-libs/libxcb[${MULTILIB_USEDEP}] +" + +DEPEND=" + ${RDEPEND} + virtual/wine[${MULTILIB_USEDEP}] +" + +BDEPEND=" + dev-build/meson-format-array + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/0.8-cross-files.patch + "${FILESDIR}"/0.9-nine-dll-path.patch +) + +bits() { + if [[ ${ABI} = amd64 ]]; then + echo 64 + else + echo 32 + fi +} + +src_prepare() { + default + + # Upstream includes a bootstrap.sh script with hardcoded CHOSTs to + # create the Meson cross files. We improve on that here but also + # inject CFLAGS and LDFLAGS, partly to simply respect these, and + # partly to allow d3d9-nine.dll to be loaded from a location outside + # WINEPREFIX. This avoids the need for the nine-install.sh script, + # which doesn't play well with our multi-Wine environment. + bootstrap_nine() { + local file=tools/cross-wine$(bits) + local g9dll=\"z:${EPREFIX}/usr/$(get_libdir)/d3d9-nine.dll.so\" + + sed \ + -e "s!@PKG_CONFIG@!$(tc-getPKG_CONFIG)!" \ + -e "s!@CFLAGS@!$(meson-format-array "${CFLAGS} '-DG9DLL=${g9dll}'")!" \ + -e "s!@LDFLAGS@!$(meson-format-array "${LDFLAGS}")!" \ + -e "s!@PKG_CONFIG_LIBDIR@!${PKG_CONFIG_LIBDIR:-${ESYSROOT}/usr/$(get_libdir)/pkgconfig}!" \ + ${file}.in > ${file} || die + } + + multilib_foreach_abi bootstrap_nine +} + +multilib_src_configure() { + # We override bindir because otherwise the 32-bit exe is overwritten + # by the 64-bit exe and we need both of them. + local emesonargs=( + --cross-file "${S}/tools/cross-wine$(bits)" + --bindir "$(get_libdir)" + -Ddistro-independent=false + -Ddri2=false + ) + meson_src_configure +} |