summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-12-14 13:26:14 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-12-14 13:26:14 +0000
commit6abbf81ef2f298e3221ff5e67a1f3c5f23958212 (patch)
tree25413d1cb3a0cbfe36029db32398c0f333609215 /eclass
parent9c417bacd51da6d8b57fa9f37425161d30d4b95b (diff)
gentoo resync : 14.12.2020
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin36960 -> 37109 bytes
-rw-r--r--eclass/alternatives.eclass4
-rw-r--r--eclass/autotools.eclass13
-rw-r--r--eclass/db-use.eclass36
-rw-r--r--eclass/distutils-r1.eclass157
-rw-r--r--eclass/docs.eclass336
-rw-r--r--eclass/dotnet.eclass5
-rw-r--r--eclass/ecm.eclass25
-rw-r--r--eclass/gnome2-utils.eclass123
-rw-r--r--eclass/gnome2.eclass96
-rw-r--r--eclass/kde.org.eclass9
11 files changed, 634 insertions, 170 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index 1222fc788312..a0b4de4a65c6 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/alternatives.eclass b/eclass/alternatives.eclass
index fd99bd85acdb..6ee984458fd6 100644
--- a/eclass/alternatives.eclass
+++ b/eclass/alternatives.eclass
@@ -1,7 +1,9 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: alternatives.eclass
+# @MAINTAINER:
+# maintainer-needed@gentoo.org
# @AUTHOR:
# Original author: Alastair Tse <liquidx@gentoo.org> (03 Oct 2003)
# @BLURB: Creates symlink to the latest version of multiple slotted packages.
diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
index 625abd0e9d12..d7ce23bfdf35 100644
--- a/eclass/autotools.eclass
+++ b/eclass/autotools.eclass
@@ -357,6 +357,19 @@ eautoconf() {
eqawarn "when it finds this file. See https://bugs.gentoo.org/426262 for details."
fi
+ # Install config.guess and config.sub which are required by many macros
+ # in Autoconf >=2.70.
+ local gnuconfig
+ case ${EAPI:-0} in
+ 0|1|2|3|4|5|6)
+ gnuconfig="${EPREFIX}/usr/share/gnuconfig"
+ ;;
+ *)
+ gnuconfig="${BROOT}/usr/share/gnuconfig"
+ ;;
+ esac
+ cp "${gnuconfig}"/config.{guess,sub} . || die
+
autotools_run_tool --at-m4flags autoconf "$@"
}
diff --git a/eclass/db-use.eclass b/eclass/db-use.eclass
index 83ae94799ca7..de257a9ae23b 100644
--- a/eclass/db-use.eclass
+++ b/eclass/db-use.eclass
@@ -1,8 +1,15 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-# This is a common location for functions that aid the use of sys-libs/db
-#
-# Bugs: maintainer-needed@gentoo.org
+
+# @ECLASS: db-use.eclass
+# @MAINTAINER:
+# maintainer-needed@gentoo.org
+# @AUTHOR:
+# Paul de Vrieze <pauldv@gentoo.org>
+# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
+# @BLURB: functions that aid the use of sys-libs/db
+# @DESCRIPTION:
+# functions that aid in the use of sys-libs/db
# multilib is used for get_libname in all EAPI
case "${EAPI:-0}" in
@@ -10,7 +17,10 @@ case "${EAPI:-0}" in
*) inherit multilib ;;
esac
-#Convert a version to a db slot
+# @FUNCTION: db_ver_to_slot
+# @USAGE: <version>
+# @DESCRIPTION:
+# Convert a version to a db slot
db_ver_to_slot() {
if [ $# -ne 1 ]; then
eerror "Function db_ver_to_slot needs one argument" >&2
@@ -28,7 +38,10 @@ db_ver_to_slot() {
echo -n "$1"
}
-#Find the version that correspond to the given atom
+# @FUNCTION: db_findver
+# @USAGE: <atom>
+# @DESCRIPTION:
+# Find the version that corresponds to the given atom
db_findver() {
has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
if [ $# -ne 1 ]; then
@@ -52,6 +65,9 @@ db_findver() {
fi
}
+# @FUNCTION: db_includedir
+# @USAGE: <version>
+# @DESCRIPTION:
# Get the include dir for berkeley db.
# This function has two modes. Without any arguments it will give the best
# version available. With arguments that form the versions of db packages
@@ -71,7 +87,7 @@ db_includedir() {
return 1
fi
else
- #arguments given
+ # arguments given
for x in $@
do
if VER=$(db_findver "=sys-libs/db-${x}*") &&
@@ -85,7 +101,9 @@ db_includedir() {
fi
}
-
+# @FUNCTION: db_libname
+# @USAGE: <version>
+# @DESCRIPTION:
# Get the library name for berkeley db. Something like "db-4.2" will be the
# outcome. This function has two modes. Without any arguments it will give
# the best version available. With arguments that form the versions of db
@@ -103,7 +121,7 @@ db_libname() {
return 1
fi
else
- #arguments given
+ # arguments given
for x in $@
do
if VER=$(db_findver "=sys-libs/db-${x}*"); then
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 25cb67b78a31..33c66c4872e5 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -378,7 +378,7 @@ distutils_enable_sphinx() {
}
# @FUNCTION: distutils_enable_tests
-# @USAGE: <test-runner>
+# @USAGE: [--install] <test-runner>
# @DESCRIPTION:
# Set up IUSE, RESTRICT, BDEPEND and python_test() for running tests
# with the specified test runner. Also copies the current value
@@ -389,6 +389,10 @@ distutils_enable_sphinx() {
# - setup.py: setup.py test (no deps included)
# - unittest: for built-in Python unittest module
#
+# Additionally, if --install is passed as the first parameter,
+# 'distutils_install_for_testing --via-root' is called before running
+# the test suite.
+#
# This function is meant as a helper for common use cases, and it only
# takes care of basic setup. You still need to list additional test
# dependencies manually. If you have uncommon use case, you should
@@ -398,33 +402,71 @@ distutils_enable_sphinx() {
# declared. Take care not to overwrite the variables set by it.
distutils_enable_tests() {
debug-print-function ${FUNCNAME} "${@}"
- [[ ${#} -eq 1 ]] || die "${FUNCNAME} takes exactly one argument: test-runner"
+ local do_install=
+ case ${1} in
+ --install)
+ do_install=1
+ shift
+ ;;
+ esac
+
+ [[ ${#} -eq 1 ]] || die "${FUNCNAME} takes exactly one argument: test-runner"
local test_pkg
case ${1} in
nose)
test_pkg=">=dev-python/nose-1.3.7-r4"
- python_test() {
- nosetests -v || die "Tests fail with ${EPYTHON}"
- }
+ if [[ ${do_install} ]]; then
+ python_test() {
+ distutils_install_for_testing --via-root
+ nosetests -v || die "Tests fail with ${EPYTHON}"
+ }
+ else
+ python_test() {
+ nosetests -v || die "Tests fail with ${EPYTHON}"
+ }
+ fi
;;
pytest)
test_pkg=">=dev-python/pytest-4.5.0"
- python_test() {
- pytest -vv || die "Tests fail with ${EPYTHON}"
- }
+ if [[ ${do_install} ]]; then
+ python_test() {
+ distutils_install_for_testing --via-root
+ pytest -vv || die "Tests fail with ${EPYTHON}"
+ }
+ else
+ python_test() {
+ pytest -vv || die "Tests fail with ${EPYTHON}"
+ }
+ fi
;;
setup.py)
- python_test() {
- nonfatal esetup.py test --verbose ||
- die "Tests fail with ${EPYTHON}"
- }
+ if [[ ${do_install} ]]; then
+ python_test() {
+ distutils_install_for_testing --via-root
+ nonfatal esetup.py test --verbose ||
+ die "Tests fail with ${EPYTHON}"
+ }
+ else
+ python_test() {
+ nonfatal esetup.py test --verbose ||
+ die "Tests fail with ${EPYTHON}"
+ }
+ fi
;;
unittest)
- python_test() {
- "${EPYTHON}" -m unittest discover -v ||
- die "Tests fail with ${EPYTHON}"
- }
+ if [[ ${do_install} ]]; then
+ python_test() {
+ distutils_install_for_testing --via-root
+ "${EPYTHON}" -m unittest discover -v ||
+ die "Tests fail with ${EPYTHON}"
+ }
+ else
+ python_test() {
+ "${EPYTHON}" -m unittest discover -v ||
+ die "Tests fail with ${EPYTHON}"
+ }
+ fi
;;
*)
die "${FUNCNAME}: unsupported argument: ${1}"
@@ -492,7 +534,7 @@ esetup.py() {
}
# @FUNCTION: distutils_install_for_testing
-# @USAGE: [<args>...]
+# @USAGE: [--via-root|--via-home] [<args>...]
# @DESCRIPTION:
# Install the package into a temporary location for running tests.
# Update PYTHONPATH appropriately and set TEST_DIR to the test
@@ -503,11 +545,19 @@ esetup.py() {
# namespaces (and therefore proper install needs to be done to enforce
# PYTHONPATH) or tests rely on the results of install command.
# For most of the packages, tests built in BUILD_DIR are good enough.
+#
+# The function supports two install modes. The current default is
+# the legacy --via-home mode. However, it has problems with newer
+# versions of setuptools (50.3.0+). The --via-root mode generally
+# works for these packages, and it will probably become the default
+# in the future, once we test all affected packages. Please note
+# that proper testing sometimes requires unmerging the package first.
distutils_install_for_testing() {
debug-print-function ${FUNCNAME} "${@}"
# A few notes:
- # 1) because of namespaces, we can't use 'install --root',
+ # 1) because of namespaces, we can't use 'install --root'
+ # (NB: this is probably no longer true with py3),
# 2) 'install --home' is terribly broken on pypy, so we need
# to override --install-lib and --install-scripts,
# 3) non-root 'install' complains about PYTHONPATH and missing dirs,
@@ -522,14 +572,39 @@ distutils_install_for_testing() {
PATH=${bindir}:${PATH}
PYTHONPATH=${libdir}:${PYTHONPATH}
- local add_args=(
- install
- --home="${TEST_DIR}"
- --install-lib="${libdir}"
- --install-scripts="${bindir}"
- )
+ local install_method=home
+ case ${1} in
+ --via-home)
+ install_method=home
+ shift
+ ;;
+ --via-root)
+ install_method=root
+ shift
+ ;;
+ esac
+
+ local -a add_args
+ case ${install_method} in
+ home)
+ add_args=(
+ install
+ --home="${TEST_DIR}"
+ --install-lib="${libdir}"
+ --install-scripts="${bindir}"
+ )
+ mkdir -p "${libdir}" || die
+ ;;
+ root)
+ add_args=(
+ install
+ --root="${TEST_DIR}"
+ --install-lib=lib
+ --install-scripts=scripts
+ )
+ ;;
+ esac
- mkdir -p "${libdir}" || die
esetup.py "${add_args[@]}" "${@}"
}
@@ -1118,34 +1193,66 @@ distutils-r1_src_install() {
# -- distutils.eclass functions --
+# @FUNCTION: distutils_get_intermediate_installation_image
+# @INTERNAL
+# @DESCRIPTION:
+# Die and warn when function from previous distutils is called
distutils_get_intermediate_installation_image() {
die "${FUNCNAME}() is invalid for distutils-r1"
}
+# @FUNCTION: distutils_src_unpack
+# @INTERNAL
+# @DESCRIPTION:
+# Die and warn when function from previous distutils is called
distutils_src_unpack() {
die "${FUNCNAME}() is invalid for distutils-r1, and you don't want it in EAPI ${EAPI} anyway"
}
+# @FUNCTION: distutils_src_prepare
+# @INTERNAL
+# @DESCRIPTION:
+# Die and warn when function from previous distutils is called
distutils_src_prepare() {
die "${FUNCNAME}() is invalid for distutils-r1, you probably want: ${FUNCNAME/_/-r1_}"
}
+# @FUNCTION: distutils_src_compile
+# @INTERNAL
+# @DESCRIPTION:
+# Die and warn when function from previous distutils is called
distutils_src_compile() {
die "${FUNCNAME}() is invalid for distutils-r1, you probably want: ${FUNCNAME/_/-r1_}"
}
+# @FUNCTION: distutils_src_test
+# @INTERNAL
+# @DESCRIPTION:
+# Die and warn when function from previous distutils is called
distutils_src_test() {
die "${FUNCNAME}() is invalid for distutils-r1, you probably want: ${FUNCNAME/_/-r1_}"
}
+# @FUNCTION: distutils_src_install
+# @INTERNAL
+# @DESCRIPTION:
+# Die and warn when function from previous distutils is called
distutils_src_install() {
die "${FUNCNAME}() is invalid for distutils-r1, you probably want: ${FUNCNAME/_/-r1_}"
}
+# @FUNCTION: distutils_pkg_postinst
+# @INTERNAL
+# @DESCRIPTION:
+# Die and warn when function from previous distutils is called
distutils_pkg_postinst() {
die "${FUNCNAME}() is invalid for distutils-r1, and pkg_postinst is unnecessary"
}
+# @FUNCTION: distutils_pkg_postrm
+# @INTERNAL
+# @DESCRIPTION:
+# Die and warn when function from previous distutils is called
distutils_pkg_postrm() {
die "${FUNCNAME}() is invalid for distutils-r1, and pkg_postrm is unnecessary"
}
diff --git a/eclass/docs.eclass b/eclass/docs.eclass
new file mode 100644
index 000000000000..adacae4abda6
--- /dev/null
+++ b/eclass/docs.eclass
@@ -0,0 +1,336 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: docs.eclass
+# @MAINTAINER:
+# Andrew Ammerlaan <andrewammerlaan@riseup.net>
+# @AUTHOR:
+# Author: Andrew Ammerlaan <andrewammerlaan@riseup.net>
+# Based on the work of: Michał Górny <mgorny@gentoo.org>
+# @SUPPORTED_EAPIS: 6 7
+# @BLURB: A simple eclass to build documentation.
+# @DESCRIPTION:
+# A simple eclass providing functions to build documentation.
+#
+# Please note that docs sets RDEPEND and DEPEND unconditionally
+# for you.
+#
+# This eclass also appends "doc" to IUSE, and sets HTML_DOCS
+# to the location of the compiled documentation
+#
+# The aim of this eclass is to make it easy to add additional
+# doc builders. To do this, add a <DOCS_BUILDER>-deps and
+# <DOCS_BUILDER>-build function for your doc builder.
+# For python based doc builders you can use the
+# python_append_deps function to append [${PYTHON_USEDEP}]
+# automatically to additional dependencies.
+
+case "${EAPI:-0}" in
+ 0|1|2|3|4|5)
+ die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
+ ;;
+ 6|7)
+ ;;
+ *)
+ die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
+ ;;
+esac
+
+# @ECLASS-VARIABLE: DOCS_BUILDER
+# @REQUIRED
+# @PRE_INHERIT
+# @DESCRIPTION:
+# Sets the doc builder to use, currently supports
+# sphinx, mkdocs and doxygen.
+# PYTHON_COMPAT should be set for python based
+# doc builders: sphinx and mkdocs
+
+# @ECLASS-VARIABLE: DOCS_DIR
+# @DESCRIPTION:
+# Path containing the doc builder config file(s).
+#
+# For sphinx this is the location of "conf.py"
+# For mkdocs this is the location of "mkdocs.yml"
+#
+# Note that mkdocs.yml often does not reside
+# in the same directory as the actual doc files
+#
+# Defaults to ${S}
+
+# @ECLASS-VARIABLE: DOCS_DEPEND
+# @DEFAULT_UNSET
+# @PRE_INHERIT
+# @DESCRIPTION:
+# Sets additional dependencies to build docs.
+# For sphinx and mkdocs these dependencies should
+# be specified without [${PYTHON_USEDEP}], this
+# is added by the eclass. E.g. to depend on mkdocs-material:
+#
+# DOCS_DEPEND="dev-python/mkdocs-material"
+#
+# This eclass appends to this variable, so you can
+# call it later in your ebuild again if necessary.
+
+# @ECLASS-VARIABLE: DOCS_AUTODOC
+# @PRE_INHERIT
+# @DESCRIPTION:
+# Sets whether to use sphinx.ext.autodoc/mkautodoc
+# Defaults to 1 (True) for sphinx, and 0 (False) for mkdocs
+
+# @ECLASS-VARIABLE: DOCS_OUTDIR
+# @DESCRIPTION:
+# Sets where the compiled files will be put.
+# There's no real reason to change this, but this
+# variable is useful if you want to overwrite the HTML_DOCS
+# added by this eclass. E.g.:
+#
+# HTML_DOCS=( "${yourdocs}" "${DOCS_OUTDIR}/." )
+#
+# Defaults to ${S}/_build/html
+
+# @ECLASS-VARIABLE: DOCS_CONFIG_NAME
+# @DESCRIPTION:
+# Name of the doc builder config file.
+#
+# Only relevant for doxygen, as it allows
+# config files with non-standard names
+#
+# Defaults to Doxyfile for doxygen
+
+if [[ ! ${_DOCS} ]]; then
+
+# For the python based DOCS_BUILDERS we need to inherit python-any-r1
+case ${DOCS_BUILDER} in
+ "sphinx"|"mkdocs")
+ # We need the python_gen_any_dep function
+ if [[ ! ${_PYTHON_R1} && ! ${_PYTHON_ANY_R1} ]]; then
+ die "python-r1 or python-any-r1 needs to be inherited as well to use python based documentation builders"
+ fi
+ ;;
+ "doxygen")
+ # do not need to inherit anything for doxygen
+ ;;
+ "")
+ die "DOCS_BUILDER unset, should be set to use ${ECLASS}"
+ ;;
+ *)
+ die "Unsupported DOCS_BUILDER=${DOCS_BUILDER} (unknown) for ${ECLASS}"
+ ;;
+esac
+
+# @FUNCTION: python_append_dep
+# @DESCRIPTION:
+# Appends [\${PYTHON_USEDEP}] to all dependencies
+# for python based DOCS_BUILDERs such as mkdocs or
+# sphinx.
+python_append_deps() {
+ debug-print-function ${FUNCNAME}
+
+ local temp
+ local dep
+ for dep in ${DOCS_DEPEND[@]}; do
+ temp+=" ${dep}[\${PYTHON_USEDEP}]"
+ done
+ DOCS_DEPEND=${temp}
+}
+
+# @FUNCTION: sphinx_deps
+# @DESCRIPTION:
+# Sets dependencies for sphinx
+sphinx_deps() {
+ debug-print-function ${FUNCNAME}
+
+ : ${DOCS_AUTODOC:=1}
+
+ if [[ ${DOCS_AUTODOC} == 0 ]]; then
+ if [[ -n "${DOCS_DEPEND}" ]]; then
+ die "${FUNCNAME}: do not set DOCS_AUTODOC to 0 if external plugins are used"
+ else
+ DOCS_DEPEND="$(python_gen_any_dep "
+ dev-python/sphinx[\${PYTHON_USEDEP}]")"
+ fi
+ elif [[ ${DOCS_AUTODOC} == 1 ]]; then
+ DOCS_DEPEND="$(python_gen_any_dep "
+ dev-python/sphinx[\${PYTHON_USEDEP}]
+ ${DOCS_DEPEND}")"
+ else
+ die "${FUNCNAME}: DOCS_AUTODOC should be set to 0 or 1"
+ fi
+}
+
+# @FUNCTION: sphinx_compile
+# @DESCRIPTION:
+# Calls sphinx to build docs.
+#
+# If you overwrite src_compile or python_compile_all
+# do not call this function, call docs_compile instead
+sphinx_compile() {
+ debug-print-function ${FUNCNAME}
+ use doc || return
+
+ local confpy=${DOCS_DIR}/conf.py
+ [[ -f ${confpy} ]] ||
+ die "${FUNCNAME}: ${confpy} not found, DOCS_DIR=${DOCS_DIR} call wrong"
+
+ if [[ ${DOCS_AUTODOC} == 0 ]]; then
+ if grep -F -q 'sphinx.ext.autodoc' "${confpy}"; then
+ die "${FUNCNAME}: autodoc disabled but sphinx.ext.autodoc found in ${confpy}"
+ fi
+ elif [[ ${DOCS_AUTODOC} == 1 ]]; then
+ if ! grep -F -q 'sphinx.ext.autodoc' "${confpy}"; then
+ die "${FUNCNAME}: sphinx.ext.autodoc not found in ${confpy}, set DOCS_AUTODOC=0"
+ fi
+ fi
+
+ sed -i -e 's:^intersphinx_mapping:disabled_&:' \
+ "${DOCS_DIR}"/conf.py || die
+ # not all packages include the Makefile in pypi tarball
+ sphinx-build -b html -d "${DOCS_OUTDIR}"/_build/doctrees "${DOCS_DIR}" \
+ "${DOCS_OUTDIR}" || die "${FUNCNAME}: sphinx-build failed"
+}
+
+# @FUNCTION: mkdocs_deps
+# @DESCRIPTION:
+# Sets dependencies for mkdocs
+mkdocs_deps() {
+ debug-print-function ${FUNCNAME}
+
+ : ${DOCS_AUTODOC:=0}
+
+ if [[ ${DOCS_AUTODOC} == 1 ]]; then
+ DOCS_DEPEND="$(python_gen_any_dep "
+ dev-python/mkdocs[\${PYTHON_USEDEP}]
+ dev-python/mkautodoc[\${PYTHON_USEDEP}]
+ ${DOCS_DEPEND}")"
+ elif [[ ${DOCS_AUTODOC} == 0 ]]; then
+ DOCS_DEPEND="$(python_gen_any_dep "
+ dev-python/mkdocs[\${PYTHON_USEDEP}]
+ ${DOCS_DEPEND}")"
+ else
+ die "${FUNCNAME}: DOCS_AUTODOC should be set to 0 or 1"
+ fi
+}
+
+# @FUNCTION: mkdocs_compile
+# @DESCRIPTION:
+# Calls mkdocs to build docs.
+#
+# If you overwrite src_compile or python_compile_all
+# do not call this function, call docs_compile instead
+mkdocs_compile() {
+ debug-print-function ${FUNCNAME}
+ use doc || return
+
+ local mkdocsyml=${DOCS_DIR}/mkdocs.yml
+ [[ -f ${mkdocsyml} ]] ||
+ die "${FUNCNAME}: ${mkdocsyml} not found, DOCS_DIR=${DOCS_DIR} wrong"
+
+ pushd "${DOCS_DIR}" || die
+ mkdocs build -d "${DOCS_OUTDIR}" || die "${FUNCNAME}: mkdocs build failed"
+ popd || die
+
+ # remove generated .gz variants
+ # mkdocs currently has no option to disable this
+ # and portage complains: "Colliding files found by ecompress"
+ rm "${DOCS_OUTDIR}"/*.gz || die
+}
+
+# @FUNCTION: doxygen_deps
+# @DESCRIPTION:
+# Sets dependencies for doxygen
+doxygen_deps() {
+ debug-print-function ${FUNCNAME}
+
+ DOCS_DEPEND="app-doc/doxygen
+ ${DOCS_DEPEND}"
+}
+
+# @FUNCTION: doxygen_compile
+# @DESCRIPTION:
+# Calls doxygen to build docs.
+#
+# If you overwrite src_compile or python_compile_all
+# do not call this function, call docs_compile instead
+doxygen_compile() {
+ debug-print-function ${FUNCNAME}
+ use doc || return
+
+ : ${DOCS_CONFIG_NAME:="Doxyfile"}
+
+ local doxyfile=${DOCS_DIR}/${DOCS_CONFIG_NAME}
+ [[ -f ${doxyfile} ]] ||
+ die "${FUNCNAME}: ${doxyfile} not found, DOCS_DIR=${DOCS_DIR} or DOCS_CONFIG_NAME=${DOCS_CONFIG_NAME} wrong"
+
+ # doxygen wants the HTML_OUTPUT dir to already exist
+ mkdir -p "${DOCS_OUTDIR}" || die
+
+ pushd "${DOCS_DIR}" || die
+ (cat "${DOCS_CONFIG_NAME}" ; echo "HTML_OUTPUT=${DOCS_OUTDIR}") | doxygen - || die "${FUNCNAME}: doxygen failed"
+ popd || die
+}
+
+# @FUNCTION: docs_compile
+# @DESCRIPTION:
+# Calls DOCS_BUILDER and sets HTML_DOCS
+#
+# This function must be called in global scope. Take care not to
+# overwrite the variables set by it. Has support for distutils-r1
+# eclass, but only if this eclass is inherited *after*
+# distutils-r1. If you need to extend src_compile() or
+# python_compile_all(), you can call the original implementation
+# as docs_compile.
+docs_compile() {
+ debug-print-function ${FUNCNAME}
+ use doc || return
+
+ # Set a sensible default as DOCS_DIR
+ : ${DOCS_DIR:="${S}"}
+
+ # Where to put the compiled files?
+ : ${DOCS_OUTDIR:="${S}/_build/html"}
+
+ ${DOCS_BUILDER}_compile
+
+ HTML_DOCS+=( "${DOCS_OUTDIR}/." )
+
+ # we need to ensure successful return in case we're called last,
+ # otherwise Portage may wrongly assume sourcing failed
+ return 0
+}
+
+
+# This is where we setup the USE/(B)DEPEND variables
+# and call the doc builder specific setup functions
+IUSE+=" doc"
+
+# Call the correct setup function
+case ${DOCS_BUILDER} in
+ "sphinx")
+ python_append_deps
+ sphinx_deps
+ ;;
+ "mkdocs")
+ python_append_deps
+ mkdocs_deps
+ ;;
+ "doxygen")
+ doxygen_deps
+ ;;
+esac
+
+if [[ ${EAPI} == [7] ]]; then
+ BDEPEND+=" doc? ( ${DOCS_DEPEND} )"
+else
+ DEPEND+=" doc? ( ${DOCS_DEPEND} )"
+fi
+
+# If this is a python package using distutils-r1
+# then put the compile function in the specific
+# python function, else docs_compile should be manually
+# added to src_compile
+if [[ ${_DISTUTILS_R1} && ( ${DOCS_BUILDER}="mkdocs" || ${DOCS_BUILDER}="sphinx" ) ]]; then
+ python_compile_all() { docs_compile; }
+fi
+
+_DOCS=1
+fi
diff --git a/eclass/dotnet.eclass b/eclass/dotnet.eclass
index 55e10645deb7..f15b7f55fcc2 100644
--- a/eclass/dotnet.eclass
+++ b/eclass/dotnet.eclass
@@ -1,8 +1,9 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: dotnet.eclass
-# @MAINTAINER: dotnet@gentoo.org
+# @MAINTAINER:
+# dotnet@gentoo.org
# @SUPPORTED_EAPIS: 1 2 3 4 5 6 7
# @BLURB: common settings and functions for mono and dotnet related packages
# @DESCRIPTION:
diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass
index 8d358a91f989..c763957bf893 100644
--- a/eclass/ecm.eclass
+++ b/eclass/ecm.eclass
@@ -19,13 +19,6 @@
#
# This eclass's phase functions are not intended to be mixed and matched, so if
# any phase functions are overridden the version here should also be called.
-#
-# Porting from kde5.class
-# - Convert all add_*_dep dependency functions to regular dependencies
-# - Manually set LICENSE
-# - Manually set SLOT
-# - Rename vars and function names as needed, see kde5.eclass PORTING comments
-# - Instead of FRAMEWORKS_MINIMAL, define KFMIN in ebuilds and use it for deps
if [[ -z ${_ECM_ECLASS} ]]; then
_ECM_ECLASS=1
@@ -267,24 +260,6 @@ DEPEND+=" ${COMMONDEPEND}"
RDEPEND+=" ${COMMONDEPEND}"
unset COMMONDEPEND
-# @FUNCTION: _ecm_banned_var
-# @INTERNAL
-# @DESCRIPTION:
-# Banned kde5*.eclass variables are banned.
-_ecm_banned_var() {
- die "$1 is banned. use $2 instead."
-}
-
-if [[ -z ${_KDE5_ECLASS} ]] ; then
- [[ -n ${KDE_DEBUG} ]] && _ecm_banned_var KDE_DEBUG ECM_DEBUG
- [[ -n ${KDE_EXAMPLES} ]] && _ecm_banned_var KDE_EXAMPLES ECM_EXAMPLES
- [[ -n ${KDE_HANDBOOK} ]] && _ecm_banned_var KDE_HANDBOOK ECM_HANDBOOK
- [[ -n ${KDE_DOC_DIR} ]] && _ecm_banned_var KDE_DOC_DIR ECM_HANDBOOK_DIR
- [[ -n ${KDE_PO_DIRS} ]] && _ecm_banned_var KDE_PO_DIRS ECM_PO_DIRS
- [[ -n ${KDE_QTHELP} ]] && _ecm_banned_var KDE_QTHELP ECM_QTHELP
- [[ -n ${KDE_TEST} ]] && _ecm_banned_var KDE_TEST ECM_TEST
-fi
-
# @ECLASS-VARIABLE: KDE_GCC_MINIMAL
# @DEFAULT_UNSET
# @DESCRIPTION:
diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass
index 06643db0f605..8513de0af4d6 100644
--- a/eclass/gnome2-utils.eclass
+++ b/eclass/gnome2-utils.eclass
@@ -4,7 +4,7 @@
# @ECLASS: gnome2-utils.eclass
# @MAINTAINER:
# gnome@gentoo.org
-# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
+# @SUPPORTED_EAPIS: 5 6 7
# @BLURB: Auxiliary functions commonly used by Gnome packages.
# @DESCRIPTION:
# This eclass provides a set of auxiliary functions needed by most Gnome
@@ -14,13 +14,14 @@
# * GConf schemas management
# * scrollkeeper (old Gnome help system) management
-[[ ${EAPI:-0} == [012345] ]] && inherit multilib
+[[ ${EAPI} == 5 ]] && inherit multilib
# eutils.eclass: emktemp
+# toolchain-funs.eclass: tc-is-cross-compiler
# xdg-utils.eclass: xdg_environment_reset, xdg_icon_cache_update
-inherit eutils xdg-utils
+inherit eutils toolchain-funcs xdg-utils
-case "${EAPI:-0}" in
- 0|1|2|3|4|5|6|7) ;;
+case ${EAPI} in
+ 5|6|7) ;;
*) die "EAPI=${EAPI} is not supported" ;;
esac
@@ -95,7 +96,7 @@ gnome2_environment_reset() {
# Ensure we don't rely on dconf/gconf while building, bug #511946
export GSETTINGS_BACKEND="memory"
- if has ${EAPI:-0} 6 7; then
+ if has ${EAPI} 6 7; then
# Try to cover the packages honoring this variable, bug #508124
export GST_INSPECT="$(type -P true)"
@@ -110,7 +111,6 @@ gnome2_environment_reset() {
# in the GNOME2_ECLASS_SCHEMAS environment variable.
# This function should be called from pkg_preinst.
gnome2_gconf_savelist() {
- has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
pushd "${ED}" > /dev/null || die
export GNOME2_ECLASS_SCHEMAS=$(find 'etc/gconf/schemas/' -name '*.schemas' 2> /dev/null)
popd > /dev/null || die
@@ -122,16 +122,23 @@ gnome2_gconf_savelist() {
# using gconftool-2.
# This function should be called from pkg_postinst.
gnome2_gconf_install() {
- has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
local updater="${EROOT%/}${GCONFTOOL_BIN}"
- if [[ ! -x "${updater}" ]]; then
- debug-print "${updater} is not executable"
+ if [[ -z "${GNOME2_ECLASS_SCHEMAS}" ]]; then
+ debug-print "No GNOME 2 GConf schemas found"
return
fi
- if [[ -z "${GNOME2_ECLASS_SCHEMAS}" ]]; then
- debug-print "No GNOME 2 GConf schemas found"
+ if tc-is-cross-compiler ; then
+ ewarn "Updating of GNOME 2 GConf schemas skipped due to cross-compilation."
+ ewarn "You might want to run gconftool-2 manually on the target for"
+ ewarn "your final image and re-run it when packages installing"
+ ewarn "GNOME 2 GConf schemas get upgraded or added to the image."
+ return
+ fi
+
+ if [[ ! -x "${updater}" ]]; then
+ debug-print "${updater} is not executable"
return
fi
@@ -163,16 +170,22 @@ gnome2_gconf_install() {
# Removes schema files previously installed by the current ebuild from Gconf's
# database.
gnome2_gconf_uninstall() {
- has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
local updater="${EROOT%/}${GCONFTOOL_BIN}"
- if [[ ! -x "${updater}" ]]; then
- debug-print "${updater} is not executable"
+ if [[ -z "${GNOME2_ECLASS_SCHEMAS}" ]]; then
+ debug-print "No GNOME 2 GConf schemas found"
return
fi
- if [[ -z "${GNOME2_ECLASS_SCHEMAS}" ]]; then
- debug-print "No GNOME 2 GConf schemas found"
+ if tc-is-cross-compiler ; then
+ ewarn "Removal of GNOME 2 GConf schemas skipped due to cross-compilation."
+ ewarn "You might want to run gconftool-2 manually on the target for"
+ ewarn "your final image to uninstall this package's schemas."
+ return
+ fi
+
+ if [[ ! -x "${updater}" ]]; then
+ debug-print "${updater} is not executable"
return
fi
@@ -255,7 +268,6 @@ gnome2_omf_fix() {
# in the GNOME2_ECLASS_SCROLLS environment variable.
# This function should be called from pkg_preinst.
gnome2_scrollkeeper_savelist() {
- has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
pushd "${ED}" > /dev/null || die
export GNOME2_ECLASS_SCROLLS=$(find 'usr/share/omf' -type f -name "*.omf" 2> /dev/null)
popd > /dev/null || die
@@ -266,16 +278,23 @@ gnome2_scrollkeeper_savelist() {
# Updates the global scrollkeeper database.
# This function should be called from pkg_postinst and pkg_postrm.
gnome2_scrollkeeper_update() {
- has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
local updater="${EROOT%/}${SCROLLKEEPER_UPDATE_BIN}"
- if [[ ! -x "${updater}" ]] ; then
- debug-print "${updater} is not executable"
+ if [[ -z "${GNOME2_ECLASS_SCROLLS}" ]]; then
+ debug-print "No scroll cache to update"
return
fi
- if [[ -z "${GNOME2_ECLASS_SCROLLS}" ]]; then
- debug-print "No scroll cache to update"
+ if tc-is-cross-compiler ; then
+ ewarn "Updating of scrollkeeper database skipped due to cross-compilation."
+ ewarn "You might want to run scrollkeeper-update manually on the target"
+ ewarn "for your final image and re-run it when packages installing"
+ ewarn "scrollkeeper OMF files get upgraded or added to the image."
+ return
+ fi
+
+ if [[ ! -x "${updater}" ]] ; then
+ debug-print "${updater} is not executable"
return
fi
@@ -291,7 +310,6 @@ gnome2_scrollkeeper_update() {
# implementations that call gnome2_schemas_update conditionally.
# This function should be called from pkg_preinst.
gnome2_schemas_savelist() {
- has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
pushd "${ED}" > /dev/null || die
export GNOME2_ECLASS_GLIB_SCHEMAS=$(find 'usr/share/glib-2.0/schemas' -name '*.gschema.xml' 2>/dev/null)
popd > /dev/null || die
@@ -302,9 +320,16 @@ gnome2_schemas_savelist() {
# Updates GSettings schemas.
# This function should be called from pkg_postinst and pkg_postrm.
gnome2_schemas_update() {
- has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
local updater="${EROOT%/}${GLIB_COMPILE_SCHEMAS}"
+ if tc-is-cross-compiler ; then
+ ewarn "Updating of GSettings schemas skipped due to cross-compilation."
+ ewarn "You might want to run glib-compile-schemas manually on the target"
+ ewarn "for your final image and re-run it when packages installing"
+ ewarn "GSettings schemas get upgraded or added to the image."
+ return
+ fi
+
if [[ ! -x ${updater} ]]; then
debug-print "${updater} is not executable"
return
@@ -321,7 +346,6 @@ gnome2_schemas_update() {
# GNOME2_ECLASS_GDK_PIXBUF_LOADERS variable.
# This function should be called from pkg_preinst.
gnome2_gdk_pixbuf_savelist() {
- has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
pushd "${ED}" > /dev/null || die
export GNOME2_ECLASS_GDK_PIXBUF_LOADERS=$(find usr/lib*/gdk-pixbuf-2.0 -type f 2>/dev/null)
popd > /dev/null || die
@@ -332,20 +356,24 @@ gnome2_gdk_pixbuf_savelist() {
# Updates gdk-pixbuf loader cache if GNOME2_ECLASS_GDK_PIXBUF_LOADERS has some.
# This function should be called from pkg_postinst and pkg_postrm.
gnome2_gdk_pixbuf_update() {
- has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
local updater="${EROOT%/}/usr/bin/${CHOST}-gdk-pixbuf-query-loaders"
+ [[ -x ${updater} ]] || updater="${EROOT%/}/usr/bin/gdk-pixbuf-query-loaders"
- if [[ ! -x ${updater} ]]; then
- updater="${EROOT%/}/usr/bin/gdk-pixbuf-query-loaders"
+ if [[ -z ${GNOME2_ECLASS_GDK_PIXBUF_LOADERS} ]]; then
+ debug-print "gdk-pixbuf loader cache does not need an update"
+ return
fi
- if [[ ! -x ${updater} ]]; then
- debug-print "${updater} is not executable"
+ if tc-is-cross-compiler ; then
+ ewarn "Updating of gdk-pixbuf loader cache skipped due to cross-compilation."
+ ewarn "You might want to run gdk-pixbuf-query-loaders manually on the target"
+ ewarn "for your final image and re-run it when packages installing"
+ ewarn "gdk-pixbuf loaders get upgraded or added to the image."
return
fi
- if [[ -z ${GNOME2_ECLASS_GDK_PIXBUF_LOADERS} ]]; then
- debug-print "gdk-pixbuf loader cache does not need an update"
+ if [[ ! -x ${updater} ]]; then
+ debug-print "${updater} is not executable"
return
fi
@@ -363,7 +391,12 @@ gnome2_gdk_pixbuf_update() {
# Updates gtk2 immodules/gdk-pixbuf loaders listing.
gnome2_query_immodules_gtk2() {
local updater=${EPREFIX}/usr/bin/${CHOST}-gtk-query-immodules-2.0
- [[ ! -x ${updater} ]] && updater=${EPREFIX}/usr/bin/gtk-query-immodules-2.0
+ [[ -x ${updater} ]] || updater=${EPREFIX}/usr/bin/gtk-query-immodules-2.0
+
+ if [[ ! -x ${updater} ]]; then
+ debug-print "${updater} is not executable"
+ return
+ fi
ebegin "Updating gtk2 input method module cache"
GTK_IM_MODULE_FILE="${EROOT%/}/usr/$(get_libdir)/gtk-2.0/2.10.0/immodules.cache" \
@@ -376,7 +409,12 @@ gnome2_query_immodules_gtk2() {
# Updates gtk3 immodules/gdk-pixbuf loaders listing.
gnome2_query_immodules_gtk3() {
local updater=${EPREFIX}/usr/bin/${CHOST}-gtk-query-immodules-3.0
- [[ ! -x ${updater} ]] && updater=${EPREFIX}/usr/bin/gtk-query-immodules-3.0
+ [[ -x ${updater} ]] || updater=${EPREFIX}/usr/bin/gtk-query-immodules-3.0
+
+ if [[ ! -x ${updater} ]]; then
+ debug-print "${updater} is not executable"
+ return
+ fi
ebegin "Updating gtk3 input method module cache"
GTK_IM_MODULE_FILE="${EROOT%/}/usr/$(get_libdir)/gtk-3.0/3.0.0/immodules.cache" \
@@ -389,11 +427,15 @@ gnome2_query_immodules_gtk3() {
# Updates glib's gio modules cache.
# This function should be called from pkg_postinst and pkg_postrm.
gnome2_giomodule_cache_update() {
- has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
local updater="${EROOT%/}/usr/bin/${CHOST}-gio-querymodules"
+ [[ -x ${updater} ]] || updater="${EROOT%/}/usr/bin/gio-querymodules"
- if [[ ! -x ${updater} ]]; then
- updater="${EROOT%/}/usr/bin/gio-querymodules"
+ if tc-is-cross-compiler ; then
+ ewarn "Updating of GIO modules cache skipped due to cross-compilation."
+ ewarn "You might want to run gio-querymodules manually on the target for"
+ ewarn "your final image for performance reasons and re-run it when packages"
+ ewarn "installing GIO modules get upgraded or added to the image."
+ return
fi
if [[ ! -x ${updater} ]]; then
@@ -446,8 +488,8 @@ gnome2_disable_deprecation_warning() {
done
}
-case ${EAPI:-0} in
-0|1|2|3|4|5|6)
+case ${EAPI} in
+5|6)
# @FUNCTION: gnome2_icon_savelist
# @DESCRIPTION:
@@ -457,7 +499,6 @@ case ${EAPI:-0} in
# gnome2_icon_cache_update conditionally.
# This function should be called from pkg_preinst.
gnome2_icon_savelist() {
- has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
pushd "${ED}" > /dev/null || die
export GNOME2_ECLASS_ICONS=$(find 'usr/share/icons' -maxdepth 1 -mindepth 1 -type d 2> /dev/null)
popd > /dev/null || die
diff --git a/eclass/gnome2.eclass b/eclass/gnome2.eclass
index 1a4ff451df32..27ea9f96c0d9 100644
--- a/eclass/gnome2.eclass
+++ b/eclass/gnome2.eclass
@@ -4,7 +4,7 @@
# @ECLASS: gnome2.eclass
# @MAINTAINER:
# gnome@gentoo.org
-# @SUPPORTED_EAPIS: 4 5 6
+# @SUPPORTED_EAPIS: 5 6 7
# @BLURB: Provides phases for Gnome/Gtk+ based packages.
# @DESCRIPTION:
# Exports portage base functions used by ebuilds written for packages using the
@@ -17,25 +17,19 @@
GNOME2_EAUTORECONF=${GNOME2_EAUTORECONF:-""}
[[ ${GNOME2_EAUTORECONF} == 'yes' ]] && inherit autotools
-inherit eutils libtool ltprune gnome.org gnome2-utils xdg
+[[ ${EAPI} == [56] ]] && inherit eutils ltprune
+inherit libtool gnome.org gnome2-utils xdg
-case "${EAPI:-0}" in
- 4|5)
+case ${EAPI:-0} in
+ 5)
EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install pkg_preinst pkg_postinst pkg_postrm
;;
- 6)
+ 6|7)
EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install pkg_preinst pkg_postinst pkg_postrm
;;
*) die "EAPI=${EAPI} is not supported" ;;
esac
-# @ECLASS-VARIABLE: DOCS
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# String containing documents passed to dodoc command for eapi4.
-# In eapi5 we rely on einstalldocs (from eutils.eclass) and for newer EAPIs we
-# follow PMS spec.
-
# @ECLASS-VARIABLE: ELTCONF
# @DEFAULT_UNSET
# @DESCRIPTION:
@@ -48,7 +42,7 @@ ELTCONF=${ELTCONF:-""}
# Extra configure opts passed to econf.
# Deprecated, pass extra arguments to gnome2_src_configure.
# Banned in eapi6 and newer.
-if has ${EAPI:-0} 4 5; then
+if has ${EAPI} 5; then
G2CONF=${G2CONF:-""}
fi
@@ -64,7 +58,7 @@ fi
#
# Banned since eapi6 as upstream is moving away from this obsolete macro in favor
# of autoconf-archive macros, that do not expose this issue (bug #270919)
-if has ${EAPI:-0} 4 5; then
+if has ${EAPI} 5; then
if [[ ${GCONF_DEBUG} != "no" ]]; then
IUSE="debug"
fi
@@ -77,27 +71,22 @@ fi
# @ECLASS-VARIABLE: GNOME2_LA_PUNT
# @DESCRIPTION:
-# For eapi4 it sets if we should delete ALL or none of the .la files
-# For eapi5 and newer it relies on prune_libtool_files (from eutils.eclass)
-# for this. Available values for GNOME2_LA_PUNT:
+# In EAPIs 5 and 6, it relies on prune_libtool_files (from ltprune.eclass) for
+# this. Later EAPIs use find ... -delete. Available values for GNOME2_LA_PUNT:
# - "no": will not clean any .la files
# - "yes": will run prune_libtool_files --modules
# - If it is not set, it will run prune_libtool_files
-if has ${EAPI:-0} 4; then
- GNOME2_LA_PUNT=${GNOME2_LA_PUNT:-"no"}
-else
- GNOME2_LA_PUNT=${GNOME2_LA_PUNT:-""}
-fi
+GNOME2_LA_PUNT=${GNOME2_LA_PUNT:-""}
# @FUNCTION: gnome2_src_unpack
# @DESCRIPTION:
# Stub function for old EAPI.
gnome2_src_unpack() {
- if has ${EAPI:-0} 4 5; then
+ if has ${EAPI} 5; then
unpack ${A}
cd "${S}"
else
- die "gnome2_src_unpack is banned from eapi6"
+ die "gnome2_src_unpack is banned since eapi6"
fi
}
@@ -115,7 +104,7 @@ gnome2_src_prepare() {
# We stop to run it from eapi6 as scrollkeeper helpers from
# rarian are not running anything and, then, access violations
# shouldn't occur.
- has ${EAPI:-0} 4 5 && gnome2_omf_fix
+ has ${EAPI} 5 && gnome2_omf_fix
# Disable all deprecation warnings
gnome2_disable_deprecation_warning
@@ -135,7 +124,7 @@ gnome2_src_prepare() {
gnome2_src_configure() {
# Deprecated for a long time now and banned since eapi6, see Gnome team policies
if [[ -n ${G2CONF} ]] ; then
- if has ${EAPI:-0} 4 5; then
+ if has ${EAPI} 5; then
eqawarn "G2CONF set, please review documentation at https://wiki.gentoo.org/wiki/Project:GNOME/Gnome_Team_Ebuild_Policies#G2CONF_and_src_configure"
else
die "G2CONF set, please review documentation at https://wiki.gentoo.org/wiki/Project:GNOME/Gnome_Team_Ebuild_Policies#G2CONF_and_src_configure"
@@ -144,7 +133,7 @@ gnome2_src_configure() {
local g2conf=()
- if has ${EAPI:-0} 4 5; then
+ if has ${EAPI} 5; then
if [[ ${GCONF_DEBUG} != 'no' ]] ; then
if use debug ; then
g2conf+=( --enable-debug=yes )
@@ -156,19 +145,14 @@ gnome2_src_configure() {
fi
fi
- # Starting with EAPI=5, we consider packages installing gtk-doc to be
- # handled by adding DEPEND="dev-util/gtk-doc-am" which provides tools to
- # relink URLs in documentation to already installed documentation.
- # This decision also greatly helps with constantly broken doc generation.
+ # We consider packages installing gtk-doc to be handled by adding
+ # DEPEND="dev-util/gtk-doc-am" which provides tools to relink URLs in
+ # documentation to already installed documentation. This decision also
+ # greatly helps with constantly broken doc generation.
# Remember to drop 'doc' USE flag from your package if it was only used to
# rebuild docs.
- # Preserve old behavior for older EAPI.
if grep -q "enable-gtk-doc" "${ECONF_SOURCE:-.}"/configure ; then
- if has ${EAPI:-0} 4 && in_iuse doc ; then
- g2conf+=( $(use_enable doc gtk-doc) )
- else
- g2conf+=( --disable-gtk-doc )
- fi
+ g2conf+=( --disable-gtk-doc )
fi
# Pass --disable-maintainer-mode when needed
@@ -182,13 +166,6 @@ gnome2_src_configure() {
g2conf+=( --disable-scrollkeeper )
fi
- # Pass --disable-silent-rules when possible (not needed since eapi5), bug #429308
- if has ${EAPI:-0} 4; then
- if grep -q "disable-silent-rules" "${ECONF_SOURCE:-.}"/configure; then
- g2conf+=( --disable-silent-rules )
- fi
- fi
-
# Pass --disable-schemas-install when possible
if grep -q "disable-schemas-install" "${ECONF_SOURCE:-.}"/configure; then
g2conf+=( --disable-schemas-install )
@@ -210,20 +187,20 @@ gnome2_src_configure() {
fi
# Pass --docdir with proper directory, bug #482646 (not needed since eapi6)
- if has ${EAPI:-0} 4 5; then
+ if has ${EAPI} 5; then
if grep -q "^ *--docdir=" "${ECONF_SOURCE:-.}"/configure; then
g2conf+=( --docdir="${EPREFIX}"/usr/share/doc/${PF} )
fi
fi
# Avoid sandbox violations caused by gnome-vfs (bug #128289 and #345659)
- if has ${EAPI:-0} 4 5; then
+ if has ${EAPI} 5; then
addwrite "$(unset HOME; echo ~)/.gnome2"
else
addpredict "$(unset HOME; echo ~)/.gnome2"
fi
- if has ${EAPI:-0} 4 5; then
+ if has ${EAPI} 5; then
econf ${g2conf[@]} ${G2CONF} "$@"
else
econf ${g2conf[@]} "$@"
@@ -234,7 +211,7 @@ gnome2_src_configure() {
# @DESCRIPTION:
# Only default src_compile for now
gnome2_src_compile() {
- if has ${EAPI:-0} 4 5; then
+ if has ${EAPI} 5; then
emake
else
default
@@ -255,7 +232,7 @@ gnome2_src_install() {
#
# if this is not present, scrollkeeper-update may segfault and
# create bogus directories in /var/lib/
- if has ${EAPI:-0} 4 5; then
+ if has ${EAPI} 5; then
dodir "${sk_tmp_dir}" || die "dodir failed"
emake DESTDIR="${D}" "scrollkeeper_localstate_dir=${ED}${sk_tmp_dir} " "$@" install || die "install failed"
else
@@ -267,12 +244,7 @@ gnome2_src_install() {
# Handle documentation as 'default' for eapi5, bug #373131
# Since eapi6 this is handled by default on its own plus MAINTAINERS and HACKING
# files that are really common in gnome packages (bug #573390)
- if has ${EAPI:-0} 4; then
- # Manual document installation
- if [[ -n "${DOCS}" ]]; then
- dodoc ${DOCS} || die "dodoc failed"
- fi
- elif has ${EAPI:-0} 5; then
+ if has ${EAPI} 5; then
einstalldocs
else
local d
@@ -293,20 +265,16 @@ gnome2_src_install() {
rm -fr "${ED}/usr/share/applications/mimeinfo.cache"
# Delete all .la files
- if has ${EAPI:-0} 4; then
- if [[ "${GNOME2_LA_PUNT}" != "no" ]]; then
- ebegin "Removing .la files"
- if ! in_iuse static-libs || ! use static-libs ; then
- find "${D}" -name '*.la' -exec rm -f {} + || die "la file removal failed"
- fi
- eend
- fi
- else
+ if has ${EAPI} 5 6; then
case "${GNOME2_LA_PUNT}" in
yes) prune_libtool_files --modules;;
no) ;;
*) prune_libtool_files;;
esac
+ else
+ if [[ ${GNOME2_LA_PUNT} != 'no' ]]; then
+ find "${ED}" -name '*.la' -delete || die
+ fi
fi
}
diff --git a/eclass/kde.org.eclass b/eclass/kde.org.eclass
index b8fec445755c..819b73d5dfa4 100644
--- a/eclass/kde.org.eclass
+++ b/eclass/kde.org.eclass
@@ -8,7 +8,7 @@
# @BLURB: Support eclass for packages that are hosted on kde.org infrastructure.
# @DESCRIPTION:
# This eclass is mainly providing facilities for the upstream release groups
-# Frameworks, Plasma, Applications to assemble default SRC_URI for tarballs,
+# Frameworks, Plasma, Release Service to assemble default SRC_URI for tarballs,
# set up git-r3.eclass for stable/master branch versions or restrict access to
# unreleased (packager access only) tarballs in Gentoo KDE overlay, but it may
# be also used by any other package hosted on kde.org.
@@ -63,7 +63,7 @@ esac
# @ECLASS-VARIABLE: KDE_UNRELEASED
# @INTERNAL
-# @DESCRIPTION
+# @DESCRIPTION:
# An array of $CATEGORY-$PV pairs of packages that are unreleased upstream.
# Any package matching this will have fetch restriction enabled, and receive
# a proper error message via pkg_nofetch.
@@ -220,7 +220,10 @@ kde.org_pkg_nofetch() {
case ${CATEGORY} in
kde-frameworks) sched_uri+="/Frameworks" ;;
kde-plasma) sched_uri+="/Plasma_5" ;;
- kde-apps) sched_uri+="/Applications/$(ver_cut 1-2)_Release_Schedule" ;;
+ *)
+ [[ ${KDE_RELEASE_SERVICE} = true ]] &&
+ sched_uri+="/release_service/$(ver_cut 1-2)_Release_Schedule"
+ ;;
esac
eerror " _ _ _ _ ____ _____ _ _____ _ ____ _____ ____ "