* [gentoo-dev] [PATCH 1/3] readme.gentoo-r1.eclass: works just fine with EAPI=8
@ 2021-06-19 11:01 dilfridge
2021-06-19 11:01 ` [gentoo-dev] [PATCH 2/3] perl-functions.eclass: Add new helpers for EAPI=8 dilfridge
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: dilfridge @ 2021-06-19 11:01 UTC (permalink / raw
To: gentoo-dev; +Cc: Andreas K. Hüttel
From: Andreas K. Hüttel <dilfridge@gentoo.org>
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
---
eclass/readme.gentoo-r1.eclass | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/eclass/readme.gentoo-r1.eclass b/eclass/readme.gentoo-r1.eclass
index dfa3b52b6765..ce492b900104 100644
--- a/eclass/readme.gentoo-r1.eclass
+++ b/eclass/readme.gentoo-r1.eclass
@@ -6,7 +6,7 @@
# Pacho Ramos <pacho@gentoo.org>
# @AUTHOR:
# Author: Pacho Ramos <pacho@gentoo.org>
-# @SUPPORTED_EAPIS: 4 5 6 7
+# @SUPPORTED_EAPIS: 4 5 6 7 8
# @BLURB: install a doc file shown via elog messages
# @DESCRIPTION:
# An eclass for installing a README.gentoo doc file recording tips
@@ -24,7 +24,7 @@ case "${EAPI:-0}" in
0|1|2|3)
die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
;;
- 4|5|6|7)
+ 4|5|6|7|8)
;;
*)
die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
--
2.31.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-dev] [PATCH 2/3] perl-functions.eclass: Add new helpers for EAPI=8 ...
2021-06-19 11:01 [gentoo-dev] [PATCH 1/3] readme.gentoo-r1.eclass: works just fine with EAPI=8 dilfridge
@ 2021-06-19 11:01 ` dilfridge
2021-06-19 11:05 ` Michał Górny
2021-06-19 11:01 ` [gentoo-dev] [PATCH 3/3] perl-module.eclass: Add EAPI=8 support dilfridge
2021-06-19 14:58 ` [gentoo-dev] [PATCH 1/3] readme.gentoo-r1.eclass: works just fine with EAPI=8 Ulrich Mueller
2 siblings, 1 reply; 5+ messages in thread
From: dilfridge @ 2021-06-19 11:01 UTC (permalink / raw
To: gentoo-dev; +Cc: Andreas K. Hüttel
From: Andreas K. Hüttel <dilfridge@gentoo.org>
... and fix an existing one.
fperms works on ${D} by default, so we can give it / to operate on.
Bug: https://bugs.gentoo.org/554346
Bug: https://bugs.gentoo.org/733020
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
---
eclass/perl-functions.eclass | 35 ++++++++++++++++++++++++++++++++---
1 file changed, 32 insertions(+), 3 deletions(-)
diff --git a/eclass/perl-functions.eclass b/eclass/perl-functions.eclass
index 8633f384f1bf..d0a082797265 100644
--- a/eclass/perl-functions.eclass
+++ b/eclass/perl-functions.eclass
@@ -8,7 +8,7 @@
# Seemant Kulleen <seemant@gentoo.org>
# Andreas K. Huettel <dilfridge@gentoo.org>
# Kent Fredric <kentnl@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6 7
+# @SUPPORTED_EAPIS: 5 6 7 8
# @BLURB: helper functions eclass for perl modules
# @DESCRIPTION:
# The perl-functions eclass is designed to allow easier installation of perl
@@ -19,7 +19,7 @@
[[ ${CATEGORY} == "perl-core" ]] && inherit alternatives
case "${EAPI:-0}" in
- 5|6|7)
+ 5|6|7|8)
;;
*)
die "EAPI=${EAPI} is not supported by perl-functions.eclass"
@@ -134,7 +134,8 @@ perl_delete_emptybsdir() {
perl_fix_permissions() {
debug-print-function $FUNCNAME "$@"
perl_set_version
- fperms -R u+w "${D}"
+ einfo Fixing installed file permissions
+ fperms -R u+w /
}
# @FUNCTION: perl_fix_packlist
@@ -596,3 +597,31 @@ perl_domodule() {
insinto "/${target#/}"
doins "${doins_opts[@]}" "${files[@]}"
}
+
+# @FUNCTION: perl_get_wikiurl
+# @DESCRIPTION:
+# Convenience helper for returning the Gentoo Wiki maintenance page URL of a
+# package. Optionally a suffix can be passed for an in-page anchor.
+#
+# Example:
+# @CODE
+# my_url="$(perl_get_wikiurl Testing)"
+# @CODE
+
+perl_get_wikiurl() {
+ debug-print-function $FUNCNAME "$@"
+
+ if [[ "" == ${1} ]]; then
+ echo "https://wiki.gentoo.org/wiki/Project:Perl/maint-notes/${CATEGORY}/${PN}"
+ else
+ echo "https://wiki.gentoo.org/wiki/Project:Perl/maint-notes/${CATEGORY}/${PN}#${1}"
+ fi
+}
+
+perl_get_wikiurl_features() {
+ perl_get_wikiurl Optional_Features
+}
+
+perl_get_wikiurl_tests() {
+ perl_get_wikiurl Testing
+}
--
2.31.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-dev] [PATCH 3/3] perl-module.eclass: Add EAPI=8 support
2021-06-19 11:01 [gentoo-dev] [PATCH 1/3] readme.gentoo-r1.eclass: works just fine with EAPI=8 dilfridge
2021-06-19 11:01 ` [gentoo-dev] [PATCH 2/3] perl-functions.eclass: Add new helpers for EAPI=8 dilfridge
@ 2021-06-19 11:01 ` dilfridge
2021-06-19 14:58 ` [gentoo-dev] [PATCH 1/3] readme.gentoo-r1.eclass: works just fine with EAPI=8 Ulrich Mueller
2 siblings, 0 replies; 5+ messages in thread
From: dilfridge @ 2021-06-19 11:01 UTC (permalink / raw
To: gentoo-dev; +Cc: Andreas K. Hüttel
From: Andreas K. Hüttel <dilfridge@gentoo.org>
New features: DIST_WIKI and DIST_MAKE
File permissions are fixed on installation
Bug: https://bugs.gentoo.org/733020
Bug: https://bugs.gentoo.org/554346
Bug: https://bugs.gentoo.org/261375
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
---
eclass/perl-module.eclass | 89 +++++++++++++++++++++++++++++++++------
1 file changed, 76 insertions(+), 13 deletions(-)
diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
index 3f7e4100db07..6285e9363156 100644
--- a/eclass/perl-module.eclass
+++ b/eclass/perl-module.eclass
@@ -7,7 +7,7 @@
# @AUTHOR:
# Seemant Kulleen <seemant@gentoo.org>
# Andreas K. Hüttel <dilfridge@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6 7
+# @SUPPORTED_EAPIS: 5 6 7 8
# @BLURB: eclass for installing Perl module distributions
# @DESCRIPTION:
# The perl-module eclass is designed to allow easier installation of Perl
@@ -27,6 +27,10 @@ case ${EAPI:-0} in
inherit multiprocessing perl-functions
PERL_EXPF="src_prepare src_configure src_compile src_test src_install"
;;
+ 8)
+ inherit multiprocessing perl-functions readme.gentoo-r1
+ PERL_EXPF="src_prepare src_configure src_compile src_test src_install"
+ ;;
*)
die "EAPI=${EAPI} is not supported by perl-module.eclass"
;;
@@ -99,7 +103,7 @@ case ${EAPI:-0} in
EXPORT_FUNCTIONS ${PERL_EXPF}
;;
- 7)
+ *)
[[ ${CATEGORY} == perl-core ]] && \
PERL_EXPF+=" pkg_postinst pkg_postrm"
@@ -126,9 +130,6 @@ case ${EAPI:-0} in
EXPORT_FUNCTIONS ${PERL_EXPF}
;;
- *)
- die "EAPI=${EAPI:-0} is not supported by perl-module.eclass"
- ;;
esac
LICENSE="${LICENSE:-|| ( Artistic GPL-1+ )}"
@@ -180,6 +181,25 @@ LICENSE="${LICENSE:-|| ( Artistic GPL-1+ )}"
# a use-flag examples, if not you'll have to add the useflag in your ebuild.
# Examples are installed only if the useflag examples exists and is activated.
+# @ECLASS-VARIABLE: DIST_WIKI
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# (EAPI=8 and later) This variable can be set to contain space-separated keywords
+# corresponding to article sections in a maintenance notes wiki article. If a
+# keyword is set, an ebuild phase can output a message and a link to the wiki.
+# Current keywords as of EAPI=8 are:
+# * features: Notes about additional dependencies for optional features
+# * tests: Notes about additional dependencies and preparations needed for testing
+
+# @ECLASS-VARIABLE: DIST_MAKE
+# @DESCRIPTION:
+# (EAPI=8 and later) This Bash array contains parameters to the make call
+# from ExtUtils::MakeMaker. Replaces mymake in EAPI=7 and earlier.
+# Defaults to ( OPTIMIZE="${CFLAGS}" )
+if [[ $(declare -p DIST_MAKE 2>&-) != "declare -a DIST_MAKE="* ]]; then
+ DIST_MAKE=( OPTIMIZE="${CFLAGS}" )
+fi
+
if [[ ${EAPI:-0} == 5 ]]; then
if [[ -n ${MY_PN} || -n ${MY_PV} || -n ${MODULE_VERSION} ]] ; then
@@ -343,11 +363,18 @@ perl-module_src_compile() {
debug-print-function $FUNCNAME "$@"
perl_set_version
- if [[ $(declare -p mymake 2>&-) != "declare -a mymake="* ]]; then
- local mymake_local=(${mymake})
- else
- local mymake_local=("${mymake[@]}")
- fi
+ case ${EAPI} in
+ 5|6|7)
+ if [[ $(declare -p mymake 2>&-) != "declare -a mymake="* ]]; then
+ local mymake_local=(${mymake})
+ else
+ local mymake_local=("${mymake[@]}")
+ fi
+ ;;
+ *)
+ local mymake_local=("${DIST_MAKE[@]}")
+ ;;
+ esac
if [[ -f Build ]] ; then
./Build build \
@@ -396,7 +423,7 @@ perl-module_src_test() {
local my_test_control
local my_test_verbose
- if [[ ${EAPI:-0} == 5 ]] ; then
+ if [[ ${EAPI} == 5 ]] ; then
my_test_control=${SRC_TEST}
my_test_verbose=${TEST_VERBOSE:-0}
if has 'do' ${my_test_control} || has 'parallel' ${my_test_control} ; then
@@ -434,6 +461,18 @@ perl-module_src_test() {
fi
fi
+ case ${EAPI} in
+ 5|6|7)
+ ;;
+ *)
+ if has 'tests' ${DIST_WIKI} ; then
+ ewarn "This package may require additional dependencies and/or preparation steps for"
+ ewarn "comprehensive testing. For details, see:"
+ ewarn "$(perl_get_wikiurl_tests)"
+ fi
+ ;;
+ esac
+
perl_set_version
if [[ -f Build ]] ; then
./Build test verbose=${my_test_verbose} || die "test failed"
@@ -473,9 +512,17 @@ perl-module_src_install() {
|| die "emake ${myinst_local[@]} ${mytargets} failed"
fi
+ case ${EAPI} in
+ 5|6|7)
+ ;;
+ *)
+ perl_fix_permissions
+ ;;
+ esac
+
perl_delete_module_manpages
perl_delete_localpod
- if [[ ${EAPI:-0} == 5 ]] ; then
+ if [[ ${EAPI} == 5 ]] ; then
perl_delete_packlist
else
perl_fix_packlist
@@ -487,13 +534,29 @@ perl-module_src_install() {
[[ -s ${f} ]] && dodoc ${f}
done
- if [[ ${EAPI:-0} != 5 ]] ; then
+ if [[ ${EAPI} != 5 ]] ; then
if in_iuse examples && use examples ; then
[[ ${#DIST_EXAMPLES[@]} -eq 0 ]] || perl_doexamples "${DIST_EXAMPLES[@]}"
fi
fi
perl_link_duallife_scripts
+
+ case ${EAPI} in
+ 5|6|7)
+ ;;
+ *)
+ if has 'features' ${DIST_WIKI} ; then
+ DISABLE_AUTOFORMATTING=yes
+ DOC_CONTENTS="This package may require additional dependencies and/or preparation steps for\n"
+ DOC_CONTENTS+="some optional features. For details, see\n"
+ DOC_CONTENTS+="$(perl_get_wikiurl_features)"
+ einfo
+ readme.gentoo_create_doc
+ readme.gentoo_print_elog
+ fi
+ ;;
+ esac
}
# @FUNCTION: perl-module_pkg_postinst
--
2.31.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [gentoo-dev] [PATCH 2/3] perl-functions.eclass: Add new helpers for EAPI=8 ...
2021-06-19 11:01 ` [gentoo-dev] [PATCH 2/3] perl-functions.eclass: Add new helpers for EAPI=8 dilfridge
@ 2021-06-19 11:05 ` Michał Górny
0 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2021-06-19 11:05 UTC (permalink / raw
To: gentoo-dev; +Cc: Andreas K. Hüttel
On Sat, 2021-06-19 at 13:01 +0200, dilfridge@gentoo.org wrote:
> From: Andreas K. Hüttel <dilfridge@gentoo.org>
>
> ... and fix an existing one.
>
> fperms works on ${D} by default, so we can give it / to operate on.
>
> Bug: https://bugs.gentoo.org/554346
> Bug: https://bugs.gentoo.org/733020
> Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
> ---
> eclass/perl-functions.eclass | 35 ++++++++++++++++++++++++++++++++---
> 1 file changed, 32 insertions(+), 3 deletions(-)
>
> diff --git a/eclass/perl-functions.eclass b/eclass/perl-functions.eclass
> index 8633f384f1bf..d0a082797265 100644
> --- a/eclass/perl-functions.eclass
> +++ b/eclass/perl-functions.eclass
> @@ -8,7 +8,7 @@
> # Seemant Kulleen <seemant@gentoo.org>
> # Andreas K. Huettel <dilfridge@gentoo.org>
> # Kent Fredric <kentnl@gentoo.org>
> -# @SUPPORTED_EAPIS: 5 6 7
> +# @SUPPORTED_EAPIS: 5 6 7 8
> # @BLURB: helper functions eclass for perl modules
> # @DESCRIPTION:
> # The perl-functions eclass is designed to allow easier installation of perl
> @@ -19,7 +19,7 @@
> [[ ${CATEGORY} == "perl-core" ]] && inherit alternatives
>
> case "${EAPI:-0}" in
> - 5|6|7)
> + 5|6|7|8)
> ;;
> *)
> die "EAPI=${EAPI} is not supported by perl-functions.eclass"
> @@ -134,7 +134,8 @@ perl_delete_emptybsdir() {
> perl_fix_permissions() {
> debug-print-function $FUNCNAME "$@"
> perl_set_version
> - fperms -R u+w "${D}"
> + einfo Fixing installed file permissions
> + fperms -R u+w /
> }
>
> # @FUNCTION: perl_fix_packlist
> @@ -596,3 +597,31 @@ perl_domodule() {
> insinto "/${target#/}"
> doins "${doins_opts[@]}" "${files[@]}"
> }
> +
> +# @FUNCTION: perl_get_wikiurl
> +# @DESCRIPTION:
> +# Convenience helper for returning the Gentoo Wiki maintenance page URL of a
> +# package. Optionally a suffix can be passed for an in-page anchor.
> +#
> +# Example:
> +# @CODE
> +# my_url="$(perl_get_wikiurl Testing)"
> +# @CODE
> +
> +perl_get_wikiurl() {
> + debug-print-function $FUNCNAME "$@"
> +
> + if [[ "" == ${1} ]]; then
[[ -z ${1} ]] ? ;-)
> + echo "https://wiki.gentoo.org/wiki/Project:Perl/maint-notes/${CATEGORY}/${PN}"
> + else
> + echo "https://wiki.gentoo.org/wiki/Project:Perl/maint-notes/${CATEGORY}/${PN}#${1}"
> + fi
> +}
> +
> +perl_get_wikiurl_features() {
> + perl_get_wikiurl Optional_Features
> +}
> +
> +perl_get_wikiurl_tests() {
> + perl_get_wikiurl Testing
> +}
--
Best regards,
Michał Górny
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-dev] [PATCH 1/3] readme.gentoo-r1.eclass: works just fine with EAPI=8
2021-06-19 11:01 [gentoo-dev] [PATCH 1/3] readme.gentoo-r1.eclass: works just fine with EAPI=8 dilfridge
2021-06-19 11:01 ` [gentoo-dev] [PATCH 2/3] perl-functions.eclass: Add new helpers for EAPI=8 dilfridge
2021-06-19 11:01 ` [gentoo-dev] [PATCH 3/3] perl-module.eclass: Add EAPI=8 support dilfridge
@ 2021-06-19 14:58 ` Ulrich Mueller
2 siblings, 0 replies; 5+ messages in thread
From: Ulrich Mueller @ 2021-06-19 14:58 UTC (permalink / raw
To: dilfridge; +Cc: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 120 bytes --]
See my posting 4 days ago:
https://archives.gentoo.org/gentoo-dev/message/c71621ccc96873d98697fb35c98c55b1
Merged now.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 507 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-06-19 14:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-19 11:01 [gentoo-dev] [PATCH 1/3] readme.gentoo-r1.eclass: works just fine with EAPI=8 dilfridge
2021-06-19 11:01 ` [gentoo-dev] [PATCH 2/3] perl-functions.eclass: Add new helpers for EAPI=8 dilfridge
2021-06-19 11:05 ` Michał Górny
2021-06-19 11:01 ` [gentoo-dev] [PATCH 3/3] perl-module.eclass: Add EAPI=8 support dilfridge
2021-06-19 14:58 ` [gentoo-dev] [PATCH 1/3] readme.gentoo-r1.eclass: works just fine with EAPI=8 Ulrich Mueller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox