From 9387289ec1c39026661bd89669ceac27ce34c810 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A7alo=20Duarte?= Date: Sat, 23 Sep 2023 18:36:50 +0000 Subject: [PATCH 1/2] app-emulation/bottles: add 51.9-r1 * detect wine version install on the system * add llvm-libunwind useflag support with warning for broken wine MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Gonçalo Duarte --- app-emulation/bottles/bottles-51.9-r1.ebuild | 154 +++++++++++++++++++ app-emulation/bottles/bottles-9999.ebuild | 24 ++- 2 files changed, 173 insertions(+), 5 deletions(-) create mode 100644 app-emulation/bottles/bottles-51.9-r1.ebuild diff --git a/app-emulation/bottles/bottles-51.9-r1.ebuild b/app-emulation/bottles/bottles-51.9-r1.ebuild new file mode 100644 index 0000000..86dae01 --- /dev/null +++ b/app-emulation/bottles/bottles-51.9-r1.ebuild @@ -0,0 +1,154 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..11} ) +inherit gnome2-utils python-single-r1 meson xdg optfeature + +DESCRIPTION="Run Windows software and games on Linux" +HOMEPAGE="https://usebottles.com/" + +if [[ "${PV}" == "9999" ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/bottlesdevs/Bottles/" +else + SRC_URI="https://github.com/bottlesdevs/Bottles/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/Bottles-${PV}" + KEYWORDS="~amd64" +fi + +LICENSE="GPL-3" +SLOT="0" + +IUSE="test llvm-libunwind" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" +RESTRICT="!test? ( test )" + +# Very annoying to figure out the deps +# Script for getting python modules: +# https://gitlab.com/Parona/my-scripts/-/blob/master/scripts/python_deps.sh +# Runtime programs needed can be quickly found with: +# grep -r "shutil.which" +# But look at context to gauge if they are optional or not +# +# BDPEPEND dependencies can be thankfully gathered from the meson.build files +# DEPEND are instrospection files which can be found as such +# find . -name "*.blp" -exec grep -Eh "^using " {} + | sed 's/using \([A-Za-z]*\) \([0-9.]*\);/\1-\2.typelib/' +# And in similar vein find runtime required introspection files, similar deal with getting typelib file as above +# grep -r "gi.require_version + +# vkbasalt could be optional but vkbasalt-cli isnt +# It could work without wine but(!) it still requires all the runtime dependencies for wine +# so easier to depend on wine to get it for free + +DEPEND=" + gui-libs/gtk:4[introspection] + gui-libs/libadwaita[introspection] +" +RDEPEND=" + ${PYTHON_DEPS} + ${DEPEND} + app-arch/cabextract + app-arch/p7zip + gui-libs/gtksourceview[introspection] + media-gfx/imagemagick + >=sys-libs/glibc-2.32 + x11-apps/xdpyinfo + llvm-libunwind? ( + || ( + app-emulation/wine-vanilla[X,llvm-libunwind] + app-emulation/wine-staging[X,llvm-libunwind] + ) + ) + !llvm-libunwind? ( + || ( + app-emulation/wine-vanilla[X,-llvm-libunwind] + app-emulation/wine-staging[X,-llvm-libunwind] + app-emulation/wine-proton[X(+),-llvm-libunwind] + ) + ) + $(python_gen_cond_dep ' + app-arch/patool[${PYTHON_USEDEP}] + dev-python/certifi[${PYTHON_USEDEP}] + dev-python/chardet[${PYTHON_USEDEP}] + dev-python/charset-normalizer[${PYTHON_USEDEP}] + dev-python/FVS[${PYTHON_USEDEP}] + dev-python/idna[${PYTHON_USEDEP}] + dev-python/icoextract[${PYTHON_USEDEP}] + dev-python/markdown[${PYTHON_USEDEP}] + dev-python/orjson[${PYTHON_USEDEP}] + dev-python/pathvalidate[${PYTHON_USEDEP}] + dev-python/pefile[${PYTHON_USEDEP}] + dev-python/pycairo[${PYTHON_USEDEP}] + dev-python/pycurl[${PYTHON_USEDEP}] + dev-python/pygobject[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/requests[${PYTHON_USEDEP}] + dev-python/urllib3[${PYTHON_USEDEP}] + dev-python/vkbasalt-cli[${PYTHON_USEDEP}] + dev-python/wheel[${PYTHON_USEDEP}] + ') +" +BDEPEND=" + ${PYTHON_DEPS} + dev-util/blueprint-compiler + dev-libs/glib:2 + sys-devel/gettext + test? ( + $(python_gen_cond_dep ' + dev-python/pytest[${PYTHON_USEDEP}] + ') + ) +" + +EPYTEST_DESELECT=( + # tests that check execution time are flaky in the right circumstances + # (like compiling llvm at the same time type circumstance) + "bottles/tests/backend/state/test_events.py::test_set_reset" + "bottles/tests/backend/state/test_events.py::test_simple_event" + "bottles/tests/backend/state/test_events.py::test_wait_after_done_event" +) + +pkg_setup() { + python-single-r1_pkg_setup +} + +src_configure() { + if [[ "${PV}" == "9999" ]]; then + local emesonargs=( + -Ddevel=true + ) + fi + meson_src_configure +} + +src_install() { + meson_src_install + python_optimize "${D}/usr/share/bottles/" + python_fix_shebang "${D}/usr/" +} + +src_test() { + epytest +} + +pkg_preinst() { + xdg_pkg_preinst + gnome2_schemas_savelist +} + +pkg_postinst() { + xdg_pkg_postinst + gnome2_schemas_update + optfeature "gamemode support" games-util/gamemode + optfeature "gamescope support" games-util/gamescope + optfeature "vmtouch support" dev-utils/vmtouch + #optfeature "MangoHub support" games-util/mangohub + #optfeature "obs-vkcapture support" media-video/obs-vkcapture + if !use llvm-libunwind; then + ewarn "When using llvm-libunwind useflag all wine version besides\n" + ewarn "wine-vanilla and wine-staging are broken (including the runner dowloading from bottles itself)\n" + ewarn "So when using llvm-libunwind system wide is recommended to stick only to system wine mentioned above\n" + fi +} diff --git a/app-emulation/bottles/bottles-9999.ebuild b/app-emulation/bottles/bottles-9999.ebuild index 914d47f..86dae01 100644 --- a/app-emulation/bottles/bottles-9999.ebuild +++ b/app-emulation/bottles/bottles-9999.ebuild @@ -21,7 +21,7 @@ fi LICENSE="GPL-3" SLOT="0" -IUSE="test" +IUSE="test llvm-libunwind" REQUIRED_USE="${PYTHON_REQUIRED_USE}" RESTRICT="!test? ( test )" @@ -55,9 +55,18 @@ RDEPEND=" media-gfx/imagemagick >=sys-libs/glibc-2.32 x11-apps/xdpyinfo - || ( - app-emulation/wine-vanilla[X,-llvm-libunwind] - app-emulation/wine-staging[X,-llvm-libunwind] + llvm-libunwind? ( + || ( + app-emulation/wine-vanilla[X,llvm-libunwind] + app-emulation/wine-staging[X,llvm-libunwind] + ) + ) + !llvm-libunwind? ( + || ( + app-emulation/wine-vanilla[X,-llvm-libunwind] + app-emulation/wine-staging[X,-llvm-libunwind] + app-emulation/wine-proton[X(+),-llvm-libunwind] + ) ) $(python_gen_cond_dep ' app-arch/patool[${PYTHON_USEDEP}] @@ -106,7 +115,7 @@ pkg_setup() { } src_configure() { - if [[ "${PV}" == "9999" ]]; then + if [[ "${PV}" == "9999" ]]; then local emesonargs=( -Ddevel=true ) @@ -137,4 +146,9 @@ pkg_postinst() { optfeature "vmtouch support" dev-utils/vmtouch #optfeature "MangoHub support" games-util/mangohub #optfeature "obs-vkcapture support" media-video/obs-vkcapture + if !use llvm-libunwind; then + ewarn "When using llvm-libunwind useflag all wine version besides\n" + ewarn "wine-vanilla and wine-staging are broken (including the runner dowloading from bottles itself)\n" + ewarn "So when using llvm-libunwind system wide is recommended to stick only to system wine mentioned above\n" + fi } From ce31fec72ab15ea16603011f06d03085819187e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A7alo=20Duarte?= Date: Sun, 24 Sep 2023 17:43:42 +0000 Subject: [PATCH 2/2] app-emulation/bottles: drop 51.7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Gonçalo Duarte --- app-emulation/bottles/Manifest | 1 - app-emulation/bottles/bottles-51.7.ebuild | 132 ---------------------- 2 files changed, 133 deletions(-) delete mode 100644 app-emulation/bottles/bottles-51.7.ebuild diff --git a/app-emulation/bottles/Manifest b/app-emulation/bottles/Manifest index 98b33c3..6a2e8cd 100644 --- a/app-emulation/bottles/Manifest +++ b/app-emulation/bottles/Manifest @@ -1,2 +1 @@ -DIST bottles-51.7.tar.gz 2218262 BLAKE2B 0ec97ef4827c2dfa8daf8e8a3ec1d34f9d733533c4d62ae7c041f73cef5a898dc45b2254c94366fd67475a1e671819936c1f74a1415f37395b91a2ec91c6943f SHA512 46599269ae2cde9e7cc7aa2fd4fe917e02654d2c04ef96d480df16804230216c0b09a9acd03d547030b70e68c046a5ca09b6da3232dccbf81ed6a0f7f6899932 DIST bottles-51.9.tar.gz 2218393 BLAKE2B dcc372b9ba0cc999bf5918e8c620671aa47e0f6615fcc7b7b3899bbbc7c91bfdd0b0c91f4475bc58b29f44bed051576006dc63b20b826c5820fd70879ac6b049 SHA512 81a77f0b02e2ea775bef5591d6be296372544a91fb92c4f39c3cab310887f88d8d9abd1d4b4854dcf8837bd2dc3f6d54c0693b55c60b60d6901e68dda82da1b4 diff --git a/app-emulation/bottles/bottles-51.7.ebuild b/app-emulation/bottles/bottles-51.7.ebuild deleted file mode 100644 index 4d66d1c..0000000 --- a/app-emulation/bottles/bottles-51.7.ebuild +++ /dev/null @@ -1,132 +0,0 @@ -# Copyright 2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{10..11} ) -inherit gnome2-utils python-single-r1 meson xdg optfeature - -DESCRIPTION="Run Windows software and games on Linux" -HOMEPAGE="https://usebottles.com/" - -if [[ "${PV}" == "9999" ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/bottlesdevs/Bottles/" -else - SRC_URI="https://github.com/bottlesdevs/Bottles/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" - S="${WORKDIR}/Bottles-${PV}" - KEYWORDS="~amd64" -fi - -LICENSE="GPL-3" -SLOT="0" - -IUSE="test" -REQUIRED_USE="${PYTHON_REQUIRED_USE}" -RESTRICT="!test? ( test )" - -# Very annoying to figure out the deps -# Script for getting python modules: -# https://gitlab.com/Parona/my-scripts/-/blob/master/scripts/python_deps.sh -# Runtime programs needed can be quickly found with: -# grep -r "shutil.which" -# But look at context to gauge if they are optional or not -# -# BDPEPEND dependencies can be thankfully gathered from the meson.build files -# DEPEND are instrospection files which can be found as such -# find . -name "*.blp" -exec grep -Eh "^using " {} + | sed 's/using \([A-Za-z]*\) \([0-9.]*\);/\1-\2.typelib/' -# And in similar vein find runtime required introspection files, similar deal with getting typelib file as above -# grep -r "gi.require_version - -# vkbasalt could be optional but vkbasalt-cli isnt -# It could work without wine but(!) it still requires all the runtime dependencies for wine -# so easier to depend on wine to get it for free - -DEPEND=" - gui-libs/gtk:4[introspection] - gui-libs/libadwaita[introspection] -" -RDEPEND=" - ${PYTHON_DEPS} - ${DEPEND} - app-arch/cabextract - app-arch/p7zip - gui-libs/gtksourceview[introspection] - media-gfx/imagemagick - >=sys-libs/glibc-2.32 - x11-apps/xdpyinfo - || ( - app-emulation/wine-vanilla[X,-llvm-libunwind] - app-emulation/wine-staging[X,-llvm-libunwind] - ) - $(python_gen_cond_dep ' - app-arch/patool[${PYTHON_USEDEP}] - dev-python/certifi[${PYTHON_USEDEP}] - dev-python/chardet[${PYTHON_USEDEP}] - dev-python/charset-normalizer[${PYTHON_USEDEP}] - dev-python/FVS[${PYTHON_USEDEP}] - dev-python/idna[${PYTHON_USEDEP}] - dev-python/icoextract[${PYTHON_USEDEP}] - dev-python/markdown[${PYTHON_USEDEP}] - dev-python/orjson[${PYTHON_USEDEP}] - dev-python/pathvalidate[${PYTHON_USEDEP}] - dev-python/pefile[${PYTHON_USEDEP}] - dev-python/pycairo[${PYTHON_USEDEP}] - dev-python/pycurl[${PYTHON_USEDEP}] - dev-python/pygobject[${PYTHON_USEDEP}] - dev-python/pyyaml[${PYTHON_USEDEP}] - dev-python/requests[${PYTHON_USEDEP}] - dev-python/urllib3[${PYTHON_USEDEP}] - dev-python/vkbasalt-cli[${PYTHON_USEDEP}] - dev-python/wheel[${PYTHON_USEDEP}] - ') -" -BDEPEND=" - ${PYTHON_DEPS} - dev-util/blueprint-compiler - dev-libs/glib:2 - sys-devel/gettext - test? ( - $(python_gen_cond_dep ' - dev-python/pytest[${PYTHON_USEDEP}] - ') - ) -" - -pkg_setup() { - python-single-r1_pkg_setup -} - -src_configure() { - if [[ "${PV}" == "9999" ]]; then - local emesonargs=( - -Ddevel=true - ) - fi - meson_src_configure -} - -src_install() { - meson_src_install - python_optimize "${D}/usr/share/bottles/" - python_fix_shebang "${D}/usr/" -} - -src_test() { - epytest -} - -pkg_preinst() { - xdg_pkg_preinst - gnome2_schemas_savelist -} - -pkg_postinst() { - xdg_pkg_postinst - gnome2_schemas_update - optfeature "gamemode support" games-util/gamemode - optfeature "gamescope support" games-util/gamescope - optfeature "vmtouch support" dev-utils/vmtouch - #optfeature "MangoHub support" games-util/mangohub - #optfeature "obs-vkcapture support" media-video/obs-vkcapture -}