1 |
Next try, |
2 |
|
3 |
- eapi 7 support |
4 |
- fixed the trailing slash issue in D and EROOT |
5 |
- some cleanups, as a described in my previous post |
6 |
|
7 |
Please take another look |
8 |
|
9 |
Thanks Jörg |
10 |
|
11 |
<snipp> |
12 |
--- vdr-plugin-2.eclass.old 2018-07-13 14:16:24.134895457 +0200 |
13 |
+++ vdr-plugin-2.eclass 2018-07-14 13:52:38.332693471 +0200 |
14 |
@@ -53,19 +53,6 @@ |
15 |
# PO_SUBDIR="bla foo/bla" |
16 |
# @CODE |
17 |
|
18 |
-# @ECLASS-VARIABLE: VDR_MAINTAINER_MODE |
19 |
-# @DEFAULT_UNSET |
20 |
-# @DESCRIPTION: |
21 |
-# Output from function vdr_dev_check if it is defined in ebuild or eclass, |
22 |
-# helpfull for gentoo ebuild developer |
23 |
-# |
24 |
-# This will also install any debug files in /usr/share/vdr/maintainer-data |
25 |
-# |
26 |
-# This is intended to be set by user in make.conf. Ebuilds must not set |
27 |
-# it. |
28 |
-# |
29 |
-# VDR_MAINTAINER_MODE=1 |
30 |
- |
31 |
# @FUNCTION: fix_vdr_libsi_include |
32 |
# @DESCRIPTION: |
33 |
# Plugins failed on compile with wrong path of libsi includes, |
34 |
@@ -91,7 +78,7 @@ |
35 |
# Applying your own local/user patches: |
36 |
# This is done by using the |
37 |
# (EAPI = 4,5) epatch_user() function of the eutils.eclass, |
38 |
-# (EAPI = 6) eapply_user function integrated in EAPI = 6. |
39 |
+# (EAPI = 6,7) eapply_user function integrated in EAPI = 6. |
40 |
# Simply add your patches into one of these directories: |
41 |
# /etc/portage/patches/<CATEGORY>/<PF|P|PN>/ |
42 |
# Quote: where the first of these three directories to exist will be |
43 |
the one to |
44 |
@@ -99,11 +86,12 @@ |
45 |
# |
46 |
# For more details about it please take a look at the eutils.class. |
47 |
|
48 |
-[[ ${EAPI} == [45] ]] && inherit eutils multilib |
49 |
+[[ ${EAPI} == [45] ]] && inherit multilib |
50 |
+[[ ${EAPI} == [456] ]] && inherit eutils |
51 |
inherit flag-o-matic toolchain-funcs unpacker |
52 |
|
53 |
case ${EAPI:-0} in |
54 |
- 4|5|6) |
55 |
+ 4|5|6|7) |
56 |
;; |
57 |
*) die "EAPI ${EAPI} unsupported." |
58 |
;; |
59 |
@@ -159,7 +147,7 @@ |
60 |
echo "EBUILD=${CATEGORY}/${PN}" |
61 |
echo "EBUILD_V=${PVR}" |
62 |
echo "PLUGINS=\"$@\"" |
63 |
- } > "${D}/${DB_FILE}" |
64 |
+ } > "${D%/}/${DB_FILE}" |
65 |
} |
66 |
|
67 |
vdr_create_header_checksum_file() { |
68 |
@@ -187,7 +175,7 @@ |
69 |
} |
70 |
|
71 |
fix_vdr_libsi_include() { |
72 |
- vdr_dev_check "Fixing include of libsi-headers" |
73 |
+ eqawarn "Fixing include of libsi-headers" |
74 |
local f |
75 |
for f; do |
76 |
sed -i "${f}" \ |
77 |
@@ -225,12 +213,6 @@ |
78 |
-e 's:-I$(DVBDIR)/include::' \ |
79 |
-e 's:-I$(DVBDIR)::' |
80 |
|
81 |
- # may be needed for multiproto: |
82 |
- #sed -i Makefile \ |
83 |
- # -e "s:^DVBDIR.*$:DVBDIR = ${DVB_INCLUDE_DIR}:" \ |
84 |
- # -e 's:-I$(DVBDIR)/include:-I$(DVBDIR):' |
85 |
- # obsolet? fix me later... |
86 |
- |
87 |
if ! grep -q APIVERSION Makefile; then |
88 |
ebegin " Converting to APIVERSION" |
89 |
sed -i Makefile \ |
90 |
@@ -257,20 +239,12 @@ |
91 |
touch "${WORKDIR}"/.vdr-plugin_makefile_patched |
92 |
} |
93 |
|
94 |
-vdr_dev_check() { |
95 |
- # A lot useful debug infos |
96 |
- # set VDR_MAINTAINER_MODE="1" in make.conf |
97 |
- if [[ -n ${VDR_MAINTAINER_MODE} ]]; then |
98 |
- eerror "\t Gentoo Developer Debug: $@" |
99 |
- fi |
100 |
-} |
101 |
- |
102 |
vdr_gettext_missing() { |
103 |
# plugins without converting to gettext |
104 |
|
105 |
local GETTEXT_MISSING=$( grep xgettext Makefile ) |
106 |
if [[ -z ${GETTEXT_MISSING} ]]; then |
107 |
- vdr_dev_check "Plugin isn't converted to gettext handling \n" |
108 |
+ eqawarn "Plugin isn't converted to gettext handling!" |
109 |
fi |
110 |
} |
111 |
|
112 |
@@ -319,26 +293,17 @@ |
113 |
if [[ -n ${I18N_OBJECT} ]]; then |
114 |
|
115 |
if [[ "${KEEP_I18NOBJECT:-no}" = "yes" ]]; then |
116 |
- vdr_dev_check "Forced to keep i18n.o" |
117 |
+ eqawarn "Forced to keep i18n.o" |
118 |
else |
119 |
sed -i "s:i18n.o::g" Makefile |
120 |
- vdr_dev_check "OBJECT i18n.o found" |
121 |
- vdr_dev_check "removed per sed \n" |
122 |
+ eqawarn "OBJECT i18n.o found, removed per sed" |
123 |
fi |
124 |
- |
125 |
- else |
126 |
- vdr_dev_check "OBJECT i18n.o not found in Makefile" |
127 |
- vdr_dev_check "all fine or manual review needed? \n" |
128 |
fi |
129 |
|
130 |
local I18N_STRING=$( [[ -e i18n.h ]] && grep tI18nPhrase i18n.h ) |
131 |
if [[ -n ${I18N_STRING} ]]; then |
132 |
sed -i |
133 |
"s:^extern[[:space:]]*const[[:space:]]*tI18nPhrase://static const |
134 |
tI18nPhrase:" i18n.h |
135 |
- vdr_dev_check "obsolete tI18nPhrase found" |
136 |
- vdr_dev_check "disabled per sed, please recheck \n" |
137 |
- else |
138 |
- vdr_dev_check "obsolete tI18nPhrase not found, fine..." |
139 |
- vdr_dev_check "please review, may be in subdir... \n" |
140 |
+ eqawarn "obsolete tI18nPhrase found, disabled per sed, please |
141 |
recheck" |
142 |
fi |
143 |
} |
144 |
|
145 |
@@ -351,7 +316,7 @@ |
146 |
-e "s:^#include[[:space:]]*\"i18n.h\"://:" |
147 |
done |
148 |
|
149 |
- vdr_dev_check "removed i18n.h include in ${@}" |
150 |
+ eqawarn "removed i18n.h include in ${@}" |
151 |
} |
152 |
|
153 |
vdr-plugin-2_print_enable_command() { |
154 |
@@ -429,7 +394,7 @@ |
155 |
if [[ -n "${VDR_LOCAL_PATCHES_DIR}" ]]; then |
156 |
eerror "Using VDR_LOCAL_PATCHES_DIR is deprecated!" |
157 |
eerror "Please move all your patches into" |
158 |
- eerror "${EROOT}/etc/portage/patches/${CATEGORY}/${P}" |
159 |
+ eerror "${EROOT%/}/etc/portage/patches/${CATEGORY}/${P}" |
160 |
eerror "and remove or unset the VDR_LOCAL_PATCHES_DIR variable." |
161 |
die |
162 |
fi |
163 |
@@ -569,10 +534,10 @@ |
164 |
emake install \ |
165 |
${BUILD_PARAMS} \ |
166 |
TMPDIR="${T}" \ |
167 |
- DESTDIR="${D}" \ |
168 |
+ DESTDIR="${D%/}" \ |
169 |
|| die "emake install (makefile target) failed" |
170 |
else |
171 |
- vdr_dev_check "Plugin use still the old Makefile handling" |
172 |
+ eqawarn "Plugin use still the old Makefile handling" |
173 |
insinto "${VDR_PLUGIN_DIR}" |
174 |
doins libvdr-*.so.* |
175 |
fi |
176 |
@@ -584,11 +549,11 @@ |
177 |
local linguas |
178 |
for linguas in ${LINGUAS[*]}; do |
179 |
insinto "${LOCDIR}" |
180 |
- cp -r --parents ${linguas}* ${D}/${LOCDIR} |
181 |
+ cp -r --parents ${linguas}* ${D%/}/${LOCDIR} |
182 |
done |
183 |
fi |
184 |
|
185 |
- cd "${D}/usr/$(get_libdir)/vdr/plugins" || die "could not change to |
186 |
D/usr/libdir/vdr/plugins" |
187 |
+ cd "${D%/}/usr/$(get_libdir)/vdr/plugins" || die "could not change |
188 |
to D/usr/libdir/vdr/plugins" |
189 |
|
190 |
# create list of all created plugin libs |
191 |
vdr_plugin_list="" |
192 |
</snapp> |
193 |
|
194 |
-- |
195 |
Joerg Bornkessel <hd_brummy@g.o> |
196 |
GnuPG Key: 0x93EB5F4DAA5832A1 |
197 |
Fingerprint: 0E0A A1EE 1DF4 41D7 A3F5 21C2 93EB 5F4D AA58 32A1 |