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: net-irc/thelounge/
Date: Tue, 12 Mar 2024 00:18:40 +0000 (UTC)	[thread overview]
Message-ID: <1710187107.8fd3dfb68a9bc5b378c722874b572185e26c916e.julien@gentoo> (raw)

commit:     8fd3dfb68a9bc5b378c722874b572185e26c916e
Author:     Rahil Bhimjiani <me <AT> rahil <DOT> rocks>
AuthorDate: Mon Mar 11 19:36:23 2024 +0000
Commit:     Julien Roy <julien <AT> jroy <DOT> ca>
CommitDate: Mon Mar 11 19:58:27 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=8fd3dfb6

net-irc/thelounge: use specific python version

Instead of just executing `python` or `python3` which are just symlinks
and considered bad practice, execute specific python
executable (i.e. /usr/bin/python3.11)

This also fixes failing build with python-exec[-native-symlinks]

Closes: https://bugs.gentoo.org/926719
Signed-off-by: Rahil Bhimjiani <me <AT> rahil.rocks>

 net-irc/thelounge/thelounge-4.4.1.ebuild     | 12 ++++++++++--
 net-irc/thelounge/thelounge-4.4.2_rc1.ebuild | 12 ++++++++++--
 2 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/net-irc/thelounge/thelounge-4.4.1.ebuild b/net-irc/thelounge/thelounge-4.4.1.ebuild
index 1f86cc3737..93cca19219 100644
--- a/net-irc/thelounge/thelounge-4.4.1.ebuild
+++ b/net-irc/thelounge/thelounge-4.4.1.ebuild
@@ -3,7 +3,9 @@
 
 EAPI=8
 
-inherit readme.gentoo-r1 systemd tmpfiles
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit python-single-r1 readme.gentoo-r1 systemd tmpfiles
 
 DESCRIPTION="‎Modern, responsive, cross-platform, self-hosted web IRC client"
 HOMEPAGE="https://thelounge.chat/"
@@ -19,6 +21,7 @@ LICENSE="BSD MIT"
 SLOT="0"
 KEYWORDS="~amd64"
 IUSE="+sqlite"
+REQUIRED_USE="sqlite? ( ${PYTHON_REQUIRED_USE} )"
 
 RDEPEND="
 	acct-user/${PN}
@@ -28,6 +31,7 @@ RDEPEND="
 "
 DEPEND="${RDEPEND}"
 BDEPEND="
+	sqlite? ( ${PYTHON_DEPS} )
 	>=net-libs/nodejs-16[npm]
 	sys-apps/yarn
 "
@@ -67,7 +71,11 @@ src_compile() {
 	if use sqlite; then
 		# sqlite3 build
 		pushd node_modules/sqlite3 || die
-		export npm_config_cache="${WORKDIR}"/npm-cache npm_config_nodedir="${EPREFIX}"/usr || die
+		export \
+			npm_config_cache="${WORKDIR}"/npm-cache \
+			npm_config_nodedir="${EPREFIX}"/usr \
+			NODE_GYP_FORCE_PYTHON="$(command -v ${PYTHON_SINGLE_TARGET/_/.})" \
+			|| die
 		npm --verbose --offline install --build-from-source --sqlite="${EPREFIX}"/usr || die
 		# sqlite3 cleanup
 		rm -rf node_modules || die

diff --git a/net-irc/thelounge/thelounge-4.4.2_rc1.ebuild b/net-irc/thelounge/thelounge-4.4.2_rc1.ebuild
index 475c04eae3..588c79dce6 100644
--- a/net-irc/thelounge/thelounge-4.4.2_rc1.ebuild
+++ b/net-irc/thelounge/thelounge-4.4.2_rc1.ebuild
@@ -3,7 +3,9 @@
 
 EAPI=8
 
-inherit readme.gentoo-r1 systemd tmpfiles
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit python-single-r1 readme.gentoo-r1 systemd tmpfiles
 
 DESCRIPTION="‎Modern, responsive, cross-platform, self-hosted web IRC client"
 HOMEPAGE="https://thelounge.chat/"
@@ -19,6 +21,7 @@ LICENSE="BSD MIT"
 SLOT="0"
 KEYWORDS="~amd64"
 IUSE="+sqlite"
+REQUIRED_USE="sqlite? ( ${PYTHON_REQUIRED_USE} )"
 
 RDEPEND="
 	acct-user/${PN}
@@ -28,6 +31,7 @@ RDEPEND="
 "
 DEPEND="${RDEPEND}"
 BDEPEND="
+	sqlite? ( ${PYTHON_DEPS} )
 	>=net-libs/nodejs-18[npm]
 	sys-apps/yarn
 "
@@ -67,7 +71,11 @@ src_compile() {
 	if use sqlite; then
 		# sqlite3 build
 		pushd node_modules/sqlite3 || die
-		export npm_config_cache="${WORKDIR}"/npm-cache npm_config_nodedir="${EPREFIX}"/usr || die
+		export \
+			npm_config_cache="${WORKDIR}"/npm-cache \
+			npm_config_nodedir="${EPREFIX}"/usr \
+			NODE_GYP_FORCE_PYTHON="$(command -v ${PYTHON_SINGLE_TARGET/_/.})" \
+			|| die
 		npm --verbose --offline install --build-from-source --sqlite="${EPREFIX}"/usr || die
 		# sqlite3 cleanup
 		rm -rf node_modules || die


             reply	other threads:[~2024-03-12  0:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-12  0:18 Julien Roy [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-03-20  9:22 [gentoo-commits] repo/proj/guru:master commit in: net-irc/thelounge/ David Roman
2024-08-24 20:56 David Roman
2024-08-24 20:56 David Roman
2024-04-08 21:32 Julien Roy
2024-03-12 14:48 Haelwenn Monnier
2024-03-12  0:18 Julien Roy
2024-03-10 21:26 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=1710187107.8fd3dfb68a9bc5b378c722874b572185e26c916e.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