summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-01-29 18:03:51 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-01-29 18:03:51 +0000
commitd7ed2b01311f15ba54fe8ea872aab7d59ab2b193 (patch)
tree1814dd2b5bbf2e7639fdafbeef48d228cfaf5e9b /eclass
parentabaa75b10f899ada8dd05b23cc03205064394bc6 (diff)
gentoo resync : 29.01.2021
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin37101 -> 37110 bytes
-rw-r--r--eclass/apache-2.eclass70
-rw-r--r--eclass/distutils-r1.eclass17
-rw-r--r--eclass/docs.eclass162
-rw-r--r--eclass/dune.eclass3
-rw-r--r--eclass/findlib.eclass3
-rw-r--r--eclass/llvm.org.eclass4
-rw-r--r--eclass/opam.eclass3
-rw-r--r--eclass/toolchain-funcs.eclass21
9 files changed, 206 insertions, 77 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index 387980174060..643aa2fdf90a 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/apache-2.eclass b/eclass/apache-2.eclass
index ccfe482f528e..aac25683d99e 100644
--- a/eclass/apache-2.eclass
+++ b/eclass/apache-2.eclass
@@ -10,7 +10,7 @@
# This eclass handles apache-2.x ebuild functions such as LoadModule generation
# and inter-module dependency checking.
-inherit autotools flag-o-matic multilib ssl-cert user toolchain-funcs eapi7-ver
+inherit autotools flag-o-matic multilib ssl-cert user toolchain-funcs
[[ ${CATEGORY}/${PN} != www-servers/apache ]] \
&& die "Do not use this eclass with anything else than www-servers/apache ebuilds!"
@@ -19,14 +19,19 @@ case ${EAPI:-0} in
0|1|2|3|4|5)
die "This eclass is banned for EAPI<6"
;;
+ 6)
+ inherit eapi7-ver
+ ;;
+ *)
+ LUA_COMPAT=( lua5-{1..4} )
+ inherit lua-single
+ ;;
esac
# settings which are version specific go in here:
case $(ver_cut 1-2) in
2.4)
DEFAULT_MPM_THREADED="event" #509922
- CDEPEND=">=dev-libs/apr-1.5.1:=
- !www-apache/mod_macro" #492578 #477702
;;
*)
die "Unknown MAJOR.MINOR apache version."
@@ -88,10 +93,18 @@ SRC_URI="mirror://apache/httpd/httpd-${PV}.tar.bz2
# built-in modules
IUSE_MPMS="${IUSE_MPMS_FORK} ${IUSE_MPMS_THREAD}"
-IUSE="${IUSE} debug doc gdbm ldap libressl selinux ssl static suexec threads"
+IUSE="${IUSE} debug doc gdbm ldap libressl selinux ssl static suexec +suexec-caps suexec-syslog split-usr threads"
for module in ${IUSE_MODULES} ; do
- IUSE="${IUSE} apache2_modules_${module}"
+ case ${module} in
+ # Enable http2 by default (bug #563452)
+ http2)
+ IUSE+=" +apache2_modules_${module}"
+ ;;
+ *)
+ IUSE+=" apache2_modules_${module}"
+ ;;
+ esac
done
_apache2_set_mpms() {
@@ -121,23 +134,53 @@ _apache2_set_mpms() {
_apache2_set_mpms
unset -f _apache2_set_mpms
-DEPEND="${CDEPEND}
+# Dependencies
+RDEPEND="
dev-lang/perl
+ >=dev-libs/apr-1.5.1:=
=dev-libs/apr-util-1*:=[gdbm=,ldap?]
dev-libs/libpcre
+ apache2_modules_brotli? ( >=app-arch/brotli-0.6.0:= )
apache2_modules_deflate? ( sys-libs/zlib )
+ apache2_modules_http2? (
+ >=net-libs/nghttp2-1.2.1
+ kernel_linux? ( sys-apps/util-linux )
+ )
+ apache2_modules_md? ( >=dev-libs/jansson-2.10 )
apache2_modules_mime? ( app-misc/mime-types )
+ apache2_modules_proxy_http2? (
+ >=net-libs/nghttp2-1.2.1
+ kernel_linux? ( sys-apps/util-linux )
+ )
+ apache2_modules_session_crypto? (
+ libressl? ( dev-libs/apr-util[libressl] )
+ !libressl? ( dev-libs/apr-util[openssl] )
+ )
gdbm? ( sys-libs/gdbm:= )
ldap? ( =net-nds/openldap-2* )
+ selinux? ( sec-policy/selinux-apache )
ssl? (
!libressl? ( >=dev-libs/openssl-1.0.2:0= )
libressl? ( dev-libs/libressl:0= )
+ kernel_linux? ( sys-apps/util-linux )
)
- !=www-servers/apache-1*"
-RDEPEND+=" ${DEPEND}
- selinux? ( sec-policy/selinux-apache )"
+"
+
+DEPEND="${RDEPEND}"
+BDEPEND="
+ virtual/pkgconfig
+ suexec? ( suexec-caps? ( sys-libs/libcap ) )
+"
+if [[ ${EAPI} == 6 ]] ; then
+ DEPEND+=" ${BDEPEND}"
+fi
PDEPEND="~app-admin/apache-tools-${PV}"
+REQUIRED_USE+="
+ apache2_modules_http2? ( ssl )
+ apache2_modules_md? ( ssl )
+"
+
S="${WORKDIR}/httpd-${PV}"
# @VARIABLE: MODULE_DEPENDS
@@ -254,7 +297,10 @@ setup_modules() {
MY_MODS=()
if use ldap ; then
- MY_CONF+=( --enable-authnz_ldap=${mod_type} --enable-ldap=${mod_type} )
+ MY_CONF+=(
+ --enable-authnz_ldap=${mod_type}
+ --enable-ldap=${mod_type}
+ )
MY_MODS+=( ldap authnz_ldap )
else
MY_CONF+=( --disable-authnz_ldap --disable-ldap )
@@ -413,6 +459,10 @@ apache-2_pkg_setup() {
fi
elog
fi
+
+ if [[ ${EAPI} != 6 ]] && use apache2_modules_lua ; then
+ lua-single_pkg_setup
+ fi
}
# @FUNCTION: apache-2_src_prepare
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 5ffc91be479c..c5c954f49250 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: distutils-r1.eclass
@@ -316,22 +316,25 @@ distutils_enable_sphinx() {
_DISTUTILS_SPHINX_PLUGINS=( "${@}" )
local deps autodoc=1 d
+ deps="dev-python/sphinx[\${PYTHON_USEDEP}]"
for d; do
if [[ ${d} == --no-autodoc ]]; then
autodoc=
else
deps+="
${d}[\${PYTHON_USEDEP}]"
+ if [[ ! ${autodoc} ]]; then
+ die "${FUNCNAME}: do not pass --no-autodoc if external plugins are used"
+ fi
fi
done
- if [[ ! ${autodoc} && -n ${deps} ]]; then
- die "${FUNCNAME}: do not pass --no-autodoc if external plugins are used"
- fi
if [[ ${autodoc} ]]; then
- deps="$(python_gen_any_dep "
- dev-python/sphinx[\${PYTHON_USEDEP}]
- ${deps}")"
+ if [[ ${DISTUTILS_SINGLE_IMPL} ]]; then
+ deps="$(python_gen_cond_dep "${deps}")"
+ else
+ deps="$(python_gen_any_dep "${deps}")"
+ fi
python_check_deps() {
use doc || return 0
diff --git a/eclass/docs.eclass b/eclass/docs.eclass
index adacae4abda6..b67b268b7508 100644
--- a/eclass/docs.eclass
+++ b/eclass/docs.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: docs.eclass
@@ -10,20 +10,52 @@
# @SUPPORTED_EAPIS: 6 7
# @BLURB: A simple eclass to build documentation.
# @DESCRIPTION:
-# A simple eclass providing functions to build documentation.
+# A simple eclass providing basic functions and variables to build
+# documentation.
#
-# Please note that docs sets RDEPEND and DEPEND unconditionally
-# for you.
+# Please note that this eclass appends to RDEPEND and DEPEND
+# unconditionally for you.
#
# This eclass also appends "doc" to IUSE, and sets HTML_DOCS
-# to the location of the compiled documentation
+# to the location of the compiled documentation automatically,
+# 'einstalldocs' will then automatically install the documentation
+# to the correct directory.
#
# 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.
+# doc builders. To do this, add a <DOCS_BUILDER>_deps and
+# <DOCS_BUILDER>_compile 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.
+#
+# Example use doxygen:
+# @CODE
+# DOCS_BUILDER="doxygen"
+# DOCS_DEPEND="media-gfx/imagemagick"
+# DOCS_DIR="docs"
+#
+# inherit docs
+#
+# ...
+#
+# src_compile() {
+# default
+# docs_compile
+# }
+# @CODE
+#
+# Example use mkdocs with distutils-r1:
+# @CODE
+# DOCS_BUILDER="mkdocs"
+# DOCS_DEPEND="dev-python/mkdocs-material"
+# DOCS_DIR="doc"
+#
+# PYTHON_COMPAT=( python3_{7,8,9} )
+#
+# inherit distutils-r1 docs
+#
+# ...
+# @CODE
case "${EAPI:-0}" in
0|1|2|3|4|5)
@@ -50,41 +82,54 @@ esac
# 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"
#
+# 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
#
+# For doxygen the default name is Doxyfile, but
+# package may use a non-standard name. If this
+# is the case one should set DOCS_CONFIG_NAME to
+# the correct name
+#
# Defaults to ${S}
# @ECLASS-VARIABLE: DOCS_DEPEND
# @DEFAULT_UNSET
# @PRE_INHERIT
# @DESCRIPTION:
-# Sets additional dependencies to build docs.
+# Sets additional dependencies required to build the
+# documentation.
# For sphinx and mkdocs these dependencies should
-# be specified without [${PYTHON_USEDEP}], this
+# be specified *without* [${PYTHON_USEDEP}], this
# is added by the eclass. E.g. to depend on mkdocs-material:
#
+# @CODE
# DOCS_DEPEND="dev-python/mkdocs-material"
+# @CODE
#
-# This eclass appends to this variable, so you can
-# call it later in your ebuild again if necessary.
+# This eclass appends to this variable, this makes it
+# possible to 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
+# Defaults to 1 (True) for sphinx, and 0 (False) for mkdocs.
+# Not relevant for doxygen.
# @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.:
+# Sets the directory where the documentation should
+# be built into. There is no real reason to change this.
+# However, this variable is useful if the package should
+# also install other HTML files.
#
+# Example use:
+# @CODE
# HTML_DOCS=( "${yourdocs}" "${DOCS_OUTDIR}/." )
+# @CODE
#
# Defaults to ${S}/_build/html
@@ -93,18 +138,19 @@ esac
# Name of the doc builder config file.
#
# Only relevant for doxygen, as it allows
-# config files with non-standard names
+# config files with non-standard names.
+# Does not do anything for mkdocs or sphinx.
#
# Defaults to Doxyfile for doxygen
if [[ ! ${_DOCS} ]]; then
-# For the python based DOCS_BUILDERS we need to inherit python-any-r1
+# For the python based DOCS_BUILDERS we need to inherit any python eclass
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"
+ if [[ ! ${_PYTHON_R1} && ! ${_PYTHON_ANY_R1} && ! ${_PYTHON_SINGLE_R1} ]]; then
+ die "distutils-r1, python-r1, python-single-r1 or python-any-r1 needs to be inherited to use python based documentation builders"
fi
;;
"doxygen")
@@ -119,6 +165,7 @@ case ${DOCS_BUILDER} in
esac
# @FUNCTION: python_append_dep
+# @INTERNAL
# @DESCRIPTION:
# Appends [\${PYTHON_USEDEP}] to all dependencies
# for python based DOCS_BUILDERs such as mkdocs or
@@ -135,6 +182,7 @@ python_append_deps() {
}
# @FUNCTION: sphinx_deps
+# @INTERNAL
# @DESCRIPTION:
# Sets dependencies for sphinx
sphinx_deps() {
@@ -142,28 +190,29 @@ sphinx_deps() {
: ${DOCS_AUTODOC:=1}
+ deps="dev-python/sphinx[\${PYTHON_USEDEP}]
+ ${DOCS_DEPEND}"
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
+ elif [[ ${DOCS_AUTODOC} != 0 && ${DOCS_AUTODOC} != 1 ]]; then
die "${FUNCNAME}: DOCS_AUTODOC should be set to 0 or 1"
fi
+ if [[ ${_PYTHON_SINGLE_R1} ]]; then
+ DOCS_DEPEND="$(python_gen_cond_dep "${deps}")"
+ else
+ DOCS_DEPEND="$(python_gen_any_dep "${deps}")"
+ fi
}
# @FUNCTION: sphinx_compile
+# @INTERNAL
# @DESCRIPTION:
# Calls sphinx to build docs.
#
-# If you overwrite src_compile or python_compile_all
-# do not call this function, call docs_compile instead
+# If you overwrite python_compile_all do not call
+# this function, call docs_compile instead
sphinx_compile() {
debug-print-function ${FUNCNAME}
use doc || return
@@ -190,6 +239,7 @@ sphinx_compile() {
}
# @FUNCTION: mkdocs_deps
+# @INTERNAL
# @DESCRIPTION:
# Sets dependencies for mkdocs
mkdocs_deps() {
@@ -197,26 +247,28 @@ mkdocs_deps() {
: ${DOCS_AUTODOC:=0}
+ deps="dev-python/mkdocs[\${PYTHON_USEDEP}]
+ ${DOCS_DEPEND}"
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
+ deps="dev-python/mkautodoc[\${PYTHON_USEDEP}]
+ ${deps}"
+ elif [[ ${DOCS_AUTODOC} != 0 && ${DOCS_AUTODOC} != 1 ]]; then
die "${FUNCNAME}: DOCS_AUTODOC should be set to 0 or 1"
fi
+ if [[ ${_PYTHON_SINGLE_R1} ]]; then
+ DOCS_DEPEND="$(python_gen_cond_dep "${deps}")"
+ else
+ DOCS_DEPEND="$(python_gen_any_dep "${deps}")"
+ fi
}
# @FUNCTION: mkdocs_compile
+# @INTERNAL
# @DESCRIPTION:
# Calls mkdocs to build docs.
#
-# If you overwrite src_compile or python_compile_all
-# do not call this function, call docs_compile instead
+# If you overwrite python_compile_all do not call
+# this function, call docs_compile instead
mkdocs_compile() {
debug-print-function ${FUNCNAME}
use doc || return
@@ -236,6 +288,7 @@ mkdocs_compile() {
}
# @FUNCTION: doxygen_deps
+# @INTERNAL
# @DESCRIPTION:
# Sets dependencies for doxygen
doxygen_deps() {
@@ -246,11 +299,9 @@ doxygen_deps() {
}
# @FUNCTION: doxygen_compile
+# @INTERNAL
# @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
@@ -273,12 +324,21 @@ doxygen_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.
+# This function must be called in src_compile. Take care not to
+# overwrite the variables set by it. If distutils-r1 is inherited
+# *before* this eclass, than docs_compile will be automatically
+# added to python_compile_all() and there is no need to call
+# it manually. Note that this function checks if USE="doc" is
+# enabled, and if not automatically exits. Therefore, there is
+# no need to wrap this function in a if statement.
+#
+# Example use:
+# @CODE
+# src_compile() {
+# default
+# docs_compile
+# }
+# @CODE
docs_compile() {
debug-print-function ${FUNCNAME}
use doc || return
diff --git a/eclass/dune.eclass b/eclass/dune.eclass
index 334fbfbf7910..da1813def533 100644
--- a/eclass/dune.eclass
+++ b/eclass/dune.eclass
@@ -23,6 +23,9 @@ case ${EAPI:-0} in
*) die "${ECLASS}: EAPI ${EAPI} not supported" ;;
esac
+# Do not complain about CFLAGS etc since ml projects do not use them.
+QA_FLAGS_IGNORED='.*'
+
EXPORT_FUNCTIONS src_compile src_test src_install
RDEPEND=">=dev-lang/ocaml-4:=[ocamlopt?]"
diff --git a/eclass/findlib.eclass b/eclass/findlib.eclass
index 8fc5fd625a17..8090d6ce5c29 100644
--- a/eclass/findlib.eclass
+++ b/eclass/findlib.eclass
@@ -10,7 +10,8 @@
# @DESCRIPTION:
# ocamlfind (a.k.a. findlib) eclass
-
+# Do not complain about CFLAGS etc since ml projects do not use them.
+QA_FLAGS_IGNORED='.*'
# From this findlib version there is proper stublibs support.
DEPEND=">=dev-ml/findlib-1.0.4-r1"
diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass
index c6f4d2a56c11..e532c953cb70 100644
--- a/eclass/llvm.org.eclass
+++ b/eclass/llvm.org.eclass
@@ -1,4 +1,4 @@
-# Copyright 2019-2020 Gentoo Authors
+# Copyright 2019-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: llvm.org.eclass
@@ -44,7 +44,7 @@ esac
# @DESCRIPTION:
# The major version of current LLVM trunk. Used to determine
# the correct branch to use.
-_LLVM_MASTER_MAJOR=12
+_LLVM_MASTER_MAJOR=13
# @ECLASS-VARIABLE: _LLVM_SOURCE_TYPE
# @INTERNAL
diff --git a/eclass/opam.eclass b/eclass/opam.eclass
index 0420b99f71c5..05ebea510548 100644
--- a/eclass/opam.eclass
+++ b/eclass/opam.eclass
@@ -17,6 +17,9 @@ case ${EAPI:-0} in
*) die "${ECLASS}: EAPI ${EAPI} not supported" ;;
esac
+# Do not complain about CFLAGS etc since ml projects do not use them.
+QA_FLAGS_IGNORED='.*'
+
# @ECLASS-VARIABLE: OPAM_INSTALLER_DEP
# @DESCRIPTION:
# Override dependency for OPAM_INSTALLER
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index 4a4bb27fc084..267cf5cfce34 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -1,4 +1,4 @@
-# Copyright 2002-2019 Gentoo Authors
+# Copyright 2002-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: toolchain-funcs.eclass
@@ -505,12 +505,21 @@ tc-ld-is-lld() {
# If the gold linker is currently selected, configure the compilation
# settings so that we use the older bfd linker instead.
tc-ld-disable-gold() {
- if ! tc-ld-is-gold "$@" ; then
- # They aren't using gold, so nothing to do!
+ tc-ld-is-gold "$@" && tc-ld-force-bfd "$@"
+}
+
+# @FUNCTION: tc-ld-force-bfd
+# @USAGE: [toolchain prefix]
+# @DESCRIPTION:
+# If the gold or lld linker is currently selected, configure the compilation
+# settings so that we use the bfd linker instead.
+tc-ld-force-bfd() {
+ if ! tc-ld-is-gold "$@" && ! tc-ld-is-lld "$@" ; then
+ # They aren't using gold or lld, so nothing to do!
return
fi
- ewarn "Forcing usage of the BFD linker instead of GOLD"
+ ewarn "Forcing usage of the BFD linker"
# Set up LD to point directly to bfd if it's available.
# We need to extract the first word in case there are flags appended
@@ -520,7 +529,7 @@ tc-ld-disable-gold() {
local path_ld=$(which "${bfd_ld}" 2>/dev/null)
[[ -e ${path_ld} ]] && export LD=${bfd_ld}
- # Set up LDFLAGS to select gold based on the gcc / clang version.
+ # Set up LDFLAGS to select bfd based on the gcc / clang version.
local fallback="true"
if tc-is-gcc; then
local major=$(gcc-major-version "$@")
@@ -548,7 +557,7 @@ tc-ld-disable-gold() {
ln -sf "${path_ld}" "${d}"/ld
export LDFLAGS="${LDFLAGS} -B${d}"
else
- die "unable to locate a BFD linker to bypass gold"
+ die "unable to locate a BFD linker"
fi
fi
}