From: "Andreas K. Hüttel" <dilfridge@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: pr@gentoo.org, "Andreas K. Hüttel" <dilfridge@gentoo.org>
Subject: [gentoo-dev] [PATCH 8/9] perl-module.eclass: Implement dependency on PERL_FEATURES
Date: Fri, 3 May 2024 08:55:35 +0200 [thread overview]
Message-ID: <20240503065536.2268112-8-dilfridge@gentoo.org> (raw)
In-Reply-To: <20240503065536.2268112-1-dilfridge@gentoo.org>
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
---
eclass/perl-module.eclass | 47 ++++++++++++++++++++++++++++++---------
1 file changed, 36 insertions(+), 11 deletions(-)
diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
index 7bb02abed8c5..029fc78e4a85 100644
--- a/eclass/perl-module.eclass
+++ b/eclass/perl-module.eclass
@@ -44,6 +44,28 @@ esac
# a use-conditional build time dependency on virtual/perl-Test-Simple, and
# the required RESTRICT setting.
+# @ECLASS_VARIABLE: PERL_USEDEP
+# @OUTPUT_VARIABLE
+# @DESCRIPTION:
+# An eclass-generated USE-dependency string for the features of the
+# installed Perl. While by far not as critical as for Python, this should
+# be used to depend at least on Perl packages installing compiled
+# (binary) files.
+#
+# Example use:
+# @CODE
+# RDEPEND=dev-perl/DBI[${PERL_USEDEP}]
+# @CODE
+#
+# Example value:
+# @CODE
+# perl_features_debug=,perl_features_ithreads=,perl_features_quadmath=
+# @CODE
+PERL_USEDEP="perl_features_debug=,perl_features_ithreads=,perl_features_quadmath="
+
+GENTOO_PERL_DEPSTRING=" || ( >=dev-lang/perl-5.38.2-r3[${PERL_USEDEP}] <dev-lang/perl-5.38.2-r3 )"
+GENTOO_PERL_USESTRING="perl_features_debug perl_features_ithreads perl_features_quadmath"
+
case ${EAPI} in
7)
[[ ${CATEGORY} == perl-core ]] && \
@@ -51,14 +73,16 @@ case ${EAPI} in
case "${GENTOO_DEPEND_ON_PERL:-yes}" in
yes)
- DEPEND="dev-lang/perl"
- BDEPEND="dev-lang/perl"
- RDEPEND="dev-lang/perl:="
+ IUSE=${GENTOO_PERL_USESTRING}
+ DEPEND=${GENTOO_PERL_DEPSTRING}
+ BDEPEND=${GENTOO_PERL_DEPSTRING}
+ RDEPEND="${GENTOO_PERL_DEPSTRING} dev-lang/perl:="
;;
noslotop)
- DEPEND="dev-lang/perl"
- BDEPEND="dev-lang/perl"
- RDEPEND="dev-lang/perl"
+ IUSE=${GENTOO_PERL_USESTRING}
+ DEPEND=${GENTOO_PERL_DEPSTRING}
+ BDEPEND=${GENTOO_PERL_DEPSTRING}
+ RDEPEND=${GENTOO_PERL_DEPSTRING}
;;
esac
@@ -78,17 +102,18 @@ case ${EAPI} in
case "${GENTOO_DEPEND_ON_PERL:-yes}" in
yes|noslotop)
- DEPEND="dev-lang/perl"
- BDEPEND="dev-lang/perl
+ IUSE=${GENTOO_PERL_USESTRING}
+ DEPEND=${GENTOO_PERL_DEPSTRING}
+ BDEPEND="${GENTOO_PERL_DEPSTRING}
test? ( >=virtual/perl-Test-Simple-1 )"
- IUSE="test"
+ IUSE+=" test"
RESTRICT="!test? ( test )"
;;&
yes)
- RDEPEND="dev-lang/perl:="
+ RDEPEND="${GENTOO_PERL_DEPSTRING} dev-lang/perl:="
;;
noslotop)
- RDEPEND="dev-lang/perl"
+ RDEPEND=${GENTOO_PERL_DEPSTRING}
;;
esac
--
2.43.2
next prev parent reply other threads:[~2024-05-03 6:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-03 6:54 [gentoo-dev] news item and patch series: 2024-05-10-perl-features-use-expand.en.txt Andreas K. Huettel
2024-05-03 6:55 ` [gentoo-dev] [PATCH 1/9] dev-lang/perl: Migrate to PERL_FEATURES Andreas K. Hüttel
2024-05-03 6:55 ` [gentoo-dev] [PATCH 2/9] app-editors/padre: Port " Andreas K. Hüttel
2024-05-03 6:55 ` [gentoo-dev] [PATCH 3/9] app-metrics/collectd: " Andreas K. Hüttel
2024-05-03 6:55 ` [gentoo-dev] [PATCH 4/9] media-sound/cantata: " Andreas K. Hüttel
2024-05-03 6:55 ` [gentoo-dev] [PATCH 5/9] net-analyzer/snortalog: " Andreas K. Hüttel
2024-05-03 6:55 ` [gentoo-dev] [PATCH 6/9] virtual/perl-threads: " Andreas K. Hüttel
2024-05-03 6:55 ` [gentoo-dev] [PATCH 7/9] www-apache/mod_perl: " Andreas K. Hüttel
2024-05-03 6:55 ` Andreas K. Hüttel [this message]
2024-05-03 6:55 ` [gentoo-dev] [PATCH 9/9] profiles: use.mask perl_features_debug Andreas K. Hüttel
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=20240503065536.2268112-8-dilfridge@gentoo.org \
--to=dilfridge@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
--cc=pr@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