commit: 935b315d5578939b2c31908a9149e4d9231dd6ac Author: Joerg Bornkessel <hd_brummy <AT> gentoo <DOT> org> AuthorDate: Sat May 7 16:46:18 2016 +0000 Commit: Joerg Bornkessel <hd_brummy <AT> gentoo <DOT> org> CommitDate: Sat May 7 16:46:18 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=935b315d
EAPI=6 support; removed support befor media-video/vdr-2 eclass/vdr-plugin-2.eclass | 47 ++++++++++++++++++++-------------------------- 1 file changed, 20 insertions(+), 27 deletions(-) diff --git a/eclass/vdr-plugin-2.eclass b/eclass/vdr-plugin-2.eclass index b3ca9b0..ae09a34 100644 --- a/eclass/vdr-plugin-2.eclass +++ b/eclass/vdr-plugin-2.eclass @@ -90,7 +90,9 @@ # @CODE # Applying your own local/user patches: -# This is done by using the epatch_user() function of the eutils.eclass. +# 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. # 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 @@ -98,11 +100,17 @@ # # For more details about it please take a look at the eutils.class. -inherit eutils flag-o-matic multilib toolchain-funcs unpacker +[[ ${EAPI} == [45] ]] && inherit eutils multilib +inherit flag-o-matic toolchain-funcs unpacker case ${EAPI:-0} in - 4|5) ;; + 4|5) + ;; + 6) + ewarn "EAPI 6 support for test purpose only, plz report bugs to v...@gentoo.org" + ;; *) die "EAPI ${EAPI} unsupported." + ;; esac EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_compile src_install pkg_postinst pkg_postrm pkg_config @@ -388,17 +396,10 @@ vdr-plugin-2_pkg_setup() { fi # Where should the plugins live in the filesystem - if has_version ">=media-video/vdr-1.7.34"; then - VDR_PLUGIN_DIR=$(pkg-config --variable=libdir vdr) - else - # obsolete, as we have only >=media-video/vdr-2 - VDR_PLUGIN_DIR="/usr/$(get_libdir)/vdr/plugins" - fi + VDR_PLUGIN_DIR=$(pkg-config --variable=libdir vdr) VDR_CHECKSUM_DIR="${VDR_PLUGIN_DIR%/plugins}/checksums" - # was /usr/lib/... some time ago - # since gentoo-vdr-scripts-0.3.6 it works with /usr/share/... VDR_RC_DIR="/usr/share/vdr/rcscript" # Pathes to includes @@ -407,12 +408,7 @@ vdr-plugin-2_pkg_setup() { TMP_LOCALE_DIR="${WORKDIR}/tmp-locale" - if has_version ">=media-video/vdr-1.7.34"; then - LOCDIR=$(pkg-config --variable=locdir vdr) - else - # obsolete, as we have only >=media-video/vdr-2 - LOCDIR="/usr/share/locale" - fi + LOCDIR=$(pkg-config --variable=locdir vdr) if ! has_vdr; then # set to invalid values to detect abuses @@ -428,15 +424,8 @@ vdr-plugin-2_pkg_setup() { return fi - if has_version ">=media-video/vdr-1.7.34"; then - VDRVERSION=$(awk -F'"' '/define VDRVERSION/ {print $2}' "${VDR_INCLUDE_DIR}"/config.h) - APIVERSION=$(pkg-config --variable=apiversion vdr) - else - # obsolete, as we have only >=media-video/vdr-2 - VDRVERSION=$(awk -F'"' '/define VDRVERSION/ {print $2}' "${VDR_INCLUDE_DIR}"/config.h) - APIVERSION=$(awk -F'"' '/define APIVERSION/ {print $2}' "${VDR_INCLUDE_DIR}"/config.h) - [[ -z ${APIVERSION} ]] && APIVERSION="${VDRVERSION}" - fi + VDRVERSION=$(awk -F'"' '/define VDRVERSION/ {print $2}' "${VDR_INCLUDE_DIR}"/config.h) + APIVERSION=$(pkg-config --variable=apiversion vdr) einfo "Compiling against" einfo "\tvdr-${VDRVERSION} [API version ${APIVERSION}]" @@ -464,7 +453,11 @@ vdr-plugin-2_src_util() { ;; add_local_patch) cd "${S}" || die "Could not change to plugin-source-directory!" - epatch_user + if [[ ${EAPI} == 6 ]]; then + eapply_user + else + epatch_user + fi ;; patchmakefile) cd "${S}" || die "Could not change to plugin-source-directory!"