* [gentoo-dev] vdr-plugin-2.eclass QA fix, please review, bug 778815
@ 2021-04-09 21:10 Joerg Bornkessel
2021-04-09 21:37 ` Sam James
0 siblings, 1 reply; 8+ messages in thread
From: Joerg Bornkessel @ 2021-04-09 21:10 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1.1: Type: text/plain, Size: 837 bytes --]
https://bugs.gentoo.org/show_bug.cgi?id=778815
pkgcheck, gives an error like this
VariableScope: vdr-plugin-2: variable 'WORKDIR' used in
'vdr-plugin-2_pkg_setup', line 371
inserted patch will fix this issues
<snip>
--- vdr-plugin-2.eclass 2020-02-23 17:39:40.000000000 +0100
+++ vdr-plugin-2_QA-fixed.eclass 2021-04-06 23:27:37.358477036 +0200
@@ -368,7 +368,7 @@
VDR_INCLUDE_DIR="/usr/include/vdr"
DVB_INCLUDE_DIR="/usr/include"
- TMP_LOCALE_DIR="${WORKDIR}/tmp-locale"
+ TMP_LOCALE_DIR="${T}/tmp-locale"
LOCDIR=$(pkg-config --variable=locdir vdr)
</snap>
i did several tests on my setup, it works like expected.
please review, thanks...
--
Joerg Bornkessel <hd_brummy@gentoo.org>
GnuPG Key: 0x93EB5F4DAA5832A1
Fingerprint: 0E0A A1EE 1DF4 41D7 A3F5 21C2 93EB 5F4D AA58 32A1
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-dev] vdr-plugin-2.eclass QA fix, please review, bug 778815
2021-04-09 21:10 [gentoo-dev] vdr-plugin-2.eclass QA fix, please review, bug 778815 Joerg Bornkessel
@ 2021-04-09 21:37 ` Sam James
2021-06-27 15:50 ` [gentoo-dev] [PATCH] vdr-plugin-2.eclass: add EAPI8 support, EAPI7+ fixes Martin Dummer
0 siblings, 1 reply; 8+ messages in thread
From: Sam James @ 2021-04-09 21:37 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1541 bytes --]
> On 9 Apr 2021, at 22:10, Joerg Bornkessel <hd_brummy@gentoo.org> wrote:
>
> https://bugs.gentoo.org/show_bug.cgi?id=778815
>
> pkgcheck, gives an error like this
> VariableScope: vdr-plugin-2: variable 'WORKDIR' used in 'vdr-plugin-2_pkg_setup', line 371
>
Hi, thanks for looking into this!
> inserted patch will fix this issues
Could you make the change in a git checkout and then use ‘git format-patch’ and then
git send-email to send it here?
>
> <snip>
> --- vdr-plugin-2.eclass 2020-02-23 17:39:40.000000000 +0100
> +++ vdr-plugin-2_QA-fixed.eclass 2021-04-06 23:27:37.358477036 +0200
> @@ -368,7 +368,7 @@
> VDR_INCLUDE_DIR="/usr/include/vdr"
> DVB_INCLUDE_DIR="/usr/include"
>
> - TMP_LOCALE_DIR="${WORKDIR}/tmp-locale"
> + TMP_LOCALE_DIR="${T}/tmp-locale"
>
> LOCDIR=$(pkg-config --variable=locdir vdr)
> </snap>
>
This looks fine as-is, although you may want to take the opportunity
to do some other clean ups, like replacing pkg-config with
$(tc-getPKG_CONFIG) to respect the ${PKG_CONFIG} variable
for e.g. cross-compilation.
We should add pkg-config to BDEPEND in EAPI 7 if it’s needed too.
It looks like there are some missing || dies on e.g. sed and other
external commands too which we could fix.
> i did several tests on my setup, it works like expected.
> please review, thanks...
>
> --
> Joerg Bornkessel <hd_brummy@gentoo.org>
> GnuPG Key: 0x93EB5F4DAA5832A1
> Fingerprint: 0E0A A1EE 1DF4 41D7 A3F5 21C2 93EB 5F4D AA58 32A1
>
[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 618 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [gentoo-dev] [PATCH] vdr-plugin-2.eclass: add EAPI8 support, EAPI7+ fixes
2021-04-09 21:37 ` Sam James
@ 2021-06-27 15:50 ` Martin Dummer
2021-06-27 18:57 ` Ulrich Mueller
0 siblings, 1 reply; 8+ messages in thread
From: Martin Dummer @ 2021-06-27 15:50 UTC (permalink / raw
To: gentoo-dev; +Cc: Joerg Bornkessel
please review and comment.
I will open a github PR for code changes later.
From d5f6916d7fdd194e0c2ab11eea0d48ecb01d122c Mon Sep 17 00:00:00 2001
From: Martin Dummer <martin.dummer@gmx.net>
Date: Sun, 27 Jun 2021 17:05:23 +0200
Subject: [PATCH] vdr-plugin-2.eclass: add EAPI8 support, EAPI7+ fixes
- add EAPI8 support, no changes necessary
- add BDEPEND=pkgconfig
- remove outdated version numbers from (R)DEPEND
- fix calling of pkg-config
- add many "|| die" which should have been here already for EAPI7
Signed-off-by: Martin Dummer <martin.dummer@gmx.net>
---
eclass/vdr-plugin-2.eclass | 53 ++++++++++++++++++++++----------------
1 file changed, 31 insertions(+), 22 deletions(-)
diff --git a/eclass/vdr-plugin-2.eclass b/eclass/vdr-plugin-2.eclass
index 3f3acc41208..41e43ff34ee 100644
--- a/eclass/vdr-plugin-2.eclass
+++ b/eclass/vdr-plugin-2.eclass
@@ -76,7 +76,7 @@
inherit flag-o-matic toolchain-funcs unpacker
case ${EAPI:-0} in
- 5|6|7)
+ 5|6|7|8)
;;
*) die "EAPI ${EAPI} unsupported."
;;
@@ -97,10 +97,11 @@ DESCRIPTION="vdr Plugin: ${VDRPLUGIN} (based on
vdr-plugin-2.eclass)"
S="${WORKDIR}/${VDRPLUGIN}-${PV}"
# depend on headers for DVB-driver and vdr-scripts
-DEPEND=">=media-tv/gentoo-vdr-scripts-0.4.2
+BDEPEND="dev-util/pkgconfig"
+DEPEND="media-tv/gentoo-vdr-scripts
virtual/linuxtv-dvb-headers"
-RDEPEND=">=media-tv/gentoo-vdr-scripts-0.4.2
- >=app-eselect/eselect-vdr-0.0.2"
+RDEPEND="media-tv/gentoo-vdr-scripts
+ app-eselect/eselect-vdr"
if [[ "${GENTOO_VDR_CONDITIONAL:-no}" = "yes" ]]; then
IUSE="${IUSE} vdr"
@@ -151,7 +152,7 @@ vdr_create_header_checksum_file() {
local CHKSUM="header-md5-vdr"
if [[ -f ${VDR_CHECKSUM_DIR}/header-md5-vdr ]]; then
- cp "${VDR_CHECKSUM_DIR}/header-md5-vdr" "${CHKSUM}"
+ cp "${VDR_CHECKSUM_DIR}/header-md5-vdr" "${CHKSUM}" ||
die "Could not copy header-md5-vdr"
elif type -p md5sum >/dev/null 2>&1; then
(
cd "${VDR_INCLUDE_DIR}"
@@ -179,7 +180,8 @@ fix_vdr_libsi_include() {
for f; do
sed -i "${f}" \
-e '/#include/s:"\(.*libsi.*\)":<\1>:' \
- -e '/#include/s:<.*\(libsi/.*\)>:<vdr/\1>:'
+ -e '/#include/s:<.*\(libsi/.*\)>:<vdr/\1>:' \
+ || die "sed failed while fixing include of
libsi-headers"
done
}
@@ -192,7 +194,7 @@ fix_vdr_libsi_include() {
vdr_patchmakefile() {
einfo "Patching Makefile"
[[ -e Makefile ]] || die "Makefile of plugin can not be found!"
- cp Makefile "${WORKDIR}"/Makefile.before
+ cp Makefile "${WORKDIR}"/Makefile.before || die "Failed to copy
Makefile"
# plugin makefiles use VDRDIR in strange ways
# assumptions:
@@ -216,14 +218,16 @@ vdr_patchmakefile() {
-e '/VDRINCDIR.*=/!s:$(VDRDIR)/include:$(VDRINCDIR):' \
\
-e 's:-I$(DVBDIR)/include::' \
- -e 's:-I$(DVBDIR)::'
+ -e 's:-I$(DVBDIR)::' \
+ || die "sed failed to set \$VDRDIR"
if ! grep -q APIVERSION Makefile; then
ebegin " Converting to APIVERSION"
sed -i Makefile \
-e 's:^APIVERSION = :APIVERSION ?= :' \
-e
's:$(LIBDIR)/$@.$(VDRVERSION):$(LIBDIR)/$@.$(APIVERSION):' \
- -e '/VDRVERSION =/a\APIVERSION = $(shell sed -ne
'"'"'/define APIVERSION/s/^.*"\\(.*\\)".*$$/\\1/p'"'"' $(VDRDIR)/config.h)'
+ -e '/VDRVERSION =/a\APIVERSION = $(shell sed -ne
'"'"'/define APIVERSION/s/^.*"\\(.*\\)".*$$/\\1/p'"'"'
$(VDRDIR)/config.h)' \
+ || die "sed failed to change APIVERSION"
eend $?
fi
@@ -231,13 +235,15 @@ vdr_patchmakefile() {
# Do not overwrite CXXFLAGS, add LDFLAGS if missing
sed -i Makefile \
-e '/^CXXFLAGS[[:space:]]*=/s/=/?=/' \
- -e '/LDFLAGS/!s:-shared:$(LDFLAGS) -shared:'
+ -e '/LDFLAGS/!s:-shared:$(LDFLAGS) -shared:' \
+ || die "sed failed to fix compile-flags"
# Disabling file stripping, the package manager takes care of it
sed -i Makefile \
-e '/@.*strip/d' \
-e '/strip \$(LIBDIR)\/\$@/d' \
- -e 's/STRIP.*=.*$/STRIP = true/'
+ -e 's/STRIP.*=.*$/STRIP = true/' \
+ || die "sed failed to fix file stripping"
# Use a file instead of a variable as single-stepping via ebuild
# destroys environment.
@@ -318,14 +324,15 @@ vdr_i18n() {
if [[ "${KEEP_I18NOBJECT:-no}" = "yes" ]]; then
eqawarn "Forced to keep i18n.o"
else
- sed -i "s:i18n.o::g" Makefile
+ sed -i "s:i18n.o::g" Makefile || die "sed failed
to remove i18n from Makefile"
eqawarn "OBJECT i18n.o found, removed per sed"
fi
fi
local I18N_STRING=$( [[ -e i18n.h ]] && grep tI18nPhrase i18n.h )
if [[ -n ${I18N_STRING} ]]; then
- sed -i
"s:^extern[[:space:]]*const[[:space:]]*tI18nPhrase://static const
tI18nPhrase:" i18n.h
+ sed -i
"s:^extern[[:space:]]*const[[:space:]]*tI18nPhrase://static const
tI18nPhrase:" i18n.h \
+ || die "sed failed to replace tI18nPhrase"
eqawarn "obsolete tI18nPhrase found, disabled per sed,
please recheck"
fi
}
@@ -341,7 +348,8 @@ vdr_remove_i18n_include() {
local f
for f; do
sed -i "${f}" \
- -e "s:^#include[[:space:]]*\"i18n.h\"://:"
+ -e "s:^#include[[:space:]]*\"i18n.h\"://:" \
+ || die "sed failed to remove i18n_include"
done
eqawarn "removed i18n.h include in ${@}"
@@ -393,7 +401,8 @@ vdr-plugin-2_pkg_setup() {
append-cxxflags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE
# Where should the plugins live in the filesystem
- VDR_PLUGIN_DIR=$(pkg-config --variable=libdir vdr)
+ local PKG__CONFIG=$(tc-getPKG_CONFIG)
+ VDR_PLUGIN_DIR=$($PKG__CONFIG --variable=libdir vdr)
VDR_CHECKSUM_DIR="${VDR_PLUGIN_DIR%/plugins}/checksums"
@@ -405,7 +414,7 @@ vdr-plugin-2_pkg_setup() {
TMP_LOCALE_DIR="${T}/tmp-locale"
- LOCDIR=$(pkg-config --variable=locdir vdr)
+ LOCDIR=$($PKG__CONFIG --variable=locdir vdr)
if ! has_vdr; then
# set to invalid values to detect abuses
@@ -422,7 +431,7 @@ vdr-plugin-2_pkg_setup() {
fi
VDRVERSION=$(awk -F'"' '/define VDRVERSION/ {print $2}'
"${VDR_INCLUDE_DIR}"/config.h)
- APIVERSION=$(pkg-config --variable=apiversion vdr)
+ APIVERSION=$($PKG__CONFIG --variable=apiversion vdr)
einfo "Compiling against"
einfo "\tvdr-${VDRVERSION} [API version ${APIVERSION}]"
@@ -551,10 +560,11 @@ vdr-plugin-2_src_install() {
if [[ -n ${VDR_MAINTAINER_MODE} ]]; then
local mname="${P}-Makefile"
- cp "${S}"/Makefile "${mname}.patched"
- cp Makefile.before "${mname}.before"
+ cp "${S}"/Makefile "${mname}.patched" || die "could not
copy to Makefile.patched"
+ cp Makefile.before "${mname}.before" || die "could not
copy to Makefile.before"
diff -u "${mname}.before" "${mname}.patched" >
"${mname}.diff"
+ [[ $? -ge 2 ]] && die "problem with diff"
insinto "/usr/share/vdr/maintainer-data/makefile-changes"
doins "${mname}.diff"
@@ -564,7 +574,6 @@ vdr-plugin-2_src_install() {
insinto "/usr/share/vdr/maintainer-data/makefile-patched"
doins "${mname}.patched"
-
fi
cd "${S}" || die "could not change to plugin source directory
(src_install)"
@@ -589,11 +598,11 @@ vdr-plugin-2_src_install() {
local linguas
for linguas in ${LINGUAS[*]}; do
insinto "${LOCDIR}"
- cp -r --parents ${linguas}* ${D%/}/${LOCDIR}
+ cp -r --parents ${linguas}* ${D%/}/${LOCDIR} || die
"could not copy linguas files"
done
fi
- cd "${D%/}/usr/$(get_libdir)/vdr/plugins" || die "could not
change to D/usr/libdir/vdr/plugins"
+ cd "${D%/}/usr/$(get_libdir)/vdr/plugins" || die "could not
change to \$D/usr/libdir/vdr/plugins"
# create list of all created plugin libs
vdr_plugin_list=""
--
2.32.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [gentoo-dev] [PATCH] vdr-plugin-2.eclass: add EAPI8 support, EAPI7+ fixes
2021-06-27 15:50 ` [gentoo-dev] [PATCH] vdr-plugin-2.eclass: add EAPI8 support, EAPI7+ fixes Martin Dummer
@ 2021-06-27 18:57 ` Ulrich Mueller
2021-06-27 22:15 ` Martin Dummer
0 siblings, 1 reply; 8+ messages in thread
From: Ulrich Mueller @ 2021-06-27 18:57 UTC (permalink / raw
To: Martin Dummer; +Cc: gentoo-dev, Joerg Bornkessel
[-- Attachment #1: Type: text/plain, Size: 522 bytes --]
>>>>> On Sun, 27 Jun 2021, Martin Dummer wrote:
[Either your mailer or something on the way has mangled whitespace in
your patch, which makes it somewhat hard to read.]
> --- a/eclass/vdr-plugin-2.eclass
> +++ b/eclass/vdr-plugin-2.eclass
> @@ -76,7 +76,7 @@
> inherit flag-o-matic toolchain-funcs unpacker
This should also inherit strip-linguas.eclass, because strip-linguas is
called in vdr_linguas_support().
Also, while at it, could you remove the useless IUSE="" assignment in
line 87?
Ulrich
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 507 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-dev] [PATCH] vdr-plugin-2.eclass: add EAPI8 support, EAPI7+ fixes
2021-06-27 18:57 ` Ulrich Mueller
@ 2021-06-27 22:15 ` Martin Dummer
2021-06-28 6:18 ` Ulrich Mueller
0 siblings, 1 reply; 8+ messages in thread
From: Martin Dummer @ 2021-06-27 22:15 UTC (permalink / raw
To: gentoo-dev, ulm
[-- Attachment #1: Type: text/plain, Size: 834 bytes --]
Am 27.06.21 um 20:57 schrieb Ulrich Mueller:
> [Either your mailer or something on the way has mangled whitespace in
> your patch, which makes it somewhat hard to read.]
Okay... not good, I will add the patchfile as attachment now.
>> --- a/eclass/vdr-plugin-2.eclass
>> +++ b/eclass/vdr-plugin-2.eclass
>> @@ -76,7 +76,7 @@
>> inherit flag-o-matic toolchain-funcs unpacker
> This should also inherit strip-linguas.eclass, because strip-linguas is
> called in vdr_linguas_support().
>
> Also, while at it, could you remove the useless IUSE="" assignment in
> line 87?
Okay, I understand. I did not notice the call to "strip-linguas", and
I'm wondering how this could have worked all the years in the past.
Unfortunately "pkgcheck" does not report this.
All changes are applied.
Bye
Martin
[-- Attachment #2: 0001-vdr-plugin-2.eclass-add-EAPI8-support-EAPI7-fixes.patch --]
[-- Type: text/x-patch, Size: 7952 bytes --]
From a34b8547accafbc8e658d05fd389f5714c35dcb8 Mon Sep 17 00:00:00 2001
From: Martin Dummer <martin.dummer@gmx.net>
Date: Sun, 27 Jun 2021 17:05:23 +0200
Subject: [PATCH] vdr-plugin-2.eclass: add EAPI8 support, EAPI7+ fixes
- add EAPI8 support, no changes necessary
- add BDEPEND=pkgconfig
- remove outdated version numbers from (R)DEPEND
- fix calling of pkg-config
- add many "|| die" which should have been here already for EAPI7
Signed-off-by: Martin Dummer <martin.dummer@gmx.net>
---
eclass/vdr-plugin-2.eclass | 57 +++++++++++++++++++++-----------------
1 file changed, 32 insertions(+), 25 deletions(-)
diff --git a/eclass/vdr-plugin-2.eclass b/eclass/vdr-plugin-2.eclass
index 3f3acc41208..6bd3a1fbff0 100644
--- a/eclass/vdr-plugin-2.eclass
+++ b/eclass/vdr-plugin-2.eclass
@@ -73,10 +73,10 @@
[[ ${EAPI} == [5] ]] && inherit multilib
[[ ${EAPI} == [56] ]] && inherit eutils
-inherit flag-o-matic toolchain-funcs unpacker
+inherit flag-o-matic strip-linguas toolchain-funcs unpacker
case ${EAPI:-0} in
- 5|6|7)
+ 5|6|7|8)
;;
*) die "EAPI ${EAPI} unsupported."
;;
@@ -84,8 +84,6 @@ esac
EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_compile src_install pkg_postinst pkg_postrm pkg_config
-IUSE=""
-
# Name of the plugin stripped from all vdrplugin-, vdr- and -cvs pre- and postfixes
VDRPLUGIN="${PN/#vdrplugin-/}"
VDRPLUGIN="${VDRPLUGIN/#vdr-/}"
@@ -97,10 +95,11 @@ DESCRIPTION="vdr Plugin: ${VDRPLUGIN} (based on vdr-plugin-2.eclass)"
S="${WORKDIR}/${VDRPLUGIN}-${PV}"
# depend on headers for DVB-driver and vdr-scripts
-DEPEND=">=media-tv/gentoo-vdr-scripts-0.4.2
+BDEPEND="dev-util/pkgconfig"
+DEPEND="media-tv/gentoo-vdr-scripts
virtual/linuxtv-dvb-headers"
-RDEPEND=">=media-tv/gentoo-vdr-scripts-0.4.2
- >=app-eselect/eselect-vdr-0.0.2"
+RDEPEND="media-tv/gentoo-vdr-scripts
+ app-eselect/eselect-vdr"
if [[ "${GENTOO_VDR_CONDITIONAL:-no}" = "yes" ]]; then
IUSE="${IUSE} vdr"
@@ -151,7 +150,7 @@ vdr_create_header_checksum_file() {
local CHKSUM="header-md5-vdr"
if [[ -f ${VDR_CHECKSUM_DIR}/header-md5-vdr ]]; then
- cp "${VDR_CHECKSUM_DIR}/header-md5-vdr" "${CHKSUM}"
+ cp "${VDR_CHECKSUM_DIR}/header-md5-vdr" "${CHKSUM}" || die "Could not copy header-md5-vdr"
elif type -p md5sum >/dev/null 2>&1; then
(
cd "${VDR_INCLUDE_DIR}"
@@ -179,7 +178,8 @@ fix_vdr_libsi_include() {
for f; do
sed -i "${f}" \
-e '/#include/s:"\(.*libsi.*\)":<\1>:' \
- -e '/#include/s:<.*\(libsi/.*\)>:<vdr/\1>:'
+ -e '/#include/s:<.*\(libsi/.*\)>:<vdr/\1>:' \
+ || die "sed failed while fixing include of libsi-headers"
done
}
@@ -192,7 +192,7 @@ fix_vdr_libsi_include() {
vdr_patchmakefile() {
einfo "Patching Makefile"
[[ -e Makefile ]] || die "Makefile of plugin can not be found!"
- cp Makefile "${WORKDIR}"/Makefile.before
+ cp Makefile "${WORKDIR}"/Makefile.before || die "Failed to copy Makefile"
# plugin makefiles use VDRDIR in strange ways
# assumptions:
@@ -216,14 +216,16 @@ vdr_patchmakefile() {
-e '/VDRINCDIR.*=/!s:$(VDRDIR)/include:$(VDRINCDIR):' \
\
-e 's:-I$(DVBDIR)/include::' \
- -e 's:-I$(DVBDIR)::'
+ -e 's:-I$(DVBDIR)::' \
+ || die "sed failed to set \$VDRDIR"
if ! grep -q APIVERSION Makefile; then
ebegin " Converting to APIVERSION"
sed -i Makefile \
-e 's:^APIVERSION = :APIVERSION ?= :' \
-e 's:$(LIBDIR)/$@.$(VDRVERSION):$(LIBDIR)/$@.$(APIVERSION):' \
- -e '/VDRVERSION =/a\APIVERSION = $(shell sed -ne '"'"'/define APIVERSION/s/^.*"\\(.*\\)".*$$/\\1/p'"'"' $(VDRDIR)/config.h)'
+ -e '/VDRVERSION =/a\APIVERSION = $(shell sed -ne '"'"'/define APIVERSION/s/^.*"\\(.*\\)".*$$/\\1/p'"'"' $(VDRDIR)/config.h)' \
+ || die "sed failed to change APIVERSION"
eend $?
fi
@@ -231,13 +233,15 @@ vdr_patchmakefile() {
# Do not overwrite CXXFLAGS, add LDFLAGS if missing
sed -i Makefile \
-e '/^CXXFLAGS[[:space:]]*=/s/=/?=/' \
- -e '/LDFLAGS/!s:-shared:$(LDFLAGS) -shared:'
+ -e '/LDFLAGS/!s:-shared:$(LDFLAGS) -shared:' \
+ || die "sed failed to fix compile-flags"
# Disabling file stripping, the package manager takes care of it
sed -i Makefile \
-e '/@.*strip/d' \
-e '/strip \$(LIBDIR)\/\$@/d' \
- -e 's/STRIP.*=.*$/STRIP = true/'
+ -e 's/STRIP.*=.*$/STRIP = true/' \
+ || die "sed failed to fix file stripping"
# Use a file instead of a variable as single-stepping via ebuild
# destroys environment.
@@ -318,14 +322,15 @@ vdr_i18n() {
if [[ "${KEEP_I18NOBJECT:-no}" = "yes" ]]; then
eqawarn "Forced to keep i18n.o"
else
- sed -i "s:i18n.o::g" Makefile
+ sed -i "s:i18n.o::g" Makefile || die "sed failed to remove i18n from Makefile"
eqawarn "OBJECT i18n.o found, removed per sed"
fi
fi
local I18N_STRING=$( [[ -e i18n.h ]] && grep tI18nPhrase i18n.h )
if [[ -n ${I18N_STRING} ]]; then
- sed -i "s:^extern[[:space:]]*const[[:space:]]*tI18nPhrase://static const tI18nPhrase:" i18n.h
+ sed -i "s:^extern[[:space:]]*const[[:space:]]*tI18nPhrase://static const tI18nPhrase:" i18n.h \
+ || die "sed failed to replace tI18nPhrase"
eqawarn "obsolete tI18nPhrase found, disabled per sed, please recheck"
fi
}
@@ -341,7 +346,8 @@ vdr_remove_i18n_include() {
local f
for f; do
sed -i "${f}" \
- -e "s:^#include[[:space:]]*\"i18n.h\"://:"
+ -e "s:^#include[[:space:]]*\"i18n.h\"://:" \
+ || die "sed failed to remove i18n_include"
done
eqawarn "removed i18n.h include in ${@}"
@@ -393,7 +399,8 @@ vdr-plugin-2_pkg_setup() {
append-cxxflags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
# Where should the plugins live in the filesystem
- VDR_PLUGIN_DIR=$(pkg-config --variable=libdir vdr)
+ local PKG__CONFIG=$(tc-getPKG_CONFIG)
+ VDR_PLUGIN_DIR=$($PKG__CONFIG --variable=libdir vdr)
VDR_CHECKSUM_DIR="${VDR_PLUGIN_DIR%/plugins}/checksums"
@@ -405,7 +412,7 @@ vdr-plugin-2_pkg_setup() {
TMP_LOCALE_DIR="${T}/tmp-locale"
- LOCDIR=$(pkg-config --variable=locdir vdr)
+ LOCDIR=$($PKG__CONFIG --variable=locdir vdr)
if ! has_vdr; then
# set to invalid values to detect abuses
@@ -422,7 +429,7 @@ vdr-plugin-2_pkg_setup() {
fi
VDRVERSION=$(awk -F'"' '/define VDRVERSION/ {print $2}' "${VDR_INCLUDE_DIR}"/config.h)
- APIVERSION=$(pkg-config --variable=apiversion vdr)
+ APIVERSION=$($PKG__CONFIG --variable=apiversion vdr)
einfo "Compiling against"
einfo "\tvdr-${VDRVERSION} [API version ${APIVERSION}]"
@@ -551,10 +558,11 @@ vdr-plugin-2_src_install() {
if [[ -n ${VDR_MAINTAINER_MODE} ]]; then
local mname="${P}-Makefile"
- cp "${S}"/Makefile "${mname}.patched"
- cp Makefile.before "${mname}.before"
+ cp "${S}"/Makefile "${mname}.patched" || die "could not copy to Makefile.patched"
+ cp Makefile.before "${mname}.before" || die "could not copy to Makefile.before"
diff -u "${mname}.before" "${mname}.patched" > "${mname}.diff"
+ [[ $? -ge 2 ]] && die "problem with diff"
insinto "/usr/share/vdr/maintainer-data/makefile-changes"
doins "${mname}.diff"
@@ -564,7 +572,6 @@ vdr-plugin-2_src_install() {
insinto "/usr/share/vdr/maintainer-data/makefile-patched"
doins "${mname}.patched"
-
fi
cd "${S}" || die "could not change to plugin source directory (src_install)"
@@ -589,11 +596,11 @@ vdr-plugin-2_src_install() {
local linguas
for linguas in ${LINGUAS[*]}; do
insinto "${LOCDIR}"
- cp -r --parents ${linguas}* ${D%/}/${LOCDIR}
+ cp -r --parents ${linguas}* ${D%/}/${LOCDIR} || die "could not copy linguas files"
done
fi
- cd "${D%/}/usr/$(get_libdir)/vdr/plugins" || die "could not change to D/usr/libdir/vdr/plugins"
+ cd "${D%/}/usr/$(get_libdir)/vdr/plugins" || die "could not change to \$D/usr/libdir/vdr/plugins"
# create list of all created plugin libs
vdr_plugin_list=""
--
2.32.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [gentoo-dev] [PATCH] vdr-plugin-2.eclass: add EAPI8 support, EAPI7+ fixes
2021-06-27 22:15 ` Martin Dummer
@ 2021-06-28 6:18 ` Ulrich Mueller
2021-07-19 6:11 ` Martin Dummer
0 siblings, 1 reply; 8+ messages in thread
From: Ulrich Mueller @ 2021-06-28 6:18 UTC (permalink / raw
To: Martin Dummer; +Cc: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 592 bytes --]
>>>>> On Mon, 28 Jun 2021, Martin Dummer wrote:
>>> --- a/eclass/vdr-plugin-2.eclass
>>> +++ b/eclass/vdr-plugin-2.eclass
>>> @@ -76,7 +76,7 @@
>>> inherit flag-o-matic toolchain-funcs unpacker
>> This should also inherit strip-linguas.eclass, because strip-linguas is
>> called in vdr_linguas_support().
> Okay, I understand. I did not notice the call to "strip-linguas", and
> I'm wondering how this could have worked all the years in the past.
In EAPIs 5 and 6 it inherited it indirectly via eutils. But indeed, in
EAPI 7 I don't see how it could have worked.
Ulrich
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 507 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-dev] [PATCH] vdr-plugin-2.eclass: add EAPI8 support, EAPI7+ fixes
2021-06-28 6:18 ` Ulrich Mueller
@ 2021-07-19 6:11 ` Martin Dummer
2021-07-19 7:02 ` Martin Dummer
0 siblings, 1 reply; 8+ messages in thread
From: Martin Dummer @ 2021-07-19 6:11 UTC (permalink / raw
To: gentoo-dev, Ulrich Mueller
Am 28.06.21 um 08:18 schrieb Ulrich Mueller:
>>>>>> On Mon, 28 Jun 2021, Martin Dummer wrote:
>>>> --- a/eclass/vdr-plugin-2.eclass
>>>> +++ b/eclass/vdr-plugin-2.eclass
>>>> @@ -76,7 +76,7 @@
>>>> inherit flag-o-matic toolchain-funcs unpacker
>>> This should also inherit strip-linguas.eclass, because strip-linguas is
>>> called in vdr_linguas_support().
>> Okay, I understand. I did not notice the call to "strip-linguas", and
>> I'm wondering how this could have worked all the years in the past.
> In EAPIs 5 and 6 it inherited it indirectly via eutils. But indeed, in
> EAPI 7 I don't see how it could have worked.
>
> Ulrich
Hi,
if there are no more points to discuss, could someone please add a
review to
https://github.com/gentoo/gentoo/pull/21447
?
Martin
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-dev] [PATCH] vdr-plugin-2.eclass: add EAPI8 support, EAPI7+ fixes
2021-07-19 6:11 ` Martin Dummer
@ 2021-07-19 7:02 ` Martin Dummer
0 siblings, 0 replies; 8+ messages in thread
From: Martin Dummer @ 2021-07-19 7:02 UTC (permalink / raw
To: gentoo-dev
> if there are no more points to discuss, could someone please add a
> review to
>
> https://github.com/gentoo/gentoo/pull/21447
>
> ?
>
>
One more finding: repoman says
BDEPEND: consider using 'virtual/pkgconfig' instead of 'dev-util/pkgconfig'
I will fix this.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-07-19 7:03 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-09 21:10 [gentoo-dev] vdr-plugin-2.eclass QA fix, please review, bug 778815 Joerg Bornkessel
2021-04-09 21:37 ` Sam James
2021-06-27 15:50 ` [gentoo-dev] [PATCH] vdr-plugin-2.eclass: add EAPI8 support, EAPI7+ fixes Martin Dummer
2021-06-27 18:57 ` Ulrich Mueller
2021-06-27 22:15 ` Martin Dummer
2021-06-28 6:18 ` Ulrich Mueller
2021-07-19 6:11 ` Martin Dummer
2021-07-19 7:02 ` Martin Dummer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox