* [gentoo-dev] [PATCH] vdr-plugin-2.eclass: add EAPI 7 support
@ 2018-07-13 22:23 Joerg Bornkessel
2018-07-14 6:08 ` Ulrich Mueller
0 siblings, 1 reply; 5+ messages in thread
From: Joerg Bornkessel @ 2018-07-13 22:23 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1.1: Type: text/plain, Size: 4402 bytes --]
Please review,
changes makes the vdr-plugin-2.eclass to be able handle EAPI 7 support.
Its just 1 line for this,
The rest is clean up, or better i should say, i removed the internal
vdr_dev_check function and replaced it by the eqawarn function.
I know, in the eclass is still EAPI 4,5 support, but we have a lot of
ebuilds, untached thins years, they use the EAPI 4,5.
This needs fixed at first in the tree, than we can safely remove the
EAPI 4,5 support.
Thanks
--- vdr-plugin-2.eclass.old 2018-07-13 14:16:24.134895457 +0200
+++ vdr-plugin-2.eclass 2018-07-13 23:56:14.924419576 +0200
@@ -53,19 +53,6 @@
# PO_SUBDIR="bla foo/bla"
# @CODE
-# @ECLASS-VARIABLE: VDR_MAINTAINER_MODE
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Output from function vdr_dev_check if it is defined in ebuild or eclass,
-# helpfull for gentoo ebuild developer
-#
-# This will also install any debug files in /usr/share/vdr/maintainer-data
-#
-# This is intended to be set by user in make.conf. Ebuilds must not set
-# it.
-#
-# VDR_MAINTAINER_MODE=1
-
# @FUNCTION: fix_vdr_libsi_include
# @DESCRIPTION:
# Plugins failed on compile with wrong path of libsi includes,
@@ -91,7 +78,7 @@
# Applying your own local/user patches:
# This is done by using the
# (EAPI = 4,5) epatch_user() function of the eutils.eclass,
-# (EAPI = 6) eapply_user function integrated in EAPI = 6.
+# (EAPI = 6,7) eapply_user function integrated in EAPI = 6.
# Simply add your patches into one of these directories:
# /etc/portage/patches/<CATEGORY>/<PF|P|PN>/
# Quote: where the first of these three directories to exist will be
the one to
@@ -103,7 +90,7 @@
inherit flag-o-matic toolchain-funcs unpacker
case ${EAPI:-0} in
- 4|5|6)
+ 4|5|6|7)
;;
*) die "EAPI ${EAPI} unsupported."
;;
@@ -187,7 +174,7 @@
}
fix_vdr_libsi_include() {
- vdr_dev_check "Fixing include of libsi-headers"
+ eqawarn "Fixing include of libsi-headers"
local f
for f; do
sed -i "${f}" \
@@ -270,7 +257,7 @@
local GETTEXT_MISSING=$( grep xgettext Makefile )
if [[ -z ${GETTEXT_MISSING} ]]; then
- vdr_dev_check "Plugin isn't converted to gettext handling \n"
+ eqawarn "Plugin isn't converted to gettext handling!"
fi
}
@@ -319,26 +306,26 @@
if [[ -n ${I18N_OBJECT} ]]; then
if [[ "${KEEP_I18NOBJECT:-no}" = "yes" ]]; then
- vdr_dev_check "Forced to keep i18n.o"
+ eqawarn "Forced to keep i18n.o"
else
sed -i "s:i18n.o::g" Makefile
- vdr_dev_check "OBJECT i18n.o found"
- vdr_dev_check "removed per sed \n"
+ eqawarn "OBJECT i18n.o found"
+ eqawarn "removed per sed"
fi
else
- vdr_dev_check "OBJECT i18n.o not found in Makefile"
- vdr_dev_check "all fine or manual review needed? \n"
+ eqawarn "OBJECT i18n.o not found in MAKEFILE"
+ eqawarn "all fine or manual review needed?"
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
- vdr_dev_check "obsolete tI18nPhrase found"
- vdr_dev_check "disabled per sed, please recheck \n"
+ eqawarn "obsolete tI18nPhrase found"
+ eqawarn "disabled per sed, please recheck \n"
else
- vdr_dev_check "obsolete tI18nPhrase not found, fine..."
- vdr_dev_check "please review, may be in subdir... \n"
+ eqawarn "obsolete tI18nPhrase not found, fine..."
+ eqawarn "please review, may be in subdir..."
fi
}
@@ -351,7 +338,7 @@
-e "s:^#include[[:space:]]*\"i18n.h\"://:"
done
- vdr_dev_check "removed i18n.h include in ${@}"
+ eqawarn "removed i18n.h include in ${@}"
}
vdr-plugin-2_print_enable_command() {
@@ -572,7 +559,7 @@
DESTDIR="${D}" \
|| die "emake install (makefile target) failed"
else
- vdr_dev_check "Plugin use still the old Makefile handling"
+ eqawarn "Plugin use still the old Makefile handling"
insinto "${VDR_PLUGIN_DIR}"
doins libvdr-*.so.*
fi
--
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: 1045 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-dev] [PATCH] vdr-plugin-2.eclass: add EAPI 7 support
2018-07-13 22:23 [gentoo-dev] [PATCH] vdr-plugin-2.eclass: add EAPI 7 support Joerg Bornkessel
@ 2018-07-14 6:08 ` Ulrich Mueller
[not found] ` <916cd955-bd67-de79-b28c-a63884367132@astrali.lan>
0 siblings, 1 reply; 5+ messages in thread
From: Ulrich Mueller @ 2018-07-14 6:08 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 431 bytes --]
>>>>> On Sat, 14 Jul 2018, Joerg Bornkessel wrote:
> Please review,
> changes makes the vdr-plugin-2.eclass to be able handle EAPI 7 support.
> Its just 1 line for this,
> The rest is clean up, or better i should say, i removed the internal
> vdr_dev_check function and replaced it by the eqawarn function.
For eqawarn, you should inherit eutils also in EAPI 6. (Currently, the
eclass inherits it only in EAPIs 4 and 5.)
Ulrich
[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-dev] [PATCH] vdr-plugin-2.eclass: add EAPI 7 support
[not found] ` <916cd955-bd67-de79-b28c-a63884367132@astrali.lan>
@ 2018-07-14 9:14 ` Joerg Bornkessel
2018-07-14 12:04 ` Joerg Bornkessel
0 siblings, 1 reply; 5+ messages in thread
From: Joerg Bornkessel @ 2018-07-14 9:14 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1.1: Type: text/plain, Size: 5884 bytes --]
Am 14.07.2018 um 10:54 schrieb Joerg Bornkessel:
Upps, this goes to ulm only...
> Am 14.07.2018 um 08:08 schrieb Ulrich Mueller:
>>>>>>> On Sat, 14 Jul 2018, Joerg Bornkessel wrote:
>>
>>> Please review,
>>> changes makes the vdr-plugin-2.eclass to be able handle EAPI 7 support.
>>> Its just 1 line for this,
>>> The rest is clean up, or better i should say, i removed the internal
>>> vdr_dev_check function and replaced it by the eqawarn function.
>>
>> For eqawarn, you should inherit eutils also in EAPI 6. (Currently, the
>> eclass inherits it only in EAPIs 4 and 5.)
>>
>
> Thanks Ulrich for the hint, i didn't got any errors on my local test,
> as eutils is inherited by the flag-o-matic.eclass too.
>
> I did some small changes to fix this
> and more cleanups too.
> I my opinion eqawarn should be used as warning, not if some things works.
> Please take another look on my changes...
>
> Jörg
>
> <snipp>
> --- vdr-plugin-2.eclass.old 2018-07-13 14:16:24.134895457 +0200
> +++ vdr-plugin-2.eclass 2018-07-14 10:40:40.161751554 +0200
> @@ -53,19 +53,6 @@
> # PO_SUBDIR="bla foo/bla"
> # @CODE
>
> -# @ECLASS-VARIABLE: VDR_MAINTAINER_MODE
> -# @DEFAULT_UNSET
> -# @DESCRIPTION:
> -# Output from function vdr_dev_check if it is defined in ebuild or eclass,
> -# helpfull for gentoo ebuild developer
> -#
> -# This will also install any debug files in /usr/share/vdr/maintainer-data
> -#
> -# This is intended to be set by user in make.conf. Ebuilds must not set
> -# it.
> -#
> -# VDR_MAINTAINER_MODE=1
> -
> # @FUNCTION: fix_vdr_libsi_include
> # @DESCRIPTION:
> # Plugins failed on compile with wrong path of libsi includes,
> @@ -91,7 +78,7 @@
> # Applying your own local/user patches:
> # This is done by using the
> # (EAPI = 4,5) epatch_user() function of the eutils.eclass,
> -# (EAPI = 6) eapply_user function integrated in EAPI = 6.
> +# (EAPI = 6,7) eapply_user function integrated in EAPI = 6.
> # Simply add your patches into one of these directories:
> # /etc/portage/patches/<CATEGORY>/<PF|P|PN>/
> # Quote: where the first of these three directories to exist will be
> the one to
> @@ -99,11 +86,12 @@
> #
> # For more details about it please take a look at the eutils.class.
>
> -[[ ${EAPI} == [45] ]] && inherit eutils multilib
> +[[ ${EAPI} == [45] ]] && inherit multilib
> +[[ ${EAPI} == [456] ]] && inherit eutils
> inherit flag-o-matic toolchain-funcs unpacker
>
> case ${EAPI:-0} in
> - 4|5|6)
> + 4|5|6|7)
> ;;
> *) die "EAPI ${EAPI} unsupported."
> ;;
> @@ -187,7 +175,7 @@
> }
>
> fix_vdr_libsi_include() {
> - vdr_dev_check "Fixing include of libsi-headers"
> + eqawarn "Fixing include of libsi-headers"
> local f
> for f; do
> sed -i "${f}" \
> @@ -225,12 +213,6 @@
> -e 's:-I$(DVBDIR)/include::' \
> -e 's:-I$(DVBDIR)::'
>
> - # may be needed for multiproto:
> - #sed -i Makefile \
> - # -e "s:^DVBDIR.*$:DVBDIR = ${DVB_INCLUDE_DIR}:" \
> - # -e 's:-I$(DVBDIR)/include:-I$(DVBDIR):'
> - # obsolet? fix me later...
> -
> if ! grep -q APIVERSION Makefile; then
> ebegin " Converting to APIVERSION"
> sed -i Makefile \
> @@ -257,20 +239,12 @@
> touch "${WORKDIR}"/.vdr-plugin_makefile_patched
> }
>
> -vdr_dev_check() {
> - # A lot useful debug infos
> - # set VDR_MAINTAINER_MODE="1" in make.conf
> - if [[ -n ${VDR_MAINTAINER_MODE} ]]; then
> - eerror "\t Gentoo Developer Debug: $@"
> - fi
> -}
> -
> vdr_gettext_missing() {
> # plugins without converting to gettext
>
> local GETTEXT_MISSING=$( grep xgettext Makefile )
> if [[ -z ${GETTEXT_MISSING} ]]; then
> - vdr_dev_check "Plugin isn't converted to gettext handling \n"
> + eqawarn "Plugin isn't converted to gettext handling!"
> fi
> }
>
> @@ -319,26 +293,17 @@
> if [[ -n ${I18N_OBJECT} ]]; then
>
> if [[ "${KEEP_I18NOBJECT:-no}" = "yes" ]]; then
> - vdr_dev_check "Forced to keep i18n.o"
> + eqawarn "Forced to keep i18n.o"
> else
> sed -i "s:i18n.o::g" Makefile
> - vdr_dev_check "OBJECT i18n.o found"
> - vdr_dev_check "removed per sed \n"
> + eqawarn "OBJECT i18n.o found, removed per sed"
> fi
> -
> - else
> - vdr_dev_check "OBJECT i18n.o not found in Makefile"
> - vdr_dev_check "all fine or manual review needed? \n"
> 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
> - vdr_dev_check "obsolete tI18nPhrase found"
> - vdr_dev_check "disabled per sed, please recheck \n"
> - else
> - vdr_dev_check "obsolete tI18nPhrase not found, fine..."
> - vdr_dev_check "please review, may be in subdir... \n"
> + eqawarn "obsolete tI18nPhrase found, disabled per sed, please
> recheck"
> fi
> }
>
> @@ -351,7 +316,7 @@
> -e "s:^#include[[:space:]]*\"i18n.h\"://:"
> done
>
> - vdr_dev_check "removed i18n.h include in ${@}"
> + eqawarn "removed i18n.h include in ${@}"
> }
>
> vdr-plugin-2_print_enable_command() {
> @@ -572,7 +537,7 @@
> DESTDIR="${D}" \
> || die "emake install (makefile target) failed"
> else
> - vdr_dev_check "Plugin use still the old Makefile handling"
> + eqawarn "Plugin use still the old Makefile handling"
> insinto "${VDR_PLUGIN_DIR}"
> doins libvdr-*.so.*
> fi
>
> </snapp>
>
>
>
--
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: 1045 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-dev] [PATCH] vdr-plugin-2.eclass: add EAPI 7 support
2018-07-14 9:14 ` Joerg Bornkessel
@ 2018-07-14 12:04 ` Joerg Bornkessel
2018-07-15 18:18 ` Joerg Bornkessel
0 siblings, 1 reply; 5+ messages in thread
From: Joerg Bornkessel @ 2018-07-14 12:04 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1.1: Type: text/plain, Size: 6084 bytes --]
Next try,
- eapi 7 support
- fixed the trailing slash issue in D and EROOT
- some cleanups, as a described in my previous post
Please take another look
Thanks Jörg
<snipp>
--- vdr-plugin-2.eclass.old 2018-07-13 14:16:24.134895457 +0200
+++ vdr-plugin-2.eclass 2018-07-14 13:52:38.332693471 +0200
@@ -53,19 +53,6 @@
# PO_SUBDIR="bla foo/bla"
# @CODE
-# @ECLASS-VARIABLE: VDR_MAINTAINER_MODE
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Output from function vdr_dev_check if it is defined in ebuild or eclass,
-# helpfull for gentoo ebuild developer
-#
-# This will also install any debug files in /usr/share/vdr/maintainer-data
-#
-# This is intended to be set by user in make.conf. Ebuilds must not set
-# it.
-#
-# VDR_MAINTAINER_MODE=1
-
# @FUNCTION: fix_vdr_libsi_include
# @DESCRIPTION:
# Plugins failed on compile with wrong path of libsi includes,
@@ -91,7 +78,7 @@
# Applying your own local/user patches:
# This is done by using the
# (EAPI = 4,5) epatch_user() function of the eutils.eclass,
-# (EAPI = 6) eapply_user function integrated in EAPI = 6.
+# (EAPI = 6,7) eapply_user function integrated in EAPI = 6.
# Simply add your patches into one of these directories:
# /etc/portage/patches/<CATEGORY>/<PF|P|PN>/
# Quote: where the first of these three directories to exist will be
the one to
@@ -99,11 +86,12 @@
#
# For more details about it please take a look at the eutils.class.
-[[ ${EAPI} == [45] ]] && inherit eutils multilib
+[[ ${EAPI} == [45] ]] && inherit multilib
+[[ ${EAPI} == [456] ]] && inherit eutils
inherit flag-o-matic toolchain-funcs unpacker
case ${EAPI:-0} in
- 4|5|6)
+ 4|5|6|7)
;;
*) die "EAPI ${EAPI} unsupported."
;;
@@ -159,7 +147,7 @@
echo "EBUILD=${CATEGORY}/${PN}"
echo "EBUILD_V=${PVR}"
echo "PLUGINS=\"$@\""
- } > "${D}/${DB_FILE}"
+ } > "${D%/}/${DB_FILE}"
}
vdr_create_header_checksum_file() {
@@ -187,7 +175,7 @@
}
fix_vdr_libsi_include() {
- vdr_dev_check "Fixing include of libsi-headers"
+ eqawarn "Fixing include of libsi-headers"
local f
for f; do
sed -i "${f}" \
@@ -225,12 +213,6 @@
-e 's:-I$(DVBDIR)/include::' \
-e 's:-I$(DVBDIR)::'
- # may be needed for multiproto:
- #sed -i Makefile \
- # -e "s:^DVBDIR.*$:DVBDIR = ${DVB_INCLUDE_DIR}:" \
- # -e 's:-I$(DVBDIR)/include:-I$(DVBDIR):'
- # obsolet? fix me later...
-
if ! grep -q APIVERSION Makefile; then
ebegin " Converting to APIVERSION"
sed -i Makefile \
@@ -257,20 +239,12 @@
touch "${WORKDIR}"/.vdr-plugin_makefile_patched
}
-vdr_dev_check() {
- # A lot useful debug infos
- # set VDR_MAINTAINER_MODE="1" in make.conf
- if [[ -n ${VDR_MAINTAINER_MODE} ]]; then
- eerror "\t Gentoo Developer Debug: $@"
- fi
-}
-
vdr_gettext_missing() {
# plugins without converting to gettext
local GETTEXT_MISSING=$( grep xgettext Makefile )
if [[ -z ${GETTEXT_MISSING} ]]; then
- vdr_dev_check "Plugin isn't converted to gettext handling \n"
+ eqawarn "Plugin isn't converted to gettext handling!"
fi
}
@@ -319,26 +293,17 @@
if [[ -n ${I18N_OBJECT} ]]; then
if [[ "${KEEP_I18NOBJECT:-no}" = "yes" ]]; then
- vdr_dev_check "Forced to keep i18n.o"
+ eqawarn "Forced to keep i18n.o"
else
sed -i "s:i18n.o::g" Makefile
- vdr_dev_check "OBJECT i18n.o found"
- vdr_dev_check "removed per sed \n"
+ eqawarn "OBJECT i18n.o found, removed per sed"
fi
-
- else
- vdr_dev_check "OBJECT i18n.o not found in Makefile"
- vdr_dev_check "all fine or manual review needed? \n"
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
- vdr_dev_check "obsolete tI18nPhrase found"
- vdr_dev_check "disabled per sed, please recheck \n"
- else
- vdr_dev_check "obsolete tI18nPhrase not found, fine..."
- vdr_dev_check "please review, may be in subdir... \n"
+ eqawarn "obsolete tI18nPhrase found, disabled per sed, please
recheck"
fi
}
@@ -351,7 +316,7 @@
-e "s:^#include[[:space:]]*\"i18n.h\"://:"
done
- vdr_dev_check "removed i18n.h include in ${@}"
+ eqawarn "removed i18n.h include in ${@}"
}
vdr-plugin-2_print_enable_command() {
@@ -429,7 +394,7 @@
if [[ -n "${VDR_LOCAL_PATCHES_DIR}" ]]; then
eerror "Using VDR_LOCAL_PATCHES_DIR is deprecated!"
eerror "Please move all your patches into"
- eerror "${EROOT}/etc/portage/patches/${CATEGORY}/${P}"
+ eerror "${EROOT%/}/etc/portage/patches/${CATEGORY}/${P}"
eerror "and remove or unset the VDR_LOCAL_PATCHES_DIR variable."
die
fi
@@ -569,10 +534,10 @@
emake install \
${BUILD_PARAMS} \
TMPDIR="${T}" \
- DESTDIR="${D}" \
+ DESTDIR="${D%/}" \
|| die "emake install (makefile target) failed"
else
- vdr_dev_check "Plugin use still the old Makefile handling"
+ eqawarn "Plugin use still the old Makefile handling"
insinto "${VDR_PLUGIN_DIR}"
doins libvdr-*.so.*
fi
@@ -584,11 +549,11 @@
local linguas
for linguas in ${LINGUAS[*]}; do
insinto "${LOCDIR}"
- cp -r --parents ${linguas}* ${D}/${LOCDIR}
+ cp -r --parents ${linguas}* ${D%/}/${LOCDIR}
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=""
</snapp>
--
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: 1045 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-dev] [PATCH] vdr-plugin-2.eclass: add EAPI 7 support
2018-07-14 12:04 ` Joerg Bornkessel
@ 2018-07-15 18:18 ` Joerg Bornkessel
0 siblings, 0 replies; 5+ messages in thread
From: Joerg Bornkessel @ 2018-07-15 18:18 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1.1: Type: text/plain, Size: 483 bytes --]
Am 14.07.2018 um 14:04 schrieb Joerg Bornkessel:
> Next try,
>
> - eapi 7 support
> - fixed the trailing slash issue in D and EROOT
> - some cleanups, as a described in my previous post
>
> Please take another look
>
> Thanks Jörg
>
If there no comments, i will commit my Changes in the next view hours
Thanks Jörg
--
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: 1045 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-07-15 18:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-13 22:23 [gentoo-dev] [PATCH] vdr-plugin-2.eclass: add EAPI 7 support Joerg Bornkessel
2018-07-14 6:08 ` Ulrich Mueller
[not found] ` <916cd955-bd67-de79-b28c-a63884367132@astrali.lan>
2018-07-14 9:14 ` Joerg Bornkessel
2018-07-14 12:04 ` Joerg Bornkessel
2018-07-15 18:18 ` Joerg Bornkessel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox