Gentoo Archives: gentoo-dev

From: dilfridge@g.o
To: gentoo-dev@l.g.o
Cc: "Andreas K. Huettel (dilfridge)" <dilfridge@g.o>
Subject: [gentoo-dev] [PATCH 09/15] perl-module.eclass: Use DIST_ prefix instead of MODULE_ prefix in EAPI=6 for control variables.
Date: Fri, 11 Dec 2015 21:06:11
Message-Id: 1449867791-30513-9-git-send-email-dilfridge@gentoo.org
In Reply to: [gentoo-dev] [PATCH 01/15] perl-module.eclass: Allow EAPI=6, ban PERL_EXPORT_PHASE_FUNCTIONS there, simplify perl dependency by dilfridge@gentoo.org
1 From: "Andreas K. Huettel (dilfridge)" <dilfridge@g.o>
2
3 This is more consistent with upstream terminology and avoids clashes in case of kernel modules.
4 ---
5 eclass/perl-module.eclass | 52 +++++++++++++++++++++++++++--------------------
6 1 file changed, 30 insertions(+), 22 deletions(-)
7
8 diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
9 index 82707fe..efcc47c 100644
10 --- a/eclass/perl-module.eclass
11 +++ b/eclass/perl-module.eclass
12 @@ -114,30 +114,31 @@ esac
13
14 LICENSE="${LICENSE:-|| ( Artistic GPL-1+ )}"
15
16 -# @ECLASS-VARIABLE: MODULE_NAME
17 +# @ECLASS-VARIABLE: DIST_NAME
18 # @DESCRIPTION:
19 # (EAPI=6) This variable provides a way to override PN for the calculation of S,
20 # SRC_URI, and HOMEPAGE. Defaults to PN.
21
22 -# @ECLASS-VARIABLE: MODULE_VERSION
23 +# @ECLASS-VARIABLE: DIST_VERSION
24 # @DESCRIPTION:
25 -# This variable provides a way to override PV for the calculation of S and SRC_URI.
26 +# (EAPI=6) This variable provides a way to override PV for the calculation of S and SRC_URI.
27 # Use it to provide the non-normalized, upstream version number. Defaults to PV.
28 +# Named MODULE_VERSION in EAPI=5.
29
30 -# @ECLASS-VARIABLE: MODULE_A_EXT
31 +# @ECLASS-VARIABLE: DIST_A_EXT
32 # @DESCRIPTION:
33 -# This variable provides a way to override the distfile extension for the calculation of
34 -# SRC_URI. Defaults to tar.gz
35 +# (EAPI=6) This variable provides a way to override the distfile extension for the calculation of
36 +# SRC_URI. Defaults to tar.gz. Named MODULE_A_EXT in EAPI=5.
37
38 -# @ECLASS-VARIABLE: MODULE_A
39 +# @ECLASS-VARIABLE: DIST_A
40 # @DESCRIPTION:
41 -# This variable provides a way to override the distfile name for the calculation of
42 -# SRC_URI. Defaults to ${MODULE_NAME}-${MODULE_VERSION}.${MODULE_A_EXT}
43 +# (EAPI=6) This variable provides a way to override the distfile name for the calculation of
44 +# SRC_URI. Defaults to ${DIST_NAME}-${DIST_VERSION}.${DIST_A_EXT} Named MODULE_A in EAPI=5.
45
46 -# @ECLASS-VARIABLE: MODULE_AUTHOR
47 +# @ECLASS-VARIABLE: DIST_AUTHOR
48 # @DESCRIPTION:
49 -# This variable sets the module author name for the calculation of
50 -# SRC_URI.
51 +# (EAPI=6) This variable sets the module author name for the calculation of
52 +# SRC_URI. Named MODULE_AUTHOR in EAPI=5.
53
54 if [[ ${EAPI:-0} = 5 ]] ; then
55 if [[ -n ${MY_PN} || -n ${MY_PV} || -n ${MODULE_VERSION} ]] ; then
56 @@ -146,19 +147,26 @@ if [[ ${EAPI:-0} = 5 ]] ; then
57 fi
58 MODULE_NAME=${MY_PN:-${PN}}
59 MODULE_P=${MY_P:-${P}}
60 +
61 + [[ -z "${SRC_URI}" && -z "${MODULE_A}" ]] && \
62 + MODULE_A="${MODULE_P}.${MODULE_A_EXT:-tar.gz}"
63 + [[ -z "${SRC_URI}" && -n "${MODULE_AUTHOR}" ]] && \
64 + SRC_URI="mirror://cpan/authors/id/${MODULE_AUTHOR:0:1}/${MODULE_AUTHOR:0:2}/${MODULE_AUTHOR}/${MODULE_SECTION:+${MODULE_SECTION}/}${MODULE_A}"
65 + [[ -z "${HOMEPAGE}" ]] && \
66 + HOMEPAGE="http://search.cpan.org/dist/${MODULE_NAME}/"
67 else
68 - MODULE_NAME=${MODULE_NAME:-${PN}}
69 - MODULE_P=${MODULE_NAME}-${MODULE_VERSION:-${PV}}
70 - S=${WORKDIR}/${MODULE_P}
71 + DIST_NAME=${DIST_NAME:-${PN}}
72 + DIST_P=${DIST_NAME}-${DIST_VERSION:-${PV}}
73 + S=${WORKDIR}/${DIST_P}
74 +
75 + [[ -z "${SRC_URI}" && -z "${DIST_A}" ]] && \
76 + DIST_A="${DIST_P}.${DIST_A_EXT:-tar.gz}"
77 + [[ -z "${SRC_URI}" && -n "${DIST_AUTHOR}" ]] && \
78 + SRC_URI="mirror://cpan/authors/id/${DIST_AUTHOR:0:1}/${DIST_AUTHOR:0:2}/${DIST_AUTHOR}/${DIST_SECTION:+${DIST_SECTION}/}${DIST_A}"
79 + [[ -z "${HOMEPAGE}" ]] && \
80 + HOMEPAGE="http://search.cpan.org/dist/${DIST_NAME}/"
81 fi
82
83 -[[ -z "${SRC_URI}" && -z "${MODULE_A}" ]] && \
84 - MODULE_A="${MODULE_P}.${MODULE_A_EXT:-tar.gz}"
85 -[[ -z "${SRC_URI}" && -n "${MODULE_AUTHOR}" ]] && \
86 - SRC_URI="mirror://cpan/authors/id/${MODULE_AUTHOR:0:1}/${MODULE_AUTHOR:0:2}/${MODULE_AUTHOR}/${MODULE_SECTION:+${MODULE_SECTION}/}${MODULE_A}"
87 -[[ -z "${HOMEPAGE}" ]] && \
88 - HOMEPAGE="http://search.cpan.org/dist/${MODULE_NAME}/"
89 -
90 SRC_PREP="no"
91 SRC_TEST="skip"
92 PREFER_BUILDPL="yes"
93 --
94 2.6.3

Replies