diff options
author | James Le Cuirot <chewi@gentoo.org> | 2023-10-29 22:52:44 +0000 |
---|---|---|
committer | James Le Cuirot <chewi@gentoo.org> | 2023-10-29 23:00:29 +0000 |
commit | 6514bf7c9f10aef7fa983b5afd1da0e6168e7693 (patch) | |
tree | 4385f171094b0b81f1462b038ab6d3028955c2d5 /app-emulation/gallium-nine-standalone | |
parent | app-emulation/gallium-nine-standalone: Drop old 0.7-r1 (diff) | |
download | gentoo-6514bf7c9f10aef7fa983b5afd1da0e6168e7693.tar.gz gentoo-6514bf7c9f10aef7fa983b5afd1da0e6168e7693.tar.bz2 gentoo-6514bf7c9f10aef7fa983b5afd1da0e6168e7693.zip |
app-emulation/gallium-nine-standalone: Version bump to 0.9, EAPI 8
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'app-emulation/gallium-nine-standalone')
4 files changed, 103 insertions, 3 deletions
diff --git a/app-emulation/gallium-nine-standalone/Manifest b/app-emulation/gallium-nine-standalone/Manifest index 8bf4e367ca22..90d5abcd33ea 100644 --- a/app-emulation/gallium-nine-standalone/Manifest +++ b/app-emulation/gallium-nine-standalone/Manifest @@ -1 +1,2 @@ DIST gallium-nine-standalone-0.8.tar.gz 66656 BLAKE2B 5eaebcc514570dbaff44c4c889025d19a26c0b54941d1ab99ec131216a6eb49c2c649f1a4df51534f608653dab8b5e55a35afc57ba04a0ab6f4dea0edabac55c SHA512 3f339f909c6d65a2e5b5c912785aaa6f297e95549c868ab679dfb8e99d67db9906b6e75e3679a4e3e003f512a54ceb9953f941a4129f488973c16e1a3ac7267c +DIST gallium-nine-standalone-0.9.tar.gz 67687 BLAKE2B 24e4250cacde3306cdfa8d9b24fa2fa0eb7dee4e5722973baa59f25999a75e689acad4c24c8bbfbc34aaddc24bdfe1977ff2f85da08a81b4ce6b222d5d0bfae0 SHA512 1ed384563736ab5db4167ca28163c93e58e9ff7ee62656d4adea8bc937484aebce3ed06f4600a080ad61fcfedd12febb3db9430be6cc8dd97484982694fde3a7 diff --git a/app-emulation/gallium-nine-standalone/files/0.9-nine-dll-path.patch b/app-emulation/gallium-nine-standalone/files/0.9-nine-dll-path.patch new file mode 100644 index 000000000000..14c2b30a741f --- /dev/null +++ b/app-emulation/gallium-nine-standalone/files/0.9-nine-dll-path.patch @@ -0,0 +1,12 @@ +diff -Naur a/ninewinecfg/main.c b/ninewinecfg/main.c +--- a/ninewinecfg/main.c 2023-03-10 08:32:25.000000000 +0000 ++++ b/ninewinecfg/main.c 2023-10-29 22:49:15.919529033 +0000 +@@ -28,7 +28,7 @@ + #include "../common/registry.h" + #include "resource.h" + +-static const char * const fn_nine_dll = "d3d9-nine.dll"; ++static const char * const fn_nine_dll = G9DLL; + static const char * const fn_backup_dll = "d3d9-nine.bak"; + static const char * const fn_d3d9_dll = "d3d9.dll"; + static const char * const fn_nine_exe = "ninewinecfg.exe"; diff --git a/app-emulation/gallium-nine-standalone/gallium-nine-standalone-0.9.ebuild b/app-emulation/gallium-nine-standalone/gallium-nine-standalone-0.9.ebuild new file mode 100644 index 000000000000..a2a9c3b6ce1b --- /dev/null +++ b/app-emulation/gallium-nine-standalone/gallium-nine-standalone-0.9.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2023 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/pkgconfig + virtual/wine[${MULTILIB_USEDEP}] + >=dev-util/meson-0.50.1 +" + +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_env_array "${CFLAGS} '-DG9DLL=${g9dll}'")!" \ + -e "s!@LDFLAGS@!$(_meson_env_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 +} diff --git a/app-emulation/gallium-nine-standalone/gallium-nine-standalone-9999.ebuild b/app-emulation/gallium-nine-standalone/gallium-nine-standalone-9999.ebuild index d9a079e97a24..a2a9c3b6ce1b 100644 --- a/app-emulation/gallium-nine-standalone/gallium-nine-standalone-9999.ebuild +++ b/app-emulation/gallium-nine-standalone/gallium-nine-standalone-9999.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit meson-multilib toolchain-funcs @@ -39,7 +39,7 @@ DEPEND=" PATCHES=( "${FILESDIR}"/0.8-cross-files.patch - "${FILESDIR}"/0.3-nine-dll-path.patch + "${FILESDIR}"/0.9-nine-dll-path.patch ) bits() { |