diff options
author | Jörg Bornkessel <hd_brummy@gentoo.org> | 2018-08-12 16:42:53 +0200 |
---|---|---|
committer | Jörg Bornkessel <hd_brummy@gentoo.org> | 2018-08-12 16:42:53 +0200 |
commit | db2d8e86bcdb2b22518abd0a273d55f52bd8530c (patch) | |
tree | 15828113f95d9ae4864922dd3a87269c4567a56f /eclass/vdr-plugin-2.eclass | |
parent | www-client/chromium: remove old (diff) | |
download | gentoo-db2d8e86bcdb2b22518abd0a273d55f52bd8530c.tar.gz gentoo-db2d8e86bcdb2b22518abd0a273d55f52bd8530c.tar.bz2 gentoo-db2d8e86bcdb2b22518abd0a273d55f52bd8530c.zip |
eapi 7 support, some minor cleanups
Diffstat (limited to 'eclass/vdr-plugin-2.eclass')
-rw-r--r-- | eclass/vdr-plugin-2.eclass | 67 |
1 files changed, 16 insertions, 51 deletions
diff --git a/eclass/vdr-plugin-2.eclass b/eclass/vdr-plugin-2.eclass index cb822f23e719..a5cc36153292 100644 --- a/eclass/vdr-plugin-2.eclass +++ b/eclass/vdr-plugin-2.eclass @@ -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 @@ vdr_create_plugindb_file() { 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 @@ vdr_create_header_checksum_file() { } 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 @@ vdr_patchmakefile() { -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 @@ vdr_patchmakefile() { 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 @@ vdr_i18n() { 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 @@ vdr_remove_i18n_include() { -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 @@ vdr-plugin-2_pkg_setup() { 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 @@ vdr-plugin-2_src_install() { 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 @@ 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} 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="" |