public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Julien Roy" <julien@jroy.ca>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/guru:master commit in: dev-python/pyclip/
Date: Mon, 19 Feb 2024 22:03:29 +0000 (UTC)	[thread overview]
Message-ID: <1708379920.36dc547f962382ded195530b6d1d45c13c0b6bac.julien@gentoo> (raw)

commit:     36dc547f962382ded195530b6d1d45c13c0b6bac
Author:     Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
AuthorDate: Mon Feb 19 21:54:04 2024 +0000
Commit:     Julien Roy <julien <AT> jroy <DOT> ca>
CommitDate: Mon Feb 19 21:58:40 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=36dc547f

dev-python/pyclip: clipboard detection should respect USE flags

Signed-off-by: Lucio Sauer <watermanpaint <AT> posteo.net>

 dev-python/pyclip/pyclip-0.7.0-r1.ebuild | 51 ++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/dev-python/pyclip/pyclip-0.7.0-r1.ebuild b/dev-python/pyclip/pyclip-0.7.0-r1.ebuild
new file mode 100644
index 0000000000..85ade02ebc
--- /dev/null
+++ b/dev-python/pyclip/pyclip-0.7.0-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+DISTUTILS_USE_PEP517="setuptools"
+
+inherit distutils-r1
+
+if [[ ${PV} == 9999 ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/spyoungtech/pyclip.git"
+else
+	SRC_URI="https://github.com/spyoungtech/pyclip/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz"
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+fi
+
+DESCRIPTION="Python clipboard module"
+HOMEPAGE="https://pypi.org/project/pyclip/"
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="wayland +X"
+# Needs a working xorg/wayland setup
+RESTRICT="test"
+DOCS="${S}/docs/README.md"
+REQUIRED_USE="|| ( wayland X )"
+
+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
+}


             reply	other threads:[~2024-02-19 22:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-19 22:03 Julien Roy [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-03-21 23:06 [gentoo-commits] repo/proj/guru:master commit in: dev-python/pyclip/ Julien Roy
2024-02-19 22:03 Julien Roy
2024-02-19 22:03 Julien Roy
2024-02-19 21:33 [gentoo-commits] repo/proj/guru:dev " Julien Roy
2024-02-19 22:00 ` [gentoo-commits] repo/proj/guru:master " Julien Roy
2022-12-20 17:23 Haelwenn Monnier
2022-12-20 17:23 Haelwenn Monnier
2022-05-23 17:15 Haelwenn Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1708379920.36dc547f962382ded195530b6d1d45c13c0b6bac.julien@gentoo \
    --to=julien@jroy.ca \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox