From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id EE93B158041 for ; Mon, 19 Feb 2024 21:58:58 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7F5D12BC016; Mon, 19 Feb 2024 21:58:57 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5CC1A2BC016 for ; Mon, 19 Feb 2024 21:58:57 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 433F73430D4 for ; Mon, 19 Feb 2024 21:58:56 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DA93014C8 for ; Mon, 19 Feb 2024 21:58:54 +0000 (UTC) From: "Lucio Sauer" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Lucio Sauer" Message-ID: <1708379925.387f0268019787ae17a476e6ef43267aab1d5e6b.watermanpaint@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: dev-python/pyclip/ X-VCS-Repository: repo/proj/guru X-VCS-Files: dev-python/pyclip/pyclip-9999.ebuild X-VCS-Directories: dev-python/pyclip/ X-VCS-Committer: watermanpaint X-VCS-Committer-Name: Lucio Sauer X-VCS-Revision: 387f0268019787ae17a476e6ef43267aab1d5e6b X-VCS-Branch: dev Date: Mon, 19 Feb 2024 21:58:54 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 0e5953d2-0e5b-4047-8e5f-e147a741e189 X-Archives-Hash: c225759f46df1277c6dd4542a93268b3 commit: 387f0268019787ae17a476e6ef43267aab1d5e6b Author: Lucio Sauer posteo net> AuthorDate: Mon Feb 19 21:57:21 2024 +0000 Commit: Lucio Sauer posteo net> CommitDate: Mon Feb 19 21:58:45 2024 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=387f0268 dev-python/pyclip: sync live ebuild Signed-off-by: Lucio Sauer posteo.net> dev-python/pyclip/pyclip-9999.ebuild | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/dev-python/pyclip/pyclip-9999.ebuild b/dev-python/pyclip/pyclip-9999.ebuild index 5db126b6c0..85ade02ebc 100644 --- a/dev-python/pyclip/pyclip-9999.ebuild +++ b/dev-python/pyclip/pyclip-9999.ebuild @@ -21,7 +21,8 @@ DESCRIPTION="Python clipboard module" HOMEPAGE="https://pypi.org/project/pyclip/" LICENSE="Apache-2.0" SLOT="0" -IUSE="wayland X" +IUSE="wayland +X" +# Needs a working xorg/wayland setup RESTRICT="test" DOCS="${S}/docs/README.md" REQUIRED_USE="|| ( wayland X )" @@ -30,3 +31,21 @@ RDEPEND=" wayland? ( gui-apps/wl-clipboard ) X? ( x11-misc/xclip ) " + +src_prepare() { + # Clipboard detection should respect USE flags + if use wayland && ! use X; then + sed -ie "/linux':/s/elif .*/elif False:/" pyclip/util.py || die + elif ! use wayland && use X; then + sed -ie "/WAYLAND/s/elif .*/elif False:/" pyclip/util.py || die + fi + distutils-r1_src_prepare +} + +pkg_postinst() { + if use wayland && use X; then + elog "If you wish to use the xclip backend over the wl-clipboard backend," + elog "unset the WAYLAND_DISPLAY environment variable or consider" + elog "installing ${CATEGORY}/${PN}[-wayland,X] instead." + fi +}