From e23cdda4dbb0c83b9e682ab5e916085a35203da5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 23 Jun 2018 07:00:28 +0100 Subject: gentoo resync : 23.06.2018 --- app-emulation/Manifest.gz | Bin 19856 -> 19855 bytes app-emulation/buildah/Manifest | 4 +- app-emulation/buildah/buildah-1.1.ebuild | 56 ++ app-emulation/buildah/metadata.xml | 5 + app-emulation/docker/Manifest | 3 +- app-emulation/docker/docker-18.05.0-r1.ebuild | 305 ++++++++++ app-emulation/docker/docker-9999.ebuild | 3 + app-emulation/qemu/Manifest | 2 +- app-emulation/qemu/qemu-2.12.0-r3.ebuild | 2 +- app-emulation/reg/Manifest | 2 + app-emulation/reg/reg-0.14.1.ebuild | 31 + app-emulation/wine-any/Manifest | 8 +- app-emulation/wine-any/wine-any-3.10.ebuild | 639 +++++++++++++++++++++ app-emulation/wine-any/wine-any-3.7.ebuild | 637 -------------------- app-emulation/wine-d3d9/Manifest | 6 +- app-emulation/wine-d3d9/wine-d3d9-3.10.ebuild | 574 ++++++++++++++++++ app-emulation/wine-d3d9/wine-d3d9-3.7.ebuild | 572 ------------------ app-emulation/wine-staging/Manifest | 6 +- .../wine-staging/wine-staging-3.10.ebuild | 610 ++++++++++++++++++++ app-emulation/wine-staging/wine-staging-3.7.ebuild | 608 -------------------- app-emulation/wine-vanilla/Manifest | 4 +- .../wine-vanilla/wine-vanilla-3.10.ebuild | 531 +++++++++++++++++ app-emulation/wine-vanilla/wine-vanilla-3.7.ebuild | 529 ----------------- 23 files changed, 2775 insertions(+), 2362 deletions(-) create mode 100644 app-emulation/buildah/buildah-1.1.ebuild create mode 100644 app-emulation/docker/docker-18.05.0-r1.ebuild create mode 100644 app-emulation/reg/reg-0.14.1.ebuild create mode 100644 app-emulation/wine-any/wine-any-3.10.ebuild delete mode 100644 app-emulation/wine-any/wine-any-3.7.ebuild create mode 100644 app-emulation/wine-d3d9/wine-d3d9-3.10.ebuild delete mode 100644 app-emulation/wine-d3d9/wine-d3d9-3.7.ebuild create mode 100644 app-emulation/wine-staging/wine-staging-3.10.ebuild delete mode 100644 app-emulation/wine-staging/wine-staging-3.7.ebuild create mode 100644 app-emulation/wine-vanilla/wine-vanilla-3.10.ebuild delete mode 100644 app-emulation/wine-vanilla/wine-vanilla-3.7.ebuild (limited to 'app-emulation') diff --git a/app-emulation/Manifest.gz b/app-emulation/Manifest.gz index eb9807681536..3d58db5af799 100644 Binary files a/app-emulation/Manifest.gz and b/app-emulation/Manifest.gz differ diff --git a/app-emulation/buildah/Manifest b/app-emulation/buildah/Manifest index 7b5ba7a3451a..967e0b47dc11 100644 --- a/app-emulation/buildah/Manifest +++ b/app-emulation/buildah/Manifest @@ -1,3 +1,5 @@ DIST buildah-1.0.tar.gz 2865669 BLAKE2B 7749ed00637fff9c2bcee63ef9e8985b3e6e2abff1c1f4787dc0730b9765576fac9173dd05cbc289aed3c0d20ff374a78976beb86c73adb221184415e4906a41 SHA512 17779e5bbc20fff6da607898620a8193e11ef13ddc033e7868776aab53a710e09428dca0450f11368d750bf7179fd4850ac3a8a445bd9537d987bd837853f4e5 +DIST buildah-1.1.tar.gz 4253820 BLAKE2B ae30a677a2f569d87da0ab85732078912598cf25f7b22ad25540f5d89797983a8549eef1bc8d151d4e0be078b97e024df145bb882bdd8443becb07774bfb5875 SHA512 9957590d7413436195307746682496616fd2350b832242f33fb4cb07c1144addae445eeff062f403d26a68329f1153468489032bc9bbcf870839c760a720ef95 EBUILD buildah-1.0.ebuild 1030 BLAKE2B 6433baa65962203139b9ff71c665f46d7de0a6d74e90c55cf32c9a0559af94d3eb7b3707f4184c83902e92231bbdebae3769b83110dfe41570e5642e25b45a8d SHA512 207cb4e59bfa5f233fe0c97ddb967ff9521b4e16828e9a7186a2c93968b6c2e14d5dd41185bcd0e45096dde0d00eeb3c848490db1fe6400c35110786e21129f6 -MISC metadata.xml 330 BLAKE2B 0be4a049ad821a2355b1d5ac21ae58def26c7f3310a56c7b870c25e6c018f1bc6147c59bfdc42885ba4f8238538d69e31928f35f002ec5ba684da87673b8f87c SHA512 c8c1341578b493bc9b68d615fb68232bed4369a60b839e397ba03e330f452e23124e180ee804a3fb1708169382aa65046931bc480f2690f37c3f698c12a94963 +EBUILD buildah-1.1.ebuild 1388 BLAKE2B 8dd9609a8d7c8e2f132e7f0d07b311c05fb0a364cd9c63d3f68c065e40bfe4776c3b1650463064ff96b40dc64ebaec9c87c6ed346705f371925822b2d097a7db SHA512 fb2c0381296021c4e4e60649532413b154c2a5e28fcc91fa3998e8be1e845d0c5f215bb17b0397441df63fd5bfea7d72b9f281ec891cf11b1bd309b2e52d8bcb +MISC metadata.xml 433 BLAKE2B 5b06389433033a1cf28f5fcae5dd41f4ebe0582d9537e8e163fad82046a66477a6ac3ed26ea63e60ea392919afcd3f0f45ae8ddabefd3a518707d5adff04e9d6 SHA512 3ab67ceda6ca0c8bd10f8868172d9686c8eeaa856760453be1c3ba907abb734ba37f5e9885547a16f69c67aa8d96e576de1ddf3208c08f4d44c2d90b081c74a6 diff --git a/app-emulation/buildah/buildah-1.1.ebuild b/app-emulation/buildah/buildah-1.1.ebuild new file mode 100644 index 000000000000..3be0b76e6b5f --- /dev/null +++ b/app-emulation/buildah/buildah-1.1.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit bash-completion-r1 golang-vcs-snapshot + +KEYWORDS="~amd64" +DESCRIPTION="A tool that facilitates building OCI images" +HOMEPAGE="https://github.com/projectatomic/buildah" +LICENSE="Apache-2.0" +SLOT="0" +IUSE="ostree selinux" +EGO_PN="${HOMEPAGE#*//}" +EGIT_COMMIT="v${PV}" +GIT_COMMIT="fbf46d3" +SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" +RDEPEND="app-crypt/gpgme:= + app-emulation/skopeo + dev-libs/libgpg-error:= + dev-libs/libassuan:= + sys-fs/lvm2:= + sys-libs/libseccomp:= + selinux? ( sys-libs/libselinux:= )" +DEPEND="${RDEPEND}" +RESTRICT="test" +REQUIRED_USE="!selinux? ( !ostree )" +S="${WORKDIR}/${P}/src/${EGO_PN}" + +src_prepare() { + default + sed -e 's|^\(GIT_COMMIT := \).*|\1'${GIT_COMMIT}'|' -i Makefile || die + + [[ -f ostree_tag.sh ]] || die + use ostree || { echo -e "#!/bin/sh\necho containers_image_ostree_stub" > \ + ostree_tag.sh || die; } + + [[ -f selinux_tag.sh ]] || die + use selinux || { echo -e "#!/bin/sh\ntrue" > \ + selinux_tag.sh || die; } +} + +src_compile() { + GOPATH="${WORKDIR}/${P}" emake all +} + +src_install() { + dodoc CHANGELOG.md CONTRIBUTING.md README.md + doman docs/*.1 + dodoc -r docs/tutorials + dobin ${PN} imgtype + dobashcomp contrib/completions/bash/buildah +} + +src_test() { + GOPATH="${WORKDIR}/${P}" emake test-unit +} diff --git a/app-emulation/buildah/metadata.xml b/app-emulation/buildah/metadata.xml index 07a3ba13a110..e09086fd802c 100644 --- a/app-emulation/buildah/metadata.xml +++ b/app-emulation/buildah/metadata.xml @@ -5,6 +5,11 @@ zmedico@gentoo.org Zac Medico + + + Enables dependencies for handling of OSTree images. + + projectatomic/buildah diff --git a/app-emulation/docker/Manifest b/app-emulation/docker/Manifest index 90ccb7b2ae49..9f7ea8e35904 100644 --- a/app-emulation/docker/Manifest +++ b/app-emulation/docker/Manifest @@ -4,6 +4,7 @@ DIST docker-18.03.1.tar.gz 12758590 BLAKE2B 98213af07b945fda536e321ef5cc9e272848 DIST docker-18.05.0.tar.gz 12822443 BLAKE2B 16f96ddbbb2b9d06724d659dba71990fd1aae1a568fb2d1bc7f6ae2bf2133524f6e0c1192deb045021342d3a8cc273f67b7228c51c032e75ee75c00a47f76bf8 SHA512 81997f32a45bf9cf7e79c936728999dac84e6c51e7ec04c7dd4f0fc1fbc837aaddd2ce4fa5e4e3eb2ee99599b005f06104b81b0fa858e59692c17398a341bfd1 EBUILD docker-17.12.1-r1.ebuild 8355 BLAKE2B 2635bafbdc6be0840a83717e862b45045c0c30748c8633b76d2913b6497fbf921a24e85580208055ed22eb92c6fd990e1642cac56e41a7149d614d328b65c670 SHA512 e78bbe39f140d48ca9c49ff7efda41f5d531327ec9be528238aa2929636cc59704dadaa7d689c7c34abcab2c869430f118763878a74cecc0bcf73748cfa2cc69 EBUILD docker-18.03.1.ebuild 8337 BLAKE2B f0b13adc75d2a334eaf91938b2774a5216fa4ef7905032f59e313d87367c7de07a6868e443f65db881bbeaabc8aeaf008aec8836827513b546ddd3bfeab599d7 SHA512 09645b50f569e37e94c7f8e36503ce949fe709ff22d579b9e2e2183a573196ae3bdf0a991c71af56a37e2e8fa7e3341289154dee4e1a336ea1b212cd63079bc9 +EBUILD docker-18.05.0-r1.ebuild 8445 BLAKE2B 577b09594e9ed4d9a74f2a56655e96de772c5a0820d09d58728c195c9b062b484e7c930e79150e8ecb83cda73853a1493204f58b839c4bad68d331c106e5bdeb SHA512 9b75250b759f228ac78b182097b8e52d9aeec0d88d8260a2c4335f75bdc8a8dbdd588ee3503f1e3c65027eb435139c9ddf07503bb6a617b905a03ee489204549 EBUILD docker-18.05.0.ebuild 8355 BLAKE2B 20456aafd21ee6a408bc07a43933ed1ec43210b2ee3651891a132a3c3b2731ded5af129a50e4f8ed9da3b8c38951678183164d9004f1ddc788375a78122e7a99 SHA512 8d5d01b4a270368de798558de44423aefe5cab17590882a9e57c74c41ebc73368ad28b10824bde845747f942035b036c483c71b556d28498a3d6524a946255f3 -EBUILD docker-9999.ebuild 8077 BLAKE2B 8b65d3c59a41acd2020f1a43cf79bea2871fb7b911170741eb3c217e9acd4a5a24b2c2e204e3635cac3e392c72bdafc332b25fe0613991e37cb3d7c55700d399 SHA512 1fb9025bd12796909a623a3ebc9da52e4e8fd73d11f60e25907530fcb62039d7dcf580e4e6f22f103cf1a07aee8bfd6975fa11bd0829952d23613d4ae7ade9c4 +EBUILD docker-9999.ebuild 8168 BLAKE2B d1111f0132aa330f95f8f9dcd5c49aee0c8a0eaa5ee3cbd567be89f0d2f4b8c230c80d817fe14272d7c2765f1877ad070ebe98107575ec0f43d10e2f6f6b089b SHA512 e629feee1e546a0ea4570692446697899199248334fc00337963eda8857fadde618fc42ad23288f4239cb7f6f71ad52a61a2d275e54a7694fd79fa1fc1610df3 MISC metadata.xml 1637 BLAKE2B 14c56a84e41ebd76827cf37c27fe21259ca06e00d8c7fe318bd5eca609a77a9e23fc5ea13caba1616e47d17978402f715e6a8bc40643ce0cfb3ee87494ee6858 SHA512 bdaea32036a7f65f7015634d45bdf4f13322f3266cda389b49d2c57ad86e9811731194af5786e312d5ea40dab8b8eb78fc7b79a2ffee186b8eaabae9cc3c7a1b diff --git a/app-emulation/docker/docker-18.05.0-r1.ebuild b/app-emulation/docker/docker-18.05.0-r1.ebuild new file mode 100644 index 000000000000..f92326ef664c --- /dev/null +++ b/app-emulation/docker/docker-18.05.0-r1.ebuild @@ -0,0 +1,305 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +EGO_PN="github.com/docker/docker-ce" + +if [[ ${PV} = *9999* ]]; then + # Docker cannot be fetched via "go get", thanks to autogenerated code + EGIT_REPO_URI="https://${EGO_PN}.git" + EGIT_CHECKOUT_DIR="${WORKDIR}/${P}/src/${EGO_PN}" + inherit git-r3 +else + inherit versionator + if [ "$(get_version_component_count)" = 4 ]; then + MY_PV="$(replace_version_separator 3 '-ce-')" + else + MY_PV="$PV-ce" + fi + DOCKER_GITCOMMIT="f150324" + EGIT_COMMIT="v${MY_PV}" + SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~arm64" + [ "$DOCKER_GITCOMMIT" ] || die "DOCKER_GITCOMMIT must be added manually for each bump!" + inherit golang-vcs-snapshot +fi +inherit bash-completion-r1 golang-base linux-info systemd udev user + +DESCRIPTION="The core functions you need to create Docker images and run Docker containers" +HOMEPAGE="https://dockerproject.org" +LICENSE="Apache-2.0" +SLOT="0" +IUSE="apparmor aufs btrfs +container-init +device-mapper hardened +overlay pkcs11 seccomp" + +# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#build-dependencies +CDEPEND=" + >=dev-db/sqlite-3.7.9:3 + device-mapper? ( + >=sys-fs/lvm2-2.02.89[thin] + ) + seccomp? ( >=sys-libs/libseccomp-2.2.1 ) + apparmor? ( sys-libs/libapparmor ) +" + +DEPEND=" + ${CDEPEND} + + dev-go/go-md2man + + btrfs? ( + >=sys-fs/btrfs-progs-3.16.1 + ) +" + +# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#runtime-dependencies +# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#optional-dependencies +RDEPEND=" + ${CDEPEND} + >=net-firewall/iptables-1.4 + sys-process/procps + >=dev-vcs/git-1.7 + >=app-arch/xz-utils-4.9 + dev-libs/libltdl + ~app-emulation/containerd-1.0.3_p20180223 + ~app-emulation/runc-1.0.0_rc5[apparmor?,seccomp?] + ~app-emulation/docker-proxy-0.8.0_p20180411 + container-init? ( >=sys-process/tini-0.16.1[static] ) +" + +RESTRICT="installsources strip" + +S="${WORKDIR}/${P}/src/${EGO_PN}" + +PATCHES=( "${FILESDIR}"/bsc1073877-docker-apparmor-add-signal.patch ) + +# see "contrib/check-config.sh" from upstream's sources +CONFIG_CHECK=" + ~NAMESPACES ~NET_NS ~PID_NS ~IPC_NS ~UTS_NS + ~CGROUPS ~CGROUP_CPUACCT ~CGROUP_DEVICE ~CGROUP_FREEZER ~CGROUP_SCHED ~CPUSETS ~MEMCG + ~KEYS + ~VETH ~BRIDGE ~BRIDGE_NETFILTER + ~NF_NAT_IPV4 ~IP_NF_FILTER ~IP_NF_TARGET_MASQUERADE + ~NETFILTER_XT_MATCH_ADDRTYPE ~NETFILTER_XT_MATCH_CONNTRACK ~NETFILTER_XT_MATCH_IPVS + ~IP_NF_NAT ~NF_NAT ~NF_NAT_NEEDED + ~POSIX_MQUEUE + + ~USER_NS + ~SECCOMP + ~CGROUP_PIDS + ~MEMCG_SWAP ~MEMCG_SWAP_ENABLED + + ~BLK_CGROUP ~BLK_DEV_THROTTLING ~IOSCHED_CFQ ~CFQ_GROUP_IOSCHED + ~CGROUP_PERF + ~CGROUP_HUGETLB + ~NET_CLS_CGROUP + ~CFS_BANDWIDTH ~FAIR_GROUP_SCHED ~RT_GROUP_SCHED + ~IP_VS ~IP_VS_PROTO_TCP ~IP_VS_PROTO_UDP ~IP_VS_NFCT ~IP_VS_RR + + ~VXLAN + ~CRYPTO ~CRYPTO_AEAD ~CRYPTO_GCM ~CRYPTO_SEQIV ~CRYPTO_GHASH ~XFRM_ALGO ~XFRM_USER + ~IPVLAN + ~MACVLAN ~DUMMY +" + +ERROR_KEYS="CONFIG_KEYS: is mandatory" +ERROR_MEMCG_SWAP="CONFIG_MEMCG_SWAP: is required if you wish to limit swap usage of containers" +ERROR_RESOURCE_COUNTERS="CONFIG_RESOURCE_COUNTERS: is optional for container statistics gathering" + +ERROR_BLK_CGROUP="CONFIG_BLK_CGROUP: is optional for container statistics gathering" +ERROR_IOSCHED_CFQ="CONFIG_IOSCHED_CFQ: is optional for container statistics gathering" +ERROR_CGROUP_PERF="CONFIG_CGROUP_PERF: is optional for container statistics gathering" +ERROR_CFS_BANDWIDTH="CONFIG_CFS_BANDWIDTH: is optional for container statistics gathering" +ERROR_XFRM_ALGO="CONFIG_XFRM_ALGO: is optional for secure networks" +ERROR_XFRM_USER="CONFIG_XFRM_USER: is optional for secure networks" + +pkg_setup() { + if kernel_is lt 3 10; then + ewarn "" + ewarn "Using Docker with kernels older than 3.10 is unstable and unsupported." + ewarn " - http://docs.docker.com/engine/installation/binaries/#check-kernel-dependencies" + fi + + if kernel_is le 3 18; then + CONFIG_CHECK+=" + ~RESOURCE_COUNTERS + " + fi + + if kernel_is le 3 13; then + CONFIG_CHECK+=" + ~NETPRIO_CGROUP + " + else + CONFIG_CHECK+=" + ~CGROUP_NET_PRIO + " + fi + + if kernel_is lt 4 5; then + CONFIG_CHECK+=" + ~MEMCG_KMEM + " + ERROR_MEMCG_KMEM="CONFIG_MEMCG_KMEM: is optional" + fi + + if kernel_is lt 4 7; then + CONFIG_CHECK+=" + ~DEVPTS_MULTIPLE_INSTANCES + " + fi + + if use aufs; then + CONFIG_CHECK+=" + ~AUFS_FS + ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY + " + ERROR_AUFS_FS="CONFIG_AUFS_FS: is required to be set if and only if aufs-sources are used instead of aufs4/aufs3" + fi + + if use btrfs; then + CONFIG_CHECK+=" + ~BTRFS_FS + ~BTRFS_FS_POSIX_ACL + " + fi + + if use device-mapper; then + CONFIG_CHECK+=" + ~BLK_DEV_DM ~DM_THIN_PROVISIONING ~EXT4_FS ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY + " + fi + + if use overlay; then + CONFIG_CHECK+=" + ~OVERLAY_FS ~EXT4_FS_SECURITY ~EXT4_FS_POSIX_ACL + " + fi + + linux-info_pkg_setup + + # create docker group for the code checking for it in /etc/group + enewgroup docker +} + +src_compile() { + export GOPATH="${WORKDIR}/${P}" + + # setup CFLAGS and LDFLAGS for separate build target + # see https://github.com/tianon/docker-overlay/pull/10 + export CGO_CFLAGS="-I${ROOT}/usr/include" + export CGO_LDFLAGS="-L${ROOT}/usr/$(get_libdir)" + + # if we're building from a tarball, we need the GITCOMMIT value + [ "$DOCKER_GITCOMMIT" ] && export DOCKER_GITCOMMIT + + # fake golang layout + ln -s docker-ce/components/engine ../docker || die + ln -s docker-ce/components/cli ../cli || die + + # let's set up some optional features :) + export DOCKER_BUILDTAGS='' + for gd in aufs btrfs device-mapper overlay; do + if ! use $gd; then + DOCKER_BUILDTAGS+=" exclude_graphdriver_${gd//-/}" + fi + done + + for tag in apparmor pkcs11 seccomp; do + if use $tag; then + DOCKER_BUILDTAGS+=" $tag" + fi + done + + pushd components/engine || die + + if use hardened; then + sed -i "s/EXTLDFLAGS_STATIC='/&-fno-PIC /" hack/make.sh || die + grep -q -- '-fno-PIC' hack/make.sh || die 'hardened sed failed' + sed "s/LDFLAGS_STATIC_DOCKER='/&-extldflags -fno-PIC /" \ + -i hack/make/dynbinary-daemon || die + grep -q -- '-fno-PIC' hack/make/dynbinary-daemon || die 'hardened sed failed' + fi + + # build daemon + VERSION="$(cat ../../VERSION)" \ + ./hack/make.sh dynbinary || die 'dynbinary failed' + + popd || die # components/engine + + pushd components/cli || die + + # build cli + emake \ + LDFLAGS="$(usex hardened '-extldflags -fno-PIC' '')" \ + VERSION="$(cat ../../VERSION)" \ + GITCOMMIT="${DOCKER_GITCOMMIT}" \ + DISABLE_WARN_OUTSIDE_CONTAINER=1 \ + dynbinary || die + + # build man pages + go build -o gen-manpages github.com/docker/cli/man || die + ./gen-manpages --root . --target ./man/man1 || die + ./man/md2man-all.sh -q || die + rm gen-manpages || die + # see "components/cli/scripts/docs/generate-man.sh" (which also does "go get" for go-md2man) + + popd || die # components/cli +} + +src_install() { + dosym containerd /usr/bin/docker-containerd + dosym containerd-shim /usr/bin/docker-containerd-shim + dosym runc /usr/bin/docker-runc + use container-init && dosym tini /usr/bin/docker-init + + pushd components/engine || die + newbin "$(readlink -f bundles/latest/dynbinary-daemon/dockerd)" dockerd + + newinitd contrib/init/openrc/docker.initd docker + newconfd contrib/init/openrc/docker.confd docker + + systemd_dounit contrib/init/systemd/docker.{service,socket} + + udev_dorules contrib/udev/*.rules + + dodoc AUTHORS CONTRIBUTING.md CHANGELOG.md NOTICE README.md + dodoc -r docs/* + + insinto /usr/share/vim/vimfiles + doins -r contrib/syntax/vim/ftdetect + doins -r contrib/syntax/vim/syntax + + # note: intentionally not using "doins" so that we preserve +x bits + dodir /usr/share/${PN}/contrib + cp -R contrib/* "${ED}/usr/share/${PN}/contrib" + popd || die # components/engine + + pushd components/cli || die + + newbin build/docker-* docker + + doman man/man*/* + + dobashcomp contrib/completion/bash/* + insinto /usr/share/fish/vendor_completions.d/ + doins contrib/completion/fish/docker.fish + insinto /usr/share/zsh/site-functions + doins contrib/completion/zsh/_* + popd || die # components/cli +} + +pkg_postinst() { + udev_reload + + elog + elog "To use Docker, the Docker daemon must be running as root. To automatically" + elog "start the Docker daemon at boot, add Docker to the default runlevel:" + elog " rc-update add docker default" + elog "Similarly for systemd:" + elog " systemctl enable docker.service" + elog + elog "To use Docker as a non-root user, add yourself to the 'docker' group:" + elog " usermod -aG docker youruser" + elog +} diff --git a/app-emulation/docker/docker-9999.ebuild b/app-emulation/docker/docker-9999.ebuild index c682315da3f8..9892842ffebd 100644 --- a/app-emulation/docker/docker-9999.ebuild +++ b/app-emulation/docker/docker-9999.ebuild @@ -261,6 +261,9 @@ src_install() { insinto /usr/share/zsh/site-functions doins contrib/completion/zsh/_* + insinto /usr/share/fish/vendor_completions.d/ + doins contrib/completion/fish/docker.fish + insinto /usr/share/vim/vimfiles doins -r contrib/syntax/vim/ftdetect doins -r contrib/syntax/vim/syntax diff --git a/app-emulation/qemu/Manifest b/app-emulation/qemu/Manifest index 24412519e817..281713b9f335 100644 --- a/app-emulation/qemu/Manifest +++ b/app-emulation/qemu/Manifest @@ -11,6 +11,6 @@ DIST qemu-2.11.1.tar.bz2 32819412 BLAKE2B 6b6d4e7b8dcf33aeedb0b33bad267da07ad17c DIST qemu-2.12.0-patches-r4.tar.xz 5376 BLAKE2B 7abc107b7971798c039cb99546dced0807a1904064e8397d93ba35b7b2ea22bdccf0c4f5ff8233ea7932534bd7320b506eff1ff7bb969d67d2752a7d8f81fbea SHA512 71c03ef3d6f9021d775201330ed08ace0bc34c7c3c4632a30486d54872fa457f8256e055034bbe2efcd98d718a7d714f00710961b3819568678444db6b457d92 DIST qemu-2.12.0.tar.bz2 41196232 BLAKE2B f258e570558249ea647c3571908f90b8bacdcef9a1814009b98571cf0e96406194d44aa041fd0a97c9b673f39a9eaae8d873824745509778a6784cd85f8398b0 SHA512 91d829f44c431e4c1cd335f3efea5afff9da62d832b0296a92417463ea0826d09ce226c2ea8ac167fe7b99b6bb976c7cb1357aaf17735ee57af6602161e46346 EBUILD qemu-2.11.1-r2.ebuild 23622 BLAKE2B cd2249a4ae34c67ccadfce510e9def671a147d0eb921db68b02d0a5d13ff45548cdbfcca1dd086be1436bed77ddec3c9215139ed361c485fbd5e87de7177177d SHA512 af5677ff0fd37b77305b41f963767cceff6d4dd5074eefc2239447607e64587464f3fb989c3cee7110c65c1aecabd29b47ab48bfee25705007a9edffac533af5 -EBUILD qemu-2.12.0-r3.ebuild 23991 BLAKE2B baf8ce0da248c882291423975ec6fdcededebdc03b7b4e539f05f6ec0876709b45597dc477bab5dcab8411c8df860b73868910d01722efcc4d1e799f0c57eecd SHA512 b96e0dd43835617b73ece3f8053ee6826392d28a0bebd00f04b7cfbdc789950559f4ad29921637e468cbc9c65d5da599c88dd709c91df0093c8efe4160b09713 +EBUILD qemu-2.12.0-r3.ebuild 23990 BLAKE2B 00c537137543d8a36a878dd39f4f80b871f469d0411dd0faec5b2ed7d80ec2aa4a7ea21fdb7533fd335af24027de317ac48cc85f701e7fe82c6cfb632ed45caf SHA512 76434c8dcbe3b2dc6bee976073211da1abd2f2b7ac71eccb676c8e446596436bbb894aa7d7a8981a7e66a31da297bd1db7dbdb0262b41123dd66f056f94ea941 EBUILD qemu-9999.ebuild 23861 BLAKE2B d69ab4a9338e3046fe305c25a97d9cbef3ba71e772eca7a02b431df85495d69de83763a472765b409f41f3a5a9880d05121e3b052196791f6146fcaabbc33c8b SHA512 b98cada8a18f12e60722fc662734d1d50a657b65c2ec920b0d2f72202c2cff05b5037a2e48cb2b20154211b16ba1d3f36f4018ed777abd8a640d27f90ba42232 MISC metadata.xml 4014 BLAKE2B e3ef3f3da149b756119932e7796ba2daf3327a841776dc64476730f33345e6a10abd45d8a52a45f1881f052d43902c0a6de0f3df02219ab9f8b5ce1fec12b635 SHA512 fd582b65e3eecacef5447b787fb465565fceb84a7fda9cd7079e5ae5b2ef4183ff7cd3187a5e751900bea6877fdda8e8357c792eef5431e76c4d672eb631481b diff --git a/app-emulation/qemu/qemu-2.12.0-r3.ebuild b/app-emulation/qemu/qemu-2.12.0-r3.ebuild index 9e4303a60423..f0dfe3c9180d 100644 --- a/app-emulation/qemu/qemu-2.12.0-r3.ebuild +++ b/app-emulation/qemu/qemu-2.12.0-r3.ebuild @@ -19,7 +19,7 @@ if [[ ${PV} = *9999* ]]; then SRC_URI="" else SRC_URI="http://wiki.qemu-project.org/download/${P}.tar.bz2" - KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86 ~x86-fbsd" + KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 x86 ~x86-fbsd" # Gentoo specific patchsets: SRC_URI+=" https://dev.gentoo.org/~tamiko/distfiles/${P}-patches-r4.tar.xz" diff --git a/app-emulation/reg/Manifest b/app-emulation/reg/Manifest index 22e3c004eb62..f0aa2bfcd247 100644 --- a/app-emulation/reg/Manifest +++ b/app-emulation/reg/Manifest @@ -1,5 +1,7 @@ DIST reg-0.13.3.tar.gz 5396000 BLAKE2B c5fa658010cb5c1cc21d7edfc1b18fac8c65cf2bd3c6de213ab238aabcb1377096172b5484a92f18a04f9ef4c01124dcfcfd4e6eabaf9f9a9b272c6f1f1fc482 SHA512 aefe0e5d3b1a02d54e67a4c7892e6b6c7581793f9e45995933200125c275e38701ad25b772c4541714f72ad1b43865e484bd062e40edbb7ed5faf2a572c224a1 DIST reg-0.13.4.tar.gz 5401627 BLAKE2B 278462ff66917833feb9a660b39f9826afe1b71f7a75dad07f3673bd5ba63496152aa70147649ddf9d2266cbad3903ba3a4bbe4a7def76a932ea45131bdda8c5 SHA512 f8a1a52824b64cc252a5cd4f6c18d8cf73c88170342f0bab61664f5cdb50295510182c3c15afdfa02c1eae8d299e347a78b47d171ca275c01ecfd9228323c872 +DIST reg-0.14.1.tar.gz 5401469 BLAKE2B 858c699b15e2222685e114d7c7619424dde6eb87cff08f79de621d5c0d35303b0e8f10981b5c0839633eebbb223658189369899f1a3e15bbdf1cf10dffcf88cf SHA512 2904b5da02cd5f0d98447aa86e36e13f96b1e0ef8f81f97d3fd801e3d477909c6d893db8af4e84591a4630633a698b8a21e673d5abbc169812ebd857615b8401 EBUILD reg-0.13.3.ebuild 806 BLAKE2B 5c3fe5fb410486a9cd0a6cf615c67115d1146e5a0f7f7af893775d33bf2f019688dc3eb34a82536970c586dfc3426f06737dccddfcdf7a725bcd700fb4750524 SHA512 602b21b967133649100f7b45ef634fa6efafcbccc7ccc4e379cf1d1f35b1299f943e1738a5136bbcf34834ba7b7bf9d842ca2eef3517b657006b280d47992ae2 EBUILD reg-0.13.4.ebuild 806 BLAKE2B ab560a1208b10c2ffcd8a691d86310a3ec29fcc813008524078d7c298dc40591017f80bd05387de0096264dde2e387b09b81797306744d379b7af78eb7ad9e1d SHA512 03748e3f43301af2b5924f65ab19f40a34cd450debbef6f2d92f06b9aeee84fa702ecd3aa93d12ad766fda3dd3526839ff7c3d8895366f88f66ef801bd060eb0 +EBUILD reg-0.14.1.ebuild 806 BLAKE2B bdb9149e9e8249644e47728ef52ad416dfb921602a35247d9612d91da64804b4a57d2797de5c2e8d5e9fceb0563371f8e3d16df8185c2b6bc6b9f9dba2a5217b SHA512 bf6db05e2f1671908a0cf2f7e234db6f1f8d9f3c87f34094684ae38ac87e142e915a0e81de0ba60fb03bc6bff0ab4eeb9c9017ed4e594422279b0ebe69019337 MISC metadata.xml 326 BLAKE2B 82f2440e792104c0c9e1afe4d95b9972efc7b233524637e32f11c2b5746aba7990d88f01a542e25f7a5c9c52aac0c5c1e25bc5703d3e855ea8e8ef4ffe87929c SHA512 9fea1224db7eb9316eff5bd89ebf748cbf35160516b33a9c9a3a07d1db6a2fa64dafcf8623a24af09429f7b76cc94ee02a39145162d0b039cb9d0137bc51a20e diff --git a/app-emulation/reg/reg-0.14.1.ebuild b/app-emulation/reg/reg-0.14.1.ebuild new file mode 100644 index 000000000000..83a59172bdb2 --- /dev/null +++ b/app-emulation/reg/reg-0.14.1.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit golang-build golang-vcs-snapshot + +EGO_PN="github.com/genuinetools/reg" +EGIT_COMMIT="v${PV}" +GIT_COMMIT="d25a2c83ae5414c8a72f2e1ab96529fb1744fe26" +ARCHIVE_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" +KEYWORDS="~amd64" + +DESCRIPTION="Docker registry v2 command line client" +HOMEPAGE="https://github.com/genuinetools/reg" +SRC_URI="${ARCHIVE_URI}" +LICENSE="MIT" +SLOT="0" +IUSE="" + +RESTRICT="test" + +src_compile() { + pushd src/${EGO_PN} || die + GOPATH="${S}" go build -v -ldflags "-X ${EGO_PN}/version.GITCOMMIT=${GIT_COMMIT} -X ${EGO_PN}/version.VERSION=${PV}" -o "${S}"/bin/reg . || die + popd || die +} + +src_install() { + dobin bin/* + dodoc src/${EGO_PN}/README.md +} diff --git a/app-emulation/wine-any/Manifest b/app-emulation/wine-any/Manifest index 3d348a0c8f18..a8509fea8707 100644 --- a/app-emulation/wine-any/Manifest +++ b/app-emulation/wine-any/Manifest @@ -1,18 +1,18 @@ DIST gentoo-wine-patches-20180120.tar.xz 58672 BLAKE2B 84d621075b65475cec41a06429680b518d7eafb938cefd903f3f8aa71ea3049ac9d8de05af48f9f4f4a1b9172c7ef17784540413e410eb8ec11e8ec4a63858c6 SHA512 5b354a409c7a2b77499aaa593b9248a1d15d755e3687b095755faacc30068bfcdbdd5c2a2a78617cb1a78c46d2931162bd69ec3379b035d81494bea7108263c2 DIST wine-2.0.tar.bz2 23662707 BLAKE2B 1d485c1359ce8a0395a9f6378c1f8be33ea2836b80390d1eb1095057a0acedd21708daab16e1851a315391b9f9b0a360879b9d98c73bcc8371c5023e9a8037f5 SHA512 b0a57ba8202d9fc396e5bfb7a7718d6bababbed8f3351e7fdc36afa37f35a871e04903757618f73427aeb71a52b2d323977d79e48f8b38d636f23fd404441186 -DIST wine-3.7.tar.xz 20454036 BLAKE2B 04ac94d5679377c5d0bb37a6d3e8e3ec7c09faa300f8422a09a22b14ef4244d2bb14c80a47cfca5e11526506a8064f0cfa4e28868d7f04669f85ab743dbbb36d SHA512 a699418574dd8f407c064421cf6cdfe3923562c8adf9a7749e716f3853291eab05358ea64f0217c303c26c0f8f59d2116024b7b6978f9a52a055147e689a8694 +DIST wine-3.10.tar.xz 20485784 BLAKE2B 3a5e9ca948880a3bc979c33e797296d156425438c2502c3d2c50a6d5241e485bdc081ff195b0647cfa1db1cab247e941f02d0511f7b94dc0037fa24e2e61eb5c SHA512 bb1a1d8e8ad7f48d9fcf48ebbf0ebbb8e3b45ea211736bd7837144ea34b373f74955d3c0ccc4cdc44020eea23c8af8e67252e1c5cd6115e11419ad5f6ef24843 DIST wine-3.8.tar.xz 20473392 BLAKE2B a7873dd15a373491703e16888044cf2ba00121f91a4583fe6dcf687b5179a2d926035cc86c75f70ceca03a508bd4712c58a1662186e0a6e0c139e63e686f8c5d SHA512 387c6bff3eafac7e92030d11c02b3461b4ead059d2aad7f6d903e176f304d2ac0a426132fcd452507868f0d22bb360a30734edf3e73dfd514037458f08406e98 DIST wine-3.9.tar.xz 20508952 BLAKE2B 6fbf22673588963c483b7b31e82287c09e15b579b8f57267e2731768f95a1f986954bb473ee0dfa2428802fe9331b8599a01c782dd1152d36ce2002b6a4e6bde SHA512 4c4e5a741a61b9427c175e015177df5806638736f7dfd92098ed95239d41a373cbab876c054d3c948e1db6a7de359db3babd63bc194edc8c2c3be28b58f75e64 DIST wine-d3d9-2.0.tar.gz 48373 BLAKE2B 80370a7519141030a7e54c2ea5db410b2bf1cde8d8389618487c52e4ff40f87cf7b0f9087331bb43fa6436e1b9936de9cc00a02b9ab9ce6528635a245e6a8b3f SHA512 a9e2d1c9f2784128e4c53a8dc923070a5057b5ff3d83c2b536a2d2df0bc8433ac92b8ab1c3cdf34158c0e7bfe497ddb5974605fbc1736a92307639d59450c7a1 -DIST wine-d3d9-3.7.tar.gz 50699 BLAKE2B 1ab795a0636e7654cc1c96e2a0ba40ff7f89eaa2983d68c4a0eabf3a69355e68e833fee63fbbff67ba840a28d34724a841c1c3c6695ae2d8bcaf38f7fbf4fd16 SHA512 9a02e40bda9c26001857355ddfb1ba68afb518158260b0904c5aaef3991e19587dcc107cc34b01b9fbda7e710be488384b020bbf8d56632cce787ffb299bc3f3 +DIST wine-d3d9-3.10.tar.gz 50540 BLAKE2B c9127e5504cbf0d0fe338645bc2d8ed6f71db1174f8ab8ff9e92457745f5ccf6ac8bd043442a5a250b9da7e0c157113682cbf184041488ef6ebaecce2bebdafc SHA512 6397005616ab6424ba9e5c289e935c15b3b789717d887afb28bee1b30912052d6c47495d9b91952c38da7be03382dd0dc708fea42f7fe4c6221cf315c5faa810 DIST wine-d3d9-3.8.tar.gz 50700 BLAKE2B 33b71ef6e8839e55a74afa10eaabdbfadee6a99c94d89c402b796516aaa72d094c024a253c9f06f4685b8453f097513fa88f6dc72a4fe230c44d0d960e6d44d3 SHA512 e036f9da5993732415752d1f076eba5fd378ad49949a12d094081ff02454dfd8ce2156a5f418b77aa1426772f0b0785f3b0ffb9fc84e80c6265b6e5b7226bf15 DIST wine-d3d9-3.9.tar.gz 50551 BLAKE2B 3f77b541b39172dd606bcd9083bae71e75c7b5cf129132dffe1e2261519c5e330aff92545169ce6148d35d292fda9a7367f3bb3951e9777d68c9c1bfd6659e3f SHA512 bdc0ce6e1d0bb247ae6421b4a3a6c600453647105f679113c7db78984ec7154b0728140facd2e3e1a64f0ff0969ab93c2829e72557c42f7a7ad05faf1c906499 DIST wine-staging-2.0.tar.gz 10182575 BLAKE2B 1de645f66fa3e5e0d8ceddf5439fd246510470f63d6331c7029abed7192180b7b8430e43a2e732a30a5fbe0c73ba39b7fafcfc08830c68e679dff90576c3a960 SHA512 51412299259d6e92c8993543d5fdb3239ebe31e0d1d715e0a9e8ce94b3139c0567b08ff1600d41be94f12427cbfccc2f6b6b2ed030535445c95618aaf6578580 -DIST wine-staging-3.7.tar.gz 9951654 BLAKE2B 3d6c9a023f3a4f9da6e506a88490365d4f0959231e7f9e375e8ae46006c3cfd82ca4e65af9df79d9c54cf7ee5e53452b10ac5146f2c0de97a7c4946aefac3cd5 SHA512 4a00b7c61121798b6c4e918aadeb71865e359f6471035b9ed33ae242f3fe70f1977b1c0b3628fb244b5ba4942d771d2ee797bcc087d38192fcd9325e1886ed14 +DIST wine-staging-3.10.tar.gz 9943542 BLAKE2B 412319529e6fe9bb21a4629e1ae1896fe47a413a7ab688d6245fd5b85aa2969be040df3fa8d0ad6185617c814c7b69df891c9067260de28e505298695a6776ea SHA512 baae31ce569c06f8ac5ffc579d8f3bb95de55c50b83c1db13eaaeaee5c8c5b3b7fb6028d69dce6645ac697692372a65be8d60532123a94e0f5fcd0778d2082c5 DIST wine-staging-3.8.tar.gz 9957202 BLAKE2B 1f85ebc9cf8f5d3c684ce60a59783355ec558e62a8c93564107de2893e82257846be45b3f55fd23f9b317245acc04ee3c4884003572169d6f0efef30145e33f7 SHA512 46ba27b0b9fe5f86d1647f12050715b796604c91487cad6847dce5250ffcfdf8ccf44dcff79c88048221cbf58af92ed72523c09f3591e2c5306bba24ff9d154c DIST wine-staging-3.9.tar.gz 9932873 BLAKE2B 9a0bb5689b1d2cff6e133f0dd94cc13b63f59ef9e5b129aaf48501317a75aadbf27058fe8cc436816501cbe416c285504d9c98504024f9a0606ee4c4afc48e4b SHA512 4f52937621b7e5a3f4b3e52ecba8c7d318c621e76c8e4ce3be176d56b382bf06e3a0453d37c3b725df63f0a7349f53a7c075148c7e1ed89a028696538e31acad EBUILD wine-any-2.0-r1.ebuild 20915 BLAKE2B 7ff1002e303dd2a083267fbf24e4b6cb0e3ff620d6bbf78b8fb15d66fb4d11669812233f1edeea0f46e75b9a0c8a9e63244aa4bebb594b95d158d55fc2506e6d SHA512 8e1bd0d4391f1e9336f9c39ce46d97f921f70cae75d961bc8fe8c7ec6c51bbba621c19a3171f0c351ce6e038d37a7f9a73f6f0bb4622f176e5a994e4a989b2e7 -EBUILD wine-any-3.7.ebuild 20861 BLAKE2B 0acb0152cb2d03946e6bab0bf75da0d90971500a076ecca9f2bea56c9b541c00c7839b94a417b8003de02c1fd5bce0e7fe39bc1abda52f3c4e1dabd75d0b8b52 SHA512 1c10d5aab4aa672bc9d42a3b4c530fd39c09b7d05708e2955899619327ffa70ca37cc3e1e88535e6ecc598ee870c30722a62b96b88a34f95e8a5c892fcaf489a +EBUILD wine-any-3.10.ebuild 20939 BLAKE2B 6398dbe0506755239701eaf5cae9f2cbeb6d72376430bc018f3dfd03b374d06f909879b5c965a0b7fc1fa7be1b1668e62cd64e836cf8a6163c2977f17d6bf472 SHA512 23b1c71c7736ab423747ed69c9f5b591cd569bfc81be48f5d0d8778acc010a8bf3f95f51c4b975026a9670d9db2160bdf7b709e64eb48e8f3586883eeb034ae2 EBUILD wine-any-3.8.ebuild 20861 BLAKE2B 0acb0152cb2d03946e6bab0bf75da0d90971500a076ecca9f2bea56c9b541c00c7839b94a417b8003de02c1fd5bce0e7fe39bc1abda52f3c4e1dabd75d0b8b52 SHA512 1c10d5aab4aa672bc9d42a3b4c530fd39c09b7d05708e2955899619327ffa70ca37cc3e1e88535e6ecc598ee870c30722a62b96b88a34f95e8a5c892fcaf489a EBUILD wine-any-3.9.ebuild 20939 BLAKE2B 6398dbe0506755239701eaf5cae9f2cbeb6d72376430bc018f3dfd03b374d06f909879b5c965a0b7fc1fa7be1b1668e62cd64e836cf8a6163c2977f17d6bf472 SHA512 23b1c71c7736ab423747ed69c9f5b591cd569bfc81be48f5d0d8778acc010a8bf3f95f51c4b975026a9670d9db2160bdf7b709e64eb48e8f3586883eeb034ae2 EBUILD wine-any-9999.ebuild 20939 BLAKE2B 6398dbe0506755239701eaf5cae9f2cbeb6d72376430bc018f3dfd03b374d06f909879b5c965a0b7fc1fa7be1b1668e62cd64e836cf8a6163c2977f17d6bf472 SHA512 23b1c71c7736ab423747ed69c9f5b591cd569bfc81be48f5d0d8778acc010a8bf3f95f51c4b975026a9670d9db2160bdf7b709e64eb48e8f3586883eeb034ae2 diff --git a/app-emulation/wine-any/wine-any-3.10.ebuild b/app-emulation/wine-any/wine-any-3.10.ebuild new file mode 100644 index 000000000000..17171df2844a --- /dev/null +++ b/app-emulation/wine-any/wine-any-3.10.ebuild @@ -0,0 +1,639 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PLOCALES="ar bg ca cs da de el en en_US eo es fa fi fr he hi hr hu it ja ko lt ml nb_NO nl or pa pl pt_BR pt_PT rm ro ru sk sl sr_RS@cyrillic sr_RS@latin sv te th tr uk wa zh_CN zh_TW" +PLOCALE_BACKUP="en" + +inherit autotools estack eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils + +MY_PN="${PN%%-*}" +MY_P="${MY_PN}-${PV}" + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://source.winehq.org/git/wine.git" + EGIT_BRANCH="master" + inherit git-r3 + SRC_URI="" + #KEYWORDS="" +else + MAJOR_V=$(get_version_component_range 1) + SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz" + KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +fi +S="${WORKDIR}/${MY_P}" + +STAGING_P="wine-staging-${PV}" +STAGING_DIR="${WORKDIR}/${STAGING_P}" +D3D9_P="wine-d3d9-${PV}" +D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}" +GWP_V="20180120" +PATCHDIR="${WORKDIR}/gentoo-wine-patches" + +DESCRIPTION="Free implementation of Windows(tm) on Unix, with optional external patchsets" +HOMEPAGE="https://www.winehq.org/" +SRC_URI="${SRC_URI} + https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz +" + +if [[ ${PV} == "9999" ]] ; then + STAGING_EGIT_REPO_URI="https://github.com/wine-staging/wine-staging.git" + D3D9_EGIT_REPO_URI="https://github.com/sarnex/wine-d3d9-patches.git" +else + SRC_URI="${SRC_URI} + staging? ( https://github.com/wine-staging/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz ) + d3d9? ( https://github.com/sarnex/wine-d3d9-patches/archive/${D3D9_P}.tar.gz )" +fi + +LICENSE="LGPL-2.1" +SLOT="${PV}" +IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags d3d9 dos elibc_glibc +fontconfig +gecko gphoto2 gsm gssapi gstreamer +jpeg kerberos kernel_FreeBSD +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl pcap pipelight +png prelink pulseaudio +realtime +run-exes s3tc samba scanner sdl selinux +ssl staging test themes +threads +truetype udev +udisks v4l vaapi vkd3d vulkan +X +xcomposite xinerama +xml" +REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) + X? ( truetype ) + elibc_glibc? ( threads ) + osmesa? ( opengl ) + pipelight? ( staging ) + s3tc? ( staging ) + test? ( abi_x86_32 ) + themes? ( staging ) + vaapi? ( staging )" # osmesa-opengl #286560 # X-truetype #551124 + +# FIXME: the test suite is unsuitable for us; many tests require net access +# or fail due to Xvfb's opengl limitations. +RESTRICT="test" + +COMMON_DEPEND=" + X? ( + x11-libs/libXcursor[${MULTILIB_USEDEP}] + x11-libs/libXext[${MULTILIB_USEDEP}] + x11-libs/libXfixes[${MULTILIB_USEDEP}] + x11-libs/libXrandr[${MULTILIB_USEDEP}] + x11-libs/libXi[${MULTILIB_USEDEP}] + x11-libs/libXxf86vm[${MULTILIB_USEDEP}] + ) + alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) + capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] ) + cups? ( net-print/cups:=[${MULTILIB_USEDEP}] ) + d3d9? ( + media-libs/mesa[d3d9,egl,${MULTILIB_USEDEP}] + x11-libs/libX11[${MULTILIB_USEDEP}] + x11-libs/libXext[${MULTILIB_USEDEP}] + x11-libs/libxcb[${MULTILIB_USEDEP}] + ) + fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] ) + gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) + gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] ) + gssapi? ( virtual/krb5[${MULTILIB_USEDEP}] ) + gstreamer? ( + media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] + media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] + ) + jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] ) + kerberos? ( virtual/krb5:0=[${MULTILIB_USEDEP}] ) + lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] ) + ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) + mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] ) + ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] ) + netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] ) + nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] ) + odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] ) + openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] ) + opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) + opengl? ( + virtual/glu[${MULTILIB_USEDEP}] + virtual/opengl[${MULTILIB_USEDEP}] + ) + osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] ) + pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) + png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) + pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] ) + scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] ) + sdl? ( media-libs/libsdl2:=[haptic,joystick,${MULTILIB_USEDEP}] ) + ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) + staging? ( sys-apps/attr[${MULTILIB_USEDEP}] ) + themes? ( + dev-libs/glib:2[${MULTILIB_USEDEP}] + x11-libs/cairo[${MULTILIB_USEDEP}] + x11-libs/gtk+:3[${MULTILIB_USEDEP}] + ) + truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] ) + udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) + udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) + v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) + vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] ) + vkd3d? ( app-emulation/vkd3d[${MULTILIB_USEDEP}] ) + vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] ) + xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) + xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) + xml? ( + dev-libs/libxml2[${MULTILIB_USEDEP}] + dev-libs/libxslt[${MULTILIB_USEDEP}] + )" + +RDEPEND="${COMMON_DEPEND} + app-emulation/wine-desktop-common + >app-eselect/eselect-wine-0.3 + !app-emulation/wine:0 + dos? ( >=games-emulation/dosbox-0.74_p20160629 ) + gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] ) + mono? ( app-emulation/wine-mono:4.7.1 ) + perl? ( + dev-lang/perl + dev-perl/XML-Simple + ) + pulseaudio? ( + realtime? ( sys-auth/rtkit ) + ) + s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] ) + samba? ( >=net-fs/samba-3.0.25[winbind] ) + selinux? ( sec-policy/selinux-wine ) + udisks? ( sys-fs/udisks:2 )" + +# tools/make_requests requires perl +DEPEND="${COMMON_DEPEND} + sys-devel/flex + >=sys-kernel/linux-headers-2.6 + virtual/pkgconfig + virtual/yacc + X? ( x11-base/xorg-proto ) + prelink? ( sys-devel/prelink ) + staging? ( + dev-lang/perl + dev-perl/XML-Simple + ) + xinerama? ( x11-base/xorg-proto )" + +# These use a non-standard "Wine" category, which is provided by +# /etc/xdg/applications-merged/wine.menu +QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop +usr/share/applications/wine-notepad.desktop +usr/share/applications/wine-uninstaller.desktop +usr/share/applications/wine-winecfg.desktop" + +PATCHES=( + "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726 + "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615 + "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508 + "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611 +) +PATCHES_BIN=() + +# https://bugs.gentoo.org/show_bug.cgi?id=635222 +if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then + DEPEND+=" dev-util/patchbin" +fi + +wine_compiler_check() { + [[ ${MERGE_TYPE} = "binary" ]] && return 0 + + # GCC-specific bugs + if tc-is-gcc; then + # bug #549768 + if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then + ebegin "Checking for gcc-5 ms_abi compiler bug" + $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die + # Run in subshell to prevent "Aborted" message + ( "${T}"/pr66838 || false ) >/dev/null 2>&1 + if ! eend $?; then + eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0" + eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild," + eerror "or use gcc-config to select a different compiler version." + eerror "See https://bugs.gentoo.org/549768" + eerror + return 1 + fi + fi + # bug #574044 + if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then + ebegin "Checking for gcc-5-3 stack realignment compiler bug" + # Compile in subshell to prevent "Aborted" message + ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1 + if ! eend $?; then + eerror "Wine cannot be built with this version of gcc-5.3" + eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild," + eerror "or use gcc-config to select a different compiler version." + eerror "See https://bugs.gentoo.org/574044" + eerror + return 1 + fi + fi + fi + + # Ensure compiler support + if use abi_x86_64; then + ebegin "Checking for 64-bit compiler with builtin_ms_va_list support" + # Compile in subshell to prevent "Aborted" message + ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1) + if ! eend $?; then + eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine" + eerror + eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine" + eerror + return 1 + fi + fi +} + +wine_build_environment_check() { + [[ ${MERGE_TYPE} = "binary" ]] && return 0 + + if use abi_x86_64; then + if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then + eerror "You need gcc-4.4+ to compile 64-bit wine" + die + elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then + eerror "You need clang-3.8+ to compile 64-bit wine" + die + fi + fi + if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then + ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by" + ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in" + ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4" + fi + if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then + if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then + ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work" + ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine." + ewarn "See package.env in man 5 portage for more information on how to do this." + ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details" + fi + fi + + if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then + eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only." + eerror "See https://bugs.gentoo.org/487864 for more details." + eerror + return 1 + fi +} + +wine_env_vcs_vars() { + local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT" + local pn_live_val="${pn_live_var}" + eval pn_live_val='$'${pn_live_val} + if [[ ! -z ${pn_live_val} ]]; then + if use staging || use d3d9; then + eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}" + eerror "cannot be used to set the commit. Instead, you may use the" + eerror "environmental variables WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT." + eerror + return 1 + fi + fi + if [[ ! -z ${EGIT_COMMIT} ]]; then + eerror "Commits must now be specified using the environmental variables" + eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT" + eerror + return 1 + fi +} + +pkg_pretend() { + wine_build_environment_check || die + + # Verify OSS support + if use oss && ! use kernel_FreeBSD; then + if ! has_version ">=media-sound/oss-4"; then + eerror "You cannot build wine with USE=oss without having support from a" + eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)" + eerror + die + fi + fi +} + +pkg_setup() { + wine_build_environment_check || die + wine_env_vcs_vars || die + + WINE_VARIANT="${PN#wine}-${PV}" + WINE_VARIANT="${WINE_VARIANT#-}" + + MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}" + MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}" + MY_DATADIR="${MY_DATAROOTDIR}" + MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}" + MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}" + MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}" + MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}" + MY_MANDIR="${MY_DATADIR}/man" +} + +src_unpack() { + if [[ ${PV} == "9999" ]] ; then + EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack + if use staging; then + local CURRENT_WINE_COMMIT=${EGIT_VERSION} + + git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}" + git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}" + + local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die + + if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then + einfo "The current Staging patchset is not guaranteed to apply on this WINE commit." + einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT." + einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine" + fi + fi + if use d3d9; then + git-r3_fetch "${D3D9_EGIT_REPO_URI}" "${D3D9_COMMIT}" + git-r3_checkout "${D3D9_EGIT_REPO_URI}" "${D3D9_DIR}" + fi + fi + + default + + l10n_find_plocales_changes "${S}/po" "" ".po" +} + +src_prepare() { + + eapply_bin(){ + local patch + for patch in ${PATCHES_BIN[@]}; do + patchbin --nogit < "${patch}" || die + done + } + + local md5="$(md5sum server/protocol.def)" + + if use staging; then + ewarn "Applying the Wine-Staging patchset. Any bug reports to the" + ewarn "Wine bugzilla should explicitly state that staging was used." + + local STAGING_EXCLUDE="" + use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight" + + # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches + ebegin "Running Wine-Staging patch installer" + ( + set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE} + cd "${STAGING_DIR}/patches" + source "${STAGING_DIR}/patches/patchinstall.sh" + ) + eend $? || die "Failed to apply Wine-Staging patches" + fi + if use d3d9; then + if use staging; then + PATCHES+=( "${D3D9_DIR}/staging-helper.patch" ) + else + PATCHES+=( "${D3D9_DIR}/d3d9-helper.patch" ) + fi + PATCHES+=( "${D3D9_DIR}/wine-d3d9.patch" ) + fi + + default + eapply_bin + eautoreconf + + # Modification of the server protocol requires regenerating the server requests + if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then + einfo "server/protocol.def was patched; running tools/make_requests" + tools/make_requests || die #432348 + fi + sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die + if ! use run-exes; then + sed -i '/^MimeType/d' loader/wine.desktop || die #117785 + fi + + # Edit wine.desktop to work for specific variant + sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die + + # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652 + cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die + + l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS + + # Fix manpage generation for locales #469418 and abi_x86_64 #617864 + + # Duplicate manpages input files for wine64 + local f + for f in loader/*.man.in; do + cp ${f} ${f/wine/wine64} || die + done + # Add wine64 manpages to Makefile + if use abi_x86_64; then + sed -i "/wine.man.in/i \ + \\\twine64.man.in \\\\" loader/Makefile.in || die + sed -i -E 's/(.*wine)(.*\.UTF-8\.man\.in.*)/&\ +\164\2/' loader/Makefile.in || die + fi + + rm_man_file(){ + local file="${1}" + loc=${2} + sed -i "/${loc}\.UTF-8\.man\.in/d" "${file}" || die + } + + while read f; do + l10n_for_each_disabled_locale_do rm_man_file "${f}" + done < <(find -name "Makefile.in" -exec grep -q "UTF-8.man.in" "{}" \; -print) +} + +src_configure() { + wine_compiler_check || die + + export LDCONFIG=/bin/true + use custom-cflags || strip-flags + + multilib-minimal_src_configure +} + +multilib_src_configure() { + local myconf=( + --prefix="${MY_PREFIX}" + --datarootdir="${MY_DATAROOTDIR}" + --datadir="${MY_DATADIR}" + --docdir="${MY_DOCDIR}" + --includedir="${MY_INCLUDEDIR}" + --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}" + --libexecdir="${MY_LIBEXECDIR}" + --localstatedir="${MY_LOCALSTATEDIR}" + --mandir="${MY_MANDIR}" + --sysconfdir=/etc/wine + $(use_with alsa) + $(use_with capi) + $(use_with lcms cms) + $(use_with cups) + $(use_with ncurses curses) + $(use_with udisks dbus) + $(use_with fontconfig) + $(use_with ssl gnutls) + $(use_enable gecko mshtml) + $(use_with gphoto2 gphoto) + $(use_with gsm) + $(use_with gssapi) + $(use_with gstreamer) + --without-hal + $(use_with jpeg) + $(use_with kerberos krb5) + $(use_with ldap) + $(use_enable mono mscoree) + $(use_with mp3 mpg123) + $(use_with netapi) + $(use_with nls gettext) + $(use_with openal) + $(use_with opencl) + $(use_with opengl) + $(use_with osmesa) + $(use_with oss) + $(use_with pcap) + $(use_with png) + $(use_with pulseaudio pulse) + $(use_with threads pthread) + $(use_with scanner sane) + $(use_with sdl) + $(use_enable test tests) + $(use_with truetype freetype) + $(use_with udev) + $(use_with v4l) + $(use_with vkd3d) + $(use_with vulkan) + $(use_with X x) + $(use_with X xfixes) + $(use_with xcomposite) + $(use_with xinerama) + $(use_with xml) + $(use_with xml xslt) + ) + + use staging && myconf+=( + --with-xattr + $(use_with themes gtk3) + $(use_with vaapi va) + ) + use d3d9 && myconf+=( $(use_with d3d9 d3d9-nine) ) + + local PKG_CONFIG AR RANLIB + # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038 + # set AR and RANLIB to make QA scripts happy; #483342 + tc-export PKG_CONFIG AR RANLIB + + if use amd64; then + if [[ ${ABI} == amd64 ]]; then + myconf+=( --enable-win64 ) + else + myconf+=( --disable-win64 ) + fi + + # Note: using --with-wine64 results in problems with multilib.eclass + # CC/LD hackery. We're using separate tools instead. + fi + + ECONF_SOURCE=${S} \ + econf "${myconf[@]}" + emake depend +} + +multilib_src_test() { + # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader" + if [[ ${ABI} == x86 ]]; then + if [[ $(id -u) == 0 ]]; then + ewarn "Skipping tests since they cannot be run under the root user." + ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf" + return + fi + + WINEPREFIX="${T}/.wine-${ABI}" \ + Xemake test + fi +} + +multilib_src_install_all() { + local DOCS=( ANNOUNCE AUTHORS README ) + add_locale_docs() { + local locale_doc="documentation/README.$1" + [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} ) + } + l10n_for_each_locale_do add_locale_docs + + einstalldocs + prune_libtool_files --all + + if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script + rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \ + "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die + fi + + # Remove wineconsole if neither backend is installed #551124 + if ! use X && ! use ncurses; then + rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die + rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die + rm_wineconsole() { + rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die + } + multilib_foreach_abi rm_wineconsole + fi + + use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055 + use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader} + + if use abi_x86_64 && ! use abi_x86_32; then + dosym wine64 "${MY_PREFIX}"/bin/wine # 404331 + dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader + fi + + # Failglob for binloops, shouldn't be necessary, but including to stay safe + eshopts_push -s failglob #615218 + # Make wrappers for binaries for handling multiple variants + # Note: wrappers instead of symlinks because some are shell which use basename + local b + for b in "${D%/}${MY_PREFIX}"/bin/*; do + make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}" + done + eshopts_pop +} + +pkg_postinst() { + eselect wine register ${P} + if [[ ${PN} == "wine-vanilla" ]]; then + eselect wine register --vanilla ${P} || die + else + if use staging; then + eselect wine register --staging ${P} || die + fi + if use d3d9; then + eselect wine register --d3d9 ${P} || die + fi + fi + + eselect wine update --all --if-unset || die + + xdg_desktop_database_update + + if ! use gecko; then + ewarn "Without Wine Gecko, wine prefixes will not have a default" + ewarn "implementation of iexplore. Many older windows applications" + ewarn "rely upon the existence of an iexplore implementation, so" + ewarn "you will likely need to install an external one, like via winetricks" + fi + if ! use mono; then + ewarn "Without Wine Mono, wine prefixes will not have a default" + ewarn "implementation of .NET. Many windows applications rely upon" + ewarn "the existence of a .NET implementation, so you will likely need" + ewarn "to install an external one, like via winetricks" + fi +} + +pkg_prerm() { + eselect wine deregister ${P} + if [[ ${PN} == "wine-vanilla" ]]; then + eselect wine deregister --vanilla ${P} || die + else + if use staging; then + eselect wine deregister --staging ${P} || die + fi + if use d3d9; then + eselect wine deregister --d3d9 ${P} || die + fi + fi + + eselect wine update --all --if-unset || die +} + +pkg_postrm() { + xdg_desktop_database_update +} diff --git a/app-emulation/wine-any/wine-any-3.7.ebuild b/app-emulation/wine-any/wine-any-3.7.ebuild deleted file mode 100644 index 11a4e315f58d..000000000000 --- a/app-emulation/wine-any/wine-any-3.7.ebuild +++ /dev/null @@ -1,637 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PLOCALES="ar bg ca cs da de el en en_US eo es fa fi fr he hi hr hu it ja ko lt ml nb_NO nl or pa pl pt_BR pt_PT rm ro ru sk sl sr_RS@cyrillic sr_RS@latin sv te th tr uk wa zh_CN zh_TW" -PLOCALE_BACKUP="en" - -inherit autotools estack eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils - -MY_PN="${PN%%-*}" -MY_P="${MY_PN}-${PV}" - -if [[ ${PV} == "9999" ]] ; then - EGIT_REPO_URI="https://source.winehq.org/git/wine.git" - EGIT_BRANCH="master" - inherit git-r3 - SRC_URI="" - #KEYWORDS="" -else - MAJOR_V=$(get_version_component_range 1) - SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz" - KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" -fi -S="${WORKDIR}/${MY_P}" - -STAGING_P="wine-staging-${PV}" -STAGING_DIR="${WORKDIR}/${STAGING_P}" -D3D9_P="wine-d3d9-${PV}" -D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}" -GWP_V="20180120" -PATCHDIR="${WORKDIR}/gentoo-wine-patches" - -DESCRIPTION="Free implementation of Windows(tm) on Unix, with optional external patchsets" -HOMEPAGE="https://www.winehq.org/" -SRC_URI="${SRC_URI} - https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz -" - -if [[ ${PV} == "9999" ]] ; then - STAGING_EGIT_REPO_URI="https://github.com/wine-staging/wine-staging.git" - D3D9_EGIT_REPO_URI="https://github.com/sarnex/wine-d3d9-patches.git" -else - SRC_URI="${SRC_URI} - staging? ( https://github.com/wine-staging/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz ) - d3d9? ( https://github.com/sarnex/wine-d3d9-patches/archive/${D3D9_P}.tar.gz )" -fi - -LICENSE="LGPL-2.1" -SLOT="${PV}" -IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags d3d9 dos elibc_glibc +fontconfig +gecko gphoto2 gsm gssapi gstreamer +jpeg kerberos kernel_FreeBSD +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl pcap pipelight +png prelink pulseaudio +realtime +run-exes s3tc samba scanner sdl selinux +ssl staging test themes +threads +truetype udev +udisks v4l vaapi vulkan +X +xcomposite xinerama +xml" -REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) - X? ( truetype ) - elibc_glibc? ( threads ) - osmesa? ( opengl ) - pipelight? ( staging ) - s3tc? ( staging ) - test? ( abi_x86_32 ) - themes? ( staging ) - vaapi? ( staging )" # osmesa-opengl #286560 # X-truetype #551124 - -# FIXME: the test suite is unsuitable for us; many tests require net access -# or fail due to Xvfb's opengl limitations. -RESTRICT="test" - -COMMON_DEPEND=" - X? ( - x11-libs/libXcursor[${MULTILIB_USEDEP}] - x11-libs/libXext[${MULTILIB_USEDEP}] - x11-libs/libXfixes[${MULTILIB_USEDEP}] - x11-libs/libXrandr[${MULTILIB_USEDEP}] - x11-libs/libXi[${MULTILIB_USEDEP}] - x11-libs/libXxf86vm[${MULTILIB_USEDEP}] - ) - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) - capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] ) - cups? ( net-print/cups:=[${MULTILIB_USEDEP}] ) - d3d9? ( - media-libs/mesa[d3d9,egl,${MULTILIB_USEDEP}] - x11-libs/libX11[${MULTILIB_USEDEP}] - x11-libs/libXext[${MULTILIB_USEDEP}] - x11-libs/libxcb[${MULTILIB_USEDEP}] - ) - fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] ) - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) - gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] ) - gssapi? ( virtual/krb5[${MULTILIB_USEDEP}] ) - gstreamer? ( - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] - media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] - ) - jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] ) - kerberos? ( virtual/krb5:0=[${MULTILIB_USEDEP}] ) - lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] ) - ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) - mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] ) - ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] ) - netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] ) - nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] ) - odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] ) - openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] ) - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) - opengl? ( - virtual/glu[${MULTILIB_USEDEP}] - virtual/opengl[${MULTILIB_USEDEP}] - ) - osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] ) - pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) - pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] ) - scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] ) - sdl? ( media-libs/libsdl2:=[haptic,joystick,${MULTILIB_USEDEP}] ) - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) - staging? ( sys-apps/attr[${MULTILIB_USEDEP}] ) - themes? ( - dev-libs/glib:2[${MULTILIB_USEDEP}] - x11-libs/cairo[${MULTILIB_USEDEP}] - x11-libs/gtk+:3[${MULTILIB_USEDEP}] - ) - truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] ) - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) - udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) - v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) - vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] ) - vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] ) - xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) - xml? ( - dev-libs/libxml2[${MULTILIB_USEDEP}] - dev-libs/libxslt[${MULTILIB_USEDEP}] - )" - -RDEPEND="${COMMON_DEPEND} - app-emulation/wine-desktop-common - >app-eselect/eselect-wine-0.3 - !app-emulation/wine:0 - dos? ( >=games-emulation/dosbox-0.74_p20160629 ) - gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] ) - mono? ( app-emulation/wine-mono:4.7.1 ) - perl? ( - dev-lang/perl - dev-perl/XML-Simple - ) - pulseaudio? ( - realtime? ( sys-auth/rtkit ) - ) - s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] ) - samba? ( >=net-fs/samba-3.0.25[winbind] ) - selinux? ( sec-policy/selinux-wine ) - udisks? ( sys-fs/udisks:2 )" - -# tools/make_requests requires perl -DEPEND="${COMMON_DEPEND} - sys-devel/flex - >=sys-kernel/linux-headers-2.6 - virtual/pkgconfig - virtual/yacc - X? ( x11-base/xorg-proto ) - prelink? ( sys-devel/prelink ) - staging? ( - dev-lang/perl - dev-perl/XML-Simple - ) - xinerama? ( x11-base/xorg-proto )" - -# These use a non-standard "Wine" category, which is provided by -# /etc/xdg/applications-merged/wine.menu -QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop -usr/share/applications/wine-notepad.desktop -usr/share/applications/wine-uninstaller.desktop -usr/share/applications/wine-winecfg.desktop" - -PATCHES=( - "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726 - "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615 - "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508 - "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611 -) -PATCHES_BIN=() - -# https://bugs.gentoo.org/show_bug.cgi?id=635222 -if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then - DEPEND+=" dev-util/patchbin" -fi - -wine_compiler_check() { - [[ ${MERGE_TYPE} = "binary" ]] && return 0 - - # GCC-specific bugs - if tc-is-gcc; then - # bug #549768 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then - ebegin "Checking for gcc-5 ms_abi compiler bug" - $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die - # Run in subshell to prevent "Aborted" message - ( "${T}"/pr66838 || false ) >/dev/null 2>&1 - if ! eend $?; then - eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0" - eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild," - eerror "or use gcc-config to select a different compiler version." - eerror "See https://bugs.gentoo.org/549768" - eerror - return 1 - fi - fi - # bug #574044 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then - ebegin "Checking for gcc-5-3 stack realignment compiler bug" - # Compile in subshell to prevent "Aborted" message - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1 - if ! eend $?; then - eerror "Wine cannot be built with this version of gcc-5.3" - eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild," - eerror "or use gcc-config to select a different compiler version." - eerror "See https://bugs.gentoo.org/574044" - eerror - return 1 - fi - fi - fi - - # Ensure compiler support - if use abi_x86_64; then - ebegin "Checking for 64-bit compiler with builtin_ms_va_list support" - # Compile in subshell to prevent "Aborted" message - ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1) - if ! eend $?; then - eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine" - eerror - eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine" - eerror - return 1 - fi - fi -} - -wine_build_environment_check() { - [[ ${MERGE_TYPE} = "binary" ]] && return 0 - - if use abi_x86_64; then - if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then - eerror "You need gcc-4.4+ to compile 64-bit wine" - die - elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then - eerror "You need clang-3.8+ to compile 64-bit wine" - die - fi - fi - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then - ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by" - ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in" - ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4" - fi - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then - if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then - ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work" - ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine." - ewarn "See package.env in man 5 portage for more information on how to do this." - ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details" - fi - fi - - if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then - eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only." - eerror "See https://bugs.gentoo.org/487864 for more details." - eerror - return 1 - fi -} - -wine_env_vcs_vars() { - local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT" - local pn_live_val="${pn_live_var}" - eval pn_live_val='$'${pn_live_val} - if [[ ! -z ${pn_live_val} ]]; then - if use staging || use d3d9; then - eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}" - eerror "cannot be used to set the commit. Instead, you may use the" - eerror "environmental variables WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT." - eerror - return 1 - fi - fi - if [[ ! -z ${EGIT_COMMIT} ]]; then - eerror "Commits must now be specified using the environmental variables" - eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT" - eerror - return 1 - fi -} - -pkg_pretend() { - wine_build_environment_check || die - - # Verify OSS support - if use oss && ! use kernel_FreeBSD; then - if ! has_version ">=media-sound/oss-4"; then - eerror "You cannot build wine with USE=oss without having support from a" - eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)" - eerror - die - fi - fi -} - -pkg_setup() { - wine_build_environment_check || die - wine_env_vcs_vars || die - - WINE_VARIANT="${PN#wine}-${PV}" - WINE_VARIANT="${WINE_VARIANT#-}" - - MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}" - MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}" - MY_DATADIR="${MY_DATAROOTDIR}" - MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}" - MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}" - MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}" - MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}" - MY_MANDIR="${MY_DATADIR}/man" -} - -src_unpack() { - if [[ ${PV} == "9999" ]] ; then - EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack - if use staging; then - local CURRENT_WINE_COMMIT=${EGIT_VERSION} - - git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}" - git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}" - - local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die - - if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then - einfo "The current Staging patchset is not guaranteed to apply on this WINE commit." - einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT." - einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine" - fi - fi - if use d3d9; then - git-r3_fetch "${D3D9_EGIT_REPO_URI}" "${D3D9_COMMIT}" - git-r3_checkout "${D3D9_EGIT_REPO_URI}" "${D3D9_DIR}" - fi - fi - - default - - l10n_find_plocales_changes "${S}/po" "" ".po" -} - -src_prepare() { - - eapply_bin(){ - local patch - for patch in ${PATCHES_BIN[@]}; do - patchbin --nogit < "${patch}" || die - done - } - - local md5="$(md5sum server/protocol.def)" - - if use staging; then - ewarn "Applying the Wine-Staging patchset. Any bug reports to the" - ewarn "Wine bugzilla should explicitly state that staging was used." - - local STAGING_EXCLUDE="" - use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight" - - # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches - ebegin "Running Wine-Staging patch installer" - ( - set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE} - cd "${STAGING_DIR}/patches" - source "${STAGING_DIR}/patches/patchinstall.sh" - ) - eend $? || die "Failed to apply Wine-Staging patches" - fi - if use d3d9; then - if use staging; then - PATCHES+=( "${D3D9_DIR}/staging-helper.patch" ) - else - PATCHES+=( "${D3D9_DIR}/d3d9-helper.patch" ) - fi - PATCHES+=( "${D3D9_DIR}/wine-d3d9.patch" ) - fi - - default - eapply_bin - eautoreconf - - # Modification of the server protocol requires regenerating the server requests - if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then - einfo "server/protocol.def was patched; running tools/make_requests" - tools/make_requests || die #432348 - fi - sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die - if ! use run-exes; then - sed -i '/^MimeType/d' loader/wine.desktop || die #117785 - fi - - # Edit wine.desktop to work for specific variant - sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die - - # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652 - cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die - - l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS - - # Fix manpage generation for locales #469418 and abi_x86_64 #617864 - - # Duplicate manpages input files for wine64 - local f - for f in loader/*.man.in; do - cp ${f} ${f/wine/wine64} || die - done - # Add wine64 manpages to Makefile - if use abi_x86_64; then - sed -i "/wine.man.in/i \ - \\\twine64.man.in \\\\" loader/Makefile.in || die - sed -i -E 's/(.*wine)(.*\.UTF-8\.man\.in.*)/&\ -\164\2/' loader/Makefile.in || die - fi - - rm_man_file(){ - local file="${1}" - loc=${2} - sed -i "/${loc}\.UTF-8\.man\.in/d" "${file}" || die - } - - while read f; do - l10n_for_each_disabled_locale_do rm_man_file "${f}" - done < <(find -name "Makefile.in" -exec grep -q "UTF-8.man.in" "{}" \; -print) -} - -src_configure() { - wine_compiler_check || die - - export LDCONFIG=/bin/true - use custom-cflags || strip-flags - - multilib-minimal_src_configure -} - -multilib_src_configure() { - local myconf=( - --prefix="${MY_PREFIX}" - --datarootdir="${MY_DATAROOTDIR}" - --datadir="${MY_DATADIR}" - --docdir="${MY_DOCDIR}" - --includedir="${MY_INCLUDEDIR}" - --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}" - --libexecdir="${MY_LIBEXECDIR}" - --localstatedir="${MY_LOCALSTATEDIR}" - --mandir="${MY_MANDIR}" - --sysconfdir=/etc/wine - $(use_with alsa) - $(use_with capi) - $(use_with lcms cms) - $(use_with cups) - $(use_with ncurses curses) - $(use_with udisks dbus) - $(use_with fontconfig) - $(use_with ssl gnutls) - $(use_enable gecko mshtml) - $(use_with gphoto2 gphoto) - $(use_with gsm) - $(use_with gssapi) - $(use_with gstreamer) - --without-hal - $(use_with jpeg) - $(use_with kerberos krb5) - $(use_with ldap) - $(use_enable mono mscoree) - $(use_with mp3 mpg123) - $(use_with netapi) - $(use_with nls gettext) - $(use_with openal) - $(use_with opencl) - $(use_with opengl) - $(use_with osmesa) - $(use_with oss) - $(use_with pcap) - $(use_with png) - $(use_with pulseaudio pulse) - $(use_with threads pthread) - $(use_with scanner sane) - $(use_with sdl) - $(use_enable test tests) - $(use_with truetype freetype) - $(use_with udev) - $(use_with v4l) - $(use_with vulkan) - $(use_with X x) - $(use_with X xfixes) - $(use_with xcomposite) - $(use_with xinerama) - $(use_with xml) - $(use_with xml xslt) - ) - - use staging && myconf+=( - --with-xattr - $(use_with themes gtk3) - $(use_with vaapi va) - ) - use d3d9 && myconf+=( $(use_with d3d9 d3d9-nine) ) - - local PKG_CONFIG AR RANLIB - # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038 - # set AR and RANLIB to make QA scripts happy; #483342 - tc-export PKG_CONFIG AR RANLIB - - if use amd64; then - if [[ ${ABI} == amd64 ]]; then - myconf+=( --enable-win64 ) - else - myconf+=( --disable-win64 ) - fi - - # Note: using --with-wine64 results in problems with multilib.eclass - # CC/LD hackery. We're using separate tools instead. - fi - - ECONF_SOURCE=${S} \ - econf "${myconf[@]}" - emake depend -} - -multilib_src_test() { - # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader" - if [[ ${ABI} == x86 ]]; then - if [[ $(id -u) == 0 ]]; then - ewarn "Skipping tests since they cannot be run under the root user." - ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf" - return - fi - - WINEPREFIX="${T}/.wine-${ABI}" \ - Xemake test - fi -} - -multilib_src_install_all() { - local DOCS=( ANNOUNCE AUTHORS README ) - add_locale_docs() { - local locale_doc="documentation/README.$1" - [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} ) - } - l10n_for_each_locale_do add_locale_docs - - einstalldocs - prune_libtool_files --all - - if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script - rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \ - "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die - fi - - # Remove wineconsole if neither backend is installed #551124 - if ! use X && ! use ncurses; then - rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die - rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die - rm_wineconsole() { - rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die - } - multilib_foreach_abi rm_wineconsole - fi - - use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055 - use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader} - - if use abi_x86_64 && ! use abi_x86_32; then - dosym wine64 "${MY_PREFIX}"/bin/wine # 404331 - dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader - fi - - # Failglob for binloops, shouldn't be necessary, but including to stay safe - eshopts_push -s failglob #615218 - # Make wrappers for binaries for handling multiple variants - # Note: wrappers instead of symlinks because some are shell which use basename - local b - for b in "${D%/}${MY_PREFIX}"/bin/*; do - make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}" - done - eshopts_pop -} - -pkg_postinst() { - eselect wine register ${P} - if [[ ${PN} == "wine-vanilla" ]]; then - eselect wine register --vanilla ${P} || die - else - if use staging; then - eselect wine register --staging ${P} || die - fi - if use d3d9; then - eselect wine register --d3d9 ${P} || die - fi - fi - - eselect wine update --all --if-unset || die - - xdg_desktop_database_update - - if ! use gecko; then - ewarn "Without Wine Gecko, wine prefixes will not have a default" - ewarn "implementation of iexplore. Many older windows applications" - ewarn "rely upon the existence of an iexplore implementation, so" - ewarn "you will likely need to install an external one, like via winetricks" - fi - if ! use mono; then - ewarn "Without Wine Mono, wine prefixes will not have a default" - ewarn "implementation of .NET. Many windows applications rely upon" - ewarn "the existence of a .NET implementation, so you will likely need" - ewarn "to install an external one, like via winetricks" - fi -} - -pkg_prerm() { - eselect wine deregister ${P} - if [[ ${PN} == "wine-vanilla" ]]; then - eselect wine deregister --vanilla ${P} || die - else - if use staging; then - eselect wine deregister --staging ${P} || die - fi - if use d3d9; then - eselect wine deregister --d3d9 ${P} || die - fi - fi - - eselect wine update --all --if-unset || die -} - -pkg_postrm() { - xdg_desktop_database_update -} diff --git a/app-emulation/wine-d3d9/Manifest b/app-emulation/wine-d3d9/Manifest index d5aa4169a2aa..a5cbf9f91fd3 100644 --- a/app-emulation/wine-d3d9/Manifest +++ b/app-emulation/wine-d3d9/Manifest @@ -1,14 +1,14 @@ DIST gentoo-wine-patches-20180120.tar.xz 58672 BLAKE2B 84d621075b65475cec41a06429680b518d7eafb938cefd903f3f8aa71ea3049ac9d8de05af48f9f4f4a1b9172c7ef17784540413e410eb8ec11e8ec4a63858c6 SHA512 5b354a409c7a2b77499aaa593b9248a1d15d755e3687b095755faacc30068bfcdbdd5c2a2a78617cb1a78c46d2931162bd69ec3379b035d81494bea7108263c2 DIST wine-2.0.tar.bz2 23662707 BLAKE2B 1d485c1359ce8a0395a9f6378c1f8be33ea2836b80390d1eb1095057a0acedd21708daab16e1851a315391b9f9b0a360879b9d98c73bcc8371c5023e9a8037f5 SHA512 b0a57ba8202d9fc396e5bfb7a7718d6bababbed8f3351e7fdc36afa37f35a871e04903757618f73427aeb71a52b2d323977d79e48f8b38d636f23fd404441186 -DIST wine-3.7.tar.xz 20454036 BLAKE2B 04ac94d5679377c5d0bb37a6d3e8e3ec7c09faa300f8422a09a22b14ef4244d2bb14c80a47cfca5e11526506a8064f0cfa4e28868d7f04669f85ab743dbbb36d SHA512 a699418574dd8f407c064421cf6cdfe3923562c8adf9a7749e716f3853291eab05358ea64f0217c303c26c0f8f59d2116024b7b6978f9a52a055147e689a8694 +DIST wine-3.10.tar.xz 20485784 BLAKE2B 3a5e9ca948880a3bc979c33e797296d156425438c2502c3d2c50a6d5241e485bdc081ff195b0647cfa1db1cab247e941f02d0511f7b94dc0037fa24e2e61eb5c SHA512 bb1a1d8e8ad7f48d9fcf48ebbf0ebbb8e3b45ea211736bd7837144ea34b373f74955d3c0ccc4cdc44020eea23c8af8e67252e1c5cd6115e11419ad5f6ef24843 DIST wine-3.8.tar.xz 20473392 BLAKE2B a7873dd15a373491703e16888044cf2ba00121f91a4583fe6dcf687b5179a2d926035cc86c75f70ceca03a508bd4712c58a1662186e0a6e0c139e63e686f8c5d SHA512 387c6bff3eafac7e92030d11c02b3461b4ead059d2aad7f6d903e176f304d2ac0a426132fcd452507868f0d22bb360a30734edf3e73dfd514037458f08406e98 DIST wine-3.9.tar.xz 20508952 BLAKE2B 6fbf22673588963c483b7b31e82287c09e15b579b8f57267e2731768f95a1f986954bb473ee0dfa2428802fe9331b8599a01c782dd1152d36ce2002b6a4e6bde SHA512 4c4e5a741a61b9427c175e015177df5806638736f7dfd92098ed95239d41a373cbab876c054d3c948e1db6a7de359db3babd63bc194edc8c2c3be28b58f75e64 DIST wine-d3d9-2.0.tar.gz 48373 BLAKE2B 80370a7519141030a7e54c2ea5db410b2bf1cde8d8389618487c52e4ff40f87cf7b0f9087331bb43fa6436e1b9936de9cc00a02b9ab9ce6528635a245e6a8b3f SHA512 a9e2d1c9f2784128e4c53a8dc923070a5057b5ff3d83c2b536a2d2df0bc8433ac92b8ab1c3cdf34158c0e7bfe497ddb5974605fbc1736a92307639d59450c7a1 -DIST wine-d3d9-3.7.tar.gz 50699 BLAKE2B 1ab795a0636e7654cc1c96e2a0ba40ff7f89eaa2983d68c4a0eabf3a69355e68e833fee63fbbff67ba840a28d34724a841c1c3c6695ae2d8bcaf38f7fbf4fd16 SHA512 9a02e40bda9c26001857355ddfb1ba68afb518158260b0904c5aaef3991e19587dcc107cc34b01b9fbda7e710be488384b020bbf8d56632cce787ffb299bc3f3 +DIST wine-d3d9-3.10.tar.gz 50540 BLAKE2B c9127e5504cbf0d0fe338645bc2d8ed6f71db1174f8ab8ff9e92457745f5ccf6ac8bd043442a5a250b9da7e0c157113682cbf184041488ef6ebaecce2bebdafc SHA512 6397005616ab6424ba9e5c289e935c15b3b789717d887afb28bee1b30912052d6c47495d9b91952c38da7be03382dd0dc708fea42f7fe4c6221cf315c5faa810 DIST wine-d3d9-3.8.tar.gz 50700 BLAKE2B 33b71ef6e8839e55a74afa10eaabdbfadee6a99c94d89c402b796516aaa72d094c024a253c9f06f4685b8453f097513fa88f6dc72a4fe230c44d0d960e6d44d3 SHA512 e036f9da5993732415752d1f076eba5fd378ad49949a12d094081ff02454dfd8ce2156a5f418b77aa1426772f0b0785f3b0ffb9fc84e80c6265b6e5b7226bf15 DIST wine-d3d9-3.9.tar.gz 50551 BLAKE2B 3f77b541b39172dd606bcd9083bae71e75c7b5cf129132dffe1e2261519c5e330aff92545169ce6148d35d292fda9a7367f3bb3951e9777d68c9c1bfd6659e3f SHA512 bdc0ce6e1d0bb247ae6421b4a3a6c600453647105f679113c7db78984ec7154b0728140facd2e3e1a64f0ff0969ab93c2829e72557c42f7a7ad05faf1c906499 EBUILD wine-d3d9-2.0-r1.ebuild 18408 BLAKE2B d076c6114c7a8044803c22cc9e3b2ade886c2c5fe95f476fcb69558058733d1e75f178a956ebd5fde2c753690cc120df3c3161293af97031043d59a5f4ba4e7c SHA512 c6e0d90d32af5981ab83093680c0119c39c0843d818672270a83e9d40c5cf368641818fc8e82f29c7de07759cfc18d94990f400564987693c17bd24acb18f413 -EBUILD wine-d3d9-3.7.ebuild 18495 BLAKE2B dae0671629b084a1340625bfbb4a0159207b17085f1431081409abe71a1b7dcecc4f82660785cdba532df268028de31b38420d9e72910f90ff0ba8babef5371c SHA512 d06dd7491910b7524462f5f15c37c66cf99fd9fd882a2bd19c0dd464d0cdd6fdf955f679e333fed37235e0f2360ca9ddc0e1dec0a8256e91ee1d087b0d962283 +EBUILD wine-d3d9-3.10.ebuild 18573 BLAKE2B 8bc4d2359a4652beaee2ac1b7b459ad03408f2c0d2ff9145ff3889ffa5660797d8378f9e73c612e923d5121ba5af79b5f85fc2d4e81f0129033e5c6147e264c1 SHA512 8558b0e5c6f06bdbca8f26c9a47c9e0befba46a0a80282a90911e416f5b21f2f08a1299a0b4919ae701df1e5ad1db541d50058e3b55b03744e9643c1f1b96c46 EBUILD wine-d3d9-3.8.ebuild 18495 BLAKE2B dae0671629b084a1340625bfbb4a0159207b17085f1431081409abe71a1b7dcecc4f82660785cdba532df268028de31b38420d9e72910f90ff0ba8babef5371c SHA512 d06dd7491910b7524462f5f15c37c66cf99fd9fd882a2bd19c0dd464d0cdd6fdf955f679e333fed37235e0f2360ca9ddc0e1dec0a8256e91ee1d087b0d962283 EBUILD wine-d3d9-3.9.ebuild 18573 BLAKE2B 8bc4d2359a4652beaee2ac1b7b459ad03408f2c0d2ff9145ff3889ffa5660797d8378f9e73c612e923d5121ba5af79b5f85fc2d4e81f0129033e5c6147e264c1 SHA512 8558b0e5c6f06bdbca8f26c9a47c9e0befba46a0a80282a90911e416f5b21f2f08a1299a0b4919ae701df1e5ad1db541d50058e3b55b03744e9643c1f1b96c46 EBUILD wine-d3d9-9999.ebuild 18573 BLAKE2B 8bc4d2359a4652beaee2ac1b7b459ad03408f2c0d2ff9145ff3889ffa5660797d8378f9e73c612e923d5121ba5af79b5f85fc2d4e81f0129033e5c6147e264c1 SHA512 8558b0e5c6f06bdbca8f26c9a47c9e0befba46a0a80282a90911e416f5b21f2f08a1299a0b4919ae701df1e5ad1db541d50058e3b55b03744e9643c1f1b96c46 diff --git a/app-emulation/wine-d3d9/wine-d3d9-3.10.ebuild b/app-emulation/wine-d3d9/wine-d3d9-3.10.ebuild new file mode 100644 index 000000000000..76dbf2536327 --- /dev/null +++ b/app-emulation/wine-d3d9/wine-d3d9-3.10.ebuild @@ -0,0 +1,574 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PLOCALES="ar bg ca cs da de el en en_US eo es fa fi fr he hi hr hu it ja ko lt ml nb_NO nl or pa pl pt_BR pt_PT rm ro ru sk sl sr_RS@cyrillic sr_RS@latin sv te th tr uk wa zh_CN zh_TW" +PLOCALE_BACKUP="en" + +inherit autotools estack eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils + +MY_PN="${PN%%-*}" +MY_P="${MY_PN}-${PV}" + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://source.winehq.org/git/wine.git" + EGIT_BRANCH="master" + inherit git-r3 + SRC_URI="" + #KEYWORDS="" +else + MAJOR_V=$(get_version_component_range 1) + SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz" + KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +fi +S="${WORKDIR}/${MY_P}" + +D3D9_P="wine-d3d9-${PV}" +D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}" +GWP_V="20180120" +PATCHDIR="${WORKDIR}/gentoo-wine-patches" + +DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine patchset" +HOMEPAGE="https://www.winehq.org/" +SRC_URI="${SRC_URI} + https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz +" + +if [[ ${PV} == "9999" ]] ; then + D3D9_EGIT_REPO_URI="https://github.com/sarnex/wine-d3d9-patches.git" +else + SRC_URI="${SRC_URI} + d3d9? ( https://github.com/sarnex/wine-d3d9-patches/archive/${D3D9_P}.tar.gz )" +fi + +LICENSE="LGPL-2.1" +SLOT="${PV}" +IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags d3d9 dos elibc_glibc +fontconfig +gecko gphoto2 gsm gssapi gstreamer +jpeg kerberos kernel_FreeBSD +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl pcap +png prelink pulseaudio +realtime +run-exes samba scanner sdl selinux +ssl test +threads +truetype udev +udisks v4l vkd3d vulkan +X +xcomposite xinerama +xml" +REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) + X? ( truetype ) + elibc_glibc? ( threads ) + osmesa? ( opengl ) + test? ( abi_x86_32 )" # osmesa-opengl #286560 # X-truetype #551124 + +# FIXME: the test suite is unsuitable for us; many tests require net access +# or fail due to Xvfb's opengl limitations. +RESTRICT="test" + +COMMON_DEPEND=" + X? ( + x11-libs/libXcursor[${MULTILIB_USEDEP}] + x11-libs/libXext[${MULTILIB_USEDEP}] + x11-libs/libXfixes[${MULTILIB_USEDEP}] + x11-libs/libXrandr[${MULTILIB_USEDEP}] + x11-libs/libXi[${MULTILIB_USEDEP}] + x11-libs/libXxf86vm[${MULTILIB_USEDEP}] + ) + alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) + capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] ) + cups? ( net-print/cups:=[${MULTILIB_USEDEP}] ) + d3d9? ( + media-libs/mesa[d3d9,egl,${MULTILIB_USEDEP}] + x11-libs/libX11[${MULTILIB_USEDEP}] + x11-libs/libXext[${MULTILIB_USEDEP}] + x11-libs/libxcb[${MULTILIB_USEDEP}] + ) + fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] ) + gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) + gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] ) + gssapi? ( virtual/krb5[${MULTILIB_USEDEP}] ) + gstreamer? ( + media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] + media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] + ) + jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] ) + kerberos? ( virtual/krb5:0=[${MULTILIB_USEDEP}] ) + lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] ) + ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) + mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] ) + ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] ) + netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] ) + nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] ) + odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] ) + openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] ) + opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) + opengl? ( + virtual/glu[${MULTILIB_USEDEP}] + virtual/opengl[${MULTILIB_USEDEP}] + ) + osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] ) + pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) + png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) + pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] ) + scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] ) + sdl? ( media-libs/libsdl2:=[haptic,joystick,${MULTILIB_USEDEP}] ) + ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) + truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] ) + udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) + udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) + v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) + vkd3d? ( app-emulation/vkd3d[${MULTILIB_USEDEP}] ) + vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] ) + xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) + xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) + xml? ( + dev-libs/libxml2[${MULTILIB_USEDEP}] + dev-libs/libxslt[${MULTILIB_USEDEP}] + )" + +RDEPEND="${COMMON_DEPEND} + app-emulation/wine-desktop-common + >app-eselect/eselect-wine-0.3 + !app-emulation/wine:0 + dos? ( >=games-emulation/dosbox-0.74_p20160629 ) + gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] ) + mono? ( app-emulation/wine-mono:4.7.1 ) + perl? ( + dev-lang/perl + dev-perl/XML-Simple + ) + pulseaudio? ( + realtime? ( sys-auth/rtkit ) + ) + samba? ( >=net-fs/samba-3.0.25[winbind] ) + selinux? ( sec-policy/selinux-wine ) + udisks? ( sys-fs/udisks:2 )" + +# tools/make_requests requires perl +DEPEND="${COMMON_DEPEND} + sys-devel/flex + >=sys-kernel/linux-headers-2.6 + virtual/pkgconfig + virtual/yacc + X? ( x11-base/xorg-proto ) + prelink? ( sys-devel/prelink ) + xinerama? ( x11-base/xorg-proto )" + +# These use a non-standard "Wine" category, which is provided by +# /etc/xdg/applications-merged/wine.menu +QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop +usr/share/applications/wine-notepad.desktop +usr/share/applications/wine-uninstaller.desktop +usr/share/applications/wine-winecfg.desktop" + +PATCHES=( + "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726 + "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615 + "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508 + "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611 +) +PATCHES_BIN=() + +# https://bugs.gentoo.org/show_bug.cgi?id=635222 +if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then + DEPEND+=" dev-util/patchbin" +fi + +wine_compiler_check() { + [[ ${MERGE_TYPE} = "binary" ]] && return 0 + + # GCC-specific bugs + if tc-is-gcc; then + # bug #549768 + if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then + ebegin "Checking for gcc-5 ms_abi compiler bug" + $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die + # Run in subshell to prevent "Aborted" message + ( "${T}"/pr66838 || false ) >/dev/null 2>&1 + if ! eend $?; then + eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0" + eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild," + eerror "or use gcc-config to select a different compiler version." + eerror "See https://bugs.gentoo.org/549768" + eerror + return 1 + fi + fi + # bug #574044 + if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then + ebegin "Checking for gcc-5-3 stack realignment compiler bug" + # Compile in subshell to prevent "Aborted" message + ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1 + if ! eend $?; then + eerror "Wine cannot be built with this version of gcc-5.3" + eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild," + eerror "or use gcc-config to select a different compiler version." + eerror "See https://bugs.gentoo.org/574044" + eerror + return 1 + fi + fi + fi + + # Ensure compiler support + if use abi_x86_64; then + ebegin "Checking for 64-bit compiler with builtin_ms_va_list support" + # Compile in subshell to prevent "Aborted" message + ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1) + if ! eend $?; then + eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine" + eerror + eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine" + eerror + return 1 + fi + fi +} + +wine_build_environment_check() { + [[ ${MERGE_TYPE} = "binary" ]] && return 0 + + if use abi_x86_64; then + if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then + eerror "You need gcc-4.4+ to compile 64-bit wine" + die + elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then + eerror "You need clang-3.8+ to compile 64-bit wine" + die + fi + fi + if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then + ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by" + ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in" + ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4" + fi + if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then + if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then + ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work" + ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine." + ewarn "See package.env in man 5 portage for more information on how to do this." + ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details" + fi + fi + + if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then + eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only." + eerror "See https://bugs.gentoo.org/487864 for more details." + eerror + return 1 + fi +} + +wine_env_vcs_vars() { + local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT" + local pn_live_val="${pn_live_var}" + eval pn_live_val='$'${pn_live_val} + if [[ ! -z ${pn_live_val} ]]; then + if use d3d9; then + eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}" + eerror "cannot be used to set the commit. Instead, you may use the" + eerror "environmental variables WINE_COMMIT, and D3D9_COMMIT." + eerror + return 1 + fi + fi + if [[ ! -z ${EGIT_COMMIT} ]]; then + eerror "Commits must now be specified using the environmental variables" + eerror "WINE_COMMIT, and D3D9_COMMIT" + eerror + return 1 + fi +} + +pkg_pretend() { + wine_build_environment_check || die + + # Verify OSS support + if use oss && ! use kernel_FreeBSD; then + if ! has_version ">=media-sound/oss-4"; then + eerror "You cannot build wine with USE=oss without having support from a" + eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)" + eerror + die + fi + fi +} + +pkg_setup() { + wine_build_environment_check || die + wine_env_vcs_vars || die + + WINE_VARIANT="${PN#wine}-${PV}" + WINE_VARIANT="${WINE_VARIANT#-}" + + MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}" + MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}" + MY_DATADIR="${MY_DATAROOTDIR}" + MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}" + MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}" + MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}" + MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}" + MY_MANDIR="${MY_DATADIR}/man" +} + +src_unpack() { + if [[ ${PV} == "9999" ]] ; then + EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack + if use d3d9; then + git-r3_fetch "${D3D9_EGIT_REPO_URI}" "${D3D9_COMMIT}" + git-r3_checkout "${D3D9_EGIT_REPO_URI}" "${D3D9_DIR}" + fi + fi + + default + + l10n_find_plocales_changes "${S}/po" "" ".po" +} + +src_prepare() { + + eapply_bin(){ + local patch + for patch in ${PATCHES_BIN[@]}; do + patchbin --nogit < "${patch}" || die + done + } + + local md5="$(md5sum server/protocol.def)" + + if use d3d9; then + PATCHES+=( "${D3D9_DIR}/d3d9-helper.patch" ) + PATCHES+=( "${D3D9_DIR}/wine-d3d9.patch" ) + fi + + default + eapply_bin + eautoreconf + + # Modification of the server protocol requires regenerating the server requests + if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then + einfo "server/protocol.def was patched; running tools/make_requests" + tools/make_requests || die #432348 + fi + sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die + if ! use run-exes; then + sed -i '/^MimeType/d' loader/wine.desktop || die #117785 + fi + + # Edit wine.desktop to work for specific variant + sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die + + # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652 + cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die + + l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS + + # Fix manpage generation for locales #469418 and abi_x86_64 #617864 + + # Duplicate manpages input files for wine64 + local f + for f in loader/*.man.in; do + cp ${f} ${f/wine/wine64} || die + done + # Add wine64 manpages to Makefile + if use abi_x86_64; then + sed -i "/wine.man.in/i \ + \\\twine64.man.in \\\\" loader/Makefile.in || die + sed -i -E 's/(.*wine)(.*\.UTF-8\.man\.in.*)/&\ +\164\2/' loader/Makefile.in || die + fi + + rm_man_file(){ + local file="${1}" + loc=${2} + sed -i "/${loc}\.UTF-8\.man\.in/d" "${file}" || die + } + + while read f; do + l10n_for_each_disabled_locale_do rm_man_file "${f}" + done < <(find -name "Makefile.in" -exec grep -q "UTF-8.man.in" "{}" \; -print) +} + +src_configure() { + wine_compiler_check || die + + export LDCONFIG=/bin/true + use custom-cflags || strip-flags + + multilib-minimal_src_configure +} + +multilib_src_configure() { + local myconf=( + --prefix="${MY_PREFIX}" + --datarootdir="${MY_DATAROOTDIR}" + --datadir="${MY_DATADIR}" + --docdir="${MY_DOCDIR}" + --includedir="${MY_INCLUDEDIR}" + --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}" + --libexecdir="${MY_LIBEXECDIR}" + --localstatedir="${MY_LOCALSTATEDIR}" + --mandir="${MY_MANDIR}" + --sysconfdir=/etc/wine + $(use_with alsa) + $(use_with capi) + $(use_with lcms cms) + $(use_with cups) + $(use_with ncurses curses) + $(use_with udisks dbus) + $(use_with fontconfig) + $(use_with ssl gnutls) + $(use_enable gecko mshtml) + $(use_with gphoto2 gphoto) + $(use_with gsm) + $(use_with gssapi) + $(use_with gstreamer) + --without-hal + $(use_with jpeg) + $(use_with kerberos krb5) + $(use_with ldap) + $(use_enable mono mscoree) + $(use_with mp3 mpg123) + $(use_with netapi) + $(use_with nls gettext) + $(use_with openal) + $(use_with opencl) + $(use_with opengl) + $(use_with osmesa) + $(use_with oss) + $(use_with pcap) + $(use_with png) + $(use_with pulseaudio pulse) + $(use_with threads pthread) + $(use_with scanner sane) + $(use_with sdl) + $(use_enable test tests) + $(use_with truetype freetype) + $(use_with udev) + $(use_with v4l) + $(use_with vkd3d) + $(use_with vulkan) + $(use_with X x) + $(use_with X xfixes) + $(use_with xcomposite) + $(use_with xinerama) + $(use_with xml) + $(use_with xml xslt) + ) + + use d3d9 && myconf+=( $(use_with d3d9 d3d9-nine) ) + + local PKG_CONFIG AR RANLIB + # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038 + # set AR and RANLIB to make QA scripts happy; #483342 + tc-export PKG_CONFIG AR RANLIB + + if use amd64; then + if [[ ${ABI} == amd64 ]]; then + myconf+=( --enable-win64 ) + else + myconf+=( --disable-win64 ) + fi + + # Note: using --with-wine64 results in problems with multilib.eclass + # CC/LD hackery. We're using separate tools instead. + fi + + ECONF_SOURCE=${S} \ + econf "${myconf[@]}" + emake depend +} + +multilib_src_test() { + # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader" + if [[ ${ABI} == x86 ]]; then + if [[ $(id -u) == 0 ]]; then + ewarn "Skipping tests since they cannot be run under the root user." + ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf" + return + fi + + WINEPREFIX="${T}/.wine-${ABI}" \ + Xemake test + fi +} + +multilib_src_install_all() { + local DOCS=( ANNOUNCE AUTHORS README ) + add_locale_docs() { + local locale_doc="documentation/README.$1" + [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} ) + } + l10n_for_each_locale_do add_locale_docs + + einstalldocs + prune_libtool_files --all + + if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script + rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \ + "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die + fi + + # Remove wineconsole if neither backend is installed #551124 + if ! use X && ! use ncurses; then + rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die + rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die + rm_wineconsole() { + rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die + } + multilib_foreach_abi rm_wineconsole + fi + + use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055 + use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader} + + if use abi_x86_64 && ! use abi_x86_32; then + dosym wine64 "${MY_PREFIX}"/bin/wine # 404331 + dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader + fi + + # Failglob for binloops, shouldn't be necessary, but including to stay safe + eshopts_push -s failglob #615218 + # Make wrappers for binaries for handling multiple variants + # Note: wrappers instead of symlinks because some are shell which use basename + local b + for b in "${D%/}${MY_PREFIX}"/bin/*; do + make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}" + done + eshopts_pop +} + +pkg_postinst() { + eselect wine register ${P} + if [[ ${PN} == "wine-vanilla" ]]; then + eselect wine register --vanilla ${P} || die + else + if use d3d9; then + eselect wine register --d3d9 ${P} || die + fi + fi + + eselect wine update --all --if-unset || die + + xdg_desktop_database_update + + if ! use gecko; then + ewarn "Without Wine Gecko, wine prefixes will not have a default" + ewarn "implementation of iexplore. Many older windows applications" + ewarn "rely upon the existence of an iexplore implementation, so" + ewarn "you will likely need to install an external one, like via winetricks" + fi + if ! use mono; then + ewarn "Without Wine Mono, wine prefixes will not have a default" + ewarn "implementation of .NET. Many windows applications rely upon" + ewarn "the existence of a .NET implementation, so you will likely need" + ewarn "to install an external one, like via winetricks" + fi +} + +pkg_prerm() { + eselect wine deregister ${P} + if [[ ${PN} == "wine-vanilla" ]]; then + eselect wine deregister --vanilla ${P} || die + else + if use d3d9; then + eselect wine deregister --d3d9 ${P} || die + fi + fi + + eselect wine update --all --if-unset || die +} + +pkg_postrm() { + xdg_desktop_database_update +} diff --git a/app-emulation/wine-d3d9/wine-d3d9-3.7.ebuild b/app-emulation/wine-d3d9/wine-d3d9-3.7.ebuild deleted file mode 100644 index 0fba831fcdee..000000000000 --- a/app-emulation/wine-d3d9/wine-d3d9-3.7.ebuild +++ /dev/null @@ -1,572 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PLOCALES="ar bg ca cs da de el en en_US eo es fa fi fr he hi hr hu it ja ko lt ml nb_NO nl or pa pl pt_BR pt_PT rm ro ru sk sl sr_RS@cyrillic sr_RS@latin sv te th tr uk wa zh_CN zh_TW" -PLOCALE_BACKUP="en" - -inherit autotools estack eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils - -MY_PN="${PN%%-*}" -MY_P="${MY_PN}-${PV}" - -if [[ ${PV} == "9999" ]] ; then - EGIT_REPO_URI="https://source.winehq.org/git/wine.git" - EGIT_BRANCH="master" - inherit git-r3 - SRC_URI="" - #KEYWORDS="" -else - MAJOR_V=$(get_version_component_range 1) - SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz" - KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" -fi -S="${WORKDIR}/${MY_P}" - -D3D9_P="wine-d3d9-${PV}" -D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}" -GWP_V="20180120" -PATCHDIR="${WORKDIR}/gentoo-wine-patches" - -DESCRIPTION="Free implementation of Windows(tm) on Unix, with Gallium Nine patchset" -HOMEPAGE="https://www.winehq.org/" -SRC_URI="${SRC_URI} - https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz -" - -if [[ ${PV} == "9999" ]] ; then - D3D9_EGIT_REPO_URI="https://github.com/sarnex/wine-d3d9-patches.git" -else - SRC_URI="${SRC_URI} - d3d9? ( https://github.com/sarnex/wine-d3d9-patches/archive/${D3D9_P}.tar.gz )" -fi - -LICENSE="LGPL-2.1" -SLOT="${PV}" -IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags d3d9 dos elibc_glibc +fontconfig +gecko gphoto2 gsm gssapi gstreamer +jpeg kerberos kernel_FreeBSD +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl pcap +png prelink pulseaudio +realtime +run-exes samba scanner sdl selinux +ssl test +threads +truetype udev +udisks v4l vulkan +X +xcomposite xinerama +xml" -REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) - X? ( truetype ) - elibc_glibc? ( threads ) - osmesa? ( opengl ) - test? ( abi_x86_32 )" # osmesa-opengl #286560 # X-truetype #551124 - -# FIXME: the test suite is unsuitable for us; many tests require net access -# or fail due to Xvfb's opengl limitations. -RESTRICT="test" - -COMMON_DEPEND=" - X? ( - x11-libs/libXcursor[${MULTILIB_USEDEP}] - x11-libs/libXext[${MULTILIB_USEDEP}] - x11-libs/libXfixes[${MULTILIB_USEDEP}] - x11-libs/libXrandr[${MULTILIB_USEDEP}] - x11-libs/libXi[${MULTILIB_USEDEP}] - x11-libs/libXxf86vm[${MULTILIB_USEDEP}] - ) - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) - capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] ) - cups? ( net-print/cups:=[${MULTILIB_USEDEP}] ) - d3d9? ( - media-libs/mesa[d3d9,egl,${MULTILIB_USEDEP}] - x11-libs/libX11[${MULTILIB_USEDEP}] - x11-libs/libXext[${MULTILIB_USEDEP}] - x11-libs/libxcb[${MULTILIB_USEDEP}] - ) - fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] ) - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) - gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] ) - gssapi? ( virtual/krb5[${MULTILIB_USEDEP}] ) - gstreamer? ( - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] - media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] - ) - jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] ) - kerberos? ( virtual/krb5:0=[${MULTILIB_USEDEP}] ) - lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] ) - ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) - mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] ) - ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] ) - netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] ) - nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] ) - odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] ) - openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] ) - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) - opengl? ( - virtual/glu[${MULTILIB_USEDEP}] - virtual/opengl[${MULTILIB_USEDEP}] - ) - osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] ) - pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) - pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] ) - scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] ) - sdl? ( media-libs/libsdl2:=[haptic,joystick,${MULTILIB_USEDEP}] ) - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) - truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] ) - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) - udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) - v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) - vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] ) - xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) - xml? ( - dev-libs/libxml2[${MULTILIB_USEDEP}] - dev-libs/libxslt[${MULTILIB_USEDEP}] - )" - -RDEPEND="${COMMON_DEPEND} - app-emulation/wine-desktop-common - >app-eselect/eselect-wine-0.3 - !app-emulation/wine:0 - dos? ( >=games-emulation/dosbox-0.74_p20160629 ) - gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] ) - mono? ( app-emulation/wine-mono:4.7.1 ) - perl? ( - dev-lang/perl - dev-perl/XML-Simple - ) - pulseaudio? ( - realtime? ( sys-auth/rtkit ) - ) - samba? ( >=net-fs/samba-3.0.25[winbind] ) - selinux? ( sec-policy/selinux-wine ) - udisks? ( sys-fs/udisks:2 )" - -# tools/make_requests requires perl -DEPEND="${COMMON_DEPEND} - sys-devel/flex - >=sys-kernel/linux-headers-2.6 - virtual/pkgconfig - virtual/yacc - X? ( x11-base/xorg-proto ) - prelink? ( sys-devel/prelink ) - xinerama? ( x11-base/xorg-proto )" - -# These use a non-standard "Wine" category, which is provided by -# /etc/xdg/applications-merged/wine.menu -QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop -usr/share/applications/wine-notepad.desktop -usr/share/applications/wine-uninstaller.desktop -usr/share/applications/wine-winecfg.desktop" - -PATCHES=( - "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726 - "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615 - "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508 - "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611 -) -PATCHES_BIN=() - -# https://bugs.gentoo.org/show_bug.cgi?id=635222 -if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then - DEPEND+=" dev-util/patchbin" -fi - -wine_compiler_check() { - [[ ${MERGE_TYPE} = "binary" ]] && return 0 - - # GCC-specific bugs - if tc-is-gcc; then - # bug #549768 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then - ebegin "Checking for gcc-5 ms_abi compiler bug" - $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die - # Run in subshell to prevent "Aborted" message - ( "${T}"/pr66838 || false ) >/dev/null 2>&1 - if ! eend $?; then - eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0" - eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild," - eerror "or use gcc-config to select a different compiler version." - eerror "See https://bugs.gentoo.org/549768" - eerror - return 1 - fi - fi - # bug #574044 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then - ebegin "Checking for gcc-5-3 stack realignment compiler bug" - # Compile in subshell to prevent "Aborted" message - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1 - if ! eend $?; then - eerror "Wine cannot be built with this version of gcc-5.3" - eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild," - eerror "or use gcc-config to select a different compiler version." - eerror "See https://bugs.gentoo.org/574044" - eerror - return 1 - fi - fi - fi - - # Ensure compiler support - if use abi_x86_64; then - ebegin "Checking for 64-bit compiler with builtin_ms_va_list support" - # Compile in subshell to prevent "Aborted" message - ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1) - if ! eend $?; then - eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine" - eerror - eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine" - eerror - return 1 - fi - fi -} - -wine_build_environment_check() { - [[ ${MERGE_TYPE} = "binary" ]] && return 0 - - if use abi_x86_64; then - if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then - eerror "You need gcc-4.4+ to compile 64-bit wine" - die - elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then - eerror "You need clang-3.8+ to compile 64-bit wine" - die - fi - fi - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then - ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by" - ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in" - ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4" - fi - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then - if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then - ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work" - ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine." - ewarn "See package.env in man 5 portage for more information on how to do this." - ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details" - fi - fi - - if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then - eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only." - eerror "See https://bugs.gentoo.org/487864 for more details." - eerror - return 1 - fi -} - -wine_env_vcs_vars() { - local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT" - local pn_live_val="${pn_live_var}" - eval pn_live_val='$'${pn_live_val} - if [[ ! -z ${pn_live_val} ]]; then - if use d3d9; then - eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}" - eerror "cannot be used to set the commit. Instead, you may use the" - eerror "environmental variables WINE_COMMIT, and D3D9_COMMIT." - eerror - return 1 - fi - fi - if [[ ! -z ${EGIT_COMMIT} ]]; then - eerror "Commits must now be specified using the environmental variables" - eerror "WINE_COMMIT, and D3D9_COMMIT" - eerror - return 1 - fi -} - -pkg_pretend() { - wine_build_environment_check || die - - # Verify OSS support - if use oss && ! use kernel_FreeBSD; then - if ! has_version ">=media-sound/oss-4"; then - eerror "You cannot build wine with USE=oss without having support from a" - eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)" - eerror - die - fi - fi -} - -pkg_setup() { - wine_build_environment_check || die - wine_env_vcs_vars || die - - WINE_VARIANT="${PN#wine}-${PV}" - WINE_VARIANT="${WINE_VARIANT#-}" - - MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}" - MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}" - MY_DATADIR="${MY_DATAROOTDIR}" - MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}" - MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}" - MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}" - MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}" - MY_MANDIR="${MY_DATADIR}/man" -} - -src_unpack() { - if [[ ${PV} == "9999" ]] ; then - EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack - if use d3d9; then - git-r3_fetch "${D3D9_EGIT_REPO_URI}" "${D3D9_COMMIT}" - git-r3_checkout "${D3D9_EGIT_REPO_URI}" "${D3D9_DIR}" - fi - fi - - default - - l10n_find_plocales_changes "${S}/po" "" ".po" -} - -src_prepare() { - - eapply_bin(){ - local patch - for patch in ${PATCHES_BIN[@]}; do - patchbin --nogit < "${patch}" || die - done - } - - local md5="$(md5sum server/protocol.def)" - - if use d3d9; then - PATCHES+=( "${D3D9_DIR}/d3d9-helper.patch" ) - PATCHES+=( "${D3D9_DIR}/wine-d3d9.patch" ) - fi - - default - eapply_bin - eautoreconf - - # Modification of the server protocol requires regenerating the server requests - if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then - einfo "server/protocol.def was patched; running tools/make_requests" - tools/make_requests || die #432348 - fi - sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die - if ! use run-exes; then - sed -i '/^MimeType/d' loader/wine.desktop || die #117785 - fi - - # Edit wine.desktop to work for specific variant - sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die - - # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652 - cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die - - l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS - - # Fix manpage generation for locales #469418 and abi_x86_64 #617864 - - # Duplicate manpages input files for wine64 - local f - for f in loader/*.man.in; do - cp ${f} ${f/wine/wine64} || die - done - # Add wine64 manpages to Makefile - if use abi_x86_64; then - sed -i "/wine.man.in/i \ - \\\twine64.man.in \\\\" loader/Makefile.in || die - sed -i -E 's/(.*wine)(.*\.UTF-8\.man\.in.*)/&\ -\164\2/' loader/Makefile.in || die - fi - - rm_man_file(){ - local file="${1}" - loc=${2} - sed -i "/${loc}\.UTF-8\.man\.in/d" "${file}" || die - } - - while read f; do - l10n_for_each_disabled_locale_do rm_man_file "${f}" - done < <(find -name "Makefile.in" -exec grep -q "UTF-8.man.in" "{}" \; -print) -} - -src_configure() { - wine_compiler_check || die - - export LDCONFIG=/bin/true - use custom-cflags || strip-flags - - multilib-minimal_src_configure -} - -multilib_src_configure() { - local myconf=( - --prefix="${MY_PREFIX}" - --datarootdir="${MY_DATAROOTDIR}" - --datadir="${MY_DATADIR}" - --docdir="${MY_DOCDIR}" - --includedir="${MY_INCLUDEDIR}" - --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}" - --libexecdir="${MY_LIBEXECDIR}" - --localstatedir="${MY_LOCALSTATEDIR}" - --mandir="${MY_MANDIR}" - --sysconfdir=/etc/wine - $(use_with alsa) - $(use_with capi) - $(use_with lcms cms) - $(use_with cups) - $(use_with ncurses curses) - $(use_with udisks dbus) - $(use_with fontconfig) - $(use_with ssl gnutls) - $(use_enable gecko mshtml) - $(use_with gphoto2 gphoto) - $(use_with gsm) - $(use_with gssapi) - $(use_with gstreamer) - --without-hal - $(use_with jpeg) - $(use_with kerberos krb5) - $(use_with ldap) - $(use_enable mono mscoree) - $(use_with mp3 mpg123) - $(use_with netapi) - $(use_with nls gettext) - $(use_with openal) - $(use_with opencl) - $(use_with opengl) - $(use_with osmesa) - $(use_with oss) - $(use_with pcap) - $(use_with png) - $(use_with pulseaudio pulse) - $(use_with threads pthread) - $(use_with scanner sane) - $(use_with sdl) - $(use_enable test tests) - $(use_with truetype freetype) - $(use_with udev) - $(use_with v4l) - $(use_with vulkan) - $(use_with X x) - $(use_with X xfixes) - $(use_with xcomposite) - $(use_with xinerama) - $(use_with xml) - $(use_with xml xslt) - ) - - use d3d9 && myconf+=( $(use_with d3d9 d3d9-nine) ) - - local PKG_CONFIG AR RANLIB - # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038 - # set AR and RANLIB to make QA scripts happy; #483342 - tc-export PKG_CONFIG AR RANLIB - - if use amd64; then - if [[ ${ABI} == amd64 ]]; then - myconf+=( --enable-win64 ) - else - myconf+=( --disable-win64 ) - fi - - # Note: using --with-wine64 results in problems with multilib.eclass - # CC/LD hackery. We're using separate tools instead. - fi - - ECONF_SOURCE=${S} \ - econf "${myconf[@]}" - emake depend -} - -multilib_src_test() { - # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader" - if [[ ${ABI} == x86 ]]; then - if [[ $(id -u) == 0 ]]; then - ewarn "Skipping tests since they cannot be run under the root user." - ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf" - return - fi - - WINEPREFIX="${T}/.wine-${ABI}" \ - Xemake test - fi -} - -multilib_src_install_all() { - local DOCS=( ANNOUNCE AUTHORS README ) - add_locale_docs() { - local locale_doc="documentation/README.$1" - [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} ) - } - l10n_for_each_locale_do add_locale_docs - - einstalldocs - prune_libtool_files --all - - if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script - rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \ - "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die - fi - - # Remove wineconsole if neither backend is installed #551124 - if ! use X && ! use ncurses; then - rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die - rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die - rm_wineconsole() { - rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die - } - multilib_foreach_abi rm_wineconsole - fi - - use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055 - use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader} - - if use abi_x86_64 && ! use abi_x86_32; then - dosym wine64 "${MY_PREFIX}"/bin/wine # 404331 - dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader - fi - - # Failglob for binloops, shouldn't be necessary, but including to stay safe - eshopts_push -s failglob #615218 - # Make wrappers for binaries for handling multiple variants - # Note: wrappers instead of symlinks because some are shell which use basename - local b - for b in "${D%/}${MY_PREFIX}"/bin/*; do - make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}" - done - eshopts_pop -} - -pkg_postinst() { - eselect wine register ${P} - if [[ ${PN} == "wine-vanilla" ]]; then - eselect wine register --vanilla ${P} || die - else - if use d3d9; then - eselect wine register --d3d9 ${P} || die - fi - fi - - eselect wine update --all --if-unset || die - - xdg_desktop_database_update - - if ! use gecko; then - ewarn "Without Wine Gecko, wine prefixes will not have a default" - ewarn "implementation of iexplore. Many older windows applications" - ewarn "rely upon the existence of an iexplore implementation, so" - ewarn "you will likely need to install an external one, like via winetricks" - fi - if ! use mono; then - ewarn "Without Wine Mono, wine prefixes will not have a default" - ewarn "implementation of .NET. Many windows applications rely upon" - ewarn "the existence of a .NET implementation, so you will likely need" - ewarn "to install an external one, like via winetricks" - fi -} - -pkg_prerm() { - eselect wine deregister ${P} - if [[ ${PN} == "wine-vanilla" ]]; then - eselect wine deregister --vanilla ${P} || die - else - if use d3d9; then - eselect wine deregister --d3d9 ${P} || die - fi - fi - - eselect wine update --all --if-unset || die -} - -pkg_postrm() { - xdg_desktop_database_update -} diff --git a/app-emulation/wine-staging/Manifest b/app-emulation/wine-staging/Manifest index ae446c8a69fb..a4c2eb6ee06c 100644 --- a/app-emulation/wine-staging/Manifest +++ b/app-emulation/wine-staging/Manifest @@ -1,14 +1,14 @@ DIST gentoo-wine-patches-20180120.tar.xz 58672 BLAKE2B 84d621075b65475cec41a06429680b518d7eafb938cefd903f3f8aa71ea3049ac9d8de05af48f9f4f4a1b9172c7ef17784540413e410eb8ec11e8ec4a63858c6 SHA512 5b354a409c7a2b77499aaa593b9248a1d15d755e3687b095755faacc30068bfcdbdd5c2a2a78617cb1a78c46d2931162bd69ec3379b035d81494bea7108263c2 DIST wine-2.0.tar.bz2 23662707 BLAKE2B 1d485c1359ce8a0395a9f6378c1f8be33ea2836b80390d1eb1095057a0acedd21708daab16e1851a315391b9f9b0a360879b9d98c73bcc8371c5023e9a8037f5 SHA512 b0a57ba8202d9fc396e5bfb7a7718d6bababbed8f3351e7fdc36afa37f35a871e04903757618f73427aeb71a52b2d323977d79e48f8b38d636f23fd404441186 -DIST wine-3.7.tar.xz 20454036 BLAKE2B 04ac94d5679377c5d0bb37a6d3e8e3ec7c09faa300f8422a09a22b14ef4244d2bb14c80a47cfca5e11526506a8064f0cfa4e28868d7f04669f85ab743dbbb36d SHA512 a699418574dd8f407c064421cf6cdfe3923562c8adf9a7749e716f3853291eab05358ea64f0217c303c26c0f8f59d2116024b7b6978f9a52a055147e689a8694 +DIST wine-3.10.tar.xz 20485784 BLAKE2B 3a5e9ca948880a3bc979c33e797296d156425438c2502c3d2c50a6d5241e485bdc081ff195b0647cfa1db1cab247e941f02d0511f7b94dc0037fa24e2e61eb5c SHA512 bb1a1d8e8ad7f48d9fcf48ebbf0ebbb8e3b45ea211736bd7837144ea34b373f74955d3c0ccc4cdc44020eea23c8af8e67252e1c5cd6115e11419ad5f6ef24843 DIST wine-3.8.tar.xz 20473392 BLAKE2B a7873dd15a373491703e16888044cf2ba00121f91a4583fe6dcf687b5179a2d926035cc86c75f70ceca03a508bd4712c58a1662186e0a6e0c139e63e686f8c5d SHA512 387c6bff3eafac7e92030d11c02b3461b4ead059d2aad7f6d903e176f304d2ac0a426132fcd452507868f0d22bb360a30734edf3e73dfd514037458f08406e98 DIST wine-3.9.tar.xz 20508952 BLAKE2B 6fbf22673588963c483b7b31e82287c09e15b579b8f57267e2731768f95a1f986954bb473ee0dfa2428802fe9331b8599a01c782dd1152d36ce2002b6a4e6bde SHA512 4c4e5a741a61b9427c175e015177df5806638736f7dfd92098ed95239d41a373cbab876c054d3c948e1db6a7de359db3babd63bc194edc8c2c3be28b58f75e64 DIST wine-staging-2.0.tar.gz 10182575 BLAKE2B 1de645f66fa3e5e0d8ceddf5439fd246510470f63d6331c7029abed7192180b7b8430e43a2e732a30a5fbe0c73ba39b7fafcfc08830c68e679dff90576c3a960 SHA512 51412299259d6e92c8993543d5fdb3239ebe31e0d1d715e0a9e8ce94b3139c0567b08ff1600d41be94f12427cbfccc2f6b6b2ed030535445c95618aaf6578580 -DIST wine-staging-3.7.tar.gz 9951654 BLAKE2B 3d6c9a023f3a4f9da6e506a88490365d4f0959231e7f9e375e8ae46006c3cfd82ca4e65af9df79d9c54cf7ee5e53452b10ac5146f2c0de97a7c4946aefac3cd5 SHA512 4a00b7c61121798b6c4e918aadeb71865e359f6471035b9ed33ae242f3fe70f1977b1c0b3628fb244b5ba4942d771d2ee797bcc087d38192fcd9325e1886ed14 +DIST wine-staging-3.10.tar.gz 9943542 BLAKE2B 412319529e6fe9bb21a4629e1ae1896fe47a413a7ab688d6245fd5b85aa2969be040df3fa8d0ad6185617c814c7b69df891c9067260de28e505298695a6776ea SHA512 baae31ce569c06f8ac5ffc579d8f3bb95de55c50b83c1db13eaaeaee5c8c5b3b7fb6028d69dce6645ac697692372a65be8d60532123a94e0f5fcd0778d2082c5 DIST wine-staging-3.8.tar.gz 9957202 BLAKE2B 1f85ebc9cf8f5d3c684ce60a59783355ec558e62a8c93564107de2893e82257846be45b3f55fd23f9b317245acc04ee3c4884003572169d6f0efef30145e33f7 SHA512 46ba27b0b9fe5f86d1647f12050715b796604c91487cad6847dce5250ffcfdf8ccf44dcff79c88048221cbf58af92ed72523c09f3591e2c5306bba24ff9d154c DIST wine-staging-3.9.tar.gz 9932873 BLAKE2B 9a0bb5689b1d2cff6e133f0dd94cc13b63f59ef9e5b129aaf48501317a75aadbf27058fe8cc436816501cbe416c285504d9c98504024f9a0606ee4c4afc48e4b SHA512 4f52937621b7e5a3f4b3e52ecba8c7d318c621e76c8e4ce3be176d56b382bf06e3a0453d37c3b725df63f0a7349f53a7c075148c7e1ed89a028696538e31acad EBUILD wine-staging-2.0-r1.ebuild 19947 BLAKE2B 44adc4926d0a93bdcb8ef176d0c058eb2a7ec6896ebc00f253e417f541fdd14e7236e4c1123b8aa93e7b386e15a34b356103e573e2a06ca2be4449073180d2ad SHA512 0d1173b27696344bd491f53fe2e6b11e88ba9d5d1b55869c9907ab292c20e248e48fc05b776c573a6f4dd6a49b8cbc247535e59c39990d80633bcbc55ef7c31c -EBUILD wine-staging-3.7.ebuild 19893 BLAKE2B a82e6a10ef92b3ce1a79a75e205a8a146815e5a181c668d1278c6ceb0f6a36a6475ab8947bcfa1428cf5a47d48cb1fbed86a97f6b13dee55d36d11cb583c3212 SHA512 4de9bf77bf4f7678a95535b7733266d0ca81bdfabbae8a97424c1520226ae7d7a04a64d33455d45c7e5504248f139142269410854f67dea6b356d8ffbc7a611d +EBUILD wine-staging-3.10.ebuild 19971 BLAKE2B 4d18c0f96ce8eb3f4c6fe8871875c323639af7dba6d120a67038b12bfe19d472d36ff1d994be21a6bc89d929561aa97cc1e6629d7b076a63773801e10135a485 SHA512 451f8dff34221638c15a2ad3693c688c2d49f55c2da6b6a45b4577d2c1adfe71a0c005530df377734ad996409bd63b34527c407a74e38f861312191566595ef5 EBUILD wine-staging-3.8.ebuild 19893 BLAKE2B a82e6a10ef92b3ce1a79a75e205a8a146815e5a181c668d1278c6ceb0f6a36a6475ab8947bcfa1428cf5a47d48cb1fbed86a97f6b13dee55d36d11cb583c3212 SHA512 4de9bf77bf4f7678a95535b7733266d0ca81bdfabbae8a97424c1520226ae7d7a04a64d33455d45c7e5504248f139142269410854f67dea6b356d8ffbc7a611d EBUILD wine-staging-3.9.ebuild 19971 BLAKE2B 4d18c0f96ce8eb3f4c6fe8871875c323639af7dba6d120a67038b12bfe19d472d36ff1d994be21a6bc89d929561aa97cc1e6629d7b076a63773801e10135a485 SHA512 451f8dff34221638c15a2ad3693c688c2d49f55c2da6b6a45b4577d2c1adfe71a0c005530df377734ad996409bd63b34527c407a74e38f861312191566595ef5 EBUILD wine-staging-9999.ebuild 19971 BLAKE2B 4d18c0f96ce8eb3f4c6fe8871875c323639af7dba6d120a67038b12bfe19d472d36ff1d994be21a6bc89d929561aa97cc1e6629d7b076a63773801e10135a485 SHA512 451f8dff34221638c15a2ad3693c688c2d49f55c2da6b6a45b4577d2c1adfe71a0c005530df377734ad996409bd63b34527c407a74e38f861312191566595ef5 diff --git a/app-emulation/wine-staging/wine-staging-3.10.ebuild b/app-emulation/wine-staging/wine-staging-3.10.ebuild new file mode 100644 index 000000000000..4873ea014bd1 --- /dev/null +++ b/app-emulation/wine-staging/wine-staging-3.10.ebuild @@ -0,0 +1,610 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PLOCALES="ar bg ca cs da de el en en_US eo es fa fi fr he hi hr hu it ja ko lt ml nb_NO nl or pa pl pt_BR pt_PT rm ro ru sk sl sr_RS@cyrillic sr_RS@latin sv te th tr uk wa zh_CN zh_TW" +PLOCALE_BACKUP="en" + +inherit autotools estack eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils + +MY_PN="${PN%%-*}" +MY_P="${MY_PN}-${PV}" + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://source.winehq.org/git/wine.git" + EGIT_BRANCH="master" + inherit git-r3 + SRC_URI="" + #KEYWORDS="" +else + MAJOR_V=$(get_version_component_range 1) + SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz" + KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +fi +S="${WORKDIR}/${MY_P}" + +STAGING_P="wine-staging-${PV}" +STAGING_DIR="${WORKDIR}/${STAGING_P}" +GWP_V="20180120" +PATCHDIR="${WORKDIR}/gentoo-wine-patches" + +DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset" +HOMEPAGE="https://www.winehq.org/" +SRC_URI="${SRC_URI} + https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz +" + +if [[ ${PV} == "9999" ]] ; then + STAGING_EGIT_REPO_URI="https://github.com/wine-staging/wine-staging.git" +else + SRC_URI="${SRC_URI} + staging? ( https://github.com/wine-staging/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )" +fi + +LICENSE="LGPL-2.1" +SLOT="${PV}" +IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gssapi gstreamer +jpeg kerberos kernel_FreeBSD +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl pcap pipelight +png prelink pulseaudio +realtime +run-exes s3tc samba scanner sdl selinux +ssl staging test themes +threads +truetype udev +udisks v4l vaapi vkd3d vulkan +X +xcomposite xinerama +xml" +REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) + X? ( truetype ) + elibc_glibc? ( threads ) + osmesa? ( opengl ) + pipelight? ( staging ) + s3tc? ( staging ) + test? ( abi_x86_32 ) + themes? ( staging ) + vaapi? ( staging )" # osmesa-opengl #286560 # X-truetype #551124 + +# FIXME: the test suite is unsuitable for us; many tests require net access +# or fail due to Xvfb's opengl limitations. +RESTRICT="test" + +COMMON_DEPEND=" + X? ( + x11-libs/libXcursor[${MULTILIB_USEDEP}] + x11-libs/libXext[${MULTILIB_USEDEP}] + x11-libs/libXfixes[${MULTILIB_USEDEP}] + x11-libs/libXrandr[${MULTILIB_USEDEP}] + x11-libs/libXi[${MULTILIB_USEDEP}] + x11-libs/libXxf86vm[${MULTILIB_USEDEP}] + ) + alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) + capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] ) + cups? ( net-print/cups:=[${MULTILIB_USEDEP}] ) + fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] ) + gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) + gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] ) + gssapi? ( virtual/krb5[${MULTILIB_USEDEP}] ) + gstreamer? ( + media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] + media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] + ) + jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] ) + kerberos? ( virtual/krb5:0=[${MULTILIB_USEDEP}] ) + lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] ) + ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) + mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] ) + ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] ) + netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] ) + nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] ) + odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] ) + openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] ) + opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) + opengl? ( + virtual/glu[${MULTILIB_USEDEP}] + virtual/opengl[${MULTILIB_USEDEP}] + ) + osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] ) + pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) + png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) + pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] ) + scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] ) + sdl? ( media-libs/libsdl2:=[haptic,joystick,${MULTILIB_USEDEP}] ) + ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) + staging? ( sys-apps/attr[${MULTILIB_USEDEP}] ) + themes? ( + dev-libs/glib:2[${MULTILIB_USEDEP}] + x11-libs/cairo[${MULTILIB_USEDEP}] + x11-libs/gtk+:3[${MULTILIB_USEDEP}] + ) + truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] ) + udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) + udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) + v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) + vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] ) + vkd3d? ( app-emulation/vkd3d[${MULTILIB_USEDEP}] ) + vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] ) + xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) + xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) + xml? ( + dev-libs/libxml2[${MULTILIB_USEDEP}] + dev-libs/libxslt[${MULTILIB_USEDEP}] + )" + +RDEPEND="${COMMON_DEPEND} + app-emulation/wine-desktop-common + >app-eselect/eselect-wine-0.3 + !app-emulation/wine:0 + dos? ( >=games-emulation/dosbox-0.74_p20160629 ) + gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] ) + mono? ( app-emulation/wine-mono:4.7.1 ) + perl? ( + dev-lang/perl + dev-perl/XML-Simple + ) + pulseaudio? ( + realtime? ( sys-auth/rtkit ) + ) + s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] ) + samba? ( >=net-fs/samba-3.0.25[winbind] ) + selinux? ( sec-policy/selinux-wine ) + udisks? ( sys-fs/udisks:2 )" + +# tools/make_requests requires perl +DEPEND="${COMMON_DEPEND} + sys-devel/flex + >=sys-kernel/linux-headers-2.6 + virtual/pkgconfig + virtual/yacc + X? ( x11-base/xorg-proto ) + prelink? ( sys-devel/prelink ) + staging? ( + dev-lang/perl + dev-perl/XML-Simple + ) + xinerama? ( x11-base/xorg-proto )" + +# These use a non-standard "Wine" category, which is provided by +# /etc/xdg/applications-merged/wine.menu +QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop +usr/share/applications/wine-notepad.desktop +usr/share/applications/wine-uninstaller.desktop +usr/share/applications/wine-winecfg.desktop" + +PATCHES=( + "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726 + "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615 + "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508 + "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611 +) +PATCHES_BIN=() + +# https://bugs.gentoo.org/show_bug.cgi?id=635222 +if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then + DEPEND+=" dev-util/patchbin" +fi + +wine_compiler_check() { + [[ ${MERGE_TYPE} = "binary" ]] && return 0 + + # GCC-specific bugs + if tc-is-gcc; then + # bug #549768 + if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then + ebegin "Checking for gcc-5 ms_abi compiler bug" + $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die + # Run in subshell to prevent "Aborted" message + ( "${T}"/pr66838 || false ) >/dev/null 2>&1 + if ! eend $?; then + eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0" + eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild," + eerror "or use gcc-config to select a different compiler version." + eerror "See https://bugs.gentoo.org/549768" + eerror + return 1 + fi + fi + # bug #574044 + if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then + ebegin "Checking for gcc-5-3 stack realignment compiler bug" + # Compile in subshell to prevent "Aborted" message + ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1 + if ! eend $?; then + eerror "Wine cannot be built with this version of gcc-5.3" + eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild," + eerror "or use gcc-config to select a different compiler version." + eerror "See https://bugs.gentoo.org/574044" + eerror + return 1 + fi + fi + fi + + # Ensure compiler support + if use abi_x86_64; then + ebegin "Checking for 64-bit compiler with builtin_ms_va_list support" + # Compile in subshell to prevent "Aborted" message + ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1) + if ! eend $?; then + eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine" + eerror + eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine" + eerror + return 1 + fi + fi +} + +wine_build_environment_check() { + [[ ${MERGE_TYPE} = "binary" ]] && return 0 + + if use abi_x86_64; then + if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then + eerror "You need gcc-4.4+ to compile 64-bit wine" + die + elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then + eerror "You need clang-3.8+ to compile 64-bit wine" + die + fi + fi + if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then + ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by" + ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in" + ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4" + fi + if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then + if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then + ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work" + ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine." + ewarn "See package.env in man 5 portage for more information on how to do this." + ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details" + fi + fi + + if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then + eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only." + eerror "See https://bugs.gentoo.org/487864 for more details." + eerror + return 1 + fi +} + +wine_env_vcs_vars() { + local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT" + local pn_live_val="${pn_live_var}" + eval pn_live_val='$'${pn_live_val} + if [[ ! -z ${pn_live_val} ]]; then + if use staging; then + eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}" + eerror "cannot be used to set the commit. Instead, you may use the" + eerror "environmental variables WINE_COMMIT, and STAGING_COMMIT." + eerror + return 1 + fi + fi + if [[ ! -z ${EGIT_COMMIT} ]]; then + eerror "Commits must now be specified using the environmental variables" + eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT" + eerror + return 1 + fi +} + +pkg_pretend() { + wine_build_environment_check || die + + # Verify OSS support + if use oss && ! use kernel_FreeBSD; then + if ! has_version ">=media-sound/oss-4"; then + eerror "You cannot build wine with USE=oss without having support from a" + eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)" + eerror + die + fi + fi +} + +pkg_setup() { + wine_build_environment_check || die + wine_env_vcs_vars || die + + WINE_VARIANT="${PN#wine}-${PV}" + WINE_VARIANT="${WINE_VARIANT#-}" + + MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}" + MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}" + MY_DATADIR="${MY_DATAROOTDIR}" + MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}" + MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}" + MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}" + MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}" + MY_MANDIR="${MY_DATADIR}/man" +} + +src_unpack() { + if [[ ${PV} == "9999" ]] ; then + EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack + if use staging; then + local CURRENT_WINE_COMMIT=${EGIT_VERSION} + + git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}" + git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}" + + local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die + + if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then + einfo "The current Staging patchset is not guaranteed to apply on this WINE commit." + einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT." + einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine" + fi + fi + fi + + default + + l10n_find_plocales_changes "${S}/po" "" ".po" +} + +src_prepare() { + + eapply_bin(){ + local patch + for patch in ${PATCHES_BIN[@]}; do + patchbin --nogit < "${patch}" || die + done + } + + local md5="$(md5sum server/protocol.def)" + + if use staging; then + ewarn "Applying the Wine-Staging patchset. Any bug reports to the" + ewarn "Wine bugzilla should explicitly state that staging was used." + + local STAGING_EXCLUDE="" + use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight" + + # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches + ebegin "Running Wine-Staging patch installer" + ( + set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE} + cd "${STAGING_DIR}/patches" + source "${STAGING_DIR}/patches/patchinstall.sh" + ) + eend $? || die "Failed to apply Wine-Staging patches" + fi + + default + eapply_bin + eautoreconf + + # Modification of the server protocol requires regenerating the server requests + if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then + einfo "server/protocol.def was patched; running tools/make_requests" + tools/make_requests || die #432348 + fi + sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die + if ! use run-exes; then + sed -i '/^MimeType/d' loader/wine.desktop || die #117785 + fi + + # Edit wine.desktop to work for specific variant + sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die + + # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652 + cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die + + l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS + + # Fix manpage generation for locales #469418 and abi_x86_64 #617864 + + # Duplicate manpages input files for wine64 + local f + for f in loader/*.man.in; do + cp ${f} ${f/wine/wine64} || die + done + # Add wine64 manpages to Makefile + if use abi_x86_64; then + sed -i "/wine.man.in/i \ + \\\twine64.man.in \\\\" loader/Makefile.in || die + sed -i -E 's/(.*wine)(.*\.UTF-8\.man\.in.*)/&\ +\164\2/' loader/Makefile.in || die + fi + + rm_man_file(){ + local file="${1}" + loc=${2} + sed -i "/${loc}\.UTF-8\.man\.in/d" "${file}" || die + } + + while read f; do + l10n_for_each_disabled_locale_do rm_man_file "${f}" + done < <(find -name "Makefile.in" -exec grep -q "UTF-8.man.in" "{}" \; -print) +} + +src_configure() { + wine_compiler_check || die + + export LDCONFIG=/bin/true + use custom-cflags || strip-flags + + multilib-minimal_src_configure +} + +multilib_src_configure() { + local myconf=( + --prefix="${MY_PREFIX}" + --datarootdir="${MY_DATAROOTDIR}" + --datadir="${MY_DATADIR}" + --docdir="${MY_DOCDIR}" + --includedir="${MY_INCLUDEDIR}" + --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}" + --libexecdir="${MY_LIBEXECDIR}" + --localstatedir="${MY_LOCALSTATEDIR}" + --mandir="${MY_MANDIR}" + --sysconfdir=/etc/wine + $(use_with alsa) + $(use_with capi) + $(use_with lcms cms) + $(use_with cups) + $(use_with ncurses curses) + $(use_with udisks dbus) + $(use_with fontconfig) + $(use_with ssl gnutls) + $(use_enable gecko mshtml) + $(use_with gphoto2 gphoto) + $(use_with gsm) + $(use_with gssapi) + $(use_with gstreamer) + --without-hal + $(use_with jpeg) + $(use_with kerberos krb5) + $(use_with ldap) + $(use_enable mono mscoree) + $(use_with mp3 mpg123) + $(use_with netapi) + $(use_with nls gettext) + $(use_with openal) + $(use_with opencl) + $(use_with opengl) + $(use_with osmesa) + $(use_with oss) + $(use_with pcap) + $(use_with png) + $(use_with pulseaudio pulse) + $(use_with threads pthread) + $(use_with scanner sane) + $(use_with sdl) + $(use_enable test tests) + $(use_with truetype freetype) + $(use_with udev) + $(use_with v4l) + $(use_with vkd3d) + $(use_with vulkan) + $(use_with X x) + $(use_with X xfixes) + $(use_with xcomposite) + $(use_with xinerama) + $(use_with xml) + $(use_with xml xslt) + ) + + use staging && myconf+=( + --with-xattr + $(use_with themes gtk3) + $(use_with vaapi va) + ) + + local PKG_CONFIG AR RANLIB + # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038 + # set AR and RANLIB to make QA scripts happy; #483342 + tc-export PKG_CONFIG AR RANLIB + + if use amd64; then + if [[ ${ABI} == amd64 ]]; then + myconf+=( --enable-win64 ) + else + myconf+=( --disable-win64 ) + fi + + # Note: using --with-wine64 results in problems with multilib.eclass + # CC/LD hackery. We're using separate tools instead. + fi + + ECONF_SOURCE=${S} \ + econf "${myconf[@]}" + emake depend +} + +multilib_src_test() { + # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader" + if [[ ${ABI} == x86 ]]; then + if [[ $(id -u) == 0 ]]; then + ewarn "Skipping tests since they cannot be run under the root user." + ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf" + return + fi + + WINEPREFIX="${T}/.wine-${ABI}" \ + Xemake test + fi +} + +multilib_src_install_all() { + local DOCS=( ANNOUNCE AUTHORS README ) + add_locale_docs() { + local locale_doc="documentation/README.$1" + [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} ) + } + l10n_for_each_locale_do add_locale_docs + + einstalldocs + prune_libtool_files --all + + if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script + rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \ + "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die + fi + + # Remove wineconsole if neither backend is installed #551124 + if ! use X && ! use ncurses; then + rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die + rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die + rm_wineconsole() { + rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die + } + multilib_foreach_abi rm_wineconsole + fi + + use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055 + use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader} + + if use abi_x86_64 && ! use abi_x86_32; then + dosym wine64 "${MY_PREFIX}"/bin/wine # 404331 + dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader + fi + + # Failglob for binloops, shouldn't be necessary, but including to stay safe + eshopts_push -s failglob #615218 + # Make wrappers for binaries for handling multiple variants + # Note: wrappers instead of symlinks because some are shell which use basename + local b + for b in "${D%/}${MY_PREFIX}"/bin/*; do + make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}" + done + eshopts_pop +} + +pkg_postinst() { + eselect wine register ${P} + if [[ ${PN} == "wine-vanilla" ]]; then + eselect wine register --vanilla ${P} || die + else + if use staging; then + eselect wine register --staging ${P} || die + fi + fi + + eselect wine update --all --if-unset || die + + xdg_desktop_database_update + + if ! use gecko; then + ewarn "Without Wine Gecko, wine prefixes will not have a default" + ewarn "implementation of iexplore. Many older windows applications" + ewarn "rely upon the existence of an iexplore implementation, so" + ewarn "you will likely need to install an external one, like via winetricks" + fi + if ! use mono; then + ewarn "Without Wine Mono, wine prefixes will not have a default" + ewarn "implementation of .NET. Many windows applications rely upon" + ewarn "the existence of a .NET implementation, so you will likely need" + ewarn "to install an external one, like via winetricks" + fi +} + +pkg_prerm() { + eselect wine deregister ${P} + if [[ ${PN} == "wine-vanilla" ]]; then + eselect wine deregister --vanilla ${P} || die + else + if use staging; then + eselect wine deregister --staging ${P} || die + fi + fi + + eselect wine update --all --if-unset || die +} + +pkg_postrm() { + xdg_desktop_database_update +} diff --git a/app-emulation/wine-staging/wine-staging-3.7.ebuild b/app-emulation/wine-staging/wine-staging-3.7.ebuild deleted file mode 100644 index 7ba4e022173c..000000000000 --- a/app-emulation/wine-staging/wine-staging-3.7.ebuild +++ /dev/null @@ -1,608 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PLOCALES="ar bg ca cs da de el en en_US eo es fa fi fr he hi hr hu it ja ko lt ml nb_NO nl or pa pl pt_BR pt_PT rm ro ru sk sl sr_RS@cyrillic sr_RS@latin sv te th tr uk wa zh_CN zh_TW" -PLOCALE_BACKUP="en" - -inherit autotools estack eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils - -MY_PN="${PN%%-*}" -MY_P="${MY_PN}-${PV}" - -if [[ ${PV} == "9999" ]] ; then - EGIT_REPO_URI="https://source.winehq.org/git/wine.git" - EGIT_BRANCH="master" - inherit git-r3 - SRC_URI="" - #KEYWORDS="" -else - MAJOR_V=$(get_version_component_range 1) - SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz" - KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" -fi -S="${WORKDIR}/${MY_P}" - -STAGING_P="wine-staging-${PV}" -STAGING_DIR="${WORKDIR}/${STAGING_P}" -GWP_V="20180120" -PATCHDIR="${WORKDIR}/gentoo-wine-patches" - -DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset" -HOMEPAGE="https://www.winehq.org/" -SRC_URI="${SRC_URI} - https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz -" - -if [[ ${PV} == "9999" ]] ; then - STAGING_EGIT_REPO_URI="https://github.com/wine-staging/wine-staging.git" -else - SRC_URI="${SRC_URI} - staging? ( https://github.com/wine-staging/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )" -fi - -LICENSE="LGPL-2.1" -SLOT="${PV}" -IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gssapi gstreamer +jpeg kerberos kernel_FreeBSD +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl pcap pipelight +png prelink pulseaudio +realtime +run-exes s3tc samba scanner sdl selinux +ssl staging test themes +threads +truetype udev +udisks v4l vaapi vulkan +X +xcomposite xinerama +xml" -REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) - X? ( truetype ) - elibc_glibc? ( threads ) - osmesa? ( opengl ) - pipelight? ( staging ) - s3tc? ( staging ) - test? ( abi_x86_32 ) - themes? ( staging ) - vaapi? ( staging )" # osmesa-opengl #286560 # X-truetype #551124 - -# FIXME: the test suite is unsuitable for us; many tests require net access -# or fail due to Xvfb's opengl limitations. -RESTRICT="test" - -COMMON_DEPEND=" - X? ( - x11-libs/libXcursor[${MULTILIB_USEDEP}] - x11-libs/libXext[${MULTILIB_USEDEP}] - x11-libs/libXfixes[${MULTILIB_USEDEP}] - x11-libs/libXrandr[${MULTILIB_USEDEP}] - x11-libs/libXi[${MULTILIB_USEDEP}] - x11-libs/libXxf86vm[${MULTILIB_USEDEP}] - ) - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) - capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] ) - cups? ( net-print/cups:=[${MULTILIB_USEDEP}] ) - fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] ) - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) - gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] ) - gssapi? ( virtual/krb5[${MULTILIB_USEDEP}] ) - gstreamer? ( - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] - media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] - ) - jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] ) - kerberos? ( virtual/krb5:0=[${MULTILIB_USEDEP}] ) - lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] ) - ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) - mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] ) - ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] ) - netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] ) - nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] ) - odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] ) - openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] ) - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) - opengl? ( - virtual/glu[${MULTILIB_USEDEP}] - virtual/opengl[${MULTILIB_USEDEP}] - ) - osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] ) - pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) - pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] ) - scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] ) - sdl? ( media-libs/libsdl2:=[haptic,joystick,${MULTILIB_USEDEP}] ) - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) - staging? ( sys-apps/attr[${MULTILIB_USEDEP}] ) - themes? ( - dev-libs/glib:2[${MULTILIB_USEDEP}] - x11-libs/cairo[${MULTILIB_USEDEP}] - x11-libs/gtk+:3[${MULTILIB_USEDEP}] - ) - truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] ) - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) - udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) - v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) - vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] ) - vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] ) - xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) - xml? ( - dev-libs/libxml2[${MULTILIB_USEDEP}] - dev-libs/libxslt[${MULTILIB_USEDEP}] - )" - -RDEPEND="${COMMON_DEPEND} - app-emulation/wine-desktop-common - >app-eselect/eselect-wine-0.3 - !app-emulation/wine:0 - dos? ( >=games-emulation/dosbox-0.74_p20160629 ) - gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] ) - mono? ( app-emulation/wine-mono:4.7.1 ) - perl? ( - dev-lang/perl - dev-perl/XML-Simple - ) - pulseaudio? ( - realtime? ( sys-auth/rtkit ) - ) - s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] ) - samba? ( >=net-fs/samba-3.0.25[winbind] ) - selinux? ( sec-policy/selinux-wine ) - udisks? ( sys-fs/udisks:2 )" - -# tools/make_requests requires perl -DEPEND="${COMMON_DEPEND} - sys-devel/flex - >=sys-kernel/linux-headers-2.6 - virtual/pkgconfig - virtual/yacc - X? ( x11-base/xorg-proto ) - prelink? ( sys-devel/prelink ) - staging? ( - dev-lang/perl - dev-perl/XML-Simple - ) - xinerama? ( x11-base/xorg-proto )" - -# These use a non-standard "Wine" category, which is provided by -# /etc/xdg/applications-merged/wine.menu -QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop -usr/share/applications/wine-notepad.desktop -usr/share/applications/wine-uninstaller.desktop -usr/share/applications/wine-winecfg.desktop" - -PATCHES=( - "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726 - "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615 - "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508 - "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611 -) -PATCHES_BIN=() - -# https://bugs.gentoo.org/show_bug.cgi?id=635222 -if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then - DEPEND+=" dev-util/patchbin" -fi - -wine_compiler_check() { - [[ ${MERGE_TYPE} = "binary" ]] && return 0 - - # GCC-specific bugs - if tc-is-gcc; then - # bug #549768 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then - ebegin "Checking for gcc-5 ms_abi compiler bug" - $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die - # Run in subshell to prevent "Aborted" message - ( "${T}"/pr66838 || false ) >/dev/null 2>&1 - if ! eend $?; then - eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0" - eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild," - eerror "or use gcc-config to select a different compiler version." - eerror "See https://bugs.gentoo.org/549768" - eerror - return 1 - fi - fi - # bug #574044 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then - ebegin "Checking for gcc-5-3 stack realignment compiler bug" - # Compile in subshell to prevent "Aborted" message - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1 - if ! eend $?; then - eerror "Wine cannot be built with this version of gcc-5.3" - eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild," - eerror "or use gcc-config to select a different compiler version." - eerror "See https://bugs.gentoo.org/574044" - eerror - return 1 - fi - fi - fi - - # Ensure compiler support - if use abi_x86_64; then - ebegin "Checking for 64-bit compiler with builtin_ms_va_list support" - # Compile in subshell to prevent "Aborted" message - ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1) - if ! eend $?; then - eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine" - eerror - eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine" - eerror - return 1 - fi - fi -} - -wine_build_environment_check() { - [[ ${MERGE_TYPE} = "binary" ]] && return 0 - - if use abi_x86_64; then - if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then - eerror "You need gcc-4.4+ to compile 64-bit wine" - die - elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then - eerror "You need clang-3.8+ to compile 64-bit wine" - die - fi - fi - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then - ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by" - ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in" - ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4" - fi - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then - if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then - ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work" - ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine." - ewarn "See package.env in man 5 portage for more information on how to do this." - ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details" - fi - fi - - if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then - eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only." - eerror "See https://bugs.gentoo.org/487864 for more details." - eerror - return 1 - fi -} - -wine_env_vcs_vars() { - local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT" - local pn_live_val="${pn_live_var}" - eval pn_live_val='$'${pn_live_val} - if [[ ! -z ${pn_live_val} ]]; then - if use staging; then - eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}" - eerror "cannot be used to set the commit. Instead, you may use the" - eerror "environmental variables WINE_COMMIT, and STAGING_COMMIT." - eerror - return 1 - fi - fi - if [[ ! -z ${EGIT_COMMIT} ]]; then - eerror "Commits must now be specified using the environmental variables" - eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT" - eerror - return 1 - fi -} - -pkg_pretend() { - wine_build_environment_check || die - - # Verify OSS support - if use oss && ! use kernel_FreeBSD; then - if ! has_version ">=media-sound/oss-4"; then - eerror "You cannot build wine with USE=oss without having support from a" - eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)" - eerror - die - fi - fi -} - -pkg_setup() { - wine_build_environment_check || die - wine_env_vcs_vars || die - - WINE_VARIANT="${PN#wine}-${PV}" - WINE_VARIANT="${WINE_VARIANT#-}" - - MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}" - MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}" - MY_DATADIR="${MY_DATAROOTDIR}" - MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}" - MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}" - MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}" - MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}" - MY_MANDIR="${MY_DATADIR}/man" -} - -src_unpack() { - if [[ ${PV} == "9999" ]] ; then - EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack - if use staging; then - local CURRENT_WINE_COMMIT=${EGIT_VERSION} - - git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}" - git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}" - - local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die - - if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then - einfo "The current Staging patchset is not guaranteed to apply on this WINE commit." - einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT." - einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine" - fi - fi - fi - - default - - l10n_find_plocales_changes "${S}/po" "" ".po" -} - -src_prepare() { - - eapply_bin(){ - local patch - for patch in ${PATCHES_BIN[@]}; do - patchbin --nogit < "${patch}" || die - done - } - - local md5="$(md5sum server/protocol.def)" - - if use staging; then - ewarn "Applying the Wine-Staging patchset. Any bug reports to the" - ewarn "Wine bugzilla should explicitly state that staging was used." - - local STAGING_EXCLUDE="" - use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight" - - # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches - ebegin "Running Wine-Staging patch installer" - ( - set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE} - cd "${STAGING_DIR}/patches" - source "${STAGING_DIR}/patches/patchinstall.sh" - ) - eend $? || die "Failed to apply Wine-Staging patches" - fi - - default - eapply_bin - eautoreconf - - # Modification of the server protocol requires regenerating the server requests - if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then - einfo "server/protocol.def was patched; running tools/make_requests" - tools/make_requests || die #432348 - fi - sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die - if ! use run-exes; then - sed -i '/^MimeType/d' loader/wine.desktop || die #117785 - fi - - # Edit wine.desktop to work for specific variant - sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die - - # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652 - cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die - - l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS - - # Fix manpage generation for locales #469418 and abi_x86_64 #617864 - - # Duplicate manpages input files for wine64 - local f - for f in loader/*.man.in; do - cp ${f} ${f/wine/wine64} || die - done - # Add wine64 manpages to Makefile - if use abi_x86_64; then - sed -i "/wine.man.in/i \ - \\\twine64.man.in \\\\" loader/Makefile.in || die - sed -i -E 's/(.*wine)(.*\.UTF-8\.man\.in.*)/&\ -\164\2/' loader/Makefile.in || die - fi - - rm_man_file(){ - local file="${1}" - loc=${2} - sed -i "/${loc}\.UTF-8\.man\.in/d" "${file}" || die - } - - while read f; do - l10n_for_each_disabled_locale_do rm_man_file "${f}" - done < <(find -name "Makefile.in" -exec grep -q "UTF-8.man.in" "{}" \; -print) -} - -src_configure() { - wine_compiler_check || die - - export LDCONFIG=/bin/true - use custom-cflags || strip-flags - - multilib-minimal_src_configure -} - -multilib_src_configure() { - local myconf=( - --prefix="${MY_PREFIX}" - --datarootdir="${MY_DATAROOTDIR}" - --datadir="${MY_DATADIR}" - --docdir="${MY_DOCDIR}" - --includedir="${MY_INCLUDEDIR}" - --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}" - --libexecdir="${MY_LIBEXECDIR}" - --localstatedir="${MY_LOCALSTATEDIR}" - --mandir="${MY_MANDIR}" - --sysconfdir=/etc/wine - $(use_with alsa) - $(use_with capi) - $(use_with lcms cms) - $(use_with cups) - $(use_with ncurses curses) - $(use_with udisks dbus) - $(use_with fontconfig) - $(use_with ssl gnutls) - $(use_enable gecko mshtml) - $(use_with gphoto2 gphoto) - $(use_with gsm) - $(use_with gssapi) - $(use_with gstreamer) - --without-hal - $(use_with jpeg) - $(use_with kerberos krb5) - $(use_with ldap) - $(use_enable mono mscoree) - $(use_with mp3 mpg123) - $(use_with netapi) - $(use_with nls gettext) - $(use_with openal) - $(use_with opencl) - $(use_with opengl) - $(use_with osmesa) - $(use_with oss) - $(use_with pcap) - $(use_with png) - $(use_with pulseaudio pulse) - $(use_with threads pthread) - $(use_with scanner sane) - $(use_with sdl) - $(use_enable test tests) - $(use_with truetype freetype) - $(use_with udev) - $(use_with v4l) - $(use_with vulkan) - $(use_with X x) - $(use_with X xfixes) - $(use_with xcomposite) - $(use_with xinerama) - $(use_with xml) - $(use_with xml xslt) - ) - - use staging && myconf+=( - --with-xattr - $(use_with themes gtk3) - $(use_with vaapi va) - ) - - local PKG_CONFIG AR RANLIB - # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038 - # set AR and RANLIB to make QA scripts happy; #483342 - tc-export PKG_CONFIG AR RANLIB - - if use amd64; then - if [[ ${ABI} == amd64 ]]; then - myconf+=( --enable-win64 ) - else - myconf+=( --disable-win64 ) - fi - - # Note: using --with-wine64 results in problems with multilib.eclass - # CC/LD hackery. We're using separate tools instead. - fi - - ECONF_SOURCE=${S} \ - econf "${myconf[@]}" - emake depend -} - -multilib_src_test() { - # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader" - if [[ ${ABI} == x86 ]]; then - if [[ $(id -u) == 0 ]]; then - ewarn "Skipping tests since they cannot be run under the root user." - ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf" - return - fi - - WINEPREFIX="${T}/.wine-${ABI}" \ - Xemake test - fi -} - -multilib_src_install_all() { - local DOCS=( ANNOUNCE AUTHORS README ) - add_locale_docs() { - local locale_doc="documentation/README.$1" - [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} ) - } - l10n_for_each_locale_do add_locale_docs - - einstalldocs - prune_libtool_files --all - - if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script - rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \ - "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die - fi - - # Remove wineconsole if neither backend is installed #551124 - if ! use X && ! use ncurses; then - rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die - rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die - rm_wineconsole() { - rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die - } - multilib_foreach_abi rm_wineconsole - fi - - use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055 - use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader} - - if use abi_x86_64 && ! use abi_x86_32; then - dosym wine64 "${MY_PREFIX}"/bin/wine # 404331 - dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader - fi - - # Failglob for binloops, shouldn't be necessary, but including to stay safe - eshopts_push -s failglob #615218 - # Make wrappers for binaries for handling multiple variants - # Note: wrappers instead of symlinks because some are shell which use basename - local b - for b in "${D%/}${MY_PREFIX}"/bin/*; do - make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}" - done - eshopts_pop -} - -pkg_postinst() { - eselect wine register ${P} - if [[ ${PN} == "wine-vanilla" ]]; then - eselect wine register --vanilla ${P} || die - else - if use staging; then - eselect wine register --staging ${P} || die - fi - fi - - eselect wine update --all --if-unset || die - - xdg_desktop_database_update - - if ! use gecko; then - ewarn "Without Wine Gecko, wine prefixes will not have a default" - ewarn "implementation of iexplore. Many older windows applications" - ewarn "rely upon the existence of an iexplore implementation, so" - ewarn "you will likely need to install an external one, like via winetricks" - fi - if ! use mono; then - ewarn "Without Wine Mono, wine prefixes will not have a default" - ewarn "implementation of .NET. Many windows applications rely upon" - ewarn "the existence of a .NET implementation, so you will likely need" - ewarn "to install an external one, like via winetricks" - fi -} - -pkg_prerm() { - eselect wine deregister ${P} - if [[ ${PN} == "wine-vanilla" ]]; then - eselect wine deregister --vanilla ${P} || die - else - if use staging; then - eselect wine deregister --staging ${P} || die - fi - fi - - eselect wine update --all --if-unset || die -} - -pkg_postrm() { - xdg_desktop_database_update -} diff --git a/app-emulation/wine-vanilla/Manifest b/app-emulation/wine-vanilla/Manifest index f61147d6e64e..5930d80c8c91 100644 --- a/app-emulation/wine-vanilla/Manifest +++ b/app-emulation/wine-vanilla/Manifest @@ -5,7 +5,7 @@ DIST wine-2.0.3.tar.xz 18864648 BLAKE2B 0503a11e7545d5af805bfc3c2f614b6e35e39b7b DIST wine-2.0.4.tar.xz 18898148 BLAKE2B a21c920e1cf15e064bc6b37067a11a5568f8d1906783c200236456b73947bbd24212208ab1bcc2ca526ed40d8b2e80a2dc5d95db1a8d356a484213afb6897f59 SHA512 8fccb93e5ebe482ed81e948e3b7f87d4fe5b1f838a10f9cdcafa9561de4ef54b7d5acdc292bf28ad3aaf44be34c5ad8452ebbfc39f49f95fcbe9f9d0fcfc862c DIST wine-2.0.tar.bz2 23662707 BLAKE2B 1d485c1359ce8a0395a9f6378c1f8be33ea2836b80390d1eb1095057a0acedd21708daab16e1851a315391b9f9b0a360879b9d98c73bcc8371c5023e9a8037f5 SHA512 b0a57ba8202d9fc396e5bfb7a7718d6bababbed8f3351e7fdc36afa37f35a871e04903757618f73427aeb71a52b2d323977d79e48f8b38d636f23fd404441186 DIST wine-3.0.1.tar.xz 19722444 BLAKE2B e042d280c3f4c2df64c2d426cdebdb65e9c7263034961b1916bc9c6206bf9c107aefaf8cee166d9f1a2ea21dfa57db0d3641ca5e8025f70520f11aa24d20ca60 SHA512 3d59f08a87da1d2ee280954a4c91e861b6994048b36eff1ac8df67dbab08a792d391b23ced66ea99f8503a979b3ec26cd35558b71c4d29d68775a5d484bf7d00 -DIST wine-3.7.tar.xz 20454036 BLAKE2B 04ac94d5679377c5d0bb37a6d3e8e3ec7c09faa300f8422a09a22b14ef4244d2bb14c80a47cfca5e11526506a8064f0cfa4e28868d7f04669f85ab743dbbb36d SHA512 a699418574dd8f407c064421cf6cdfe3923562c8adf9a7749e716f3853291eab05358ea64f0217c303c26c0f8f59d2116024b7b6978f9a52a055147e689a8694 +DIST wine-3.10.tar.xz 20485784 BLAKE2B 3a5e9ca948880a3bc979c33e797296d156425438c2502c3d2c50a6d5241e485bdc081ff195b0647cfa1db1cab247e941f02d0511f7b94dc0037fa24e2e61eb5c SHA512 bb1a1d8e8ad7f48d9fcf48ebbf0ebbb8e3b45ea211736bd7837144ea34b373f74955d3c0ccc4cdc44020eea23c8af8e67252e1c5cd6115e11419ad5f6ef24843 DIST wine-3.8.tar.xz 20473392 BLAKE2B a7873dd15a373491703e16888044cf2ba00121f91a4583fe6dcf687b5179a2d926035cc86c75f70ceca03a508bd4712c58a1662186e0a6e0c139e63e686f8c5d SHA512 387c6bff3eafac7e92030d11c02b3461b4ead059d2aad7f6d903e176f304d2ac0a426132fcd452507868f0d22bb360a30734edf3e73dfd514037458f08406e98 DIST wine-3.9.tar.xz 20508952 BLAKE2B 6fbf22673588963c483b7b31e82287c09e15b579b8f57267e2731768f95a1f986954bb473ee0dfa2428802fe9331b8599a01c782dd1152d36ce2002b6a4e6bde SHA512 4c4e5a741a61b9427c175e015177df5806638736f7dfd92098ed95239d41a373cbab876c054d3c948e1db6a7de359db3babd63bc194edc8c2c3be28b58f75e64 EBUILD wine-vanilla-2.0-r1.ebuild 17165 BLAKE2B 355d7a3892b96a92d3f2336e6ae450407ebe8d1b73ad21910459855de6371fd8aca117c162601d0f303265e234c4d06f35339157bdcc0c1f03d5227f3a746777 SHA512 7d6d3d0659100bdd88a294c4728f95f985284e94d4c2e334d3e65ff26f231f33d6a7ab2f34a695683ac51a804a690621cc4d32bc3dec579003526f86ee9e9d69 @@ -14,7 +14,7 @@ EBUILD wine-vanilla-2.0.2-r1.ebuild 17164 BLAKE2B 39c1a2facb2c155e5e5f511f6800af EBUILD wine-vanilla-2.0.3.ebuild 16974 BLAKE2B 61a9d93162ba22248f95f518026024c7c7844ea00278b0523d94e0e4306eb8fe4a1b22bfe82a08b4be87d97e174d2ef572cbd9d14bb0dc6a560395708a09bb63 SHA512 b3f1897e19623469dcafa4268cf6f57842c9945b15e395a8eeda77f92b63f2035d00d57fcbbb0d9fc5bf937e0b5e7a9b0a7b49a41588c548d4c91ba1f205b562 EBUILD wine-vanilla-2.0.4.ebuild 16976 BLAKE2B a1b0391d257ffd77cf58bfe5c2614e85e421c5c4db3a1b3157b1a3176d47d6f02bf709c866df146b8cb6f17aa929752cbe9731119a32b83d66115860bc0755a6 SHA512 9b692447e013c31db521d4443b1b3f059279e8f5e0c9c17a629af38c5619a2481321a429f76e8543bac833a4483fcf33d085706672c3068f02b638fa12a93c6a EBUILD wine-vanilla-3.0.1.ebuild 17125 BLAKE2B 51d4eeb0ef880774cfd8ffce30c8482e9c0a847cbfbecb15159e95497c9a56f62a7ecb1c941bda4f31fe4d89bd11fb740d747f28df28275ead43503af994eaf5 SHA512 011941555712a3a02ff08bdab12b467da71a151efdeb0bce060b9c51c02f8ffec5368b70969a36424b9272ad981e2e8a4725f7de35a8d6064e9e8ad00ccb0f35 -EBUILD wine-vanilla-3.7.ebuild 17251 BLAKE2B 6f86d2c1eba973215361c17201fd31af1567a06e479310246ffa999bc1de381113ecb8f6a7c41ec9580fad3c2ae4e1bd7c2af9d6d408e0763242ce86c1ae3054 SHA512 72e6cc94623fecb0110f0097765accb9561af19831c9faa873a72f59344a8e203a69cc8f517395ae493094a9917e5a469e417a00c8d1f631151f1ae73ca0a8a0 +EBUILD wine-vanilla-3.10.ebuild 17329 BLAKE2B 4e0f08f51a31405ea56bcd7fa6e27c6e2060bc34fcb23dc7c6342d33abac6d62b5b664da6727094e9cc5105ccef9e026d75bc24a9c3aaa266069fe5fcddd29e1 SHA512 44d9a8470cfd621237c1f7fc389040b11eb0439429804f6472b1488b6372a091b123159f6ea32f2b911df320f303983ea94449e87814cc6840cefbbfedd7887c EBUILD wine-vanilla-3.8.ebuild 17251 BLAKE2B 6f86d2c1eba973215361c17201fd31af1567a06e479310246ffa999bc1de381113ecb8f6a7c41ec9580fad3c2ae4e1bd7c2af9d6d408e0763242ce86c1ae3054 SHA512 72e6cc94623fecb0110f0097765accb9561af19831c9faa873a72f59344a8e203a69cc8f517395ae493094a9917e5a469e417a00c8d1f631151f1ae73ca0a8a0 EBUILD wine-vanilla-3.9.ebuild 17329 BLAKE2B 4e0f08f51a31405ea56bcd7fa6e27c6e2060bc34fcb23dc7c6342d33abac6d62b5b664da6727094e9cc5105ccef9e026d75bc24a9c3aaa266069fe5fcddd29e1 SHA512 44d9a8470cfd621237c1f7fc389040b11eb0439429804f6472b1488b6372a091b123159f6ea32f2b911df320f303983ea94449e87814cc6840cefbbfedd7887c EBUILD wine-vanilla-9999.ebuild 17329 BLAKE2B 4e0f08f51a31405ea56bcd7fa6e27c6e2060bc34fcb23dc7c6342d33abac6d62b5b664da6727094e9cc5105ccef9e026d75bc24a9c3aaa266069fe5fcddd29e1 SHA512 44d9a8470cfd621237c1f7fc389040b11eb0439429804f6472b1488b6372a091b123159f6ea32f2b911df320f303983ea94449e87814cc6840cefbbfedd7887c diff --git a/app-emulation/wine-vanilla/wine-vanilla-3.10.ebuild b/app-emulation/wine-vanilla/wine-vanilla-3.10.ebuild new file mode 100644 index 000000000000..cdb123c486e7 --- /dev/null +++ b/app-emulation/wine-vanilla/wine-vanilla-3.10.ebuild @@ -0,0 +1,531 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PLOCALES="ar bg ca cs da de el en en_US eo es fa fi fr he hi hr hu it ja ko lt ml nb_NO nl or pa pl pt_BR pt_PT rm ro ru sk sl sr_RS@cyrillic sr_RS@latin sv te th tr uk wa zh_CN zh_TW" +PLOCALE_BACKUP="en" + +inherit autotools estack eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils + +MY_PN="${PN%%-*}" +MY_P="${MY_PN}-${PV}" + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://source.winehq.org/git/wine.git" + EGIT_BRANCH="master" + inherit git-r3 + SRC_URI="" + #KEYWORDS="" +else + MAJOR_V=$(get_version_component_range 1) + SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz" + KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" +fi +S="${WORKDIR}/${MY_P}" + +GWP_V="20180120" +PATCHDIR="${WORKDIR}/gentoo-wine-patches" + +DESCRIPTION="Free implementation of Windows(tm) on Unix, without external patchsets" +HOMEPAGE="https://www.winehq.org/" +SRC_URI="${SRC_URI} + https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz +" + +LICENSE="LGPL-2.1" +SLOT="${PV}" +IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gssapi gstreamer +jpeg kerberos kernel_FreeBSD +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl pcap +png prelink pulseaudio +realtime +run-exes samba scanner sdl selinux +ssl test +threads +truetype udev +udisks v4l vkd3d vulkan +X +xcomposite xinerama +xml" +REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) + X? ( truetype ) + elibc_glibc? ( threads ) + osmesa? ( opengl ) + test? ( abi_x86_32 )" # osmesa-opengl #286560 # X-truetype #551124 + +# FIXME: the test suite is unsuitable for us; many tests require net access +# or fail due to Xvfb's opengl limitations. +RESTRICT="test" + +COMMON_DEPEND=" + X? ( + x11-libs/libXcursor[${MULTILIB_USEDEP}] + x11-libs/libXext[${MULTILIB_USEDEP}] + x11-libs/libXfixes[${MULTILIB_USEDEP}] + x11-libs/libXrandr[${MULTILIB_USEDEP}] + x11-libs/libXi[${MULTILIB_USEDEP}] + x11-libs/libXxf86vm[${MULTILIB_USEDEP}] + ) + alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) + capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] ) + cups? ( net-print/cups:=[${MULTILIB_USEDEP}] ) + fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] ) + gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) + gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] ) + gssapi? ( virtual/krb5[${MULTILIB_USEDEP}] ) + gstreamer? ( + media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] + media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] + ) + jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] ) + kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] ) + lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] ) + ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) + mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] ) + ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] ) + netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] ) + nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] ) + odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] ) + openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] ) + opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) + opengl? ( + virtual/glu[${MULTILIB_USEDEP}] + virtual/opengl[${MULTILIB_USEDEP}] + ) + osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] ) + pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) + png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) + pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] ) + scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] ) + sdl? ( media-libs/libsdl2:=[haptic,joystick,${MULTILIB_USEDEP}] ) + ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) + truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] ) + udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) + udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) + v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) + vkd3d? ( app-emulation/vkd3d[${MULTILIB_USEDEP}] ) + vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] ) + xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) + xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) + xml? ( + dev-libs/libxml2[${MULTILIB_USEDEP}] + dev-libs/libxslt[${MULTILIB_USEDEP}] + )" + +RDEPEND="${COMMON_DEPEND} + app-emulation/wine-desktop-common + >app-eselect/eselect-wine-0.3 + !app-emulation/wine:0 + dos? ( >=games-emulation/dosbox-0.74_p20160629 ) + gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] ) + mono? ( app-emulation/wine-mono:4.7.1 ) + perl? ( + dev-lang/perl + dev-perl/XML-Simple + ) + pulseaudio? ( + realtime? ( sys-auth/rtkit ) + ) + samba? ( >=net-fs/samba-3.0.25[winbind] ) + selinux? ( sec-policy/selinux-wine ) + udisks? ( sys-fs/udisks:2 )" + +# tools/make_requests requires perl +DEPEND="${COMMON_DEPEND} + sys-devel/flex + >=sys-kernel/linux-headers-2.6 + virtual/pkgconfig + virtual/yacc + X? ( x11-base/xorg-proto ) + prelink? ( sys-devel/prelink ) + xinerama? ( x11-base/xorg-proto )" + +# These use a non-standard "Wine" category, which is provided by +# /etc/xdg/applications-merged/wine.menu +QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop +usr/share/applications/wine-notepad.desktop +usr/share/applications/wine-uninstaller.desktop +usr/share/applications/wine-winecfg.desktop" + +PATCHES=( + "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726 + "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615 + "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508 + "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611 +) +PATCHES_BIN=() + +# https://bugs.gentoo.org/show_bug.cgi?id=635222 +if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then + DEPEND+=" dev-util/patchbin" +fi + +wine_compiler_check() { + [[ ${MERGE_TYPE} = "binary" ]] && return 0 + + # GCC-specific bugs + if tc-is-gcc; then + # bug #549768 + if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then + ebegin "Checking for gcc-5 ms_abi compiler bug" + $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die + # Run in subshell to prevent "Aborted" message + ( "${T}"/pr66838 || false ) >/dev/null 2>&1 + if ! eend $?; then + eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0" + eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild," + eerror "or use gcc-config to select a different compiler version." + eerror "See https://bugs.gentoo.org/549768" + eerror + return 1 + fi + fi + # bug #574044 + if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then + ebegin "Checking for gcc-5-3 stack realignment compiler bug" + # Compile in subshell to prevent "Aborted" message + ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1 + if ! eend $?; then + eerror "Wine cannot be built with this version of gcc-5.3" + eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild," + eerror "or use gcc-config to select a different compiler version." + eerror "See https://bugs.gentoo.org/574044" + eerror + return 1 + fi + fi + fi + + # Ensure compiler support + if use abi_x86_64; then + ebegin "Checking for 64-bit compiler with builtin_ms_va_list support" + # Compile in subshell to prevent "Aborted" message + ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1) + if ! eend $?; then + eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine" + eerror + eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine" + eerror + return 1 + fi + fi +} + +wine_build_environment_check() { + [[ ${MERGE_TYPE} = "binary" ]] && return 0 + + if use abi_x86_64; then + if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then + eerror "You need gcc-4.4+ to compile 64-bit wine" + die + elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then + eerror "You need clang-3.8+ to compile 64-bit wine" + die + fi + fi + if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then + ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by" + ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in" + ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4" + fi + if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then + if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then + ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work" + ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine." + ewarn "See package.env in man 5 portage for more information on how to do this." + ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details" + fi + fi + + if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then + eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only." + eerror "See https://bugs.gentoo.org/487864 for more details." + eerror + return 1 + fi +} + +wine_env_vcs_vars() { + local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT" + local pn_live_val="${pn_live_var}" + eval pn_live_val='$'${pn_live_val} + if [[ ! -z ${EGIT_COMMIT} ]]; then + eerror "Commits must now be specified using the environmental variables" + eerror "WINE_COMMIT" + eerror + return 1 + fi +} + +pkg_pretend() { + wine_build_environment_check || die + + # Verify OSS support + if use oss && ! use kernel_FreeBSD; then + if ! has_version ">=media-sound/oss-4"; then + eerror "You cannot build wine with USE=oss without having support from a" + eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)" + eerror + die + fi + fi +} + +pkg_setup() { + wine_build_environment_check || die + wine_env_vcs_vars || die + + WINE_VARIANT="${PN#wine}-${PV}" + WINE_VARIANT="${WINE_VARIANT#-}" + + MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}" + MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}" + MY_DATADIR="${MY_DATAROOTDIR}" + MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}" + MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}" + MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}" + MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}" + MY_MANDIR="${MY_DATADIR}/man" +} + +src_unpack() { + if [[ ${PV} == "9999" ]] ; then + EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack + fi + + default + + l10n_find_plocales_changes "${S}/po" "" ".po" +} + +src_prepare() { + + eapply_bin(){ + local patch + for patch in ${PATCHES_BIN[@]}; do + patchbin --nogit < "${patch}" || die + done + } + + local md5="$(md5sum server/protocol.def)" + + default + eapply_bin + eautoreconf + + # Modification of the server protocol requires regenerating the server requests + if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then + einfo "server/protocol.def was patched; running tools/make_requests" + tools/make_requests || die #432348 + fi + sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die + if ! use run-exes; then + sed -i '/^MimeType/d' loader/wine.desktop || die #117785 + fi + + # Edit wine.desktop to work for specific variant + sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die + + # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652 + cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die + + l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS + + # Fix manpage generation for locales #469418 and abi_x86_64 #617864 + + # Duplicate manpages input files for wine64 + local f + for f in loader/*.man.in; do + cp ${f} ${f/wine/wine64} || die + done + # Add wine64 manpages to Makefile + if use abi_x86_64; then + sed -i "/wine.man.in/i \ + \\\twine64.man.in \\\\" loader/Makefile.in || die + sed -i -E 's/(.*wine)(.*\.UTF-8\.man\.in.*)/&\ +\164\2/' loader/Makefile.in || die + fi + + rm_man_file(){ + local file="${1}" + loc=${2} + sed -i "/${loc}\.UTF-8\.man\.in/d" "${file}" || die + } + + while read f; do + l10n_for_each_disabled_locale_do rm_man_file "${f}" + done < <(find -name "Makefile.in" -exec grep -q "UTF-8.man.in" "{}" \; -print) +} + +src_configure() { + wine_compiler_check || die + + export LDCONFIG=/bin/true + use custom-cflags || strip-flags + + multilib-minimal_src_configure +} + +multilib_src_configure() { + local myconf=( + --prefix="${MY_PREFIX}" + --datarootdir="${MY_DATAROOTDIR}" + --datadir="${MY_DATADIR}" + --docdir="${MY_DOCDIR}" + --includedir="${MY_INCLUDEDIR}" + --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}" + --libexecdir="${MY_LIBEXECDIR}" + --localstatedir="${MY_LOCALSTATEDIR}" + --mandir="${MY_MANDIR}" + --sysconfdir=/etc/wine + $(use_with alsa) + $(use_with capi) + $(use_with lcms cms) + $(use_with cups) + $(use_with ncurses curses) + $(use_with udisks dbus) + $(use_with fontconfig) + $(use_with ssl gnutls) + $(use_enable gecko mshtml) + $(use_with gphoto2 gphoto) + $(use_with gsm) + $(use_with gssapi) + $(use_with gstreamer) + --without-hal + $(use_with jpeg) + $(use_with kerberos krb5) + $(use_with ldap) + $(use_enable mono mscoree) + $(use_with mp3 mpg123) + $(use_with netapi) + $(use_with nls gettext) + $(use_with openal) + $(use_with opencl) + $(use_with opengl) + $(use_with osmesa) + $(use_with oss) + $(use_with pcap) + $(use_with png) + $(use_with pulseaudio pulse) + $(use_with threads pthread) + $(use_with scanner sane) + $(use_with sdl) + $(use_enable test tests) + $(use_with truetype freetype) + $(use_with udev) + $(use_with v4l) + $(use_with vkd3d) + $(use_with vulkan) + $(use_with X x) + $(use_with X xfixes) + $(use_with xcomposite) + $(use_with xinerama) + $(use_with xml) + $(use_with xml xslt) + ) + + local PKG_CONFIG AR RANLIB + # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038 + # set AR and RANLIB to make QA scripts happy; #483342 + tc-export PKG_CONFIG AR RANLIB + + if use amd64; then + if [[ ${ABI} == amd64 ]]; then + myconf+=( --enable-win64 ) + else + myconf+=( --disable-win64 ) + fi + + # Note: using --with-wine64 results in problems with multilib.eclass + # CC/LD hackery. We're using separate tools instead. + fi + + ECONF_SOURCE=${S} \ + econf "${myconf[@]}" + emake depend +} + +multilib_src_test() { + # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader" + if [[ ${ABI} == x86 ]]; then + if [[ $(id -u) == 0 ]]; then + ewarn "Skipping tests since they cannot be run under the root user." + ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf" + return + fi + + WINEPREFIX="${T}/.wine-${ABI}" \ + Xemake test + fi +} + +multilib_src_install_all() { + local DOCS=( ANNOUNCE AUTHORS README ) + add_locale_docs() { + local locale_doc="documentation/README.$1" + [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} ) + } + l10n_for_each_locale_do add_locale_docs + + einstalldocs + prune_libtool_files --all + + if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script + rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \ + "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die + fi + + # Remove wineconsole if neither backend is installed #551124 + if ! use X && ! use ncurses; then + rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die + rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die + rm_wineconsole() { + rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die + } + multilib_foreach_abi rm_wineconsole + fi + + use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055 + use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader} + + if use abi_x86_64 && ! use abi_x86_32; then + dosym wine64 "${MY_PREFIX}"/bin/wine # 404331 + dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader + fi + + # Failglob for binloops, shouldn't be necessary, but including to stay safe + eshopts_push -s failglob #615218 + # Make wrappers for binaries for handling multiple variants + # Note: wrappers instead of symlinks because some are shell which use basename + local b + for b in "${D%/}${MY_PREFIX}"/bin/*; do + make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}" + done + eshopts_pop +} + +pkg_postinst() { + eselect wine register ${P} + if [[ ${PN} == "wine-vanilla" ]]; then + eselect wine register --vanilla ${P} || die + fi + + eselect wine update --all --if-unset || die + + xdg_desktop_database_update + + if ! use gecko; then + ewarn "Without Wine Gecko, wine prefixes will not have a default" + ewarn "implementation of iexplore. Many older windows applications" + ewarn "rely upon the existence of an iexplore implementation, so" + ewarn "you will likely need to install an external one, like via winetricks" + fi + if ! use mono; then + ewarn "Without Wine Mono, wine prefixes will not have a default" + ewarn "implementation of .NET. Many windows applications rely upon" + ewarn "the existence of a .NET implementation, so you will likely need" + ewarn "to install an external one, like via winetricks" + fi +} + +pkg_prerm() { + eselect wine deregister ${P} + if [[ ${PN} == "wine-vanilla" ]]; then + eselect wine deregister --vanilla ${P} || die + fi + + eselect wine update --all --if-unset || die +} + +pkg_postrm() { + xdg_desktop_database_update +} diff --git a/app-emulation/wine-vanilla/wine-vanilla-3.7.ebuild b/app-emulation/wine-vanilla/wine-vanilla-3.7.ebuild deleted file mode 100644 index 9bebca2da60a..000000000000 --- a/app-emulation/wine-vanilla/wine-vanilla-3.7.ebuild +++ /dev/null @@ -1,529 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PLOCALES="ar bg ca cs da de el en en_US eo es fa fi fr he hi hr hu it ja ko lt ml nb_NO nl or pa pl pt_BR pt_PT rm ro ru sk sl sr_RS@cyrillic sr_RS@latin sv te th tr uk wa zh_CN zh_TW" -PLOCALE_BACKUP="en" - -inherit autotools estack eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils - -MY_PN="${PN%%-*}" -MY_P="${MY_PN}-${PV}" - -if [[ ${PV} == "9999" ]] ; then - EGIT_REPO_URI="https://source.winehq.org/git/wine.git" - EGIT_BRANCH="master" - inherit git-r3 - SRC_URI="" - #KEYWORDS="" -else - MAJOR_V=$(get_version_component_range 1) - SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz" - KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" -fi -S="${WORKDIR}/${MY_P}" - -GWP_V="20180120" -PATCHDIR="${WORKDIR}/gentoo-wine-patches" - -DESCRIPTION="Free implementation of Windows(tm) on Unix, without external patchsets" -HOMEPAGE="https://www.winehq.org/" -SRC_URI="${SRC_URI} - https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz -" - -LICENSE="LGPL-2.1" -SLOT="${PV}" -IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gssapi gstreamer +jpeg kerberos kernel_FreeBSD +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl pcap +png prelink pulseaudio +realtime +run-exes samba scanner sdl selinux +ssl test +threads +truetype udev +udisks v4l vulkan +X +xcomposite xinerama +xml" -REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) - X? ( truetype ) - elibc_glibc? ( threads ) - osmesa? ( opengl ) - test? ( abi_x86_32 )" # osmesa-opengl #286560 # X-truetype #551124 - -# FIXME: the test suite is unsuitable for us; many tests require net access -# or fail due to Xvfb's opengl limitations. -RESTRICT="test" - -COMMON_DEPEND=" - X? ( - x11-libs/libXcursor[${MULTILIB_USEDEP}] - x11-libs/libXext[${MULTILIB_USEDEP}] - x11-libs/libXfixes[${MULTILIB_USEDEP}] - x11-libs/libXrandr[${MULTILIB_USEDEP}] - x11-libs/libXi[${MULTILIB_USEDEP}] - x11-libs/libXxf86vm[${MULTILIB_USEDEP}] - ) - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) - capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] ) - cups? ( net-print/cups:=[${MULTILIB_USEDEP}] ) - fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] ) - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) - gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] ) - gssapi? ( virtual/krb5[${MULTILIB_USEDEP}] ) - gstreamer? ( - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] - media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] - ) - jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] ) - kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] ) - lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] ) - ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) - mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] ) - ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] ) - netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] ) - nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] ) - odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] ) - openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] ) - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) - opengl? ( - virtual/glu[${MULTILIB_USEDEP}] - virtual/opengl[${MULTILIB_USEDEP}] - ) - osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] ) - pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) - pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] ) - scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] ) - sdl? ( media-libs/libsdl2:=[haptic,joystick,${MULTILIB_USEDEP}] ) - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) - truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] ) - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) - udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) - v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) - vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] ) - xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) - xml? ( - dev-libs/libxml2[${MULTILIB_USEDEP}] - dev-libs/libxslt[${MULTILIB_USEDEP}] - )" - -RDEPEND="${COMMON_DEPEND} - app-emulation/wine-desktop-common - >app-eselect/eselect-wine-0.3 - !app-emulation/wine:0 - dos? ( >=games-emulation/dosbox-0.74_p20160629 ) - gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] ) - mono? ( app-emulation/wine-mono:4.7.1 ) - perl? ( - dev-lang/perl - dev-perl/XML-Simple - ) - pulseaudio? ( - realtime? ( sys-auth/rtkit ) - ) - samba? ( >=net-fs/samba-3.0.25[winbind] ) - selinux? ( sec-policy/selinux-wine ) - udisks? ( sys-fs/udisks:2 )" - -# tools/make_requests requires perl -DEPEND="${COMMON_DEPEND} - sys-devel/flex - >=sys-kernel/linux-headers-2.6 - virtual/pkgconfig - virtual/yacc - X? ( x11-base/xorg-proto ) - prelink? ( sys-devel/prelink ) - xinerama? ( x11-base/xorg-proto )" - -# These use a non-standard "Wine" category, which is provided by -# /etc/xdg/applications-merged/wine.menu -QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop -usr/share/applications/wine-notepad.desktop -usr/share/applications/wine-uninstaller.desktop -usr/share/applications/wine-winecfg.desktop" - -PATCHES=( - "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726 - "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615 - "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508 - "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611 -) -PATCHES_BIN=() - -# https://bugs.gentoo.org/show_bug.cgi?id=635222 -if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then - DEPEND+=" dev-util/patchbin" -fi - -wine_compiler_check() { - [[ ${MERGE_TYPE} = "binary" ]] && return 0 - - # GCC-specific bugs - if tc-is-gcc; then - # bug #549768 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then - ebegin "Checking for gcc-5 ms_abi compiler bug" - $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die - # Run in subshell to prevent "Aborted" message - ( "${T}"/pr66838 || false ) >/dev/null 2>&1 - if ! eend $?; then - eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0" - eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild," - eerror "or use gcc-config to select a different compiler version." - eerror "See https://bugs.gentoo.org/549768" - eerror - return 1 - fi - fi - # bug #574044 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then - ebegin "Checking for gcc-5-3 stack realignment compiler bug" - # Compile in subshell to prevent "Aborted" message - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1 - if ! eend $?; then - eerror "Wine cannot be built with this version of gcc-5.3" - eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild," - eerror "or use gcc-config to select a different compiler version." - eerror "See https://bugs.gentoo.org/574044" - eerror - return 1 - fi - fi - fi - - # Ensure compiler support - if use abi_x86_64; then - ebegin "Checking for 64-bit compiler with builtin_ms_va_list support" - # Compile in subshell to prevent "Aborted" message - ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1) - if ! eend $?; then - eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine" - eerror - eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine" - eerror - return 1 - fi - fi -} - -wine_build_environment_check() { - [[ ${MERGE_TYPE} = "binary" ]] && return 0 - - if use abi_x86_64; then - if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then - eerror "You need gcc-4.4+ to compile 64-bit wine" - die - elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then - eerror "You need clang-3.8+ to compile 64-bit wine" - die - fi - fi - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then - ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by" - ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in" - ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4" - fi - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then - if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then - ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work" - ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine." - ewarn "See package.env in man 5 portage for more information on how to do this." - ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details" - fi - fi - - if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then - eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only." - eerror "See https://bugs.gentoo.org/487864 for more details." - eerror - return 1 - fi -} - -wine_env_vcs_vars() { - local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT" - local pn_live_val="${pn_live_var}" - eval pn_live_val='$'${pn_live_val} - if [[ ! -z ${EGIT_COMMIT} ]]; then - eerror "Commits must now be specified using the environmental variables" - eerror "WINE_COMMIT" - eerror - return 1 - fi -} - -pkg_pretend() { - wine_build_environment_check || die - - # Verify OSS support - if use oss && ! use kernel_FreeBSD; then - if ! has_version ">=media-sound/oss-4"; then - eerror "You cannot build wine with USE=oss without having support from a" - eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)" - eerror - die - fi - fi -} - -pkg_setup() { - wine_build_environment_check || die - wine_env_vcs_vars || die - - WINE_VARIANT="${PN#wine}-${PV}" - WINE_VARIANT="${WINE_VARIANT#-}" - - MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}" - MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}" - MY_DATADIR="${MY_DATAROOTDIR}" - MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}" - MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}" - MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}" - MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}" - MY_MANDIR="${MY_DATADIR}/man" -} - -src_unpack() { - if [[ ${PV} == "9999" ]] ; then - EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack - fi - - default - - l10n_find_plocales_changes "${S}/po" "" ".po" -} - -src_prepare() { - - eapply_bin(){ - local patch - for patch in ${PATCHES_BIN[@]}; do - patchbin --nogit < "${patch}" || die - done - } - - local md5="$(md5sum server/protocol.def)" - - default - eapply_bin - eautoreconf - - # Modification of the server protocol requires regenerating the server requests - if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then - einfo "server/protocol.def was patched; running tools/make_requests" - tools/make_requests || die #432348 - fi - sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die - if ! use run-exes; then - sed -i '/^MimeType/d' loader/wine.desktop || die #117785 - fi - - # Edit wine.desktop to work for specific variant - sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die - - # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652 - cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die - - l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS - - # Fix manpage generation for locales #469418 and abi_x86_64 #617864 - - # Duplicate manpages input files for wine64 - local f - for f in loader/*.man.in; do - cp ${f} ${f/wine/wine64} || die - done - # Add wine64 manpages to Makefile - if use abi_x86_64; then - sed -i "/wine.man.in/i \ - \\\twine64.man.in \\\\" loader/Makefile.in || die - sed -i -E 's/(.*wine)(.*\.UTF-8\.man\.in.*)/&\ -\164\2/' loader/Makefile.in || die - fi - - rm_man_file(){ - local file="${1}" - loc=${2} - sed -i "/${loc}\.UTF-8\.man\.in/d" "${file}" || die - } - - while read f; do - l10n_for_each_disabled_locale_do rm_man_file "${f}" - done < <(find -name "Makefile.in" -exec grep -q "UTF-8.man.in" "{}" \; -print) -} - -src_configure() { - wine_compiler_check || die - - export LDCONFIG=/bin/true - use custom-cflags || strip-flags - - multilib-minimal_src_configure -} - -multilib_src_configure() { - local myconf=( - --prefix="${MY_PREFIX}" - --datarootdir="${MY_DATAROOTDIR}" - --datadir="${MY_DATADIR}" - --docdir="${MY_DOCDIR}" - --includedir="${MY_INCLUDEDIR}" - --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}" - --libexecdir="${MY_LIBEXECDIR}" - --localstatedir="${MY_LOCALSTATEDIR}" - --mandir="${MY_MANDIR}" - --sysconfdir=/etc/wine - $(use_with alsa) - $(use_with capi) - $(use_with lcms cms) - $(use_with cups) - $(use_with ncurses curses) - $(use_with udisks dbus) - $(use_with fontconfig) - $(use_with ssl gnutls) - $(use_enable gecko mshtml) - $(use_with gphoto2 gphoto) - $(use_with gsm) - $(use_with gssapi) - $(use_with gstreamer) - --without-hal - $(use_with jpeg) - $(use_with kerberos krb5) - $(use_with ldap) - $(use_enable mono mscoree) - $(use_with mp3 mpg123) - $(use_with netapi) - $(use_with nls gettext) - $(use_with openal) - $(use_with opencl) - $(use_with opengl) - $(use_with osmesa) - $(use_with oss) - $(use_with pcap) - $(use_with png) - $(use_with pulseaudio pulse) - $(use_with threads pthread) - $(use_with scanner sane) - $(use_with sdl) - $(use_enable test tests) - $(use_with truetype freetype) - $(use_with udev) - $(use_with v4l) - $(use_with vulkan) - $(use_with X x) - $(use_with X xfixes) - $(use_with xcomposite) - $(use_with xinerama) - $(use_with xml) - $(use_with xml xslt) - ) - - local PKG_CONFIG AR RANLIB - # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038 - # set AR and RANLIB to make QA scripts happy; #483342 - tc-export PKG_CONFIG AR RANLIB - - if use amd64; then - if [[ ${ABI} == amd64 ]]; then - myconf+=( --enable-win64 ) - else - myconf+=( --disable-win64 ) - fi - - # Note: using --with-wine64 results in problems with multilib.eclass - # CC/LD hackery. We're using separate tools instead. - fi - - ECONF_SOURCE=${S} \ - econf "${myconf[@]}" - emake depend -} - -multilib_src_test() { - # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader" - if [[ ${ABI} == x86 ]]; then - if [[ $(id -u) == 0 ]]; then - ewarn "Skipping tests since they cannot be run under the root user." - ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf" - return - fi - - WINEPREFIX="${T}/.wine-${ABI}" \ - Xemake test - fi -} - -multilib_src_install_all() { - local DOCS=( ANNOUNCE AUTHORS README ) - add_locale_docs() { - local locale_doc="documentation/README.$1" - [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} ) - } - l10n_for_each_locale_do add_locale_docs - - einstalldocs - prune_libtool_files --all - - if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script - rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \ - "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die - fi - - # Remove wineconsole if neither backend is installed #551124 - if ! use X && ! use ncurses; then - rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die - rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die - rm_wineconsole() { - rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die - } - multilib_foreach_abi rm_wineconsole - fi - - use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055 - use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader} - - if use abi_x86_64 && ! use abi_x86_32; then - dosym wine64 "${MY_PREFIX}"/bin/wine # 404331 - dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader - fi - - # Failglob for binloops, shouldn't be necessary, but including to stay safe - eshopts_push -s failglob #615218 - # Make wrappers for binaries for handling multiple variants - # Note: wrappers instead of symlinks because some are shell which use basename - local b - for b in "${D%/}${MY_PREFIX}"/bin/*; do - make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}" - done - eshopts_pop -} - -pkg_postinst() { - eselect wine register ${P} - if [[ ${PN} == "wine-vanilla" ]]; then - eselect wine register --vanilla ${P} || die - fi - - eselect wine update --all --if-unset || die - - xdg_desktop_database_update - - if ! use gecko; then - ewarn "Without Wine Gecko, wine prefixes will not have a default" - ewarn "implementation of iexplore. Many older windows applications" - ewarn "rely upon the existence of an iexplore implementation, so" - ewarn "you will likely need to install an external one, like via winetricks" - fi - if ! use mono; then - ewarn "Without Wine Mono, wine prefixes will not have a default" - ewarn "implementation of .NET. Many windows applications rely upon" - ewarn "the existence of a .NET implementation, so you will likely need" - ewarn "to install an external one, like via winetricks" - fi -} - -pkg_prerm() { - eselect wine deregister ${P} - if [[ ${PN} == "wine-vanilla" ]]; then - eselect wine deregister --vanilla ${P} || die - fi - - eselect wine update --all --if-unset || die -} - -pkg_postrm() { - xdg_desktop_database_update -} -- cgit v1.2.3