Gentoo Archives: gentoo-dev

From: Joerg Bornkessel <hd_brummy@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] vdr-plugin-2.eclass: add EAPI 7 support
Date: Sat, 14 Jul 2018 09:14:45
Message-Id: 115ef5a4-ae03-9ac4-4602-332449f8ff9a@astrali.lan
1 Am 14.07.2018 um 10:54 schrieb Joerg Bornkessel:
2 Upps, this goes to ulm only...
3 > Am 14.07.2018 um 08:08 schrieb Ulrich Mueller:
4 >>>>>>> On Sat, 14 Jul 2018, Joerg Bornkessel wrote:
5 >>
6 >>> Please review,
7 >>> changes makes the vdr-plugin-2.eclass to be able handle EAPI 7 support.
8 >>> Its just 1 line for this,
9 >>> The rest is clean up, or better i should say, i removed the internal
10 >>> vdr_dev_check function and replaced it by the eqawarn function.
11 >>
12 >> For eqawarn, you should inherit eutils also in EAPI 6. (Currently, the
13 >> eclass inherits it only in EAPIs 4 and 5.)
14 >>
15 >
16 > Thanks Ulrich for the hint, i didn't got any errors on my local test,
17 > as eutils is inherited by the flag-o-matic.eclass too.
18 >
19 > I did some small changes to fix this
20 > and more cleanups too.
21 > I my opinion eqawarn should be used as warning, not if some things works.
22 > Please take another look on my changes...
23 >
24 > Jörg
25 >
26 > <snipp>
27 > --- vdr-plugin-2.eclass.old 2018-07-13 14:16:24.134895457 +0200
28 > +++ vdr-plugin-2.eclass 2018-07-14 10:40:40.161751554 +0200
29 > @@ -53,19 +53,6 @@
30 > # PO_SUBDIR="bla foo/bla"
31 > # @CODE
32 >
33 > -# @ECLASS-VARIABLE: VDR_MAINTAINER_MODE
34 > -# @DEFAULT_UNSET
35 > -# @DESCRIPTION:
36 > -# Output from function vdr_dev_check if it is defined in ebuild or eclass,
37 > -# helpfull for gentoo ebuild developer
38 > -#
39 > -# This will also install any debug files in /usr/share/vdr/maintainer-data
40 > -#
41 > -# This is intended to be set by user in make.conf. Ebuilds must not set
42 > -# it.
43 > -#
44 > -# VDR_MAINTAINER_MODE=1
45 > -
46 > # @FUNCTION: fix_vdr_libsi_include
47 > # @DESCRIPTION:
48 > # Plugins failed on compile with wrong path of libsi includes,
49 > @@ -91,7 +78,7 @@
50 > # Applying your own local/user patches:
51 > # This is done by using the
52 > # (EAPI = 4,5) epatch_user() function of the eutils.eclass,
53 > -# (EAPI = 6) eapply_user function integrated in EAPI = 6.
54 > +# (EAPI = 6,7) eapply_user function integrated in EAPI = 6.
55 > # Simply add your patches into one of these directories:
56 > # /etc/portage/patches/<CATEGORY>/<PF|P|PN>/
57 > # Quote: where the first of these three directories to exist will be
58 > the one to
59 > @@ -99,11 +86,12 @@
60 > #
61 > # For more details about it please take a look at the eutils.class.
62 >
63 > -[[ ${EAPI} == [45] ]] && inherit eutils multilib
64 > +[[ ${EAPI} == [45] ]] && inherit multilib
65 > +[[ ${EAPI} == [456] ]] && inherit eutils
66 > inherit flag-o-matic toolchain-funcs unpacker
67 >
68 > case ${EAPI:-0} in
69 > - 4|5|6)
70 > + 4|5|6|7)
71 > ;;
72 > *) die "EAPI ${EAPI} unsupported."
73 > ;;
74 > @@ -187,7 +175,7 @@
75 > }
76 >
77 > fix_vdr_libsi_include() {
78 > - vdr_dev_check "Fixing include of libsi-headers"
79 > + eqawarn "Fixing include of libsi-headers"
80 > local f
81 > for f; do
82 > sed -i "${f}" \
83 > @@ -225,12 +213,6 @@
84 > -e 's:-I$(DVBDIR)/include::' \
85 > -e 's:-I$(DVBDIR)::'
86 >
87 > - # may be needed for multiproto:
88 > - #sed -i Makefile \
89 > - # -e "s:^DVBDIR.*$:DVBDIR = ${DVB_INCLUDE_DIR}:" \
90 > - # -e 's:-I$(DVBDIR)/include:-I$(DVBDIR):'
91 > - # obsolet? fix me later...
92 > -
93 > if ! grep -q APIVERSION Makefile; then
94 > ebegin " Converting to APIVERSION"
95 > sed -i Makefile \
96 > @@ -257,20 +239,12 @@
97 > touch "${WORKDIR}"/.vdr-plugin_makefile_patched
98 > }
99 >
100 > -vdr_dev_check() {
101 > - # A lot useful debug infos
102 > - # set VDR_MAINTAINER_MODE="1" in make.conf
103 > - if [[ -n ${VDR_MAINTAINER_MODE} ]]; then
104 > - eerror "\t Gentoo Developer Debug: $@"
105 > - fi
106 > -}
107 > -
108 > vdr_gettext_missing() {
109 > # plugins without converting to gettext
110 >
111 > local GETTEXT_MISSING=$( grep xgettext Makefile )
112 > if [[ -z ${GETTEXT_MISSING} ]]; then
113 > - vdr_dev_check "Plugin isn't converted to gettext handling \n"
114 > + eqawarn "Plugin isn't converted to gettext handling!"
115 > fi
116 > }
117 >
118 > @@ -319,26 +293,17 @@
119 > if [[ -n ${I18N_OBJECT} ]]; then
120 >
121 > if [[ "${KEEP_I18NOBJECT:-no}" = "yes" ]]; then
122 > - vdr_dev_check "Forced to keep i18n.o"
123 > + eqawarn "Forced to keep i18n.o"
124 > else
125 > sed -i "s:i18n.o::g" Makefile
126 > - vdr_dev_check "OBJECT i18n.o found"
127 > - vdr_dev_check "removed per sed \n"
128 > + eqawarn "OBJECT i18n.o found, removed per sed"
129 > fi
130 > -
131 > - else
132 > - vdr_dev_check "OBJECT i18n.o not found in Makefile"
133 > - vdr_dev_check "all fine or manual review needed? \n"
134 > fi
135 >
136 > local I18N_STRING=$( [[ -e i18n.h ]] && grep tI18nPhrase i18n.h )
137 > if [[ -n ${I18N_STRING} ]]; then
138 > sed -i
139 > "s:^extern[[:space:]]*const[[:space:]]*tI18nPhrase://static const
140 > tI18nPhrase:" i18n.h
141 > - vdr_dev_check "obsolete tI18nPhrase found"
142 > - vdr_dev_check "disabled per sed, please recheck \n"
143 > - else
144 > - vdr_dev_check "obsolete tI18nPhrase not found, fine..."
145 > - vdr_dev_check "please review, may be in subdir... \n"
146 > + eqawarn "obsolete tI18nPhrase found, disabled per sed, please
147 > recheck"
148 > fi
149 > }
150 >
151 > @@ -351,7 +316,7 @@
152 > -e "s:^#include[[:space:]]*\"i18n.h\"://:"
153 > done
154 >
155 > - vdr_dev_check "removed i18n.h include in ${@}"
156 > + eqawarn "removed i18n.h include in ${@}"
157 > }
158 >
159 > vdr-plugin-2_print_enable_command() {
160 > @@ -572,7 +537,7 @@
161 > DESTDIR="${D}" \
162 > || die "emake install (makefile target) failed"
163 > else
164 > - vdr_dev_check "Plugin use still the old Makefile handling"
165 > + eqawarn "Plugin use still the old Makefile handling"
166 > insinto "${VDR_PLUGIN_DIR}"
167 > doins libvdr-*.so.*
168 > fi
169 >
170 > </snapp>
171 >
172 >
173 >
174
175
176 --
177 Joerg Bornkessel <hd_brummy@g.o>
178 GnuPG Key: 0x93EB5F4DAA5832A1
179 Fingerprint: 0E0A A1EE 1DF4 41D7 A3F5 21C2 93EB 5F4D AA58 32A1

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] [PATCH] vdr-plugin-2.eclass: add EAPI 7 support Joerg Bornkessel <hd_brummy@g.o>