summaryrefslogtreecommitdiff
path: root/app-emulation
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-02-24 11:40:42 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-02-24 11:40:42 +0000
commita625efe29cec7f7c437cf33a956ea99eed1e4bd9 (patch)
tree3132969a9e093b34d3bd91ee6110a1111a965630 /app-emulation
parent1ff514162358897632ab329134c6bc75af618f10 (diff)
gentoo auto-resync : 24:02:2024 - 11:40:42
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/Manifest.gzbin15312 -> 15305 bytes
-rw-r--r--app-emulation/virtualbox-modules/Manifest7
-rw-r--r--app-emulation/virtualbox-modules/files/virtualbox-modules-7.0.14-kernel-6.6-warning.patch27
-rw-r--r--app-emulation/virtualbox-modules/virtualbox-modules-6.1.48-r1.ebuild (renamed from app-emulation/virtualbox-modules/virtualbox-modules-6.1.50.ebuild)4
-rw-r--r--app-emulation/virtualbox-modules/virtualbox-modules-6.1.50-r1.ebuild38
-rw-r--r--app-emulation/virtualbox-modules/virtualbox-modules-7.0.12-r1.ebuild38
-rw-r--r--app-emulation/virtualbox-modules/virtualbox-modules-7.0.14-r1.ebuild (renamed from app-emulation/virtualbox-modules/virtualbox-modules-7.0.14.ebuild)4
-rw-r--r--app-emulation/wine-vanilla/Manifest2
-rw-r--r--app-emulation/wine-vanilla/wine-vanilla-9.3.ebuild426
9 files changed, 544 insertions, 2 deletions
diff --git a/app-emulation/Manifest.gz b/app-emulation/Manifest.gz
index fe8e4e3bbd4d..80c56d2aa25b 100644
--- a/app-emulation/Manifest.gz
+++ b/app-emulation/Manifest.gz
Binary files differ
diff --git a/app-emulation/virtualbox-modules/Manifest b/app-emulation/virtualbox-modules/Manifest
index 9406259260a1..1af5321d5b27 100644
--- a/app-emulation/virtualbox-modules/Manifest
+++ b/app-emulation/virtualbox-modules/Manifest
@@ -1,11 +1,14 @@
AUX create_vbox_modules_tarball.sh 896 BLAKE2B 4153a8fa67cd8fe7187f3c4232691b1ded8e51315f41292f9fcc0adb294e9b235b0c2f1e91f6f728076ab85f687ea1ba2877dc44b511eaceb24e7d6e71a8bbd4 SHA512 c3154a13550817c581fa142e24081edfbdbc145315d34cc4569d12ad87a518fa0bf1443c053b50fdfdea6915bda1325ad973455ee85079294b83a49fd53f4771
+AUX virtualbox-modules-7.0.14-kernel-6.6-warning.patch 1110 BLAKE2B c66ec49874e6778d7b74bced6469ff255cd9bdf566f2180095fbb98e6cce1cb0698b4d89eba1702c3fcee7bb0f666cabd190f6b4f555cce931a2623d1e50adce SHA512 a902813dfcad7e8aabcd85164dc553f13b60c8e9cd70e45d61465ebaff26fc43811918f65f21828f41f5e30f40044003851024db32e645ac85352148ce0375c2
AUX virtualbox.conf-r1 30 BLAKE2B 6308dedc75e2677cbdc844b53f51359e6b5745d3510636b04d08512122aeb6db81a1a18af156a8b9acccad395d390b24f9c27ed47413382cb6101266762de230 SHA512 5c6d31f527ca2db8d7fbeea759ac328eff42803d7940fd81ef12af22eb09f8913a0e561c35db1963e2a8b398ee288692817b5c8f3d439f2a6fd381769ec2ac8a
DIST vbox-kernel-module-src-6.1.48.tar.xz 680552 BLAKE2B 243cd013a7e027634b7f6338056708cbbfb4ccf46b569c21e60b0e2450dd1ad1395c6881eb235f2cab68a65c0911322604e732fdde06eb389f83171f38ded5ae SHA512 e26e8e4dce70d0dd07a336a6681d49e0fd5991ed92997139311cefa9cb55d03066c6400d4bdb9dbf54fba683192cfc5a63a98076525f3b3066269dc8fc498598
DIST vbox-kernel-module-src-6.1.50.tar.xz 680700 BLAKE2B c3a10ce8f3eb7e6c0c05f81cd3c072296557b9f9f6f501bb0aec3f04aabfe1fbb67b553510104139cef290c09ff9e67161085781b8d28c968dfafd15958a1b1a SHA512 7822e421b595263cbdaae08103255742360ca7ab0c385818ec895f10570c5b9ed5c7614742d8fa8bc2414cd426907cd1c49d735cde8caf9d2b7692898058f592
DIST vbox-kernel-module-src-7.0.12.tar.xz 718284 BLAKE2B 8b427f9764ad7cb216d3b8dcfa05e8b564a8b67cf3beb7ec048b2529a31580eb59eb0e41a887bb85503542cae18d873d91108a522fc0ba106d119a73ce629f34 SHA512 0b64ad2ddc6eaf56759e636aa6c8e5dba998e232ec42a7bf0cf92dc00e7a6c0ebb11e9d7500a8a407e0c92a162ebb71cdb15cbfd4f570c1860641a7fdba21bd0
DIST vbox-kernel-module-src-7.0.14.tar.xz 718532 BLAKE2B 64df92802ab5e9fa3fdf9ba3e3b13004dc687dd2d5f3d41d24354f116a79000fe6ea07bfa8877113ab263d4f75210b600e61d983616f66b6e96324b3ea6a4b2d SHA512 2a0b9a0bbcb0a21a580000309be3a71722ee3cb9a63a5e12cd0d8a391b3832a6cc92ff806f8ca4b5fcb80fed02a44aa4de6a2d49f4583d704cec0902572a68bb
+EBUILD virtualbox-modules-6.1.48-r1.ebuild 1008 BLAKE2B bf64bf8cb1b7a10062ed0c21d7780a17a531ea20197f3fbb2cd9981f002f4c20d7ef05d37c919c2d4d74da0535fd686d702599d479c0673edc6038e4e1c60bdb SHA512 537ad0f3095684bb1a5f2cb1cd1ea8ae0ec14116cafa7c4cd255f9898668a3ae045b402e5539c28f6aecf348b3c2151c09d6aa542ae1c34470962e94ccbcbb5b
EBUILD virtualbox-modules-6.1.48.ebuild 941 BLAKE2B b88e79d530b44f81bc866991afb65865bb2598e8cda0451d3d9c0ed4d12f6230c3fc5e4fd6d91081bf8ddaa7387b6dd1bc5c09cbbd4e37cb28e82971f4fd4d00 SHA512 819fba543be3eebb700f36d5c08e8fdfe4c86f864040dede2f05e971c610f14b3f840142ea2a82c9582ffbc0c9f2894ab7fbd5a49c02152372e599161998bd37
-EBUILD virtualbox-modules-6.1.50.ebuild 942 BLAKE2B 2b2a078ac7a4344e470c7aa1394b6b79b095000fcda07673c7d52a9377ed04f4153eaeb188b02e8e8d524907ee93ceded016c4ff34908d7941ffab5589f03e8e SHA512 281c06cb917cb6884e3b0d4dad52c62426fd5245f316390ab2922f94ac440b056125cc14b72d1c039874f9dc2e80a89ecf025a59f7009ffa11ed51944c0bfd30
+EBUILD virtualbox-modules-6.1.50-r1.ebuild 1008 BLAKE2B bf64bf8cb1b7a10062ed0c21d7780a17a531ea20197f3fbb2cd9981f002f4c20d7ef05d37c919c2d4d74da0535fd686d702599d479c0673edc6038e4e1c60bdb SHA512 537ad0f3095684bb1a5f2cb1cd1ea8ae0ec14116cafa7c4cd255f9898668a3ae045b402e5539c28f6aecf348b3c2151c09d6aa542ae1c34470962e94ccbcbb5b
+EBUILD virtualbox-modules-7.0.12-r1.ebuild 1008 BLAKE2B 75da3c0ede11cdbcce10f53939d552c96cd6fa444a6a1a5a247340df8005f2a77c1fb18e568161ef39756690861d1f8b5da602d07028350fdc5f80d13d6eb6c4 SHA512 c1b57727e5e48fd900e98056b4afc8ae96fad08f9ed1a94f95f5a2f1977e2f7ab303bfbc439de7200ded494d459d92cafdd7ad7297514c9f56de242e36ba24ed
EBUILD virtualbox-modules-7.0.12.ebuild 941 BLAKE2B 23539d6f2c798b730f2f9afb007158672cabb6e199356b104c5e34b4f8e819e55f77ae1f303d655333cbc4351b67dc44735c131d59bb04031bc7c1b900d49c7b SHA512 379c3e216af76612970ca077c29a3c750de40c9a91dd288754cf55e7612e64227c261ffe2b0ccb8aef21f47ed1afac713295d6f7b063f27fa083715d311f7c75
-EBUILD virtualbox-modules-7.0.14.ebuild 942 BLAKE2B eefe2ce819d229a06584224a5f4ffe531e821df6dcc7b5f761d88605ab854880f9182a22d228953e2194d9a37191e6816fb5db4f87e3e10d324a42f71486ffce SHA512 181fece45985e074c73476473eba544a69151e6e2499e6162ca6019213aff95d6460d240890b01e24ff230eb87070d31f2ab9e595a21545a3020e9f4b1e7da34
+EBUILD virtualbox-modules-7.0.14-r1.ebuild 1000 BLAKE2B ca0f30b59f06c422cbb20d1729ac171aaba277817b6a23c098f390c8f837c42de5155dff50d5dd1aa4191254894870dc5f13098b026ed989bb0539269b02e671 SHA512 e17950d1e2612ddd5a2716e00c200537b69b3b5d022e2f8f40af36ae94e26bc579da744ffd3b5c24e499e69d41fcb4654eeb2d8b91b93cacc8d20696adbb26b0
MISC metadata.xml 255 BLAKE2B 9386ef3bdb55211441f303528b31f8ccd9ad9039744400e859574a424fa1f366a989fe78f5c10038f3dd9b06a6a389e4a7e643b3eac0dc93a79ac4cc3b4c5423 SHA512 6c158e12464285afd44b70d0653b65f65da1c523fc2b1b07eb6d2dec56f58234bb31cb9dc36238cd6dfc20031b4d58c04e7c1678cc9f917194403ad8a209513f
diff --git a/app-emulation/virtualbox-modules/files/virtualbox-modules-7.0.14-kernel-6.6-warning.patch b/app-emulation/virtualbox-modules/files/virtualbox-modules-7.0.14-kernel-6.6-warning.patch
new file mode 100644
index 000000000000..64bafa84e365
--- /dev/null
+++ b/app-emulation/virtualbox-modules/files/virtualbox-modules-7.0.14-kernel-6.6-warning.patch
@@ -0,0 +1,27 @@
+https://www.virtualbox.org/changeset/103168/vbox
+https://bugs.gentoo.org/923277
+
+--- a/vboxdrv/r0drv/linux/memobj-r0drv-linux.c
++++ b/vboxdrv/r0drv/linux/memobj-r0drv-linux.c
+@@ -244,9 +244,21 @@
+ #if defined(RT_ARCH_X86) || defined(RT_ARCH_AMD64)
+ if (fKernel)
+ {
++# if RTLNX_VER_MIN(6,6,0)
++ /* In kernel 6.6 mk_pte() macro was fortified with additional
++ * check which does not allow to use our custom mask anymore
++ * (see kernel commit ae1f05a617dcbc0a732fbeba0893786cd009536c).
++ * For this particular mapping case, an existing mask PAGE_KERNEL_ROX
++ * can be used instead. PAGE_KERNEL_ROX was introduced in
++ * kernel 5.8, however, lets apply it for kernels 6.6 and newer
++ * to be on a safe side.
++ */
++ return PAGE_KERNEL_ROX;
++# else
+ pgprot_t fPg = MY_PAGE_KERNEL_EXEC;
+ pgprot_val(fPg) &= ~_PAGE_RW;
+ return fPg;
++# endif
+ }
+ return PAGE_READONLY_EXEC;
+ #else
diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-6.1.50.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-6.1.48-r1.ebuild
index e6ea30a58fd9..3b1165d18eb7 100644
--- a/app-emulation/virtualbox-modules/virtualbox-modules-6.1.50.ebuild
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-6.1.48-r1.ebuild
@@ -21,6 +21,10 @@ KEYWORDS="~amd64"
CONFIG_CHECK="~!SPINLOCK JUMP_LABEL"
+PATCHES=(
+ "${FILESDIR}"/${PN}-7.0.14-kernel-6.6-warning.patch
+)
+
src_compile() {
local modlist=( {vboxdrv,vboxnetflt,vboxnetadp}=misc )
local modargs=( KERN_DIR="${KV_OUT_DIR}" KERN_VER="${KV_FULL}" )
diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-6.1.50-r1.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-6.1.50-r1.ebuild
new file mode 100644
index 000000000000..3b1165d18eb7
--- /dev/null
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-6.1.50-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# XXX: the tarball here is just the kernel modules split out of the binary
+# package that comes from VirtualBox-*.run
+# XXX: update: now it is split from virtualbox-*-Debian~bullseye_amd64.deb
+
+EAPI=8
+
+inherit linux-mod-r1
+
+MY_P="vbox-kernel-module-src-${PV}"
+DESCRIPTION="Kernel Modules for Virtualbox"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://dev.gentoo.org/~ceamac/${CATEGORY}/${PN}/${MY_P}.tar.xz"
+S="${WORKDIR}"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64"
+
+CONFIG_CHECK="~!SPINLOCK JUMP_LABEL"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-7.0.14-kernel-6.6-warning.patch
+)
+
+src_compile() {
+ local modlist=( {vboxdrv,vboxnetflt,vboxnetadp}=misc )
+ local modargs=( KERN_DIR="${KV_OUT_DIR}" KERN_VER="${KV_FULL}" )
+ linux-mod-r1_src_compile
+}
+
+src_install() {
+ linux-mod-r1_src_install
+ insinto /usr/lib/modules-load.d/
+ newins "${FILESDIR}"/virtualbox.conf-r1 virtualbox.conf
+}
diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-7.0.12-r1.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-7.0.12-r1.ebuild
new file mode 100644
index 000000000000..590b20110b46
--- /dev/null
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-7.0.12-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# XXX: the tarball here is just the kernel modules split out of the binary
+# package that comes from VirtualBox-*.run
+# XXX: update: now it is split from virtualbox-*-Debian~bullseye_amd64.deb
+
+EAPI=8
+
+inherit linux-mod-r1
+
+MY_P="vbox-kernel-module-src-${PV}"
+DESCRIPTION="Kernel Modules for Virtualbox"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://dev.gentoo.org/~ceamac/${CATEGORY}/${PN}/${MY_P}.tar.xz"
+S="${WORKDIR}"
+
+LICENSE="GPL-3"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64"
+
+CONFIG_CHECK="~!SPINLOCK JUMP_LABEL"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-7.0.14-kernel-6.6-warning.patch
+)
+
+src_compile() {
+ local modlist=( {vboxdrv,vboxnetflt,vboxnetadp}=misc )
+ local modargs=( KERN_DIR="${KV_OUT_DIR}" KERN_VER="${KV_FULL}" )
+ linux-mod-r1_src_compile
+}
+
+src_install() {
+ linux-mod-r1_src_install
+ insinto /usr/lib/modules-load.d/
+ newins "${FILESDIR}"/virtualbox.conf-r1 virtualbox.conf
+}
diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-7.0.14.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-7.0.14-r1.ebuild
index 08e22e5e0379..5466947cbf9d 100644
--- a/app-emulation/virtualbox-modules/virtualbox-modules-7.0.14.ebuild
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-7.0.14-r1.ebuild
@@ -21,6 +21,10 @@ KEYWORDS="~amd64"
CONFIG_CHECK="~!SPINLOCK JUMP_LABEL"
+PATCHES=(
+ "${FILESDIR}"/${P}-kernel-6.6-warning.patch
+)
+
src_compile() {
local modlist=( {vboxdrv,vboxnetflt,vboxnetadp}=misc )
local modargs=( KERN_DIR="${KV_OUT_DIR}" KERN_VER="${KV_FULL}" )
diff --git a/app-emulation/wine-vanilla/Manifest b/app-emulation/wine-vanilla/Manifest
index 97ef6a3395bb..0abc6c980fbb 100644
--- a/app-emulation/wine-vanilla/Manifest
+++ b/app-emulation/wine-vanilla/Manifest
@@ -7,10 +7,12 @@ DIST wine-8.0.2.tar.xz 29060452 BLAKE2B dcffaba6c90c4e02a7bc591a81e11aced06c0063
DIST wine-9.0.tar.xz 30007216 BLAKE2B cf53177201a2f7eeb35d0d8ce220f80808d979099a928ad60652d1dee92620c433cc105dffab4e9309f41766087ad1544ef49d2922538bb420d62f6dd64117a1 SHA512 838daf2c4581f83f8573b988036f517d57b84894b090a2a17433255d6d044dfa880e6724cdb83082a36c333df9d2083ab68ae53927622a620edd59f33462ada4
DIST wine-9.1.tar.xz 30028220 BLAKE2B 92d4bbaf02b414b657351fb51cb3d3a5a267ab9242a3effc8296fa73b540e23dce534d4e3e82b492f4b8539ce459b40e6d44f6708da4e5585ab2afb22045b8cf SHA512 12ec508b1e457a94391ab3072ed602ff07da2e5beb4bbe4f76e42d71e87f7fa11f6531f1f1c71e96e884b10a99240a9eaf999867479b8eeadf3576df46e0a73a
DIST wine-9.2.tar.xz 30062580 BLAKE2B f7deac8b89d99df3cb5ff264c2cc572b696a5885051753263dabceedbf27298d7bec5d96e0047d8d3b6c401608ad0ddd384bb1e2b48f698bdee331e2895e48f9 SHA512 9bffc10e573cc0ee0aaa37b09dda642c64c1456e39518256e39a752dc249e67283dece865cdb3e495b0950553a0dc004d906ecfc032c8fff936f3ef71c2d1a0d
+DIST wine-9.3.tar.xz 30098792 BLAKE2B fa6f0c73f0886918b035557a37c0553feeea5692ae15e8d67fc4360c59c1bbab9f7f93e58ae29a41800da50b961b49957cf2d060d6b5da34bd956bf7cb3e5fab SHA512 3d75a0e1360765aca453d120e1f47fb50716119f3cab2be1176003a19bba31a6affae4a845840ce52665d97e0edd46dc78a13462d6d6a7e861cd970a0a3d4d1d
EBUILD wine-vanilla-7.0.2.ebuild 11888 BLAKE2B 8051c140b1d69eb8b42b3a067c0f221fecb6e1ba00c3f19ece657026991a8e9e9a35b60b21afcddabf9b5a9ed139c7d597929a7c3143512a704626d04a5005ff SHA512 82119c2fe2a18eebc3f771c488f7d86faffce4b61eb0271c36ea80c3c8ad603428d40c939ac1195f737954825e5c5af81ea84ebd89249b3d9e9878d02edb1ec3
EBUILD wine-vanilla-8.0.2.ebuild 11976 BLAKE2B 1a6f012dc5f783135920e533735066589b3325a7f833609237e1e124c0f9a3397dd703936cd1655d0612dea4f014052296df7e7c696c8b6dff21cd91fc8bf2e5 SHA512 6c8782afbb9724e4c3086de52d635b030e7360cfcaebd592d7ea2870544053da48d0ef40c025ed6d2498b02b7ffd5e03e9dc0cddc1c226054d63caff0a3560c8
EBUILD wine-vanilla-9.0.ebuild 13438 BLAKE2B 58a89c172a0c83bce54af384b902d4ca6957df32fca10bd6a165eecd5542056c12e0b23205b8e382fbb307e25ec7a640a82ef7256fecac498351df881cabfae6 SHA512 19ff4eb9d408a8347cb5a1bd2117f7daae95d75dc2b452172b68dab9d5e1ea64536710440621354a9dc6f005e777fc952c772503b11e2e5cf4bfe099bc1e81a6
EBUILD wine-vanilla-9.1.ebuild 13569 BLAKE2B ae3ef57a97c6fcbdd0bbec3397c9863ea1ec5063f33f9df0b7dff91496aaa97308bd0d0512f9649d7904c08fb6f451847109a90aa928ef34d8e8ff667ee6c337 SHA512 439213f6cb4ec77fd22a5b6c13bd990dfc6876d0c73a15e92a490e194112a17de42fde30bea36dc1334409bbab4a5d070f10f70c629c7ee86c4c9041421f9dda
EBUILD wine-vanilla-9.2.ebuild 13569 BLAKE2B df81479efea0a61e9383558ecc4b4165dd47d54c974274e69afc3c4f32aa827caf4ac6a12997fec08ba279f7643ecc737c6dd97fbcc0bede0a9a611e743f65e7 SHA512 8e0b5ac1df68b30a73df58bee7f678d47ee5b64188dea816106aa97653a90e055e259b1add4deb40333a3270a931b6ae2410c7f5d587856ed798be9e55c86bb5
+EBUILD wine-vanilla-9.3.ebuild 13569 BLAKE2B df81479efea0a61e9383558ecc4b4165dd47d54c974274e69afc3c4f32aa827caf4ac6a12997fec08ba279f7643ecc737c6dd97fbcc0bede0a9a611e743f65e7 SHA512 8e0b5ac1df68b30a73df58bee7f678d47ee5b64188dea816106aa97653a90e055e259b1add4deb40333a3270a931b6ae2410c7f5d587856ed798be9e55c86bb5
EBUILD wine-vanilla-9999.ebuild 13569 BLAKE2B df81479efea0a61e9383558ecc4b4165dd47d54c974274e69afc3c4f32aa827caf4ac6a12997fec08ba279f7643ecc737c6dd97fbcc0bede0a9a611e743f65e7 SHA512 8e0b5ac1df68b30a73df58bee7f678d47ee5b64188dea816106aa97653a90e055e259b1add4deb40333a3270a931b6ae2410c7f5d587856ed798be9e55c86bb5
MISC metadata.xml 2661 BLAKE2B 1e62db8bd53d07c696e7b64fce4fa444f7ce27feddf4b4be775e11de095527ca1f8308618b17f488d0b23ff75872fd9b70b256a14c49dfe0f33db81b6e43fa57 SHA512 f0d889a19a037d127363036c7b71468ca9aa7532dab1293e8558ecdcfa82e5f9bc52a7f8dd4a035ac5aa3c14fc9bce3ea28bcb1912157dcc4404fcd77c339ec8
diff --git a/app-emulation/wine-vanilla/wine-vanilla-9.3.ebuild b/app-emulation/wine-vanilla/wine-vanilla-9.3.ebuild
new file mode 100644
index 000000000000..f9fd23e3c79a
--- /dev/null
+++ b/app-emulation/wine-vanilla/wine-vanilla-9.3.ebuild
@@ -0,0 +1,426 @@
+# Copyright 2022-2024 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 optfeature multilib multilib-build
+inherit prefix toolchain-funcs wrapper
+
+WINE_GECKO=2.47.4
+WINE_MONO=9.0.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-2 IJG MIT OPENLDAP ZLIB gsm libpng2 libtiff"
+SLOT="${PV}"
+IUSE="
+ +X +abi_x86_32 +abi_x86_64 +alsa capi crossdev-mingw cups dos
+ llvm-libunwind custom-cflags +fontconfig +gecko gphoto2 +gstreamer
+ kerberos +mingw +mono netapi nls odbc opencl +opengl osmesa pcap
+ perl pulseaudio samba scanner +sdl selinux smartcard +ssl +strip
+ +truetype udev udisks +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}]
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
+ )
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ )
+ cups? ( net-print/cups[${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}] )
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
+ vulkan? ( media-libs/vulkan-loader[${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}] )
+ 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? ( sys-libs/llvm-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 )
+ udisks? ( sys-fs/udisks:2 )
+"
+DEPEND="
+ ${WINE_COMMON_DEPEND}
+ sys-kernel/linux-headers
+ X? ( x11-base/xorg-proto )
+"
+BDEPEND="
+ || (
+ sys-devel/binutils
+ sys-devel/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
+)
+
+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 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)
+ $(use_with osmesa)
+ --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 udisks dbus) # dbus is only used for udisks
+ $(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
+ use custom-cflags || strip-flags # can break in obscure ways at runtime
+
+ # 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}
+
+ filter-flags -fno-plt # build failure
+
+ # 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
+ 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; } &&
+ 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."
+ 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() {
+ eselect wine update --if-unset || die
+}