public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Marek Szuba" <marecki@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/libsmbios/
Date: Fri,  9 Sep 2022 14:02:33 +0000 (UTC)	[thread overview]
Message-ID: <1662732150.26185bf7720aa5404298416b8014bc9929731f07.marecki@gentoo> (raw)

commit:     26185bf7720aa5404298416b8014bc9929731f07
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Fri Sep  9 13:54:39 2022 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Fri Sep  9 14:02:30 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26185bf7

sys-libs/libsmbios: add separate Python handling for USE=test

libsmbios actually uses Python in two ways: in installed scripts
and in the test suite. Previous incarnations of these ebuilds
made the handling of all Python stuff under USE=python but it is
entirely possible for someone want to run the test suite without
installing all the Python scripts - after all as the name suggests
this package IS first and foremost a library.

Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 sys-libs/libsmbios/libsmbios-2.4.3.ebuild | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/sys-libs/libsmbios/libsmbios-2.4.3.ebuild b/sys-libs/libsmbios/libsmbios-2.4.3.ebuild
index 0ffef7c562fa..15ae620a9e16 100644
--- a/sys-libs/libsmbios/libsmbios-2.4.3.ebuild
+++ b/sys-libs/libsmbios/libsmbios-2.4.3.ebuild
@@ -14,7 +14,8 @@ LICENSE="|| ( GPL-2+ OSL-2.1 ) BSD Boost-1.0"
 SLOT="0"
 KEYWORDS="amd64 ~arm64 ~ia64 ~riscv x86"
 IUSE="doc graphviz nls +python static-libs test"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )
+	test? ( ${PYTHON_REQUIRED_USE} )"
 
 RESTRICT="!test? ( test )"
 
@@ -26,8 +27,11 @@ DEPEND="${RDEPEND}
 	virtual/pkgconfig
 	doc? ( app-doc/doxygen )
 	graphviz? ( media-gfx/graphviz )
-	nls? ( sys-devel/gettext )
-	test? ( >=dev-util/cppunit-1.9.6 )"
+	nls? ( sys-devel/gettext )"
+BDEPEND="test? (
+	${PYTHON_DEPS}
+	>=dev-util/cppunit-1.9.6
+)"
 
 PATCHES=(
 	"${FILESDIR}/${PN}-2.2.28-cppunit-tests.patch"
@@ -36,7 +40,9 @@ PATCHES=(
 )
 
 pkg_setup() {
-	use python && python-single-r1_pkg_setup
+	if use python || use test; then
+		python-single-r1_pkg_setup
+	fi
 }
 
 src_prepare() {
@@ -45,7 +51,7 @@ src_prepare() {
 	# Don't build yum-plugin - we don't need it
 	sed '/yum-plugin/d' -i Makefile.am || die
 
-	if use test && use python; then
+	if use test; then
 		python_fix_shebang src/pyunit/test*.py
 	fi
 
@@ -69,7 +75,7 @@ src_configure() {
 src_install() {
 	emake install DESTDIR="${D}"
 
-	if use python ; then
+	if use python; then
 		python_scriptinto /usr/sbin
 		python_doscript "${ED}"/usr/sbin/smbios-{{battery,keyboard,thermal,token,wakeup,wireless}-ctl,lcd-brightness,passwd,sys-info}
 	fi


             reply	other threads:[~2022-09-09 14:02 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-09 14:02 Marek Szuba [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-11-21 10:05 [gentoo-commits] repo/gentoo:master commit in: sys-libs/libsmbios/ Marek Szuba
2023-10-26 12:49 Sam James
2023-10-26 12:49 Sam James
2023-08-09 18:14 Piotr Karbowski
2022-10-07 12:39 Sam James
2022-09-09 14:02 Marek Szuba
2022-09-09 13:25 Marek Szuba
2022-09-07 14:30 Marek Szuba
2022-07-28  0:30 Marek Szuba
2022-07-03 18:42 Piotr Karbowski
2022-06-29 10:59 Marek Szuba
2022-06-29 10:59 Marek Szuba
2022-06-22 10:31 Lars Wendler
2022-05-02  6:05 Sam James
2021-09-01  9:24 Yixun Lan
2021-06-15 23:04 Thomas Deutschmann
2021-02-15  2:19 Rick Farina
2020-12-14  0:46 Sam James
2020-11-30  8:59 Lars Wendler
2020-05-19  0:55 Lars Wendler
2020-05-18 21:13 Agostino Sarubbo
2020-05-18 21:10 Agostino Sarubbo
2020-02-10 13:02 Lars Wendler
2020-02-10 12:12 Michał Górny
2019-11-29 23:26 Lars Wendler
2019-11-29 18:14 Lars Wendler
2019-10-03  8:07 Agostino Sarubbo
2019-05-18 18:07 Mikle Kolyada
2019-05-16 23:56 Thomas Deutschmann
2018-07-10 10:01 Lars Wendler
2018-03-05  9:14 Lars Wendler
2018-03-05  9:14 Lars Wendler
2017-05-26 22:54 David Seifert
2017-05-26 14:05 Agostino Sarubbo
2017-05-25 10:44 Agostino Sarubbo
2017-02-21 13:56 Lars Wendler
2017-01-04 17:09 Agostino Sarubbo
2017-01-04 16:56 Agostino Sarubbo
2016-05-14  7:20 Michał Górny
2016-03-15 14:34 Lars Wendler
2016-03-14 16:16 Lars Wendler
2016-03-14 10:10 Lars Wendler

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=1662732150.26185bf7720aa5404298416b8014bc9929731f07.marecki@gentoo \
    --to=marecki@gentoo.org \
    --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