diff options
Diffstat (limited to 'app-emulation')
34 files changed, 3982 insertions, 1103 deletions
diff --git a/app-emulation/Manifest.gz b/app-emulation/Manifest.gz Binary files differindex 0b90dd9b0365..8cdf9056054c 100644 --- a/app-emulation/Manifest.gz +++ b/app-emulation/Manifest.gz diff --git a/app-emulation/cloud-init/Manifest b/app-emulation/cloud-init/Manifest index 36cad7739bea..98f4c3f22102 100644 --- a/app-emulation/cloud-init/Manifest +++ b/app-emulation/cloud-init/Manifest @@ -2,7 +2,6 @@ AUX cloud-init-24.2-systemd.patch 6036 BLAKE2B 410cf02f66d19adfa11ff7359bd539fad AUX cloud-init-24.4-netcat.patch 3606 BLAKE2B 8fbe9919b99eef3212b0ae6f6e8c4ebaf492a706f0232e31de301a84d7f0ccff72f842694bb7d4faaeced9f48f09bb997e1b38115b8de6612e5c2575a36752a2 SHA512 450d66f1aa2e85e7e532d2104547b640426bdf0a32a734f25c2a2d94a76b0a68b5a05770f5899f6ba65624e90c1b731165972d3cc5133e55460f0e6aafd48acd DIST cloud-init-24.4.tar.gz 1871271 BLAKE2B 438d1296a637211d7a43c9969de6d432b1ab787beab7f617426cdeab67d1c1df28e1adfa610af4dad44c7f46850954ad3d1856bfff143648da0f87fbc4ebdefc SHA512 1c6901497848d8be29ffb0a7bcbbd2df89d0a2b35a65c33f3db9562a544d9e832308f448dcc24a555791b40f00aca32e5d25b8ad3ccb5e90dda6268e5a125f9c DIST cloud-init-25.1.tar.gz 1892801 BLAKE2B 7efc5cb8d1f3c63c7b22660873f8c62d49a32d4f09a16df41777a6e41555606ebb5186c29f5d20396dfabc190f2034f88517076c5e342cb8bc04249bbfcee4a4 SHA512 2a40234e92bd27e12a48ab6d62c638599d82deaaf9b69d9ba2deed6a8234e16fcd5e35e995c1880d61c2a60fbea7699ae73ea849f2f4153067ef4aa8af1b4adf -EBUILD cloud-init-24.4-r3.ebuild 2622 BLAKE2B bc1b299fd4e2b6e3daa26b322dc4c2b599437bc16a8aed0e8d6c860c69222631eef89c09c2749f7f47f67762644da5f96efab873415992029f997f134e4cc3da SHA512 553c5620ffa6a6a99bfdd12a53edf1065b3fadbdf65b047d4ea87e7571867fafb1491f9095ab5c4d5b1bfb897d2a796bbb2776106f1e7f74d85ba9e9bd933e4a EBUILD cloud-init-24.4-r4.ebuild 2897 BLAKE2B 5072c3740c3e8b7b9c21ffc8a48501f071d651ca31fa1c590d08bc3b8d5887c2ee8066459dedd1b4fbb4c9b55688b1fa43088cb7dff6e34e85c0525357ce045e SHA512 7dba5ba4d11ca6414b2cf343f67b8f117724721f2f3d0e60296f2ec0da313f9176f5727ed58ad08c77e893069b9b40cd31fea4c4b192719605c804ac56c31ca6 EBUILD cloud-init-25.1.ebuild 2809 BLAKE2B e3cbae18ba0ddad24c4ae34b800b92a4e34d6628d3eb3e9aea01afc0112997ba9d752cff958979f0053770c000b387deb8265feac0729484e00055ce7538d59c SHA512 b62c652f2e7e2c6caaccc0c4380a9ff8107e69b03004f01530816fe78861d0d9fe8785193929c0f9a0f1e701be66ea40239a9b829766d5934faf3e24f23788cd EBUILD cloud-init-9999.ebuild 2809 BLAKE2B e3cbae18ba0ddad24c4ae34b800b92a4e34d6628d3eb3e9aea01afc0112997ba9d752cff958979f0053770c000b387deb8265feac0729484e00055ce7538d59c SHA512 b62c652f2e7e2c6caaccc0c4380a9ff8107e69b03004f01530816fe78861d0d9fe8785193929c0f9a0f1e701be66ea40239a9b829766d5934faf3e24f23788cd diff --git a/app-emulation/cloud-init/cloud-init-24.4-r3.ebuild b/app-emulation/cloud-init/cloud-init-24.4-r3.ebuild deleted file mode 100644 index 51f5f85f1cbd..000000000000 --- a/app-emulation/cloud-init/cloud-init-24.4-r3.ebuild +++ /dev/null @@ -1,107 +0,0 @@ -# Copyright 1999-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# Disabled for now: bug #850628 -#DISTUTILS_USE_PEP517=setuptools -# https://bugs.launchpad.net/cloud-init/+bug/1978328 -PYTHON_COMPAT=( python3_10 python3_11 python3_12 ) - -inherit distutils-r1 udev - -if [[ ${PV} == *9999 ]]; then - inherit git-r3 - EGIT_REPO_URI="https://git.launchpad.net/cloud-init" -else - SRC_URI="https://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.gz" - KEYWORDS="amd64 arm64 ~loong ppc64 x86" -fi - -DESCRIPTION="Cloud instance initialisation magic" -HOMEPAGE="https://launchpad.net/cloud-init" - -LICENSE="GPL-3" -SLOT="0" -IUSE="selinux" - -CDEPEND=" - dev-python/jinja2[${PYTHON_USEDEP}] - dev-python/oauthlib[${PYTHON_USEDEP}] - dev-python/pyserial[${PYTHON_USEDEP}] - >=dev-python/configobj-5.0.2[${PYTHON_USEDEP}] - dev-python/pyyaml[${PYTHON_USEDEP}] - dev-python/requests[${PYTHON_USEDEP}] - dev-python/jsonpatch[${PYTHON_USEDEP}] - dev-python/jsonschema[${PYTHON_USEDEP}] - dev-python/netifaces[${PYTHON_USEDEP}] -" -BDEPEND=" - ${CDEPEND} - test? ( - dev-python/mock[${PYTHON_USEDEP}] - dev-python/passlib[${PYTHON_USEDEP}] - dev-python/pytest-mock[${PYTHON_USEDEP}] - dev-python/responses[${PYTHON_USEDEP}] - dev-python/setuptools[${PYTHON_USEDEP}] - ) -" -RDEPEND=" - ${CDEPEND} - net-analyzer/macchanger - net-analyzer/openbsd-netcat - sys-apps/iproute2 - sys-fs/growpart - virtual/logger - selinux? ( sec-policy/selinux-cloudinit ) -" - -EPYTEST_IGNORE=( - # Can't find file - tests/unittests/config/test_apt_configure_sources_list_v1.py - tests/unittests/config/test_apt_configure_sources_list_v3.py -) - -PATCHES=( - "${FILESDIR}/${PN}-24.2-systemd.patch" - "${FILESDIR}/${PN}-24.4-netcat.patch" -) - -distutils_enable_tests pytest - -python_prepare_all() { - # Fix location of documentation installation - sed -i "s:USR + '/share/doc/cloud-init:USR + '/share/doc/${PF}:" setup.py || die - - if [[ ${PV} == *9999 ]] ; then - sed -i 's/version=get_version(),/version=9999,/g' setup.py || die - fi - - distutils-r1_python_prepare_all -} - -python_install() { - distutils-r1_python_install --init-system=sysvinit_openrc,systemd --distro gentoo -} - -python_install_all() { - keepdir /etc/cloud - - distutils-r1_python_install_all - - # installs as non-executable - chmod +x "${D}"/etc/init.d/* || die -} - -pkg_prerm() { - udev_reload -} - -pkg_postinst() { - udev_reload - - elog "cloud-init-local needs to be run in the boot runlevel because it" - elog "modifies services in the default runlevel. When a runlevel is started" - elog "it is cached, so modifications that happen to the current runlevel" - elog "while you are in it are not acted upon." -} diff --git a/app-emulation/crossover-bin/Manifest b/app-emulation/crossover-bin/Manifest index 2e62ad635fa2..9428dce9f50f 100644 --- a/app-emulation/crossover-bin/Manifest +++ b/app-emulation/crossover-bin/Manifest @@ -1,9 +1,11 @@ DIST install-crossover-22.1.1.bin 335606941 BLAKE2B 3c5eada7190283f348348ef4d3b044db8e24e0dc3588d847854feb712d39bc9013e4f958a80c3f46e84b32f6b5c7d419ef6ab4fa1e946d308ba546140fb95504 SHA512 54bb40941baea184aa824c371a2eb73cdda26fa7c0765e242384e2c29a78f6b600c7455640b9888fd28ad482bf14f53a0308cbd55d9453f76d6eeb75cf0abfc7 DIST install-crossover-23.6.0.bin 333783609 BLAKE2B d24ef036530d2b8ce916ecb6adb6f5599d9beedb374a27a0009d14ff601685e8a4b23424a3a08e2ce613b3e77ea9893ce1b6caa07448aca365feea86f23fe320 SHA512 203c8966e71b91d98676b5e15646f790c2b4db3db3dbb8539a8ffe29b335f301535f5d7c80bf954c5e79b56668707ae960c396204f59e4079c455f12e663a445 -DIST install-crossover-24.0.0.bin 320724952 BLAKE2B a95028fda5c53889f09e567742fc881aaefc8c3c618b4de0f30cb53604bfa1a25097d56d8e025a509a9cce7aecde48b35ab7c8d87ba04761a8b42b717d1cf3b4 SHA512 93f3a4415ff29de98b38a488213d7f00b64f6fe70ae3a7555b911d5423163a678941ab859117172bf716b658eb8aecb1b6b430aed3233c1c55fd51893e8de046 DIST install-crossover-24.0.4.bin 320804800 BLAKE2B 83aa750117d69836bfbad0fde42b2bfa1a8705a5f640f53fd7195de3a3bb0b876d71df95ecafd2e9c0784ba5a4d745d4f4bf627438bf6df47fc3fe1d8c33d277 SHA512 cde22177104fd37963342983f7c01f7eb12e7ee7037ccc3756e96023d7d2f3770f4d110f68471e9e2450cf6e6580d47a6a9c81bbb03ac25932dce8f0ad5c5cd5 -EBUILD crossover-bin-22.1.1.ebuild 6566 BLAKE2B bc3f53098b6222d648f9a35c79897410b601f2abb5385e9e5bd764e0edff13395cfd606264fa73d17acf562227a92ea46efd419f43848bbcc0d7ddcfae051f20 SHA512 9f9e602824ce5c4e668f16759f8ee4716bdc1894ccf0e7a3b68253f21c132785eb5ffc9d85949b971d65decbf0ef4104a99297d76fb5ad7ff555f2fc61889abc -EBUILD crossover-bin-23.6.0.ebuild 6307 BLAKE2B 30d5657eed1171b239a19e6faf9773c1f76800b5c5eb4814043516696bb2356fb47cfe21be49a386141ec4a39a4df457df4e43954ffae8e9b11a6d0db48f7690 SHA512 ee6ed46f86eccab611db8770576bd9ea2f050140742f6cbf9b1a1e46cb690c836c3004f7461a5c55b648175aff576a20eadb5f44cf31fc1f31afbb373ba25b68 -EBUILD crossover-bin-24.0.0.ebuild 5794 BLAKE2B 510d08ed56a3fdd7fae42657112493255a5c0405caaec5a9636ee52c6fc577c136b42cfda90a5ed8ba58eefd2e3cb5f9022c7d9fbbaa3280bbea13c89dd8c3d0 SHA512 ae336d042b2a29ac0046f1c02343ddc954a16bf953cb36b448b72f927d3c07737e5b29099f3ef7ca39e0d5f9bad7194828d25ad57b76f593fd5d771fae1087c8 -EBUILD crossover-bin-24.0.4.ebuild 5784 BLAKE2B 24134389d10b9b819cdff6e55e59d37a48184ebaa0036218259afccf0a5e0311b0cb6317bf5eadc7acc9f2c15aa97287c5547086b850c0f3138a5781b97ccfcf SHA512 a7ea9d2db26c2b5f7c30798eb27ef8d6e4964ce43066d469a432aa582c06b10bcef77ab55193309767ae16a46e3dea54c7d092e0063c85c790df3ebe5813e24a +DIST install-crossover-24.0.6.bin 320870234 BLAKE2B a1cd417140bb77b9371b6ec4df562121f66421f1fc2096c7c305e7948802a43cd242ea308c505556b0e3b5720c3c6071e4c62f19dd67b8914d7fcb146ba49db9 SHA512 f441dbbd344915212d750bff456dbea95b523427aed569033274e1b74314fdcb3ee0b923eecd24feaf684c89ad04062c9a497967d1b9848d2e4988c5a508352f +DIST install-crossover-25.0.0.bin 302840114 BLAKE2B 784035799c364cf28d04a3fc33d98d3b0a3b9b339ff6f2b2c779141aaa50c03e170037bd42939262ba849a3110ba15f8eb7d6886821ea16362b4e7e438e64793 SHA512 deec91131c38a6c208768cc08e5c70687ff6895cc5674b1df14058644a93ba6efabaee3e01e5c4f9a6d4f365556f182088c963c9bf333e03f8ee1bb486fc7c54 +EBUILD crossover-bin-22.1.1.ebuild 6557 BLAKE2B bc3db3bdb3a905d7f7de4a66b25fb54451fcda960918f7945cbd2c11a235c279a3b8e8325684c898a267be42fe2945127d41b7b9973a005bc78894e799b1f25a SHA512 708563bd91ec5e502c048f8d718f06c09ba21459d92dfd2539a5d3d7ada295f531c77395163416b7f1a5ea8b29fbcc0235acb82b6ee0a0266dfa081884add9a6 +EBUILD crossover-bin-23.6.0.ebuild 6298 BLAKE2B fb00e45b36eef96b4ea77e978582d48f28ac0ed5a6d3a6417c430f456018fdf051878484ae563026b84fecbe0aeebb5366cdb30aa2e3af14c40ab73581f128c7 SHA512 2a6a2e77e64c8fa94f5a0e7ca4e42677bdc88d21bd9a35b1fef66d2c8c3eba0be3d7e60cb19ebbe7063856bc8c1f965240ec81c2b1391f92c9a511df33ba9c07 +EBUILD crossover-bin-24.0.4.ebuild 5784 BLAKE2B c8079dd0064f7df020e8d4b41e6ca843d232ed55394fb71532507552a5abffa49fa971028f5ada404c41125354f719e6308f98c49c1294ff840652717ab6df13 SHA512 b660dd19fb4f9ff64476e6220d9dd0a1144a1473ff1f1df9eaf07d65258a1b1c489e53d8344fc737d0bb197947f565e43918446a8f5859d736a46897dc3de210 +EBUILD crossover-bin-24.0.6.ebuild 5784 BLAKE2B c8079dd0064f7df020e8d4b41e6ca843d232ed55394fb71532507552a5abffa49fa971028f5ada404c41125354f719e6308f98c49c1294ff840652717ab6df13 SHA512 b660dd19fb4f9ff64476e6220d9dd0a1144a1473ff1f1df9eaf07d65258a1b1c489e53d8344fc737d0bb197947f565e43918446a8f5859d736a46897dc3de210 +EBUILD crossover-bin-25.0.0.ebuild 5725 BLAKE2B 4cb0fc96fe86b18ddf2150a9a4298b27fb59cb4f0c48e681b08e41b3ea30a5ea5de58d16bd9f2a798f13a82ea9578310e9b1d8030a0bc3bcf2075c2bbda18832 SHA512 75482bb83449a3fad98b829c633b92044c76709d7cb55134c158c651eb4d751f938467341fca7eb440be09c5e84d8c688402d01a152c04e65cd7cce479318293 MISC metadata.xml 470 BLAKE2B e6ce60679497552604b5210df3d42428dbbf024965e6acb8354c8b9be75896eceb94a6ba5bab305c92e575d22e87dcf90d532be27f992a76341ea89d79f24148 SHA512 46a827986ea3a4aa6cca106b7a3dc90d23c701d6a4bd5a439b3864c706462fb601d946bb5def7e853b2b0978c1c99a56ec37076178ef5eeb834330e1e77d97dd diff --git a/app-emulation/crossover-bin/crossover-bin-22.1.1.ebuild b/app-emulation/crossover-bin/crossover-bin-22.1.1.ebuild index 8f1820b96a94..a1ab1335da97 100644 --- a/app-emulation/crossover-bin/crossover-bin-22.1.1.ebuild +++ b/app-emulation/crossover-bin/crossover-bin-22.1.1.ebuild @@ -1,8 +1,8 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -PYTHON_COMPAT=( python3_{10..12} ) +PYTHON_COMPAT=( python3_{10..13} ) inherit python-single-r1 unpacker @@ -10,6 +10,8 @@ DESCRIPTION="Commercial version of app-emulation/wine with paid support" HOMEPAGE="https://www.codeweavers.com/products/" SRC_URI="https://media.codeweavers.com/pub/crossover/cxlinux/demo/install-crossover-${PV}.bin" +S="${WORKDIR}" + LICENSE="CROSSOVER-3" SLOT="0" KEYWORDS="-* ~amd64 ~x86" @@ -18,9 +20,7 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}" RESTRICT="bindist test" QA_PREBUILT="*" -S="${WORKDIR}" -DEPEND="" BDEPEND="${PYTHON_DEPS} app-alternatives/cpio app-arch/unzip diff --git a/app-emulation/crossover-bin/crossover-bin-23.6.0.ebuild b/app-emulation/crossover-bin/crossover-bin-23.6.0.ebuild index 0d24c74fa191..82caa978019a 100644 --- a/app-emulation/crossover-bin/crossover-bin-23.6.0.ebuild +++ b/app-emulation/crossover-bin/crossover-bin-23.6.0.ebuild @@ -1,8 +1,8 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -PYTHON_COMPAT=( python3_{10..12} ) +PYTHON_COMPAT=( python3_{10..13} ) inherit python-single-r1 unpacker @@ -10,6 +10,8 @@ DESCRIPTION="Commercial version of app-emulation/wine with paid support" HOMEPAGE="https://www.codeweavers.com/products/" SRC_URI="https://media.codeweavers.com/pub/crossover/cxlinux/demo/install-crossover-${PV}.bin" +S="${WORKDIR}" + LICENSE="CROSSOVER-3" SLOT="0" KEYWORDS="-* ~amd64 ~x86" @@ -18,9 +20,7 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}" RESTRICT="bindist test" QA_PREBUILT="*" -S="${WORKDIR}" -DEPEND="" BDEPEND="${PYTHON_DEPS} app-alternatives/cpio app-arch/unzip diff --git a/app-emulation/crossover-bin/crossover-bin-24.0.4.ebuild b/app-emulation/crossover-bin/crossover-bin-24.0.4.ebuild index 810998d9d967..3f9f6812028d 100644 --- a/app-emulation/crossover-bin/crossover-bin-24.0.4.ebuild +++ b/app-emulation/crossover-bin/crossover-bin-24.0.4.ebuild @@ -1,8 +1,8 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -PYTHON_COMPAT=( python3_{10..12} ) +PYTHON_COMPAT=( python3_{10..13} ) inherit python-single-r1 unpacker diff --git a/app-emulation/crossover-bin/crossover-bin-24.0.0.ebuild b/app-emulation/crossover-bin/crossover-bin-24.0.6.ebuild index 1dac82ed70b9..3f9f6812028d 100644 --- a/app-emulation/crossover-bin/crossover-bin-24.0.0.ebuild +++ b/app-emulation/crossover-bin/crossover-bin-24.0.6.ebuild @@ -1,8 +1,8 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -PYTHON_COMPAT=( python3_{10..12} ) +PYTHON_COMPAT=( python3_{10..13} ) inherit python-single-r1 unpacker @@ -10,6 +10,8 @@ DESCRIPTION="Commercial version of app-emulation/wine with paid support" HOMEPAGE="https://www.codeweavers.com/products/" SRC_URI="https://media.codeweavers.com/pub/crossover/cxlinux/demo/install-crossover-${PV}.bin" +S="${WORKDIR}" + LICENSE="CROSSOVER-3" SLOT="0" KEYWORDS="-* ~amd64 ~x86" @@ -18,16 +20,13 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}" RESTRICT="bindist test" QA_PREBUILT="*" -S="${WORKDIR}" -DEPEND="" BDEPEND="${PYTHON_DEPS} app-alternatives/cpio app-arch/unzip dev-lang/perl dev-util/bbe " - RDEPEND="${DEPEND} ${PYTHON_DEPS} $(python_gen_cond_dep ' diff --git a/app-emulation/crossover-bin/crossover-bin-25.0.0.ebuild b/app-emulation/crossover-bin/crossover-bin-25.0.0.ebuild new file mode 100644 index 000000000000..af862a23cfef --- /dev/null +++ b/app-emulation/crossover-bin/crossover-bin-25.0.0.ebuild @@ -0,0 +1,172 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PYTHON_COMPAT=( python3_{10..13} ) + +inherit python-single-r1 unpacker + +DESCRIPTION="Commercial version of app-emulation/wine with paid support" +HOMEPAGE="https://www.codeweavers.com/products/" +SRC_URI="https://media.codeweavers.com/pub/crossover/cxlinux/demo/install-crossover-${PV}.bin" + +S="${WORKDIR}" + +LICENSE="CROSSOVER-3" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86" +IUSE="+capi +cups +gphoto2 +gstreamer +jpeg +lcms +mp3 +nls osmesa +openal +opencl +opengl +pcap +png +scanner +ssl +v4l +vulkan" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RESTRICT="bindist test" +QA_PREBUILT="*" + +BDEPEND="${PYTHON_DEPS} + app-alternatives/cpio + app-arch/unzip + dev-lang/perl + dev-util/bbe +" +RDEPEND="${DEPEND} + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + dev-python/dbus-python[${PYTHON_USEDEP}] + dev-python/pycairo[${PYTHON_USEDEP}] + dev-python/pygobject:3[${PYTHON_USEDEP}] + ') + !prefix? ( sys-libs/glibc ) + capi? ( net-libs/libcapi[abi_x86_32(-)] ) + cups? ( net-print/cups[abi_x86_32(-)] ) + jpeg? ( media-libs/libjpeg-turbo:0[abi_x86_32(-)] ) + lcms? ( media-libs/lcms:2 ) + gphoto2? ( media-libs/libgphoto2[abi_x86_32(-)] ) + gstreamer? ( + media-libs/gstreamer:1.0[abi_x86_32(-)] + jpeg? ( media-plugins/gst-plugins-jpeg:1.0[abi_x86_32(-)] ) + media-plugins/gst-plugins-meta:1.0[abi_x86_32(-)] + ) + mp3? ( >=media-sound/mpg123-1.5.0[abi_x86_32(-)] ) + nls? ( sys-devel/gettext[abi_x86_32(-)] ) + openal? ( media-libs/openal[abi_x86_32(-)] ) + opencl? ( virtual/opencl[abi_x86_32(-)] ) + opengl? ( + virtual/glu[abi_x86_32(-)] + virtual/opengl[abi_x86_32(-)] + ) + pcap? ( net-libs/libpcap[abi_x86_32(-)] ) + png? ( media-libs/libpng:0[abi_x86_32(-)] ) + scanner? ( media-gfx/sane-backends[abi_x86_32(-)] ) + ssl? ( net-libs/gnutls:0/30.30[abi_x86_32(-)] ) + v4l? ( media-libs/libv4l[abi_x86_32(-)] ) + vulkan? ( media-libs/vulkan-loader[abi_x86_32(-)] ) + dev-libs/glib:2 + dev-libs/gobject-introspection + dev-libs/openssl-compat:1.1.1 + dev-util/desktop-file-utils + media-libs/alsa-lib[abi_x86_32(-)] + media-libs/freetype:2[abi_x86_32(-)] + media-libs/mesa[abi_x86_32(-),osmesa?] + media-libs/tiff-compat:4[abi_x86_32(-)] + sys-auth/nss-mdns[abi_x86_32(-)] + sys-apps/util-linux[abi_x86_32(-)] + sys-libs/libunwind[abi_x86_32(-)] + sys-libs/ncurses-compat:5[abi_x86_32(-)] + sys-libs/zlib[abi_x86_32(-)] + x11-libs/libICE[abi_x86_32(-)] + x11-libs/libSM[abi_x86_32(-)] + x11-libs/libX11[abi_x86_32(-)] + x11-libs/libXau[abi_x86_32(-)] + x11-libs/libXcursor[abi_x86_32(-)] + x11-libs/libXdmcp[abi_x86_32(-)] + x11-libs/libXext[abi_x86_32(-)] + x11-libs/libXi[abi_x86_32(-)] + x11-libs/libXrandr[abi_x86_32(-)] + x11-libs/libXxf86vm[abi_x86_32(-)] + x11-libs/libxcb[abi_x86_32(-)] + x11-libs/gdk-pixbuf:2[introspection] + x11-libs/gtk+:3[introspection] + x11-libs/pango[introspection] + x11-libs/vte:2.91[introspection] + sys-apps/pcsc-lite[abi_x86_32(-)] + sys-libs/libxcrypt[compat] +" + +src_unpack() { + # self unpacking zip archive; unzip warns about the exe stuff + unpack_zip ${A} +} + +src_prepare() { + default + + # Remove unnecessary files, license.txt file kept as it's used by + # multiple files (apart of the menu to show the license) + rm -r guis/ || die "Could not remove files" +} + +src_install() { + sed -i \ + -e "s:xdg_install_icons(:&\"${ED}\".:" \ + -e "s:\"\(.*\)/applications:\"${ED}\1/applications:" \ + -e "s:\"\(.*\)/desktop-directories:\"${ED}\1/desktop-directories:" \ + "${S}/lib/perl/CXMenuXDG.pm" || die + + # Install crossover symlink, bug #476314 + dosym ../cxoffice/bin/crossover /opt/bin/crossover + + # Install documentation + dodoc README changelog.txt + rm README changelog.txt || die "Could not remove README and changelog.txt" + + # Install files + dodir /opt/cxoffice + #cp -r ./* "${ED}/opt/cxoffice" \ + find . | cpio -dumpl "${ED}/opt/cxoffice" 2>/dev/null \ + || die "Could not install into ${ED}/opt/cxoffice" + + # Disable auto-update + sed -i -e 's/;;\"AutoUpdate\" = \"1\"/\"AutoUpdate\" = \"0\"/g' share/crossover/data/cxoffice.conf || die + + # Install configuration file + insinto /opt/cxoffice/etc + doins share/crossover/data/cxoffice.conf + dodir /etc/env.d + echo "CONFIG_PROTECT=/opt/cxoffice/etc/cxoffice.conf" >> "${ED}"/etc/env.d/30crossover-bin || die + + # Konqueror in its infinite wisdom decides to try opening things for + # writing, which are sandbox violations. This breaks the install process if + # it is installed, so we ninja edit it to false so it so doesn't run. + sed -i -e 's/cxwhich konqueror/false &/' "${ED}/opt/cxoffice/bin/locate_gui.sh" \ + || die "Could not apply workaround for konqueror" + + # Install menus + # XXX: locate_gui.sh automatically detects *-application-merged directories + # This means what we install will vary depending on the contents of + # /etc/xdg, which is a QA violation. It is not clear how to resolve this. + XDG_DATA_HOME="/usr/share" XDG_CONFIG_HOME="/etc/xdg" \ + "${ED}/opt/cxoffice/bin/cxmenu" --destdir="${ED}" --crossover --install \ + || die "Could not install menus" + + # Revert ninja edit + sed -i -e 's/false \(cxwhich konqueror\)/\1/' "${ED}/opt/cxoffice/bin/locate_gui.sh" \ + || die "Could not apply workaround for konqueror" + + # Drop Uninstall menus + rm "${ED}/usr/share/applications/"*"Uninstall"* \ + || die "Could not remove uninstall menus" + + # Fix PATHs + sed -i \ + -e "s:\"${ED}\".::" \ + -e "s:${ED}::" \ + "${ED}/opt/cxoffice/lib/perl/CXMenuXDG.pm" \ + || die "Could not fix paths in ${ED}/opt/cxoffice/lib/perl/CXMenuXDG.pm" + sed -i -e "s:${ED}::" \ + "${ED}/usr/share/applications/"*"CrossOver.desktop" \ + || die "Could not fix paths of *.desktop files" + + # Remove libs that link to opencl + if ! use opencl; then + rm "${ED}"/opt/cxoffice/lib/wine/{i386,x86_64}-unix/opencl.so || die + fi +} diff --git a/app-emulation/dxvk/Manifest b/app-emulation/dxvk/Manifest index ecdcdc505020..152cc8ff5f9c 100644 --- a/app-emulation/dxvk/Manifest +++ b/app-emulation/dxvk/Manifest @@ -4,6 +4,7 @@ AUX dxvk-2.4-d3d8-setup.patch 220 BLAKE2B 7f21542907d02e2924595aaff3270988214913 DIST dxvk-2.3.1.tar.gz 1005669 BLAKE2B d78448fcde9d600f7206dfa606fca4069e7563bb8b181fbc172691d6c45586904ae529550926a03612ed3cc1f2a2dff00990638125c1d7ce6179d3cd3ba8df04 SHA512 085567ac263872eb93d776ce7cf982690603e240a977dbb51ad69344af387fd745536ca62819afd4a809732a6f2d22b36c3df9538decf37dec527973d41e392f DIST dxvk-2.4.1.tar.gz 1060662 BLAKE2B 43294af5829fe306acdb72c07b94c28d34eb798a2eaf6d2e42c2b80900e9b6f4f323569dfd51d565c836237fddce26b843f69e4ff57fc2a5838382993a9dd6ed SHA512 629e45bbdaddf83cd8a394877289781e8f54330b4c865b2d453ba3068a6054511a3697ca115497b64df0ce9ee36748a7fdb01fdc5f49a7dc44c4a3d3e47bf6de DIST dxvk-2.5.3.tar.gz 1142475 BLAKE2B 04bfb577902effec9e22b6546cdfc2b3dd76b84e72c23cb26ac4e54f7aa9464b15d7d74b41dd810fc62d4fff9bbb24cee2771f562a7b931025abfa5995b000bc SHA512 93de46ab69dceea9e13904d9f267a53295a885676bce432c13d992ea33553250e03a695caf15f2c0a9a416c0ed3d799a9155a09dcadfeb43e516780fb188b122 +DIST dxvk-2.6.1.tar.gz 1209938 BLAKE2B 590a83297c0f4adc7828326cbb782103e1030e84c009d3983a756e285ea495cd55232a3e86626563a90fec328514c591a5d331df0cef51a8c422cb36fe723552 SHA512 0fcdfcacfecbcac2c638e2746d78759d144288975c7ee493b69d5dbcb3f13099e1472fd9ae50e52c12702f9fd74c91da8b1da5f8e6f96467826135947317829b DIST dxvk-2.6.tar.gz 1202585 BLAKE2B 5fe8f928dcb38b7842dcb6c8263e6e8d7f32a41722d331686e592b9424c2f2e8e5ba04808b99bd22be6da67ed554cfc7877fdca8608c886ca5845eba4528a9e1 SHA512 7b70cc5106716751603781c26377aeedd6180bba1872646f0d5d90e42167667ba79f9131c1a6050d87642da74563cd0d638f8c62e70b727a50e788e8d597f8dc DIST libdisplay-info-275e6459c7ab1ddd4b125f28d0440716e4888078.tar.bz2 81172 BLAKE2B 7a1e9e2feeb95e06e9d3f49ad9d14a8a152cca525085e819cda0b69c238fb79dddd6d547cd0f0a4b51dfc1ec74ac4c006345b9fc48563807bc8ab3bab58ea5ff SHA512 794e94e8c16d65901a7b705d1ba3361817b4e9e19e520b1004bcab232d0347f5713594d67f3c2b79d4f86b3012e710c648975547d27a63de043fcbe9e6b7e66d DIST setup_dxvk.sh 4631 BLAKE2B 25270e1f6dfd446b1d124eac3bd19da8bc770527d02d987949fc3ae0bead07866dafa25f77a90b9a408413a724354a29a4a156ff5c9dc75e26b66e079824ec86 SHA512 257fd84e29a7037f04a1a2a506502c71d527af58f8c84d8c3dfb64597ebdc41c3dca362eaf20ab4bc1982b76428c1f843815d56a6e1369d072e0009e270cb121 @@ -13,6 +14,7 @@ DIST vulkan-headers-46dc0f6e514f5730784bb2cac2a7c731636839e8.tar.gz 2255426 BLAK EBUILD dxvk-2.3.1-r1.ebuild 6488 BLAKE2B 2278cfc65c5660e6f84a62596286c0697dd46313901c2dccbb4f7cfa935466d44a953fd79d88c3a8f5feb870ca3711bebca84e87dbe915a205b101e2b310ffe3 SHA512 1f7d64d29268881885778b61b4f51b17d6bbace0c4090df766b594f0a4c1ce7950844b6e310b996b9c316335b11eab012f6c9c8d756123712808b156991126cd EBUILD dxvk-2.4.1.ebuild 5927 BLAKE2B 6191560ce91c21d16b6376d2414b270ef361168dcae45bb7f10be862f22e6b5736d1db5775c6cd3871dbb2980f35aae6a1dcf0f9d53a8565cd471e4a8fc35f2d SHA512 2d8788903bbb549e95434e78ef74c00096b9a1ae62e4be3330a6b67ea6b63621a063996a12af54aadd82d0e7e09721cc702190a11ad8d66558d33834fb8030fc EBUILD dxvk-2.5.3.ebuild 5888 BLAKE2B 555b3d035f2f22865e65139b32c1d41581b7ac1869ce8cc997e759f00dd91165f8d920af96a9d9a866da6e04bc54a2d1fdab60e7aed7ddba358d98d38a05dd88 SHA512 8c31de7ac960060198217ab341fc8876c314f89436f77b2c50d5c233ad0aba244d4297dacbb98b0d952be5f7c4976f91cddc60e0a14c82308595ce1d185cbe4e +EBUILD dxvk-2.6.1.ebuild 5890 BLAKE2B 453576e4b025fc91b24e20dc101d114f786cb4b139751796d87e25d1905b4b5fd682779713053f89203b33cf0c3a1bbd981fca121c3dc9d8d36474c338efa019 SHA512 d0a0b106dacc6916adcaa2876929295a932000adcf0dcc5f3e98545cdb3b5210d6ed4cb66f2a8f51103269eaff6498e4a293c4282b2f22f946043de47c516ffe EBUILD dxvk-2.6.ebuild 5888 BLAKE2B 086da12a679d95d52eb733a871cda2a75b5a17861a977183dbd41947788eb82b71317fc208c26a306e863e030af352595d1da072a3f11d3572e9aeac192866bd SHA512 98dc6a2b86d09a7404f88cb9cbaae3bb55943a2f41aecf0fea262f8d3d812ed8b629a462438bf51e44d5f95a6e8d7bc4284f063d2c98456391d806dfaed7c2b8 EBUILD dxvk-9999.ebuild 5770 BLAKE2B 175a20e55893182579689dd6fb6d08d68a4a19e14864f8d357b0f91cfa48047cc31541e4e28e0a9a67c61629fe50193909b83f95271f3af683f3a256fffbce41 SHA512 9c0eb71c36e46e5e4f69823daa1a010ff10aa173508f6306e465a80aca9ce4a3e55425a10e35a1f993803a35158203b85cc22147511923e83c6835ed1bfd6f24 MISC metadata.xml 944 BLAKE2B 804e365c1a6f88001f88c96e0e7cd67d444bee147d764b6c2dff0fb37d836754a2c21a1ea8b505b11c9de93dbc2533e10d0e15dea72b0c05db9d5ada2123a90e SHA512 c7f045fed2ef25fed4094551d0a420fe218d541a678cce4a18fce3d8c090e64dfacbdcce67fcfa202d4c3aeed8911a83b2bf5077e7e13a75aa0e5902d33e4716 diff --git a/app-emulation/dxvk/dxvk-2.6.1.ebuild b/app-emulation/dxvk/dxvk-2.6.1.ebuild new file mode 100644 index 000000000000..5700f2a8b954 --- /dev/null +++ b/app-emulation/dxvk/dxvk-2.6.1.ebuild @@ -0,0 +1,177 @@ +# Copyright 2022-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..13} ) +MULTILIB_ABIS="amd64 x86" # allow usage on /no-multilib/ +MULTILIB_COMPAT=( abi_x86_{32,64} ) +inherit eapi9-ver flag-o-matic meson-multilib python-any-r1 + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/doitsujin/dxvk.git" + EGIT_SUBMODULES=( + # picky about headers and is cross-compiled making -I/usr/include troublesome + include/{spirv,vulkan} + subprojects/libdisplay-info + ) +else + HASH_SPIRV=8b246ff75c6615ba4532fe4fde20f1be090c3764 + HASH_VULKAN=234c4b7370a8ea3239a214c9e871e4b17c89f4ab + HASH_DISPLAYINFO=275e6459c7ab1ddd4b125f28d0440716e4888078 + SRC_URI=" + https://github.com/doitsujin/dxvk/archive/refs/tags/v${PV}.tar.gz + -> ${P}.tar.gz + https://github.com/KhronosGroup/SPIRV-Headers/archive/${HASH_SPIRV}.tar.gz + -> spirv-headers-${HASH_SPIRV}.tar.gz + https://github.com/KhronosGroup/Vulkan-Headers/archive/${HASH_VULKAN}.tar.gz + -> vulkan-headers-${HASH_VULKAN}.tar.gz + https://gitlab.freedesktop.org/JoshuaAshton/libdisplay-info/-/archive/${HASH_DISPLAYINFO}/libdisplay-info-${HASH_DISPLAYINFO}.tar.bz2 + " + KEYWORDS="-* ~amd64 ~x86" +fi + +DESCRIPTION="Vulkan-based implementation of D3D9, D3D10 and D3D11 for Linux / Wine" +HOMEPAGE="https://github.com/doitsujin/dxvk/" + +# setup_dxvk.sh is no longer provided, fetch old until a better solution +SRC_URI+=" https://raw.githubusercontent.com/doitsujin/dxvk/cd21cd7fa3b0df3e0819e21ca700b7627a838d69/setup_dxvk.sh" + +LICENSE="ZLIB Apache-2.0 MIT" +SLOT="0" +IUSE="+abi_x86_32 crossdev-mingw +d3d8 +d3d9 +d3d10 +d3d11 +dxgi +strip" +REQUIRED_USE=" + || ( d3d8 d3d9 d3d10 d3d11 dxgi ) + d3d8? ( d3d9 ) + d3d10? ( d3d11 ) + d3d11? ( dxgi ) +" + +BDEPEND=" + ${PYTHON_DEPS} + dev-util/glslang + !crossdev-mingw? ( dev-util/mingw64-toolchain[${MULTILIB_USEDEP}] ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-1.10.3-wow64-setup.patch + "${FILESDIR}"/${PN}-2.4-d3d8-setup.patch +) + +pkg_pretend() { + [[ ${MERGE_TYPE} == binary ]] && return + + if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then + local tool=-w64-mingw32-g++ + for tool in $(usev abi_x86_64 x86_64${tool}) $(usev abi_x86_32 i686${tool}); do + if ! type -P ${tool} >/dev/null; then + eerror "With USE=crossdev-mingw, it is necessary to setup the mingw toolchain." + eerror "For instructions, please see: https://wiki.gentoo.org/wiki/Mingw" + use abi_x86_32 && use abi_x86_64 && + eerror "Also, with USE=abi_x86_32, will need both i686 and x86_64 toolchains." + die "USE=crossdev-mingw is set but ${tool} was not found" + elif [[ ! $(LC_ALL=C ${tool} -v 2>&1) =~ "Thread model: posix" ]]; then + eerror "${PN} requires GCC to be built with --enable-threads=posix" + eerror "Please see: https://wiki.gentoo.org/wiki/Mingw#POSIX_threads_for_Windows" + die "USE=crossdev-mingw is set but ${tool} does not use POSIX threads" + fi + done + fi +} + +src_prepare() { + if [[ ${PV} != 9999 ]]; then + rmdir include/{spirv,vulkan} subprojects/libdisplay-info || die + mv ../SPIRV-Headers-${HASH_SPIRV} include/spirv || die + mv ../Vulkan-Headers-${HASH_VULKAN} include/vulkan || die + mv ../libdisplay-info-${HASH_DISPLAYINFO} subprojects/libdisplay-info || die + fi + cp -- "${DISTDIR}"/setup_dxvk.sh . || die + + default + + sed -i "/^basedir=/s|=.*|=${EPREFIX}/usr/lib/${PN}|" setup_dxvk.sh || die +} + +src_configure() { + use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH} + + # random segfaults been reported with LTO in some games, filter as + # a safety (note that optimizing this further won't really help + # performance, GPU does the actual work) + filter-lto + + # -mavx and mingw-gcc do not mix safely here + # https://github.com/doitsujin/dxvk/issues/4746#issuecomment-2708869202 + append-flags -mno-avx + + if [[ ${CHOST} != *-mingw* ]]; then + if [[ ! -v MINGW_BYPASS ]]; then + unset AR CC CXX RC STRIP + filter-flags '-fuse-ld=*' + filter-flags '-mfunction-return=thunk*' #878849 + + # some bashrc-mv users tend to do CFLAGS="${LDFLAGS}" and then + # strip-unsupported-flags miss these during compile-only tests + # (primarily done for 23.0 profiles' -z, not full coverage) + filter-flags '-Wl,-z,*' #928038 + fi + + CHOST_amd64=x86_64-w64-mingw32 + CHOST_x86=i686-w64-mingw32 + CHOST=$(usex x86 ${CHOST_x86} ${CHOST_amd64}) + + strip-unsupported-flags + fi + + multilib-minimal_src_configure +} + +multilib_src_configure() { + # multilib's ${CHOST_amd64}-gcc -m32 is unusable with crossdev, + # unset again so meson eclass will set ${CHOST}-gcc + others + use crossdev-mingw && [[ ! -v MINGW_BYPASS ]] && unset AR CC CXX RC STRIP + + local emesonargs=( + --prefix="${EPREFIX}"/usr/lib/${PN} + --{bin,lib}dir=x${MULTILIB_ABI_FLAG: -2} + --force-fallback-for=libdisplay-info # system's is ELF (unusable) + $(meson_use {,enable_}d3d8) + $(meson_use {,enable_}d3d9) + $(meson_use {,enable_}d3d10) + $(meson_use {,enable_}d3d11) + $(meson_use {,enable_}dxgi) + $(usev strip --strip) # portage won't strip .dll, so allow it here + ) + + meson_src_configure +} + +multilib_src_install_all() { + dobin setup_dxvk.sh + dodoc README.md dxvk.conf + + find "${ED}" -type f -name '*.a' -delete || die +} + +pkg_postinst() { + if [[ ! ${REPLACING_VERSIONS} ]]; then + elog "To enable ${PN} on a wine prefix, you can run the following command:" + elog + elog " WINEPREFIX=/path/to/prefix setup_dxvk.sh install --symlink" + elog + elog "See ${EROOT}/usr/share/doc/${PF}/README.md* for details." + elog "Note: setup_dxvk.sh is unofficially temporarily provided as it was" + elog "removed upstream, handling may change in the future." + fi + + if use d3d8 && ver_replacing -lt 2.4; then + elog + elog ">=${PN}-2.4 now provides d3d8.dll, to make use of it will need to" + elog "update old wine prefixes which is typically done by re-running:" + elog + elog " WINEPREFIX=/path/to/prefix setup_dxvk.sh install --symlink" + elog + fi +} diff --git a/app-emulation/faudio/Manifest b/app-emulation/faudio/Manifest index d09b0ee831cb..d58eddfecc91 100644 --- a/app-emulation/faudio/Manifest +++ b/app-emulation/faudio/Manifest @@ -1,5 +1,5 @@ -DIST faudio-25.02.tar.gz 1127116 BLAKE2B 9df60de8a9448d5425c1e4b5d88bed12b4b7f40971c04120795f4c799e2b7bf8eb45a8e649c0cec8e4445e64d9a602e78769ca69bc998ddae66e5b9fc74e22a6 SHA512 1d93b0d167e23ea2f012ec10ca1227e05ff1b81aa9568ab35bb6335622a62bacb5ed33b788ef6e953050a3bfa7d15e6a9579821cf5e36c239998a0e1271c9c1e DIST faudio-25.03.tar.gz 1126597 BLAKE2B bd95c8455adf072186309697040aea677b46afa25ccdc8ad45477d7f78237153908955fc8e772bfc7d460b9cd4dbad31a170a25b0352df052546b402a3f99023 SHA512 ec1f37a73aa5ad57841e297d8ee730b8b161144bc0624e29e9ba7b86c6f2d8657b2b20169603616701db04d99a9522dd1463c043e2c0e64eb7d980f4909327c7 -EBUILD faudio-25.02.ebuild 920 BLAKE2B 216eef9051a14d0a43f55d752374dbef54711ebcf8d6373b924fd13e6411f9bb9317273253904bc79fe8a40b8d2c4465842ae96240ef3edd0e4c2e575b4bfcc4 SHA512 e7c2ce97836d40610b40c088c4a4d919eef5e4594c19a4d284f6a227b67f31033d7e99040e792f6f076c248793431ed57edcd518fbf56e096ed60ae6ff27d36e -EBUILD faudio-25.03.ebuild 943 BLAKE2B ac0e1c9289272a0a433dc15857cd117bf6da4c5ae544eccbfc98cdbd3fea51f2e61560c38ffaae36819ac6e64b5e7a122ee50a031914fcb1ce2a6b1ff7294b93 SHA512 d527e3391cf38d91c81b4fb31a00c536319040d1c1033b7f6bc0405962833308845e11f54f123790891bc5286cb27d1bbef297134fd6285c834b24bb53f620e3 -MISC metadata.xml 719 BLAKE2B b71b3829f3c1a2a546621b460f3ccc41f79db0acf913f409bc55ad2b8632a8361a7b45952b8aab2f9564391b14f3735f17c10a0e5f46da55fc49b730a743a5e6 SHA512 f52da50d3b16eb8dda8d2af6d7db6ae1e457d48c9a79977cb5288e379446ea4a5e420bd2dc17067d3bcba5cee7838ce10401f319e556d671b0483def94c3f2d7 +DIST faudio-25.04.tar.gz 1126602 BLAKE2B f25a05b6e4f94038c2e1d8d1574774d0039cff50db802674fb2c94d9a345a580e0e941d5e817faea06599eb9f31f70f350ae87e567257dfa748407b3d5ffda70 SHA512 191b4947c43161c74f32da0208d752f492bcc48eb4ce5bd94824fe541ce0446ff522bfed45fdde29eb05f6938ed814dba3bde31fd06abed4bccf6a79cf334eac +EBUILD faudio-25.03.ebuild 941 BLAKE2B cae4e06d93ec6b6667151ace832923ece813023a3f388c63bed04bf1e9d905402d1ef8e4f0bddb2875e478d5d0370d48af0ed5ead8c56e43716060ab4d43d27d SHA512 d8b56455cc503675e963b1cd2ffcfcb66d6ea775ff481a49be6f396b4525a06747f4794b63557fb50f21cbc762488b5fff48a3fe60546d4550d33c4a5055adf8 +EBUILD faudio-25.04.ebuild 1005 BLAKE2B e0983a18dc02b6fdf9e36165ab2774dde2c3b60c7261eb6fd3165f0dbc91aeac9f512f97dd3a87fde0cbf44e82ede89fbce45d73787fcd9f4c584c3285c38f83 SHA512 d38089845b7975ae463b043c33fbd11c38b4210f9c5dabe624afc393ff2c053c5b22ae2dd036e3114ccc77c68d0b7ce3dbbc303c3307aec5aabeb66204429dbe +MISC metadata.xml 802 BLAKE2B 8b100c978b63ebc2928d45063e2ed05a29fffcee7fc58b20b8c39b92237e81b1ad4b8098c241916e0e20fb95a9d05101f2d20c545b35a420a673dc62d5a27f8e SHA512 4aa9fce20af5931f8bc821d2eda05030336d9ac3c86ca50d549e38c315b3457f5d12f3d815d1a28a1aa739396e9632c46897ead195fe341f18d40ec0d8651e6a diff --git a/app-emulation/faudio/faudio-25.03.ebuild b/app-emulation/faudio/faudio-25.03.ebuild index 0410edca26b4..d13835e6ab7f 100644 --- a/app-emulation/faudio/faudio-25.03.ebuild +++ b/app-emulation/faudio/faudio-25.03.ebuild @@ -12,7 +12,7 @@ S="${WORKDIR}/FAudio-${PV}" LICENSE="ZLIB" SLOT="0" -KEYWORDS="~amd64 ~x86" +KEYWORDS="amd64 x86" IUSE="debug dumpvoices test" RESTRICT="!test? ( test )" diff --git a/app-emulation/faudio/faudio-25.02.ebuild b/app-emulation/faudio/faudio-25.04.ebuild index 1295c611a25c..47c16320b083 100644 --- a/app-emulation/faudio/faudio-25.02.ebuild +++ b/app-emulation/faudio/faudio-25.04.ebuild @@ -12,11 +12,14 @@ S="${WORKDIR}/FAudio-${PV}" LICENSE="ZLIB" SLOT="0" -KEYWORDS="amd64 x86" -IUSE="debug dumpvoices test" +KEYWORDS="~amd64 ~x86" +IUSE="debug dumpvoices sdl3 test" RESTRICT="!test? ( test )" -RDEPEND="media-libs/libsdl2[sound]" +RDEPEND=" + sdl3? ( media-libs/libsdl3 ) + !sdl3? ( media-libs/libsdl2[sound] ) +" DEPEND="${RDEPEND}" src_configure() { @@ -24,8 +27,9 @@ src_configure() { use debug || append-cppflags -DFAUDIO_DISABLE_DEBUGCONFIGURATION local mycmakeargs=( - -DBUILD_TESTS=$(usex test) - -DDUMP_VOICES=$(usex dumpvoices) + -DBUILD_SDL3="$(usex sdl3)" + -DBUILD_TESTS="$(usex test)" + -DDUMP_VOICES="$(usex dumpvoices)" ) cmake_src_configure diff --git a/app-emulation/faudio/metadata.xml b/app-emulation/faudio/metadata.xml index 0c09d653bc92..06a722423fc7 100644 --- a/app-emulation/faudio/metadata.xml +++ b/app-emulation/faudio/metadata.xml @@ -12,6 +12,7 @@ </longdescription> <use> <flag name="dumpvoices">FAudio dumps buffer data to individual files with RIFF/XWMA headers, usable with players like ffplay/testxwma.</flag> + <flag name="sdl3">Build against SDL3 using <pkg>media-libs/libsdl3</pkg>.</flag> </use> <upstream> <remote-id type="github">FNA-XNA/FAudio</remote-id> diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest index f644316ba7aa..efbed4316eca 100644 --- a/app-emulation/libvirt/Manifest +++ b/app-emulation/libvirt/Manifest @@ -3,6 +3,8 @@ AUX libvirt-10.10.0-qemu-tpm-do-not-update-profile-name-for-transient-do.patch 2 AUX libvirt-10.5.0-virt-aa-helper-Allow-RO-access-to-usr-share-edk2-ovm.patch 1439 BLAKE2B e5d837f6f7af00fa6b7d3ef94ba0cdcd6120a17c17f52986df451ff2a66a019526f480cdd71592ea89c0629277c751f84b6f79c898d20017d454eda790ce0c66 SHA512 106e029750ed185c823e1759ead99520f628a52a00926cb5a09ee941e4b51cbbdbc91d4b95294eb9225459cb47bbde402b017016ea4ab177b4ba15c2decea90a AUX libvirt-10.7.0-fix-paths-for-apparmor.patch 3902 BLAKE2B 62d7df4963fe57794252549a45b4809581dbd02bc46c51a8c46b21338a72d0e9aea661c527bcf6e0117ea93bab4fe812e97a6b0957f8d8bc957ee170162732ee SHA512 e4cd5577b37b2800da711576696a0c7888c68d0755f820f002451dc4ecd49ce19e0e8759ec16afdb4489647a4b48b4284c1befd3f43e1a53a8871aa6ab1d4833 AUX libvirt-11.0.0-Fix-paths-in-libvirt-guests.sh.in.patch 1001 BLAKE2B 908044c9af1eefeffb52ecbc65cb66663516ed7e654a5e4ea76907ad55e48f76f70fe71e778a0ea48aac6fe613bf6d70e8ac6fb4519acc78d64783bc95439b53 SHA512 7c46700aeae055a15d7757db599b16fc4431893f3f81b58db2d0c9395a54eedca810f2616b327246625d5971801ca18e303ee78b60e65f6aa507bdb0825916ef +AUX libvirt-11.3.0-do-not-use-sysconfig.patch 2857 BLAKE2B b0a536ea05dc59a072d495f77ac4ae3699b76454585028bca3bc5d94bde773af38b241edf9ff45ae0c244f11456e95204fb0e2d3f0f9a10b1223bb8f7677ee12 SHA512 23df8ba89fb61486dd5733a341a9783f03065d5853646942bd387266fc6305404799765d8515b5c8cb6ec9a6d8e471fe28b4f327eacbd3492531cfeba8437453 +AUX libvirt-11.3.0-fix-paths-for-apparmor.patch 3344 BLAKE2B 7c6c1af18d322725a38bb8d64923d605af30e586256f98f35bf3bd278c185baa18208ebbbeb2c634ec0eba566b2ee41d9de6ff539da77acf5c287cc08f3d603f SHA512 613ebe783872ddb091991042726230d09dd036a8a8c64d9abccc19dd53680ac6c201ca3dac125aea334491974b73387a86abb5afee2caaa06c2568035549527d AUX libvirt-9.4.0-fix_paths_in_libvirt-guests_sh.patch 988 BLAKE2B 5936eafa5c300edad7ed368ec13063d31aea59e3daefeac59cf515ea44667f61aa63b0e2c2a5c88ace24c48cc132789cc5fa1a7c6c04c17e9ac61b114778e46d SHA512 5b80a5ec2898c1c821d0d49b9de67a256f82cb60879215ddde07c2a51f2e8a8b6893fec65617c27edec50cd51a362fb1fcdd21827e8de954f26879adcfa12418 AUX libvirt-9.9.0-do-not-use-sysconfig.patch 2910 BLAKE2B 60d9cd53be99377b1f51f01eca85815cbdcb3a97cbcd4131931a975d4ec8073c3a384e9a67267580d30f3ab7117a2fe83ee91c406139ef4bc25ee76e6752d884 SHA512 3ef1c6eb803e0c2425f81a9c90dd0afc466b2474e62fd8189d029bddc679ef1cf9715bf23d98bff6e3ec1ab2515a0a5ede5ffd95f15cef56f3069283ccc8e741 AUX libvirt-guests.confd 2430 BLAKE2B 9d56477c9377e02503782e6d653579c6d149b292c43f37926f4646374e8aae05ca812b6a3a561811482861f8fe67dfdbe63851963326ddbbf2f4644c85411120 SHA512 78f419a89de7aabaad860903c24f1c070786fc1296d987e61dd537705b0e7f71a46c315888028f3826c3417e42861ca8471788be4ec5695e98427c5f18ae63fc @@ -18,8 +20,11 @@ DIST libvirt-11.0.0.tar.xz 9700388 BLAKE2B 0fc248bfcc505e143fa56560a216ed62ddeb8 DIST libvirt-11.0.0.tar.xz.asc 833 BLAKE2B c959800b18ac7220970d6a772aefe4a5b53419298641b4fc659db2585d187701b823cda06ea2e16ff8bfa50c7552fb3eb50ff5c4ea40fb4a3c6eb93921481165 SHA512 7b1bb3d902986bc269bf9efd0ab2dbfb256c3e02e0d410e3bf81ddb649b1d0983090adc1857d59db79fa7ac19b983496a80ac3bf6ae13163bb772cea05b5728b DIST libvirt-11.1.0.tar.xz 9775904 BLAKE2B 81ce8d537d6d069d44b3e24f2091729acd8b04ceea14e5c56188cffa300015aa5215fa64324718cede93d1bf84ae5409936bf7f6c8505b071b8dcc47094da78c SHA512 f491b3c0b0e4b6a96456eba26d72e820141c231fa44f34f2d153b805b046ca869b5d0286cd7e2867ae938e5eab5e04f2995c097d41227914bc87a76800e89bc8 DIST libvirt-11.1.0.tar.xz.asc 833 BLAKE2B c1d580c77a336eb83fcc47fd12e0595952612cdb6765adb7c1bb8708457642799833fb7082410198ccf9f22c82714ec0cb288045e0ad4fefdff219b259815b15 SHA512 914237e6341f6df60f407d5e47d4ae1193a75fee905d9faa4a439eda421e446c84909d08b21927b41e0972c90c0eeecb4821fefefcf454872e2887ce91344be3 +DIST libvirt-11.2.0.tar.xz 9766976 BLAKE2B dc6288c2e61ab2730a8fa907b52061abb5bd3ca2ab28aa6e1e4142ddc00e9f0f4747240cae7dffed87c88fb4c14913a12f1fb3bad6d4079785e397ff78e2cc4c SHA512 78fdc0e7cc09687eb9fdb3d43ceab63018fb06d931669e4a461ddb2612a2367d885f59de14b7770ff164e5a30e487a0dc8c8bdcc778a14c4cf37e0e7db162792 +DIST libvirt-11.2.0.tar.xz.asc 833 BLAKE2B 2047fc9dcadfd57fda7d7fd02456127213715d514135d5a0a55b077270c93f418da9ecea57dbc7b44d8c57d7fe373411a8e27975669c94d059b8916b0237f048 SHA512 59e88826cc2d78ccaf18ff637afd279c470e026836b9ad08c35e3226e7d6d02a4dcd375d037454572b21bf029e3b3ec9f577a48e219c54137ecfaa2adc938c6c EBUILD libvirt-10.10.0-r1.ebuild 10172 BLAKE2B 4fcfec9ef56ba146955ba821f8badbc1de0350a88b216a6e705a3d15546f52cb083a9aac612ae5ab3d6ab38eb0b4d12be7c9965084c3c213ad9f86a74b1e3258 SHA512 92d179c3fc9d0ed53d83f930a107081e62c67efab1ff136adc3332a080d4ce3aea9d93c332ee32406804a99ee3bad4951b7408292770bd0c21911d73f2008c81 EBUILD libvirt-11.0.0.ebuild 10088 BLAKE2B cd8d867441289e994ae329426272bdbf49ed4d79e8145556c2b168fc7a1c07c4242ca7969359eca74e5ad8f4caa837dd517d28a7c11fb4cb60a04e455289ff5a SHA512 c50841c8dc8a7eb3cd0ab543f4a15098707729e2ff3c531bc9e3efaf8efa2d8ef8ac7f58858d43d228bff46768d237077454cde4adf7fc6d048dae1eb1f1e57b -EBUILD libvirt-11.1.0.ebuild 9809 BLAKE2B 40b5a8069907614a504a2d6d718c3b4a190d6999ee8f0aafed0fbe3c5d01e142e4bc5958a76d5a69ef5a4a8a683027cc4e0dd5c9e51c4ed79e2e0ca49b503a71 SHA512 7122fce57ffb212382a4724d869a67b050341792c146b18fab7c7bb22ef7830c863234a7f36f05f1378c35649e9b38eeab779b797a6a2d656fffa5b649c19a21 -EBUILD libvirt-9999.ebuild 9809 BLAKE2B 40b5a8069907614a504a2d6d718c3b4a190d6999ee8f0aafed0fbe3c5d01e142e4bc5958a76d5a69ef5a4a8a683027cc4e0dd5c9e51c4ed79e2e0ca49b503a71 SHA512 7122fce57ffb212382a4724d869a67b050341792c146b18fab7c7bb22ef7830c863234a7f36f05f1378c35649e9b38eeab779b797a6a2d656fffa5b649c19a21 +EBUILD libvirt-11.1.0.ebuild 9806 BLAKE2B f671eef8ad22011e124f1bf40de69f9813bc092a8ace13e152a79e965ed2d1ae1bb7e724268a9ff66eaad562269563a969e47b685107c1eb07ba2eff0c2ac69b SHA512 1538ef994049dbf1fe9cdc5db4f23140623af7cad6007b396e9d06955d93624a33f935b1f2183c3dbb706b0d0c3d3b38ff563f445d55b0136fcd084340631e6c +EBUILD libvirt-11.2.0.ebuild 9809 BLAKE2B 40b5a8069907614a504a2d6d718c3b4a190d6999ee8f0aafed0fbe3c5d01e142e4bc5958a76d5a69ef5a4a8a683027cc4e0dd5c9e51c4ed79e2e0ca49b503a71 SHA512 7122fce57ffb212382a4724d869a67b050341792c146b18fab7c7bb22ef7830c863234a7f36f05f1378c35649e9b38eeab779b797a6a2d656fffa5b649c19a21 +EBUILD libvirt-9999.ebuild 9810 BLAKE2B b8c6ec6e98b12a9949b57a93843872f80b8fd042f09f6b635e44d18bca1b9fbd416f488144ba29aef2806f36cc1359fde2430c31f14149c469b630c037ee3e87 SHA512 66757626495f3f1cd7f02c8ba12632956834643a1f64e656f5d970b1bf6d77f52f1b3fd2fe24293b580ab562efca71757e30b794a8cd592345d95d6a1c6002f2 MISC metadata.xml 3822 BLAKE2B badb40564def06854a0c3af011b5de2888d722996c9b15df570a709161e49796f3d76ba2365c4adc1724f16bee3518d0e87ed6d2619d505b5ba2f1fd02c90f34 SHA512 f31e86b4d0c1faaf5bf0ac253cf20ce7728b94841debb590356efc0fa1e1a3d095a94e69ce0a34f793faadf10ed00ae1212aac54d13288f1975db4f032fd8b50 diff --git a/app-emulation/libvirt/files/libvirt-11.3.0-do-not-use-sysconfig.patch b/app-emulation/libvirt/files/libvirt-11.3.0-do-not-use-sysconfig.patch new file mode 100644 index 000000000000..16e61c61b7c9 --- /dev/null +++ b/app-emulation/libvirt/files/libvirt-11.3.0-do-not-use-sysconfig.patch @@ -0,0 +1,81 @@ +From ae24d3d483ef01f6cccffbd114571ffecc4fe80f Mon Sep 17 00:00:00 2001 +Message-ID: <ae24d3d483ef01f6cccffbd114571ffecc4fe80f.1743863726.git.mprivozn@redhat.com> +From: Michal Privoznik <mprivozn@redhat.com> +Date: Wed, 2 Mar 2022 10:01:04 +0100 +Subject: [PATCH] libvirt-11.3.0-do-not-use-sysconfig.patch + +From: Michal Privoznik <mprivozn@redhat.com> + +Signed-off-by: Michal Privoznik <mprivozn@redhat.com> +--- + src/locking/virtlockd.service.in | 1 - + src/logging/virtlogd.service.in | 1 - + src/remote/libvirtd.service.in | 1 - + src/virtd.service.in | 1 - + tools/libvirt-guests.service.in | 2 +- + 5 files changed, 1 insertion(+), 5 deletions(-) + +diff --git a/src/locking/virtlockd.service.in b/src/locking/virtlockd.service.in +index cd6c77c6af..1746f0e8c9 100644 +--- a/src/locking/virtlockd.service.in ++++ b/src/locking/virtlockd.service.in +@@ -10,7 +10,6 @@ After=virtlockd-admin.socket + [Service] + Type=notify + Environment=VIRTLOCKD_ARGS= +-EnvironmentFile=-@initconfdir@/virtlockd + ExecStart=@sbindir@/virtlockd $VIRTLOCKD_ARGS + ExecReload=/bin/kill -USR1 $MAINPID + +diff --git a/src/logging/virtlogd.service.in b/src/logging/virtlogd.service.in +index bcc356f9d1..94d3be9dee 100644 +--- a/src/logging/virtlogd.service.in ++++ b/src/logging/virtlogd.service.in +@@ -10,7 +10,6 @@ After=virtlogd-admin.socket + [Service] + Type=notify + Environment=VIRTLOGD_ARGS= +-EnvironmentFile=-@initconfdir@/virtlogd + ExecStart=@sbindir@/virtlogd $VIRTLOGD_ARGS + ExecReload=/bin/kill -USR1 $MAINPID + +diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in +index b0a062e885..39a7a91a75 100644 +--- a/src/remote/libvirtd.service.in ++++ b/src/remote/libvirtd.service.in +@@ -28,7 +28,6 @@ Conflicts=xendomains.service + [Service] + Type=notify-reload + Environment=LIBVIRTD_ARGS="--timeout 120" +-EnvironmentFile=-@initconfdir@/libvirtd + ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS + ExecReload=/bin/kill -HUP $MAINPID + KillMode=process +diff --git a/src/virtd.service.in b/src/virtd.service.in +index 7ffb77e339..92a48da90c 100644 +--- a/src/virtd.service.in ++++ b/src/virtd.service.in +@@ -17,7 +17,6 @@ After=apparmor.service + [Service] + Type=notify-reload + Environment=@SERVICE@_ARGS="--timeout 120" +-EnvironmentFile=-@initconfdir@/@service@ + ExecStart=@sbindir@/@service@ $@SERVICE@_ARGS + ExecReload=/bin/kill -HUP $MAINPID + Restart=on-failure +diff --git a/tools/libvirt-guests.service.in b/tools/libvirt-guests.service.in +index b044444298..24cfcf468c 100644 +--- a/tools/libvirt-guests.service.in ++++ b/tools/libvirt-guests.service.in +@@ -14,7 +14,7 @@ After=virtxend.socket + After=virt-guest-shutdown.target + + [Service] +-EnvironmentFile=-@initconfdir@/libvirt-guests ++EnvironmentFile=-/etc/libvirt/libvirt-guests.conf + # Hack just call traditional service until we factor + # out the code + ExecStart=@libexecdir@/libvirt-guests.sh start +-- +2.49.0 + diff --git a/app-emulation/libvirt/files/libvirt-11.3.0-fix-paths-for-apparmor.patch b/app-emulation/libvirt/files/libvirt-11.3.0-fix-paths-for-apparmor.patch new file mode 100644 index 000000000000..36dde03524ea --- /dev/null +++ b/app-emulation/libvirt/files/libvirt-11.3.0-fix-paths-for-apparmor.patch @@ -0,0 +1,74 @@ +From dd0a7e07f253248de4f0a5da5547e0534438f569 Mon Sep 17 00:00:00 2001 +Message-ID: <dd0a7e07f253248de4f0a5da5547e0534438f569.1743862811.git.mprivozn@redhat.com> +From: Michal Privoznik <mprivozn@redhat.com> +Date: Tue, 15 Mar 2022 05:23:29 +0100 +Subject: [PATCH] libvirt-11.3.0-fix-paths-for-apparmor.patch + +From: Michal Privoznik <mprivozn@redhat.com> + +Signed-off-by: Michal Privoznik <mprivozn@redhat.com> +--- + src/security/apparmor/libvirt-qemu | 1 + + src/security/apparmor/meson.build | 2 +- + src/security/apparmor/usr.lib.libvirt.virt-aa-helper.local | 1 - + ....virt-aa-helper.in => usr.libexec.libvirt.virt-aa-helper.in} | 2 +- + src/security/apparmor/usr.libexec.libvirt.virt-aa-helper.local | 1 + + 5 files changed, 4 insertions(+), 3 deletions(-) + delete mode 100644 src/security/apparmor/usr.lib.libvirt.virt-aa-helper.local + rename src/security/apparmor/{usr.lib.libvirt.virt-aa-helper.in => usr.libexec.libvirt.virt-aa-helper.in} (96%) + create mode 100644 src/security/apparmor/usr.libexec.libvirt.virt-aa-helper.local + +diff --git a/src/security/apparmor/libvirt-qemu b/src/security/apparmor/libvirt-qemu +index e4aceacd70..6ac5149baf 100644 +--- a/src/security/apparmor/libvirt-qemu ++++ b/src/security/apparmor/libvirt-qemu +@@ -97,6 +97,7 @@ + /usr/share/sgabios/** r, + /usr/share/slof/** r, + /usr/share/vgabios/** r, ++ /usr/share/seavgabios/** r, + + # pki for libvirt-vnc and libvirt-spice (LP: #901272, #1690140) + /etc/pki/CA/ r, +diff --git a/src/security/apparmor/meson.build b/src/security/apparmor/meson.build +index 09d9fac02c..d4b168aaed 100644 +--- a/src/security/apparmor/meson.build ++++ b/src/security/apparmor/meson.build +@@ -1,5 +1,5 @@ + apparmor_gen_profiles = [ +- 'usr.lib.libvirt.virt-aa-helper', ++ 'usr.libexec.libvirt.virt-aa-helper', + 'usr.sbin.libvirtd', + 'usr.sbin.virtqemud', + 'usr.sbin.virtxend', +diff --git a/src/security/apparmor/usr.lib.libvirt.virt-aa-helper.local b/src/security/apparmor/usr.lib.libvirt.virt-aa-helper.local +deleted file mode 100644 +index c0990e51d0..0000000000 +--- a/src/security/apparmor/usr.lib.libvirt.virt-aa-helper.local ++++ /dev/null +@@ -1 +0,0 @@ +-# Site-specific additions and overrides for 'usr.lib.libvirt.virt-aa-helper' +diff --git a/src/security/apparmor/usr.lib.libvirt.virt-aa-helper.in b/src/security/apparmor/usr.libexec.libvirt.virt-aa-helper.in +similarity index 96% +rename from src/security/apparmor/usr.lib.libvirt.virt-aa-helper.in +rename to src/security/apparmor/usr.libexec.libvirt.virt-aa-helper.in +index e209a8bff7..cf129dde31 100644 +--- a/src/security/apparmor/usr.lib.libvirt.virt-aa-helper.in ++++ b/src/security/apparmor/usr.libexec.libvirt.virt-aa-helper.in +@@ -74,5 +74,5 @@ profile virt-aa-helper @libexecdir@/virt-aa-helper { + /**.[iI][sS][oO] r, + /**/disk{,.*} r, + +- include if exists <local/usr.lib.libvirt.virt-aa-helper> ++ include if exists <local/usr.libexec.libvirt.virt-aa-helper> + } +diff --git a/src/security/apparmor/usr.libexec.libvirt.virt-aa-helper.local b/src/security/apparmor/usr.libexec.libvirt.virt-aa-helper.local +new file mode 100644 +index 0000000000..974653d797 +--- /dev/null ++++ b/src/security/apparmor/usr.libexec.libvirt.virt-aa-helper.local +@@ -0,0 +1 @@ ++# Site-specific additions and overrides for 'usr.libexec.libvirt.virt-aa-helper' +-- +2.49.0 + diff --git a/app-emulation/libvirt/libvirt-11.1.0.ebuild b/app-emulation/libvirt/libvirt-11.1.0.ebuild index 78840580fa60..c8935a98ecc8 100644 --- a/app-emulation/libvirt/libvirt-11.1.0.ebuild +++ b/app-emulation/libvirt/libvirt-11.1.0.ebuild @@ -21,7 +21,7 @@ if [[ ${PV} = *9999* ]]; then else SRC_URI="https://download.libvirt.org/${P}.tar.xz verify-sig? ( https://download.libvirt.org/${P}.tar.xz.asc )" - KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" + KEYWORDS="amd64 ~arm ~arm64 ppc64 x86" fi DESCRIPTION="C toolkit to manipulate virtual machines" diff --git a/app-emulation/libvirt/libvirt-11.2.0.ebuild b/app-emulation/libvirt/libvirt-11.2.0.ebuild new file mode 100644 index 000000000000..78840580fa60 --- /dev/null +++ b/app-emulation/libvirt/libvirt-11.2.0.ebuild @@ -0,0 +1,381 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Packages which get releases together: +# app-emacs/nxml-libvirt-schemas +# dev-python/libvirt-python +# dev-perl/Sys-Virt +# app-emulation/libvirt +# Please bump them together! + +PYTHON_COMPAT=( python3_{10..13} ) +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/libvirt.org.asc +inherit meson linux-info python-any-r1 readme.gentoo-r1 tmpfiles verify-sig + +if [[ ${PV} = *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://gitlab.com/libvirt/libvirt.git" + EGIT_BRANCH="master" +else + SRC_URI="https://download.libvirt.org/${P}.tar.xz + verify-sig? ( https://download.libvirt.org/${P}.tar.xz.asc )" + KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" +fi + +DESCRIPTION="C toolkit to manipulate virtual machines" +HOMEPAGE="https://www.libvirt.org/ https://gitlab.com/libvirt/libvirt/" +LICENSE="LGPL-2.1" +SLOT="0/${PV}" +IUSE=" + apparmor audit bash-completion +caps dtrace firewalld fuse glusterfs + iscsi iscsi-direct +libvirtd lvm libssh libssh2 lxc nbd nfs nls numa + openvz parted pcap policykit +qemu rbd sasl selinux test +udev + virtiofsd virtualbox +virt-network wireshark-plugins xen zfs +" +RESTRICT="!test? ( test )" + +REQUIRED_USE=" + firewalld? ( virt-network ) + libvirtd? ( || ( lxc openvz qemu virtualbox xen ) ) + lxc? ( caps libvirtd ) + openvz? ( libvirtd ) + qemu? ( libvirtd ) + virt-network? ( libvirtd ) + virtualbox? ( libvirtd ) + xen? ( libvirtd )" + +BDEPEND=" + app-text/xhtml1 + dev-lang/perl + dev-libs/libxslt + dev-perl/XML-XPath + dev-python/docutils + virtual/pkgconfig + bash-completion? ( >=app-shells/bash-completion-2.0 ) + verify-sig? ( sec-keys/openpgp-keys-libvirt )" + +# gettext.sh command is used by the libvirt command wrappers, and it's +# non-optional, so put it into RDEPEND. +# We can use both libnl:1.1 and libnl:3, but if you have both installed, the +# package will use 3 by default. Since we don't have slot pinning in an API, +# we must go with the most recent. +RDEPEND=" + acct-user/qemu + app-misc/scrub + >=dev-libs/glib-2.66.0 + dev-libs/libgcrypt + dev-libs/libnl:3 + >=dev-libs/libxml2-2.9.1 + >=net-analyzer/openbsd-netcat-1.105-r1 + >=net-libs/gnutls-3.2.0:= + net-libs/libtirpc:= + >=net-misc/curl-7.18.0 + sys-apps/dbus + sys-apps/dmidecode + sys-devel/gettext + >=sys-libs/readline-7.0:= + virtual/acl + apparmor? ( sys-libs/libapparmor ) + audit? ( sys-process/audit ) + caps? ( sys-libs/libcap-ng ) + dtrace? ( dev-debug/systemtap ) + firewalld? ( >=net-firewall/firewalld-0.6.3 ) + fuse? ( sys-fs/fuse:= ) + glusterfs? ( >=sys-cluster/glusterfs-3.4.1 ) + iscsi? ( >=sys-block/open-iscsi-1.18.0 ) + iscsi-direct? ( >=net-libs/libiscsi-1.18.0 ) + libssh? ( >=net-libs/libssh-0.8.1:= ) + libssh2? ( >=net-libs/libssh2-1.3 ) + lvm? ( >=sys-fs/lvm2-2.02.48-r2[lvm] ) + lxc? ( !sys-apps/systemd[cgroup-hybrid(-)] ) + nbd? ( + sys-block/nbdkit + sys-libs/libnbd + ) + nfs? ( net-fs/nfs-utils ) + numa? ( + >sys-process/numactl-2.0.2 + sys-process/numad + ) + parted? ( + >=sys-block/parted-1.8[device-mapper] + sys-fs/lvm2[lvm] + ) + pcap? ( >=net-libs/libpcap-1.8.0 ) + policykit? ( + acct-group/libvirt + >=sys-auth/polkit-0.9 + ) + qemu? ( + >=app-emulation/qemu-4.2 + app-crypt/swtpm + dev-libs/json-c:= + ) + rbd? ( sys-cluster/ceph ) + sasl? ( >=dev-libs/cyrus-sasl-2.1.26 ) + selinux? ( >=sys-libs/libselinux-2.0.85 ) + virt-network? ( + net-dns/dnsmasq[dhcp,ipv6(+),script] + net-firewall/ebtables + || ( + >=net-firewall/iptables-1.4.10[ipv6(+)] + net-firewall/nftables + ) + net-misc/radvd + sys-apps/iproute2[-minimal] + ) + virtiofsd? ( app-emulation/virtiofsd ) + virtualbox? ( <app-emulation/virtualbox-7.1.0 ) + wireshark-plugins? ( >=net-analyzer/wireshark-2.6.0:= ) + xen? ( + >=app-emulation/xen-4.9.0 + app-emulation/xen-tools:= + ) + udev? ( + virtual/libudev:= + >=x11-libs/libpciaccess-0.10.9 + ) + zfs? ( sys-fs/zfs ) + kernel_linux? ( sys-apps/util-linux )" +DEPEND=" + ${BDEPEND} + ${RDEPEND} + ${PYTHON_DEPS} + test? ( + $(python_gen_any_dep ' + dev-python/pytest[${PYTHON_USEDEP}] + ') + ) +" +# The 'circular' dependency on dev-python/libvirt-python is because of +# virt-qemu-qmp-proxy. +PDEPEND=" + qemu? ( dev-python/libvirt-python ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-11.0.0-Fix-paths-in-libvirt-guests.sh.in.patch + "${FILESDIR}"/${PN}-9.9.0-do-not-use-sysconfig.patch + "${FILESDIR}"/${PN}-10.7.0-fix-paths-for-apparmor.patch +) + +python_check_deps() { + if use test; then + python_has_version -d "dev-python/pytest[${PYTHON_USEDEP}]" + fi +} + +pkg_setup() { + # Check kernel configuration: + CONFIG_CHECK="" + use fuse && CONFIG_CHECK+=" + ~FUSE_FS" + + use lvm && CONFIG_CHECK+=" + ~BLK_DEV_DM + ~DM_MULTIPATH + ~DM_SNAPSHOT" + + use lxc && CONFIG_CHECK+=" + ~BLK_CGROUP + ~CGROUP_CPUACCT + ~CGROUP_DEVICE + ~CGROUP_FREEZER + ~CGROUP_NET_PRIO + ~CGROUP_PERF + ~CGROUPS + ~CGROUP_SCHED + ~CPUSETS + ~IPC_NS + ~MACVLAN + ~NAMESPACES + ~NET_CLS_CGROUP + ~NET_NS + ~PID_NS + ~POSIX_MQUEUE + ~SECURITYFS + ~USER_NS + ~UTS_NS + ~VETH + ~!GRKERNSEC_CHROOT_MOUNT + ~!GRKERNSEC_CHROOT_DOUBLE + ~!GRKERNSEC_CHROOT_PIVOT + ~!GRKERNSEC_CHROOT_CHMOD + ~!GRKERNSEC_CHROOT_CAPS" + + use virt-network && CONFIG_CHECK+=" + ~BRIDGE_EBT_MARK_T + ~BRIDGE_NF_EBTABLES + ~NETFILTER_ADVANCED + ~NETFILTER_XT_CONNMARK + ~NETFILTER_XT_MARK + ~NETFILTER_XT_TARGET_CHECKSUM + ~NETFILTER_XT_TARGET_MASQUERADE + ~NET_ACT_CSUM + ~IP_NF_FILTER + ~IP_NF_MANGLE + ~IP_NF_NAT + ~IP6_NF_FILTER + ~IP6_NF_MANGLE + ~IP6_NF_NAT" + + # Bandwidth Limiting Support + use virt-network && CONFIG_CHECK+=" + ~BRIDGE_EBT_T_NAT + ~IP_NF_TARGET_REJECT + ~NET_ACT_POLICE + ~NET_CLS_FW + ~NET_CLS_U32 + ~NET_SCH_HTB + ~NET_SCH_INGRESS + ~NET_SCH_SFQ" + + ERROR_USER_NS="Optional depending on LXC configuration." + + if [[ -n ${CONFIG_CHECK} ]]; then + linux-info_pkg_setup + fi + + python-any-r1_pkg_setup +} + +src_prepare() { + touch "${S}/.mailmap" || die + + default + python_fix_shebang . + + # Skip fragile tests which relies on pristine environment + # (Breaks because of sandbox environment variables) + # bug #802876 + sed -i -e "/commandtest/d" tests/meson.build || die + + # Tweak the init script: + cp "${FILESDIR}/libvirtd.init-r19" "${S}/libvirtd.init" || die + sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \ + -i "${S}/libvirtd.init" || die "sed failed" +} + +src_configure() { + local emesonargs=( + $(meson_feature apparmor) + $(meson_feature apparmor apparmor_profiles) + $(meson_feature audit) + $(meson_feature caps capng) + $(meson_feature dtrace) + $(meson_feature firewalld) + $(meson_feature fuse) + $(meson_feature glusterfs) + $(meson_feature glusterfs storage_gluster) + $(meson_feature iscsi storage_iscsi) + $(meson_feature iscsi-direct storage_iscsi_direct) + $(meson_feature libvirtd driver_libvirtd) + $(meson_feature libssh) + $(meson_feature libssh2) + $(meson_feature lvm storage_lvm) + $(meson_feature lvm storage_mpath) + $(meson_feature lxc driver_lxc) + $(meson_feature nbd nbdkit) + $(meson_feature nls) + $(meson_feature numa numactl) + $(meson_feature numa numad) + $(meson_feature openvz driver_openvz) + $(meson_feature parted storage_disk) + $(meson_feature pcap libpcap) + $(meson_feature policykit polkit) + $(meson_feature qemu driver_qemu) + $(meson_feature qemu json_c) + $(meson_feature rbd storage_rbd) + $(meson_feature sasl) + $(meson_feature selinux) + $(meson_feature test tests) + $(meson_feature udev) + $(meson_feature virt-network driver_network) + $(meson_feature virtualbox driver_vbox) + $(meson_feature wireshark-plugins wireshark_dissector) + $(meson_feature xen driver_libxl) + $(meson_feature zfs storage_zfs) + + -Dnetcf=disabled + -Dsanlock=disabled + -Dopenwsman=disabled + + -Ddriver_esx=enabled + -Dinit_script=systemd + -Dqemu_user=$(usex caps qemu root) + -Dqemu_group=$(usex caps qemu root) + -Ddriver_remote=enabled + -Dstorage_fs=enabled + -Ddriver_vmware=enabled + + --localstatedir="${EPREFIX}/var" + -Dinitconfdir="${EPREFIX}/etc/systemd" + -Drunstatedir="${EPREFIX}/run" + -Ddocdir="${EPREFIX}/usr/share/doc/${PF}" + ) + + # Workaround for bug #938302 + if use dtrace && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then + local native_file="${T}"/meson.${CHOST}.ini.local + cat >> ${native_file} <<-EOF || die + [binaries] + dtrace='stap-dtrace' + EOF + emesonargs+=( --native-file "${native_file}" ) + fi + + meson_src_configure +} + +src_test() { + export VIR_TEST_DEBUG=1 + # Don't run the syntax check tests, they're fragile and not relevant + # to us downstream anyway. + # We also crank up the timeout (as Fedora does) just to preempt failures + # on slower arches. + meson_src_test --no-suite syntax-check --timeout-multiplier 10 +} + +src_install() { + meson_src_install + + # Depending on configuration option, libvirt will create some bogus + # directoreis. They are either not used, or libvirtd is able to create + # them on demand, so let's remove them. + # + # Note, we are using -f here so that rm does not fail or warn if the + # directory is nonexistent. + rm -rf "${D}"/etc/sysconfig + rm -rf "${D}"/var + rm -rf "${D}"/run + + use libvirtd || return 0 + # From here, only libvirtd-related instructions, be warned! + + newtmpfiles "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf + + newinitd "${S}/libvirtd.init" libvirtd + newinitd "${FILESDIR}/libvirt-guests.init-r4" libvirt-guests + newinitd "${FILESDIR}/virtlockd.init-r2" virtlockd + newinitd "${FILESDIR}/virtlogd.init-r2" virtlogd + + newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd + newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests + + DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r3") + DISABLE_AUTOFORMATTING=true + readme.gentoo_create_doc +} + +pkg_postinst() { + if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then + touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml || die + fi + + use libvirtd || return 0 + # From here, only libvirtd-related instructions, be warned! + tmpfiles_process libvirtd.conf + readme.gentoo_print_elog +} diff --git a/app-emulation/libvirt/libvirt-9999.ebuild b/app-emulation/libvirt/libvirt-9999.ebuild index 78840580fa60..f0174762889a 100644 --- a/app-emulation/libvirt/libvirt-9999.ebuild +++ b/app-emulation/libvirt/libvirt-9999.ebuild @@ -157,8 +157,8 @@ PDEPEND=" PATCHES=( "${FILESDIR}"/${PN}-11.0.0-Fix-paths-in-libvirt-guests.sh.in.patch - "${FILESDIR}"/${PN}-9.9.0-do-not-use-sysconfig.patch - "${FILESDIR}"/${PN}-10.7.0-fix-paths-for-apparmor.patch + "${FILESDIR}"/${PN}-11.3.0-do-not-use-sysconfig.patch + "${FILESDIR}"/${PN}-11.3.0-fix-paths-for-apparmor.patch ) python_check_deps() { diff --git a/app-emulation/qemu/Manifest b/app-emulation/qemu/Manifest index d29d20ed033a..a56c23e024fe 100644 --- a/app-emulation/qemu/Manifest +++ b/app-emulation/qemu/Manifest @@ -23,7 +23,9 @@ DIST keycodemapdb-f5772a62ec52591ff6870b7e8ef32482371f22c6.tar.bz2 27971 BLAKE2B DIST qemu-7.2.0-docs.tar.xz 1984184 BLAKE2B 103900fb7903ed8d75f7f012bf61fa2d6fce345b657c851d0437c3384f5735bd1cfd3129320683ea7846ea0b0940e5af5b2663c9320f12fee74b058523a8ea06 SHA512 a7edd448982865e07533c300d3e44a8b50cefbdde1982b73c24d0b2aa74315439252c59b634c75de312860874c7b06c75aa72629da681b5105f28ee936794585 DIST qemu-7.2.15.tar.xz 124418604 BLAKE2B 629cb5158cdd790947687a06f4c16bf838ae7b0eb5596bc16bb510dfe838bfcc6ed8e7776962bb6d5ab14379cba1a1f6b12683be370eb4e5debce1ecc446b156 SHA512 e8acc9ea6e70bd4dfb0956e01ee212c592c7b99f5dc0676824eb7cba0aeeb863c1d41df9174771fa775f58ca368c745b2fd7356a3c3fa901a11a33dae24d781a DIST qemu-7.2.16.tar.xz 124427328 BLAKE2B 25b69d3f47eef164b5bcb990edad7634f4602d08867cf62470b05005c5de496126064ad2eedfdf9b2d78eb724ae7832b93bc4d302140f14e5d77246cd04086eb SHA512 75623733f39396222e549498fd5dbbc1430593033f7480aa3a34c7e1c765eb5f7776d8827ee47b4b9c52cc1061232637742a8e31c5e5a9019945171d0c65ca7e +DIST qemu-7.2.17.tar.xz 124405828 BLAKE2B 0613eb18a3dfc8af3c907110191eb1e639c8e4ed4ec80842f8a81e373800834ecae6701a8e87f54ea143f1d508b0799d6127ad2174cd5402ec8ad0bdc9e1e21a SHA512 8490fe388db6f72f56cf082eac6aeda6d9eed4749096d2b56dc2f878b058742b586f02fe9a13280eb408b563e8470da53e058505286683cf79a5805aefa2a06e DIST qemu-8.2.0-docs.tar.xz 2233352 BLAKE2B 22b9499fdf4ff93e72399dab3803f3171c855859dc7fe111612e2f9146db244ca6d2e0aad16aefdf29b231d2b3a2fbc22171fe6bac13b03445d54555ce798d16 SHA512 f57e78c28277c153fff00b25097d0df5c6ad36cb4e9f3acf30382bfb1c99508503c186c1bbecf266810ef24fd618428fdf3e0eee41c715a552918c9e6ef9e8e5 +DIST qemu-8.2.10.tar.xz 132685948 BLAKE2B a1e9a89ee8bdf36b597c7f59b18d19ea34a83bcbd0c3e6bc18b10b9bb1cfad50561af7814076c07da67b11ac280a1f4b39b55f80bbf715d49f264e6b67c69d2b SHA512 f847f4cf2e17b562fe974cf52ad623c516440344e708141913986130ef0436f6d31653250a458061eff7bbffacd1ec726f69964dddad08c9b907dfb90c3f48b6 DIST qemu-8.2.7.tar.xz 132676368 BLAKE2B 92235f1a30e1d44cf9f7e40e71e9df0375c5eb2d8b267c35df51e102e560f399e4d3f70c674d7b9e206728d9c4a1bafee5ae8f1a91cda900b422f9a6a48c15a8 SHA512 9806bae62d2bdf0781b6bd1c4d7e88bb97019ca5e85140714d7818912603aed1d522a5d29f3434888974ab73e0cfae8b4136ea018b05dcc2d6f6c8b6252075cd DIST qemu-8.2.9.tar.xz 132695608 BLAKE2B 0c10feba46e917cd3110bd5926223068d635be0eea7d3f76ae96d631b7fd4cace9d9023aa589d26a6d4ea27d052f7f0a1c27f47175853cd558e5744d10d20aa6 SHA512 3981ff1f58cb88c9325b0c89d7a5f38e069b2a1d14e2cbd887b39382310a004bcd75c5c601fa0f60eba3e1c020b9f3d56000af0be9fbe99546237c30e3277e54 DIST qemu-9.1.0-docs.tar.xz 2376072 BLAKE2B 31d13133b3a2e21a7d9b5af028407610ae8f2fa61dd296fc35e57fc12eb66cfd1a39ec5e3b5a3852095d10a388f424f8a38417b3ab58ca30d0817ece779328cf SHA512 5b705b577daad6aa010d5c713db9dc314114334b89901840ebcecc9032595a969f5ad9054e42b36b2be5ef9f5d6dc1159841ff46dbb08314b5c48491aa631040 @@ -31,12 +33,16 @@ DIST qemu-9.1.2.tar.xz 132481332 BLAKE2B 2cbc55e09a8d46fe0c9e3e7e54b6cf4490bef01 DIST qemu-9.1.3.tar.xz 132492084 BLAKE2B 268c8fb91dd5fc4e393a46a578537338861e5d2a92c381517447c6c2fe67604ed9aacc96371c864dc7f4a800cc9b9f94118d17c5dcc24f3fac5be0a18ca553e5 SHA512 e7b938e72eb4a8a4a6680ce3b282a4e5cbd1ad30003bed959e51ea2621acea7434b4366ef6559e3622fac8865ad212702f393ba7698be38cf2fc8f264b951318 DIST qemu-9.2.0-docs.tar.xz 2431076 BLAKE2B 420148b9d7cafbdc9aea21b0d0a84a53ca0d17fb99fc34ae4c0786fa7d4ce40838f4b3173508b90742d6dfbfd4b58dda25b2e5cd1394241b0b56a64fe5705d9b SHA512 88816e326e9eac9acf0a1c73e677552845d6885e220b55e795241c40d2c1bd1b1994a22e56f95046e420225e0b7dc839d459f1c1e5318c8c36392727a86b3008 DIST qemu-9.2.2.tar.xz 134756816 BLAKE2B fe341d25010b02c47c263e6b1bf1a64f72226e188bd79901ec0072005994e305f5c75b8e5b3f36af1e3b3f776a04cd18b4084dc044952f34b131f3b94134f5b8 SHA512 b010876da9f91da01dbb9e06705a1358d5f062d0fdd4ad5c8cd8ce3fd43adcefcf72a61216eb8d415281f6607b945ce1cfb6b5fc5692ada9163e8f05b7fb5533 +DIST qemu-9.2.3.tar.xz 134755248 BLAKE2B cdc7300288d2efc50262c605707caab64638fbf1d7528576a0bce71efc1403ccd6aa647a984c84a5ab8ebca28ea9ee7cd8682b4098ca2e63a2f76d2de577c181 SHA512 941a4337a115c65de2fca042932efb31886114f4300226fcf55f04c2c5471bd2b5ce220c4b17e01c3679bd55ba08a1aa7ce399de15e3e5f28c17da52030b139e EBUILD qemu-7.2.15.ebuild 27621 BLAKE2B 2a13923da098fac46d08237d32d1ead1fe3395be9f6f6d5dc2dd8a7530c392a16667a3e6d3f98ea0d0e0c4d8d0b90668c0b38b1562ed07611eaa3065f9cefa2f SHA512 c3ab8ea3fd0a4825abda766b64384bf7d59702b4c09019f0118db99255aea546a2c7e0267f443885eddb5f897e2e16c9a51720112ef5164da3d0cae66930ffca EBUILD qemu-7.2.16.ebuild 27743 BLAKE2B 4f4ec52f9f9dce3fd9231b7e06d7257ebe93ad40bc384bb3c3d378c85c14ae81e36aa4d8454f49b0c50b38572c1948456972c77c527aa5e170a8019a812a34be SHA512 4070cf2632aa76d158b885de9e78f735fb3e409bf4512dcee0143e775b4c01f753f59100f3e2f29e97bb1b2987b3efc38f6f946f26984b1c7e135956d43c1f26 +EBUILD qemu-7.2.17.ebuild 27699 BLAKE2B 2555ff617ef48c3c626b088501fad09a97ec4e8f3f30367fc6b66b5b7695c2805d24748a5da2c619bd01c0ceaa6ced0fa6f29a3a3d775ae44e7c99dd04f8b4eb SHA512 d7766cf1f04abe49b6b76cd122d138e38ec2677305c9feac3562259a6d75d69f3cdcfccf913328bf676203eeab4dc29d123d87b5b87301f2e0163c8dd8fa9458 +EBUILD qemu-8.2.10.ebuild 28154 BLAKE2B 0dccec05cbddbcae07ee1a65412ed5ea964b9b344f7d227ebaa28c751f71336b597c932602a65fa036482cfde41fb1c431acbf043736529fd116ef88fbc8e0a3 SHA512 0068d9559f2a5afd189be466aa63be7bb53ae171e5d7f2b2d4899046d0e8fbee6befa501ac0fcd03225874bb365051a393875bc05cc1e20640469a51291a4553 EBUILD qemu-8.2.7.ebuild 28076 BLAKE2B 142048a9b341a8312d26a64203effd19486b7fae1a518c075c800350a7d5e184f4864f16d500ed0c45038a1c3c623efc3ebe188b181cbaf6f2ba5e244168b61d SHA512 a88109a9a6787a106afc94df92cc78d166fd6901fb72b24c5cf92a8865ad5b008b1836f3e5fbdd026b60ebd32616064de5549274974e061e300bae2778498d61 EBUILD qemu-8.2.9.ebuild 28198 BLAKE2B 303ffa99f69f0258aa00067c1034865d6d500b742eeb26ef70b2d2eb54fb0890c11f345980e6062f17e863445b26aac0e8c9c0da8b0cb9d70a1af0261e28a89e SHA512 f75abaf11cd01840a59c19637435d2072cecf98dc566a95c413b6eb8fd7b6bacf5f47024159e1fc0b1a09798bf34345b7594b2e34fa66c6e010fa958e781ae6a EBUILD qemu-9.1.2.ebuild 28328 BLAKE2B 732b44d68aed01e95e817ac3a97998456929219bbbbab2ee970d2d79be746e8dad26fd0cc07ddc7b7a79524a1773550d8082b09e8aaa908a7298a0bab299145c SHA512 bb532fc4662ce83f68f1df044ce46cfef6789268b1b4db397622386cb3500a99419d3de5e6cf68df1c116819694ba75c38b12736fd5661c4b481420913f9ed6b EBUILD qemu-9.1.3.ebuild 28405 BLAKE2B 05fdc272d37b090bb6573a8e56e5acb1ddfd139a894d34213882555a453898a613a4069a3c83dd5d7cde8f133fe0edfb9484e22d38deb8b223f3e2863172a6ac SHA512 30f57f8ef4a69b1845eecd0f83fcba42e249ee0938cdc8a29d1da490037ade2fd1f44b55804ca36612b4175bc009f8f6b1650e3c25d5a10fb110079e14ff7841 EBUILD qemu-9.2.2.ebuild 28183 BLAKE2B a35082fc18d61ec47f9740930996bdb83d9713a2423e7586d4ee43593b1df2022eb681f0a7bede524d8cf553d22d9b5ccb8734e1e97203cb0ed2126478480344 SHA512 0e5a0cd41c92ba405845a4a78aefea403ae8a62c2878cb1bdbf734549fc598b6e0b78dd49609acec9b9a2c3fa4ab29484f99283723dc0dfe0ea6a949d70a199f +EBUILD qemu-9.2.3.ebuild 28183 BLAKE2B a35082fc18d61ec47f9740930996bdb83d9713a2423e7586d4ee43593b1df2022eb681f0a7bede524d8cf553d22d9b5ccb8734e1e97203cb0ed2126478480344 SHA512 0e5a0cd41c92ba405845a4a78aefea403ae8a62c2878cb1bdbf734549fc598b6e0b78dd49609acec9b9a2c3fa4ab29484f99283723dc0dfe0ea6a949d70a199f EBUILD qemu-9999.ebuild 28118 BLAKE2B 1ebab472a5767e2bc6727440ae6281da22bd98d454f570516138a5538de122a084cb180b9657fce7039f4890bcfc4f3db39daf29e1a02e5aa5a95071d736c0d1 SHA512 abb1ad855ea384913b9fe6c885627d870386c09798b7de6c1fcec51e8c431578f632386a46ee263ae930908ae4943791f12bfb5a593b9d59f48ab8b70a5e0546 MISC metadata.xml 4516 BLAKE2B f46e6395374e5dd22a3304ee5c012311f1ea794038c490ee2e709e3e8ced4f476d34704581b35e049b5f06aa59b59a4392896b566020b35e638c3837eeff66f5 SHA512 34ecef876f4dbfcba11fd02aa40fef9a3a099f4e4912d7a9f81d3663130893b0e1327cd4725e60d47372ee3754435011681e9fff3bd9b97da198273947d47e04 diff --git a/app-emulation/qemu/qemu-7.2.17.ebuild b/app-emulation/qemu/qemu-7.2.17.ebuild new file mode 100644 index 000000000000..7ed9ddabff21 --- /dev/null +++ b/app-emulation/qemu/qemu-7.2.17.ebuild @@ -0,0 +1,980 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Generate using https://github.com/thesamesam/sam-gentoo-scripts/blob/main/niche/generate-qemu-docs +# Set to 1 if prebuilt, 0 if not +# (the construct below is to allow overriding from env for script) +QEMU_DOCS_PREBUILT=${QEMU_DOCS_PREBUILT:-1} +QEMU_DOCS_PREBUILT_DEV=ajak +QEMU_DOCS_VERSION="7.2.0" +# Default to generating docs (inc. man pages) if no prebuilt; overridden later +# bug #830088 +QEMU_DOC_USEFLAG="+doc" + +PYTHON_COMPAT=( python3_{11..12} ) +PYTHON_REQ_USE="ncurses,readline" + +FIRMWARE_ABI_VERSION="7.2.0" + +inherit linux-info toolchain-funcs python-r1 udev fcaps readme.gentoo-r1 \ + pax-utils xdg-utils + +if [[ ${PV} == *9999* ]]; then + QEMU_DOCS_PREBUILT=0 + + EGIT_REPO_URI="https://gitlab.com/qemu-project/qemu.git/" + EGIT_SUBMODULES=( + tests/fp/berkeley-softfloat-3 + tests/fp/berkeley-testfloat-3 + ui/keycodemapdb + ) + inherit git-r3 + SRC_URI="" +else + MY_P="${PN}-${PV/_rc/-rc}" + SRC_URI="https://download.qemu.org/${MY_P}.tar.xz" + + if [[ ${QEMU_DOCS_PREBUILT} == 1 ]] ; then + SRC_URI+=" !doc? ( https://dev.gentoo.org/~${QEMU_DOCS_PREBUILT_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${QEMU_DOCS_VERSION}-docs.tar.xz )" + fi + + S="${WORKDIR}/${MY_P}" + [[ "${PV}" != *_rc* ]] && KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86" +fi + +DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools" +HOMEPAGE="https://www.qemu.org https://www.linux-kvm.org" + +LICENSE="GPL-2 LGPL-2 BSD-2" +SLOT="0" + +[[ ${QEMU_DOCS_PREBUILT} == 1 ]] && QEMU_DOC_USEFLAG="doc" + +IUSE="accessibility +aio alsa bpf bzip2 capstone +curl debug ${QEMU_DOC_USEFLAG} + +fdt fuse glusterfs +gnutls gtk infiniband iscsi io-uring + jack jemalloc +jpeg + lzo multipath + ncurses nfs nls numa opengl +oss pam +pin-upstream-blobs + plugins +png pulseaudio python rbd sasl +seccomp sdl sdl-image selinux + +slirp + smartcard snappy spice ssh static static-user systemtap test udev usb + usbredir vde +vhost-net virgl virtfs +vnc vte xattr xen + zstd" + +COMMON_TARGETS=" + aarch64 + alpha + arm + cris + hppa + i386 + loongarch64 + m68k + microblaze + microblazeel + mips + mips64 + mips64el + mipsel + nios2 + or1k + ppc + ppc64 + riscv32 + riscv64 + s390x + sh4 + sh4eb + sparc + sparc64 + x86_64 + xtensa + xtensaeb +" +IUSE_SOFTMMU_TARGETS=" + ${COMMON_TARGETS} + avr + rx + tricore +" +IUSE_USER_TARGETS=" + ${COMMON_TARGETS} + aarch64_be + armeb + hexagon + mipsn32 + mipsn32el + ppc64le + sparc32plus +" + +use_softmmu_targets=$(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS}) +use_user_targets=$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS}) +IUSE+=" ${use_softmmu_targets} ${use_user_targets}" + +RESTRICT="!test? ( test )" + +# Allow no targets to be built so that people can get a tools-only build. +# Block USE flag configurations known to not work. +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} + qemu_softmmu_targets_arm? ( fdt ) + qemu_softmmu_targets_microblaze? ( fdt ) + qemu_softmmu_targets_mips64el? ( fdt ) + qemu_softmmu_targets_ppc64? ( fdt ) + qemu_softmmu_targets_ppc? ( fdt ) + qemu_softmmu_targets_riscv32? ( fdt ) + qemu_softmmu_targets_riscv64? ( fdt ) + qemu_softmmu_targets_x86_64? ( fdt ) + sdl-image? ( sdl ) + static? ( static-user !alsa !gtk !jack !opengl !pam !pulseaudio !plugins !rbd !snappy !udev ) + static-user? ( !plugins ) + virgl? ( opengl ) + virtfs? ( xattr ) + vnc? ( gnutls ) + vte? ( gtk ) + multipath? ( udev ) + plugins? ( !static !static-user ) +" +for smname in ${IUSE_SOFTMMU_TARGETS} ; do + REQUIRED_USE+=" qemu_softmmu_targets_${smname}? ( seccomp ) " +done + +# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) +# and user/softmmu targets (qemu-*, qemu-system-*). +# +# Yep, you need both libcap and libcap-ng since virtfs only uses libcap. +# +# The attr lib isn't always linked in (although the USE flag is always +# respected). This is because qemu supports using the C library's API +# when available rather than always using the external library. +ALL_DEPEND=" + dev-libs/glib:2[static-libs(+)] + sys-libs/zlib[static-libs(+)] + python? ( ${PYTHON_DEPS} ) + systemtap? ( dev-debug/systemtap ) + xattr? ( sys-apps/attr[static-libs(+)] )" + +# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) +# softmmu targets (qemu-system-*). +SOFTMMU_TOOLS_DEPEND=" + sys-libs/libcap-ng[static-libs(+)] + >=x11-libs/pixman-0.28.0[static-libs(+)] + accessibility? ( + app-accessibility/brltty[api] + app-accessibility/brltty[static-libs(+)] + ) + aio? ( dev-libs/libaio[static-libs(+)] ) + alsa? ( >=media-libs/alsa-lib-1.0.13 ) + bpf? ( dev-libs/libbpf:= ) + bzip2? ( app-arch/bzip2[static-libs(+)] ) + capstone? ( dev-libs/capstone:=[static-libs(+)] ) + curl? ( >=net-misc/curl-7.15.4[static-libs(+)] ) + fdt? ( >=sys-apps/dtc-1.5.1[static-libs(+)] ) + fuse? ( >=sys-fs/fuse-3.1:3[static-libs(+)] ) + glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] ) + gnutls? ( + >=net-libs/gnutls-3.0:=[static-libs(+)] + dev-libs/nettle:=[static-libs(+)] + ) + gtk? ( + x11-libs/cairo + x11-libs/gdk-pixbuf:2 + x11-libs/gtk+:3 + x11-libs/libX11 + vte? ( x11-libs/vte:2.91 ) + ) + infiniband? ( sys-cluster/rdma-core[static-libs(+)] ) + iscsi? ( net-libs/libiscsi ) + io-uring? ( sys-libs/liburing:=[static-libs(+)] ) + jack? ( virtual/jack ) + jemalloc? ( dev-libs/jemalloc ) + jpeg? ( media-libs/libjpeg-turbo:=[static-libs(+)] ) + lzo? ( dev-libs/lzo:2[static-libs(+)] ) + multipath? ( sys-fs/multipath-tools ) + ncurses? ( + sys-libs/ncurses:=[unicode(+)] + sys-libs/ncurses:=[static-libs(+)] + ) + nfs? ( >=net-fs/libnfs-1.9.3:=[static-libs(+)] ) + numa? ( sys-process/numactl[static-libs(+)] ) + opengl? ( + virtual/opengl + media-libs/libepoxy[static-libs(+)] + media-libs/mesa[static-libs(+)] + media-libs/mesa[egl(+),gbm(+)] + ) + pam? ( sys-libs/pam ) + png? ( media-libs/libpng:0=[static-libs(+)] ) + pulseaudio? ( media-libs/libpulse ) + rbd? ( sys-cluster/ceph ) + sasl? ( dev-libs/cyrus-sasl[static-libs(+)] ) + sdl? ( + media-libs/libsdl2[video] + media-libs/libsdl2[static-libs(+)] + ) + sdl-image? ( media-libs/sdl2-image[static-libs(+)] ) + seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] ) + slirp? ( net-libs/libslirp[static-libs(+)] ) + smartcard? ( >=app-emulation/libcacard-2.5.0[static-libs(+)] ) + snappy? ( app-arch/snappy:= ) + spice? ( + >=app-emulation/spice-protocol-0.12.3 + >=app-emulation/spice-0.12.0[static-libs(+)] + ) + ssh? ( >=net-libs/libssh-0.8.6[static-libs(+)] ) + udev? ( virtual/libudev:= ) + usb? ( >=virtual/libusb-1-r2:1[static-libs(+)] ) + usbredir? ( >=sys-apps/usbredir-0.6[static-libs(+)] ) + vde? ( net-misc/vde[static-libs(+)] ) + virgl? ( media-libs/virglrenderer[static-libs(+)] ) + virtfs? ( sys-libs/libcap ) + xen? ( app-emulation/xen-tools:= ) + zstd? ( >=app-arch/zstd-1.4.0[static-libs(+)] ) +" + +EDK2_OVMF_VERSION="202202" +SEABIOS_VERSION="1.16.0" + +X86_FIRMWARE_DEPEND=" + pin-upstream-blobs? ( + ~sys-firmware/edk2-bin-${EDK2_OVMF_VERSION} + ~sys-firmware/ipxe-1.21.1[binary,qemu] + ~sys-firmware/seabios-bin-${SEABIOS_VERSION} + ~sys-firmware/sgabios-0.1_pre10[binary] + ) + !pin-upstream-blobs? ( + || ( + >=sys-firmware/edk2-${EDK2_OVMF_VERSION} + >=sys-firmware/edk2-bin-${EDK2_OVMF_VERSION} + ) + sys-firmware/ipxe[qemu] + || ( + >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + >=sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) + sys-firmware/sgabios + )" +PPC_FIRMWARE_DEPEND=" + pin-upstream-blobs? ( + ~sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) + !pin-upstream-blobs? ( + || ( + >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + >=sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) + ) +" + +BDEPEND=" + $(python_gen_impl_dep) + dev-lang/perl + dev-build/meson + sys-apps/texinfo + virtual/pkgconfig + doc? ( + dev-python/sphinx[${PYTHON_USEDEP}] + dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}] + ) + gtk? ( nls? ( sys-devel/gettext ) ) + test? ( + dev-libs/glib[utils] + app-alternatives/bc + ) +" +CDEPEND=" + !static? ( + ${ALL_DEPEND//\[static-libs(+)]} + ${SOFTMMU_TOOLS_DEPEND//\[static-libs(+)]} + ) + qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} ) + qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} ) + qemu_softmmu_targets_ppc? ( ${PPC_FIRMWARE_DEPEND} ) + qemu_softmmu_targets_ppc64? ( ${PPC_FIRMWARE_DEPEND} ) +" +DEPEND="${CDEPEND} + kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 ) + static? ( + ${ALL_DEPEND} + ${SOFTMMU_TOOLS_DEPEND} + ) + static-user? ( ${ALL_DEPEND} )" +RDEPEND="${CDEPEND} + acct-group/kvm + selinux? ( + sec-policy/selinux-qemu + sys-libs/libselinux + )" + +PATCHES=( + "${FILESDIR}"/${PN}-5.2.0-disable-keymap.patch + "${FILESDIR}"/${PN}-6.0.0-make.patch + "${FILESDIR}"/${PN}-7.1.0-also-build-virtfs-proxy-helper.patch + "${FILESDIR}"/${PN}-7.1.0-capstone-include-path.patch + "${FILESDIR}"/${PN}-7.2.0-disable-gmp.patch + "${FILESDIR}"/${PN}-7.2.16-optionrom-pass-Wl-no-error-rwx-segments.patch +) + +QA_PREBUILT=" + usr/share/qemu/hppa-firmware.img + usr/share/qemu/openbios-ppc + usr/share/qemu/openbios-sparc64 + usr/share/qemu/openbios-sparc32 + usr/share/qemu/opensbi-riscv64-generic-fw_dynamic.elf + usr/share/qemu/opensbi-riscv32-generic-fw_dynamic.elf + usr/share/qemu/palcode-clipper + usr/share/qemu/s390-ccw.img + usr/share/qemu/s390-netboot.img + usr/share/qemu/u-boot.e500 +" + +QA_WX_LOAD="usr/bin/qemu-i386 + usr/bin/qemu-x86_64 + usr/bin/qemu-alpha + usr/bin/qemu-arm + usr/bin/qemu-cris + usr/bin/qemu-m68k + usr/bin/qemu-microblaze + usr/bin/qemu-microblazeel + usr/bin/qemu-mips + usr/bin/qemu-mipsel + usr/bin/qemu-or1k + usr/bin/qemu-ppc + usr/bin/qemu-ppc64 + usr/bin/qemu-sh4 + usr/bin/qemu-sh4eb + usr/bin/qemu-sparc + usr/bin/qemu-sparc64 + usr/bin/qemu-armeb + usr/bin/qemu-sparc32plus + usr/bin/qemu-s390x + usr/bin/qemu-unicore32 +" + +DOC_CONTENTS="If you don't have kvm compiled into the kernel, make sure you have the +kernel module loaded before running kvm. The easiest way to ensure that the +kernel module is loaded is to load it on boot. + For AMD CPUs the module is called 'kvm-amd'. + For Intel CPUs the module is called 'kvm-intel'. +Please review /etc/conf.d/modules for how to load these. + +Make sure your user is in the 'kvm' group. Just run + $ gpasswd -a <USER> kvm +then have <USER> re-login. + +For brand new installs, the default permissions on /dev/kvm might not let +you access it. You can tell udev to reset ownership/perms: + $ udevadm trigger -c add /dev/kvm + +If you want to register binfmt handlers for qemu user targets: +For openrc: + # rc-update add qemu-binfmt +For systemd: + # ln -s /usr/share/qemu/binfmt.d/qemu.conf /etc/binfmt.d/qemu.conf" + +pkg_pretend() { + if use kernel_linux && kernel_is lt 2 6 25; then + eerror "This version of KVM requires a host kernel of 2.6.25 or higher." + elif use kernel_linux; then + if ! linux_config_exists; then + eerror "Unable to check your kernel for KVM support" + else + CONFIG_CHECK="~KVM ~TUN ~BRIDGE" + ERROR_KVM="You must enable KVM in your kernel to continue" + ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in" + ERROR_KVM_AMD+=" your kernel configuration." + ERROR_KVM_INTEL="If you have an Intel CPU, you must enable" + ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration." + ERROR_TUN="You will need the Universal TUN/TAP driver compiled" + ERROR_TUN+=" into your kernel or loaded as a module to use the" + ERROR_TUN+=" virtual network device if using -net tap." + ERROR_BRIDGE="You will also need support for 802.1d" + ERROR_BRIDGE+=" Ethernet Bridging for some network configurations." + use vhost-net && CONFIG_CHECK+=" ~VHOST_NET" + ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net" + ERROR_VHOST_NET+=" support" + + if use amd64 || use x86 || use amd64-linux || use x86-linux; then + if grep -q AuthenticAMD /proc/cpuinfo; then + CONFIG_CHECK+=" ~KVM_AMD" + elif grep -q GenuineIntel /proc/cpuinfo; then + CONFIG_CHECK+=" ~KVM_INTEL" + fi + fi + + use python && CONFIG_CHECK+=" ~DEBUG_FS" + ERROR_DEBUG_FS="debugFS support required for kvm_stat" + + # Now do the actual checks setup above + check_extra_config + fi + fi + + if grep -qs '/usr/bin/qemu-kvm' "${EROOT}"/etc/libvirt/qemu/*.xml; then + eerror "The kvm/qemu-kvm wrappers no longer exist, but your libvirt" + eerror "instances are still pointing to it. Please update your" + eerror "configs in /etc/libvirt/qemu/ to use the -enable-kvm flag" + eerror "and the right system binary (e.g. qemu-system-x86_64)." + die "update your virt configs to not use qemu-kvm" + fi +} + +# Sanity check to make sure target lists are kept up-to-date. +check_targets() { + local var=$1 mak=$2 + local detected sorted + + pushd "${S}"/configs/targets/ >/dev/null || die + + # Force C locale until glibc is updated. #564936 + detected=$(echo $(printf '%s\n' *-${mak}.mak | sed "s:-${mak}.mak::" | LC_COLLATE=C sort -u)) + sorted=$(echo $(printf '%s\n' ${!var} | LC_COLLATE=C sort -u)) + if [[ ${sorted} != "${detected}" ]] ; then + eerror "The ebuild needs to be kept in sync." + eerror "${var}: ${sorted}" + eerror "$(printf '%-*s' ${#var} configure): ${detected}" + die "sync ${var} to the list of targets" + fi + + popd >/dev/null +} + +src_prepare() { + check_targets IUSE_SOFTMMU_TARGETS softmmu + check_targets IUSE_USER_TARGETS linux-user + + default + + # Use correct toolchain to fix cross-compiling + tc-export AR AS LD NM OBJCOPY PKG_CONFIG RANLIB STRINGS + export WINDRES=${CHOST}-windres + + # Workaround for bug #938302 + if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then + cat >> "${S}"/configs/meson/linux.txt <<-EOF || die + [binaries] + dtrace='stap-dtrace' + EOF + fi + + # Verbose builds + MAKEOPTS+=" V=1" + + # We already force -D_FORTIFY_SOURCE=2 (or 3) in our toolchain, but + # this setting (-U then -D..=2) will prevent us from trying out 3, so + # drop it. No change to level of protection b/c we patch our toolchain. + sed -i -e 's/-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2//' configure || die + + # Remove bundled modules + rm -r dtc meson roms/*/ || die +} + +## +# configures qemu based on the build directory and the build type +# we are using. +# +qemu_src_configure() { + debug-print-function ${FUNCNAME} "$@" + + local buildtype=$1 + local builddir="${S}/${buildtype}-build" + + mkdir "${builddir}" || die + + local conf_opts=( + --prefix=/usr + --sysconfdir=/etc + --bindir=/usr/bin + --libdir=/usr/$(get_libdir) + --datadir=/usr/share + --docdir=/usr/share/doc/${PF}/html + --mandir=/usr/share/man + --localstatedir=/var + --disable-bsd-user + --disable-containers # bug #732972 + --disable-guest-agent + --disable-strip + --with-git-submodules=ignore + + # bug #746752: TCG interpreter has a few limitations: + # - it does not support FPU + # - it's generally slower on non-self-modifying code + # It's advantage is support for host architectures + # where native codegeneration is not implemented. + # Gentoo has qemu keyworded only on targets with + # native code generation available. Avoid the interpreter. + --disable-tcg-interpreter + + --disable-werror + # We support gnutls/nettle for crypto operations. It is possible + # to use gcrypt when gnutls/nettle are disabled (but not when they + # are enabled), but it's not really worth the hassle. Disable it + # all the time to avoid automatically detecting it. #568856 + --disable-gcrypt + --cc="$(tc-getCC)" + --cxx="$(tc-getCXX)" + --host-cc="$(tc-getBUILD_CC)" + + $(use_enable alsa) + $(use_enable debug debug-info) + $(use_enable debug debug-tcg) + $(use_enable jack) + $(use_enable nls gettext) + $(use_enable oss) + $(use_enable plugins) + $(use_enable pulseaudio pa) + $(use_enable selinux) + $(use_enable xattr attr) + ) + + # Disable options not used by user targets. This simplifies building + # static user targets (USE=static-user) considerably. + conf_notuser() { + if [[ ${buildtype} == "user" ]] ; then + echo "--disable-${2:-$1}" + else + use_enable "$@" + fi + } + # Enable option only for softmmu build, but not 'user' or 'tools' + conf_softmmu() { + if [[ ${buildtype} == "softmmu" ]] ; then + use_enable "$@" + else + echo "--disable-${2:-$1}" + fi + } + # Enable option only for tools build, but not 'user' or 'softmmu' + conf_tools() { + if [[ ${buildtype} == "tools" ]] ; then + use_enable "$@" + else + echo "--disable-${2:-$1}" + fi + } + # Special case for the malloc flag, because the --disable flag does + # not exist and trying like above will break configuring. + conf_malloc() { + if [[ ! ${buildtype} == "user" ]] ; then + usex "${1}" "--enable-malloc=${1}" "" + fi + } + conf_opts+=( + $(conf_notuser accessibility brlapi) + $(conf_notuser aio linux-aio) + $(conf_softmmu bpf) + $(conf_notuser bzip2) + $(conf_notuser capstone) + $(conf_notuser curl) + $(conf_tools doc docs) + $(conf_notuser fdt) + $(conf_notuser fuse) + $(conf_notuser glusterfs) + $(conf_notuser gnutls) + $(conf_notuser gnutls nettle) + $(conf_notuser gtk) + $(conf_notuser infiniband rdma) + $(conf_notuser iscsi libiscsi) + $(conf_notuser io-uring linux-io-uring) + $(conf_malloc jemalloc) + $(conf_notuser jpeg vnc-jpeg) + $(conf_notuser kernel_linux kvm) + $(conf_notuser lzo) + $(conf_notuser multipath mpath) + $(conf_notuser ncurses curses) + $(conf_notuser nfs libnfs) + $(conf_notuser numa) + $(conf_notuser opengl) + $(conf_notuser pam auth-pam) + $(conf_notuser png) + $(conf_notuser rbd) + $(conf_notuser sasl vnc-sasl) + $(conf_notuser sdl) + $(conf_softmmu sdl-image) + $(conf_notuser seccomp) + $(conf_notuser slirp) + $(conf_notuser smartcard) + $(conf_notuser snappy) + $(conf_notuser spice) + $(conf_notuser ssh libssh) + $(conf_notuser udev libudev) + $(conf_notuser usb libusb) + $(conf_notuser usbredir usb-redir) + $(conf_notuser vde) + $(conf_notuser vhost-net) + $(conf_notuser virgl virglrenderer) + $(conf_softmmu virtfs) + $(conf_notuser vnc) + $(conf_notuser vte) + $(conf_notuser xen) + $(conf_notuser xen xen-pci-passthrough) + # use prebuilt keymaps, bug #759604 + --disable-xkbcommon + $(conf_notuser zstd) + ) + + if [[ ! ${buildtype} == "user" ]] ; then + # audio options + local audio_opts=( + # Note: backend order matters here: #716202 + # We iterate from higher-level to lower level. + $(usex pulseaudio pa "") + $(usev jack) + $(usev sdl) + $(usev alsa) + $(usev oss) + ) + conf_opts+=( + --audio-drv-list=$(IFS=,; echo "${audio_opts[*]}") + ) + fi + + case ${buildtype} in + user) + conf_opts+=( + --enable-linux-user + --disable-system + --disable-blobs + --disable-tools + --disable-cap-ng + --disable-seccomp + ) + local static_flag="static-user" + ;; + softmmu) + conf_opts+=( + --disable-linux-user + --enable-system + --disable-tools + --enable-cap-ng + --enable-seccomp + ) + local static_flag="static" + ;; + tools) + conf_opts+=( + --disable-linux-user + --disable-system + --disable-blobs + --enable-tools + --enable-cap-ng + ) + local static_flag="static" + ;; + esac + + local targets="${buildtype}_targets" + [[ -n ${targets} ]] && conf_opts+=( --target-list="${!targets}" ) + + # Add support for SystemTap + use systemtap && conf_opts+=( --enable-trace-backend=dtrace ) + + # We always want to attempt to build with PIE support as it results + # in a more secure binary. But it doesn't work with static or if + # the current GCC doesn't have PIE support. + if use ${static_flag}; then + conf_opts+=( --static --disable-pie ) + else + tc-enables-pie && conf_opts+=( --enable-pie ) + fi + + # Meson will not use a cross-file unless cross_prefix is set. + tc-is-cross-compiler && conf_opts+=( --cross-prefix="${CHOST}-" ) + + # Plumb through equivalent of EXTRA_ECONF to allow experiments + # like bug #747928. + conf_opts+=( ${EXTRA_CONF_QEMU} ) + + echo "../configure ${conf_opts[*]}" + cd "${builddir}" + ../configure "${conf_opts[@]}" || die "configure failed" +} + +src_configure() { + local target + + python_setup + + softmmu_targets= softmmu_bins=() + user_targets= user_bins=() + + for target in ${IUSE_SOFTMMU_TARGETS} ; do + if use "qemu_softmmu_targets_${target}"; then + softmmu_targets+=",${target}-softmmu" + softmmu_bins+=( "qemu-system-${target}" ) + fi + done + + for target in ${IUSE_USER_TARGETS} ; do + if use "qemu_user_targets_${target}"; then + user_targets+=",${target}-linux-user" + user_bins+=( "qemu-${target}" ) + fi + done + + softmmu_targets=${softmmu_targets#,} + user_targets=${user_targets#,} + + [[ -n ${softmmu_targets} ]] && qemu_src_configure "softmmu" + [[ -n ${user_targets} ]] && qemu_src_configure "user" + qemu_src_configure "tools" +} + +src_compile() { + if [[ -n ${user_targets} ]]; then + cd "${S}/user-build" || die + default + fi + + if [[ -n ${softmmu_targets} ]]; then + cd "${S}/softmmu-build" || die + default + fi + + cd "${S}/tools-build" || die + default +} + +src_test() { + if [[ -n ${softmmu_targets} ]]; then + cd "${S}/softmmu-build" || die + pax-mark m */qemu-system-* #515550 + emake check + fi +} + +qemu_python_install() { + python_domodule "${S}/python/qemu" + + python_doscript "${S}/scripts/kvm/vmxcap" + python_doscript "${S}/scripts/qmp/qmp-shell" + python_doscript "${S}/scripts/qmp/qemu-ga-client" +} + +# Generate binfmt support files. +# - /etc/init.d/qemu-binfmt script which registers the user handlers (openrc) +# - /usr/share/qemu/binfmt.d/qemu.conf (for use with systemd-binfmt) +generate_initd() { + local out="${T}/qemu-binfmt" + local out_systemd="${T}/qemu.conf" + local d="${T}/binfmt.d" + + einfo "Generating qemu binfmt scripts and configuration files" + + # Generate the debian fragments first. + mkdir -p "${d}" + "${S}"/scripts/qemu-binfmt-conf.sh \ + --debian \ + --exportdir "${d}" \ + --qemu-path "${EPREFIX}/usr/bin" \ + || die + # Then turn the fragments into a shell script we can source. + sed -E -i \ + -e 's:^([^ ]+) (.*)$:\1="\2":' \ + "${d}"/* || die + + # Generate the init.d script by assembling the fragments from above. + local f qcpu package interpreter magic mask + cat "${FILESDIR}"/qemu-binfmt.initd.head >"${out}" || die + for f in "${d}"/qemu-* ; do + source "${f}" + + # Normalize the cpu logic like we do in the init.d for the native cpu. + qcpu=${package#qemu-} + case ${qcpu} in + arm*) qcpu="arm";; + mips*) qcpu="mips";; + ppc*) qcpu="ppc";; + s390*) qcpu="s390";; + sh*) qcpu="sh";; + sparc*) qcpu="sparc";; + esac + + # we use 'printf' here to be portable across 'sh' + # implementations: #679168 + cat <<EOF >>"${out}" + if [ "\${cpu}" != "${qcpu}" -a -x "${interpreter}" ] ; then + printf '%s\n' ':${package}:M::${magic}:${mask}:${interpreter}:'"\${QEMU_BINFMT_FLAGS}" >/proc/sys/fs/binfmt_misc/register + fi +EOF + + echo ":${package}:M::${magic}:${mask}:${interpreter}:OC" >>"${out_systemd}" + + done + cat "${FILESDIR}"/qemu-binfmt.initd.tail >>"${out}" || die +} + +src_install() { + if [[ -n ${user_targets} ]]; then + cd "${S}/user-build" + emake DESTDIR="${ED}" install + + # Install binfmt handler init script for user targets. + generate_initd + doinitd "${T}/qemu-binfmt" + + # Install binfmt/qemu.conf. + insinto "/usr/share/qemu/binfmt.d" + doins "${T}/qemu.conf" + fi + + if [[ -n ${softmmu_targets} ]]; then + cd "${S}/softmmu-build" + emake DESTDIR="${ED}" install + + # This might not exist if the test failed. #512010 + [[ -e check-report.html ]] && dodoc check-report.html + + if use kernel_linux; then + udev_newrules "${FILESDIR}"/65-kvm.rules-r2 65-kvm.rules + fi + + if use python; then + python_foreach_impl qemu_python_install + fi + fi + + cd "${S}/tools-build" || die + emake DESTDIR="${ED}" install + + # If USE=doc, there'll be newly generated docs which we install instead. + if ! use doc && [[ ${QEMU_DOCS_PREBUILT} == 1 ]] ; then + doman "${WORKDIR}"/${PN}-${QEMU_DOCS_VERSION}-docs/docs/*.[0-8] + fi + + # Disable mprotect on the qemu binaries as they use JITs to be fast #459348 + pushd "${ED}"/usr/bin >/dev/null || die + pax-mark mr "${softmmu_bins[@]}" "${user_bins[@]}" # bug 575594 + popd >/dev/null || die + + # Install config file example for qemu-bridge-helper + insinto "/etc/qemu" + doins "${FILESDIR}/bridge.conf" + + cd "${S}" || die + dodoc MAINTAINERS docs/specs/pci-ids.txt + newdoc pc-bios/README README.pc-bios + + # Disallow stripping of prebuilt firmware files. + dostrip -x ${QA_PREBUILT} + + if [[ -n ${softmmu_targets} ]]; then + # Remove SeaBIOS since we're using the SeaBIOS packaged one + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then + dosym ../seabios/bios-256k.bin /usr/share/qemu/bios-256k.bin + fi + + # Remove vgabios since we're using the seavgabios packaged one + rm "${ED}/usr/share/qemu/vgabios.bin" + rm "${ED}/usr/share/qemu/vgabios-cirrus.bin" + rm "${ED}/usr/share/qemu/vgabios-qxl.bin" + rm "${ED}/usr/share/qemu/vgabios-stdvga.bin" + rm "${ED}/usr/share/qemu/vgabios-virtio.bin" + rm "${ED}/usr/share/qemu/vgabios-vmware.bin" + + # PPC/PPC64 loads vgabios-stdvga + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 || use qemu_softmmu_targets_ppc || use qemu_softmmu_targets_ppc64; then + dosym ../seavgabios/vgabios-isavga.bin /usr/share/qemu/vgabios.bin + dosym ../seavgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin + dosym ../seavgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin + dosym ../seavgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin + dosym ../seavgabios/vgabios-virtio.bin /usr/share/qemu/vgabios-virtio.bin + dosym ../seavgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin + fi + + # Remove sgabios since we're using the sgabios packaged one + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then + dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin + fi + + # Remove iPXE since we're using the iPXE packaged one + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then + dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom + dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom + dosym ../ipxe/10500940.rom /usr/share/qemu/pxe-ne2k_pci.rom + dosym ../ipxe/10222000.rom /usr/share/qemu/pxe-pcnet.rom + dosym ../ipxe/10ec8139.rom /usr/share/qemu/pxe-rtl8139.rom + dosym ../ipxe/1af41000.rom /usr/share/qemu/pxe-virtio.rom + fi + fi + + DISABLE_AUTOFORMATTING=true + readme.gentoo_create_doc +} + +firmware_abi_change() { + local pv + for pv in ${REPLACING_VERSIONS}; do + if ver_test ${pv} -lt ${FIRMWARE_ABI_VERSION}; then + return 0 + fi + done + return 1 +} + +pkg_postinst() { + if [[ -n ${softmmu_targets} ]] && use kernel_linux; then + udev_reload + fi + + xdg_icon_cache_update + + [[ -z ${EPREFIX} ]] && [[ -f ${EROOT}/usr/libexec/qemu-bridge-helper ]] && \ + fcaps cap_net_admin "${EROOT}"/usr/libexec/qemu-bridge-helper + + DISABLE_AUTOFORMATTING=true + readme.gentoo_print_elog + + if use pin-upstream-blobs && firmware_abi_change; then + ewarn "This version of qemu pins new versions of firmware blobs:" + + if has_version 'sys-firmware/edk2-bin'; then + ewarn " $(best_version sys-firmware/edk2-bin)" + else + ewarn " $(best_version sys-firmware/edk2)" + fi + + if has_version 'sys-firmware/seabios-bin'; then + ewarn " $(best_version sys-firmware/seabios-bin)" + else + ewarn " $(best_version sys-firmware/seabios)" + fi + + ewarn " $(best_version sys-firmware/ipxe)" + ewarn " $(best_version sys-firmware/sgabios)" + ewarn "This might break resume of hibernated guests (started with a different" + ewarn "firmware version) and live migration to/from qemu versions with different" + ewarn "firmware. Please (cold) restart all running guests. For functional" + ewarn "guest migration ensure that all" + ewarn "hosts run at least" + ewarn " app-emulation/qemu-${FIRMWARE_ABI_VERSION}." + fi +} + +pkg_info() { + echo "Using:" + echo " $(best_version app-emulation/spice-protocol)" + + if has_version 'sys-firmware/edk2-bin'; then + echo " $(best_version sys-firmware/edk2-bin)" + else + echo " $(best_version sys-firmware/edk2)" + fi + + if has_version 'sys-firmware/seabios-bin'; then + echo " $(best_version sys-firmware/seabios-bin)" + else + echo " $(best_version sys-firmware/seabios)" + fi + + echo " $(best_version sys-firmware/ipxe)" + echo " $(best_version sys-firmware/sgabios)" +} + +pkg_postrm() { + xdg_icon_cache_update + udev_reload +} diff --git a/app-emulation/qemu/qemu-8.2.10.ebuild b/app-emulation/qemu/qemu-8.2.10.ebuild new file mode 100644 index 000000000000..39674977ab69 --- /dev/null +++ b/app-emulation/qemu/qemu-8.2.10.ebuild @@ -0,0 +1,1001 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Generate using https://github.com/thesamesam/sam-gentoo-scripts/blob/main/niche/generate-qemu-docs +# Set to 1 if prebuilt, 0 if not +# (the construct below is to allow overriding from env for script) +QEMU_DOCS_PREBUILT=${QEMU_DOCS_PREBUILT:-1} +QEMU_DOCS_PREBUILT_DEV=sam +QEMU_DOCS_VERSION=$(ver_cut 1-2).0 +# Default to generating docs (inc. man pages) if no prebuilt; overridden later +# bug #830088 +QEMU_DOC_USEFLAG="+doc" + +PYTHON_COMPAT=( python3_{11..12} ) +PYTHON_REQ_USE="ensurepip(-),ncurses,readline" + +FIRMWARE_ABI_VERSION="7.2.0" + +inherit linux-info toolchain-funcs python-r1 udev fcaps readme.gentoo-r1 \ + pax-utils xdg-utils + +if [[ ${PV} == *9999* ]]; then + QEMU_DOCS_PREBUILT=0 + + EGIT_REPO_URI="https://gitlab.com/qemu-project/qemu.git/" + EGIT_SUBMODULES=() + inherit git-r3 + SRC_URI="" + declare -A SUBPROJECTS=( + [keycodemapdb]="f5772a62ec52591ff6870b7e8ef32482371f22c6" + [berkeley-softfloat-3]="b64af41c3276f97f0e181920400ee056b9c88037" + [berkeley-testfloat-3]="40619cbb3bf32872df8c53cc457039229428a263" + ) + + for proj in "${!SUBPROJECTS[@]}"; do + c=${SUBPROJECTS[${proj}]} + SRC_URI+=" https://gitlab.com/qemu-project/${proj}/-/archive/${c}/${proj}-${c}.tar.bz2" + done +else + MY_P="${PN}-${PV/_rc/-rc}" + SRC_URI="https://download.qemu.org/${MY_P}.tar.xz" + + if [[ ${QEMU_DOCS_PREBUILT} == 1 ]] ; then + SRC_URI+=" !doc? ( https://dev.gentoo.org/~${QEMU_DOCS_PREBUILT_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${QEMU_DOCS_VERSION}-docs.tar.xz )" + fi + + S="${WORKDIR}/${MY_P}" + [[ "${PV}" != *_rc* ]] && KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86" +fi + +DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools" +HOMEPAGE="https://www.qemu.org https://www.linux-kvm.org" + +LICENSE="GPL-2 LGPL-2 BSD-2" +SLOT="0" + +[[ ${QEMU_DOCS_PREBUILT} == 1 ]] && QEMU_DOC_USEFLAG="doc" + +IUSE="accessibility +aio alsa bpf bzip2 capstone +curl debug ${QEMU_DOC_USEFLAG} + +fdt fuse glusterfs +gnutls gtk infiniband iscsi io-uring + jack jemalloc +jpeg keyutils + lzo multipath + ncurses nfs nls numa opengl +oss pam +pin-upstream-blobs pipewire + plugins +png pulseaudio python rbd sasl +seccomp sdl sdl-image selinux + +slirp + smartcard snappy spice ssh static-user systemtap test udev usb + usbredir vde +vhost-net virgl virtfs +vnc vte xattr xen + zstd" + +COMMON_TARGETS=" + aarch64 + alpha + arm + cris + hppa + i386 + loongarch64 + m68k + microblaze + microblazeel + mips + mips64 + mips64el + mipsel + nios2 + or1k + ppc + ppc64 + riscv32 + riscv64 + s390x + sh4 + sh4eb + sparc + sparc64 + x86_64 + xtensa + xtensaeb +" +IUSE_SOFTMMU_TARGETS=" + ${COMMON_TARGETS} + avr + rx + tricore +" +IUSE_USER_TARGETS=" + ${COMMON_TARGETS} + aarch64_be + armeb + hexagon + mipsn32 + mipsn32el + ppc64le + sparc32plus +" + +use_softmmu_targets=$(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS}) +use_user_targets=$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS}) +IUSE+=" ${use_softmmu_targets} ${use_user_targets}" + +RESTRICT="!test? ( test )" + +# Allow no targets to be built so that people can get a tools-only build. +# Block USE flag configurations known to not work. +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} + qemu_softmmu_targets_arm? ( fdt ) + qemu_softmmu_targets_microblaze? ( fdt ) + qemu_softmmu_targets_mips64el? ( fdt ) + qemu_softmmu_targets_ppc64? ( fdt ) + qemu_softmmu_targets_ppc? ( fdt ) + qemu_softmmu_targets_riscv32? ( fdt ) + qemu_softmmu_targets_riscv64? ( fdt ) + qemu_softmmu_targets_x86_64? ( fdt ) + sdl-image? ( sdl ) + static-user? ( !plugins ) + virgl? ( opengl ) + virtfs? ( xattr ) + vnc? ( gnutls ) + vte? ( gtk ) + multipath? ( udev ) + plugins? ( !static-user ) +" +for smname in ${IUSE_SOFTMMU_TARGETS} ; do + REQUIRED_USE+=" qemu_softmmu_targets_${smname}? ( kernel_linux? ( seccomp ) )" +done + +# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) +# and user/softmmu targets (qemu-*, qemu-system-*). +# +# Yep, you need both libcap and libcap-ng since virtfs only uses libcap. +# +# The attr lib isn't always linked in (although the USE flag is always +# respected). This is because qemu supports using the C library's API +# when available rather than always using the external library. +ALL_DEPEND=" + dev-libs/glib:2[static-libs(+)] + sys-libs/zlib[static-libs(+)] + python? ( ${PYTHON_DEPS} ) + systemtap? ( dev-debug/systemtap ) + xattr? ( sys-apps/attr[static-libs(+)] ) +" + +# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) +# softmmu targets (qemu-system-*). +SOFTMMU_TOOLS_DEPEND=" + >=x11-libs/pixman-0.28.0[static-libs(+)] + accessibility? ( + app-accessibility/brltty[api] + app-accessibility/brltty[static-libs(+)] + ) + aio? ( dev-libs/libaio[static-libs(+)] ) + alsa? ( >=media-libs/alsa-lib-1.0.13 ) + bpf? ( dev-libs/libbpf:= ) + bzip2? ( app-arch/bzip2[static-libs(+)] ) + capstone? ( dev-libs/capstone:=[static-libs(+)] ) + curl? ( >=net-misc/curl-7.15.4[static-libs(+)] ) + fdt? ( >=sys-apps/dtc-1.5.1[static-libs(+)] ) + fuse? ( >=sys-fs/fuse-3.1:3[static-libs(+)] ) + glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] ) + gnutls? ( + >=net-libs/gnutls-3.0:=[static-libs(+)] + dev-libs/nettle:=[static-libs(+)] + ) + gtk? ( + x11-libs/gtk+:3 + vte? ( x11-libs/vte:2.91 ) + ) + infiniband? ( sys-cluster/rdma-core[static-libs(+)] ) + iscsi? ( net-libs/libiscsi ) + io-uring? ( sys-libs/liburing:=[static-libs(+)] ) + jack? ( virtual/jack ) + jemalloc? ( dev-libs/jemalloc ) + jpeg? ( media-libs/libjpeg-turbo:=[static-libs(+)] ) + kernel_linux? ( sys-libs/libcap-ng[static-libs(+)] ) + keyutils? ( sys-apps/keyutils[static-libs(+)] ) + lzo? ( dev-libs/lzo:2[static-libs(+)] ) + multipath? ( sys-fs/multipath-tools ) + ncurses? ( + sys-libs/ncurses:=[unicode(+)] + sys-libs/ncurses:=[static-libs(+)] + ) + nfs? ( >=net-fs/libnfs-1.9.3:=[static-libs(+)] ) + numa? ( sys-process/numactl[static-libs(+)] ) + opengl? ( + virtual/opengl + media-libs/libepoxy[static-libs(+)] + media-libs/mesa[static-libs(+)] + media-libs/mesa[egl(+),gbm(+)] + ) + pam? ( sys-libs/pam ) + pipewire? ( >=media-video/pipewire-0.3.60 ) + png? ( >=media-libs/libpng-1.6.34:=[static-libs(+)] ) + pulseaudio? ( media-libs/libpulse ) + rbd? ( sys-cluster/ceph ) + sasl? ( dev-libs/cyrus-sasl[static-libs(+)] ) + sdl? ( + media-libs/libsdl2[video] + media-libs/libsdl2[static-libs(+)] + ) + sdl-image? ( media-libs/sdl2-image[static-libs(+)] ) + seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] ) + slirp? ( net-libs/libslirp[static-libs(+)] ) + smartcard? ( >=app-emulation/libcacard-2.5.0[static-libs(+)] ) + snappy? ( app-arch/snappy:= ) + spice? ( + >=app-emulation/spice-protocol-0.14.0 + >=app-emulation/spice-0.14.0[static-libs(+)] + ) + ssh? ( >=net-libs/libssh-0.8.6[static-libs(+)] ) + udev? ( virtual/libudev:= ) + usb? ( >=virtual/libusb-1-r2:1[static-libs(+)] ) + usbredir? ( >=sys-apps/usbredir-0.6[static-libs(+)] ) + vde? ( net-misc/vde[static-libs(+)] ) + virgl? ( media-libs/virglrenderer[static-libs(+)] ) + virtfs? ( sys-libs/libcap ) + xen? ( app-emulation/xen-tools:= ) + zstd? ( >=app-arch/zstd-1.4.0[static-libs(+)] ) +" + +EDK2_OVMF_VERSION="202202" +SEABIOS_VERSION="1.16.3" + +X86_FIRMWARE_DEPEND=" + pin-upstream-blobs? ( + ~sys-firmware/edk2-bin-${EDK2_OVMF_VERSION} + ~sys-firmware/ipxe-1.21.1[binary,qemu] + ~sys-firmware/seabios-bin-${SEABIOS_VERSION} + ~sys-firmware/sgabios-0.1_pre10[binary] + ) + !pin-upstream-blobs? ( + || ( + >=sys-firmware/edk2-${EDK2_OVMF_VERSION} + >=sys-firmware/edk2-bin-${EDK2_OVMF_VERSION} + ) + sys-firmware/ipxe[qemu] + || ( + >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + >=sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) + sys-firmware/sgabios + ) +" +PPC_FIRMWARE_DEPEND=" + pin-upstream-blobs? ( + ~sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) + !pin-upstream-blobs? ( + || ( + >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + >=sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) + ) +" + +# See bug #913084 for pip dep +BDEPEND=" + $(python_gen_impl_dep) + dev-lang/perl + >=dev-build/meson-0.63.0 + app-alternatives/ninja + virtual/pkgconfig + doc? ( + >=dev-python/sphinx-1.6.0[${PYTHON_USEDEP}] + dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}] + ) + gtk? ( nls? ( sys-devel/gettext ) ) + test? ( + dev-libs/glib[utils] + app-alternatives/bc + ) +" +CDEPEND=" + ${ALL_DEPEND//\[static-libs(+)]} + ${SOFTMMU_TOOLS_DEPEND//\[static-libs(+)]} + qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} ) + qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} ) + qemu_softmmu_targets_ppc? ( ${PPC_FIRMWARE_DEPEND} ) + qemu_softmmu_targets_ppc64? ( ${PPC_FIRMWARE_DEPEND} ) +" +DEPEND=" + ${CDEPEND} + kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 ) + static-user? ( ${ALL_DEPEND} ) +" +RDEPEND=" + ${CDEPEND} + acct-group/kvm + selinux? ( + sec-policy/selinux-qemu + sys-libs/libselinux + ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-8.0.0-disable-keymap.patch + "${FILESDIR}"/${PN}-7.1.0-capstone-include-path.patch + "${FILESDIR}"/${PN}-8.1.0-also-build-virtfs-proxy-helper.patch + "${FILESDIR}"/${PN}-8.1.0-skip-tests.patch + "${FILESDIR}"/${PN}-8.1.0-find-sphinx.patch + "${FILESDIR}"/${PN}-7.2.16-optionrom-pass-Wl-no-error-rwx-segments.patch +) + +QA_PREBUILT=" + usr/share/qemu/hppa-firmware.img + usr/share/qemu/openbios-ppc + usr/share/qemu/openbios-sparc64 + usr/share/qemu/openbios-sparc32 + usr/share/qemu/opensbi-riscv64-generic-fw_dynamic.elf + usr/share/qemu/opensbi-riscv32-generic-fw_dynamic.elf + usr/share/qemu/palcode-clipper + usr/share/qemu/s390-ccw.img + usr/share/qemu/s390-netboot.img + usr/share/qemu/u-boot.e500 +" + +QA_WX_LOAD=" + usr/bin/qemu-i386 + usr/bin/qemu-x86_64 + usr/bin/qemu-alpha + usr/bin/qemu-arm + usr/bin/qemu-cris + usr/bin/qemu-m68k + usr/bin/qemu-microblaze + usr/bin/qemu-microblazeel + usr/bin/qemu-mips + usr/bin/qemu-mipsel + usr/bin/qemu-or1k + usr/bin/qemu-ppc + usr/bin/qemu-ppc64 + usr/bin/qemu-sh4 + usr/bin/qemu-sh4eb + usr/bin/qemu-sparc + usr/bin/qemu-sparc64 + usr/bin/qemu-armeb + usr/bin/qemu-sparc32plus + usr/bin/qemu-s390x + usr/bin/qemu-unicore32 +" + +DOC_CONTENTS="If you don't have kvm compiled into the kernel, make sure you have the +kernel module loaded before running kvm. The easiest way to ensure that the +kernel module is loaded is to load it on boot. + For AMD CPUs the module is called 'kvm-amd'. + For Intel CPUs the module is called 'kvm-intel'. +Please review /etc/conf.d/modules for how to load these. + +Make sure your user is in the 'kvm' group. Just run + $ gpasswd -a <USER> kvm +then have <USER> re-login. + +For brand new installs, the default permissions on /dev/kvm might not let +you access it. You can tell udev to reset ownership/perms: + $ udevadm trigger -c add /dev/kvm + +If you want to register binfmt handlers for qemu user targets: +For openrc: + # rc-update add qemu-binfmt +For systemd: + # ln -s /usr/share/qemu/binfmt.d/qemu.conf /etc/binfmt.d/qemu.conf" + +pkg_pretend() { + if use kernel_linux && kernel_is lt 2 6 25; then + eerror "This version of KVM requires a host kernel of 2.6.25 or higher." + elif use kernel_linux; then + if ! linux_config_exists; then + eerror "Unable to check your kernel for KVM support" + else + CONFIG_CHECK="~KVM ~TUN ~BRIDGE" + ERROR_KVM="You must enable KVM in your kernel to continue" + ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in" + ERROR_KVM_AMD+=" your kernel configuration." + ERROR_KVM_INTEL="If you have an Intel CPU, you must enable" + ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration." + ERROR_TUN="You will need the Universal TUN/TAP driver compiled" + ERROR_TUN+=" into your kernel or loaded as a module to use the" + ERROR_TUN+=" virtual network device if using -net tap." + ERROR_BRIDGE="You will also need support for 802.1d" + ERROR_BRIDGE+=" Ethernet Bridging for some network configurations." + use vhost-net && CONFIG_CHECK+=" ~VHOST_NET" + ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net" + ERROR_VHOST_NET+=" support" + + if use amd64 || use x86 || use amd64-linux || use x86-linux; then + if grep -q AuthenticAMD /proc/cpuinfo; then + CONFIG_CHECK+=" ~KVM_AMD" + elif grep -q GenuineIntel /proc/cpuinfo; then + CONFIG_CHECK+=" ~KVM_INTEL" + fi + fi + + use python && CONFIG_CHECK+=" ~DEBUG_FS" + ERROR_DEBUG_FS="debugFS support required for kvm_stat" + + # Now do the actual checks setup above + check_extra_config + fi + fi + + if grep -qs '/usr/bin/qemu-kvm' "${EROOT}"/etc/libvirt/qemu/*.xml; then + eerror "The kvm/qemu-kvm wrappers no longer exist, but your libvirt" + eerror "instances are still pointing to it. Please update your" + eerror "configs in /etc/libvirt/qemu/ to use the -enable-kvm flag" + eerror "and the right system binary (e.g. qemu-system-x86_64)." + die "update your virt configs to not use qemu-kvm" + fi +} + +# Sanity check to make sure target lists are kept up-to-date. +check_targets() { + local var=$1 mak=$2 + local detected sorted + + pushd "${S}"/configs/targets/ >/dev/null || die + + # Force C locale until glibc is updated. #564936 + detected=$(echo $(printf '%s\n' *-${mak}.mak | sed "s:-${mak}.mak::" | LC_COLLATE=C sort -u)) + sorted=$(echo $(printf '%s\n' ${!var} | LC_COLLATE=C sort -u)) + if [[ ${sorted} != "${detected}" ]] ; then + eerror "The ebuild needs to be kept in sync." + eerror "${var}: ${sorted}" + eerror "$(printf '%-*s' ${#var} configure): ${detected}" + die "sync ${var} to the list of targets" + fi + + popd >/dev/null +} + +src_unpack() { + if [[ ${PV} == 9999 ]] ; then + git-r3_src_unpack + for file in ${A}; do + unpack "${file}" + done + cd "${WORKDIR}" || die + for proj in "${!SUBPROJECTS[@]}"; do + mv "${proj}-${SUBPROJECTS[${proj}]}" "${S}/subprojects/${proj}" || die + done + cd "${S}" || die + meson subprojects packagefiles --apply || die + else + default + fi +} + +src_prepare() { + check_targets IUSE_SOFTMMU_TARGETS softmmu + check_targets IUSE_USER_TARGETS linux-user + + default + + # Use correct toolchain to fix cross-compiling + tc-export AR AS LD NM OBJCOPY PKG_CONFIG RANLIB STRINGS + export WINDRES=${CHOST}-windres + + # Workaround for bug #938302 + if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then + cat >> "${S}"/configs/meson/linux.txt <<-EOF || die + [binaries] + dtrace='stap-dtrace' + EOF + fi + + # Verbose builds + MAKEOPTS+=" V=1" + + # Remove bundled modules + rm -r roms/*/ || die +} + +## +# configures qemu based on the build directory and the build type +# we are using. +# +qemu_src_configure() { + debug-print-function ${FUNCNAME} "$@" + + local buildtype=$1 + local builddir="${S}/${buildtype}-build" + + mkdir "${builddir}" || die + + local conf_opts=( + --prefix=/usr + --sysconfdir=/etc + --bindir=/usr/bin + --libdir=/usr/$(get_libdir) + --datadir=/usr/share + --docdir=/usr/share/doc/${PF}/html + --mandir=/usr/share/man + --localstatedir=/var + --disable-bsd-user + --disable-containers # bug #732972 + --disable-guest-agent + --disable-strip + --disable-download + --python="${PYTHON}" + + # bug #746752: TCG interpreter has a few limitations: + # - it does not support FPU + # - it's generally slower on non-self-modifying code + # It's advantage is support for host architectures + # where native codegeneration is not implemented. + # Gentoo has qemu keyworded only on targets with + # native code generation available. Avoid the interpreter. + --disable-tcg-interpreter + + --disable-werror + # We support gnutls/nettle for crypto operations. It is possible + # to use gcrypt when gnutls/nettle are disabled (but not when they + # are enabled), but it's not really worth the hassle. Disable it + # all the time to avoid automatically detecting it. #568856 + --disable-gcrypt + --cc="$(tc-getCC)" + --cxx="$(tc-getCXX)" + --objcc="$(tc-getCC)" + --host-cc="$(tc-getBUILD_CC)" + + $(use_enable alsa) + $(use_enable debug debug-info) + $(use_enable debug debug-tcg) + $(use_enable jack) + $(use_enable nls gettext) + $(use_enable oss) + $(use_enable pipewire) + $(use_enable plugins) + $(use_enable pulseaudio pa) + $(use_enable selinux) + $(use_enable xattr attr) + ) + + # Disable options not used by user targets. This simplifies building + # static user targets (USE=static-user) considerably. + conf_notuser() { + if [[ ${buildtype} == "user" ]] ; then + echo "--disable-${2:-$1}" + else + use_enable "$@" + fi + } + # Enable option only for softmmu build, but not 'user' or 'tools' + conf_softmmu() { + if [[ ${buildtype} == "softmmu" ]] ; then + use_enable "$@" + else + echo "--disable-${2:-$1}" + fi + } + # Enable option only for tools build, but not 'user' or 'softmmu' + conf_tools() { + if [[ ${buildtype} == "tools" ]] ; then + use_enable "$@" + else + echo "--disable-${2:-$1}" + fi + } + # Special case for the malloc flag, because the --disable flag does + # not exist and trying like above will break configuring. + conf_malloc() { + if [[ ! ${buildtype} == "user" ]] ; then + usex "${1}" "--enable-malloc=${1}" "" + fi + } + conf_opts+=( + $(conf_notuser accessibility brlapi) + $(conf_notuser aio linux-aio) + $(conf_softmmu bpf) + $(conf_notuser bzip2) + $(conf_notuser capstone) + $(conf_notuser curl) + $(conf_tools doc docs) + $(conf_notuser fdt) + $(conf_notuser fuse) + $(conf_notuser glusterfs) + $(conf_notuser gnutls) + $(conf_notuser gnutls nettle) + $(conf_notuser gtk) + $(conf_notuser infiniband rdma) + $(conf_notuser iscsi libiscsi) + $(conf_notuser io-uring linux-io-uring) + $(conf_malloc jemalloc) + $(conf_notuser jpeg vnc-jpeg) + $(conf_notuser kernel_linux kvm) + $(conf_notuser keyutils libkeyutils) + $(conf_notuser lzo) + $(conf_notuser multipath mpath) + $(conf_notuser ncurses curses) + $(conf_notuser nfs libnfs) + $(conf_notuser numa) + $(conf_notuser opengl) + $(conf_notuser pam auth-pam) + $(conf_notuser png) + $(conf_notuser rbd) + $(conf_notuser sasl vnc-sasl) + $(conf_notuser sdl) + $(conf_softmmu sdl-image) + $(conf_notuser seccomp) + $(conf_notuser slirp) + $(conf_notuser smartcard) + $(conf_notuser snappy) + $(conf_notuser spice) + $(conf_notuser ssh libssh) + $(conf_notuser udev libudev) + $(conf_notuser usb libusb) + $(conf_notuser usbredir usb-redir) + $(conf_notuser vde) + $(conf_notuser vhost-net) + $(conf_notuser virgl virglrenderer) + $(conf_softmmu virtfs) + $(conf_notuser vnc) + $(conf_notuser vte) + $(conf_notuser xen) + $(conf_notuser xen xen-pci-passthrough) + # use prebuilt keymaps, bug #759604 + --disable-xkbcommon + $(conf_notuser zstd) + ) + + if [[ ! ${buildtype} == "user" ]] ; then + # audio options + local audio_opts=( + # Note: backend order matters here: #716202 + # We iterate from higher-level to lower level. + $(usex pulseaudio pa "") + $(usev pipewire) + $(usev jack) + $(usev sdl) + $(usev alsa) + $(usev oss) + ) + conf_opts+=( + --audio-drv-list=$(IFS=,; echo "${audio_opts[*]}") + ) + fi + + case ${buildtype} in + user) + conf_opts+=( + --enable-linux-user + --disable-system + --disable-tools + --disable-cap-ng + --disable-seccomp + ) + local static_flag="static-user" + ;; + softmmu) + conf_opts+=( + --disable-linux-user + --enable-system + --disable-tools + --enable-cap-ng + --enable-seccomp + ) + local static_flag="none" + ;; + tools) + conf_opts+=( + --disable-linux-user + --disable-system + --enable-tools + --enable-cap-ng + ) + local static_flag="none" + ;; + esac + + local targets="${buildtype}_targets" + [[ -n ${targets} ]] && conf_opts+=( --target-list="${!targets}" ) + + # Add support for SystemTap + use systemtap && conf_opts+=( --enable-trace-backends="dtrace" ) + + # We always want to attempt to build with PIE support as it results + # in a more secure binary. But it doesn't work with static or if + # the current GCC doesn't have PIE support. + if [[ ${static_flag} != "none" ]] && use ${static_flag}; then + conf_opts+=( --static --disable-pie ) + else + tc-enables-pie && conf_opts+=( --enable-pie ) + fi + + # Meson will not use a cross-file unless cross_prefix is set. + tc-is-cross-compiler && conf_opts+=( --cross-prefix="${CHOST}-" ) + + # Plumb through equivalent of EXTRA_ECONF to allow experiments + # like bug #747928. + conf_opts+=( ${EXTRA_CONF_QEMU} ) + + echo "../configure ${conf_opts[*]}" + cd "${builddir}" + ../configure "${conf_opts[@]}" || die "configure failed" +} + +src_configure() { + local target + + python_setup + + softmmu_targets= softmmu_bins=() + user_targets= user_bins=() + + for target in ${IUSE_SOFTMMU_TARGETS} ; do + if use "qemu_softmmu_targets_${target}"; then + softmmu_targets+=",${target}-softmmu" + softmmu_bins+=( "qemu-system-${target}" ) + fi + done + + for target in ${IUSE_USER_TARGETS} ; do + if use "qemu_user_targets_${target}"; then + user_targets+=",${target}-linux-user" + user_bins+=( "qemu-${target}" ) + fi + done + + softmmu_targets=${softmmu_targets#,} + user_targets=${user_targets#,} + + [[ -n ${softmmu_targets} ]] && qemu_src_configure "softmmu" + [[ -n ${user_targets} ]] && qemu_src_configure "user" + qemu_src_configure "tools" +} + +src_compile() { + if [[ -n ${user_targets} ]]; then + cd "${S}/user-build" || die + default + fi + + if [[ -n ${softmmu_targets} ]]; then + cd "${S}/softmmu-build" || die + default + fi + + cd "${S}/tools-build" || die + default +} + +src_test() { + if [[ -n ${softmmu_targets} ]]; then + cd "${S}/softmmu-build" || die + pax-mark m */qemu-system-* #515550 + emake check + fi +} + +qemu_python_install() { + python_domodule "${S}/python/qemu" + + python_doscript "${S}/scripts/kvm/vmxcap" + python_doscript "${S}/scripts/qmp/qmp-shell" + python_doscript "${S}/scripts/qmp/qemu-ga-client" +} + +# Generate binfmt support files. +# - /etc/init.d/qemu-binfmt script which registers the user handlers (openrc) +# - /usr/share/qemu/binfmt.d/qemu.conf (for use with systemd-binfmt) +generate_initd() { + local out="${T}/qemu-binfmt" + local out_systemd="${T}/qemu.conf" + local d="${T}/binfmt.d" + + einfo "Generating qemu binfmt scripts and configuration files" + + # Generate the debian fragments first. + mkdir -p "${d}" + "${S}"/scripts/qemu-binfmt-conf.sh \ + --debian \ + --exportdir "${d}" \ + --qemu-path "${EPREFIX}/usr/bin" \ + || die + # Then turn the fragments into a shell script we can source. + sed -E -i \ + -e 's:^([^ ]+) (.*)$:\1="\2":' \ + "${d}"/* || die + + # Generate the init.d script by assembling the fragments from above. + local f qcpu package interpreter magic mask + cat "${FILESDIR}"/qemu-binfmt.initd.head >"${out}" || die + for f in "${d}"/qemu-* ; do + source "${f}" + + # Normalize the cpu logic like we do in the init.d for the native cpu. + qcpu=${package#qemu-} + case ${qcpu} in + arm*) qcpu="arm";; + mips*) qcpu="mips";; + ppc*) qcpu="ppc";; + s390*) qcpu="s390";; + sh*) qcpu="sh";; + sparc*) qcpu="sparc";; + esac + + # we use 'printf' here to be portable across 'sh' + # implementations: #679168 + cat <<EOF >>"${out}" + if [ "\${cpu}" != "${qcpu}" -a -x "${interpreter}" ] ; then + printf '%s\n' ':${package}:M::${magic}:${mask}:${interpreter}:'"\${QEMU_BINFMT_FLAGS}" >/proc/sys/fs/binfmt_misc/register + fi +EOF + + echo ":${package}:M::${magic}:${mask}:${interpreter}:OC" >>"${out_systemd}" + + done + cat "${FILESDIR}"/qemu-binfmt.initd.tail >>"${out}" || die +} + +src_install() { + if [[ -n ${user_targets} ]]; then + cd "${S}/user-build" + emake DESTDIR="${ED}" install + + # Install binfmt handler init script for user targets. + generate_initd + doinitd "${T}/qemu-binfmt" + + # Install binfmt/qemu.conf. + insinto "/usr/share/qemu/binfmt.d" + doins "${T}/qemu.conf" + fi + + if [[ -n ${softmmu_targets} ]]; then + cd "${S}/softmmu-build" + emake DESTDIR="${ED}" install + + # This might not exist if the test failed. #512010 + [[ -e check-report.html ]] && dodoc check-report.html + + if use kernel_linux; then + udev_newrules "${FILESDIR}"/65-kvm.rules-r2 65-kvm.rules + fi + + if use python; then + python_foreach_impl qemu_python_install + fi + fi + + cd "${S}/tools-build" || die + emake DESTDIR="${ED}" install + + # If USE=doc, there'll be newly generated docs which we install instead. + if ! use doc && [[ ${QEMU_DOCS_PREBUILT} == 1 ]] ; then + doman "${WORKDIR}"/${PN}-${QEMU_DOCS_VERSION}-docs/docs/*.[0-8] + fi + + # Disable mprotect on the qemu binaries as they use JITs to be fast #459348 + pushd "${ED}"/usr/bin >/dev/null || die + pax-mark mr "${softmmu_bins[@]}" "${user_bins[@]}" # bug 575594 + popd >/dev/null || die + + # Install config file example for qemu-bridge-helper + insinto "/etc/qemu" + doins "${FILESDIR}/bridge.conf" + + cd "${S}" || die + dodoc MAINTAINERS + newdoc pc-bios/README README.pc-bios + + # Disallow stripping of prebuilt firmware files. + dostrip -x ${QA_PREBUILT} + + if [[ -n ${softmmu_targets} ]]; then + # Remove SeaBIOS since we're using the SeaBIOS packaged one + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then + dosym ../seabios/bios-256k.bin /usr/share/qemu/bios-256k.bin + fi + + # Remove vgabios since we're using the seavgabios packaged one + rm "${ED}/usr/share/qemu/vgabios.bin" + rm "${ED}/usr/share/qemu/vgabios-cirrus.bin" + rm "${ED}/usr/share/qemu/vgabios-qxl.bin" + rm "${ED}/usr/share/qemu/vgabios-stdvga.bin" + rm "${ED}/usr/share/qemu/vgabios-virtio.bin" + rm "${ED}/usr/share/qemu/vgabios-vmware.bin" + + # PPC/PPC64 loads vgabios-stdvga + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 || use qemu_softmmu_targets_ppc || use qemu_softmmu_targets_ppc64; then + dosym ../seavgabios/vgabios-isavga.bin /usr/share/qemu/vgabios.bin + dosym ../seavgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin + dosym ../seavgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin + dosym ../seavgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin + dosym ../seavgabios/vgabios-virtio.bin /usr/share/qemu/vgabios-virtio.bin + dosym ../seavgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin + fi + + # Remove sgabios since we're using the sgabios packaged one + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then + dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin + fi + + # Remove iPXE since we're using the iPXE packaged one + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then + dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom + dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom + dosym ../ipxe/10500940.rom /usr/share/qemu/pxe-ne2k_pci.rom + dosym ../ipxe/10222000.rom /usr/share/qemu/pxe-pcnet.rom + dosym ../ipxe/10ec8139.rom /usr/share/qemu/pxe-rtl8139.rom + dosym ../ipxe/1af41000.rom /usr/share/qemu/pxe-virtio.rom + fi + fi + + DISABLE_AUTOFORMATTING=true + readme.gentoo_create_doc +} + +firmware_abi_change() { + local pv + for pv in ${REPLACING_VERSIONS}; do + if ver_test ${pv} -lt ${FIRMWARE_ABI_VERSION}; then + return 0 + fi + done + return 1 +} + +pkg_postinst() { + if [[ -n ${softmmu_targets} ]] && use kernel_linux; then + udev_reload + fi + + xdg_icon_cache_update + + [[ -z ${EPREFIX} ]] && [[ -f ${EROOT}/usr/libexec/qemu-bridge-helper ]] && \ + fcaps cap_net_admin "${EROOT}"/usr/libexec/qemu-bridge-helper + + DISABLE_AUTOFORMATTING=true + readme.gentoo_print_elog + + if use pin-upstream-blobs && firmware_abi_change; then + ewarn "This version of qemu pins new versions of firmware blobs:" + + if has_version 'sys-firmware/edk2-bin'; then + ewarn " $(best_version sys-firmware/edk2-bin)" + else + ewarn " $(best_version sys-firmware/edk2)" + fi + + if has_version 'sys-firmware/seabios-bin'; then + ewarn " $(best_version sys-firmware/seabios-bin)" + else + ewarn " $(best_version sys-firmware/seabios)" + fi + + ewarn " $(best_version sys-firmware/ipxe)" + ewarn " $(best_version sys-firmware/sgabios)" + ewarn "This might break resume of hibernated guests (started with a different" + ewarn "firmware version) and live migration to/from qemu versions with different" + ewarn "firmware. Please (cold) restart all running guests. For functional" + ewarn "guest migration ensure that all" + ewarn "hosts run at least" + ewarn " app-emulation/qemu-${FIRMWARE_ABI_VERSION}." + fi +} + +pkg_info() { + echo "Using:" + echo " $(best_version app-emulation/spice-protocol)" + + if has_version 'sys-firmware/edk2-bin'; then + echo " $(best_version sys-firmware/edk2-bin)" + else + echo " $(best_version sys-firmware/edk2)" + fi + + if has_version 'sys-firmware/seabios-bin'; then + echo " $(best_version sys-firmware/seabios-bin)" + else + echo " $(best_version sys-firmware/seabios)" + fi + + echo " $(best_version sys-firmware/ipxe)" + echo " $(best_version sys-firmware/sgabios)" +} + +pkg_postrm() { + xdg_icon_cache_update + udev_reload +} diff --git a/app-emulation/qemu/qemu-9.2.3.ebuild b/app-emulation/qemu/qemu-9.2.3.ebuild new file mode 100644 index 000000000000..dbf0d977e96c --- /dev/null +++ b/app-emulation/qemu/qemu-9.2.3.ebuild @@ -0,0 +1,995 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Generate using https://github.com/thesamesam/sam-gentoo-scripts/blob/main/niche/generate-qemu-docs +# Set to 1 if prebuilt, 0 if not +# (the construct below is to allow overriding from env for script) +QEMU_DOCS_PREBUILT=${QEMU_DOCS_PREBUILT:-1} +QEMU_DOCS_PREBUILT_DEV=sam +QEMU_DOCS_VERSION=$(ver_cut 1-2).0 +# Default to generating docs (inc. man pages) if no prebuilt; overridden later +# bug #830088 +QEMU_DOC_USEFLAG="+doc" + +PYTHON_COMPAT=( python3_{11..13} ) +PYTHON_REQ_USE="ensurepip(-),ncurses,readline" + +FIRMWARE_ABI_VERSION="7.2.0" + +inherit eapi9-ver linux-info toolchain-funcs python-r1 udev fcaps \ + readme.gentoo-r1 pax-utils xdg-utils + +if [[ ${PV} == *9999* ]]; then + QEMU_DOCS_PREBUILT=0 + + EGIT_REPO_URI="https://gitlab.com/qemu-project/qemu.git/" + EGIT_SUBMODULES=() + inherit git-r3 + SRC_URI="" + declare -A SUBPROJECTS=( + [keycodemapdb]="f5772a62ec52591ff6870b7e8ef32482371f22c6" + [berkeley-softfloat-3]="b64af41c3276f97f0e181920400ee056b9c88037" + [berkeley-testfloat-3]="e7af9751d9f9fd3b47911f51a5cfd08af256a9ab" + ) + + for proj in "${!SUBPROJECTS[@]}"; do + c=${SUBPROJECTS[${proj}]} + SRC_URI+=" https://gitlab.com/qemu-project/${proj}/-/archive/${c}/${proj}-${c}.tar.bz2" + done +else + MY_P="${PN}-${PV/_rc/-rc}" + SRC_URI="https://download.qemu.org/${MY_P}.tar.xz" + + if [[ ${QEMU_DOCS_PREBUILT} == 1 ]] ; then + SRC_URI+=" !doc? ( https://dev.gentoo.org/~${QEMU_DOCS_PREBUILT_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${QEMU_DOCS_VERSION}-docs.tar.xz )" + fi + + S="${WORKDIR}/${MY_P}" + [[ "${PV}" != *_rc* ]] && KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86" +fi + +DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools" +HOMEPAGE="https://www.qemu.org https://www.linux-kvm.org" + +LICENSE="GPL-2 LGPL-2 BSD-2" +SLOT="0" + +[[ ${QEMU_DOCS_PREBUILT} == 1 ]] && QEMU_DOC_USEFLAG="doc" + +IUSE="accessibility +aio alsa bpf bzip2 capstone +curl debug ${QEMU_DOC_USEFLAG} + +fdt fuse glusterfs +gnutls gtk infiniband iscsi io-uring + jack jemalloc +jpeg keyutils + lzo multipath + ncurses nfs nls numa opengl +oss pam +pin-upstream-blobs pipewire + plugins +png pulseaudio python rbd sasl +seccomp sdl sdl-image selinux + +slirp + smartcard snappy spice ssh static-user systemtap test udev usb + usbredir vde +vhost-net virgl virtfs +vnc vte xattr xdp xen + zstd" + +COMMON_TARGETS=" + aarch64 + alpha + arm + hppa + i386 + loongarch64 + m68k + microblaze + microblazeel + mips + mips64 + mips64el + mipsel + or1k + ppc + ppc64 + riscv32 + riscv64 + s390x + sh4 + sh4eb + sparc + sparc64 + x86_64 + xtensa + xtensaeb +" +IUSE_SOFTMMU_TARGETS=" + ${COMMON_TARGETS} + avr + rx + tricore +" +IUSE_USER_TARGETS=" + ${COMMON_TARGETS} + aarch64_be + armeb + hexagon + mipsn32 + mipsn32el + ppc64le + sparc32plus +" + +use_softmmu_targets=$(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS}) +use_user_targets=$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS}) +IUSE+=" ${use_softmmu_targets} ${use_user_targets}" + +RESTRICT="!test? ( test )" + +# Allow no targets to be built so that people can get a tools-only build. +# Block USE flag configurations known to not work. +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} + qemu_softmmu_targets_arm? ( fdt ) + qemu_softmmu_targets_microblaze? ( fdt ) + qemu_softmmu_targets_mips64el? ( fdt ) + qemu_softmmu_targets_ppc64? ( fdt ) + qemu_softmmu_targets_ppc? ( fdt ) + qemu_softmmu_targets_riscv32? ( fdt ) + qemu_softmmu_targets_riscv64? ( fdt ) + qemu_softmmu_targets_x86_64? ( fdt ) + sdl-image? ( sdl ) + static-user? ( !plugins ) + virgl? ( opengl ) + virtfs? ( xattr ) + vnc? ( gnutls ) + vte? ( gtk ) + multipath? ( udev ) + plugins? ( !static-user ) + xdp? ( bpf ) +" +for smname in ${IUSE_SOFTMMU_TARGETS} ; do + REQUIRED_USE+=" qemu_softmmu_targets_${smname}? ( kernel_linux? ( seccomp ) )" +done + +# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) +# and user/softmmu targets (qemu-*, qemu-system-*). +# +# Yep, you need both libcap and libcap-ng since virtfs only uses libcap. +# +# The attr lib isn't always linked in (although the USE flag is always +# respected). This is because qemu supports using the C library's API +# when available rather than always using the external library. +ALL_DEPEND=" + dev-libs/glib:2[static-libs(+)] + sys-libs/zlib[static-libs(+)] + python? ( ${PYTHON_DEPS} ) + systemtap? ( dev-debug/systemtap ) + xattr? ( sys-apps/attr[static-libs(+)] ) +" + +# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) +# softmmu targets (qemu-system-*). +SOFTMMU_TOOLS_DEPEND=" + >=x11-libs/pixman-0.28.0[static-libs(+)] + accessibility? ( + app-accessibility/brltty[api] + app-accessibility/brltty[static-libs(+)] + ) + aio? ( dev-libs/libaio[static-libs(+)] ) + alsa? ( >=media-libs/alsa-lib-1.0.13 ) + bpf? ( dev-libs/libbpf:= ) + bzip2? ( app-arch/bzip2[static-libs(+)] ) + capstone? ( dev-libs/capstone:=[static-libs(+)] ) + curl? ( >=net-misc/curl-7.15.4[static-libs(+)] ) + fdt? ( >=sys-apps/dtc-1.5.1[static-libs(+)] ) + fuse? ( >=sys-fs/fuse-3.1:3[static-libs(+)] ) + glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] ) + gnutls? ( + >=net-libs/gnutls-3.0:=[static-libs(+)] + dev-libs/nettle:=[static-libs(+)] + ) + gtk? ( + x11-libs/gtk+:3 + vte? ( x11-libs/vte:2.91 ) + ) + infiniband? ( sys-cluster/rdma-core[static-libs(+)] ) + iscsi? ( net-libs/libiscsi ) + io-uring? ( sys-libs/liburing:=[static-libs(+)] ) + jack? ( virtual/jack ) + jemalloc? ( dev-libs/jemalloc ) + jpeg? ( media-libs/libjpeg-turbo:=[static-libs(+)] ) + kernel_linux? ( sys-libs/libcap-ng[static-libs(+)] ) + keyutils? ( sys-apps/keyutils[static-libs(+)] ) + lzo? ( dev-libs/lzo:2[static-libs(+)] ) + multipath? ( sys-fs/multipath-tools ) + ncurses? ( + sys-libs/ncurses:=[unicode(+)] + sys-libs/ncurses:=[static-libs(+)] + ) + nfs? ( >=net-fs/libnfs-1.9.3:=[static-libs(+)] ) + numa? ( sys-process/numactl[static-libs(+)] ) + opengl? ( + virtual/opengl + media-libs/libepoxy[static-libs(+)] + media-libs/mesa[static-libs(+)] + media-libs/mesa[egl(+),gbm(+)] + ) + pam? ( sys-libs/pam ) + pipewire? ( >=media-video/pipewire-0.3.60 ) + png? ( >=media-libs/libpng-1.6.34:=[static-libs(+)] ) + pulseaudio? ( media-libs/libpulse ) + rbd? ( sys-cluster/ceph ) + sasl? ( dev-libs/cyrus-sasl[static-libs(+)] ) + sdl? ( + media-libs/libsdl2[video] + media-libs/libsdl2[static-libs(+)] + ) + sdl-image? ( media-libs/sdl2-image[static-libs(+)] ) + seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] ) + slirp? ( net-libs/libslirp[static-libs(+)] ) + smartcard? ( >=app-emulation/libcacard-2.5.0[static-libs(+)] ) + snappy? ( app-arch/snappy:= ) + spice? ( + >=app-emulation/spice-protocol-0.14.0 + >=app-emulation/spice-0.14.0[static-libs(+)] + ) + ssh? ( >=net-libs/libssh-0.8.6[static-libs(+)] ) + udev? ( virtual/libudev:= ) + usb? ( >=virtual/libusb-1-r2:1[static-libs(+)] ) + usbredir? ( >=sys-apps/usbredir-0.6[static-libs(+)] ) + vde? ( net-misc/vde[static-libs(+)] ) + virgl? ( media-libs/virglrenderer[static-libs(+)] ) + virtfs? ( sys-libs/libcap ) + xdp? ( net-libs/xdp-tools ) + xen? ( app-emulation/xen-tools:= ) + zstd? ( >=app-arch/zstd-1.4.0[static-libs(+)] ) +" + +EDK2_OVMF_VERSION="202202" +SEABIOS_VERSION="1.16.3" + +X86_FIRMWARE_DEPEND=" + pin-upstream-blobs? ( + ~sys-firmware/edk2-bin-${EDK2_OVMF_VERSION} + ~sys-firmware/ipxe-1.21.1[binary,qemu] + ~sys-firmware/seabios-bin-${SEABIOS_VERSION} + ~sys-firmware/sgabios-0.1_pre10[binary] + ) + !pin-upstream-blobs? ( + || ( + >=sys-firmware/edk2-${EDK2_OVMF_VERSION} + >=sys-firmware/edk2-bin-${EDK2_OVMF_VERSION} + ) + sys-firmware/ipxe[qemu] + || ( + >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + >=sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) + sys-firmware/sgabios + ) +" +PPC_FIRMWARE_DEPEND=" + pin-upstream-blobs? ( + ~sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) + !pin-upstream-blobs? ( + || ( + >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + >=sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) + ) +" + +# See bug #913084 for pip dep +BDEPEND=" + $(python_gen_impl_dep) + dev-lang/perl + >=dev-build/meson-0.63.0 + app-alternatives/ninja + virtual/pkgconfig + doc? ( + >=dev-python/sphinx-1.6.0[${PYTHON_USEDEP}] + dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}] + ) + gtk? ( nls? ( sys-devel/gettext ) ) + test? ( + dev-libs/glib[utils] + app-alternatives/bc + ) +" +CDEPEND=" + ${ALL_DEPEND//\[static-libs(+)]} + ${SOFTMMU_TOOLS_DEPEND//\[static-libs(+)]} + qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} ) + qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} ) + qemu_softmmu_targets_ppc? ( ${PPC_FIRMWARE_DEPEND} ) + qemu_softmmu_targets_ppc64? ( ${PPC_FIRMWARE_DEPEND} ) +" +DEPEND=" + ${CDEPEND} + kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 ) + static-user? ( ${ALL_DEPEND} ) +" +RDEPEND=" + ${CDEPEND} + acct-group/kvm + selinux? ( + sec-policy/selinux-qemu + sys-libs/libselinux + ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-9.0.0-disable-keymap.patch + "${FILESDIR}"/${PN}-9.2.0-capstone-include-path.patch + "${FILESDIR}"/${PN}-8.1.0-skip-tests.patch + "${FILESDIR}"/${PN}-8.1.0-find-sphinx.patch + "${FILESDIR}"/${PN}-7.2.16-optionrom-pass-Wl-no-error-rwx-segments.patch +) + +QA_PREBUILT=" + usr/share/qemu/hppa-firmware.img + usr/share/qemu/hppa-firmware64.img + usr/share/qemu/openbios-ppc + usr/share/qemu/openbios-sparc64 + usr/share/qemu/openbios-sparc32 + usr/share/qemu/opensbi-riscv64-generic-fw_dynamic.elf + usr/share/qemu/opensbi-riscv32-generic-fw_dynamic.elf + usr/share/qemu/palcode-clipper + usr/share/qemu/s390-ccw.img + usr/share/qemu/s390-netboot.img + usr/share/qemu/u-boot.e500 +" + +QA_WX_LOAD=" + usr/bin/qemu-i386 + usr/bin/qemu-x86_64 + usr/bin/qemu-alpha + usr/bin/qemu-arm + usr/bin/qemu-cris + usr/bin/qemu-m68k + usr/bin/qemu-microblaze + usr/bin/qemu-microblazeel + usr/bin/qemu-mips + usr/bin/qemu-mipsel + usr/bin/qemu-or1k + usr/bin/qemu-ppc + usr/bin/qemu-ppc64 + usr/bin/qemu-sh4 + usr/bin/qemu-sh4eb + usr/bin/qemu-sparc + usr/bin/qemu-sparc64 + usr/bin/qemu-armeb + usr/bin/qemu-sparc32plus + usr/bin/qemu-s390x + usr/bin/qemu-unicore32 +" + +DOC_CONTENTS="If you don't have kvm compiled into the kernel, make sure you have the +kernel module loaded before running kvm. The easiest way to ensure that the +kernel module is loaded is to load it on boot. + For AMD CPUs the module is called 'kvm-amd'. + For Intel CPUs the module is called 'kvm-intel'. +Please review /etc/conf.d/modules for how to load these. + +Make sure your user is in the 'kvm' group. Just run + $ gpasswd -a <USER> kvm +then have <USER> re-login. + +For brand new installs, the default permissions on /dev/kvm might not let +you access it. You can tell udev to reset ownership/perms: + $ udevadm trigger -c add /dev/kvm + +If you want to register binfmt handlers for qemu user targets: +For openrc: + # rc-update add qemu-binfmt +For systemd: + # ln -s /usr/share/qemu/binfmt.d/qemu.conf /etc/binfmt.d/qemu.conf" + +pkg_pretend() { + if use kernel_linux && kernel_is lt 2 6 25; then + eerror "This version of KVM requires a host kernel of 2.6.25 or higher." + elif use kernel_linux; then + if ! linux_config_exists; then + eerror "Unable to check your kernel for KVM support" + else + CONFIG_CHECK="~KVM ~TUN ~BRIDGE" + ERROR_KVM="You must enable KVM in your kernel to continue" + ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in" + ERROR_KVM_AMD+=" your kernel configuration." + ERROR_KVM_INTEL="If you have an Intel CPU, you must enable" + ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration." + ERROR_TUN="You will need the Universal TUN/TAP driver compiled" + ERROR_TUN+=" into your kernel or loaded as a module to use the" + ERROR_TUN+=" virtual network device if using -net tap." + ERROR_BRIDGE="You will also need support for 802.1d" + ERROR_BRIDGE+=" Ethernet Bridging for some network configurations." + use vhost-net && CONFIG_CHECK+=" ~VHOST_NET" + ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net" + ERROR_VHOST_NET+=" support" + use test && CONFIG_CHECK+=" IP_MULTICAST" + ERROR_IP_MULTICAST="Test suite requires IP_MULTICAST" + + if use amd64 || use x86 || use amd64-linux || use x86-linux; then + if grep -q AuthenticAMD /proc/cpuinfo; then + CONFIG_CHECK+=" ~KVM_AMD" + elif grep -q GenuineIntel /proc/cpuinfo; then + CONFIG_CHECK+=" ~KVM_INTEL" + fi + fi + + use python && CONFIG_CHECK+=" ~DEBUG_FS" + ERROR_DEBUG_FS="debugFS support required for kvm_stat" + + # Now do the actual checks setup above + check_extra_config + fi + fi + + if grep -qs '/usr/bin/qemu-kvm' "${EROOT}"/etc/libvirt/qemu/*.xml; then + eerror "The kvm/qemu-kvm wrappers no longer exist, but your libvirt" + eerror "instances are still pointing to it. Please update your" + eerror "configs in /etc/libvirt/qemu/ to use the -enable-kvm flag" + eerror "and the right system binary (e.g. qemu-system-x86_64)." + die "update your virt configs to not use qemu-kvm" + fi +} + +# Sanity check to make sure target lists are kept up-to-date. +check_targets() { + local var=$1 mak=$2 + local detected sorted + + pushd "${S}"/configs/targets/ >/dev/null || die + + # Force C locale until glibc is updated. #564936 + detected=$(echo $(printf '%s\n' *-${mak}.mak | sed "s:-${mak}.mak::" | LC_COLLATE=C sort -u)) + sorted=$(echo $(printf '%s\n' ${!var} | LC_COLLATE=C sort -u)) + if [[ ${sorted} != "${detected}" ]] ; then + eerror "The ebuild needs to be kept in sync." + eerror "${var}: ${sorted}" + eerror "$(printf '%-*s' ${#var} configure): ${detected}" + die "sync ${var} to the list of targets" + fi + + popd >/dev/null +} + +src_unpack() { + if [[ ${PV} == 9999 ]] ; then + git-r3_src_unpack + for file in ${A}; do + unpack "${file}" + done + cd "${WORKDIR}" || die + for proj in "${!SUBPROJECTS[@]}"; do + mv "${proj}-${SUBPROJECTS[${proj}]}" "${S}/subprojects/${proj}" || die + done + cd "${S}" || die + meson subprojects packagefiles --apply || die + else + default + fi +} + +src_prepare() { + check_targets IUSE_SOFTMMU_TARGETS softmmu + check_targets IUSE_USER_TARGETS linux-user + + default + + # Use correct toolchain to fix cross-compiling + tc-export AR AS LD NM OBJCOPY PKG_CONFIG RANLIB STRINGS + export WINDRES=${CHOST}-windres + + # Workaround for bug #938302 + if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then + cat >> "${S}"/configs/meson/linux.txt <<-EOF || die + [binaries] + dtrace='stap-dtrace' + EOF + fi + + # Verbose builds + MAKEOPTS+=" V=1" + + # Remove bundled modules + rm -r roms/*/ || die +} + +## +# configures qemu based on the build directory and the build type +# we are using. +# +qemu_src_configure() { + debug-print-function ${FUNCNAME} "$@" + + local buildtype=$1 + local builddir="${S}/${buildtype}-build" + + mkdir "${builddir}" || die + + local conf_opts=( + --prefix=/usr + --sysconfdir=/etc + --bindir=/usr/bin + --libdir=/usr/$(get_libdir) + --datadir=/usr/share + --docdir=/usr/share/doc/${PF}/html + --mandir=/usr/share/man + --localstatedir=/var + --disable-bsd-user + --disable-containers # bug #732972 + --disable-guest-agent + --disable-strip + --disable-download + --python="${PYTHON}" + + # bug #746752: TCG interpreter has a few limitations: + # - it does not support FPU + # - it's generally slower on non-self-modifying code + # It's advantage is support for host architectures + # where native codegeneration is not implemented. + # Gentoo has qemu keyworded only on targets with + # native code generation available. Avoid the interpreter. + --disable-tcg-interpreter + + --disable-werror + # We support gnutls/nettle for crypto operations. It is possible + # to use gcrypt when gnutls/nettle are disabled (but not when they + # are enabled), but it's not really worth the hassle. Disable it + # all the time to avoid automatically detecting it. #568856 + --disable-gcrypt + --cc="$(tc-getCC)" + --cxx="$(tc-getCXX)" + --objcc="$(tc-getCC)" + --host-cc="$(tc-getBUILD_CC)" + + $(use_enable alsa) + $(use_enable debug debug-info) + $(use_enable debug debug-tcg) + $(use_enable jack) + $(use_enable nls gettext) + $(use_enable oss) + $(use_enable pipewire) + $(use_enable plugins) + $(use_enable pulseaudio pa) + $(use_enable selinux) + $(use_enable xattr attr) + ) + + # Disable options not used by user targets. This simplifies building + # static user targets (USE=static-user) considerably. + conf_notuser() { + if [[ ${buildtype} == "user" ]] ; then + echo "--disable-${2:-$1}" + else + use_enable "$@" + fi + } + # Enable option only for softmmu build, but not 'user' or 'tools' + conf_softmmu() { + if [[ ${buildtype} == "softmmu" ]] ; then + use_enable "$@" + else + echo "--disable-${2:-$1}" + fi + } + # Enable option only for tools build, but not 'user' or 'softmmu' + conf_tools() { + if [[ ${buildtype} == "tools" ]] ; then + use_enable "$@" + else + echo "--disable-${2:-$1}" + fi + } + # Special case for the malloc flag, because the --disable flag does + # not exist and trying like above will break configuring. + conf_malloc() { + if [[ ! ${buildtype} == "user" ]] ; then + usex "${1}" "--enable-malloc=${1}" "" + fi + } + conf_opts+=( + $(conf_notuser accessibility brlapi) + $(conf_notuser aio linux-aio) + $(conf_softmmu bpf) + $(conf_notuser bzip2) + $(conf_notuser capstone) + $(conf_notuser curl) + $(conf_tools doc docs) + $(conf_notuser fdt) + $(conf_notuser fuse) + $(conf_notuser glusterfs) + $(conf_notuser gnutls) + $(conf_notuser gnutls nettle) + $(conf_notuser gtk) + $(conf_notuser infiniband rdma) + $(conf_notuser iscsi libiscsi) + $(conf_notuser io-uring linux-io-uring) + $(conf_malloc jemalloc) + $(conf_notuser jpeg vnc-jpeg) + $(conf_notuser kernel_linux kvm) + $(conf_notuser keyutils libkeyutils) + $(conf_notuser lzo) + $(conf_notuser multipath mpath) + $(conf_notuser ncurses curses) + $(conf_notuser nfs libnfs) + $(conf_notuser numa) + $(conf_notuser opengl) + $(conf_notuser pam auth-pam) + $(conf_notuser png) + $(conf_notuser rbd) + $(conf_notuser sasl vnc-sasl) + $(conf_notuser sdl) + $(conf_softmmu sdl-image) + $(conf_notuser seccomp) + $(conf_notuser slirp) + $(conf_notuser smartcard) + $(conf_notuser snappy) + $(conf_notuser spice) + $(conf_notuser ssh libssh) + $(conf_notuser udev libudev) + $(conf_notuser usb libusb) + $(conf_notuser usbredir usb-redir) + $(conf_notuser vde) + $(conf_notuser vhost-net) + $(conf_notuser virgl virglrenderer) + $(conf_softmmu virtfs) + $(conf_notuser vnc) + $(conf_notuser vte) + $(conf_softmmu xdp af-xdp) + $(conf_notuser xen) + $(conf_notuser xen xen-pci-passthrough) + # use prebuilt keymaps, bug #759604 + --disable-xkbcommon + $(conf_notuser zstd) + ) + + if [[ ! ${buildtype} == "user" ]] ; then + # audio options + local audio_opts=( + # Note: backend order matters here: #716202 + # We iterate from higher-level to lower level. + $(usex pulseaudio pa "") + $(usev pipewire) + $(usev jack) + $(usev sdl) + $(usev alsa) + $(usev oss) + ) + conf_opts+=( + --audio-drv-list=$(IFS=,; echo "${audio_opts[*]}") + ) + fi + + case ${buildtype} in + user) + conf_opts+=( + --enable-linux-user + --disable-system + --disable-tools + --disable-cap-ng + --disable-seccomp + ) + local static_flag="static-user" + ;; + softmmu) + conf_opts+=( + --disable-linux-user + --enable-system + --disable-tools + --enable-cap-ng + --enable-seccomp + --disable-libcbor + ) + local static_flag="none" + ;; + tools) + conf_opts+=( + --disable-linux-user + --disable-system + --enable-tools + --enable-cap-ng + ) + local static_flag="none" + ;; + esac + + local targets="${buildtype}_targets" + [[ -n ${targets} ]] && conf_opts+=( --target-list="${!targets}" ) + + # Add support for SystemTap + use systemtap && conf_opts+=( --enable-trace-backends="dtrace" ) + + # We always want to attempt to build with PIE support as it results + # in a more secure binary. But it doesn't work with static or if + # the current GCC doesn't have PIE support. + if [[ ${static_flag} != "none" ]] && use ${static_flag}; then + conf_opts+=( --static --disable-pie ) + else + tc-enables-pie && conf_opts+=( --enable-pie ) + fi + + # Meson will not use a cross-file unless cross_prefix is set. + tc-is-cross-compiler && conf_opts+=( --cross-prefix="${CHOST}-" ) + + # Plumb through equivalent of EXTRA_ECONF to allow experiments + # like bug #747928. + conf_opts+=( ${EXTRA_CONF_QEMU} ) + + echo "../configure ${conf_opts[*]}" + cd "${builddir}" + ../configure "${conf_opts[@]}" || die "configure failed" +} + +src_configure() { + local target + + python_setup + + softmmu_targets= softmmu_bins=() + user_targets= user_bins=() + + for target in ${IUSE_SOFTMMU_TARGETS} ; do + if use "qemu_softmmu_targets_${target}"; then + softmmu_targets+=",${target}-softmmu" + softmmu_bins+=( "qemu-system-${target}" ) + fi + done + + for target in ${IUSE_USER_TARGETS} ; do + if use "qemu_user_targets_${target}"; then + user_targets+=",${target}-linux-user" + user_bins+=( "qemu-${target}" ) + fi + done + + softmmu_targets=${softmmu_targets#,} + user_targets=${user_targets#,} + + [[ -n ${softmmu_targets} ]] && qemu_src_configure "softmmu" + [[ -n ${user_targets} ]] && qemu_src_configure "user" + qemu_src_configure "tools" +} + +src_compile() { + if [[ -n ${user_targets} ]]; then + cd "${S}/user-build" || die + default + fi + + if [[ -n ${softmmu_targets} ]]; then + cd "${S}/softmmu-build" || die + default + fi + + cd "${S}/tools-build" || die + default +} + +src_test() { + if [[ -n ${softmmu_targets} ]]; then + cd "${S}/softmmu-build" || die + pax-mark m */qemu-system-* #515550 + emake check + fi +} + +qemu_python_install() { + python_domodule "${S}/python/qemu" + + python_doscript "${S}/scripts/kvm/vmxcap" + python_doscript "${S}/scripts/qmp/qmp-shell" + python_doscript "${S}/scripts/qmp/qemu-ga-client" +} + +# Generate binfmt support files. +# - /etc/init.d/qemu-binfmt script which registers the user handlers (openrc) +# - /usr/share/qemu/binfmt.d/qemu.conf (for use with systemd-binfmt) +generate_initd() { + local out="${T}/qemu-binfmt" + local out_systemd="${T}/qemu.conf" + local d="${T}/binfmt.d" + + einfo "Generating qemu binfmt scripts and configuration files" + + # Generate the debian fragments first. + mkdir -p "${d}" + "${S}"/scripts/qemu-binfmt-conf.sh \ + --debian \ + --exportdir "${d}" \ + --qemu-path "${EPREFIX}/usr/bin" \ + || die + # Then turn the fragments into a shell script we can source. + sed -E -i \ + -e 's:^([^ ]+) (.*)$:\1="\2":' \ + "${d}"/* || die + + # Generate the init.d script by assembling the fragments from above. + local f qcpu package interpreter magic mask + cat "${FILESDIR}"/qemu-binfmt.initd.head >"${out}" || die + for f in "${d}"/qemu-* ; do + source "${f}" + + # Normalize the cpu logic like we do in the init.d for the native cpu. + qcpu=${package#qemu-} + case ${qcpu} in + arm*) qcpu="arm";; + mips*) qcpu="mips";; + ppc*) qcpu="ppc";; + s390*) qcpu="s390";; + sh*) qcpu="sh";; + sparc*) qcpu="sparc";; + esac + + # we use 'printf' here to be portable across 'sh' + # implementations: #679168 + cat <<EOF >>"${out}" + if [ "\${cpu}" != "${qcpu}" -a -x "${interpreter}" ] ; then + printf '%s\n' ':${package}:M::${magic}:${mask}:${interpreter}:'"\${QEMU_BINFMT_FLAGS}" >/proc/sys/fs/binfmt_misc/register + fi +EOF + + echo ":${package}:M::${magic}:${mask}:${interpreter}:OC" >>"${out_systemd}" + + done + cat "${FILESDIR}"/qemu-binfmt.initd.tail >>"${out}" || die +} + +src_install() { + if [[ -n ${user_targets} ]]; then + cd "${S}/user-build" + emake DESTDIR="${ED}" install + + # Install binfmt handler init script for user targets. + generate_initd + doinitd "${T}/qemu-binfmt" + + # Install binfmt/qemu.conf. + insinto "/usr/share/qemu/binfmt.d" + doins "${T}/qemu.conf" + fi + + if [[ -n ${softmmu_targets} ]]; then + cd "${S}/softmmu-build" + emake DESTDIR="${ED}" install + + # This might not exist if the test failed. #512010 + [[ -e check-report.html ]] && dodoc check-report.html + + if use kernel_linux; then + udev_newrules "${FILESDIR}"/65-kvm.rules-r2 65-kvm.rules + fi + + if use python; then + python_foreach_impl qemu_python_install + fi + fi + + cd "${S}/tools-build" || die + emake DESTDIR="${ED}" install + + # If USE=doc, there'll be newly generated docs which we install instead. + if ! use doc && [[ ${QEMU_DOCS_PREBUILT} == 1 ]] ; then + doman "${WORKDIR}"/${PN}-${QEMU_DOCS_VERSION}-docs/docs/*.[0-8] + fi + + # Disable mprotect on the qemu binaries as they use JITs to be fast #459348 + pushd "${ED}"/usr/bin >/dev/null || die + pax-mark mr "${softmmu_bins[@]}" "${user_bins[@]}" # bug 575594 + popd >/dev/null || die + + # Install config file example for qemu-bridge-helper + insinto "/etc/qemu" + doins "${FILESDIR}/bridge.conf" + + cd "${S}" || die + dodoc MAINTAINERS + newdoc pc-bios/README README.pc-bios + + # Disallow stripping of prebuilt firmware files. + dostrip -x ${QA_PREBUILT} + + if [[ -n ${softmmu_targets} ]]; then + # Remove SeaBIOS since we're using the SeaBIOS packaged one + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then + dosym ../seabios/bios-256k.bin /usr/share/qemu/bios-256k.bin + fi + + # Remove vgabios since we're using the seavgabios packaged one + rm "${ED}/usr/share/qemu/vgabios.bin" + rm "${ED}/usr/share/qemu/vgabios-cirrus.bin" + rm "${ED}/usr/share/qemu/vgabios-qxl.bin" + rm "${ED}/usr/share/qemu/vgabios-stdvga.bin" + rm "${ED}/usr/share/qemu/vgabios-virtio.bin" + rm "${ED}/usr/share/qemu/vgabios-vmware.bin" + + # PPC/PPC64 loads vgabios-stdvga + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 || use qemu_softmmu_targets_ppc || use qemu_softmmu_targets_ppc64; then + dosym ../seavgabios/vgabios-isavga.bin /usr/share/qemu/vgabios.bin + dosym ../seavgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin + dosym ../seavgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin + dosym ../seavgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin + dosym ../seavgabios/vgabios-virtio.bin /usr/share/qemu/vgabios-virtio.bin + dosym ../seavgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin + fi + + # Remove sgabios since we're using the sgabios packaged one + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then + dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin + fi + + # Remove iPXE since we're using the iPXE packaged one + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then + dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom + dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom + dosym ../ipxe/10500940.rom /usr/share/qemu/pxe-ne2k_pci.rom + dosym ../ipxe/10222000.rom /usr/share/qemu/pxe-pcnet.rom + dosym ../ipxe/10ec8139.rom /usr/share/qemu/pxe-rtl8139.rom + dosym ../ipxe/1af41000.rom /usr/share/qemu/pxe-virtio.rom + fi + fi + + DISABLE_AUTOFORMATTING=true + readme.gentoo_create_doc +} + +pkg_postinst() { + if [[ -n ${softmmu_targets} ]] && use kernel_linux; then + udev_reload + fi + + xdg_icon_cache_update + + [[ -z ${EPREFIX} ]] && [[ -f ${EROOT}/usr/libexec/qemu-bridge-helper ]] && \ + fcaps cap_net_admin "${EROOT}"/usr/libexec/qemu-bridge-helper + + DISABLE_AUTOFORMATTING=true + readme.gentoo_print_elog + + if use pin-upstream-blobs && ver_replacing -lt ${FIRMWARE_ABI_VERSION}; then + ewarn "This version of qemu pins new versions of firmware blobs:" + + if has_version 'sys-firmware/edk2-bin'; then + ewarn " $(best_version sys-firmware/edk2-bin)" + else + ewarn " $(best_version sys-firmware/edk2)" + fi + + if has_version 'sys-firmware/seabios-bin'; then + ewarn " $(best_version sys-firmware/seabios-bin)" + else + ewarn " $(best_version sys-firmware/seabios)" + fi + + ewarn " $(best_version sys-firmware/ipxe)" + ewarn " $(best_version sys-firmware/sgabios)" + ewarn "This might break resume of hibernated guests (started with a different" + ewarn "firmware version) and live migration to/from qemu versions with different" + ewarn "firmware. Please (cold) restart all running guests. For functional" + ewarn "guest migration ensure that all" + ewarn "hosts run at least" + ewarn " app-emulation/qemu-${FIRMWARE_ABI_VERSION}." + fi +} + +pkg_info() { + echo "Using:" + echo " $(best_version app-emulation/spice-protocol)" + + if has_version 'sys-firmware/edk2-bin'; then + echo " $(best_version sys-firmware/edk2-bin)" + else + echo " $(best_version sys-firmware/edk2)" + fi + + if has_version 'sys-firmware/seabios-bin'; then + echo " $(best_version sys-firmware/seabios-bin)" + else + echo " $(best_version sys-firmware/seabios)" + fi + + echo " $(best_version sys-firmware/ipxe)" + echo " $(best_version sys-firmware/sgabios)" +} + +pkg_postrm() { + xdg_icon_cache_update + udev_reload +} diff --git a/app-emulation/wine-staging/Manifest b/app-emulation/wine-staging/Manifest index 5b8e43e5adfd..fc5f0a7377cc 100644 --- a/app-emulation/wine-staging/Manifest +++ b/app-emulation/wine-staging/Manifest @@ -3,22 +3,19 @@ AUX wine-staging-7.17-noexecstack.patch 223 BLAKE2B 6e6cfc208f11c2c2b7bbc392e370 AUX wine-staging-7.20-unwind.patch 1450 BLAKE2B 80e9222c95393aaa4b95e05597a4181030fc988d95e416d2f92631f29f640b9abb3dd0853d005de4725b41c09224e478741902075259d48a30830a923790579f SHA512 e1a72f1463be32975daa02064acb96189cd79cb41ff98f89b58e46c97100a3ac46405b1b9982378c9de275acbdb74168853e47b932e06398cdd2981b23f483ce AUX wine-staging-8.13-rpath.patch 554 BLAKE2B 209d8c581a9178242ee622338c5252f79b798cf5574f72b3984d71b7933e011b488060502715aa75630fbc3d10fcb03743ac31ed31664cacfc22b725253a117b SHA512 bbb25e02d19bd7c1a1f2d7db331d93cfcd5ce9172206ad9e19a44c52e5ece865d474eac024c2a5791dfa006c6efe0f68cd783ffc925ac793bf447d56090bdd02 DIST wine-10.0.tar.xz 32011244 BLAKE2B 92178cf484cf33e9f3b8340429ee8e68c36e0d25eee4a892f059ab73f103cfcb9eb15e1883bc9fd8c8fe311d4ccbb56582d1f780da7b1406a7839a13addd29ae SHA512 effb41c5641993e2e52eaa825cc19b7d9846e084992c5a5b066ead2339b24384d320898a9cee347a9a87106bcb3b0f54c8cd2c8d4de3a887a658052ddd5168d6 -DIST wine-10.1.tar.xz 32026152 BLAKE2B 573c4cc10c96c164eb02111b0a457be5500ab42c6d103180af5b2f88cdbcc134ea1fdb794687e6c736ebb5f9aa266e51424df26cd239fa26679d968ab5844cc3 SHA512 2dbc63e43e2cc1e0bf6294a926e8afc316e9f32efdce644229cb33bba98f6001c3f285b527767a83e5284558ef11f00515048aad031c6fc9122a4ce0692952af -DIST wine-10.2.tar.xz 32050716 BLAKE2B 78a60d82640c9ffdf8a96b58aaa8a86cce0f67d48dc082e97a2bfaf077f849b99fa7d5418a42d2f18176afedd9a7270a08ca872af5c43c10fd64fe1eddf7cfdf SHA512 893395e29d72898579850c4084838c76b8a53659b4a3917e47d853733fafaa0e57bfde31437862955cdfab94327622eb290488d6120d76eeb2a4fa70dff5ef67 DIST wine-10.3.tar.xz 32280996 BLAKE2B 49e3e1d4da74a647c01b3326b2d79ac102fa67b43cd3134e8ca66696003ee9f1a5835b093896d8b8e4ff1fd2c229db8c004fdcfec79fbc0d559985094374a4e1 SHA512 361edb93f062f44592b55ba298d1e2b49857bf067791cc92424c812412aff93955dcb7726e3f87fd304f3e567693b547fa5a149b58990c914f91c585fede2716 DIST wine-10.4.tar.xz 32326532 BLAKE2B f51bee9115f236d13be717f524bfb21d4aa3bd3bc4114d8fe9f106957e01f57e14bdd415e6cc494e6860244d43fd906d69e17055822954490ae6e7562e562e6c SHA512 e1f2bf5bd021fe9937cb27e1ee3ce0e5ff06a32abe3d1e07eb6083f5dcdfcd84e5b4d631dd1a83686dd7a42a1b84eec848ec08a256c2570a709d830ce7f7208a +DIST wine-10.5.tar.xz 32353760 BLAKE2B a8551905f63ec7806a89986bfdb73b1f171b74f604bd00d9815cf8efe457268b99655b12d0d8d9aa19e08a6566aa4f20ddfc6b4549f4eb81abc49a61d195d444 SHA512 d923e4406665721e1fb6db53cd4199b513b49f9f3a6825327635a2fa169d992067408b8958f749d05d59f66f32bfe418dabb73768fb97a5501c90d1bc0cb7c50 DIST wine-9.0.tar.xz 30007216 BLAKE2B cf53177201a2f7eeb35d0d8ce220f80808d979099a928ad60652d1dee92620c433cc105dffab4e9309f41766087ad1544ef49d2922538bb420d62f6dd64117a1 SHA512 838daf2c4581f83f8573b988036f517d57b84894b090a2a17433255d6d044dfa880e6724cdb83082a36c333df9d2083ab68ae53927622a620edd59f33462ada4 DIST wine-staging-10.0.tar.gz 9490601 BLAKE2B 2843d6fbeca285a258dbb7505e2451d183b175a9d0b95a03551d635ca8a81c5ba5702d634f45be8d8574435a0fc77b84ca289350e4e74e97b9d5c7b1b8706fbe SHA512 1340473c0ede35450d9cb91bdca2fb237dd2c19e7cde7a05f3c2c70b741f4321e54a1cc4042a48dc83e07dc6967c904fae6c22233ce28fbc6dfa836cef281250 -DIST wine-staging-10.1.tar.gz 9542987 BLAKE2B d23934dd7da9f324935087ad7cff74e544bc8191e3570a125e468c18a170459135ef37cce3780f4625c8b4e330c5bf3f32c59d1cd034a465def3ec60c7efa65c SHA512 1b837a2b0c417dcf1821139b0cf220995305b22e59cc5d93b5055d4c6dc9c36da7b05f6a9f136b5f1a60618e497c0e4d295343880504f7ebb1e9fafeb2f0b38a -DIST wine-staging-10.2.tar.gz 9386579 BLAKE2B 2a6346a3091bc187cb6ecacb5bff28975cf1e0343254b83cb6fcb907eb0f2f418838e29b7093f4e1683f4402f3a8278fd58465b92f4f83a20e4962faa9a55a6a SHA512 e5ef197786c8dd50f21d000a19ec3c9acff6d93fcf975f3539e5fe54a951e31bbe97b882ce8f8b00f35757c85ffe377c966bb7b95b6cfb8e25d95ca9f2bc5e10 DIST wine-staging-10.3.tar.gz 9417555 BLAKE2B 535dc17d7bd0880a07b119287e58c921d6a51472ea71d87e5deea2673bb11cd2abefdedca3480817d7603296e58f9e80b0c588374572f6e9d18c82fe98fc5515 SHA512 e767f3c1ed49eec5e0522bc7c8f02d97c3e8fdac2003e4833b27d58eb8347c65663ce4a081705142cff8ae0e5326196a36fe9b545a9fb8359994c94cc39a466a DIST wine-staging-10.4.tar.gz 9476104 BLAKE2B 6d34e553ae81bcd496b6fbb8ebcdd1c35501cf8fb8d0860766a6b89612d47fb3e4a9cd5f1d43f38627f6293274bcee20166b8df36ea2d4e24851038bfe37e113 SHA512 3b0580baeb5dd7a5a224a2977fd6693795d7a86d7692b1707eba8bc9f849057a88566aa45bacbb5ded609ede3b0196c68116b368a527d695cafda1ac4ebef3cf +DIST wine-staging-10.5.tar.gz 9483907 BLAKE2B 82fa1c199d208036b28e23b79f18045d1f856379314144fd96c3901d99a94b0813832dfe2a53dd3f352489c271d92d8491f5b28dacd33747b1d86806be89d3cb SHA512 f4f0b53093024043e3f63da4a4b5568d5eb33cdf8e4db8aa71c43a6e3cd534822c9ba7b4af19b52069f8049a47df53058a0dcc07b26f4f60162c3e0dbb4d4e20 DIST wine-staging-9.0.tar.gz 9577631 BLAKE2B 0012978f54c618e73d407dd49dccff02853912d0c015098889802518e8c51b280f5d60e11291335dafc68944ee01cbcb7fd6c5825ef10ae1520c7b82d9846718 SHA512 362209fcadcf029152b681c76beb231d0cc8de1609b994094f1dc88ab871fddda08b3d8c2fe36ceb38909a9d634c1ade864ca0f28a6a7715ec286a8b2884981f EBUILD wine-staging-10.0.ebuild 15733 BLAKE2B d6be4c6972952e010bdf73f222f3bc7d3f12ef30afc5207813f7f80ddbcd4d51f207ac9001a65cd631011dd9122262124b60a456ab404fa6ca787f538064a99a SHA512 6f46e260620932b1fd59cafcf406963e447230416d1cd82606bd7baed5e67688d0e7f487fe0df3261df60a548ae6df46ac4f4f8d342115d38f32015e4a0cd34d -EBUILD wine-staging-10.1.ebuild 15733 BLAKE2B d6be4c6972952e010bdf73f222f3bc7d3f12ef30afc5207813f7f80ddbcd4d51f207ac9001a65cd631011dd9122262124b60a456ab404fa6ca787f538064a99a SHA512 6f46e260620932b1fd59cafcf406963e447230416d1cd82606bd7baed5e67688d0e7f487fe0df3261df60a548ae6df46ac4f4f8d342115d38f32015e4a0cd34d -EBUILD wine-staging-10.2.ebuild 15038 BLAKE2B cb8cf1bfe03760dbdf92a26bd96a822460ce7e3f63ca5eac2f94bdd5469c78cc0b5af7eab3952cb2a8929e21d2476d1091ce6db115443984604a24085115c4da SHA512 4559680f35c1f333e4c3b1a78156b26c497a82a1162422ad485c3eb51c3d875da00114bb4ae96b2c411ae5bed12108486c8480f7f417132139ff50358461f063 EBUILD wine-staging-10.3.ebuild 15072 BLAKE2B a831a394db07824df28a797026c1440fe1670da2f1680500c41146ed4c0a01fa0830626f06a1965eacf926371e262d44bab57d7097624ce754293d139982f54a SHA512 7160d214a90eeb5dafc41a61b4bdd4ff2fa83aca47d33d5c6e6d3f1d306ea5c0f8ae93ab6325a913a8cc4c288b90d7de0d423961122d0a17e90727ec6ddc373a EBUILD wine-staging-10.4.ebuild 15072 BLAKE2B a831a394db07824df28a797026c1440fe1670da2f1680500c41146ed4c0a01fa0830626f06a1965eacf926371e262d44bab57d7097624ce754293d139982f54a SHA512 7160d214a90eeb5dafc41a61b4bdd4ff2fa83aca47d33d5c6e6d3f1d306ea5c0f8ae93ab6325a913a8cc4c288b90d7de0d423961122d0a17e90727ec6ddc373a +EBUILD wine-staging-10.5.ebuild 15247 BLAKE2B a44cbc6a4544798bed9f4875607fea9910f59d2c68af2b5193554862c2ac0acbff8ed3ce0f8623e10fc5d4624825eafa99d1b28dcf87bb4b806982da075f4a41 SHA512 22f983df8e08436c743b2c4ba6f6bfe6763f68a20bdc7d9dbeda9efd9f87f2a13faa4b53240c18d0892395f8163cc5d87a1f704fc7721727ccb65eae018d1a5c EBUILD wine-staging-9.0.ebuild 15938 BLAKE2B 54dca02aa0f97e101b83f982136e5f2af432a3e2393c0a2948d2054990c0919d91c091512a92406ead1bc644b0e786d911b70b1722f488b9540349a114eae7cb SHA512 0a81f20d234ae18a9a4cef65f65263da5af0572366bd4a7cdf9ba66631a5bb022dd05f5d7c14dfee7b9e0a3a05edc481f43cb8bf58941147687db8be4a50581a EBUILD wine-staging-9999.ebuild 15247 BLAKE2B a44cbc6a4544798bed9f4875607fea9910f59d2c68af2b5193554862c2ac0acbff8ed3ce0f8623e10fc5d4624825eafa99d1b28dcf87bb4b806982da075f4a41 SHA512 22f983df8e08436c743b2c4ba6f6bfe6763f68a20bdc7d9dbeda9efd9f87f2a13faa4b53240c18d0892395f8163cc5d87a1f704fc7721727ccb65eae018d1a5c MISC metadata.xml 2633 BLAKE2B 9e8d90c3e1057c2087150657a6cb7e33609d981b11a8a490bf9479c85e9759b32dfb0d4d3179e1cd04192f6949c083d21097eac5ac47e7e38e9fd252b1df5133 SHA512 3f4df059fe41f12b5cbe8f5a5596646bae991860dad281572dcf4cb74596446bcea50d274418c6b2640d4e2a1818e9f14c784596ab3ceff8a7fa2551839371cd diff --git a/app-emulation/wine-staging/wine-staging-10.1.ebuild b/app-emulation/wine-staging/wine-staging-10.1.ebuild deleted file mode 100644 index 123f2df0684d..000000000000 --- a/app-emulation/wine-staging/wine-staging-10.1.ebuild +++ /dev/null @@ -1,485 +0,0 @@ -# Copyright 2022-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -MULTILIB_COMPAT=( abi_x86_{32,64} ) -PYTHON_COMPAT=( python3_{10..13} ) -inherit autotools edo flag-o-matic multilib multilib-build optfeature -inherit prefix python-any-r1 toolchain-funcs wrapper - -WINE_GECKO=2.47.4 -WINE_MONO=9.4.0 -WINE_P=wine-$(ver_cut 1-2) - -if [[ ${PV} == *9999 ]]; then - inherit git-r3 - EGIT_REPO_URI="https://gitlab.winehq.org/wine/wine-staging.git" - WINE_EGIT_REPO_URI="https://gitlab.winehq.org/wine/wine.git" -else - (( $(ver_cut 2) )) && WINE_SDIR=$(ver_cut 1).x || WINE_SDIR=$(ver_cut 1).0 - SRC_URI=" - https://dl.winehq.org/wine/source/${WINE_SDIR}/${WINE_P}.tar.xz - https://github.com/wine-staging/wine-staging/archive/v${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="-* ~amd64 ~x86" -fi - -DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset" -HOMEPAGE=" - https://wiki.winehq.org/Wine-Staging - https://gitlab.winehq.org/wine/wine-staging/ -" - -S="${WORKDIR}/${WINE_P}" - -LICENSE="LGPL-2.1+ BSD BSD-2 IJG MIT OPENLDAP ZLIB gsm libpng2 libtiff" -SLOT="${PV}" -IUSE=" - +X +abi_x86_32 +abi_x86_64 +alsa capi crossdev-mingw cups +dbus dos - llvm-libunwind custom-cflags ffmpeg +fontconfig +gecko gphoto2 - +gstreamer kerberos +mingw +mono netapi nls odbc opencl +opengl - pcap perl pulseaudio samba scanner +sdl selinux smartcard +ssl - +strip +truetype udev +unwind usb v4l +vulkan wayland wow64 - +xcomposite xinerama -" -# bug #551124 for truetype -# TODO: wow64 can be done without mingw if using clang (needs bug #912237) -REQUIRED_USE=" - X? ( truetype ) - crossdev-mingw? ( mingw ) - wow64? ( abi_x86_64 !abi_x86_32 mingw ) -" - -# tests are non-trivial to run, can hang easily, don't play well with -# sandbox, and several need real opengl/vulkan or network access -RESTRICT="test" - -# `grep WINE_CHECK_SONAME configure.ac` + if not directly linked -WINE_DLOPEN_DEPEND=" - X? ( - x11-libs/libXcursor[${MULTILIB_USEDEP}] - x11-libs/libXfixes[${MULTILIB_USEDEP}] - x11-libs/libXi[${MULTILIB_USEDEP}] - x11-libs/libXrandr[${MULTILIB_USEDEP}] - x11-libs/libXrender[${MULTILIB_USEDEP}] - x11-libs/libXxf86vm[${MULTILIB_USEDEP}] - opengl? ( media-libs/libglvnd[X,${MULTILIB_USEDEP}] ) - xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) - ) - cups? ( net-print/cups[${MULTILIB_USEDEP}] ) - dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) - fontconfig? ( media-libs/fontconfig[${MULTILIB_USEDEP}] ) - kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] ) - netapi? ( net-fs/samba[${MULTILIB_USEDEP}] ) - odbc? ( dev-db/unixODBC[${MULTILIB_USEDEP}] ) - sdl? ( media-libs/libsdl2[haptic,joystick,${MULTILIB_USEDEP}] ) - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) - truetype? ( media-libs/freetype[${MULTILIB_USEDEP}] ) - v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) - vulkan? ( media-libs/vulkan-loader[X?,wayland?,${MULTILIB_USEDEP}] ) -" -WINE_COMMON_DEPEND=" - ${WINE_DLOPEN_DEPEND} - X? ( - x11-libs/libX11[${MULTILIB_USEDEP}] - x11-libs/libXext[${MULTILIB_USEDEP}] - ) - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) - capi? ( net-libs/libcapi:=[${MULTILIB_USEDEP}] ) - ffmpeg? ( media-video/ffmpeg:=[${MULTILIB_USEDEP}] ) - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) - gstreamer? ( - dev-libs/glib:2[${MULTILIB_USEDEP}] - media-libs/gst-plugins-base:1.0[${MULTILIB_USEDEP}] - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] - ) - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) - pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) - pulseaudio? ( media-libs/libpulse[${MULTILIB_USEDEP}] ) - scanner? ( media-gfx/sane-backends[${MULTILIB_USEDEP}] ) - smartcard? ( sys-apps/pcsc-lite[${MULTILIB_USEDEP}] ) - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) - unwind? ( - llvm-libunwind? ( llvm-runtimes/libunwind[${MULTILIB_USEDEP}] ) - !llvm-libunwind? ( sys-libs/libunwind:=[${MULTILIB_USEDEP}] ) - ) - usb? ( dev-libs/libusb:1[${MULTILIB_USEDEP}] ) - wayland? ( - dev-libs/wayland[${MULTILIB_USEDEP}] - x11-libs/libxkbcommon[${MULTILIB_USEDEP}] - ) -" -RDEPEND=" - ${WINE_COMMON_DEPEND} - app-emulation/wine-desktop-common - dos? ( - || ( - games-emulation/dosbox - games-emulation/dosbox-staging - ) - ) - gecko? ( - app-emulation/wine-gecko:${WINE_GECKO}[${MULTILIB_USEDEP}] - wow64? ( app-emulation/wine-gecko[abi_x86_32] ) - ) - gstreamer? ( media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] ) - mono? ( app-emulation/wine-mono:${WINE_MONO} ) - perl? ( - dev-lang/perl - dev-perl/XML-LibXML - ) - samba? ( net-fs/samba[winbind] ) - selinux? ( sec-policy/selinux-wine ) -" -DEPEND=" - ${WINE_COMMON_DEPEND} - sys-kernel/linux-headers - X? ( x11-base/xorg-proto ) -" -# gitapply.sh "can" work without git but that is hardly tested -# and known failing with some versions, so force real git -BDEPEND=" - ${PYTHON_DEPS} - || ( - sys-devel/binutils - llvm-core/lld - ) - dev-lang/perl - dev-vcs/git - sys-devel/bison - sys-devel/flex - virtual/pkgconfig - mingw? ( !crossdev-mingw? ( - >=dev-util/mingw64-toolchain-10.0.0_p1-r2[${MULTILIB_USEDEP}] - wow64? ( dev-util/mingw64-toolchain[abi_x86_32] ) - ) ) - nls? ( sys-devel/gettext ) - wayland? ( dev-util/wayland-scanner ) -" -IDEPEND=">=app-eselect/eselect-wine-2" - -QA_CONFIG_IMPL_DECL_SKIP=( - __clear_cache # unused on amd64+x86 (bug #900334) - res_getservers # false positive -) -QA_TEXTRELS="usr/lib/*/wine/i386-unix/*.so" # uses -fno-PIC -Wl,-z,notext - -PATCHES=( - "${FILESDIR}"/${PN}-7.17-noexecstack.patch - "${FILESDIR}"/${PN}-7.20-unwind.patch - "${FILESDIR}"/${PN}-8.13-rpath.patch - "${FILESDIR}"/${PN}-10.0-binutils2.44.patch -) - -pkg_pretend() { - [[ ${MERGE_TYPE} == binary ]] && return - - if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then - local mingw=-w64-mingw32 - for mingw in $(usev abi_x86_64 x86_64${mingw}) \ - $(use abi_x86_32 || use wow64 && echo i686${mingw}); do - if ! type -P ${mingw}-gcc >/dev/null; then - eerror "With USE=crossdev-mingw, you must prepare the MinGW toolchain" - eerror "yourself by installing sys-devel/crossdev then running:" - eerror - eerror " crossdev --target ${mingw}" - eerror - eerror "For more information, please see: https://wiki.gentoo.org/wiki/Mingw" - die "USE=crossdev-mingw is enabled, but ${mingw}-gcc was not found" - fi - done - fi -} - -src_unpack() { - if [[ ${PV} == *9999 ]]; then - EGIT_CHECKOUT_DIR=${WORKDIR}/${P} - git-r3_src_unpack - - # hack: use subshell to preserve state (including what git-r3 unpack - # sets) for smart-live-rebuild as this is not the repo to look at - ( - EGIT_COMMIT=$(<"${EGIT_CHECKOUT_DIR}"/staging/upstream-commit) || die - EGIT_REPO_URI=${WINE_EGIT_REPO_URI} - EGIT_CHECKOUT_DIR=${S} - einfo "Fetching Wine commit matching the current patchset by default (${EGIT_COMMIT})" - git-r3_src_unpack - ) - else - default - fi -} - -src_prepare() { - local patchinstallargs=( - --all - --no-autoconf - ${MY_WINE_STAGING_CONF} - ) - - edo "${PYTHON}" ../${P}/staging/patchinstall.py "${patchinstallargs[@]}" - - # sanity check, bumping these has a history of oversights - local geckomono=$(sed -En '/^#define (GECKO|MONO)_VER/{s/[^0-9.]//gp}' \ - dlls/appwiz.cpl/addons.c || die) - if [[ ${WINE_GECKO}$'\n'${WINE_MONO} != "${geckomono}" ]]; then - local gmfatal= - [[ ${PV} == *9999 ]] && gmfatal=nonfatal - ${gmfatal} die -n "gecko/mono mismatch in ebuild, has: " ${geckomono} " (please file a bug)" - fi - - default - - if tc-is-clang; then - if use mingw; then - # -mabi=ms was ignored by <clang:16 then turned error in :17 - # if used without --target *-windows, then gets used in install - # phase despite USE=mingw, drop as a quick fix for now - sed -i '/MSVCRTFLAGS=/s/-mabi=ms//' configure.ac || die - else - # fails in ./configure unless --enable-archs is passed, allow to - # bypass with EXTRA_ECONF but is currently considered unsupported - # (by Gentoo) as additional work is needed for (proper) support - # note: also fails w/ :17, but unsure if safe to drop w/o mingw - [[ ${EXTRA_ECONF} == *--enable-archs* ]] || - die "building ${PN} with clang is only supported with USE=mingw" - fi - fi - - # ensure .desktop calls this variant + slot - sed -i "/^Exec=/s/wine /${P} /" loader/wine.desktop || die - - # datadir is not where wine-mono is installed, so prefixy alternate paths - hprefixify -w /get_mono_path/ dlls/mscoree/metahost.c - - # always update for patches (including user's wrt #432348) - eautoreconf - tools/make_requests || die # perl - # tip: if need more for user patches, with portage can e.g. do - # echo "post_src_prepare() { tools/make_specfiles || die; }" \ - # > /etc/portage/env/app-emulation/wine-staging -} - -src_configure() { - WINE_PREFIX=/usr/lib/${P} - WINE_DATADIR=/usr/share/${P} - - local conf=( - --prefix="${EPREFIX}"${WINE_PREFIX} - --datadir="${EPREFIX}"${WINE_DATADIR} - --includedir="${EPREFIX}"/usr/include/${P} - --libdir="${EPREFIX}"${WINE_PREFIX} - --mandir="${EPREFIX}"${WINE_DATADIR}/man - - $(usev wow64 --enable-archs=x86_64,i386) - - $(use_enable gecko mshtml) - $(use_enable mono mscoree) - --disable-tests - - $(use_with X x) - $(use_with alsa) - $(use_with capi) - $(use_with cups) - $(use_with dbus) - $(use_with ffmpeg) - $(use_with fontconfig) - $(use_with gphoto2 gphoto) - $(use_with gstreamer) - $(use_with kerberos gssapi) - $(use_with kerberos krb5) - $(use_with mingw) - $(use_with netapi) - $(use_with nls gettext) - $(use_with opencl) - $(use_with opengl) - --without-osmesa # media-libs/mesa no longer supports this - --without-oss # media-sound/oss is not packaged (OSSv4) - $(use_with pcap) - $(use_with pulseaudio pulse) - $(use_with scanner sane) - $(use_with sdl) - $(use_with smartcard pcsclite) - $(use_with ssl gnutls) - $(use_with truetype freetype) - $(use_with udev) - $(use_with unwind) - $(use_with usb) - $(use_with v4l v4l2) - $(use_with vulkan) - $(use_with wayland) - $(use_with xcomposite) - $(use_with xinerama) - $(usev !odbc ac_cv_lib_soname_odbc=) - ) - - filter-lto # build failure - filter-flags -Wl,--gc-sections # runtime issues (bug #931329) - use custom-cflags || strip-flags # can break in obscure ways at runtime - - # broken with gcc-15's c23 default (TODO: try w/o occasionally, bug #943849) - append-cflags -std=gnu17 - - # wine uses linker tricks unlikely to work with non-bfd/lld (bug #867097) - # (do self test until https://github.com/gentoo/gentoo/pull/28355) - if [[ $(LC_ALL=C $(tc-getCC) ${LDFLAGS} -Wl,--version 2>/dev/null) != @(LLD|GNU\ ld)* ]] - then - has_version -b sys-devel/binutils && - append-ldflags -fuse-ld=bfd || - append-ldflags -fuse-ld=lld - strip-unsupported-flags - fi - - if use mingw; then - use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH} - - # CROSSCC was formerly recognized by wine, thus been using similar - # variables (subject to change, esp. if ever make a mingw.eclass). - local mingwcc_amd64=${CROSSCC:-${CROSSCC_amd64:-x86_64-w64-mingw32-gcc}} - local mingwcc_x86=${CROSSCC:-${CROSSCC_x86:-i686-w64-mingw32-gcc}} - local -n mingwcc=mingwcc_$(usex abi_x86_64 amd64 x86) - - conf+=( - ac_cv_prog_x86_64_CC="${mingwcc_amd64}" - ac_cv_prog_i386_CC="${mingwcc_x86}" - - CROSSCFLAGS="${CROSSCFLAGS:-$( - filter-flags '-fstack-protector*' #870136 - filter-flags '-mfunction-return=thunk*' #878849 - - # some bashrc-mv users tend to do CFLAGS="${LDFLAGS}" and then - # strip-unsupported-flags miss these during compile-only tests - # (primarily done for 23.0 profiles' -z, not full coverage) - filter-flags '-Wl,-z,*' - - # -mavx with mingw-gcc has a history of issues and still see - # users have problems despite -mpreferred-stack-boundary=2 - append-cflags -mno-avx - - CC=${mingwcc} test-flags-CC ${CFLAGS:--O2} - )}" - - CROSSLDFLAGS="${CROSSLDFLAGS:-$( - filter-flags '-fuse-ld=*' - - CC=${mingwcc} test-flags-CCLD ${LDFLAGS} - )}" - ) - fi - - # order matters with multilib: configure+compile 64->32, install 32->64 - local -i bits - for bits in $(usev abi_x86_64 64) $(usev abi_x86_32 32); do - ( - einfo "Configuring ${PN} for ${bits}bits in ${WORKDIR}/build${bits} ..." - - mkdir ../build${bits} || die - cd ../build${bits} || die - - if (( bits == 64 )); then - conf+=( --enable-win64 ) - elif use amd64; then - conf+=( - $(usev abi_x86_64 --with-wine64=../build64) - TARGETFLAGS=-m32 # for widl - ) - # _setup is optional, but use over Wine's auto-detect (+#472038) - multilib_toolchain_setup x86 - fi - - ECONF_SOURCE=${S} econf "${conf[@]}" - ) - done -} - -src_compile() { - use abi_x86_64 && emake -C ../build64 # do first - use abi_x86_32 && emake -C ../build32 -} - -src_install() { - use abi_x86_32 && emake DESTDIR="${D}" -C ../build32 install - use abi_x86_64 && emake DESTDIR="${D}" -C ../build64 install # do last - - # Ensure both wine64 and wine are available if USE=abi_x86_64 (wow64, - # -abi_x86_32, and/or EXTRA_ECONF could cause varying scenarios where - # one or the other could be missing and that is unexpected for users - # and some tools like winetricks) - if use abi_x86_64; then - if [[ -e ${ED}${WINE_PREFIX}/bin/wine64 && ! -e ${ED}${WINE_PREFIX}/bin/wine ]]; then - dosym wine64 ${WINE_PREFIX}/bin/wine - dosym wine64-preloader ${WINE_PREFIX}/bin/wine-preloader - - # also install wine(1) man pages (incl. translations) - local man - for man in ../build64/loader/wine.*man; do - : "${man##*/wine}" - : "${_%.*}" - insinto ${WINE_DATADIR}/man/${_:+${_#.}/}man1 - newins ${man} wine.1 - done - elif [[ ! -e ${ED}${WINE_PREFIX}/bin/wine64 && -e ${ED}${WINE_PREFIX}/bin/wine ]]; then - dosym wine ${WINE_PREFIX}/bin/wine64 - dosym wine-preloader ${WINE_PREFIX}/bin/wine64-preloader - fi - fi - - use perl || rm "${ED}"${WINE_DATADIR}/man/man1/wine{dump,maker}.1 \ - "${ED}"${WINE_PREFIX}/bin/{function_grep.pl,wine{dump,maker}} || die - - # create variant wrappers for eselect-wine - local bin - for bin in "${ED}"${WINE_PREFIX}/bin/*; do - make_wrapper "${bin##*/}-${P#wine-}" "${bin#"${ED}"}" - done - - if use mingw; then - # don't let portage try to strip PE files with the wrong - # strip executable and instead handle it here (saves ~120MB) - dostrip -x ${WINE_PREFIX}/wine/{i386,x86_64}-windows - - if use strip; then - ebegin "Stripping Windows (PE) binaries" - find "${ED}"${WINE_PREFIX}/wine/*-windows -regex '.*\.\(a\|dll\|exe\)' \ - -exec $(usex abi_x86_64 x86_64 i686)-w64-mingw32-strip --strip-unneeded {} + - eend ${?} || die - fi - fi - - dodoc ANNOUNCE* AUTHORS README* documentation/README* -} - -pkg_postinst() { - if use !abi_x86_32 && use !wow64; then - ewarn "32bit support is disabled. While 64bit applications themselves will" - ewarn "work, be warned that it is not unusual that installers or other helpers" - ewarn "will attempt to use 32bit and fail. If do not want full USE=abi_x86_32," - ewarn "note the experimental/WIP USE=wow64 can allow 32bit without multilib." - elif use abi_x86_32 && { use opengl || use vulkan; }; then - # difficult to tell what is needed from here, but try to warn - if has_version 'x11-drivers/nvidia-drivers'; then - if has_version 'x11-drivers/nvidia-drivers[-abi_x86_32]'; then - ewarn "x11-drivers/nvidia-drivers is installed but is built without" - ewarn "USE=abi_x86_32 (ABI_X86=32), hardware acceleration with 32bit" - ewarn "applications under ${PN} will likely not be usable." - ewarn "Multi-card setups may need this on media-libs/mesa as well." - fi - elif has_version 'media-libs/mesa[-abi_x86_32]'; then - ewarn "media-libs/mesa seems to be in use but is built without" - ewarn "USE=abi_x86_32 (ABI_X86=32), hardware acceleration with 32bit" - ewarn "applications under ${PN} will likely not be usable." - fi - fi - - optfeature "/dev/hidraw* access used for *some* controllers (e.g. DualShock4)" \ - games-util/game-device-udev-rules - - eselect wine update --if-unset || die -} - -pkg_postrm() { - if has_version -b app-eselect/eselect-wine; then - eselect wine update --if-unset || die - fi -} diff --git a/app-emulation/wine-staging/wine-staging-10.2.ebuild b/app-emulation/wine-staging/wine-staging-10.5.ebuild index 9dfefa4db762..4d42567b583c 100644 --- a/app-emulation/wine-staging/wine-staging-10.2.ebuild +++ b/app-emulation/wine-staging/wine-staging-10.5.ebuild @@ -9,7 +9,7 @@ inherit autotools edo flag-o-matic multilib multilib-build optfeature inherit prefix python-any-r1 toolchain-funcs wrapper WINE_GECKO=2.47.4 -WINE_MONO=9.4.0 +WINE_MONO=10.0.0 WINE_P=wine-$(ver_cut 1-2) if [[ ${PV} == *9999 ]]; then @@ -32,20 +32,25 @@ HOMEPAGE=" S="${WORKDIR}/${WINE_P}" -LICENSE="LGPL-2.1+ BSD BSD-2 IJG MIT OPENLDAP ZLIB gsm libpng2 libtiff" +LICENSE=" + LGPL-2.1+ + BSD BSD-2 IJG MIT OPENLDAP ZLIB gsm libpng2 libtiff + || ( WTFPL-2 public-domain ) +" SLOT="${PV}" IUSE=" - +X +abi_x86_32 +abi_x86_64 +alsa capi crossdev-mingw cups +dbus dos - llvm-libunwind custom-cflags ffmpeg +fontconfig +gecko gphoto2 - +gstreamer kerberos +mingw +mono netapi nls odbc opencl +opengl - pcap perl pulseaudio samba scanner +sdl selinux smartcard +ssl - +strip +truetype udev +unwind usb v4l +vulkan wayland wow64 + +X +abi_x86_32 +abi_x86_64 +alsa bluetooth capi crossdev-mingw cups + +dbus dos llvm-libunwind custom-cflags ffmpeg +fontconfig +gecko + gphoto2 +gstreamer kerberos +mingw +mono netapi nls odbc opencl + +opengl pcap perl pulseaudio samba scanner +sdl selinux smartcard + +ssl +strip +truetype udev +unwind usb v4l +vulkan wayland wow64 +xcomposite xinerama " # bug #551124 for truetype -# TODO: wow64 can be done without mingw if using clang (needs bug #912237) +# TODO?: wow64 can be done without mingw if using clang (needs bug #912237) REQUIRED_USE=" X? ( truetype ) + bluetooth? ( dbus ) crossdev-mingw? ( mingw ) wow64? ( abi_x86_64 !abi_x86_32 mingw ) " @@ -136,6 +141,7 @@ DEPEND=" ${WINE_COMMON_DEPEND} sys-kernel/linux-headers X? ( x11-base/xorg-proto ) + bluetooth? ( net-wireless/bluez ) " # gitapply.sh "can" work without git but that is hardly tested # and known failing with some versions, so force real git @@ -310,6 +316,11 @@ src_configure() { $(use_with wayland) $(use_with xcomposite) $(use_with xinerama) + + $(usev !bluetooth ' + ac_cv_header_bluetooth_bluetooth_h=no + ac_cv_header_bluetooth_rfcomm_h=no + ') $(usev !odbc ac_cv_lib_soname_odbc=) ) diff --git a/app-emulation/wine-vanilla/Manifest b/app-emulation/wine-vanilla/Manifest index 9e8ed5a13a6a..9e9299ec3c95 100644 --- a/app-emulation/wine-vanilla/Manifest +++ b/app-emulation/wine-vanilla/Manifest @@ -3,17 +3,15 @@ AUX wine-vanilla-7.0-noexecstack.patch 223 BLAKE2B dff1867e2977bd14fcfab9dfa2c2f AUX wine-vanilla-7.20-unwind.patch 1450 BLAKE2B 3f90cc131104ad72a11ae30c582b79b3e4d8c0278d51c0a193fb9e460cf088b315503bd08bd904e8d28f72f40ab3df90f83f2542b991888a2f504cc7d2adad4d SHA512 a6c4672a44c1220d5b1efabeca535a4a3510fe92aac73c38f65a09bfbd271af8b8b1bfe2c408ba5356806cb71252a6956b8130fcd06a475037b9e51d28c2a156 AUX wine-vanilla-8.13-rpath.patch 554 BLAKE2B 209d8c581a9178242ee622338c5252f79b798cf5574f72b3984d71b7933e011b488060502715aa75630fbc3d10fcb03743ac31ed31664cacfc22b725253a117b SHA512 bbb25e02d19bd7c1a1f2d7db331d93cfcd5ce9172206ad9e19a44c52e5ece865d474eac024c2a5791dfa006c6efe0f68cd783ffc925ac793bf447d56090bdd02 DIST wine-10.0.tar.xz 32011244 BLAKE2B 92178cf484cf33e9f3b8340429ee8e68c36e0d25eee4a892f059ab73f103cfcb9eb15e1883bc9fd8c8fe311d4ccbb56582d1f780da7b1406a7839a13addd29ae SHA512 effb41c5641993e2e52eaa825cc19b7d9846e084992c5a5b066ead2339b24384d320898a9cee347a9a87106bcb3b0f54c8cd2c8d4de3a887a658052ddd5168d6 -DIST wine-10.1.tar.xz 32026152 BLAKE2B 573c4cc10c96c164eb02111b0a457be5500ab42c6d103180af5b2f88cdbcc134ea1fdb794687e6c736ebb5f9aa266e51424df26cd239fa26679d968ab5844cc3 SHA512 2dbc63e43e2cc1e0bf6294a926e8afc316e9f32efdce644229cb33bba98f6001c3f285b527767a83e5284558ef11f00515048aad031c6fc9122a4ce0692952af -DIST wine-10.2.tar.xz 32050716 BLAKE2B 78a60d82640c9ffdf8a96b58aaa8a86cce0f67d48dc082e97a2bfaf077f849b99fa7d5418a42d2f18176afedd9a7270a08ca872af5c43c10fd64fe1eddf7cfdf SHA512 893395e29d72898579850c4084838c76b8a53659b4a3917e47d853733fafaa0e57bfde31437862955cdfab94327622eb290488d6120d76eeb2a4fa70dff5ef67 DIST wine-10.3.tar.xz 32280996 BLAKE2B 49e3e1d4da74a647c01b3326b2d79ac102fa67b43cd3134e8ca66696003ee9f1a5835b093896d8b8e4ff1fd2c229db8c004fdcfec79fbc0d559985094374a4e1 SHA512 361edb93f062f44592b55ba298d1e2b49857bf067791cc92424c812412aff93955dcb7726e3f87fd304f3e567693b547fa5a149b58990c914f91c585fede2716 DIST wine-10.4.tar.xz 32326532 BLAKE2B f51bee9115f236d13be717f524bfb21d4aa3bd3bc4114d8fe9f106957e01f57e14bdd415e6cc494e6860244d43fd906d69e17055822954490ae6e7562e562e6c SHA512 e1f2bf5bd021fe9937cb27e1ee3ce0e5ff06a32abe3d1e07eb6083f5dcdfcd84e5b4d631dd1a83686dd7a42a1b84eec848ec08a256c2570a709d830ce7f7208a +DIST wine-10.5.tar.xz 32353760 BLAKE2B a8551905f63ec7806a89986bfdb73b1f171b74f604bd00d9815cf8efe457268b99655b12d0d8d9aa19e08a6566aa4f20ddfc6b4549f4eb81abc49a61d195d444 SHA512 d923e4406665721e1fb6db53cd4199b513b49f9f3a6825327635a2fa169d992067408b8958f749d05d59f66f32bfe418dabb73768fb97a5501c90d1bc0cb7c50 DIST wine-8.0.2.tar.xz 29060452 BLAKE2B dcffaba6c90c4e02a7bc591a81e11aced06c006370c4c316c8a367b2f5814926063482959fabfe9d674ee1b5a560e59087e9b711e28360ced3aee2bbd6bb8fdb SHA512 e86dd31247d757d48ffb2d24f20edab3fc6ef9c3e395567a7b363951bb681335ba3adb8b84639011b24b6eb274582d56880298d6d95fb100acc072383d4e973f DIST wine-9.0.tar.xz 30007216 BLAKE2B cf53177201a2f7eeb35d0d8ce220f80808d979099a928ad60652d1dee92620c433cc105dffab4e9309f41766087ad1544ef49d2922538bb420d62f6dd64117a1 SHA512 838daf2c4581f83f8573b988036f517d57b84894b090a2a17433255d6d044dfa880e6724cdb83082a36c333df9d2083ab68ae53927622a620edd59f33462ada4 EBUILD wine-vanilla-10.0-r1.ebuild 14648 BLAKE2B 894e80635d7bfe6969fbe43ba33b5dac9bec408a75f7fc3323dc8d5ab8d68da16055223c2213c1934e194cfbd8d671954c609c790343f21ac068a8121947952b SHA512 c6cf3e31d5fd5c117000d7062e7309c42833d1615eac72851ccd30c89b0ed230ed9d1a18d62a3768380176ca0b2e3c0eb2777bd48d515149c52976c58b230c0c -EBUILD wine-vanilla-10.1.ebuild 14650 BLAKE2B b252590f81a76999812e9dd8b0f757b27fe3deaae0a9be023775711a8a95f8a87ca450cbac90ad48f890cecc83a161aa701fbee6d6d92a98748e1d08c0b0e688 SHA512 d97f3a6c383ae81a8aa6a9aaa01f30ed27e25600433cb8ac4522eb08c9894de2a4544228d2d01259a80b2b67a56602a4eb32bcc7e1dc75dc0add769f2c326aea -EBUILD wine-vanilla-10.2.ebuild 13955 BLAKE2B a45d8b9e0bbe44d1364392e31da7bcf88511175b4860d37a5863e314fb51c4fd2573e5d2a5869bbd221c45d58203a64aa67c4b616a95c087a09e553c01989c1f SHA512 85294049f3f95510d0e013ac02e1c01ffa0d787b911f2e59d584192308dcf571d4db7829a095cb2a2d20881c2502b03e294479f4b6a974046765c719994e6605 EBUILD wine-vanilla-10.3-r1.ebuild 13989 BLAKE2B e744be2b1fd9d7d5b071421e1f8b5aaca10d5466a5f6801a0aeb3f5768c39c570fadcc3f9c3ff79f972d27d6683ee25da0e5d20cf93ca2592740e62395341112 SHA512 c79f0b5351c48941d22d7893823e0a6715b16cefa23ed8b5b87a44728d29b400590399a03a52126ed2cc9687cd0dc3ca185cb4007744f11a3bc0da489f8af714 EBUILD wine-vanilla-10.4.ebuild 13989 BLAKE2B e744be2b1fd9d7d5b071421e1f8b5aaca10d5466a5f6801a0aeb3f5768c39c570fadcc3f9c3ff79f972d27d6683ee25da0e5d20cf93ca2592740e62395341112 SHA512 c79f0b5351c48941d22d7893823e0a6715b16cefa23ed8b5b87a44728d29b400590399a03a52126ed2cc9687cd0dc3ca185cb4007744f11a3bc0da489f8af714 +EBUILD wine-vanilla-10.5.ebuild 14163 BLAKE2B 9c71d8db35e6adaae3d829afe541d501da9a5a8c445210ad20981148b12a780307183d3c500a47709f833f2dc1ca13a01cfed13666db148859467f4d28830f8a SHA512 f7297f9126c2ff60b2fca4cdb04c4052f43e4cd87f0df5f47145c5cd20dcdd063320aa44edb7bb781470cd6b309f8f277420e3e020b62bd002e3bc5f52f40eac EBUILD wine-vanilla-8.0.2.ebuild 12989 BLAKE2B 7d0c26640bdcc8058e39a4b5213b17329297c808e829bef0d6c2e50e2220e4aa391ef61e57d4636a8af41146f2e483efd451e9084b9d4ba1896b8d0ca41d5c54 SHA512 1d54a432b9f0497e9316affb138ff4375f8944ab3765b6b53b4f97e396f6ca1984086c099841170b26d226eeafad4650c609b0c99956351cd0486db488c79544 EBUILD wine-vanilla-9.0-r1.ebuild 14423 BLAKE2B 896a4b83c3d65911d0e2d972a09b4e3af42b2721250ccc26488ae39d14d17b269e4ba6623483a696a8bc731ef6ad32cb543ce366d216ff3913f3cb4d01e53eed SHA512 476943b64f74527b431b407b5d0ef6a790a244487216af76875d7241ded612d1432cea64306979d19bd9c58e6314d5aab3cfae8680a9d3c90cefa7ab4cc408c8 EBUILD wine-vanilla-9999.ebuild 14163 BLAKE2B 9c71d8db35e6adaae3d829afe541d501da9a5a8c445210ad20981148b12a780307183d3c500a47709f833f2dc1ca13a01cfed13666db148859467f4d28830f8a SHA512 f7297f9126c2ff60b2fca4cdb04c4052f43e4cd87f0df5f47145c5cd20dcdd063320aa44edb7bb781470cd6b309f8f277420e3e020b62bd002e3bc5f52f40eac diff --git a/app-emulation/wine-vanilla/wine-vanilla-10.1.ebuild b/app-emulation/wine-vanilla/wine-vanilla-10.1.ebuild deleted file mode 100644 index 762b7bd61ad3..000000000000 --- a/app-emulation/wine-vanilla/wine-vanilla-10.1.ebuild +++ /dev/null @@ -1,448 +0,0 @@ -# Copyright 2022-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -MULTILIB_COMPAT=( abi_x86_{32,64} ) -inherit autotools flag-o-matic multilib multilib-build optfeature -inherit prefix toolchain-funcs wrapper - -WINE_GECKO=2.47.4 -WINE_MONO=9.4.0 - -if [[ ${PV} == *9999 ]]; then - inherit git-r3 - EGIT_REPO_URI="https://gitlab.winehq.org/wine/wine.git" -else - (( $(ver_cut 2) )) && WINE_SDIR=$(ver_cut 1).x || WINE_SDIR=$(ver_cut 1).0 - SRC_URI="https://dl.winehq.org/wine/source/${WINE_SDIR}/wine-${PV}.tar.xz" - S="${WORKDIR}/wine-${PV}" - KEYWORDS="-* ~amd64 ~x86" -fi - -DESCRIPTION="Free implementation of Windows(tm) on Unix, without external patchsets" -HOMEPAGE=" - https://www.winehq.org/ - https://gitlab.winehq.org/wine/wine/ -" - -LICENSE="LGPL-2.1+ BSD BSD-2 IJG MIT OPENLDAP ZLIB gsm libpng2 libtiff" -SLOT="${PV}" -IUSE=" - +X +abi_x86_32 +abi_x86_64 +alsa capi crossdev-mingw cups +dbus dos - llvm-libunwind custom-cflags ffmpeg +fontconfig +gecko gphoto2 - +gstreamer kerberos +mingw +mono netapi nls odbc opencl +opengl - pcap perl pulseaudio samba scanner +sdl selinux smartcard +ssl - +strip +truetype udev +unwind usb v4l +vulkan wayland wow64 - +xcomposite xinerama -" -# bug #551124 for truetype -# TODO?: wow64 can be done without mingw if using clang (needs bug #912237) -REQUIRED_USE=" - X? ( truetype ) - crossdev-mingw? ( mingw ) - wow64? ( abi_x86_64 !abi_x86_32 mingw ) -" - -# tests are non-trivial to run, can hang easily, don't play well with -# sandbox, and several need real opengl/vulkan or network access -RESTRICT="test" - -# `grep WINE_CHECK_SONAME configure.ac` + if not directly linked -WINE_DLOPEN_DEPEND=" - X? ( - x11-libs/libXcursor[${MULTILIB_USEDEP}] - x11-libs/libXfixes[${MULTILIB_USEDEP}] - x11-libs/libXi[${MULTILIB_USEDEP}] - x11-libs/libXrandr[${MULTILIB_USEDEP}] - x11-libs/libXrender[${MULTILIB_USEDEP}] - x11-libs/libXxf86vm[${MULTILIB_USEDEP}] - opengl? ( media-libs/libglvnd[X,${MULTILIB_USEDEP}] ) - xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) - ) - cups? ( net-print/cups[${MULTILIB_USEDEP}] ) - dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) - fontconfig? ( media-libs/fontconfig[${MULTILIB_USEDEP}] ) - kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] ) - netapi? ( net-fs/samba[${MULTILIB_USEDEP}] ) - odbc? ( dev-db/unixODBC[${MULTILIB_USEDEP}] ) - sdl? ( media-libs/libsdl2[haptic,joystick,${MULTILIB_USEDEP}] ) - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) - truetype? ( media-libs/freetype[${MULTILIB_USEDEP}] ) - v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) - vulkan? ( media-libs/vulkan-loader[X?,wayland?,${MULTILIB_USEDEP}] ) -" -WINE_COMMON_DEPEND=" - ${WINE_DLOPEN_DEPEND} - X? ( - x11-libs/libX11[${MULTILIB_USEDEP}] - x11-libs/libXext[${MULTILIB_USEDEP}] - ) - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) - capi? ( net-libs/libcapi:=[${MULTILIB_USEDEP}] ) - ffmpeg? ( media-video/ffmpeg:=[${MULTILIB_USEDEP}] ) - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) - gstreamer? ( - dev-libs/glib:2[${MULTILIB_USEDEP}] - media-libs/gst-plugins-base:1.0[${MULTILIB_USEDEP}] - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] - ) - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) - pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) - pulseaudio? ( media-libs/libpulse[${MULTILIB_USEDEP}] ) - scanner? ( media-gfx/sane-backends[${MULTILIB_USEDEP}] ) - smartcard? ( sys-apps/pcsc-lite[${MULTILIB_USEDEP}] ) - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) - unwind? ( - llvm-libunwind? ( llvm-runtimes/libunwind[${MULTILIB_USEDEP}] ) - !llvm-libunwind? ( sys-libs/libunwind:=[${MULTILIB_USEDEP}] ) - ) - usb? ( dev-libs/libusb:1[${MULTILIB_USEDEP}] ) - wayland? ( - dev-libs/wayland[${MULTILIB_USEDEP}] - x11-libs/libxkbcommon[${MULTILIB_USEDEP}] - ) -" -RDEPEND=" - ${WINE_COMMON_DEPEND} - app-emulation/wine-desktop-common - dos? ( - || ( - games-emulation/dosbox - games-emulation/dosbox-staging - ) - ) - gecko? ( - app-emulation/wine-gecko:${WINE_GECKO}[${MULTILIB_USEDEP}] - wow64? ( app-emulation/wine-gecko[abi_x86_32] ) - ) - gstreamer? ( media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] ) - mono? ( app-emulation/wine-mono:${WINE_MONO} ) - perl? ( - dev-lang/perl - dev-perl/XML-LibXML - ) - samba? ( net-fs/samba[winbind] ) - selinux? ( sec-policy/selinux-wine ) -" -DEPEND=" - ${WINE_COMMON_DEPEND} - sys-kernel/linux-headers - X? ( x11-base/xorg-proto ) -" -BDEPEND=" - || ( - sys-devel/binutils - llvm-core/lld - ) - dev-lang/perl - sys-devel/bison - sys-devel/flex - virtual/pkgconfig - mingw? ( !crossdev-mingw? ( - >=dev-util/mingw64-toolchain-10.0.0_p1-r2[${MULTILIB_USEDEP}] - wow64? ( dev-util/mingw64-toolchain[abi_x86_32] ) - ) ) - nls? ( sys-devel/gettext ) - wayland? ( dev-util/wayland-scanner ) -" -IDEPEND=">=app-eselect/eselect-wine-2" - -QA_CONFIG_IMPL_DECL_SKIP=( - __clear_cache # unused on amd64+x86 (bug #900338) - res_getservers # false positive -) -QA_TEXTRELS="usr/lib/*/wine/i386-unix/*.so" # uses -fno-PIC -Wl,-z,notext - -PATCHES=( - "${FILESDIR}"/${PN}-7.0-noexecstack.patch - "${FILESDIR}"/${PN}-7.20-unwind.patch - "${FILESDIR}"/${PN}-8.13-rpath.patch - "${FILESDIR}"/${PN}-10.0-binutils2.44.patch -) - -pkg_pretend() { - [[ ${MERGE_TYPE} == binary ]] && return - - if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then - local mingw=-w64-mingw32 - for mingw in $(usev abi_x86_64 x86_64${mingw}) \ - $(use abi_x86_32 || use wow64 && echo i686${mingw}); do - if ! type -P ${mingw}-gcc >/dev/null; then - eerror "With USE=crossdev-mingw, you must prepare the MinGW toolchain" - eerror "yourself by installing sys-devel/crossdev then running:" - eerror - eerror " crossdev --target ${mingw}" - eerror - eerror "For more information, please see: https://wiki.gentoo.org/wiki/Mingw" - die "USE=crossdev-mingw is enabled, but ${mingw}-gcc was not found" - fi - done - fi -} - -src_prepare() { - # sanity check, bumping these has a history of oversights - local geckomono=$(sed -En '/^#define (GECKO|MONO)_VER/{s/[^0-9.]//gp}' \ - dlls/appwiz.cpl/addons.c || die) - if [[ ${WINE_GECKO}$'\n'${WINE_MONO} != "${geckomono}" ]]; then - local gmfatal= - [[ ${PV} == *9999 ]] && gmfatal=nonfatal - ${gmfatal} die -n "gecko/mono mismatch in ebuild, has: " ${geckomono} " (please file a bug)" - fi - - default - - if tc-is-clang; then - if use mingw; then - # -mabi=ms was ignored by <clang:16 then turned error in :17 - # if used without --target *-windows, then gets used in install - # phase despite USE=mingw, drop as a quick fix for now - sed -i '/MSVCRTFLAGS=/s/-mabi=ms//' configure.ac || die - else - # fails in ./configure unless --enable-archs is passed, allow to - # bypass with EXTRA_ECONF but is currently considered unsupported - # (by Gentoo) as additional work is needed for (proper) support - # note: also fails w/ :17, but unsure if safe to drop w/o mingw - [[ ${EXTRA_ECONF} == *--enable-archs* ]] || - die "building ${PN} with clang is only supported with USE=mingw" - fi - fi - - # ensure .desktop calls this variant + slot - sed -i "/^Exec=/s/wine /${P} /" loader/wine.desktop || die - - # datadir is not where wine-mono is installed, so prefixy alternate paths - hprefixify -w /get_mono_path/ dlls/mscoree/metahost.c - - # always update for patches (including user's wrt #432348) - eautoreconf - tools/make_requests || die # perl - # tip: if need more for user patches, with portage can e.g. do - # echo "post_src_prepare() { tools/make_specfiles || die; }" \ - # > /etc/portage/env/app-emulation/wine-vanilla -} - -src_configure() { - WINE_PREFIX=/usr/lib/${P} - WINE_DATADIR=/usr/share/${P} - - local conf=( - --prefix="${EPREFIX}"${WINE_PREFIX} - --datadir="${EPREFIX}"${WINE_DATADIR} - --includedir="${EPREFIX}"/usr/include/${P} - --libdir="${EPREFIX}"${WINE_PREFIX} - --mandir="${EPREFIX}"${WINE_DATADIR}/man - - $(usev wow64 --enable-archs=x86_64,i386) - - $(use_enable gecko mshtml) - $(use_enable mono mscoree) - --disable-tests - - $(use_with X x) - $(use_with alsa) - $(use_with capi) - $(use_with cups) - $(use_with dbus) - $(use_with ffmpeg) - $(use_with fontconfig) - $(use_with gphoto2 gphoto) - $(use_with gstreamer) - $(use_with kerberos gssapi) - $(use_with kerberos krb5) - $(use_with mingw) - $(use_with netapi) - $(use_with nls gettext) - $(use_with opencl) - $(use_with opengl) - --without-osmesa # media-libs/mesa no longer supports this - --without-oss # media-sound/oss is not packaged (OSSv4) - $(use_with pcap) - $(use_with pulseaudio pulse) - $(use_with scanner sane) - $(use_with sdl) - $(use_with smartcard pcsclite) - $(use_with ssl gnutls) - $(use_with truetype freetype) - $(use_with udev) - $(use_with unwind) - $(use_with usb) - $(use_with v4l v4l2) - $(use_with vulkan) - $(use_with wayland) - $(use_with xcomposite) - $(use_with xinerama) - $(usev !odbc ac_cv_lib_soname_odbc=) - ) - - filter-lto # build failure - filter-flags -Wl,--gc-sections # runtime issues (bug #931329) - use custom-cflags || strip-flags # can break in obscure ways at runtime - - # broken with gcc-15's c23 default (TODO: try w/o occasionally, bug #943849) - append-cflags -std=gnu17 - - # wine uses linker tricks unlikely to work with non-bfd/lld (bug #867097) - # (do self test until https://github.com/gentoo/gentoo/pull/28355) - if [[ $(LC_ALL=C $(tc-getCC) ${LDFLAGS} -Wl,--version 2>/dev/null) != @(LLD|GNU\ ld)* ]] - then - has_version -b sys-devel/binutils && - append-ldflags -fuse-ld=bfd || - append-ldflags -fuse-ld=lld - strip-unsupported-flags - fi - - if use mingw; then - use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH} - - # CROSSCC was formerly recognized by wine, thus been using similar - # variables (subject to change, esp. if ever make a mingw.eclass). - local mingwcc_amd64=${CROSSCC:-${CROSSCC_amd64:-x86_64-w64-mingw32-gcc}} - local mingwcc_x86=${CROSSCC:-${CROSSCC_x86:-i686-w64-mingw32-gcc}} - local -n mingwcc=mingwcc_$(usex abi_x86_64 amd64 x86) - - conf+=( - ac_cv_prog_x86_64_CC="${mingwcc_amd64}" - ac_cv_prog_i386_CC="${mingwcc_x86}" - - CROSSCFLAGS="${CROSSCFLAGS:-$( - filter-flags '-fstack-protector*' #870136 - filter-flags '-mfunction-return=thunk*' #878849 - - # some bashrc-mv users tend to do CFLAGS="${LDFLAGS}" and then - # strip-unsupported-flags miss these during compile-only tests - # (primarily done for 23.0 profiles' -z, not full coverage) - filter-flags '-Wl,-z,*' - - # -mavx with mingw-gcc has a history of issues and still see - # users have problems despite -mpreferred-stack-boundary=2 - append-cflags -mno-avx - - CC=${mingwcc} test-flags-CC ${CFLAGS:--O2} - )}" - - CROSSLDFLAGS="${CROSSLDFLAGS:-$( - filter-flags '-fuse-ld=*' - - CC=${mingwcc} test-flags-CCLD ${LDFLAGS} - )}" - ) - fi - - # order matters with multilib: configure+compile 64->32, install 32->64 - local -i bits - for bits in $(usev abi_x86_64 64) $(usev abi_x86_32 32); do - ( - einfo "Configuring ${PN} for ${bits}bits in ${WORKDIR}/build${bits} ..." - - mkdir ../build${bits} || die - cd ../build${bits} || die - - if (( bits == 64 )); then - conf+=( --enable-win64 ) - elif use amd64; then - conf+=( - $(usev abi_x86_64 --with-wine64=../build64) - TARGETFLAGS=-m32 # for widl - ) - # _setup is optional, but use over Wine's auto-detect (+#472038) - multilib_toolchain_setup x86 - fi - - ECONF_SOURCE=${S} econf "${conf[@]}" - ) - done -} - -src_compile() { - use abi_x86_64 && emake -C ../build64 # do first - use abi_x86_32 && emake -C ../build32 -} - -src_install() { - use abi_x86_32 && emake DESTDIR="${D}" -C ../build32 install - use abi_x86_64 && emake DESTDIR="${D}" -C ../build64 install # do last - - # Ensure both wine64 and wine are available if USE=abi_x86_64 (wow64, - # -abi_x86_32, and/or EXTRA_ECONF could cause varying scenarios where - # one or the other could be missing and that is unexpected for users - # and some tools like winetricks) - if use abi_x86_64; then - if [[ -e ${ED}${WINE_PREFIX}/bin/wine64 && ! -e ${ED}${WINE_PREFIX}/bin/wine ]]; then - dosym wine64 ${WINE_PREFIX}/bin/wine - dosym wine64-preloader ${WINE_PREFIX}/bin/wine-preloader - - # also install wine(1) man pages (incl. translations) - local man - for man in ../build64/loader/wine.*man; do - : "${man##*/wine}" - : "${_%.*}" - insinto ${WINE_DATADIR}/man/${_:+${_#.}/}man1 - newins ${man} wine.1 - done - elif [[ ! -e ${ED}${WINE_PREFIX}/bin/wine64 && -e ${ED}${WINE_PREFIX}/bin/wine ]]; then - dosym wine ${WINE_PREFIX}/bin/wine64 - dosym wine-preloader ${WINE_PREFIX}/bin/wine64-preloader - fi - fi - - use perl || rm "${ED}"${WINE_DATADIR}/man/man1/wine{dump,maker}.1 \ - "${ED}"${WINE_PREFIX}/bin/{function_grep.pl,wine{dump,maker}} || die - - # create variant wrappers for eselect-wine - local bin - for bin in "${ED}"${WINE_PREFIX}/bin/*; do - make_wrapper "${bin##*/}-${P#wine-}" "${bin#"${ED}"}" - done - - if use mingw; then - # don't let portage try to strip PE files with the wrong - # strip executable and instead handle it here (saves ~120MB) - dostrip -x ${WINE_PREFIX}/wine/{i386,x86_64}-windows - - if use strip; then - ebegin "Stripping Windows (PE) binaries" - find "${ED}"${WINE_PREFIX}/wine/*-windows -regex '.*\.\(a\|dll\|exe\)' \ - -exec $(usex abi_x86_64 x86_64 i686)-w64-mingw32-strip --strip-unneeded {} + - eend ${?} || die - fi - fi - - dodoc ANNOUNCE* AUTHORS README* documentation/README* -} - -pkg_postinst() { - if use !abi_x86_32 && use !wow64; then - ewarn "32bit support is disabled. While 64bit applications themselves will" - ewarn "work, be warned that it is not unusual that installers or other helpers" - ewarn "will attempt to use 32bit and fail. If do not want full USE=abi_x86_32," - ewarn "note the experimental/WIP USE=wow64 can allow 32bit without multilib." - elif use abi_x86_32 && { use opengl || use vulkan; }; then - # difficult to tell what is needed from here, but try to warn - if has_version 'x11-drivers/nvidia-drivers'; then - if has_version 'x11-drivers/nvidia-drivers[-abi_x86_32]'; then - ewarn "x11-drivers/nvidia-drivers is installed but is built without" - ewarn "USE=abi_x86_32 (ABI_X86=32), hardware acceleration with 32bit" - ewarn "applications under ${PN} will likely not be usable." - ewarn "Multi-card setups may need this on media-libs/mesa as well." - fi - elif has_version 'media-libs/mesa[-abi_x86_32]'; then - ewarn "media-libs/mesa seems to be in use but is built without" - ewarn "USE=abi_x86_32 (ABI_X86=32), hardware acceleration with 32bit" - ewarn "applications under ${PN} will likely not be usable." - fi - fi - - optfeature "/dev/hidraw* access used for *some* controllers (e.g. DualShock4)" \ - games-util/game-device-udev-rules - - eselect wine update --if-unset || die -} - -pkg_postrm() { - if has_version -b app-eselect/eselect-wine; then - eselect wine update --if-unset || die - fi -} diff --git a/app-emulation/wine-vanilla/wine-vanilla-10.2.ebuild b/app-emulation/wine-vanilla/wine-vanilla-10.5.ebuild index 7eb1b407c1df..46f1ec88f6fc 100644 --- a/app-emulation/wine-vanilla/wine-vanilla-10.2.ebuild +++ b/app-emulation/wine-vanilla/wine-vanilla-10.5.ebuild @@ -8,7 +8,7 @@ inherit autotools flag-o-matic multilib multilib-build optfeature inherit prefix toolchain-funcs wrapper WINE_GECKO=2.47.4 -WINE_MONO=9.4.0 +WINE_MONO=10.0.0 if [[ ${PV} == *9999 ]]; then inherit git-r3 @@ -26,20 +26,25 @@ HOMEPAGE=" https://gitlab.winehq.org/wine/wine/ " -LICENSE="LGPL-2.1+ BSD BSD-2 IJG MIT OPENLDAP ZLIB gsm libpng2 libtiff" +LICENSE=" + LGPL-2.1+ + BSD BSD-2 IJG MIT OPENLDAP ZLIB gsm libpng2 libtiff + || ( WTFPL-2 public-domain ) +" SLOT="${PV}" IUSE=" - +X +abi_x86_32 +abi_x86_64 +alsa capi crossdev-mingw cups +dbus dos - llvm-libunwind custom-cflags ffmpeg +fontconfig +gecko gphoto2 - +gstreamer kerberos +mingw +mono netapi nls odbc opencl +opengl - pcap perl pulseaudio samba scanner +sdl selinux smartcard +ssl - +strip +truetype udev +unwind usb v4l +vulkan wayland wow64 + +X +abi_x86_32 +abi_x86_64 +alsa bluetooth capi crossdev-mingw cups + +dbus dos llvm-libunwind custom-cflags ffmpeg +fontconfig +gecko + gphoto2 +gstreamer kerberos +mingw +mono netapi nls odbc opencl + +opengl pcap perl pulseaudio samba scanner +sdl selinux smartcard + +ssl +strip +truetype udev +unwind usb v4l +vulkan wayland wow64 +xcomposite xinerama " # bug #551124 for truetype # TODO?: wow64 can be done without mingw if using clang (needs bug #912237) REQUIRED_USE=" X? ( truetype ) + bluetooth? ( dbus ) crossdev-mingw? ( mingw ) wow64? ( abi_x86_64 !abi_x86_32 mingw ) " @@ -130,6 +135,7 @@ DEPEND=" ${WINE_COMMON_DEPEND} sys-kernel/linux-headers X? ( x11-base/xorg-proto ) + bluetooth? ( net-wireless/bluez ) " BDEPEND=" || ( @@ -273,6 +279,11 @@ src_configure() { $(use_with wayland) $(use_with xcomposite) $(use_with xinerama) + + $(usev !bluetooth ' + ac_cv_header_bluetooth_bluetooth_h=no + ac_cv_header_bluetooth_rfcomm_h=no + ') $(usev !odbc ac_cv_lib_soname_odbc=) ) diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest index 60a2f17f3b5e..e37ee0e10660 100644 --- a/app-emulation/xen-tools/Manifest +++ b/app-emulation/xen-tools/Manifest @@ -1,5 +1,6 @@ AUX README.gentoo 572 BLAKE2B 1284e49ac0bde0e1c1ad32b7dc200848c0837378224daed628036b5835998c9649574e2b91b4891a610188f01900922d3b2bb23fd6381682c3486bc83be9a9ef SHA512 d7312c11154b3446a66af5e11a9d8e1a30c29e42867b51a073f4460078c9a1b7acb94cea6d38bcd7fdafbb4384856cd11093f41eee1941ca43303a5e21765b03 AUX edk2-202202-binutils-2.41-textrels.patch 2600 BLAKE2B e3ddfcf36190762cf2589faa777f19f04bc7d3363a226885fa96a17cfbd29f9dd6d6b6501f85080c789b09c34a9174154e2b9dca7f1d1cd274841cf20e8835d2 SHA512 17c01bfc9eb2d2f356e16c08ef5c3def635fd502a9e50692bd5aa3e3a11f999997d0783c8a3b828ede96b34a1e23d4a6d9398607f4a9d0ddc597de3fa2e9a8cf +AUX ipxe-force-gcc.patch 279 BLAKE2B f7d9f7ab8b45be08c2db0e4a03aa833731dc5f798427185bd0830ebd2a48e2d8c07f8b4b93140abf9a6785b2952778607a7f44441f808f28214812a2a80c607c SHA512 918f931e8a18d564d624b9d7e097e151ff43e2bdf95b5f22ca067a0b485d241851d7606a2a797afd5234de8630c6efd7bcd6712c8fb0f28717de2cf246d2338c AUX stubs-32.h 537 BLAKE2B 456f57c4a4ba574c737f1b84b62a085d0290ebc8981a5f96fdebc16b6c86c801c5ca8dde135e803f46c5ec875fdd74770f6ed754880bc7af930b8ce1ce972fb7 SHA512 55308dbedaa91909a2213940f7a7b574cabe6b5a3104761a2a6f28d6aed00164544488c00cbf9d66a9a370a14c6b6d3a00434efd3ff0228cc8e4d81af19c0e68 AUX xen-consoles.logrotate 63 BLAKE2B 4ae650876035d2815dbcacc6ed618c58cc61d9cfd9cde1b6c2f792cbf51898c577ef979443ad827fc82ced4d21ae24836883160b20d697965ef5377d50c2973c SHA512 ab2105c75cfe01768aecd5bcbb56269d63666e8a44e42b6a83aee87df6c84ee2f9ab249171c21b2e09f8fec2cae8318f6e87d160989398a3e7dd68db8d52c426 AUX xen-tools-4.19.1-gnu17.patch 314 BLAKE2B 250f194fba156545b04fa251c10083df70b2f39133ee6b9d8827ffd3f90d54015375fdd5222d6e6b66b34f4b7ae8bd68ab27b50d314b9eb33547cb408349c7d1 SHA512 208af691fdcfaa06a300163e80866b728395dec71908a32e4d1effba396916a6ea7edefd38be7b9f970ee18bd368de3ee6825820796953af5262010f5be60a69 @@ -26,5 +27,5 @@ DIST xen-4.19.1.tar.gz 51991715 BLAKE2B 1e16c15c98b0e02ee55129cde3f41b314a4eaaff DIST xen-gentoo-patches-4.17.0-gentoo-patchset-2.tar.bz2 4001 BLAKE2B 7afce426759952e202a1dd819fe0a23108072bf9552ba14a0bd787a96ffe5e7a36f37e03dad8db9c46f5731acbc122c258eef6d517816aad9c8db1ca64700d19 SHA512 bcb1479f9ff5e194a4e452da9d0479febc2bcd465b4be69bb8f30e2e6b858fb77a71216dcb3e74dfb65e7ca6513742c294cd6b5eaa5ce82d0b122a00f1cbc450 DIST xen-upstream-patches-4.18.4-pre-patchset-1.tar.bz2 55216 BLAKE2B 9cc25750cc48db6efbc349278a89cfc3880326ad4556d5dad28a016bbf270435acff606d545420d44a3143ab1f540156c6997ad676d36b3ec3d5e85a63fb495c SHA512 3752998f804c7e1e5dc327a1a84dafbdac6c06eefa404766fc94089521d836a5fecd2f760e229200d4b6267af88f55b119505336be4d57e9fd74457b122f896f EBUILD xen-tools-4.18.4_pre1.ebuild 16704 BLAKE2B 0d56623c6d7a6dda3607d1f736d9e0a686c5c8b74401eae07a6bd1163a55b928d2aa2014a6d6e96c06e795b464d9db25eb3b0819c82f39e4925a17cdafbe24b0 SHA512 a940167994d4e05eebba6b9d0ef18c22ac95dfb95e1395088697abc8d679388a473d4a51685bb2546a5a817a10a353e94dd264bf02d82c3027fc4dd1b74c2b50 -EBUILD xen-tools-4.19.1.ebuild 16551 BLAKE2B a6e2e209bd7da9e5de3a631af0fbab25658af37714773182cd46c84ad5d03c1cd7d63493740f3b49e23f74db44cf589329ca2f96315371883500220c08e33939 SHA512 cda95c0aeaf9ff8f831984f73cf837b8c9a7fb8db54688417fe80d66a15d621ce5f38742ff196c2350c688c5e6bcf25089bf31baa816aea764b25f032fbd37e5 +EBUILD xen-tools-4.19.1.ebuild 16901 BLAKE2B 71dc35b66b8a333c42b536f115a7ed9f6aacabbabfbbfd2d303a4ea7c2cbfd7dba194b937545ea6fc214c780c2299ab94e2668e9074259d852baeaa4e64cbe5b SHA512 98525c936d8b6852fe4f6257bf0cfa6fcd8f4cbff1a48398a926cfb1bba848c56c9eb5f797b1bd98aeb897b063edc60db7a0c12cfc56a07599721c42e9b7f612 MISC metadata.xml 1562 BLAKE2B a619e34e6fec4c6ffc00fd098dc040c5bb464ed7f2032db2e933fada0614e82c21269175f37720a123404551474e2aeeb2728b405ff93f9b4d9d092d027e0839 SHA512 f45c793a4b4819f0e50501ddc85acdaf99e4d675530712f8dccfb5166d071ae8ed07917a61d56037d6ba3a54123f72f4512d8c11643ea8c6e507feb9d29594e7 diff --git a/app-emulation/xen-tools/files/ipxe-force-gcc.patch b/app-emulation/xen-tools/files/ipxe-force-gcc.patch new file mode 100644 index 000000000000..781de6591356 --- /dev/null +++ b/app-emulation/xen-tools/files/ipxe-force-gcc.patch @@ -0,0 +1,14 @@ +diff --git a/src/Makefile b/src/Makefile +index 548a4e3f..de5ee7ac 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -16,7 +16,8 @@ SYMBOL_PREFIX := + # + # Locations of tools + # +-HOST_CC := gcc ++override CC := gcc ++HOST_CC := ${CC} + RM := rm -f + TOUCH := touch + MKDIR := mkdir diff --git a/app-emulation/xen-tools/xen-tools-4.19.1.ebuild b/app-emulation/xen-tools/xen-tools-4.19.1.ebuild index 849888b3e33e..6fe624272471 100644 --- a/app-emulation/xen-tools/xen-tools-4.19.1.ebuild +++ b/app-emulation/xen-tools/xen-tools-4.19.1.ebuild @@ -163,7 +163,9 @@ DEPEND="${COMMON_DEPEND} BDEPEND="dev-lang/perl app-alternatives/yacc - sys-devel/gettext" + sys-devel/gettext + ipxe? ( sys-devel/gcc:* ) + !system-seabios? ( sys-devel/gcc:* )" # hvmloader is used to bootstrap a fully virtualized kernel # Approved by QA team in bug #144032 @@ -280,7 +282,9 @@ src_prepare() { # gcc 11 cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die + cp "${FILESDIR}/ipxe-force-gcc.patch" tools/firmware/etherboot/patches/ || die echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die + echo ipxe-force-gcc.patch >> tools/firmware/etherboot/patches/series || die fi # Fix texi2html build error with new texi2html, qemu.doc.html @@ -405,6 +409,10 @@ src_prepare() { tools/firmware/ovmf-dir-remote/BaseTools/Source/C/VfrCompile/Pccts/*/makefile || die fi + if ! use system-seabios ; then + sed -i "/^export HOSTCC/i override CC:=gcc" tools/firmware/seabios-dir/Makefile || die + fi + default } |