Gentoo Archives: gentoo-dev

From: David Seifert <soap@g.o>
To: gentoo-dev@l.g.o
Cc: David Seifert <soap@g.o>
Subject: [gentoo-dev] [PATCH 19/22] vdr-plugin-2.eclass: remove EAPI 5
Date: Tue, 14 Mar 2023 20:04:21
Message-Id: 20230314195826.35239-19-soap@gentoo.org
In Reply to: [gentoo-dev] [PATCH 01/22] apache-module.eclass: remove EAPI 5 by David Seifert
1 Signed-off-by: David Seifert <soap@g.o>
2 ---
3 eclass/vdr-plugin-2.eclass | 69 ++++++++++++++------------------------
4 1 file changed, 26 insertions(+), 43 deletions(-)
5
6 diff --git a/eclass/vdr-plugin-2.eclass b/eclass/vdr-plugin-2.eclass
7 index 546dbb803bf1..a56b1d41c882 100644
8 --- a/eclass/vdr-plugin-2.eclass
9 +++ b/eclass/vdr-plugin-2.eclass
10 @@ -1,4 +1,4 @@
11 -# Copyright 1999-2022 Gentoo Authors
12 +# Copyright 1999-2023 Gentoo Authors
13 # Distributed under the terms of the GNU General Public License v2
14
15 # @ECLASS: vdr-plugin-2.eclass
16 @@ -9,7 +9,7 @@
17 # Joerg Bornkessel <hd_brummy@g.o>
18 # Christian Ruppert <idl0r@g.o>
19 # (undisclosed contributors)
20 -# @SUPPORTED_EAPIS: 5 6 7 8
21 +# @SUPPORTED_EAPIS: 6 7 8
22 # @BLURB: common vdr plugin ebuild functions
23 # @DESCRIPTION:
24 # Eclass for easing maintenance of vdr plugin ebuilds
25 @@ -60,29 +60,16 @@
26 # PO_SUBDIR="bla foo/bla"
27 # @CODE
28
29 -# Applying your own local/user patches:
30 -# This is done by using the
31 -# (EAPI = 5) epatch_user() function of the eutils.eclass,
32 -# (EAPI = 6,7) eapply_user function integrated in EAPI = 6.
33 -# Simply add your patches into one of these directories:
34 -# /etc/portage/patches/<CATEGORY>/<PF|P|PN>/
35 -# Quote: where the first of these three directories to exist will be the one to
36 -# use, ignoring any more general directories which might exist as well.
37 -#
38 -# For more details about it please take a look at the eutils.class.
39 -
40 -[[ ${EAPI} == [5] ]] && inherit multilib
41 -[[ ${EAPI} == [56] ]] && inherit eutils
42 -inherit flag-o-matic strip-linguas toolchain-funcs unpacker
43 -
44 case ${EAPI} in
45 - 5|6|7|8)
46 - ;;
47 - *) die "${ECLASS}: EAPI ${EAPI:-0} not supported"
48 - ;;
49 + 6|7|8) ;;
50 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
51 esac
52
53 -EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_compile src_install pkg_postinst pkg_postrm pkg_config
54 +if [[ -z ${_VDR_PLUGIN_2_ECLASS} ]]; then
55 +_VDR_PLUGIN_2_ECLASS=1
56 +
57 +[[ ${EAPI} == 6 ]] && inherit eutils
58 +inherit flag-o-matic strip-linguas toolchain-funcs unpacker
59
60 # Name of the plugin stripped from all vdrplugin-, vdr- and -cvs pre- and postfixes
61 VDRPLUGIN="${PN/#vdrplugin-/}"
62 @@ -96,12 +83,16 @@ S="${WORKDIR}/${VDRPLUGIN}-${PV}"
63
64 # depend on headers for DVB-driver and vdr-scripts
65 case ${EAPI} in
66 - 5|6) DEPEND="media-tv/gentoo-vdr-scripts
67 - virtual/linuxtv-dvb-headers
68 - virtual/pkgconfig" ;;
69 - *) BDEPEND="virtual/pkgconfig"
70 - DEPEND="media-tv/gentoo-vdr-scripts
71 - virtual/linuxtv-dvb-headers" ;;
72 + 6)
73 + DEPEND="media-tv/gentoo-vdr-scripts
74 + virtual/linuxtv-dvb-headers
75 + virtual/pkgconfig"
76 + ;;
77 + *)
78 + BDEPEND="virtual/pkgconfig"
79 + DEPEND="media-tv/gentoo-vdr-scripts
80 + virtual/linuxtv-dvb-headers"
81 + ;;
82 esac
83 RDEPEND="media-tv/gentoo-vdr-scripts
84 app-eselect/eselect-vdr"
85 @@ -467,11 +458,7 @@ vdr-plugin-2_src_util() {
86 ;;
87 add_local_patch)
88 cd "${S}" || die "Could not change to plugin-source-directory (src_util)"
89 - if [[ ${EAPI} != [5] ]]; then
90 - eapply_user
91 - else
92 - epatch_user
93 - fi
94 + eapply_user
95 ;;
96 patchmakefile)
97 cd "${S}" || die "Could not change to plugin-source-directory (src_util)"
98 @@ -514,8 +501,7 @@ vdr-plugin-2_src_prepare() {
99 die "vdr-plugin-2_src_prepare not called!"
100 fi
101
102 - [[ ${EAPI} == [5] ]] && [[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}"
103 - [[ ${EAPI} != [5] ]] && [[ ${PATCHES[@]} ]] && eapply "${PATCHES[@]}"
104 + [[ -n ${PATCHES[@]} ]] && eapply "${PATCHES[@]}"
105
106 debug-print "$FUNCNAME: applying user patches"
107
108 @@ -626,14 +612,7 @@ vdr-plugin-2_src_install() {
109 vdr_create_header_checksum_file ${vdr_plugin_list}
110 vdr_create_plugindb_file ${vdr_plugin_list}
111
112 - if [[ ${EAPI} != [45] ]]; then
113 - einstalldocs
114 - else
115 - local docfile
116 - for docfile in README* HISTORY CHANGELOG; do
117 - [[ -f ${docfile} ]] && dodoc ${docfile}
118 - done
119 - fi
120 + einstalldocs
121
122 # if VDR_CONFD_FILE is empty and ${FILESDIR}/confd exists take it
123 [[ -z ${VDR_CONFD_FILE} ]] && [[ -e ${FILESDIR}/confd ]] && VDR_CONFD_FILE=${FILESDIR}/confd
124 @@ -668,3 +647,7 @@ vdr-plugin-2_pkg_postrm() {
125 vdr-plugin-2_pkg_config() {
126 :
127 }
128 +
129 +fi
130 +
131 +EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_compile src_install pkg_postinst pkg_postrm pkg_config
132 --
133 2.40.0