summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-07-12 08:41:54 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-07-12 08:41:54 +0100
commit4df3bf9762850b34cd1ead5c80374d1a0fc3362e (patch)
tree3080c5cb7ad17abcb63776a9f21c4947845546a6 /eclass
parent814f4cf860e299a046b649eaee5463427984c09c (diff)
gentoo resync : 12.07.2021
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin36314 -> 36339 bytes
-rw-r--r--eclass/autotools.eclass21
-rw-r--r--eclass/ghc-package.eclass10
-rw-r--r--eclass/gnustep-2.eclass9
-rw-r--r--eclass/gnustep-base.eclass11
-rw-r--r--eclass/gstreamer-meson.eclass58
-rw-r--r--eclass/haskell-cabal.eclass43
-rw-r--r--eclass/qmake-utils.eclass78
-rw-r--r--eclass/qt5-build.eclass7
-rw-r--r--eclass/ruby-utils.eclass6
-rw-r--r--eclass/s6.eclass8
-rw-r--r--eclass/vala.eclass6
12 files changed, 116 insertions, 141 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index 47157a14846c..27f4f22088b7 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
index b386654c8328..837f9e7a9aab 100644
--- a/eclass/autotools.eclass
+++ b/eclass/autotools.eclass
@@ -4,7 +4,7 @@
# @ECLASS: autotools.eclass
# @MAINTAINER:
# base-system@gentoo.org
-# @SUPPORTED_EAPIS: 5 6 7
+# @SUPPORTED_EAPIS: 5 6 7 8
# @BLURB: Regenerates auto* build scripts
# @DESCRIPTION:
# This eclass is for safely handling autotooled software packages that need to
@@ -31,7 +31,7 @@ case ${EAPI} in
# Needed for eqawarn
inherit eutils
;;
- 7) ;;
+ 7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI} not supported" ;;
esac
@@ -373,10 +373,21 @@ eautoconf() {
die "No configure.{ac,in} present!"
fi
+
if [[ ${WANT_AUTOCONF} != "2.1" && -e configure.in ]] ; then
- eqawarn "This package has a configure.in file which has long been deprecated. Please"
- eqawarn "update it to use configure.ac instead as newer versions of autotools will die"
- eqawarn "when it finds this file. See https://bugs.gentoo.org/426262 for details."
+ case ${EAPI:-0} in
+ 0|1|2|3|4|5|6|7)
+ eqawarn "This package has a configure.in file which has long been deprecated. Please"
+ eqawarn "update it to use configure.ac instead as newer versions of autotools will die"
+ eqawarn "when it finds this file. See https://bugs.gentoo.org/426262 for details."
+ ;;
+ *)
+ # Move configure file to the new location only on newer EAPIs to ensure
+ # checks are done rather than retroactively breaking ebuilds.
+ eqawarn "Moving configure.in to configure.ac (bug #426262)"
+ mv configure.{in,ac} || die
+ ;;
+ esac
fi
# Install config.guess and config.sub which are required by many macros
diff --git a/eclass/ghc-package.eclass b/eclass/ghc-package.eclass
index 5decbaa228e8..1d90c7fc383e 100644
--- a/eclass/ghc-package.eclass
+++ b/eclass/ghc-package.eclass
@@ -4,7 +4,7 @@
# @ECLASS: ghc-package.eclass
# @MAINTAINER:
# "Gentoo's Haskell Language team" <haskell@gentoo.org>
-# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
+# @SUPPORTED_EAPIS: 6 7 8
# @AUTHOR:
# Original Author: Andres Loeh <kosmikus@gentoo.org>
# @BLURB: This eclass helps with the Glasgow Haskell Compiler's package configuration utility.
@@ -14,10 +14,10 @@
inherit multiprocessing
# Maintain version-testing compatibility with ebuilds not using EAPI 7.
-case "${EAPI:-0}" in
- 0|1|2|3|7) ;;
- 4|5|6) inherit eapi7-ver ;;
- *) die "EAPI ${EAPI} unsupported." ;;
+case ${EAPI} in
+ 7|8) ;;
+ 6) inherit eapi7-ver ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
# GHC uses it's own native code generator. Portage's
diff --git a/eclass/gnustep-2.eclass b/eclass/gnustep-2.eclass
index fc3d2d0fe3bd..2d615db3a1f2 100644
--- a/eclass/gnustep-2.eclass
+++ b/eclass/gnustep-2.eclass
@@ -4,14 +4,14 @@
# @ECLASS: gnustep-2.eclass
# @MAINTAINER:
# GNUstep Herd <gnustep@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6 7
+# @SUPPORTED_EAPIS: 5 6 7 8
# @BLURB: eclass for GNUstep Apps, Frameworks, and Bundles build
# @DESCRIPTION:
# This eclass sets up GNUstep environment to properly install
# GNUstep packages
case ${EAPI:-0} in
- [567]) ;;
+ [5678]) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -34,9 +34,8 @@ RDEPEND="${DEPEND}"
# The following gnustep-based EXPORT_FUNCTIONS are available:
# * gnustep-base_pkg_setup
-# * gnustep-base_src_unpack (EAPI 0|1 only)
-# * gnustep-base_src_prepare (EAPI>=2 only)
-# * gnustep-base_src_configure (EAPI>=2 only)
+# * gnustep-base_src_prepare
+# * gnustep-base_src_configure
# * gnustep-base_src_compile
# * gnustep-base_src_install
# * gnustep-base_pkg_postinst
diff --git a/eclass/gnustep-base.eclass b/eclass/gnustep-base.eclass
index 2f836eb2830f..fb4a48b734cd 100644
--- a/eclass/gnustep-base.eclass
+++ b/eclass/gnustep-base.eclass
@@ -4,14 +4,14 @@
# @ECLASS: gnustep-base.eclass
# @MAINTAINER:
# GNUstep Herd <gnustep@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6 7
+# @SUPPORTED_EAPIS: 5 6 7 8
# @BLURB: Internal handling of GNUstep pacakges
# @DESCRIPTION:
# Inner gnustep eclass, should only be inherited directly by gnustep-base
# packages
case ${EAPI:-0} in
- [567]) inherit eutils ;;
+ [5678]) inherit eutils ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -50,13 +50,6 @@ gnustep-base_pkg_setup() {
filter-flags -fomit-frame-pointer
}
-gnustep-base_src_unpack() {
- unpack ${A}
- cd "${S}"
-
- gnustep-base_src_prepare
-}
-
gnustep-base_src_prepare() {
if [[ -f ./GNUmakefile ]] ; then
# Kill stupid includes that are simply overdone or useless on normal
diff --git a/eclass/gstreamer-meson.eclass b/eclass/gstreamer-meson.eclass
index f1962073fd2b..03ec98c17b95 100644
--- a/eclass/gstreamer-meson.eclass
+++ b/eclass/gstreamer-meson.eclass
@@ -77,6 +77,64 @@ gstreamer_get_plugins() {
"/^# Feature options for plugins (with|that need) external deps$/,/^#.*$/s;^option\('([^']*)'.*;\1;p" \
"${S}/meson_options.txt" || die "Failed to extract options for plugins with external deps"
)
+
+ # opencv and hls in gst-plugins-bad are split, can't be properly detected
+ if grep -q "option('opencv'" "${EMESON_SOURCE}"/meson_options.txt ; then
+ GST_PLUGINS_EXT_DEPS="${GST_PLUGINS_EXT_DEPS}
+opencv"
+ fi
+ if grep -q "option('hls'" "${EMESON_SOURCE}"/meson_options.txt ; then
+ GST_PLUGINS_EXT_DEPS="${GST_PLUGINS_EXT_DEPS}
+hls"
+ fi
+}
+
+# @FUNCTION: gstreamer_system_package
+# @USAGE: <gstaudio_dep:gstreamer-audio> [...]
+# @DESCRIPTION:
+# Walks through meson.build in order to make sure build will link against system
+# libraries.
+# Takes a list of path fragments and corresponding pkgconfig libraries
+# separated by colon (:). Will replace the path fragment by the output of
+# pkgconfig.
+gstreamer_system_package() {
+ local pdir directory libs pkgconfig pc tuple plugin_dir
+ pkgconfig=$(tc-getPKG_CONFIG)
+
+ for plugin_dir in ${GST_PLUGINS_BUILD_DIR} ; do
+ pdir=$(gstreamer_get_plugin_dir ${plugin_dir})
+
+ for tuple in $@ ; do
+ dependency=${tuple%:*}
+ pc=${tuple#*:}-${SLOT}
+ sed -e "1i${dependency} = dependency('${pc}', required : true)" \
+ -i "${pdir}"/meson.build || die
+ done
+ done
+}
+
+# @FUNCTION: gstreamer_system_library
+# @USAGE: <gstbasecamerabin_dep:libgstbasecamerabinsrc> [...]
+# @DESCRIPTION:
+# Walks through meson.build in order to make sure build will link against system
+# libraries.
+# Takes a list of path fragments and corresponding pkgconfig libraries
+# separated by colon (:). Will replace the path fragment by the output of
+# pkgconfig.
+gstreamer_system_library() {
+ local pdir directory libs pkgconfig pc tuple plugin_dir
+ pkgconfig=$(tc-getPKG_CONFIG)
+
+ for plugin_dir in ${GST_PLUGINS_BUILD_DIR} ; do
+ pdir=$(gstreamer_get_plugin_dir ${plugin_dir})
+
+ for tuple in $@ ; do
+ dependency=${tuple%:*}
+ pc=${tuple#*:}-${SLOT}
+ sed -e "1i${dependency} = cc.find_library('${pc}', required : true)" \
+ -i "${pdir}"/meson.build || die
+ done
+ done
}
# @ECLASS-VARIABLE: GST_PLUGINS_BUILD_DIR
diff --git a/eclass/haskell-cabal.eclass b/eclass/haskell-cabal.eclass
index 5b67f43f0c5a..0e41325b3061 100644
--- a/eclass/haskell-cabal.eclass
+++ b/eclass/haskell-cabal.eclass
@@ -4,7 +4,7 @@
# @ECLASS: haskell-cabal.eclass
# @MAINTAINER:
# Haskell herd <haskell@gentoo.org>
-# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
+# @SUPPORTED_EAPIS: 6 7 8
# @AUTHOR:
# Original author: Andres Loeh <kosmikus@gentoo.org>
# Original author: Duncan Coutts <dcoutts@gentoo.org>
@@ -40,7 +40,16 @@
# FEATURE can be removed once https://github.com/haskell/cabal/issues/7213
# is fixed.
-inherit eutils ghc-package multilib toolchain-funcs
+case ${EAPI} in
+ # eutils is for eqawarn
+ 6|7) inherit eutils ;;
+ 8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
+inherit ghc-package multilib toolchain-funcs
+
+EXPORT_FUNCTIONS pkg_setup src_configure src_compile src_test src_install pkg_postinst pkg_postrm
# @ECLASS-VARIABLE: CABAL_EXTRA_CONFIGURE_FLAGS
# @USER_VARIABLE
@@ -113,21 +122,11 @@ inherit eutils ghc-package multilib toolchain-funcs
# Set to anything else to disable.
: ${CABAL_REPORT_OTHER_BROKEN_PACKAGES:=yes}
-HASKELL_CABAL_EXPF="pkg_setup src_compile src_test src_install pkg_postinst pkg_postrm"
-
# 'dev-haskell/cabal' passes those options with ./configure-based
# configuration, but most packages don't need/don't accept it:
# #515362, #515362
QA_CONFIGURE_OPTIONS+=" --with-compiler --with-hc --with-hc-pkg --with-gcc"
-case "${EAPI:-0}" in
- 0|1) ;;
- 2|3|4|5|6|7) HASKELL_CABAL_EXPF+=" src_configure" ;;
- *) die "EAPI ${EAPI} unsupported." ;;
-esac
-
-EXPORT_FUNCTIONS ${HASKELL_CABAL_EXPF}
-
for feature in ${CABAL_FEATURES}; do
case ${feature} in
haddock) CABAL_USE_HADDOCK=yes;;
@@ -141,9 +140,6 @@ for feature in ${CABAL_FEATURES}; do
test-suite) CABAL_TEST_SUITE=yes;;
rebuild-after-doc-workaround) CABAL_REBUILD_AFTER_DOC_WORKAROUND=yes;;
- # does nothing, removed 2016-09-04
- bin) ;;
-
*) CABAL_UNKNOWN="${CABAL_UNKNOWN} ${feature}";;
esac
done
@@ -315,7 +311,6 @@ cabal-show-brokens-and-die() {
cabal-configure() {
local cabalconf=()
- has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
if [[ -n "${CABAL_USE_HADDOCK}" ]] && use doc; then
# We use the bundled with GHC version if exists
@@ -452,8 +447,6 @@ cabal-build() {
}
cabal-copy() {
- has "${EAPI:-0}" 0 1 2 && ! use prefix && ED=${D}
-
set -- copy --destdir="${D}" "$@"
echo ./setup "$@"
./setup "$@" || die "setup copy failed"
@@ -535,20 +528,8 @@ cabal_src_configure() {
# exported function: cabal-style bootstrap configure and compile
cabal_src_compile() {
- # it's a common mistake when one bumps ebuild to EAPI="2" (and upper)
- # and forgets to separate src_compile() to src_configure()/src_compile().
- # Such error leads to default src_configure and we lose all passed flags.
- if ! has "${EAPI:-0}" 0 1; then
- local passed_flag
- for passed_flag in "$@"; do
- [[ ${passed_flag} == --flags=* ]] && \
- eqawarn "QA Notice: Cabal option '${passed_flag}' has effect only in src_configure()"
- done
- fi
-
cabal-is-dummy-lib && return
- has src_configure ${HASKELL_CABAL_EXPF} || haskell-cabal_src_configure "$@"
cabal-build
if [[ -n "$CABAL_USE_HADDOCK" ]] && use doc; then
@@ -616,8 +597,6 @@ haskell-cabal_src_test() {
# exported function: cabal-style copy and register
cabal_src_install() {
- has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
-
if ! cabal-is-dummy-lib; then
cabal-copy
cabal-pkg
diff --git a/eclass/qmake-utils.eclass b/eclass/qmake-utils.eclass
index 0d49eb94382c..1f09cbd9ca77 100644
--- a/eclass/qmake-utils.eclass
+++ b/eclass/qmake-utils.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: qmake-utils.eclass
@@ -6,7 +6,7 @@
# qt@gentoo.org
# @AUTHOR:
# Davide Pesavento <pesa@gentoo.org>
-# @SUPPORTED_EAPIS: 7
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: Common functions for qmake-based packages.
# @DESCRIPTION:
# Utility eclass providing wrapper functions for Qt5 qmake.
@@ -14,63 +14,15 @@
# This eclass does not set any metadata variables nor export any phase
# functions. It can be inherited safely.
-if [[ -z ${_QMAKE_UTILS_ECLASS} ]]; then
-_QMAKE_UTILS_ECLASS=1
-
case ${EAPI} in
- 7) ;;
- *) die "EAPI=${EAPI:-0} is not supported" ;;
+ 7|8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-inherit toolchain-funcs
-
-# @FUNCTION: _qmake-utils_banned_func
-# @INTERNAL
-# @DESCRIPTION:
-# Banned functions are banned.
-_qmake-utils_banned_func() {
- die "${FUNCNAME[1]} is banned in EAPI 7 and later"
-}
-
-# @FUNCTION: qt4_get_bindir
-# @INTERNAL
-# @DESCRIPTION:
-# Banned.
-qt4_get_bindir() {
- _qmake-utils_banned_func
-}
-
-# @FUNCTION: qt4_get_headerdir
-# @INTERNAL
-# @DESCRIPTION:
-# Banned.
-qt4_get_headerdir() {
- _qmake-utils_banned_func
-}
-
-# @FUNCTION: qt4_get_libdir
-# @INTERNAL
-# @DESCRIPTION:
-# Banned.
-qt4_get_libdir() {
- _qmake-utils_banned_func
-}
-
-# @FUNCTION: qt4_get_mkspecsdir
-# @INTERNAL
-# @DESCRIPTION:
-# Banned.
-qt4_get_mkspecsdir() {
- _qmake-utils_banned_func
-}
+if [[ -z ${_QMAKE_UTILS_ECLASS} ]]; then
+_QMAKE_UTILS_ECLASS=1
-# @FUNCTION: qt4_get_plugindir
-# @INTERNAL
-# @DESCRIPTION:
-# Banned.
-qt4_get_plugindir() {
- _qmake-utils_banned_func
-}
+inherit toolchain-funcs
# @FUNCTION: qt5_get_bindir
# @DESCRIPTION:
@@ -108,22 +60,6 @@ qt5_get_plugindir() {
echo $(qt5_get_libdir)/qt5/plugins
}
-# @FUNCTION: qmake-utils_find_pro_file
-# @INTERNAL
-# @DESCRIPTION:
-# Banned.
-qmake-utils_find_pro_file() {
- _qmake-utils_banned_func
-}
-
-# @FUNCTION: eqmake4
-# @INTERNAL
-# @DESCRIPTION:
-# Banned.
-eqmake4() {
- _qmake-utils_banned_func
-}
-
# @FUNCTION: eqmake5
# @USAGE: [arguments for qmake]
# @DESCRIPTION:
diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass
index e94f3f33a101..bc5928d33140 100644
--- a/eclass/qt5-build.eclass
+++ b/eclass/qt5-build.eclass
@@ -10,15 +10,14 @@
# @BLURB: Eclass for Qt5 split ebuilds.
# @DESCRIPTION:
# This eclass contains various functions that are used when building Qt5.
-# Requires EAPI 7.
if [[ ${CATEGORY} != dev-qt ]]; then
- die "qt5-build.eclass is only to be used for building Qt 5"
+ die "${ECLASS} is only to be used for building Qt 5"
fi
case ${EAPI} in
- 7) : ;;
- *) die "qt5-build.eclass: unsupported EAPI=${EAPI:-0}" ;;
+ 7) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
# @ECLASS-VARIABLE: QT5_MODULE
diff --git a/eclass/ruby-utils.eclass b/eclass/ruby-utils.eclass
index 4db362e2cd50..2506aee25541 100644
--- a/eclass/ruby-utils.eclass
+++ b/eclass/ruby-utils.eclass
@@ -6,7 +6,7 @@
# Ruby team <ruby@gentoo.org>
# @AUTHOR:
# Author: Hans de Graaff <graaff@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6 7
+# @SUPPORTED_EAPIS: 5 6 7 8
# @BLURB: An eclass for supporting ruby scripts and bindings in non-ruby packages
# @DESCRIPTION:
# The ruby-utils eclass is designed to allow an easier installation of
@@ -16,7 +16,7 @@
# functions. It can be inherited safely.
case ${EAPI:-0} in
- [567]) ;;
+ [5678]) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -33,7 +33,7 @@ if [[ ! ${_RUBY_UTILS} ]]; then
# provide for a better first installation experience.
# All stable RUBY_TARGETS
-RUBY_TARGETS_PREFERENCE="ruby26 ruby25 "
+RUBY_TARGETS_PREFERENCE="ruby26 "
# All other active ruby targets
RUBY_TARGETS_PREFERENCE+="ruby27 ruby30"
diff --git a/eclass/s6.eclass b/eclass/s6.eclass
index b84d5a166db9..25960ba4a1db 100644
--- a/eclass/s6.eclass
+++ b/eclass/s6.eclass
@@ -4,7 +4,7 @@
# @ECLASS: s6.eclass
# @MAINTAINER:
# William Hubbs <williamh@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6 7
+# @SUPPORTED_EAPIS: 5 6 7 8
# @BLURB: helper functions to install s6 services
# @DESCRIPTION:
# This eclass provides helpers to install s6 services.
@@ -25,9 +25,9 @@
# }
# @CODE
-case ${EAPI:-0} in
- 5|6|7) ;;
- *) die "${ECLASS}.eclass: API in EAPI ${EAPI} not yet established" ;;
+case ${EAPI} in
+ 5|6|7|8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
# @FUNCTION: _s6_get_servicedir
diff --git a/eclass/vala.eclass b/eclass/vala.eclass
index 59b5f671c5d4..0431bb86377c 100644
--- a/eclass/vala.eclass
+++ b/eclass/vala.eclass
@@ -28,12 +28,12 @@ _VALA_ECLASS=1
# @ECLASS-VARIABLE: VALA_MIN_API_VERSION
# @DESCRIPTION:
-# Minimum vala API version (e.g. 0.36).
+# Minimum vala API version (e.g. 0.44).
VALA_MIN_API_VERSION=${VALA_MIN_API_VERSION:-0.44}
# @ECLASS-VARIABLE: VALA_MAX_API_VERSION
# @DESCRIPTION:
-# Maximum vala API version (e.g. 0.36).
+# Maximum vala API version (e.g. 0.52).
VALA_MAX_API_VERSION=${VALA_MAX_API_VERSION:-0.52}
# @ECLASS-VARIABLE: VALA_USE_DEPEND
@@ -52,7 +52,7 @@ vala_api_versions() {
local minimal_supported_minor_version minor_version
# Dependency atoms are not generated for Vala versions older than 0.${minimal_supported_minor_version}.
- minimal_supported_minor_version="36"
+ minimal_supported_minor_version="44"
for ((minor_version = ${VALA_MAX_API_VERSION#*.}; minor_version >= ${VALA_MIN_API_VERSION#*.}; minor_version = minor_version - 2)); do
# 0.38 was never in main tree; remove the special case once minimal_supported_minor_version >= 40