diff options
Diffstat (limited to 'eclass')
119 files changed, 512 insertions, 995 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz Binary files differindex d93b4085e700..9dfdf8e6bf6f 100644 --- a/eclass/Manifest.gz +++ b/eclass/Manifest.gz diff --git a/eclass/apache-2.eclass b/eclass/apache-2.eclass index ab09ce367c14..3195d03a395e 100644 --- a/eclass/apache-2.eclass +++ b/eclass/apache-2.eclass @@ -4,6 +4,7 @@ # @ECLASS: apache-2.eclass # @MAINTAINER: # polynomial-c@gentoo.org +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: Provides a common set of functions for apache-2.x ebuilds # @DESCRIPTION: # This eclass handles apache-2.x ebuild functions such as LoadModule generation diff --git a/eclass/aspell-dict-r1.eclass b/eclass/aspell-dict-r1.eclass index aed65d6c9ad3..d633d991c5e5 100644 --- a/eclass/aspell-dict-r1.eclass +++ b/eclass/aspell-dict-r1.eclass @@ -7,6 +7,7 @@ # @AUTHOR: # Original author: Seemant Kulleen # -r1 author: David Seifert +# @SUPPORTED_EAPIS: 6 # @BLURB: An eclass to streamline the construction of ebuilds for new aspell dicts # @DESCRIPTION: # The aspell-dict-r1 eclass is designed to streamline the construction of diff --git a/eclass/autotools-multilib.eclass b/eclass/autotools-multilib.eclass index 3d0c2237afa9..cce308cbfd63 100644 --- a/eclass/autotools-multilib.eclass +++ b/eclass/autotools-multilib.eclass @@ -6,6 +6,7 @@ # gx86-multilib team <multilib@gentoo.org> # @AUTHOR: # Author: Michał Górny <mgorny@gentoo.org> +# @SUPPORTED_EAPIS: 4 5 # @BLURB: autotools-utils wrapper for multilib builds # @DESCRIPTION: # The autotools-multilib.eclass provides a glue between diff --git a/eclass/autotools-utils.eclass b/eclass/autotools-utils.eclass index f8d2c7fdc247..0addf76a92f6 100644 --- a/eclass/autotools-utils.eclass +++ b/eclass/autotools-utils.eclass @@ -1,10 +1,11 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # @ECLASS: autotools-utils.eclass # @MAINTAINER: # Maciej Mrozowski <reavertm@gentoo.org> # Michał Górny <mgorny@gentoo.org> +# @SUPPORTED_EAPIS: 2 3 4 5 # @BLURB: common ebuild functions for autotools-based packages # @DESCRIPTION: # autotools-utils.eclass is autotools.eclass(5) and base.eclass(5) wrapper @@ -89,7 +90,7 @@ case ${EAPI:-0} in 6) die "${ECLASS}.eclass is banned in EAPI ${EAPI}";; - 2|3|4|5) ;; + 4|5) ;; *) die "EAPI=${EAPI} is not supported" ;; esac @@ -281,8 +282,6 @@ autotools-utils_src_configure() { [[ -z ${myeconfargs+1} || $(declare -p myeconfargs) == 'declare -a'* ]] \ || die 'autotools-utils.eclass: myeconfargs has to be an array.' - [[ ${EAPI} == 2 ]] && ! use prefix && EPREFIX= - # Common args local econfargs=() @@ -338,31 +337,12 @@ autotools-utils_src_install() { emake DESTDIR="${D}" "$@" install || die "emake install failed" popd > /dev/null || die - # Move docs installed by autotools (in EAPI < 4). - if [[ ${EAPI} == [23] ]] \ - && path_exists "${D}${EPREFIX}"/usr/share/doc/${PF}/*; then - if [[ $(find "${D}${EPREFIX}"/usr/share/doc/${PF}/* -type d) ]]; then - eqawarn "autotools-utils: directories in docdir require at least EAPI 4" - else - mkdir "${T}"/temp-docdir - mv "${D}${EPREFIX}"/usr/share/doc/${PF}/* "${T}"/temp-docdir/ \ - || die "moving docs to tempdir failed" - - dodoc "${T}"/temp-docdir/* || die "docdir dodoc failed" - rm -r "${T}"/temp-docdir || die - fi - fi - # XXX: support installing them from builddir as well? if declare -p DOCS &>/dev/null; then # an empty list == don't install anything if [[ ${DOCS[@]} ]]; then - if [[ ${EAPI} == [23] ]]; then - dodoc "${DOCS[@]}" || die - else - # dies by itself - dodoc -r "${DOCS[@]}" - fi + # dies by itself + dodoc -r "${DOCS[@]}" fi else local f diff --git a/eclass/base.eclass b/eclass/base.eclass index edb50a4184b3..76eee973dee5 100644 --- a/eclass/base.eclass +++ b/eclass/base.eclass @@ -22,6 +22,7 @@ # QA Team <qa@gentoo.org> # @AUTHOR: # Original author: Dan Armak <danarmak@gentoo.org> +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 # @BLURB: The base eclass defines some default functions and variables. # @DESCRIPTION: # The base eclass defines some default functions and variables. @@ -33,9 +34,9 @@ inherit eutils BASE_EXPF="src_unpack src_compile src_install" case "${EAPI:-0}" in - 6) die "${ECLASS}.eclass is banned in EAPI ${EAPI}";; + 0|1) ;; 2|3|4|5) BASE_EXPF+=" src_prepare src_configure" ;; - *) ;; + *) die "${ECLASS}.eclass is banned in EAPI ${EAPI}";; esac EXPORT_FUNCTIONS ${BASE_EXPF} diff --git a/eclass/bash-completion-r1.eclass b/eclass/bash-completion-r1.eclass index 0a457676ee56..7a69f485a74f 100644 --- a/eclass/bash-completion-r1.eclass +++ b/eclass/bash-completion-r1.eclass @@ -4,6 +4,7 @@ # @ECLASS: bash-completion-r1.eclass # @MAINTAINER: # mgorny@gentoo.org +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7 # @BLURB: A few quick functions to install bash-completion files # @EXAMPLE: # diff --git a/eclass/bzr.eclass b/eclass/bzr.eclass index 29464ec32d5d..cc46be794214 100644 --- a/eclass/bzr.eclass +++ b/eclass/bzr.eclass @@ -9,6 +9,7 @@ # Mark Lee <bzr-gentoo-overlay@lazymalevolence.com> # Ulrich Müller <ulm@gentoo.org> # Christian Faulhammer <fauli@gentoo.org> +# @SUPPORTED_EAPIS: 2 3 4 5 6 7 # @BLURB: generic fetching functions for the Bazaar VCS # @DESCRIPTION: # The bzr.eclass provides functions to fetch and unpack sources from diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass index 53efd0e16595..a15dfa9f30ce 100644 --- a/eclass/cargo.eclass +++ b/eclass/cargo.eclass @@ -6,6 +6,7 @@ # rust@gentoo.org # @AUTHOR: # Doug Goldstein <cardoe@gentoo.org> +# @SUPPORTED_EAPIS: 6 7 # @BLURB: common functions and variables for cargo builds if [[ -z ${_CARGO_ECLASS} ]]; then diff --git a/eclass/check-reqs.eclass b/eclass/check-reqs.eclass index bad7e34fe9a7..d1ed395c8b13 100644 --- a/eclass/check-reqs.eclass +++ b/eclass/check-reqs.eclass @@ -7,6 +7,7 @@ # @AUTHOR: # Bo Ørsted Andresen <zlin@gentoo.org> # Original Author: Ciaran McCreesh <ciaranm@gentoo.org> +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 # @BLURB: Provides a uniform way of handling ebuild which have very high build requirements # @DESCRIPTION: # This eclass provides a uniform way of handling ebuilds which have very high diff --git a/eclass/cmake-multilib.eclass b/eclass/cmake-multilib.eclass index 39f92ae76665..1ffb3e3f08f2 100644 --- a/eclass/cmake-multilib.eclass +++ b/eclass/cmake-multilib.eclass @@ -6,6 +6,7 @@ # gx86-multilib team <multilib@gentoo.org> # @AUTHOR: # Author: Michał Górny <mgorny@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 # @BLURB: cmake-utils wrapper for multilib builds # @DESCRIPTION: # The cmake-multilib.eclass provides a glue between cmake-utils.eclass(5) diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass index e64502b3b9b0..d69c79f83b41 100644 --- a/eclass/cmake-utils.eclass +++ b/eclass/cmake-utils.eclass @@ -112,8 +112,7 @@ esac inherit toolchain-funcs ninja-utils flag-o-matic multiprocessing xdg-utils case ${EAPI} in - 7) ;; - *) inherit eapi7-ver eutils multilib ;; + 5|6) inherit eutils multilib ;; esac EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install @@ -226,9 +225,18 @@ _cmake_generator_to_use() { ninja) # if ninja is enabled but not installed, the build could fail # this could happen if ninja is manually enabled (eg. make.conf) but not installed - if ! ROOT=/ has_version dev-util/ninja; then - die "CMAKE_MAKEFILE_GENERATOR is set to ninja, but ninja is not installed. Please install dev-util/ninja or unset CMAKE_MAKEFILE_GENERATOR." - fi + case ${EAPI} in + 5|6) + if ! ROOT=/ has_version dev-util/ninja; then + die "CMAKE_MAKEFILE_GENERATOR is set to ninja, but ninja is not installed. Please install dev-util/ninja or unset CMAKE_MAKEFILE_GENERATOR." + fi + ;; + *) + if ! has_version -b dev-util/ninja; then + die "CMAKE_MAKEFILE_GENERATOR is set to ninja, but ninja is not installed. Please install dev-util/ninja or unset CMAKE_MAKEFILE_GENERATOR." + fi + ;; + esac generator_name="Ninja" ;; emake) @@ -508,23 +516,14 @@ cmake-utils_src_configure() { # Prepare Gentoo override rules (set valid compiler, append CPPFLAGS etc.) local build_rules=${BUILD_DIR}/gentoo_rules.cmake - # Since cmake-3.4.0_rc1 "<FLAGS>" no longer contains includes and thus - # we need to add "<INCLUDES>" - local includes= - if [[ ${PN} == cmake ]] ; then - if $(ver_test $(ver_cut 1-3 ${PV}) -ge 3.4.0) ; then - includes="<INCLUDES>" - fi - elif ROOT=/ has_version \>=dev-util/cmake-3.4.0_rc1 ; then - includes="<INCLUDES>" - fi + cat > "${build_rules}" <<- _EOF_ || die - SET (CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> <DEFINES> ${includes} ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "ASM compile command" FORCE) - SET (CMAKE_ASM-ATT_COMPILE_OBJECT "<CMAKE_ASM-ATT_COMPILER> <DEFINES> ${includes} ${CPPFLAGS} <FLAGS> -o <OBJECT> -c -x assembler <SOURCE>" CACHE STRING "ASM-ATT compile command" FORCE) + SET (CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> <DEFINES> <INCLUDES> ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "ASM compile command" FORCE) + SET (CMAKE_ASM-ATT_COMPILE_OBJECT "<CMAKE_ASM-ATT_COMPILER> <DEFINES> <INCLUDES> ${CPPFLAGS} <FLAGS> -o <OBJECT> -c -x assembler <SOURCE>" CACHE STRING "ASM-ATT compile command" FORCE) SET (CMAKE_ASM-ATT_LINK_FLAGS "-nostdlib" CACHE STRING "ASM-ATT link flags" FORCE) - SET (CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> ${includes} ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C compile command" FORCE) - SET (CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> <DEFINES> ${includes} ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C++ compile command" FORCE) - SET (CMAKE_Fortran_COMPILE_OBJECT "<CMAKE_Fortran_COMPILER> <DEFINES> ${includes} ${FCFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "Fortran compile command" FORCE) + SET (CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> <INCLUDES> ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C compile command" FORCE) + SET (CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> <DEFINES> <INCLUDES> ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C++ compile command" FORCE) + SET (CMAKE_Fortran_COMPILE_OBJECT "<CMAKE_Fortran_COMPILER> <DEFINES> <INCLUDES> ${FCFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "Fortran compile command" FORCE) _EOF_ local myCC=$(tc-getCC) myCXX=$(tc-getCXX) myFC=$(tc-getFC) diff --git a/eclass/cuda.eclass b/eclass/cuda.eclass index 9ae7a28e1d2b..688251f3a306 100644 --- a/eclass/cuda.eclass +++ b/eclass/cuda.eclass @@ -6,6 +6,7 @@ inherit flag-o-matic toolchain-funcs versionator # @ECLASS: cuda.eclass # @MAINTAINER: # Justin Lecher <jlec@gentoo.org> +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 # @BLURB: Common functions for cuda packages # @DESCRIPTION: # This eclass contains functions to be used with cuda package. Currently it is diff --git a/eclass/depend.apache.eclass b/eclass/depend.apache.eclass index 3067c07cf57a..79bfdcc493f7 100644 --- a/eclass/depend.apache.eclass +++ b/eclass/depend.apache.eclass @@ -4,6 +4,7 @@ # @ECLASS: depend.apache.eclass # @MAINTAINER: # apache-devs@gentoo.org +# @SUPPORTED_EAPIS: 0 2 3 4 5 6 # @BLURB: Functions to allow ebuilds to depend on apache # @DESCRIPTION: # This eclass handles depending on apache in a sane way and provides information diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index 85f8f4cb3be9..ffb07441ad99 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -7,6 +7,7 @@ # @AUTHOR: # Author: Michał Górny <mgorny@gentoo.org> # Based on the work of: Krzysztof Pawlik <nelchael@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: A simple eclass to build Python packages using distutils. # @DESCRIPTION: # A simple eclass providing functions to build Python packages using diff --git a/eclass/dotnet.eclass b/eclass/dotnet.eclass index 6ae42a07a6fc..9d02e540de3e 100644 --- a/eclass/dotnet.eclass +++ b/eclass/dotnet.eclass @@ -3,6 +3,7 @@ # @ECLASS: dotnet.eclass # @MAINTAINER: cynede@gentoo.org +# @SUPPORTED_EAPIS: 1 2 3 4 5 6 7 # @BLURB: common settings and functions for mono and dotnet related packages # @DESCRIPTION: # The dotnet eclass contains common environment settings that are useful for diff --git a/eclass/eapi7-ver.eclass b/eclass/eapi7-ver.eclass index ab512bd24e47..b7f9715bc421 100644 --- a/eclass/eapi7-ver.eclass +++ b/eclass/eapi7-ver.eclass @@ -7,6 +7,7 @@ # @AUTHOR: # Ulrich Müller <ulm@gentoo.org> # Michał Górny <mgorny@gentoo.org> +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 # @BLURB: Testing implementation of EAPI 7 version manipulators # @DESCRIPTION: # A stand-alone implementation of the version manipulation functions diff --git a/eclass/elisp.eclass b/eclass/elisp.eclass index 0f07a3ef1f7e..55635398d54b 100644 --- a/eclass/elisp.eclass +++ b/eclass/elisp.eclass @@ -9,6 +9,7 @@ # Jeremy Maitin-Shepard <jbms@attbi.com> # Christian Faulhammer <fauli@gentoo.org> # Ulrich Müller <ulm@gentoo.org> +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7 # @BLURB: Eclass for Emacs Lisp packages # @DESCRIPTION: # diff --git a/eclass/emboss-r2.eclass b/eclass/emboss-r2.eclass index 4d97091d280e..266c4583c189 100644 --- a/eclass/emboss-r2.eclass +++ b/eclass/emboss-r2.eclass @@ -10,6 +10,7 @@ # Original author: Author Olivier Fisette <ofisette@gmail.com> # Next gen author: Justin Lecher <jlec@gentoo.org> # Next gen author: Ted Tanberry <ted.tanberry@gmail.com> +# @SUPPORTED_EAPIS: 6 # @BLURB: Use this to easy install EMBOSS and EMBASSY programs (EMBOSS add-ons). # @DESCRIPTION: # The inheriting ebuild must set at least EAPI=6 and provide EBO_DESCRIPTION before the inherit line. diff --git a/eclass/epatch.eclass b/eclass/epatch.eclass index 8e03478c26ce..1ea657a3b6f8 100644 --- a/eclass/epatch.eclass +++ b/eclass/epatch.eclass @@ -4,6 +4,7 @@ # @ECLASS: epatch.eclass # @MAINTAINER: # base-system@gentoo.org +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 # @BLURB: easy patch application functions # @DESCRIPTION: # An eclass providing epatch and epatch_user functions to easily apply @@ -18,8 +19,6 @@ case ${EAPI:-0} in die "${ECLASS}: banned in EAPI=${EAPI}; use eapply* instead";; esac -inherit estack - # @VARIABLE: EPATCH_SOURCE # @DESCRIPTION: # Default directory to search for patches. @@ -210,13 +209,14 @@ epatch() { # Let people filter things dynamically if [[ -n ${EPATCH_EXCLUDE}${EPATCH_USER_EXCLUDE} ]] ; then # let people use globs in the exclude - eshopts_push -o noglob + local prev_noglob=$(shopt -p -o noglob) + set -o noglob local ex for ex in ${EPATCH_EXCLUDE} ; do if [[ ${patchname} == ${ex} ]] ; then einfo " Skipping ${patchname} due to EPATCH_EXCLUDE ..." - eshopts_pop + ${prev_noglob} continue 2 fi done @@ -224,12 +224,12 @@ epatch() { for ex in ${EPATCH_USER_EXCLUDE} ; do if [[ ${patchname} == ${ex} ]] ; then einfo " Skipping ${patchname} due to EPATCH_USER_EXCLUDE ..." - eshopts_pop + ${prev_noglob} continue 2 fi done - eshopts_pop + ${prev_noglob} fi if [[ ${SINGLE_PATCH} == "yes" ]] ; then diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass index 9b4767e1874a..7b6336e2aee1 100644 --- a/eclass/eutils.eclass +++ b/eclass/eutils.eclass @@ -25,19 +25,6 @@ case ${EAPI:-0} in ;; esac -# @FUNCTION: eqawarn -# @USAGE: [message] -# @DESCRIPTION: -# Proxy to ewarn for package managers that don't provide eqawarn and use the PM -# implementation if available. Reuses PORTAGE_ELOG_CLASSES as set by the dev -# profile. -if ! declare -F eqawarn >/dev/null ; then - eqawarn() { - has qa ${PORTAGE_ELOG_CLASSES} && ewarn "$@" - : - } -fi - # @FUNCTION: emktemp # @USAGE: [temp dir] # @DESCRIPTION: @@ -181,33 +168,11 @@ make_wrapper() { fi } -# @FUNCTION: path_exists -# @USAGE: [-a|-o] <paths> -# @DESCRIPTION: -# Check if the specified paths exist. Works for all types of paths -# (files/dirs/etc...). The -a and -o flags control the requirements -# of the paths. They correspond to "and" and "or" logic. So the -a -# flag means all the paths must exist while the -o flag means at least -# one of the paths must exist. The default behavior is "and". If no -# paths are specified, then the return value is "false". path_exists() { - local opt=$1 - [[ ${opt} == -[ao] ]] && shift || opt="-a" - - # no paths -> return false - # same behavior as: [[ -e "" ]] - [[ $# -eq 0 ]] && return 1 - - local p r=0 - for p in "$@" ; do - [[ -e ${p} ]] - : $(( r += $? )) - done - - case ${opt} in - -a) return $(( r != 0 )) ;; - -o) return $(( r == $# )) ;; - esac + eerror "path_exists has been removed. Please see the following post" + eerror "for a replacement snippet:" + eerror "https://blogs.gentoo.org/mgorny/2018/08/09/inlining-path_exists/" + die "path_exists is banned" } # @FUNCTION: use_if_iuse @@ -415,4 +380,23 @@ in_iuse() { ;; esac +case ${EAPI:-0} in +0|1|2|3|4|5|6) + +# @FUNCTION: eqawarn +# @USAGE: [message] +# @DESCRIPTION: +# Proxy to ewarn for package managers that don't provide eqawarn and use the PM +# implementation if available. Reuses PORTAGE_ELOG_CLASSES as set by the dev +# profile. +if ! declare -F eqawarn >/dev/null ; then + eqawarn() { + has qa ${PORTAGE_ELOG_CLASSES} && ewarn "$@" + : + } +fi + +;; +esac + fi diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass index 5ab14b08d6ec..582339096573 100644 --- a/eclass/flag-o-matic.eclass +++ b/eclass/flag-o-matic.eclass @@ -34,6 +34,9 @@ setup-allowed-flags() { # CPPFLAGS and LDFLAGS '-[DUILR]*' '-Wl,*' + + # Linker choice flag + '-fuse-ld' ) # allow a bunch of flags that negate features / control ABI diff --git a/eclass/fortran-2.eclass b/eclass/fortran-2.eclass index d7ed9a99804d..820cbbcb49bd 100644 --- a/eclass/fortran-2.eclass +++ b/eclass/fortran-2.eclass @@ -8,6 +8,7 @@ # @AUTHOR: # Author Justin Lecher <jlec@gentoo.org> # Test functions provided by Sebastien Fabbro and Kacper Kowalik +# @SUPPORTED_EAPIS: 4 5 6 # @BLURB: Simplify fortran compiler management # @DESCRIPTION: # If you need a fortran compiler, then you should be inheriting this eclass. diff --git a/eclass/freedict.eclass b/eclass/freedict.eclass index b795f53f9541..c1b32d1b6bfb 100644 --- a/eclass/freedict.eclass +++ b/eclass/freedict.eclass @@ -6,6 +6,7 @@ # maintainer-needed@gentoo.org # @AUTHOR: # Original author: Seemant Kulleen +# @SUPPORTED_EAPIS: 6 # @BLURB: Ease the installation of freedict translation dictionaries # @DESCRIPTION: # This eclass exists to ease the installation of freedict translation diff --git a/eclass/games.eclass b/eclass/games.eclass index 3c280a5efee3..d651dc7d868a 100644 --- a/eclass/games.eclass +++ b/eclass/games.eclass @@ -4,6 +4,7 @@ # @ECLASS: games.eclass # @MAINTAINER: # Games team <games@gentoo.org> +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 # @BLURB: Standardizing the install of games. # @DESCRIPTION: # This eclass makes sure that games are consistently handled in gentoo. diff --git a/eclass/git-2.eclass b/eclass/git-2.eclass index 63568c155775..5371a612dccf 100644 --- a/eclass/git-2.eclass +++ b/eclass/git-2.eclass @@ -1,9 +1,10 @@ -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # @ECLASS: git-2.eclass # @MAINTAINER: # maintainer-needed@gentoo.org +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 # @BLURB: Eclass for fetching and unpacking git repositories. # @DESCRIPTION: # Eclass for easing maintenance of live ebuilds using git as remote repository. @@ -11,9 +12,10 @@ # # This eclass is DEPRECATED. Please use git-r3 instead. -if [[ ${EAPI} == 6 ]]; then - die "${ECLASS}.eclass is banned in EAPI ${EAPI}" -fi +case ${EAPI:-0} in + 0|1|2|3|4|5) ;; + *) die "${ECLASS}.eclass is banned in EAPI ${EAPI}";; +esac # This eclass support all EAPIs. EXPORT_FUNCTIONS src_unpack diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass index 7fe9bcb40fa4..48fac96ee358 100644 --- a/eclass/git-r3.eclass +++ b/eclass/git-r3.eclass @@ -4,6 +4,7 @@ # @ECLASS: git-r3.eclass # @MAINTAINER: # Michał Górny <mgorny@gentoo.org> +# @SUPPORTED_EAPIS: 4 5 6 7 # @BLURB: Eclass for fetching and unpacking git repositories. # @DESCRIPTION: # Third generation eclass for easing maintenance of live ebuilds using diff --git a/eclass/gkrellm-plugin.eclass b/eclass/gkrellm-plugin.eclass index d5161c486f6c..d6eb57ad0eca 100644 --- a/eclass/gkrellm-plugin.eclass +++ b/eclass/gkrellm-plugin.eclass @@ -7,6 +7,7 @@ # @AUTHOR: # Original author: Jim Ramsay # EAPI 6 author: David Seifert +# @SUPPORTED_EAPIS: 6 # @BLURB: Provides src_install used by (almost) all gkrellm plugins # @DESCRIPTION: # - Sets up default dependencies diff --git a/eclass/gnome-python-common-r1.eclass b/eclass/gnome-python-common-r1.eclass index 2c9c58950cab..0d604425b9ca 100644 --- a/eclass/gnome-python-common-r1.eclass +++ b/eclass/gnome-python-common-r1.eclass @@ -8,6 +8,7 @@ # Author: Michał Górny <mgorny@gentoo.org> # Based on the work of: Arun raghaven <ford_prefect@gentoo.org> # which in turn was based on the work of Jim Ramsay <lack@gentoo.org> +# @SUPPORTED_EAPIS: 5 # @BLURB: Common functionality for building gnome-python* bindings # @DESCRIPTION: # This eclass provides python-r1 support for the GNOME2 library Python diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass index 65076ae2d61e..b2f536a45e96 100644 --- a/eclass/gnome2-utils.eclass +++ b/eclass/gnome2-utils.eclass @@ -4,6 +4,7 @@ # @ECLASS: gnome2-utils.eclass # @MAINTAINER: # gnome@gentoo.org +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 # @BLURB: Auxiliary functions commonly used by Gnome packages. # @DESCRIPTION: # This eclass provides a set of auxiliary functions needed by most Gnome diff --git a/eclass/gnome2.eclass b/eclass/gnome2.eclass index 6db6d08b14e6..f741a041c27a 100644 --- a/eclass/gnome2.eclass +++ b/eclass/gnome2.eclass @@ -4,6 +4,7 @@ # @ECLASS: gnome2.eclass # @MAINTAINER: # gnome@gentoo.org +# @SUPPORTED_EAPIS: 4 5 6 # @BLURB: Provides phases for Gnome/Gtk+ based packages. # @DESCRIPTION: # Exports portage base functions used by ebuilds written for packages using the diff --git a/eclass/gnustep-2.eclass b/eclass/gnustep-2.eclass index 4d44f93612dc..b1f9525c1b9b 100644 --- a/eclass/gnustep-2.eclass +++ b/eclass/gnustep-2.eclass @@ -1,9 +1,10 @@ -# Copyright 1999-2012 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # @ECLASS: gnustep-2.eclass # @MAINTAINER: # GNUstep Herd <gnustep@gentoo.org> +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7 # @BLURB: eclass for GNUstep Apps, Frameworks, and Bundles build # @DESCRIPTION: # This eclass sets up GNUstep environment to properly install diff --git a/eclass/gnustep-base.eclass b/eclass/gnustep-base.eclass index 5698c777da67..6cd9f532a55f 100644 --- a/eclass/gnustep-base.eclass +++ b/eclass/gnustep-base.eclass @@ -1,9 +1,10 @@ -# Copyright 1999-2012 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # @ECLASS: gnustep-base.eclass # @MAINTAINER: # GNUstep Herd <gnustep@gentoo.org> +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7 # @BLURB: Internal handling of GNUstep pacakges # @DESCRIPTION: # Inner gnustep eclass, should only be inherited directly by gnustep-base @@ -62,7 +63,7 @@ gnustep-base_src_prepare() { eend $? fi - has ${EAPI:-0} 6 && default + ! has ${EAPI:-0} 0 1 2 3 4 5 && default } gnustep-base_src_configure() { diff --git a/eclass/go-mono.eclass b/eclass/go-mono.eclass deleted file mode 100644 index df23356b91c4..000000000000 --- a/eclass/go-mono.eclass +++ /dev/null @@ -1,142 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @DEAD -# Michał Górny <mgorny@gentoo.org> (17 Jun 2018) -# This eclass was used for old versions of Mono applications, and all -# versions using it have been removed already. It's not maintained, -# uses obsolete (even removed) eclasses, outdated URIs, it has -# documentation problems. Removal in 30 days. - -# @ECLASS: go-mono.eclass -# @MAINTAINER: -# dotnet@gentoo.org -# @BLURB: Common functionality for go-mono.org apps -# @DESCRIPTION: -# Common functionality needed by all go-mono.org apps. - -inherit base versionator mono - -PRE_URI="http://mono.ximian.com/monobuild/preview/sources" - -GIT_PN="${PN/mono-debugger/debugger}" - -ESVN_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/svn-src/mono" - -GO_MONO_SUB_BRANCH=${GO_MONO_SUB_BRANCH} - -if [[ "${PV%_rc*}" != "${PV}" ]] -then - GO_MONO_P="${P%_rc*}" - SRC_URI="${PRE_URI}/${PN}/${GO_MONO_P}.tar.bz2 -> ${P}.tar.bz2" - S="${WORKDIR}/${GO_MONO_P}" -elif [[ "${PV%_pre*}" != "${PV}" ]] -then - GO_MONO_P="${P%_pre*}" - SRC_URI="${PRE_URI}/${PN}/${GO_MONO_P}.tar.bz2 -> ${P}.tar.bz2" - S="${WORKDIR}/${GO_MONO_P}" -elif [[ "${PV}" == "9999" ]] -then - GO_MONO_P=${P} - EGIT_REPO_URI="https://github.com/mono/${GIT_PN}.git" - SRC_URI="" - inherit autotools git -elif [[ "${PV%.9999}" != "${PV}" ]] -then - GO_MONO_P=${P} - EGIT_REPO_URI="https://github.com/mono/${GIT_PN}.git" - EGIT_BRANCH="mono-$(get_version_component_range 1)-$(get_version_component_range 2)${GO_MONO_SUB_BRANCH}" - SRC_URI="" - inherit autotools git -else - GO_MONO_P=${P} - SRC_URI="http://download.mono-project.com/sources/${PN}/${P}.tar.bz2" -fi - - -NO_MONO_DEPEND=( "dev-lang/mono" "dev-dotnet/libgdiplus" "dev-dotnet/gluezilla" ) - -if [[ "$(get_version_component_range 3)" != "9999" ]] -then - GO_MONO_REL_PV="$(get_version_component_range 1-2)" - -else - GO_MONO_REL_PV="${PV}" -fi - -if ! has "${CATEGORY}/${PN}" "${NO_MONO_DEPEND[@]}" -then - RDEPEND=">=dev-lang/mono-${GO_MONO_REL_PV}" - DEPEND="${RDEPEND}" -fi - -DEPEND="${DEPEND} - virtual/pkgconfig" - -# @FUNCTION: go-mono_src_unpack -# @DESCRIPTION: -# Runs default() -go-mono_src_unpack() { - if [[ "${PV%.9999}" != "${PV}" || "${PV}" == "9999" ]] - then - default - git_src_unpack - else - default - fi -} - -# @FUNCTION: go-mono_src_prepare -# @DESCRIPTION: -# Runs autopatch from base.eclass, if PATCHES is set. -go-mono_src_prepare() { - if [[ "${PV%.9999}" != "${PV}" || "${PV}" == "9999" ]] - then - base_src_prepare - [[ "$EAUTOBOOTSTRAP" != "no" ]] && eautoreconf - else - base_src_prepare - fi -} - -# @FUNCTION: go-mono_src_configure -# @DESCRIPTION: -# Runs econf, disabling static libraries and dependency-tracking. -go-mono_src_configure() { - econf --disable-dependency-tracking \ - --disable-static \ - "$@" -} - -# @FUNCTION: go-mono_src_compile -# @DESCRIPTION: -# Runs emake. -go-mono_src_compile() { - emake "$@" || die "emake failed" -} - -# @ECLASS-VARIABLE: DOCS -# @DESCRIPTION: -# Insert path of docs you want installed. If more than one, -# consider using an array. - -# @FUNCTION: go-mono_src_install -# @DESCRIPTION: -# Rune emake, installs common doc files, if DOCS is -# set, installs those. Gets rid of .la files. -go-mono_src_install () { - emake -j1 DESTDIR="${D}" "$@" install || die "install failed" - mono_multilib_comply - local commondoc=( AUTHORS ChangeLog README TODO ) - for docfile in "${commondoc[@]}" - do - [[ -e "${docfile}" ]] && dodoc "${docfile}" - done - if [[ "${DOCS[@]}" ]] - then - dodoc "${DOCS[@]}" || die "dodoc DOCS failed" - fi - find "${D}" -name '*.la' -exec rm -rf '{}' '+' || die "la removal failed" -} - -EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install diff --git a/eclass/golang-base.eclass b/eclass/golang-base.eclass index 4d7e30ca15f3..c8308d286658 100644 --- a/eclass/golang-base.eclass +++ b/eclass/golang-base.eclass @@ -4,6 +4,7 @@ # @ECLASS: golang-base.eclass # @MAINTAINER: # William Hubbs <williamh@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 # @BLURB: Eclass that provides base functions for Go packages. # @DESCRIPTION: # This eclass provides base functions for software written in the Go diff --git a/eclass/golang-build.eclass b/eclass/golang-build.eclass index 2d832114842c..4d5bcdf73189 100644 --- a/eclass/golang-build.eclass +++ b/eclass/golang-build.eclass @@ -4,6 +4,7 @@ # @ECLASS: golang-build.eclass # @MAINTAINER: # William Hubbs <williamh@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 # @BLURB: Eclass for compiling go packages. # @DESCRIPTION: # This eclass provides default src_compile, src_test and src_install diff --git a/eclass/golang-vcs-snapshot.eclass b/eclass/golang-vcs-snapshot.eclass index 1453b7a4d09a..975b23df45f4 100644 --- a/eclass/golang-vcs-snapshot.eclass +++ b/eclass/golang-vcs-snapshot.eclass @@ -4,6 +4,7 @@ # @ECLASS: golang-vcs-snapshot.eclass # @MAINTAINER: # William Hubbs <williamh@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 # @BLURB: support eclass for unpacking VCS snapshot tarballs for # software written in the Go programming language # @DESCRIPTION: diff --git a/eclass/golang-vcs.eclass b/eclass/golang-vcs.eclass index b95ee29178f0..09f80b15d675 100644 --- a/eclass/golang-vcs.eclass +++ b/eclass/golang-vcs.eclass @@ -4,6 +4,7 @@ # @ECLASS: golang-vcs.eclass # @MAINTAINER: # William Hubbs <williamh@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 # @BLURB: Eclass for fetching and unpacking go repositories. # @DESCRIPTION: # This eclass is written to ease the maintenance of live ebuilds diff --git a/eclass/gstreamer.eclass b/eclass/gstreamer.eclass index c5b68a6fe245..24877de422fa 100644 --- a/eclass/gstreamer.eclass +++ b/eclass/gstreamer.eclass @@ -10,6 +10,7 @@ # Saleem Abdulrasool <compnerd@gentoo.org> # foser <foser@gentoo.org> # zaheerm <zaheerm@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 # @BLURB: Helps building core & split gstreamer plugins. # @DESCRIPTION: # Eclass to make external gst-plugins emergable on a per-plugin basis diff --git a/eclass/gtk-sharp-module.eclass b/eclass/gtk-sharp-module.eclass deleted file mode 100644 index f4ec30d3a823..000000000000 --- a/eclass/gtk-sharp-module.eclass +++ /dev/null @@ -1,568 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @DEAD -# Michał Górny <mgorny@gentoo.org> (17 Jun 2018) -# This eclass was used for old versions of split gtk-sharp modules, -# and all packages/versions using it have been removed already. -# It's not maintained, uses obsolete eclasses, outdated URIs, -# it has documentation problems. Removal in 30 days. - -# @ECLASS: gtk-sharp-module.eclass -# @MAINTAINER: -# dotnet@gentoo.org -# @BLURB: Manages the modules of the gtk-, gnome-, and gnome-desktop-sharp tarballs -# @DESCRIPTION: -# This eclass provides phase functions and helper functions for the modules -# of the gtk-sharp, gnome-sharp and gnome-desktop-sharp tarballs. -# PLEASE TAKE NOTE: ONLY FOR EAPI-2 EBUILDS - -WANT_AUTOMAKE=none -WANT_AUTOCONF=none - -inherit eutils mono multilib libtool autotools base versionator - -case ${EAPI:-0} in - 2|3|4|5) ;; - *) die "Unknown EAPI." ;; -esac - -# @ECLASS-VARIABLE: GTK_SHARP_MODULE -# @DESCRIPTION: -# The name of the Gtk# module. -# Default value: ${PN/-sharp/} -GTK_SHARP_MODULE=${GTK_SHARP_MODULE:=${PN/-sharp/}} - -# @ECLASS-VARIABLE: GTK_SHARP_MODULE_DIR -# @DESCRIPTION: -# The subdirectory of S in which GTK_SHARP_MODULE is installed. -# Default value: ${PN/-sharp/} -GTK_SHARP_MODULE_DIR=${GTK_SHARP_MODULE_DIR:=${PN/-sharp/}} - -# @ECLASS-VARIABLE: GTK_SHARP_REQUIRED_VERSION -# @DESCRIPTION: -# The version of the gtk-sharp tarball this package requires. -# Optional. -GTK_SHARP_REQUIRED_VERSION="${GTK_SHARP_REQUIRED_VERSION}" - -# @ECLASS-VARIABLE: gapi_users_list -# @DESCRIPTION: -# List of modules that use one of gapi2-codegen, gapi2-fixup or gapi2-parser -# No ebuild-serviceable parts inside. -gapi_users_list="art gnome gnomevfs ${gnome_desktop_sharp_module_list} atk gtk gdk glade pango" - -# @ECLASS-VARIABLE: PV_MAJOR -# @DESCRIPTION: -# The first two components of the PV variable. -PV_MAJOR=$(get_version_component_range 1-2) - -# @FUNCTION: add_bdepend -# @USAGE: <package atom> -# @DESCRIPTION: -# Adds to the DEPEND variable -add_bdepend() { - [[ ${#@} -eq 1 ]] || die "${FUNCNAME} needs ONE (1) argument" - DEPEND="${DEPEND} $@" -} - -# @FUNCTION: add_rdepend -# @USAGE: <package atom> -# @DESCRIPTION: -# Adds to the RDEPEND variable -add_rdepend() { - [[ ${#@} -eq 1 ]] || die "${FUNCNAME} needs ONE (1) argument" - RDEPEND="${RDEPEND} $@" -} - -# @FUNCTION: add_depend -# @USAGE: <package atom> -# @DESCRIPTION: -# Adds to the DEPEND and RDEPEND variables -add_depend() { - [[ ${#@} -eq 1 ]] || die "${FUNCNAME} needs ONE (1) argument" - DEPEND="${DEPEND} $@" - RDEPEND="${RDEPEND} $@" -} - -# @ECLASS-VARIABLE: TARBALL -# @DESCRIPTION: -# The GtkSharp modules are currently divided into three seperate tarball -# distributions. The TARBALL variable holds the name of the tarball -# to which GTK_SHARP_MODULE belongs. -case ${GTK_SHARP_MODULE} in - glib|glade|gtk|gdk|atk|pango|gtk-dotnet|gtk-gapi|gtk-docs) - TARBALL="gtk-sharp" - case ${PVR} in - 2.12.10*) - SRC_URI="mirror://gentoo/${TARBALL}-2.12.7.patch.bz2" - #Upstream: https://bugzilla.novell.com/show_bug.cgi?id=$bugno - #Upstream bug #470390 for the gtk-sharp-2.12.7.patch - PATCHES=( - "${WORKDIR}/${TARBALL}-2.12.7.patch" - ) - ;; - 2.12.11*) - SRC_URI="mirror://gentoo/${TARBALL}-2.12.11.patch.bz2" - PATCHES=( - "${WORKDIR}/${TARBALL}-2.12.11.patch" - ) - ;; - esac - case ${PVR} in - 2.12.1*) - EAUTORECONF="YES" - add_bdepend "=sys-devel/automake-1.10*" - add_bdepend ">=sys-devel/autoconf-2.61" - ;; - esac - ;; - art|gnome|gnomevfs|gconf) - TARBALL="gnome-sharp" - add_depend "=dev-dotnet/gtk-sharp-${GTK_SHARP_REQUIRED_VERSION}*" - has "${GTK_SHARP_MODULE}" "${gapi_users_list}" && \ - add_bdepend "=dev-dotnet/gtk-sharp-gapi-${GTK_SHARP_REQUIRED_VERSION}*" - case ${PVR} in - 2.24.1*) - SRC_URI="mirror://gentoo/${TARBALL}-2.24.1.patch.bz2" - # Upstream bug: https://bugzilla.novell.com/show_bug.cgi?id=483251 - PATCHES=( - "${WORKDIR}/${TARBALL}-2.24.1.patch" - ) - EAUTORECONF="YES" - add_bdepend "=sys-devel/automake-1.10*" - add_bdepend ">=sys-devel/autoconf-2.61" - ;; - 2.24.2*) - add_depend ">=dev-lang/mono-2.7" - ;; - esac - ;; - gnome-desktop|gnome-print|gnome-panel|gtkhtml|gtksourceview|nautilusburn|rsvg|vte|wnck) - TARBALL="gnome-desktop-sharp" - add_depend "=dev-dotnet/gtk-sharp-${GTK_SHARP_REQUIRED_VERSION}*" - add_depend "=dev-dotnet/gnome-sharp-2.24*" - add_depend "gnome-base/gnome-desktop:2" - add_bdepend "|| ( >=dev-dotnet/gtk-sharp-2.12.21 =dev-dotnet/gtk-sharp-gapi-${GTK_SHARP_REQUIRED_VERSION}* )" - ;; - *) - eerror "Huh? Sonny boy, looks like your GTK_SHARP_MODULE is not on the approved list. BAILING!" - die "How did we get here!!?" - ;; -esac - -case ${PF} in - #gtk-sharp tarball - gtk-sharp-docs*) - add_depend ">=dev-lang/mono-2.0" - ;; - gtk-sharp-gapi*) - add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2" - add_depend "dev-perl/XML-LibXML" - ;; - gtk-sharp-*) - add_bdepend "~dev-dotnet/gtk-sharp-gapi-${PV}" - add_depend "~dev-dotnet/glib-sharp-${PV}" - add_depend "~dev-dotnet/atk-sharp-${PV}" - add_depend "~dev-dotnet/gdk-sharp-${PV}" - add_depend "~dev-dotnet/pango-sharp-${PV}" - ;; - gdk-sharp-*) - add_bdepend "~dev-dotnet/gtk-sharp-gapi-${PV}" - add_depend "~dev-dotnet/glib-sharp-${PV}" - add_depend "x11-libs/gtk+:2" - add_depend "~dev-dotnet/pango-sharp-${PV}" - add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2" - ;; - atk-sharp-*) - add_bdepend "~dev-dotnet/gtk-sharp-gapi-${PV}" - add_depend "~dev-dotnet/glib-sharp-${PV}" - add_depend "dev-libs/atk" - add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2" - ;; - glib-sharp-*) - add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2" - add_depend "dev-libs/glib:2" - ;; - pango-sharp-*) - add_bdepend "~dev-dotnet/gtk-sharp-gapi-${PV}" - add_depend "~dev-dotnet/glib-sharp-${PV}" - add_depend "x11-libs/pango" - add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2" - ;; - gtk-dotnet-*) - add_depend "~dev-dotnet/glib-sharp-${PV}" - add_depend "~dev-dotnet/gdk-sharp-${PV}" - add_depend "~dev-dotnet/pango-sharp-${PV}" - add_depend "~dev-dotnet/gtk-sharp-${PV}" - add_depend "dev-lang/mono[-minimal]" - add_rdepend "!<=dev-dotnet/gtk-sharp-2.12.7:2" - ;; - glade-sharp-*) - add_bdepend "~dev-dotnet/gtk-sharp-gapi-${PV}" - add_depend "~dev-dotnet/glib-sharp-${PV}" - add_depend "~dev-dotnet/atk-sharp-${PV}" - add_depend "~dev-dotnet/gdk-sharp-${PV}" - add_depend "~dev-dotnet/gtk-sharp-${PV}" - add_depend "~dev-dotnet/pango-sharp-${PV}" - add_depend ">=gnome-base/libglade-2.3.6:2.0" - ;; - #gnome-sharp tarball - art-sharp-*) - add_depend ">=media-libs/libart_lgpl-2.3.20" - ;; - gnome-sharp-*) - add_depend ">=gnome-base/libgnomeui-${PV_MAJOR}" - add_depend "~dev-dotnet/gnomevfs-sharp-${PV}" - add_depend "~dev-dotnet/art-sharp-${PV}" - add_depend ">=gnome-base/libgnomecanvas-${GNOMECANVAS_REQUIRED_VERSION}" - add_depend ">=x11-libs/gtk+-2.14.0:2" - ;; - gconf-sharp-*) - add_depend ">=gnome-base/gconf-${PV_MAJOR}:2" - add_depend "=dev-dotnet/glade-sharp-${GTK_SHARP_REQUIRED_VERSION}*" - add_depend "~dev-dotnet/gnome-sharp-${PV}" - add_depend "~dev-dotnet/art-sharp-${PV}" - ;; - gnomevfs-sharp-*) - add_depend ">=gnome-base/gnome-vfs-${PV_MAJOR}:2" - ;; - #gnome-desktop-sharp tarball - gnome-desktop-sharp-*) - # NOTE: libgnome-desktop-2.so has been known to make binary- - # incompatible changes, requiring .so bumps. gnome-desktop-sharp - # is locked to a specific .so.n version, so strict dependencies - # may be required in the future (as it has in the past). - add_depend ">=gnome-base/gnome-desktop-${PV_MAJOR}:2" - ;; - gnome-panel-sharp-*) - add_depend ">=gnome-base/gnome-panel-${PV_MAJOR}" - ;; - gnome-print-sharp-*) - add_depend "gnome-base/libgnomeprint:2.2" - add_depend "gnome-base/libgnomeprintui:2.2" - ;; - gtkhtml-sharp-*) - #NOTE: gtkhtml dependency must follow gtkhtml-sharp version. - #i.e. gtkhtml-sharp-2.24.0 >=gtkhtml-3.24 - # gtkhtml-sharp-2.16.0 >=gtkhtml-3.16 - # See bug 249540 for unpleasant side effects. - add_depend ">=gnome-extra/gtkhtml-$(($(get_version_component_range 1) + 1 )).$(get_version_component_range 2):3.14" - ;; - gtksourceview-sharp-*) - add_depend ">=x11-libs/gtksourceview-${GTKSOURCEVIEW_REQUIRED_VERSION}:2.0" - ;; - nautilusburn-sharp-*) - add_depend ">=gnome-extra/nautilus-cd-burner-2.24.0" - ;; - rsvg-sharp-*) - add_depend ">=gnome-base/librsvg-${RSVG_REQUIRED_VERSION}:2" - ;; - vte-sharp-*) - add_depend ">=x11-libs/vte-${VTE_REQUIRED_VERSION}:0" - ;; - wnck-sharp-*) - add_depend ">=x11-libs/libwnck-${PV_MAJOR}:1" - ;; -esac - -# @ECLASS-VARIABLE: DESCRIPTION -# @DESCRIPTION: -# Default value: GtkSharp's ${GTK_SHARP_MODULE} module of the ${TARBALL} tarball -DESCRIPTION="GtkSharp's ${GTK_SHARP_MODULE} module of the ${TARBALL} tarball" -# @ECLASS-VARIABLE: HOMEPAGE -# @DESCRIPTION: -# Default value: http://www.mono-project.com/GtkSharp -HOMEPAGE="http://www.mono-project.com/GtkSharp" -# @ECLASS-VARIABLE: LICENSE -# @DESCRIPTION: -# Default value: LGPL-2.1 -LICENSE="LGPL-2.1" - -add_depend ">=dev-lang/mono-2.0.1" -add_bdepend ">=sys-apps/sed-4" -add_bdepend "virtual/pkgconfig" -add_bdepend ">=app-shells/bash-3.1" - -IUSE="debug" -# @ECLASS-VARIABLE: S -# @DESCRIPTION: -# Default value: ${WORKDIR}/${TARBALL}-${PV} -S="${WORKDIR}/${TARBALL}-${PV}" -# @ECLASS-VARIABLE: SRC_URI -# @DESCRIPTION: -# Default value: mirror://gnome/sources/${TARBALL}/${PV_MAJOR}/${TARBALL}-${PV}.tar.bz2 -if [[ ${TARBALL} == "gtk-sharp" ]]; then - SRC_URI="${SRC_URI} - http://download.mono-project.com/sources/gtk-sharp212/${TARBALL}-${PV}.tar.bz2" -else - SRC_URI="${SRC_URI} - mirror://gnome/sources/${TARBALL}/${PV_MAJOR}/${TARBALL}-${PV}.tar.bz2" -fi - -# @FUNCTION: get_sharp_apis -# @USAGE: <type> <pkgconfig-package> -# @RETURN: .NET API files -# @DESCRIPTION: -# Given a valid pkg-config package, will return a list of API xml files. -# <type> can be either --prefixed or --bare. If prefixed, each API file -# will be prefixed with -I: -get_sharp_apis() { - [[ ${#@} -eq 2 ]] || die "${FUNCNAME} needs two arguments" - get_sharp_assemblies "$@" -} - -# @FUNCTION: get_sharp_assemblies -# @USAGE: <type> <pkgconfig-package> -# @RETURN: .NET .dll assemblies -# @DESCRIPTION: -# Given a valid pkg-config package, will return a list of .dll assemblies. -# <type> can be either --prefixed or --bare. If prefixed, each .dll file -# will be prefixed with -r: -get_sharp_assemblies() { - [[ ${#@} -eq 2 ]] || die "${FUNCNAME} needs two arguments" - local string config=libs prefix="-r:" - local -a rvalue - [[ "${FUNCNAME[1]}" = "get_sharp_apis" ]] && config=cflags && prefix="-I:" - for string in $(pkg-config --${config} ${2} 2> /dev/null) - do - rvalue+=( ${string#-?:} ) - done - - case $1 in - --bare) - : - ;; - --prefixed) - for (( i=0 ; i< ${#rvalue[@]} ; i++ )) - do - rvalue[$i]=${prefix}${rvalue[$i]} - done - ;; - *) - die "${FUNCNAME}: Unknown parameter" - ;; - esac - echo "${rvalue[@]}" -} - -# @FUNCTION: phase_hook -# @USAGE: <prefix> -# @DESCRIPTION: -# Looks for functions named <prefix>_caller_suffix and executes them. -# _caller_suffix is the calling function with the prefix -# gtk-sharp-module removed. -phase_hook() { - [[ ${#@} -eq 1 ]] || die "${FUNCNAME} needs one argument" - if [[ "$(type -t ${1}${FUNCNAME[1]#gtk-sharp-module})" = "function" ]] - then - ebegin "Phase-hook: Running ${1}${FUNCNAME[1]#gtk-sharp-module}" - ${1}${FUNCNAME[1]#gtk-sharp-module} - eend 0 - fi -} - -# @FUNCTION: ac_path_prog_override -# @USAGE: <PROG> [path] -# @DESCRIPTION: -# Override AC_PATH_PROG() autoconf macros. Path will be set to " " if -# not specified. -ac_path_prog_override() { - if [[ ${#@} -lt 1 || ${#@} -gt 2 ]] - then - eerror "${FUNCNAME[0]} requires at least one parameter and takes at most two:" - eerror "AC_PATH_PROG(PARAM1, param2)" - die "${FUNCNAME[0]} requires at least one parameter and takes at most two:" - fi - export ac_cv_path_${1}="${2:- }" -} - - -# @FUNCTION: pkg_check_modules_override -# @USAGE: <GROUP> [package1] [package2] -# @DESCRIPTION: -# Will export the appropriate variables to override PKG_CHECK_MODULES autoconf -# macros, with the string " " by default. If packages are specified, they will -# be looked up with pkg-config and the appropriate LIBS and CFLAGS substituted. -# LIBS and CFLAGS can also be specified per-package with the following syntax: -# @CODE -# package=LIBS%CFLAGS -# @CODE -# = and % have no effect unless both are specified. -# Here is an example: -# @CODE -# pkg_check_modules_override GASH "gtk+-2.0=-jule%" gobject-2.0 -# @CODE -# The above example will do: -# export GASH_CFLAGS+=" -jule" -# export GASH_LIBS+=" " -# export GASH_CFLAGS+=" $(pkg-config --cflags gobject-2.0)" -# export GASH_LIBS+=" $(pkg-config --libs gobject-2.0)" -# -# NOTE: If a package is not found, the string " " will be inserted in place of -# <GROUP>_CFLAGS and <GROUP>_LIBS -pkg_check_modules_override() { - local package - local group="${1}" - local packages="${*:2}" - export ${group}_CFLAGS=" " - export ${group}_LIBS=" " - - if [[ ${#@} -lt 1 ]] - then - eerror "${FUNCNAME[0]} requires at least one parameter: GROUP" - eerror "PKG_CHECK_MODULES(GROUP, package1 package2 etc)" - die "${FUNCNAME[0]} requires at least one parameter: GROUP" - fi - - for package in $packages - do - if [[ ${package/=} != ${package} && ${package/\%} != ${package} ]] - then - package_cflag_libs=${package##*=} - export ${group}_CFLAGS+=" ${package_cflag_libs%%\%*}" - export ${group}_LIBS+=" ${package_cflag_libs##*\%}" - else - if pkg-config --exists $package - then - export ${group}_CFLAGS+=" $(pkg-config --cflags $package)" - export ${group}_LIBS+=" $(pkg-config --libs $package)" - else - export ${group}_CFLAGS+=" " - export ${group}_LIBS+=" " - fi - fi - done -} - -# @FUNCTION: gtk-sharp-tarball-post_src_prepare -# @DESCRIPTION: -# Runs a M-m-m-monster sed on GTK_SHARP_MODULE_DIR to convert references to -# local assemblies to the installed ones. Is only called by src_prepare when -# $GTK_SHARP_MODULE is a member of $gtk_sharp_module_list. -gtk-sharp-tarball-post_src_prepare() { - has "${EAPI:-0}" 2 && ! use prefix && EPREFIX= - cd "${S}/${GTK_SHARP_MODULE_DIR}" - sed -i \ - -e "s; \$(srcdir)/../glib/glib-api.xml; $(get_sharp_apis --bare glib-sharp-2.0);" \ - -e "s; ../pango/pango-api.xml; $(get_sharp_apis --bare pango-sharp-2.0);" \ - -e "s; ../atk/atk-api.xml; $(get_sharp_apis --bare atk-sharp-2.0);" \ - -e "s; ../gdk/gdk-api.xml; $(get_sharp_apis --bare gdk-sharp-2.0);" \ - -e "s; ../gtk/gtk-api.xml; $(get_sharp_apis --bare gtk-sharp-2.0);" \ - -e "s; \.\./glib/glib-sharp.dll; $(get_sharp_assemblies --bare glib-sharp-2.0);g" \ - -e "s; \.\./pango/pango-sharp.dll; $(get_sharp_assemblies --bare pango-sharp-2.0);g" \ - -e "s; \.\./atk/atk-sharp.dll; $(get_sharp_assemblies --bare atk-sharp-2.0);g" \ - -e "s; \.\./gdk/gdk-sharp.dll; $(get_sharp_assemblies --bare gdk-sharp-2.0);g" \ - -e "s; \.\./gtk/gtk-sharp.dll; $(get_sharp_assemblies --bare gtk-sharp-2.0);g" \ - -e "s;\$(RUNTIME) \$(top_builddir)/parser/gapi-fixup.exe;${EPREFIX}/usr/bin/gapi2-fixup;" \ - -e "s;\$(RUNTIME) \$(top_builddir)/generator/gapi_codegen.exe;${EPREFIX}/usr/bin/gapi2-codegen;" \ - -e "s:\$(SYMBOLS) \$(top_builddir)/parser/gapi-fixup.exe:\$(SYMBOLS):" \ - -e "s:\$(INCLUDE_API) \$(top_builddir)/generator/gapi_codegen.exe:\$(INCLUDE_API):" \ - $(find . -name Makefile.in) || die "failed to fix ${TARBALL}-tarball makefiles" -} - -# @FUNCTION: gnome-sharp-tarball-post_src_prepare -# @DESCRIPTION: -# Runs a M-m-m-monster sed on GTK_SHARP_MODULE_DIR to convert references to -# local assemblies to the installed ones. Is only called by src_prepare when -# $GTK_SHARP_MODULE is a member of $gnome_sharp_module_list. -gnome-sharp-tarball-post_src_prepare() { - cd "${S}/${GTK_SHARP_MODULE_DIR}" - sed -i \ - -e "s; ../gnomevfs/gnome-vfs-api.xml; $(get_sharp_apis --bare gnome-vfs-sharp-2.0);" \ - -e "s; ../art/art-api.xml; $(get_sharp_apis --bare art-sharp-2.0);" \ - -e "s; \.\./art/art-sharp.dll; $(get_sharp_assemblies --bare art-sharp-2.0);g" \ - -e "s; \.\./gnomevfs/gnome-vfs-sharp.dll; $(get_sharp_assemblies --bare gnome-vfs-sharp-2.0);g" \ - -e "s;/r:\$(top_builddir)/art/art-sharp.dll;$(get_sharp_assemblies --prefixed art-sharp-2.0);" \ - -e "s;/r:\$(top_builddir)/gnome/gnome-sharp.dll;$(get_sharp_assemblies --prefixed gnome-sharp-2.0);" \ - $(find . -name Makefile.in) || die "failed to fix ${TARBALL}-tarball makefiles" -} - -# @FUNCTION: gtk-sharp-module_src_prepare -# @DESCRIPTION: -# Runs autopatch from base.eclass, eautoreconf if EAUTORECONF is set to any -# value. -# Contains a phase_hook, runs very last. -# phase_hook prefix trigger: ${TARBALL}-tarball-post -# Is exported. -gtk-sharp-module_src_prepare() { - base_src_prepare -# @ECLASS-VARIABLE: EAUTORECONF -# @DESCRIPTION: -# If set, EAUTORECONF will be run during src_prepare. - [[ ${EAUTORECONF} ]] && eautoreconf - phase_hook ${TARBALL}-tarball-post - elibtoolize -} - -# @FUNCTION: gtk-sharp-tarball_src_configure -# @DESCRIPTION: -# Sets some environment variables that will allow us to make the dependencies -# for each ebuild be only its own dependencies, without patching configure. -# Is only called by gtk-sharp-module_src_configure when $GTK_SHARP_MODULE -# is a member of $gtk_sharp_module_list. -gtk-sharp-tarball_src_configure() { - pkg_check_modules_override GLIB gobject-2.0 - pkg_check_modules_override GIO gio-2.0 - pkg_check_modules_override PANGO pango - pkg_check_modules_override ATK atk - pkg_check_modules_override GTK gtk+-2.0 - pkg_check_modules_override GLADE libglade-2.0 -} - -# @FUNCTION: gnome-sharp-tarball_src_configure -# @DESCRIPTION: -# Sets some environment variables that will allow us to make the dependencies -# for each ebuild be only its own dependencies. Without patching configure. -# Is only called by gtk-sharp-module_src_configure when $GTK_SHARP_MODULE -# is a member of $gnome_sharp_module_list. -gnome-sharp-tarball_src_configure() { - has "${EAPI:-0}" 2 && ! use prefix && EPREFIX= - pkg_check_modules_override GLADESHARP glade-sharp-2.0 - pkg_check_modules_override GAPI gapi-2.0 - ac_path_prog_override GAPI_PARSER "${EPREFIX}"/usr/bin/gapi2-parser - ac_path_prog_override GAPI_CODEGEN "${EPREFIX}"/usr/bin/gapi2-codegen - ac_path_prog_override GAPI_FIXUP "${EPREFIX}"/usr/bin/gapi2-fixup -} - -# @FUNCTION: gtk-sharp-module_src_configure -# @USAGE: [econf-arguments] -# @DESCRIPTION: -# Calls econf with some default values. -# Contains a phase_hook, run before econf. -# phase_hook prefix trigger: ${TARBALL}-tarball -# Is exported. -gtk-sharp-module_src_configure() { - phase_hook ${TARBALL}-tarball - econf --disable-static \ - --disable-dependency-tracking \ - --disable-maintainer-mode \ - $(use debug &&echo "--enable-debug" ) \ - ${@} || die "econf failed" -} - -# @FUNCTION: gtk-sharp-module_src_compile -# @DESCRIPTION: -# Calls emake in the subdir of the module. -# Sets CSC=/usr/bin/mcs. Deletes top_srcdir Makefiles to prevent recursing in -# case we missed some dll references. -# Is exported. -gtk-sharp-module_src_compile() { - rm -f "${S}"/Makefile* &> /dev/null - cd "${S}/${GTK_SHARP_MODULE_DIR}" - emake CSC=/usr/bin/mcs || die "emake failed" -} - -# @FUNCTION: gtk-sharp-module_src_install -# @DESCRIPTION: -# Installs the module. Fixes up lib paths so they're multilib-safe. -# Gets rid of .la files. -# Is exported. -gtk-sharp-module_src_install() { - cd "${S}/${GTK_SHARP_MODULE_DIR}" - emake DESTDIR="${D}" install || die "emake install failed" - mono_multilib_comply - find "${D}" -type f -name '*.la' -exec rm -rf '{}' '+' || die "la removal failed" - [[ $(find "${D}" -type f|wc -l) -lt 3 ]] && die "Too few files. This smells like a failed install." -} - -EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install diff --git a/eclass/java-vm-2.eclass b/eclass/java-vm-2.eclass index 82cfe4d3e3e7..f6b50cfbd01a 100644 --- a/eclass/java-vm-2.eclass +++ b/eclass/java-vm-2.eclass @@ -4,6 +4,7 @@ # @ECLASS: java-vm-2.eclass # @MAINTAINER: # java@gentoo.org +# @SUPPORTED_EAPIS: 5 6 # @BLURB: Java Virtual Machine eclass # @DESCRIPTION: # This eclass provides functionality which assists with installing diff --git a/eclass/kde5-functions.eclass b/eclass/kde5-functions.eclass index bd3fa08b2576..7631be4de391 100644 --- a/eclass/kde5-functions.eclass +++ b/eclass/kde5-functions.eclass @@ -47,12 +47,6 @@ case ${CATEGORY} in : ${QT_MINIMAL:=5.11.1} fi ;; - kde-apps) - if [[ ${PV} = 17.12.3* ]]; then - : ${FRAMEWORKS_MINIMAL:=5.43.0} - : ${QT_MINIMAL:=5.9.1} - fi - ;; esac # @ECLASS-VARIABLE: QT_MINIMAL @@ -92,17 +86,6 @@ fi debug-print "${ECLASS}: ${KDEBASE} ebuild recognized" -# @ECLASS-VARIABLE: KDE_SCM -# @DESCRIPTION: -# SCM to use if KDE_BUILD_TYPE is determined to be "live". -# Currently, only git is supported. -: ${KDE_SCM:=git} - -case ${KDE_SCM} in - git) ;; - *) die "KDE_SCM: ${KDE_SCM} is not supported" ;; -esac - # @FUNCTION: _check_gcc_version # @INTERNAL # @DESCRIPTION: diff --git a/eclass/kde5.eclass b/eclass/kde5.eclass index 07d6c26a264c..03be801c0605 100644 --- a/eclass/kde5.eclass +++ b/eclass/kde5.eclass @@ -38,9 +38,7 @@ case ${EAPI} in esac if [[ ${KDE_BUILD_TYPE} = live ]]; then - case ${KDE_SCM} in - git) inherit git-r3 ;; - esac + inherit git-r3 fi if [[ -v KDE_GCC_MINIMAL ]]; then @@ -394,40 +392,36 @@ _calculate_live_repo() { SRC_URI="" - case ${KDE_SCM} in - git) - # @ECLASS-VARIABLE: EGIT_MIRROR - # @DESCRIPTION: - # This variable allows easy overriding of default kde mirror service - # (anongit) with anything else you might want to use. - EGIT_MIRROR=${EGIT_MIRROR:=https://anongit.kde.org} - - local _kmname - - # @ECLASS-VARIABLE: EGIT_REPONAME - # @DESCRIPTION: - # This variable allows overriding of default repository - # name. Specify only if this differ from PN and KMNAME. - if [[ -n ${EGIT_REPONAME} ]]; then - # the repository and kmname different - _kmname=${EGIT_REPONAME} - elif [[ -n ${KMNAME} ]]; then - _kmname=${KMNAME} - else - _kmname=${PN} - fi + # @ECLASS-VARIABLE: EGIT_MIRROR + # @DESCRIPTION: + # This variable allows easy overriding of default kde mirror service + # (anongit) with anything else you might want to use. + EGIT_MIRROR=${EGIT_MIRROR:=https://anongit.kde.org} - if [[ ${PV} == ??.??.49.9999 && ${CATEGORY} = kde-apps ]]; then - EGIT_BRANCH="Applications/$(ver_cut 1-2)" - fi + local _kmname - if [[ ${PV} != 9999 && ${CATEGORY} = kde-plasma ]]; then - EGIT_BRANCH="Plasma/$(ver_cut 1-2)" - fi + # @ECLASS-VARIABLE: EGIT_REPONAME + # @DESCRIPTION: + # This variable allows overriding of default repository + # name. Specify only if this differ from PN and KMNAME. + if [[ -n ${EGIT_REPONAME} ]]; then + # the repository and kmname different + _kmname=${EGIT_REPONAME} + elif [[ -n ${KMNAME} ]]; then + _kmname=${KMNAME} + else + _kmname=${PN} + fi - EGIT_REPO_URI="${EGIT_MIRROR}/${_kmname}" - ;; - esac + if [[ ${PV} == ??.??.49.9999 && ${CATEGORY} = kde-apps ]]; then + EGIT_BRANCH="Applications/$(ver_cut 1-2)" + fi + + if [[ ${PV} != 9999 && ${CATEGORY} = kde-plasma ]]; then + EGIT_BRANCH="Plasma/$(ver_cut 1-2)" + fi + + EGIT_REPO_URI="${EGIT_MIRROR}/${_kmname}" } case ${KDE_BUILD_TYPE} in @@ -493,11 +487,7 @@ kde5_src_unpack() { debug-print-function ${FUNCNAME} "$@" if [[ ${KDE_BUILD_TYPE} = live ]]; then - case ${KDE_SCM} in - git) - git-r3_src_unpack - ;; - esac + git-r3_src_unpack else default fi diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass index e1fe9755be47..8e595d581cf6 100644 --- a/eclass/kernel-2.eclass +++ b/eclass/kernel-2.eclass @@ -8,6 +8,7 @@ # John Mylchreest <johnm@gentoo.org> # Mike Pagano <mpagano@gentoo.org> # <so many, many others, please add yourself> +# @SUPPORTED_EAPIS: 2 3 4 5 6 # @BLURB: Eclass for kernel packages # @DESCRIPTION: # This is the kernel.eclass rewrite for a clean base regarding the 2.6 diff --git a/eclass/kodi-addon.eclass b/eclass/kodi-addon.eclass index 01e5d17c547d..8f34ccd92a56 100644 --- a/eclass/kodi-addon.eclass +++ b/eclass/kodi-addon.eclass @@ -4,6 +4,7 @@ # @ECLASS: kodi-addon.eclass # @MAINTAINER: # candrews@gentoo.org +# @SUPPORTED_EAPIS: 4 5 6 # @BLURB: Helper for correct building and (importantly) installing Kodi addon packages. # @DESCRIPTION: # Provides a src_configure function for correct CMake configuration diff --git a/eclass/latex-package.eclass b/eclass/latex-package.eclass index 3402c94cc081..1a684ef00a66 100644 --- a/eclass/latex-package.eclass +++ b/eclass/latex-package.eclass @@ -7,6 +7,7 @@ # @AUTHOR: # Matthew Turk <satai@gentoo.org> # Martin Ehmsen <ehmsen@gentoo.org> +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7 # @BLURB: An eclass for easy installation of LaTeX packages # @DESCRIPTION: # This eClass is designed to be easy to use and implement. The vast majority of diff --git a/eclass/leechcraft.eclass b/eclass/leechcraft.eclass index ce55a941ce10..8e3c69f8c61c 100644 --- a/eclass/leechcraft.eclass +++ b/eclass/leechcraft.eclass @@ -7,6 +7,7 @@ # @AUTHOR: # 0xd34df00d@gmail.com # NightNord@niifaq.ru +# @SUPPORTED_EAPIS: 6 # @BLURB: Common functions and setup utilities for the LeechCraft app # @DESCRIPTION: # The leechcraft eclass contains a common set of functions and steps diff --git a/eclass/libretro-core.eclass b/eclass/libretro-core.eclass new file mode 100644 index 000000000000..6825ef24ddab --- /dev/null +++ b/eclass/libretro-core.eclass @@ -0,0 +1,196 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# @ECLASS: libretro-core.eclass +# @MAINTAINER: +# candrews@gentoo.org +# @AUTHOR: +# Cecil Curry <leycec@gmail.com> +# Craig Andrews <candrews@gentoo.org> +# @SUPPORTED_EAPIS: 6 7 +# @BLURB: Simplify libretro core ebuilds +# @DESCRIPTION: +# The libretro eclass is designed to streamline the construction of +# ebuilds for Libretro core ebuilds. +# +# Libretro cores can be found under https://github.com/libretro/ +# +# They all use the same basic make based build system, are located +# in the same github account, and do not release named or numbered +# versions (so ebuild versions for git commits are keys). +# This eclass covers those commonalities reducing much duplication +# between the ebuilds. +# @EXAMPLE: +# @CODE +# EAPI=7 +# +# LIBRETRO_CORE_NAME="2048" +# LIBRETRO_COMMIT_SHA="45655d3662e4cbcd8afb28e2ee3f5494a75888de" +# KEYWORDS="~amd64 ~x86" +# inherit libretro-core +# +# DESCRIPTION="Port of 2048 puzzle game to the libretro API" +# LICENSE="Unlicense" +# SLOT="0" +# @CODE + +if [[ -z ${_LIBRETRO_CORE_ECLASS} ]]; then +_LIBRETRO_CORE_ECLASS=1 + +IUSE="debug" + +# @ECLASS-VARIABLE: LIBRETRO_CORE_NAME +# @REQUIRED +# @DESCRIPTION: +# Name of this Libretro core. The libretro-core_src_install() phase function +# will install the shared library "${S}/${LIBRETRO_CORE_NAME}_libretro.so" as a +# Libretro core. Defaults to the name of the current package excluding the +# "libretro-" prefix (e.g., "mgba" for the package "libretro-mgba"). +: ${LIBRETRO_CORE_NAME:=${PN#libretro-}} + +# @ECLASS-VARIABLE: LIBRETRO_COMMIT_SHA +# @DESCRIPTION: +# Commit SHA used for SRC_URI will die if not set in <9999 ebuilds. +# Needs to be set before inherit. + +# @ECLASS-VARIABLE: LIBRETRO_REPO_NAME +# @REQUIRED +# @DESCRIPTION: +# Contains the real repo name of the core formatted as "repouser/reponame". +# Needs to be set before inherit. Otherwise defaults to "libretro/${PN}" +: ${LIBRETRO_REPO_NAME:="libretro/libretro-${LIBRETRO_CORE_NAME}"} + +: ${HOMEPAGE:="https://github.com/${LIBRETRO_REPO_NAME}"} + +if [[ ${PV} == *9999 ]]; then + : ${EGIT_REPO_URI:="https://github.com/${LIBRETRO_REPO_NAME}.git"} + inherit git-r3 +else + [[ -z "${LIBRETRO_COMMIT_SHA}" ]] && die "LIBRETRO_COMMIT_SHA must be set before inherit." + S="${WORKDIR}/${LIBRETRO_REPO_NAME##*/}-${LIBRETRO_COMMIT_SHA}" + : ${SRC_URI:="https://github.com/${LIBRETRO_REPO_NAME}/archive/${LIBRETRO_COMMIT_SHA}.tar.gz -> ${P}.tar.gz"} +fi +inherit flag-o-matic + +# @ECLASS-VARIABLE: LIBRETRO_CORE_LIB_FILE +# @REQUIRED +# @DESCRIPTION: +# Absolute path of this Libretro core's shared library. +: ${LIBRETRO_CORE_LIB_FILE:="${S}/${LIBRETRO_CORE_NAME}_libretro.so"} + +case "${EAPI:-0}" in + 6|7) + EXPORT_FUNCTIONS src_unpack src_prepare src_compile src_install + ;; + *) + die "EAPI=${EAPI} is not supported" ;; +esac + +# @FUNCTION: libretro-core_src_unpack +# @DESCRIPTION: +# The libretro-core src_unpack function which is exported. +# +# This function retrieves the remote Libretro core info files. +libretro-core_src_unpack() { + # If this is a live ebuild, retrieve this core's remote repository. + if [[ ${PV} == *9999 ]]; then + git-r3_src_unpack + # Add used commit SHA for version information, the above could also work. + LIBRETRO_COMMIT_SHA=$(git -C "${WORKDIR}/${P}" rev-parse HEAD) + # Else, unpack this core's local tarball. + else + default_src_unpack + fi +} + +# @FUNCTION: libretro-core_src_prepare +# @DESCRIPTION: +# The libretro-core src_prepare function which is exported. +# +# This function prepares the source by making custom modifications. +libretro-core_src_prepare() { + default_src_prepare + # Populate COMMIT for GIT_VERSION + local custom_libretro_commit_sha="\" ${LIBRETRO_COMMIT_SHA:0:7}\"" + local makefile + local flags_modified=0 + local shopt_saved=$(shopt -p nullglob) + shopt -s nullglob + for makefile in "${S}"/[Mm]akefile* "${S}"/target-libretro/[Mm]akefile*; do + # * Convert CRLF to LF + # * Expand *FLAGS to prevent potential self-references + # * Where LDFLAGS directly define the link version + # script append LDFLAGS and LIBS + # * Where SHARED is used to provide shared linking + # flags ensure final link command includes LDFLAGS + # and LIBS + # * Always use $(CFLAGS) when calling $(CC) + # * Add short-rev to Makefile + sed \ + -e 's/\r$//g' \ + -e "/flags.*=/s:-O[[:digit:]]:${CFLAGS}:g" \ + -e "/CFLAGS.*=/s:-O[[:digit:]]:${CFLAGS}:g" \ + -e "/.*,--version-script=.*/s:$: ${LDFLAGS} ${LIBS}:g" \ + -e "/\$(CC)/s:\(\$(SHARED)\):\1 ${LDFLAGS} ${LIBS}:" \ + -e 's:\(\$(CC)\):\1 \$(CFLAGS):g' \ + -e "s/GIT_VERSION\s.=.*$/GIT_VERSION=${custom_libretro_commit_sha}/g" \ + -i "${makefile}" || die "Failed to use custom cflags in ${makefile}" + done + ${shopt_saved} + export OPTFLAGS="${CFLAGS}" +} + +# @VARIABLE: myemakeargs +# @DEFAULT_UNSET +# @DESCRIPTION: +# Optional emake arguments as a bash array. Should be defined before calling +# src_compile. +# @CODE +# src_compile() { +# local myemakeargs=( +# $(usex neon "HAVE_NEON=1" "") +# ) +# libretro-core_src_compile +# } +# @CODE + +# @FUNCTION: libretro-core_src_compile +# @DESCRIPTION: +# The libretro-core src_compile function which is exported. +# +# This function compiles the shared library for this Libretro core. +libretro-core_src_compile() { + # most (if not all) libretro makefiles use DEBUG=1 + # to enable additional debug features. + emake CC=$(tc-getCC) CXX=$(tc-getCXX) \ + $(usex debug "DEBUG=1" "") "${myemakeargs[@]}" \ + $([[ -f makefile.libretro ]] && echo '-f makefile.libretro') \ + $([[ -f Makefile.libretro ]] && echo '-f Makefile.libretro') +} + +# @FUNCTION: libretro-core_src_install +# @DESCRIPTION: +# The libretro-core src_install function which is exported. +# +# This function installs the shared library for this Libretro core. +libretro-core_src_install() { + # Absolute path of the directory containing Libretro shared libraries. + local libretro_lib_dir="/usr/$(get_libdir)/libretro" + # If this core's shared library exists, install that. + if [[ -f "${LIBRETRO_CORE_LIB_FILE}" ]]; then + exeinto "${libretro_lib_dir}" + doexe "${LIBRETRO_CORE_LIB_FILE}" + else + # Basename of this library. + local lib_basename="${LIBRETRO_CORE_LIB_FILE##*/}" + + # Absolute path to which this library was installed. + local lib_file_target="${ED}${libretro_lib_dir}/${lib_basename}" + + # If this library was *NOT* installed, fail. + [[ -f "${lib_file_target}" ]] || + die "Libretro core shared library \"${lib_file_target}\" not installed." + fi +} + +fi # end _LIBRETRO_CORE_ECLASS guard diff --git a/eclass/llvm.eclass b/eclass/llvm.eclass index 56ebd7ed7b8d..71e6c7cfb1be 100644 --- a/eclass/llvm.eclass +++ b/eclass/llvm.eclass @@ -6,6 +6,7 @@ # Michał Górny <mgorny@gentoo.org> # @AUTHOR: # Michał Górny <mgorny@gentoo.org> +# @SUPPORTED_EAPIS: 6 # @BLURB: Utility functions to build against slotted LLVM # @DESCRIPTION: # The llvm.eclass provides utility functions that can be used to build diff --git a/eclass/ltprune.eclass b/eclass/ltprune.eclass index a8bb4c842bc0..c0fa391bdff2 100644 --- a/eclass/ltprune.eclass +++ b/eclass/ltprune.eclass @@ -4,6 +4,7 @@ # @ECLASS: ltprune.eclass # @MAINTAINER: # Michał Górny <mgorny@gentoo.org> +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 # @BLURB: Smart .la file pruning # @DESCRIPTION: # A function to locate and remove unnecessary .la files. diff --git a/eclass/mate-desktop.org.eclass b/eclass/mate-desktop.org.eclass index 8d03bcec3572..418f3f8ce076 100644 --- a/eclass/mate-desktop.org.eclass +++ b/eclass/mate-desktop.org.eclass @@ -6,6 +6,7 @@ # mate@gentoo.org # @AUTHOR: # Authors: NP-Hardass <NP-Hardass@gentoo.org> based upon the gnome.org eclass. +# @SUPPORTED_EAPIS: 6 # @BLURB: Helper eclass for mate-desktop.org hosted archives # @DESCRIPTION: # Provide a default SRC_URI and EGIT_REPO_URI for MATE packages as well as diff --git a/eclass/mate.eclass b/eclass/mate.eclass index 7bdca60fb8a1..db511aedb1f1 100644 --- a/eclass/mate.eclass +++ b/eclass/mate.eclass @@ -7,6 +7,7 @@ # @AUTHOR: # Authors: NP-Hardass <NP-Hardass@gentoo.org> based upon the gnome2 # and autotools-utils eclasses +# @SUPPORTED_EAPIS: 6 # @BLURB: Provides phases for MATE based packages. # @DESCRIPTION: # Exports portage base functions used by ebuilds written for packages using the diff --git a/eclass/meson.eclass b/eclass/meson.eclass index 45aee91f1a9b..ebc2c02ca8ec 100644 --- a/eclass/meson.eclass +++ b/eclass/meson.eclass @@ -5,6 +5,7 @@ # @MAINTAINER: # William Hubbs <williamh@gentoo.org> # Mike Gilbert <floppym@gentoo.org> +# @SUPPORTED_EAPIS: 6 # @BLURB: common ebuild functions for meson-based packages # @DESCRIPTION: # This eclass contains the default phase functions for packages which diff --git a/eclass/mozconfig-v6.45.eclass b/eclass/mozconfig-v6.45.eclass index 8409b11f0b96..65d5878fb203 100644 --- a/eclass/mozconfig-v6.45.eclass +++ b/eclass/mozconfig-v6.45.eclass @@ -4,6 +4,7 @@ # @ECLASS: mozconfig-v6.45.eclass # @MAINTAINER: # mozilla team <mozilla@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: the new mozilla common configuration eclass for FF33 and newer, v6 # @DESCRIPTION: # This eclass is used in mozilla ebuilds (firefox, thunderbird, seamonkey) diff --git a/eclass/mozconfig-v6.52.eclass b/eclass/mozconfig-v6.52.eclass index 04042b9a982d..646232c86a59 100644 --- a/eclass/mozconfig-v6.52.eclass +++ b/eclass/mozconfig-v6.52.eclass @@ -4,6 +4,7 @@ # @ECLASS: mozconfig-v6.52.eclass # @MAINTAINER: # mozilla team <mozilla@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: the new mozilla common configuration eclass for FF33 and newer, v6 # @DESCRIPTION: # This eclass is used in mozilla ebuilds (firefox, thunderbird, seamonkey) diff --git a/eclass/mozconfig-v6.58.eclass b/eclass/mozconfig-v6.58.eclass index c0a337e6b119..a27e40438e18 100644 --- a/eclass/mozconfig-v6.58.eclass +++ b/eclass/mozconfig-v6.58.eclass @@ -4,6 +4,7 @@ # @ECLASS: mozconfig-v6.58.eclass # @MAINTAINER: # mozilla team <mozilla@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: the new mozilla common configuration eclass for FF33 and newer, v6 # @DESCRIPTION: # This eclass is used in mozilla ebuilds (firefox, thunderbird, seamonkey) diff --git a/eclass/mozconfig-v6.60.eclass b/eclass/mozconfig-v6.60.eclass index ac0652a82301..cadc3dba81c1 100644 --- a/eclass/mozconfig-v6.60.eclass +++ b/eclass/mozconfig-v6.60.eclass @@ -4,6 +4,7 @@ # @ECLASS: mozconfig-v6.58.eclass # @MAINTAINER: # mozilla team <mozilla@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: the new mozilla common configuration eclass for FF33 and newer, v6 # @DESCRIPTION: # This eclass is used in mozilla ebuilds (firefox, thunderbird, seamonkey) diff --git a/eclass/mozcoreconf-v6.eclass b/eclass/mozcoreconf-v6.eclass index 64e0e3d66d33..403740c12410 100644 --- a/eclass/mozcoreconf-v6.eclass +++ b/eclass/mozcoreconf-v6.eclass @@ -142,11 +142,13 @@ mozconfig_init() { seamonkey) # Must create the initial mozconfig to enable application : >.mozconfig || die "initial mozconfig creation failed" - mozconfig_annotate "" --enable-application=suite ;; + # NOTE--this is not compatible with mozilla prior to v60 + mozconfig_annotate "" --enable-application=comm/suite ;; *thunderbird) # Must create the initial mozconfig to enable application : >.mozconfig || die "initial mozconfig creation failed" - mozconfig_annotate "" --enable-application=mail ;; + # NOTE--this is not compatible with mozilla prior to v60 + mozconfig_annotate "" --enable-application=comm/mail ;; esac #################################### diff --git a/eclass/mozlinguas-v2.eclass b/eclass/mozlinguas-v2.eclass index 8f94b0020b13..77f1d0a439cf 100644 --- a/eclass/mozlinguas-v2.eclass +++ b/eclass/mozlinguas-v2.eclass @@ -7,6 +7,7 @@ # @AUTHOR: # Nirbheek Chauhan <nirbheek@gentoo.org> # Ian Stakenvicius <axs@gentoo.org> +# @SUPPORTED_EAPIS: 2 3 4 5 6 # @BLURB: Handle language packs for mozilla products # @DESCRIPTION: # Sets IUSE according to MOZ_LANGS (language packs available). Also exports diff --git a/eclass/multibuild.eclass b/eclass/multibuild.eclass index 9574e3debadb..169c0fa00843 100644 --- a/eclass/multibuild.eclass +++ b/eclass/multibuild.eclass @@ -6,6 +6,7 @@ # Michał Górny <mgorny@gentoo.org> # @AUTHOR: # Author: Michał Górny <mgorny@gentoo.org> +# @SUPPORTED_EAPIS: 4 5 6 7 # @BLURB: A generic eclass for building multiple variants of packages. # @DESCRIPTION: # The multibuild eclass aims to provide a generic framework for building diff --git a/eclass/multilib-build.eclass b/eclass/multilib-build.eclass index 261f0f4a170b..05917ba70d60 100644 --- a/eclass/multilib-build.eclass +++ b/eclass/multilib-build.eclass @@ -6,6 +6,7 @@ # gx86-multilib team <multilib@gentoo.org> # @AUTHOR: # Author: Michał Górny <mgorny@gentoo.org> +# @SUPPORTED_EAPIS: 4 5 6 7 # @BLURB: flags and utility functions for building multilib packages # @DESCRIPTION: # The multilib-build.eclass exports USE flags and utility functions diff --git a/eclass/multilib-minimal.eclass b/eclass/multilib-minimal.eclass index ae40eeb25895..136ee3b741d9 100644 --- a/eclass/multilib-minimal.eclass +++ b/eclass/multilib-minimal.eclass @@ -4,6 +4,7 @@ # @ECLASS: multilib-minimal.eclass # @MAINTAINER: # Multilib team <multilib@gentoo.org> +# @SUPPORTED_EAPIS: 4 5 6 7 # @BLURB: wrapper for multilib builds providing convenient multilib_src_* functions # @DESCRIPTION: # diff --git a/eclass/mysql-multilib-r1.eclass b/eclass/mysql-multilib-r1.eclass index 458e80981174..8dbdca48b9d4 100644 --- a/eclass/mysql-multilib-r1.eclass +++ b/eclass/mysql-multilib-r1.eclass @@ -8,6 +8,7 @@ # - Robin H. Johnson <robbat2@gentoo.org> # - Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> # - Brian Evans <grknight@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 # @BLURB: This eclass provides common functions for mysql ebuilds # @DESCRIPTION: # The mysql-multilib-r1.eclass is the base eclass to build the mysql and diff --git a/eclass/mysql-v2.eclass b/eclass/mysql-v2.eclass index a0305989c78d..c6caacc8ce13 100644 --- a/eclass/mysql-v2.eclass +++ b/eclass/mysql-v2.eclass @@ -8,6 +8,7 @@ # - Robin H. Johnson <robbat2@gentoo.org> # - Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> # - Brian Evans <grknight@gentoo.org> +# @SUPPORTED_EAPIS: 4 5 # @BLURB: This eclass provides most of the functions for mysql ebuilds # @DESCRIPTION: # The mysql-v2.eclass is the base eclass to build the mysql and diff --git a/eclass/netsurf.eclass b/eclass/netsurf.eclass index 58c6662a0492..7eda3264939a 100644 --- a/eclass/netsurf.eclass +++ b/eclass/netsurf.eclass @@ -4,6 +4,7 @@ # @ECLASS: netsurf.eclass # @MAINTAINER: # Michael Weber <xmw@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: Handle buildsystem of www.netsurf-browser.org components # @DESCRIPTION: # Handle unpacking and usage of separate buildsystem tarball and manage diff --git a/eclass/ninja-utils.eclass b/eclass/ninja-utils.eclass index 0a390ed89612..ca8d67191dc4 100644 --- a/eclass/ninja-utils.eclass +++ b/eclass/ninja-utils.eclass @@ -8,6 +8,7 @@ # @AUTHOR: # Michał Górny <mgorny@gentoo.org> # Mike Gilbert <floppym@gentoo.org> +# @SUPPORTED_EAPIS: 2 4 5 6 7 # @BLURB: common bits to run dev-util/ninja builder # @DESCRIPTION: # This eclass provides a single function -- eninja -- that can be used diff --git a/eclass/oasis.eclass b/eclass/oasis.eclass index ff97e8fe8b62..53db4b777271 100644 --- a/eclass/oasis.eclass +++ b/eclass/oasis.eclass @@ -6,6 +6,7 @@ # ml@gentoo.org # @AUTHOR: # Original Author: Alexis Ballier <aballier@gentoo.org> +# @SUPPORTED_EAPIS: 3 4 5 6 7 # @BLURB: Provides common ebuild phases for oasis-based packages. # @DESCRIPTION: # Provides common ebuild phases for oasis-based packages. diff --git a/eclass/obs-service.eclass b/eclass/obs-service.eclass index 3240cc019a2f..faa879c0636e 100644 --- a/eclass/obs-service.eclass +++ b/eclass/obs-service.eclass @@ -4,6 +4,7 @@ # @ECLASS: obs-service.eclass # @MAINTAINER: # maintainer-needed@gentoo.org +# @SUPPORTED_EAPIS: 4 5 # @BLURB: Reduces code duplication in the Open Build Service services. # @DESCRIPTION: # This eclass makes it easier to package Open Build Service services. Based on diff --git a/eclass/office-ext-r1.eclass b/eclass/office-ext-r1.eclass index 1ff864656b69..3c95b0c9c1e1 100644 --- a/eclass/office-ext-r1.eclass +++ b/eclass/office-ext-r1.eclass @@ -6,6 +6,7 @@ # The office team <openoffice@gentoo.org> # @AUTHOR: # Tomáš Chvátal <scarabeus@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 # @BLURB: Eclass for installing libreoffice/openoffice extensions # @DESCRIPTION: # Eclass for easing maintenance of libreoffice/openoffice extensions. diff --git a/eclass/opam.eclass b/eclass/opam.eclass index 76b2fcbfd53f..5c9c4950dd26 100644 --- a/eclass/opam.eclass +++ b/eclass/opam.eclass @@ -6,6 +6,7 @@ # Gentoo ML Project <ml@gentoo.org> # @AUTHOR: # Alexis Ballier <aballier@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: Provides functions for installing opam packages. # @DESCRIPTION: # Provides dependencies on opam and ocaml, opam-install and a default diff --git a/eclass/out-of-source.eclass b/eclass/out-of-source.eclass index 951a20adaca4..bbac555a7f88 100644 --- a/eclass/out-of-source.eclass +++ b/eclass/out-of-source.eclass @@ -4,6 +4,7 @@ # @ECLASS: out-of-source.eclass # @MAINTAINER: # Michał Górny <mgorny@gentoo.org> +# @SUPPORTED_EAPIS: 6 7 # @BLURB: convenient wrapper to build autotools packages out-of-source # @DESCRIPTION: # This eclass provides a minimalistic wrapper interface to easily diff --git a/eclass/perl-app.eclass b/eclass/perl-app.eclass index 4519627d769c..6b762dd83b3d 100644 --- a/eclass/perl-app.eclass +++ b/eclass/perl-app.eclass @@ -3,6 +3,7 @@ # Author: Michael Cummings <mcummings@gentoo.org> # Maintained by the Perl herd <perl@gentoo.org> +# @SUPPORTED_EAPIS: 5 # If the ebuild doesn't override this, ensure we do not depend on the perl subslot value : ${GENTOO_DEPEND_ON_PERL_SUBSLOT:="no"} diff --git a/eclass/perl-functions.eclass b/eclass/perl-functions.eclass index 96e9a59e8904..e7775f31b8e0 100644 --- a/eclass/perl-functions.eclass +++ b/eclass/perl-functions.eclass @@ -8,6 +8,7 @@ # Seemant Kulleen <seemant@gentoo.org> # Andreas K. Huettel <dilfridge@gentoo.org> # Kent Fredric <kentnl@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 # @BLURB: helper functions eclass for perl modules # @DESCRIPTION: # The perl-functions eclass is designed to allow easier installation of perl diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass index f97b3265fcc1..2a3932b538b8 100644 --- a/eclass/perl-module.eclass +++ b/eclass/perl-module.eclass @@ -7,6 +7,7 @@ # @AUTHOR: # Seemant Kulleen <seemant@gentoo.org> # Andreas K. Hüttel <dilfridge@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 # @BLURB: eclass for installing Perl module distributions # @DESCRIPTION: # The perl-module eclass is designed to allow easier installation of Perl diff --git a/eclass/php-ext-source-r2.eclass b/eclass/php-ext-source-r2.eclass index 36d27fb921b2..931297da598d 100644 --- a/eclass/php-ext-source-r2.eclass +++ b/eclass/php-ext-source-r2.eclass @@ -10,6 +10,7 @@ # Author: Luca Longinotti <chtekk@gentoo.org> # Author: Jakub Moc <jakub@gentoo.org> (documentation) # Author: Ole Markus With <olemarkus@gentoo.org> +# @SUPPORTED_EAPIS: 4 5 # @BLURB: A unified interface for compiling and installing standalone PHP extensions. # @DESCRIPTION: # This eclass provides a unified interface for compiling and installing standalone diff --git a/eclass/php-ext-source-r3.eclass b/eclass/php-ext-source-r3.eclass index 0563d5af7652..66d32d5c5ebd 100644 --- a/eclass/php-ext-source-r3.eclass +++ b/eclass/php-ext-source-r3.eclass @@ -4,6 +4,7 @@ # @ECLASS: php-ext-source-r3.eclass # @MAINTAINER: # Gentoo PHP team <php-bugs@gentoo.org> +# @SUPPORTED_EAPIS: 6 # @BLURB: Compile and install standalone PHP extensions. # @DESCRIPTION: # A unified interface for compiling and installing standalone PHP diff --git a/eclass/php-pear-r2.eclass b/eclass/php-pear-r2.eclass index 11bb07388349..2a4508d6e709 100644 --- a/eclass/php-pear-r2.eclass +++ b/eclass/php-pear-r2.eclass @@ -6,6 +6,7 @@ # Gentoo PHP Team <php-bugs@gentoo.org> # @AUTHOR: # Author: Brian Evans <grknight@gentoo.org> +# @SUPPORTED_EAPIS: 6 # @BLURB: Provides means for an easy installation of PEAR packages. # @DESCRIPTION: # This eclass provides means for an easy installation of PEAR packages. diff --git a/eclass/postgres-multi.eclass b/eclass/postgres-multi.eclass index 39f0837a8686..48ef79dc2925 100644 --- a/eclass/postgres-multi.eclass +++ b/eclass/postgres-multi.eclass @@ -9,6 +9,7 @@ EXPORT_FUNCTIONS pkg_setup src_prepare src_compile src_install src_test # @MAINTAINER: # PostgreSQL <pgsql-bugs@gentoo.org> # @AUTHOR: Aaron W. Swenson <titanofold@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 # @BLURB: An eclass to build PostgreSQL-related packages against multiple slots # @DESCRIPTION: # postgres-multi enables ebuilds, particularly PostgreSQL extensions, to diff --git a/eclass/postgres.eclass b/eclass/postgres.eclass index 221b53dea4d7..b76604b1af24 100644 --- a/eclass/postgres.eclass +++ b/eclass/postgres.eclass @@ -8,6 +8,7 @@ EXPORT_FUNCTIONS pkg_setup # @MAINTAINER: # PostgreSQL <pgsql-bugs@gentoo.org> # @AUTHOR: Aaron W. Swenson <titanofold@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 # @BLURB: An eclass for PostgreSQL-related packages # @DESCRIPTION: # This eclass provides common utility functions that many diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass index 6f23109cf8d7..7a91507a600f 100644 --- a/eclass/python-any-r1.eclass +++ b/eclass/python-any-r1.eclass @@ -7,6 +7,7 @@ # @AUTHOR: # Author: Michał Górny <mgorny@gentoo.org> # Based on work of: Krzysztof Pawlik <nelchael@gentoo.org> +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7 # @BLURB: An eclass for packages having build-time dependency on Python. # @DESCRIPTION: # A minimal eclass for packages which need any Python interpreter diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass index 097a965272d8..b06413170ae5 100644 --- a/eclass/python-r1.eclass +++ b/eclass/python-r1.eclass @@ -7,6 +7,7 @@ # @AUTHOR: # Author: Michał Górny <mgorny@gentoo.org> # Based on work of: Krzysztof Pawlik <nelchael@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: A common, simple eclass for Python packages. # @DESCRIPTION: # A common eclass providing helper functions to build and install diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass index 8c45c391ebb0..8ac17b7815e2 100644 --- a/eclass/python-single-r1.eclass +++ b/eclass/python-single-r1.eclass @@ -7,6 +7,7 @@ # @AUTHOR: # Author: Michał Górny <mgorny@gentoo.org> # Based on work of: Krzysztof Pawlik <nelchael@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: An eclass for Python packages not installed for multiple implementations. # @DESCRIPTION: # An extension of the python-r1 eclass suite for packages which diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 0a4744cf959a..e3cf82b4b58f 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -7,6 +7,7 @@ # @AUTHOR: # Author: Michał Górny <mgorny@gentoo.org> # Based on work of: Krzysztof Pawlik <nelchael@gentoo.org> +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7 # @BLURB: Utility functions for packages with Python parts. # @DESCRIPTION: # A utility eclass providing functions to query Python implementations, diff --git a/eclass/readme.gentoo-r1.eclass b/eclass/readme.gentoo-r1.eclass index 78cbead639d3..dfa3b52b6765 100644 --- a/eclass/readme.gentoo-r1.eclass +++ b/eclass/readme.gentoo-r1.eclass @@ -6,6 +6,7 @@ # Pacho Ramos <pacho@gentoo.org> # @AUTHOR: # Author: Pacho Ramos <pacho@gentoo.org> +# @SUPPORTED_EAPIS: 4 5 6 7 # @BLURB: install a doc file shown via elog messages # @DESCRIPTION: # An eclass for installing a README.gentoo doc file recording tips diff --git a/eclass/readme.gentoo.eclass b/eclass/readme.gentoo.eclass index 0d8949805cf9..cedd0580a3d6 100644 --- a/eclass/readme.gentoo.eclass +++ b/eclass/readme.gentoo.eclass @@ -6,6 +6,7 @@ # Pacho Ramos <pacho@gentoo.org> # @AUTHOR: # Author: Pacho Ramos <pacho@gentoo.org> +# @SUPPORTED_EAPIS: 4 5 # @BLURB: install a doc file shown via elog messages # @DESCRIPTION: # An eclass for installing a README.gentoo doc file recording tips diff --git a/eclass/rebar.eclass b/eclass/rebar.eclass index 3620153f8c31..f2a620fd8979 100644 --- a/eclass/rebar.eclass +++ b/eclass/rebar.eclass @@ -6,6 +6,7 @@ # Amadeusz Żołnowski <aidecoe@gentoo.org> # @AUTHOR: # Amadeusz Żołnowski <aidecoe@gentoo.org> +# @SUPPORTED_EAPIS: 6 # @BLURB: Build Erlang/OTP projects using dev-util/rebar. # @DESCRIPTION: # An eclass providing functions to build Erlang/OTP projects using diff --git a/eclass/ros-catkin.eclass b/eclass/ros-catkin.eclass index 17745d72ecaf..667ecd4583f7 100644 --- a/eclass/ros-catkin.eclass +++ b/eclass/ros-catkin.eclass @@ -6,6 +6,7 @@ # ros@gentoo.org # @AUTHOR: # Alexis Ballier <aballier@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: Template eclass for catkin based ROS packages. # @DESCRIPTION: # Provides function for building ROS packages on Gentoo. diff --git a/eclass/ruby-fakegem.eclass b/eclass/ruby-fakegem.eclass index b66d57d2d573..ecbf6403e43d 100644 --- a/eclass/ruby-fakegem.eclass +++ b/eclass/ruby-fakegem.eclass @@ -7,6 +7,7 @@ # @AUTHOR: # Author: Diego E. Pettenò <flameeyes@gentoo.org> # Author: Alex Legler <a3li@gentoo.org> +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 # @BLURB: An eclass for installing Ruby packages to behave like RubyGems. # @DESCRIPTION: # This eclass allows to install arbitrary Ruby libraries (including Gems), diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass index 8a3ce33c0dc8..d0be6a2d4f23 100644 --- a/eclass/ruby-ng-gnome2.eclass +++ b/eclass/ruby-ng-gnome2.eclass @@ -6,6 +6,7 @@ # Ruby herd <ruby@gentoo.org> # @AUTHOR: # Author: Hans de Graaff <graaff@gentoo.org> +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 # @BLURB: An eclass to simplify handling of various ruby-gnome2 parts. # @DESCRIPTION: # This eclass simplifies installation of the various pieces of diff --git a/eclass/ruby-ng.eclass b/eclass/ruby-ng.eclass index 22dafb31423a..f036d476069f 100644 --- a/eclass/ruby-ng.eclass +++ b/eclass/ruby-ng.eclass @@ -8,6 +8,7 @@ # Author: Diego E. Pettenò <flameeyes@gentoo.org> # Author: Alex Legler <a3li@gentoo.org> # Author: Hans de Graaff <graaff@gentoo.org> +# @SUPPORTED_EAPIS: 2 3 4 5 6 # @BLURB: An eclass for installing Ruby packages with proper support for multiple Ruby slots. # @DESCRIPTION: # The Ruby eclass is designed to allow an easier installation of Ruby packages diff --git a/eclass/ruby-single.eclass b/eclass/ruby-single.eclass index c2c893903277..4ca5f5ef207b 100644 --- a/eclass/ruby-single.eclass +++ b/eclass/ruby-single.eclass @@ -7,6 +7,7 @@ # @AUTHOR: # Author: Hans de Graaff <graaff@gentoo.org> # Based on python-single-r1 by: Michał Górny <mgorny@gentoo.org> +# @SUPPORTED_EAPIS: 4 5 6 7 # @BLURB: An eclass for Ruby packages not installed for multiple implementations. # @DESCRIPTION: # An eclass for packages which don't support being installed for diff --git a/eclass/s6.eclass b/eclass/s6.eclass index 095a039343fe..32521515497d 100644 --- a/eclass/s6.eclass +++ b/eclass/s6.eclass @@ -4,6 +4,7 @@ # @ECLASS: s6.eclass # @MAINTAINER: # William Hubbs <williamh@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 # @BLURB: helper functions to install s6 services # @DESCRIPTION: # This eclass provides helpers to install s6 services. diff --git a/eclass/scons-utils.eclass b/eclass/scons-utils.eclass index 615e00e314ad..35cf4e322188 100644 --- a/eclass/scons-utils.eclass +++ b/eclass/scons-utils.eclass @@ -4,6 +4,7 @@ # @ECLASS: scons-utils.eclass # @MAINTAINER: # mgorny@gentoo.org +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7 # @BLURB: helper functions to deal with SCons buildsystem # @DESCRIPTION: # This eclass provides a set of function to help developers sanely call diff --git a/eclass/selinux-policy-2.eclass b/eclass/selinux-policy-2.eclass index 784e304a962d..c985f0908f18 100644 --- a/eclass/selinux-policy-2.eclass +++ b/eclass/selinux-policy-2.eclass @@ -7,6 +7,7 @@ # @ECLASS: selinux-policy-2.eclass # @MAINTAINER: # selinux@gentoo.org +# @SUPPORTED_EAPIS: 5 6 # @BLURB: This eclass supports the deployment of the various SELinux modules in sec-policy # @DESCRIPTION: # The selinux-policy-2.eclass supports deployment of the various SELinux modules diff --git a/eclass/ssl-cert.eclass b/eclass/ssl-cert.eclass index bfe5291314c0..b5b4250ef226 100644 --- a/eclass/ssl-cert.eclass +++ b/eclass/ssl-cert.eclass @@ -5,6 +5,7 @@ # @MAINTAINER: # @AUTHOR: # Max Kalika <max@gentoo.org> +# @SUPPORTED_EAPIS: 1 2 3 4 5 6 # @BLURB: Eclass for SSL certificates # @DESCRIPTION: # This eclass implements a standard installation procedure for installing diff --git a/eclass/subversion.eclass b/eclass/subversion.eclass index 8f13cd2fe197..d9f9daf7eb6e 100644 --- a/eclass/subversion.eclass +++ b/eclass/subversion.eclass @@ -6,6 +6,7 @@ # Akinori Hattori <hattya@gentoo.org> # @AUTHOR: # Original Author: Akinori Hattori <hattya@gentoo.org> +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 # @BLURB: The subversion eclass is written to fetch software sources from subversion repositories # @DESCRIPTION: # The subversion eclass provides functions to fetch, patch and bootstrap diff --git a/eclass/systemd.eclass b/eclass/systemd.eclass index a870624014b1..9a5abfeac900 100644 --- a/eclass/systemd.eclass +++ b/eclass/systemd.eclass @@ -4,6 +4,7 @@ # @ECLASS: systemd.eclass # @MAINTAINER: # systemd@gentoo.org +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7 # @BLURB: helper functions to install systemd units # @DESCRIPTION: # This eclass provides a set of functions to install unit files for diff --git a/eclass/tests/eutils_path_exists.sh b/eclass/tests/eutils_path_exists.sh deleted file mode 100755 index 00a89c7e446d..000000000000 --- a/eclass/tests/eutils_path_exists.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -source tests-common.sh - -inherit eutils - -test-path_exists() { - local exp=$1; shift - tbegin "path_exists($*) == ${exp}" - path_exists "$@" - [[ ${exp} -eq $? ]] - tend $? -} - -test-path_exists 1 -test-path_exists 1 -a -test-path_exists 1 -o - -good="/ . tests-common.sh /bin/bash" -test-path_exists 0 ${good} -test-path_exists 0 -a ${good} -test-path_exists 0 -o ${good} - -bad="/asjdkfljasdlfkja jlakjdsflkasjdflkasdjflkasdjflaskdjf" -test-path_exists 1 ${bad} -test-path_exists 1 -a ${bad} -test-path_exists 1 -o ${bad} - -test-path_exists 1 ${good} ${bad} -test-path_exists 1 -a ${good} ${bad} -test-path_exists 0 -o ${good} ${bad} - -texit diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass index e5259d95a645..4b357897f12a 100644 --- a/eclass/texlive-common.eclass +++ b/eclass/texlive-common.eclass @@ -6,6 +6,7 @@ # tex@gentoo.org # @AUTHOR: # Original Author: Alexis Ballier <aballier@gentoo.org> +# @SUPPORTED_EAPIS: 3 4 5 6 7 # @BLURB: Provide various functions used by both texlive-core and texlive modules # @DESCRIPTION: # Purpose: Provide various functions used by both texlive-core and texlive diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass index 882811774779..2b9fac4da173 100644 --- a/eclass/texlive-module.eclass +++ b/eclass/texlive-module.eclass @@ -6,6 +6,7 @@ # tex@gentoo.org # @AUTHOR: # Original Author: Alexis Ballier <aballier@gentoo.org> +# @SUPPORTED_EAPIS: 3 4 5 6 7 # @BLURB: Provide generic install functions so that modular texlive's texmf ebuild will only have to inherit this eclass # @DESCRIPTION: # Purpose: Provide generic install functions so that modular texlive's texmf ebuilds will diff --git a/eclass/tmpfiles.eclass b/eclass/tmpfiles.eclass index 2a6e7ce8866a..a1f155e63a4d 100644 --- a/eclass/tmpfiles.eclass +++ b/eclass/tmpfiles.eclass @@ -8,6 +8,7 @@ # @AUTHOR: # Mike Gilbert <floppym@gentoo.org> # William Hubbs <williamh@gentoo.org> +# @SUPPORTED_EAPIS: 5 6 # @BLURB: Functions related to tmpfiles.d files # @DESCRIPTION: # This eclass provides functionality related to installing and diff --git a/eclass/toolchain-autoconf.eclass b/eclass/toolchain-autoconf.eclass index 18276f0b49c5..cd991ec795ac 100644 --- a/eclass/toolchain-autoconf.eclass +++ b/eclass/toolchain-autoconf.eclass @@ -4,6 +4,7 @@ # @ECLASS: toolchain-autoconf.eclass # @MAINTAINER: # <base-system@gentoo.org> +# @SUPPORTED_EAPIS: 6 # @BLURB: Common code for sys-devel/autoconf ebuilds # @DESCRIPTION: # This eclass contains the common phase functions migrated from diff --git a/eclass/toolchain-binutils.eclass b/eclass/toolchain-binutils.eclass index 552bba37c312..d15afb8531e7 100644 --- a/eclass/toolchain-binutils.eclass +++ b/eclass/toolchain-binutils.eclass @@ -2,6 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # # Maintainer: Toolchain Ninjas <toolchain@gentoo.org> +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 # # We install binutils into CTARGET-VERSION specific directories. This lets # us easily merge multiple versions for multiple targets (if we wish) and diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass index cea8949b45d7..3fa32820151c 100644 --- a/eclass/toolchain-funcs.eclass +++ b/eclass/toolchain-funcs.eclass @@ -167,6 +167,17 @@ tc-getBUILD_OBJCOPY() { tc-getBUILD_PROG OBJCOPY objcopy "$@"; } # @RETURN: name of the pkg-config tool for building binaries to run on the build machine tc-getBUILD_PKG_CONFIG() { tc-getBUILD_PROG PKG_CONFIG pkg-config "$@"; } +# @FUNCTION: tc-getTARGET_CPP +# @USAGE: [toolchain prefix] +# @RETURN: name of the C preprocessor for the toolchain being built (or used) +tc-getTARGET_CPP() { + if [[ -n ${CTARGET} ]]; then + _tc-getPROG CTARGET TARGET_CPP "gcc -E" "$@" + else + tc-getCPP "$@" + fi +} + # @FUNCTION: tc-export # @USAGE: <list of toolchain variables> # @DESCRIPTION: @@ -185,6 +196,86 @@ tc-is-cross-compiler() { [[ ${CBUILD:-${CHOST}} != ${CHOST} ]] } +# @FUNCTION: tc-cpp-is-true +# @USAGE: <condition> [cpp flags] +# @RETURN: Shell true if the condition is true, shell false otherwise. +# @DESCRIPTION: +# Evaluate the given condition using the C preprocessor for CTARGET, if +# defined, or CHOST. Additional arguments are passed through to the cpp +# command. A typical condition would be in the form defined(__FOO__). +tc-cpp-is-true() { + local CONDITION=${1} + shift + + local RESULT=$($(tc-getTARGET_CPP) "${@}" -P - <<-EOF 2>/dev/null + #if ${CONDITION} + true + #endif + EOF + ) + + [[ ${RESULT} == true ]] +} + +# @FUNCTION: tc-detect-is-softfloat +# @RETURN: +# Shell true if (positive or negative) detection was possible, shell +# false otherwise. Also outputs a string when detection succeeds, see +# tc-is-softfloat for the possible values. +# @DESCRIPTION: +# Detect whether the CTARGET (or CHOST) toolchain is a softfloat based +# one by examining the toolchain's output, if possible. +tc-detect-is-softfloat() { + # If fetching CPP falls back to the default (gcc -E) then fail + # detection as this may not be the correct toolchain. + [[ $(tc-getTARGET_CPP) == "gcc -E" ]] && return 1 + + case ${CTARGET:-${CHOST}} in + # arm-unknown-linux-gnueabi is ambiguous. We used to treat it as + # hardfloat but we now treat it as softfloat like most everyone + # else. Check existing toolchains to respect existing systems. + arm*) + if tc-cpp-is-true "defined(__ARM_PCS_VFP)"; then + echo "no" + else + # Confusingly __SOFTFP__ is defined only when + # -mfloat-abi is soft, not softfp. + if tc-cpp-is-true "defined(__SOFTFP__)"; then + echo "yes" + else + echo "softfp" + fi + fi + + return 0 ;; + *) + return 1 ;; + esac +} + +# @FUNCTION: tc-tuple-is-softfloat +# @RETURN: See tc-is-softfloat for the possible values. +# @DESCRIPTION: +# Determine whether the CTARGET (or CHOST) toolchain is a softfloat +# based one solely from the tuple. +tc-tuple-is-softfloat() { + local CTARGET=${CTARGET:-${CHOST}} + case ${CTARGET//_/-} in + bfin*|h8300*) + echo "only" ;; + *-softfloat-*) + echo "yes" ;; + *-softfp-*) + echo "softfp" ;; + arm*-hardfloat-*|arm*eabihf) + echo "no" ;; + arm*) + echo "yes" ;; + *) + echo "no" ;; + esac +} + # @FUNCTION: tc-is-softfloat # @DESCRIPTION: # See if this toolchain is a softfloat based one. @@ -199,20 +290,7 @@ tc-is-cross-compiler() { # softfloat flags in the case where support is optional, but # rejects softfloat flags where the target always lacks an fpu. tc-is-softfloat() { - local CTARGET=${CTARGET:-${CHOST}} - case ${CTARGET} in - bfin*|h8300*) - echo "only" ;; - *) - if [[ ${CTARGET//_/-} == *-softfloat-* ]] ; then - echo "yes" - elif [[ ${CTARGET//_/-} == *-softfp-* ]] ; then - echo "softfp" - else - echo "no" - fi - ;; - esac + tc-detect-is-softfloat || tc-tuple-is-softfloat } # @FUNCTION: tc-is-static-only @@ -826,13 +904,7 @@ gcc-specs-stack-check() { # Return truth if the current compiler generates position-independent code (PIC) # which can be linked into executables. tc-enables-pie() { - local ret="$($(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P - <<-EOF 2> /dev/null | grep '^true$' - #if defined(__PIE__) - true - #endif - EOF - )" - [[ ${ret} == true ]] + tc-cpp-is-true "defined(__PIE__)" ${CPPFLAGS} ${CFLAGS} } # @FUNCTION: tc-enables-ssp @@ -844,13 +916,7 @@ tc-enables-pie() { # -fstack-protector-strong # -fstack-protector-all tc-enables-ssp() { - local ret="$($(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P - <<-EOF 2> /dev/null | grep '^true$' - #if defined(__SSP__) || defined(__SSP_STRONG__) || defined(__SSP_ALL__) - true - #endif - EOF - )" - [[ ${ret} == true ]] + tc-cpp-is-true "defined(__SSP__) || defined(__SSP_STRONG__) || defined(__SSP_ALL__)" ${CPPFLAGS} ${CFLAGS} } # @FUNCTION: tc-enables-ssp-strong @@ -861,13 +927,7 @@ tc-enables-ssp() { # -fstack-protector-strong # -fstack-protector-all tc-enables-ssp-strong() { - local ret="$($(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P - <<-EOF 2> /dev/null | grep '^true$' - #if defined(__SSP_STRONG__) || defined(__SSP_ALL__) - true - #endif - EOF - )" - [[ ${ret} == true ]] + tc-cpp-is-true "defined(__SSP_STRONG__) || defined(__SSP_ALL__)" ${CPPFLAGS} ${CFLAGS} } # @FUNCTION: tc-enables-ssp-all @@ -877,13 +937,7 @@ tc-enables-ssp-strong() { # on level corresponding to any of the following options: # -fstack-protector-all tc-enables-ssp-all() { - local ret="$($(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P - <<-EOF 2> /dev/null | grep '^true$' - #if defined(__SSP_ALL__) - true - #endif - EOF - )" - [[ ${ret} == true ]] + tc-cpp-is-true "defined(__SSP_ALL__)" ${CPPFLAGS} ${CFLAGS} } diff --git a/eclass/toolchain-glibc.eclass b/eclass/toolchain-glibc.eclass index 5f0e0cfd5cd5..13d99ee1d942 100644 --- a/eclass/toolchain-glibc.eclass +++ b/eclass/toolchain-glibc.eclass @@ -4,6 +4,7 @@ # @ECLASS: toolchain-glibc.eclass # @MAINTAINER: # <toolchain@gentoo.org> +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 # @BLURB: Common code for sys-libs/glibc ebuilds # @DESCRIPTION: # This eclass contains the common phase functions migrated from diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 0fb518a0c2ea..6e859993397c 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -2,6 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # Maintainer: Toolchain Ninjas <toolchain@gentoo.org> +# @SUPPORTED_EAPIS: 5 DESCRIPTION="The GNU Compiler Collection" HOMEPAGE="https://gcc.gnu.org/" diff --git a/eclass/twisted-r1.eclass b/eclass/twisted-r1.eclass index 644a1528bf44..7f0f796ec960 100644 --- a/eclass/twisted-r1.eclass +++ b/eclass/twisted-r1.eclass @@ -7,6 +7,7 @@ # @AUTHOR: # Author: Michał Górny <mgorny@gentoo.org> # Author: Jan Matejka <yac@gentoo.org> +# @SUPPORTED_EAPIS: 4 5 # @BLURB: Eclass for Twisted packages # @DESCRIPTION: # The twisted eclass defines phase functions for Twisted packages. diff --git a/eclass/udev.eclass b/eclass/udev.eclass index 63120c14cda6..4f23c9ebbdf8 100644 --- a/eclass/udev.eclass +++ b/eclass/udev.eclass @@ -4,6 +4,7 @@ # @ECLASS: udev.eclass # @MAINTAINER: # udev-bugs@gentoo.org +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 # @BLURB: Default eclass for determining udev directories. # @DESCRIPTION: # Default eclass for determining udev directories. diff --git a/eclass/vala.eclass b/eclass/vala.eclass index f8a45cdebed6..11fd875d5d99 100644 --- a/eclass/vala.eclass +++ b/eclass/vala.eclass @@ -6,6 +6,7 @@ # gnome@gentoo.org # @AUTHOR: # Alexandre Rostovtsev <tetromino@gentoo.org> +# @SUPPORTED_EAPIS: 1 2 3 4 5 6 7 # @BLURB: Sets up the environment for using a specific version of vala. # @DESCRIPTION: # This eclass sets up commonly used environment variables for using a specific diff --git a/eclass/vcs-snapshot.eclass b/eclass/vcs-snapshot.eclass index 243d4a8a3185..316a37773d43 100644 --- a/eclass/vcs-snapshot.eclass +++ b/eclass/vcs-snapshot.eclass @@ -4,6 +4,7 @@ # @ECLASS: vcs-snapshot.eclass # @MAINTAINER: # mgorny@gentoo.org +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 # @BLURB: support eclass for unpacking VCS snapshot tarballs # @DESCRIPTION: # This eclass provides a convenience src_unpack() which does unpack all diff --git a/eclass/vdr-plugin-2.eclass b/eclass/vdr-plugin-2.eclass index cb822f23e719..ec754ceb710b 100644 --- a/eclass/vdr-plugin-2.eclass +++ b/eclass/vdr-plugin-2.eclass @@ -9,6 +9,7 @@ # Joerg Bornkessel <hd_brummy@gentoo.org> # Christian Ruppert <idl0r@gentoo.org> # (undisclosed contributors) +# @SUPPORTED_EAPIS: 4 5 6 # @BLURB: common vdr plugin ebuild functions # @DESCRIPTION: # Eclass for easing maintenance of vdr plugin ebuilds @@ -53,19 +54,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 +79,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 +87,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 +148,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 +176,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 +214,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 +240,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 +294,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 +317,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 +395,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 +535,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 +550,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="" diff --git a/eclass/versionator.eclass b/eclass/versionator.eclass index bf3f6a2a77b6..0f5d5770350b 100644 --- a/eclass/versionator.eclass +++ b/eclass/versionator.eclass @@ -5,6 +5,7 @@ # @MAINTAINER: # Jonathan Callen <jcallen@gentoo.org> # base-system@gentoo.org +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 # @BLURB: functions which simplify manipulation of ${PV} and similar version strings # @DESCRIPTION: # This eclass provides functions which simplify manipulating $PV and similar diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass index cd0447a518c0..fb6a867a35cc 100644 --- a/eclass/virtualx.eclass +++ b/eclass/virtualx.eclass @@ -6,6 +6,7 @@ # x11@gentoo.org # @AUTHOR: # Original author: Martin Schlemmer <azarah@gentoo.org> +# @SUPPORTED_EAPIS: 4 5 6 7 # @BLURB: This eclass can be used for packages that needs a working X environment to build. if [[ ! ${_VIRTUAL_X} ]]; then diff --git a/eclass/waf-utils.eclass b/eclass/waf-utils.eclass index 7acc97b10314..d3e52fc463dd 100644 --- a/eclass/waf-utils.eclass +++ b/eclass/waf-utils.eclass @@ -8,6 +8,7 @@ # Original Author: Gilles Dartiguelongue <eva@gentoo.org> # Various improvements based on cmake-utils.eclass: Tomáš Chvátal <scarabeus@gentoo.org> # Proper prefix support: Jonathan Callen <jcallen@gentoo.org> +# @SUPPORTED_EAPIS: 4 5 6 # @BLURB: common ebuild functions for waf-based packages # @DESCRIPTION: # The waf-utils eclass contains functions that make creating ebuild for diff --git a/eclass/wxwidgets.eclass b/eclass/wxwidgets.eclass index 63e8e22e64c0..0cbf49590402 100644 --- a/eclass/wxwidgets.eclass +++ b/eclass/wxwidgets.eclass @@ -4,6 +4,7 @@ # @ECLASS: wxwidgets.eclass # @MAINTAINER: # wxwidgets@gentoo.org +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 # @BLURB: Manages build configuration for wxGTK-using packages. # @DESCRIPTION: # This eclass sets up the proper environment for ebuilds using the wxGTK diff --git a/eclass/xdg-utils.eclass b/eclass/xdg-utils.eclass index ac075185d8e4..2c2d2324c2b7 100644 --- a/eclass/xdg-utils.eclass +++ b/eclass/xdg-utils.eclass @@ -6,6 +6,7 @@ # gnome@gentoo.org # @AUTHOR: # Original author: Gilles Dartiguelongue <eva@gentoo.org> +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 # @BLURB: Auxiliary functions commonly used by XDG compliant packages. # @DESCRIPTION: # This eclass provides a set of auxiliary functions needed by most XDG diff --git a/eclass/xdg.eclass b/eclass/xdg.eclass index fd4816b8447d..9ee771223dc0 100644 --- a/eclass/xdg.eclass +++ b/eclass/xdg.eclass @@ -6,6 +6,7 @@ # freedesktop-bugs@gentoo.org # @AUTHOR: # Original author: Gilles Dartiguelongue <eva@gentoo.org> +# @SUPPORTED_EAPIS: 4 5 6 # @BLURB: Provides phases for XDG compliant packages. # @DESCRIPTION: # Utility eclass to update the desktop and shared mime info as laid diff --git a/eclass/xfconf.eclass b/eclass/xfconf.eclass index 496c42d5cf13..e0942565f6de 100644 --- a/eclass/xfconf.eclass +++ b/eclass/xfconf.eclass @@ -4,6 +4,7 @@ # @ECLASS: xfconf.eclass # @MAINTAINER: # XFCE maintainers <xfce@gentoo.org> +# @SUPPORTED_EAPIS: 5 # @BLURB: Default XFCE ebuild layout # @DESCRIPTION: # Default XFCE ebuild layout diff --git a/eclass/xorg-2.eclass b/eclass/xorg-2.eclass index 75167988eedd..4ed65e676a01 100644 --- a/eclass/xorg-2.eclass +++ b/eclass/xorg-2.eclass @@ -7,6 +7,7 @@ # @AUTHOR: # Author: Tomáš Chvátal <scarabeus@gentoo.org> # Author: Donnie Berkholz <dberkholz@gentoo.org> +# @SUPPORTED_EAPIS: 3 4 5 # @BLURB: Reduces code duplication in the modularized X11 ebuilds. # @DESCRIPTION: # This eclass makes trivial X ebuilds possible for apps, fonts, drivers, |