summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-tcltk/snack/files/snack-2.2.10-test.patch30
-rw-r--r--eclass/acct-group.eclass9
-rw-r--r--eclass/acct-user.eclass10
-rw-r--r--eclass/ada.eclass7
-rw-r--r--eclass/ant-tasks.eclass11
-rw-r--r--eclass/apache-module.eclass11
-rw-r--r--eclass/autotools.eclass16
-rw-r--r--eclass/bzr.eclass8
-rw-r--r--eclass/cargo.eclass23
-rw-r--r--eclass/check-reqs.eclass10
-rw-r--r--eclass/chromium-2.eclass4
-rw-r--r--eclass/cmake-multilib.eclass4
-rw-r--r--eclass/cmake.eclass2
-rw-r--r--eclass/common-lisp-3.eclass10
-rw-r--r--eclass/cron.eclass85
-rw-r--r--eclass/cuda.eclass25
-rw-r--r--eclass/cvs.eclass12
-rw-r--r--eclass/db.eclass126
-rw-r--r--eclass/distutils-r1.eclass20
-rw-r--r--eclass/docs.eclass4
-rw-r--r--eclass/eapi8-dosym.eclass8
-rw-r--r--eclass/ecm.eclass4
-rw-r--r--eclass/elisp.eclass8
-rw-r--r--eclass/fcaps.eclass6
-rw-r--r--eclass/findlib.eclass16
-rw-r--r--eclass/font-ebdftopcf.eclass8
-rw-r--r--eclass/font.eclass14
-rw-r--r--eclass/fortran-2.eclass20
-rw-r--r--eclass/frameworks.kde.org.eclass4
-rw-r--r--eclass/freedict.eclass16
-rw-r--r--eclass/gear.kde.org.eclass4
-rw-r--r--eclass/git-r3.eclass97
-rw-r--r--eclass/gnome2.eclass154
-rw-r--r--eclass/gnustep-2.eclass4
-rw-r--r--eclass/go-module.eclass13
-rw-r--r--eclass/golang-build.eclass24
-rw-r--r--eclass/golang-vcs-snapshot.eclass23
-rw-r--r--eclass/golang-vcs.eclass24
-rw-r--r--eclass/haskell-cabal.eclass15
-rw-r--r--eclass/java-ant-2.eclass12
-rw-r--r--eclass/java-vm-2.eclass17
-rw-r--r--eclass/kde.org.eclass4
-rw-r--r--eclass/kodi-addon.eclass6
-rw-r--r--eclass/libtool.eclass8
-rw-r--r--eclass/linux-info.eclass20
-rw-r--r--eclass/llvm.org.eclass13
-rw-r--r--eclass/lua-single.eclass19
-rw-r--r--eclass/lua-utils.eclass13
-rw-r--r--eclass/lua.eclass19
-rw-r--r--eclass/mate-desktop.org.eclass12
-rw-r--r--eclass/mate.eclass12
-rw-r--r--eclass/meson-multilib.eclass6
-rw-r--r--eclass/meson.eclass6
-rw-r--r--eclass/mono-env.eclass12
-rw-r--r--eclass/mount-boot.eclass8
-rw-r--r--eclass/myspell-r2.eclass13
-rw-r--r--eclass/netsurf.eclass6
-rw-r--r--eclass/office-ext-r1.eclass22
-rw-r--r--eclass/optfeature.eclass4
-rw-r--r--eclass/out-of-source.eclass4
-rw-r--r--eclass/php-pear-r2.eclass24
-rw-r--r--eclass/plasma-mobile.kde.org.eclass4
-rw-r--r--eclass/plasma.kde.org.eclass4
-rw-r--r--eclass/python-r1.eclass4
-rw-r--r--eclass/qmail.eclass59
-rw-r--r--eclass/qt5-build.eclass16
-rw-r--r--eclass/qt6-build.eclass22
-rw-r--r--eclass/rebar.eclass9
-rw-r--r--eclass/ruby-ng.eclass25
-rw-r--r--eclass/savedconfig.eclass17
-rw-r--r--eclass/sgml-catalog-r1.eclass14
-rw-r--r--eclass/ssl-cert.eclass8
-rw-r--r--eclass/subversion.eclass44
-rw-r--r--eclass/sword-module.eclass3
-rwxr-xr-xeclass/tests/distutils-r1.sh2
-rwxr-xr-xeclass/tests/distutils-r1_single.sh2
-rw-r--r--eclass/texlive-common.eclass13
-rw-r--r--eclass/texlive-module.eclass17
-rw-r--r--eclass/toolchain.eclass11
-rw-r--r--eclass/tree-sitter-grammar.eclass19
-rw-r--r--eclass/unpacker.eclass8
-rw-r--r--eclass/vdr-plugin-2.eclass69
-rw-r--r--eclass/verify-sig.eclass8
-rw-r--r--eclass/vim-plugin.eclass20
-rw-r--r--eclass/vim-spell.eclass10
-rw-r--r--eclass/virtualx.eclass6
-rw-r--r--eclass/webapp.eclass12
-rw-r--r--eclass/xdg.eclass65
-rw-r--r--eclass/xorg-3.eclass28
-rw-r--r--sys-libs/zlib-ng/Manifest1
-rw-r--r--sys-libs/zlib-ng/zlib-ng-2.0.6.ebuild78
91 files changed, 797 insertions, 950 deletions
diff --git a/dev-tcltk/snack/files/snack-2.2.10-test.patch b/dev-tcltk/snack/files/snack-2.2.10-test.patch
index 2ba3a0e82d99..ba8a91c8774d 100644
--- a/dev-tcltk/snack/files/snack-2.2.10-test.patch
+++ b/dev-tcltk/snack/files/snack-2.2.10-test.patch
@@ -117,3 +117,33 @@
test dbpower-1.3 {dBPowerSpectrum command, -end and -skip options} {
set s [snack::sound snd -load ex1.wav]
set tcl_precision 5
+--- a/tests/filter.test 2023-03-17 22:53:35.463977748 +0100
++++ b/tests/filter.test 2023-03-17 22:55:40.931996456 +0100
+@@ -362,27 +362,6 @@
+ set res
+ } {16000 16000 10026 -6287 Lin16 1 RAW 0}
+
+-test filter-7.1 {iir filter, applied to sound} {
+- set s [snack::sound snd -load ex1.wav]
+- set f [snack::filter iir -numerator "0.99 -0.99" -denominator "1 -0.99"]
+- $s filter $f -continuedrain 0
+- set res [$s info]
+- $f destroy
+- $s destroy
+- set res
+-} {15820 16000 13222 -9615 Lin16 1 WAV 44}
+-
+-test filter-7.2 {iir filter, applied to stereo sound} {
+- set s [snack::sound snd -load ex1.wav]
+- $s convert -channels 2
+- set f [snack::filter iir -numerator "0.99 -0.99" -denominator "1 -0.99"]
+- $s filter $f -continuedrain 0
+- set res [$s info]
+- $f destroy
+- $s destroy
+- set res
+-} {15820 16000 13222 -9616 Lin16 2 WAV 44}
+-
+ test filter-8.1 {fade filter, applied to sound} {
+ set s [snack::sound snd -rate 4000]
+ $s length 4
diff --git a/eclass/acct-group.eclass b/eclass/acct-group.eclass
index f55c9f4c9587..47e2d278f73e 100644
--- a/eclass/acct-group.eclass
+++ b/eclass/acct-group.eclass
@@ -1,4 +1,4 @@
-# Copyright 2019-2022 Gentoo Authors
+# Copyright 2019-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: acct-group.eclass
@@ -36,9 +36,9 @@
if [[ -z ${_ACCT_GROUP_ECLASS} ]]; then
_ACCT_GROUP_ECLASS=1
-case ${EAPI:-0} in
+case ${EAPI} in
7|8) ;;
- *) die "EAPI=${EAPI:-0} not supported";;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
inherit user-info
@@ -83,7 +83,6 @@ S=${WORKDIR}
# << Phase functions >>
-EXPORT_FUNCTIONS pkg_pretend src_install pkg_preinst
# @FUNCTION: acct-group_pkg_pretend
# @DESCRIPTION:
@@ -184,3 +183,5 @@ acct-group_pkg_preinst() {
}
fi
+
+EXPORT_FUNCTIONS pkg_pretend src_install pkg_preinst
diff --git a/eclass/acct-user.eclass b/eclass/acct-user.eclass
index 14fda76ced73..145fdb41aaf8 100644
--- a/eclass/acct-user.eclass
+++ b/eclass/acct-user.eclass
@@ -1,4 +1,4 @@
-# Copyright 2019-2022 Gentoo Authors
+# Copyright 2019-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: acct-user.eclass
@@ -44,9 +44,9 @@
if [[ -z ${_ACCT_USER_ECLASS} ]]; then
_ACCT_USER_ECLASS=1
-case ${EAPI:-0} in
+case ${EAPI} in
7|8) ;;
- *) die "EAPI=${EAPI:-0} not supported";;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
inherit user-info
@@ -212,8 +212,6 @@ eislocked() {
}
# << Phase functions >>
-EXPORT_FUNCTIONS pkg_pretend src_install pkg_preinst pkg_postinst \
- pkg_prerm
# @FUNCTION: acct-user_pkg_pretend
# @DESCRIPTION:
@@ -490,3 +488,5 @@ acct-user_pkg_prerm() {
}
fi
+
+EXPORT_FUNCTIONS pkg_pretend src_install pkg_preinst pkg_postinst pkg_prerm
diff --git a/eclass/ada.eclass b/eclass/ada.eclass
index 39f76854e4fc..eea41c0cff48 100644
--- a/eclass/ada.eclass
+++ b/eclass/ada.eclass
@@ -28,7 +28,8 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-EXPORT_FUNCTIONS pkg_setup
+if [[ -z ${_ADA_ECLASS} ]]; then
+_ADA_ECLASS=1
# @ECLASS_VARIABLE: ADA_DEPS
# @OUTPUT_VARIABLE
@@ -523,3 +524,7 @@ ada_pkg_setup() {
[[ ${MERGE_TYPE} != binary ]] && ada_setup
}
+
+fi
+
+EXPORT_FUNCTIONS pkg_setup
diff --git a/eclass/ant-tasks.eclass b/eclass/ant-tasks.eclass
index 98a35dd40c4d..d599238ba253 100644
--- a/eclass/ant-tasks.eclass
+++ b/eclass/ant-tasks.eclass
@@ -1,4 +1,4 @@
-# Copyright 2007-2022 Gentoo Authors
+# Copyright 2007-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: ant-tasks.eclass
@@ -18,14 +18,15 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
+if [[ -z ${_ANT_TASKS_ECLASS} ]]; then
+_ANT_TASKS_ECLASS=1
+
# we set ant-core dep ourselves, restricted
JAVA_ANT_DISABLE_ANT_CORE_DEP=true
# rewriting build.xml for are the testcases has no reason atm
JAVA_PKG_BSFIX_ALL=no
inherit java-pkg-2 java-ant-2
-EXPORT_FUNCTIONS src_unpack src_compile src_install
-
# @ECLASS_VARIABLE: ANT_TASK_JDKVER
# @PRE_INHERIT
# @DESCRIPTION:
@@ -164,3 +165,7 @@ ant-tasks_src_install() {
dodir /usr/share/ant/lib
dosym /usr/share/${PN}/lib/${PN}.jar /usr/share/ant/lib/${PN}.jar
}
+
+fi
+
+EXPORT_FUNCTIONS src_unpack src_compile src_install
diff --git a/eclass/apache-module.eclass b/eclass/apache-module.eclass
index 60631171ed91..8074aff5ddcb 100644
--- a/eclass/apache-module.eclass
+++ b/eclass/apache-module.eclass
@@ -1,18 +1,17 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: apache-module.eclass
# @MAINTAINER:
# apache-bugs@gentoo.org
-# @SUPPORTED_EAPIS: 5 6 7
+# @SUPPORTED_EAPIS: 6 7
# @BLURB: Provides a common set of functions for apache modules
# @DESCRIPTION:
# This eclass handles apache modules in a sane way.
#
# To make use of this eclass simply call one of the need/want_apache functions
# described in depend.apache.eclass. Make sure you use the need/want_apache call
-# after you have defined DEPEND and RDEPEND. Also note that you can not rely on
-# the automatic RDEPEND=DEPEND that portage does if you use this eclass.
+# after you have defined DEPEND and RDEPEND.
#
# See Bug 107127 for more information.
#
@@ -46,8 +45,8 @@
# @CODE
case ${EAPI} in
- [5-7]) ;;
- *) die "EAPI=${EAPI:-0} is not supported" ;;
+ 6|7) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
if [[ -z ${_APACHE_MODULE_ECLASS} ]]; then
diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
index e93338ac6b97..3a9119856abc 100644
--- a/eclass/autotools.eclass
+++ b/eclass/autotools.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: autotools.eclass
@@ -13,6 +13,11 @@
# Note: We require GNU m4, as does autoconf. So feel free to use any features
# from the GNU version of m4 without worrying about other variants (i.e. BSD).
+case ${EAPI} in
+ 6|7|8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
if [[ ${_AUTOTOOLS_AUTO_DEPEND+set} == "set" ]] ; then
# See if we were included already, but someone changed the value
# of AUTOTOOLS_AUTO_DEPEND on us. We could reload the entire
@@ -26,14 +31,7 @@ fi
if [[ -z ${_AUTOTOOLS_ECLASS} ]] ; then
_AUTOTOOLS_ECLASS=1
-case ${EAPI} in
- 6)
- # Needed for eqawarn
- inherit eutils
- ;;
- 7|8) ;;
- *) die "${ECLASS}: EAPI ${EAPI} not supported" ;;
-esac
+[[ ${EAPI} == 6 ]] && inherit eqawarn
inherit gnuconfig libtool
diff --git a/eclass/bzr.eclass b/eclass/bzr.eclass
index ba4ddad45f18..552990e3a581 100644
--- a/eclass/bzr.eclass
+++ b/eclass/bzr.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: bzr.eclass
@@ -21,15 +21,13 @@
case ${EAPI} in
7|8) ;;
- *) die "${ECLASS}: EAPI ${EAPI:-0} is not supported" ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
PROPERTIES+=" live"
BDEPEND="dev-vcs/breezy"
-EXPORT_FUNCTIONS src_unpack
-
# @ECLASS_VARIABLE: EBZR_STORE_DIR
# @USER_VARIABLE
# @DESCRIPTION:
@@ -255,3 +253,5 @@ bzr_fetch() {
bzr_src_unpack() {
bzr_fetch
}
+
+EXPORT_FUNCTIONS src_unpack
diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass
index 911ddabced14..e3f36fc6ad9b 100644
--- a/eclass/cargo.eclass
+++ b/eclass/cargo.eclass
@@ -10,6 +10,11 @@
# @SUPPORTED_EAPIS: 7 8
# @BLURB: common functions and variables for cargo builds
+case ${EAPI} in
+ 7|8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
if [[ -z ${_CARGO_ECLASS} ]]; then
_CARGO_ECLASS=1
@@ -17,15 +22,11 @@ _CARGO_ECLASS=1
# https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md
RUST_DEPEND="virtual/rust"
-case "${EAPI:-0}" in
- 0|1|2|3|4|5|6)
- die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
- ;;
+case ${EAPI} in
7)
# 1.37 added 'cargo vendor' subcommand and net.offline config knob
RUST_DEPEND=">=virtual/rust-1.37.0"
;;
-
8)
# 1.39 added --workspace
# 1.46 added --target dir
@@ -40,17 +41,11 @@ case "${EAPI:-0}" in
die "CRATES variable not defined"
fi
;;
- *)
- die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
- ;;
esac
inherit multiprocessing toolchain-funcs
-if [[ ! ${CARGO_OPTIONAL} ]]; then
- BDEPEND="${RUST_DEPEND}"
- EXPORT_FUNCTIONS src_unpack src_configure src_compile src_install src_test
-fi
+[[ ! ${CARGO_OPTIONAL} ]] && BDEPEND="${RUST_DEPEND}"
IUSE="${IUSE} debug"
@@ -549,3 +544,7 @@ cargo_src_test() {
}
fi
+
+if [[ ! ${CARGO_OPTIONAL} ]]; then
+ EXPORT_FUNCTIONS src_unpack src_configure src_compile src_install src_test
+fi
diff --git a/eclass/check-reqs.eclass b/eclass/check-reqs.eclass
index ddf0a47775ae..f6409e9a02c5 100644
--- a/eclass/check-reqs.eclass
+++ b/eclass/check-reqs.eclass
@@ -1,4 +1,4 @@
-# Copyright 2004-2022 Gentoo Authors
+# Copyright 2004-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: check-reqs.eclass
@@ -40,12 +40,10 @@
case ${EAPI} in
6|7|8) ;;
- *) die "${ECLASS}: EAPI=${EAPI:-0} is not supported" ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-EXPORT_FUNCTIONS pkg_pretend pkg_setup
-
-if [[ ! ${_CHECK_REQS_ECLASS} ]]; then
+if [[ -z ${_CHECK_REQS_ECLASS} ]]; then
_CHECK_REQS_ECLASS=1
# @ECLASS_VARIABLE: CHECKREQS_MEMORY
@@ -467,3 +465,5 @@ _check-reqs_unsatisfied() {
}
fi
+
+EXPORT_FUNCTIONS pkg_pretend pkg_setup
diff --git a/eclass/chromium-2.eclass b/eclass/chromium-2.eclass
index cd4495767e58..0831f1f17aa5 100644
--- a/eclass/chromium-2.eclass
+++ b/eclass/chromium-2.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: chromium-2.eclass
@@ -11,7 +11,7 @@
case ${EAPI} in
7|8) ;;
- *) die "${ECLASS}: EAPI=${EAPI:-0} is not supported" ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
inherit linux-info
diff --git a/eclass/cmake-multilib.eclass b/eclass/cmake-multilib.eclass
index 4dd3eab3cd28..c8fad94ac0a9 100644
--- a/eclass/cmake-multilib.eclass
+++ b/eclass/cmake-multilib.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: cmake-multilib.eclass
@@ -36,7 +36,7 @@ case ${EAPI} in
;;
esac
;;
- *) die "${ECLASS}: EAPI=${EAPI:-0} is not supported" ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
if [[ ${CMAKE_IN_SOURCE_BUILD} ]]; then
diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass
index 46659867b1a8..76c63977aa07 100644
--- a/eclass/cmake.eclass
+++ b/eclass/cmake.eclass
@@ -20,7 +20,7 @@
case ${EAPI} in
7|8) ;;
- *) die "${ECLASS}: EAPI=${EAPI:-0} is not supported" ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
if [[ -z ${_CMAKE_ECLASS} ]]; then
diff --git a/eclass/common-lisp-3.eclass b/eclass/common-lisp-3.eclass
index df624d51607c..6c87ef3db842 100644
--- a/eclass/common-lisp-3.eclass
+++ b/eclass/common-lisp-3.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: common-lisp-3.eclass
@@ -11,15 +11,15 @@
# to provide a simple way to write ebuilds with these characteristics.
case ${EAPI} in
- [67]) ;;
- *) die "EAPI=${EAPI:-0} is not supported" ;;
+ 6|7) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-inherit eutils
-
if [[ -z ${_COMMON_LISP_3_ECLASS} ]]; then
_COMMON_LISP_3_ECLASS=1
+inherit eutils
+
# @ECLASS_VARIABLE: CLIMPLEMENTATIONS
# @DESCRIPTION:
# Common Lisp implementations
diff --git a/eclass/cron.eclass b/eclass/cron.eclass
index 3198c181f21b..c185c0eaa032 100644
--- a/eclass/cron.eclass
+++ b/eclass/cron.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: cron.eclass
@@ -6,11 +6,11 @@
# maintainer-needed@gentoo.org
# @AUTHOR:
# Original Author: Aaron Walker <ka0ttic@gentoo.org>
-# @SUPPORTED_EAPIS: 6 7
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: Some functions for cron
# @DESCRIPTION:
# Purpose: The main motivation for this eclass was to simplify
-# the jungle known as src_install() in cron ebuilds. Using these
+# the jungle known as src_install() in cron ebuilds. Using these
# functions also ensures that permissions are *always* reset,
# preventing the accidental installation of files with wrong perms.
#
@@ -18,26 +18,23 @@
# chosen based on the most common setting among cron ebuilds.
case ${EAPI} in
- [67]) inherit eutils ;;
- *) die "EAPI=${EAPI:-0} is not supported" ;;
+ 7|8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-inherit flag-o-matic
-
-EXPORT_FUNCTIONS pkg_postinst
-
if [[ -z ${_CRON_ECLASS} ]]; then
_CRON_ECLASS=1
-SLOT="0"
+inherit flag-o-matic
RDEPEND=">=sys-process/cronbase-0.3.2"
-for pn in vixie-cron bcron cronie dcron fcron; do
- [[ ${pn} == "${PN}" ]] || RDEPEND="${RDEPEND} !sys-process/${pn}"
+for pn in bcron cronie dcron fcron; do
+ [[ ${pn} == "${PN}" ]] || RDEPEND+=" !sys-process/${pn}"
done
+unset pn
# @FUNCTION: docrondir
-# @USAGE: [ dir ] [ perms ]
+# @USAGE: [dir] [perms]
# @DESCRIPTION:
# Creates crontab directory
#
@@ -49,12 +46,13 @@ done
# docrondir -m0700 (uses default dir)
docrondir() {
# defaults
- local perms="-m0750 -o 0 -g cron" dir="/var/spool/cron/crontabs"
+ local perms="-m0750 -o 0 -g cron"
+ local dir="/var/spool/cron/crontabs"
if [[ -n $1 ]] ; then
- case "$1" in
+ case $1 in
*/*)
- dir=$1
+ dir="$1"
shift
[[ -n $1 ]] && perms="$@"
;;
@@ -64,15 +62,14 @@ docrondir() {
esac
fi
- diropts ${perms}
- keepdir ${dir}
-
- # reset perms to default
- diropts -m0755
+ (
+ diropts ${perms}
+ keepdir ${dir}
+ )
}
# @FUNCTION: docron
-# @USAGE: [ exe ] [ perms ]
+# @USAGE: [exe] [perms]
# @DESCRIPTION:
# Install cron executable
#
@@ -81,40 +78,41 @@ docrondir() {
# ex: docron -m 0700 -o 0 -g root ('exe' defaults to "cron")
# docron crond -m 0110
docron() {
- local cron="cron" perms="-m 0750 -o 0 -g wheel"
+ local cron="cron"
+ local perms="-m 0750 -o 0 -g wheel"
if [[ -n $1 ]] ; then
- case "$1" in
+ case $1 in
-*)
perms="$@"
;;
*)
- cron=$1
+ cron="$1"
shift
[[ -n $1 ]] && perms="$@"
;;
esac
fi
- exeopts ${perms}
- exeinto /usr/sbin
- doexe ${cron} || die "failed to install ${cron}"
-
- # reset perms to default
- exeopts -m0755
+ (
+ exeopts ${perms}
+ exeinto /usr/sbin
+ doexe ${cron}
+ )
}
# @FUNCTION: docrontab
-# @USAGE: [ exe ] [ perms ]
+# @USAGE: [exe] [perms]
# @DESCRIPTION:
# Install crontab executable
#
# Uses same semantics as docron.
docrontab() {
- local crontab="crontab" perms="-m 4750 -o 0 -g cron"
+ local crontab="crontab"
+ local perms="-m 4750 -o 0 -g cron"
if [[ -n $1 ]] ; then
- case "$1" in
+ case $1 in
-*)
perms="$@"
;;
@@ -126,15 +124,14 @@ docrontab() {
esac
fi
- exeopts ${perms}
- exeinto /usr/bin
- doexe ${crontab} || die "failed to install ${crontab}"
-
- # reset perms to default
- exeopts -m0755
+ (
+ exeopts ${perms}
+ exeinto /usr/bin
+ doexe ${crontab}
+ )
# users expect /usr/bin/crontab to exist...
- if [[ "${crontab##*/}" != "crontab" ]] ; then
+ if [[ ${crontab##*/} != crontab ]] ; then
dosym ${crontab##*/} /usr/bin/crontab || \
die "failed to create /usr/bin/crontab symlink"
fi
@@ -145,9 +142,8 @@ docrontab() {
# Outputs a message about system crontabs
# daemons that have a true system crontab set CRON_SYSTEM_CRONTAB="yes"
cron_pkg_postinst() {
- echo
# daemons that have a true system crontab set CRON_SYSTEM_CRONTAB="yes"
- if [ "${CRON_SYSTEM_CRONTAB:-no}" != "yes" ] ; then
+ if [[ ${CRON_SYSTEM_CRONTAB:-no} != yes ]] ; then
einfo "To activate /etc/cron.{hourly|daily|weekly|monthly} please run:"
einfo " crontab /etc/crontab"
einfo
@@ -158,7 +154,8 @@ cron_pkg_postinst() {
einfo "You may wish to read the Gentoo Linux Cron Guide, which can be"
einfo "found online at:"
einfo " https://wiki.gentoo.org/wiki/Cron"
- echo
}
fi
+
+EXPORT_FUNCTIONS pkg_postinst
diff --git a/eclass/cuda.eclass b/eclass/cuda.eclass
index 81c8c1f2fc59..d885e77d0616 100644
--- a/eclass/cuda.eclass
+++ b/eclass/cuda.eclass
@@ -1,17 +1,6 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-case "${EAPI:-0}" in
- [0-6])
- die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
- ;;
- 7|8)
- ;;
- *)
- die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
- ;;
-esac
-
# @ECLASS: cuda.eclass
# @MAINTAINER:
# Gentoo Science Project <sci@gentoo.org>
@@ -25,10 +14,15 @@ esac
# @EXAMPLE:
# inherit cuda
+case ${EAPI} in
+ 7|8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
if [[ -z ${_CUDA_ECLASS} ]]; then
+_CUDA_ECLASS=1
inherit flag-o-matic toolchain-funcs
-[[ ${EAPI} == [56] ]] && inherit eapi7-ver
# @ECLASS_VARIABLE: NVCCFLAGS
# @DESCRIPTION:
@@ -195,7 +189,6 @@ cuda_src_prepare() {
cuda_sanitize
}
-EXPORT_FUNCTIONS src_prepare
-
-_CUDA_ECLASS=1
fi
+
+EXPORT_FUNCTIONS src_prepare
diff --git a/eclass/cvs.eclass b/eclass/cvs.eclass
index a90a4d87f1c5..5ba2197f5174 100644
--- a/eclass/cvs.eclass
+++ b/eclass/cvs.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: cvs.eclass
@@ -13,14 +13,14 @@
# cvs_src_unpack. If you find that you need to call the cvs_* functions
# directly, I'd be interested to hear about it.
-if [[ -z ${_CVS_ECLASS} ]]; then
-_CVS_ECLASS=1
-
case ${EAPI} in
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
+if [[ -z ${_CVS_ECLASS} ]]; then
+_CVS_ECLASS=1
+
# TODO:
# Implement more auth types (gserver?, kserver?)
@@ -536,6 +536,6 @@ cvs_src_unpack() {
einfo "CVS module ${ECVS_MODULE} is now in ${WORKDIR}"
}
-EXPORT_FUNCTIONS src_unpack
-
fi
+
+EXPORT_FUNCTIONS src_unpack
diff --git a/eclass/db.eclass b/eclass/db.eclass
index 96669c6d8938..ce48ad17dd3a 100644
--- a/eclass/db.eclass
+++ b/eclass/db.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: db.eclass
@@ -6,19 +6,23 @@
# base-system@gentoo.org
# @BLURB: Internal eclass used by sys-libs/db ebuilds
-inherit eutils multilib multiprocessing
+case ${EAPI} in
+ 7|8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
-IUSE="doc test examples"
+if [[ -z ${_DB_ECLASS} ]]; then
+_DB_ECLASS=1
-EXPORT_FUNCTIONS src_test
+inherit multilib multiprocessing
-DEPEND="test? ( >=dev-lang/tcl-8.4 )"
+IUSE="doc tcl test examples"
+REQUIRED_USE="test? ( tcl )"
-RDEPEND=""
+BDEPEND="test? ( >=dev-lang/tcl-8.4 )"
db_fix_so() {
- has "${EAPI:-0}" 0 1 2 && ! use prefix && EROOT="${ROOT}"
- LIB="${EROOT}/usr/$(get_libdir)"
+ local LIB="${EROOT}"/usr/$(get_libdir)
cd "${LIB}" || die
@@ -32,71 +36,53 @@ db_fix_so() {
# now rebuild all the correct ones
local ext
for ext in so dylib a; do
+ local name
for name in libdb libdb_{cxx,tcl,java,sql,stl}; do
- target="$(find . -maxdepth 1 -type f -name "${name}-*.${ext}" |sort -V |tail -n 1)"
- [[ -n "${target}" ]] && ln -sf ${target//.\//} ${name}.${ext}
- done;
- done;
-
- # db[23] gets some extra-special stuff
- if [[ -f libdb1$(get_libname 2) ]]; then
- ln -sf libdb1$(get_libname 2) libdb$(get_libname 2)
- ln -sf libdb1$(get_libname 2) libdb1$(get_libname)
- ln -sf libdb1$(get_libname 2) libdb-1$(get_libname)
- fi
- # what do we do if we ever get 3.3 ?
- local i
- for i in libdb libdb_{cxx,tcl,java,sql,stl}; do
- if [[ -f $i-3.2$(get_libname) ]]; then
- ln -sf $i-3.2$(get_libname) $i-3$(get_libname)
- ln -sf $i-3.2$(get_libname) $i$(get_libname 3)
- fi
+ target="$(find . -maxdepth 1 -type f -name "${name}-*.${ext}" | sort -V | tail -n 1)"
+ [[ -n ${target} ]] && ln -sf ${target//.\//} ${name}.${ext}
+ done
done
# do the same for headers now
# but since there are only two of them, just overwrite them
- cd "${EROOT}"/usr/include
- target="$(find . -maxdepth 1 -type d -name 'db[0-9]*' | sort -V |cut -d/ -f2- | tail -n1)"
- if [[ -n "${target}" ]] && [[ -e "${target}/db.h" ]] && ( ! [[ -e db.h ]] || [[ -h db.h ]] ); then
+ cd "${EROOT}"/usr/include || die
+ target="$(find . -maxdepth 1 -type d -name 'db[0-9]*' | sort -V | cut -d/ -f2- | tail -n1)"
+ if [[ -n ${target} && -e ${target}/db.h ]] && ( ! [[ -e db.h ]] || [[ -h db.h ]] ); then
einfo "Creating db.h symlinks to ${target}"
ln -sf "${target}"/db.h .
ln -sf "${target}"/db_185.h .
- elif [[ ! -e "${target}/db.h" ]]; then
- if [[ -n "${target}" ]]; then
+ elif [[ ! -e ${target}/db.h ]]; then
+ if [[ -n ${target} ]]; then
ewarn "Could not find ${target}/db.h"
elif [[ -h db.h ]]; then
einfo "Apparently you just removed the last instance of $PN. Removing the symlinks"
- rm -f db.h db_185.h
+ rm -f db.h db_185.h || die
fi
fi
}
db_src_install_doc() {
- has "${EAPI:-0}" 0 1 2 && ! use prefix && ED="${D}"
# not everybody wants this wad of documentation as it is primarily API docs
if use doc; then
dodir /usr/share/doc/${PF}/html
mv "${ED}"/usr/docs/* "${ED}"/usr/share/doc/${PF}/html/ || die
- rm -rf "${ED}"/usr/docs
+ rm -rf "${ED}"/usr/docs || die
else
- rm -rf "${ED}"/usr/docs
+ rm -rf "${ED}"/usr/docs || die
fi
db_src_install_examples
}
db_src_install_examples() {
- has "${EAPI:-0}" 0 1 2 && ! use prefix && ED="${D}"
- if use examples ; then
+ if use examples; then
local langs=( c cxx stl )
- [[ "${IUSE/java}" != "${IUSE}" ]] \
- && use java \
- && langs+=( java )
+ in_iuse java && use java && langs+=( java )
local i
- for i in ${langs[@]} ; do
- destdir="/usr/share/doc/${PF}/"
- src="${S}/../examples_${i}/"
- if [[ -f "${src}" ]]; then
+ for i in ${langs[@]}; do
+ local destdir="/usr/share/doc/${PF}/"
+ local src="${S}/../examples_${i}/"
+ if [[ -f ${src} ]]; then
dodir "${destdir}"
cp -ra "${src}" "${ED}${destdir}/" || die
fi
@@ -105,13 +91,12 @@ db_src_install_examples() {
}
db_src_install_usrbinslot() {
- has "${EAPI:-0}" 0 1 2 && ! use prefix && ED="${D}"
# slot all program names to avoid overwriting
local fname
- for fname in "${ED}"/usr/bin/db*
- do
- dn="$(dirname "${fname}")"
- bn="$(basename "${fname}")"
+
+ for fname in "${ED}"/usr/bin/db*; do
+ local dn="$(dirname "${fname}")"
+ local bn="$(basename "${fname}")"
bn="${bn/db/db${SLOT}}"
mv "${fname}" "${dn}/${bn}" || \
die "Failed to rename ${fname} to ${dn}/${bn}"
@@ -119,30 +104,28 @@ db_src_install_usrbinslot() {
}
db_src_install_headerslot() {
- has "${EAPI:-0}" 0 1 2 && ! use prefix && ED="${D}"
# install all headers in a slotted location
dodir /usr/include/db${SLOT}
mv "${ED}"/usr/include/*.h "${ED}"/usr/include/db${SLOT}/ || die
}
db_src_install_usrlibcleanup() {
- has "${EAPI:-0}" 0 1 2 && ! use prefix && ED="${D}"
- LIB="${ED}/usr/$(get_libdir)"
+ local LIB="${ED}"/usr/$(get_libdir)
# Clean out the symlinks so that they will not be recorded in the
# contents (bug #60732)
- if [[ "${ED}" = "" ]]; then
+ if [[ -z ${ED} ]]; then
die "Calling clean_links while \${ED} not defined"
fi
- if [[ -e "${LIB}"/libdb.a ]] && [[ ! -e "${LIB}"/libdb-${SLOT}.a ]]; then
+ if [[ -e "${LIB}"/libdb.a && ! -e "${LIB}"/libdb-${SLOT}.a ]]; then
einfo "Moving libdb.a to a versioned name"
- mv "${LIB}/libdb.a" "${LIB}/libdb-${SLOT}.a" || die
+ mv "${LIB}"/libdb.a "${LIB}"/libdb-${SLOT}.a || die
fi
- if [[ -e "${LIB}"/libdb_cxx.a ]] && [[ ! -e "${LIB}"/libdb_cxx-${SLOT}.a ]]; then
+ if [[ -e "${LIB}"/libdb_cxx.a && ! -e "${LIB}"/libdb_cxx-${SLOT}.a ]]; then
einfo "Moving libdb_cxx.a to a versioned name"
- mv "${LIB}/libdb_cxx.a" "${LIB}/libdb_cxx-${SLOT}.a" || die
+ mv "${LIB}"/libdb_cxx.a "${LIB}"/libdb_cxx-${SLOT}.a || die
fi
local soext=$(get_libname)
@@ -154,11 +137,11 @@ db_src_install_usrlibcleanup() {
rm -f \
"${ED}"/usr/include/{db,db_185}.h \
- "${LIB}"/libdb{,_{cxx,sql,stl,java,tcl}}.a
+ "${LIB}"/libdb{,_{cxx,sql,stl,java,tcl}}.a || die
}
db_src_test() {
- if [[ $UID -eq 0 ]]; then
+ if [[ ${UID} -eq 0 ]]; then
M="You must run the testsuite as non-root, skipping"
ewarn "${M}"
elog "${M}"
@@ -170,34 +153,39 @@ db_src_test() {
ewarn "This can take 6+ hours on modern machines"
# Fix stuff that fails with relative paths, and upstream moving files
# around...
- local test_parallel='' t
+ local t test_parallel
for t in \
"${S}"/test/parallel.tcl \
"${S}"/../test/parallel.tcl \
"${S}"/test/tcl/parallel.tcl \
"${S}"/../test/tcl/parallel.tcl \
; do
- [[ -f "${t}" ]] && test_parallel="${t}" && break
+ [[ -f ${t} ]] && test_parallel="${t}" && break
done
sed -ri \
-e '/regsub .test_path ./s,(regsub),#\1,g' \
-e '/regsub .src_root ./s,(regsub),#\1,g' \
-e '/regsub .tcl_utils ./s,(regsub),#\1,g' \
- "${test_parallel}"
- cd "${S}"
+ "${test_parallel}" || die
+ cd "${S}" || die
for t in \
../test/test.tcl \
../test/tcl/test.tcl \
; do
- [[ -f "${t}" ]] && testbase="${t}" && break
+ [[ -f ${t} ]] && testbase="${t}" && break
done
- echo "source ${t}" > testrunner.tcl
- echo "run_parallel $(makeopts_jobs) run_std" >> testrunner.tcl
- tclsh testrunner.tcl
+ cat > testrunner.tcl <<-EOF || die
+ source ${t}
+ run_parallel $(makeopts_jobs) run_std
+ EOF
+
+ tclsh testrunner.tcl || die
grep -Eqs '^FAIL' ALL.OUT* && die "Some tests failed, please see ${S}/ALL.OUT*"
- else
- eerror "You must have USE=tcl to run the sys-libs/db testsuite."
fi
}
+
+fi
+
+EXPORT_FUNCTIONS src_test
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 95911f912ca0..78f53658285e 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -44,9 +44,9 @@
# For more information, please see the Python Guide:
# https://projects.gentoo.org/python/guide/
-case ${EAPI:-0} in
+case ${EAPI} in
7|8) ;;
- *) die "EAPI=${EAPI:-0} not supported";;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
# @ECLASS_VARIABLE: DISTUTILS_OPTIONAL
@@ -169,7 +169,8 @@ esac
# ${DISTUTILS_DEPS}"
# @CODE
-if [[ ! ${_DISTUTILS_R1} ]]; then
+if [[ -z ${_DISTUTILS_R1_ECLASS} ]]; then
+_DISTUTILS_R1_ECLASS=1
inherit multibuild multilib multiprocessing ninja-utils toolchain-funcs
@@ -179,14 +180,6 @@ else
inherit python-single-r1
fi
-fi
-
-if [[ ! ${DISTUTILS_OPTIONAL} ]]; then
- EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install
-fi
-
-if [[ ! ${_DISTUTILS_R1} ]]; then
-
_distutils_set_globals() {
local rdep bdep
if [[ ${DISTUTILS_USE_PEP517} ]]; then
@@ -2107,5 +2100,8 @@ distutils-r1_src_install() {
return ${ret}
}
-_DISTUTILS_R1=1
+fi
+
+if [[ ! ${DISTUTILS_OPTIONAL} ]]; then
+ EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install
fi
diff --git a/eclass/docs.eclass b/eclass/docs.eclass
index cbf35068de3a..810b56460f3f 100644
--- a/eclass/docs.eclass
+++ b/eclass/docs.eclass
@@ -146,7 +146,7 @@ esac
# will initialize a dummy git repository before compiling. A dependency
# on dev-vcs/git is automatically added.
-if [[ ! ${_DOCS_ECLASS} ]]; then
+if [[ -z ${_DOCS_ECLASS} ]]; then
_DOCS_ECLASS=1
# For the python based DOCS_BUILDERS we need to inherit any python eclass
@@ -424,7 +424,7 @@ BDEPEND+=" doc? ( ${DOCS_DEPEND} )"
# 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
+if [[ ${_DISTUTILS_R1_ECLASS} && ( ${DOCS_BUILDER}="mkdocs" || ${DOCS_BUILDER}="sphinx" ) ]]; then
python_compile_all() { docs_compile; }
fi
diff --git a/eclass/eapi8-dosym.eclass b/eclass/eapi8-dosym.eclass
index 52f0ffe3e62b..4e3977ef54cf 100644
--- a/eclass/eapi8-dosym.eclass
+++ b/eclass/eapi8-dosym.eclass
@@ -1,4 +1,4 @@
-# Copyright 2020 Gentoo Authors
+# Copyright 2020-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: eapi8-dosym.eclass
@@ -6,7 +6,7 @@
# PMS team <pms@gentoo.org>
# @AUTHOR:
# Ulrich Müller <ulm@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6 7
+# @SUPPORTED_EAPIS: 7
# @BLURB: Testing implementation of EAPI 8 dosym -r option
# @DESCRIPTION:
# A stand-alone implementation of the dosym command aimed for EAPI 8.
@@ -17,8 +17,8 @@
# https://bugs.gentoo.org/708360
case ${EAPI} in
- 5|6|7) ;;
- *) die "${ECLASS}: EAPI=${EAPI:-0} not supported" ;;
+ 7) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
# @FUNCTION: _dosym8_canonicalize
diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass
index d9215a534398..9fca1647778c 100644
--- a/eclass/ecm.eclass
+++ b/eclass/ecm.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: ecm.eclass
@@ -23,7 +23,7 @@
case ${EAPI} in
8) ;;
- *) die "${ECLASS}: EAPI=${EAPI:-0} is not supported" ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
if [[ -z ${_ECM_ECLASS} ]]; then
diff --git a/eclass/elisp.eclass b/eclass/elisp.eclass
index 7c05948c0f57..9d157c23d5b1 100644
--- a/eclass/elisp.eclass
+++ b/eclass/elisp.eclass
@@ -1,4 +1,4 @@
-# Copyright 2002-2022 Gentoo Authors
+# Copyright 2002-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: elisp.eclass
@@ -69,9 +69,6 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-EXPORT_FUNCTIONS src_{unpack,prepare,configure,compile,install} \
- pkg_{setup,postinst,postrm}
-
RDEPEND=">=app-editors/emacs-${NEED_EMACS}:*"
BDEPEND="${RDEPEND}"
@@ -189,3 +186,6 @@ elisp_pkg_postinst() {
elisp_pkg_postrm() {
elisp-site-regen
}
+
+EXPORT_FUNCTIONS src_{unpack,prepare,configure,compile,install} \
+ pkg_{setup,postinst,postrm}
diff --git a/eclass/fcaps.eclass b/eclass/fcaps.eclass
index 349e72a63af2..477e1e954ab8 100644
--- a/eclass/fcaps.eclass
+++ b/eclass/fcaps.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: fcaps.eclass
@@ -191,6 +191,6 @@ fcaps_pkg_postinst() {
done
}
-EXPORT_FUNCTIONS pkg_postinst
-
fi
+
+EXPORT_FUNCTIONS pkg_postinst
diff --git a/eclass/findlib.eclass b/eclass/findlib.eclass
index 52e3655b3e84..fdcaa0c1b77c 100644
--- a/eclass/findlib.eclass
+++ b/eclass/findlib.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: findlib.eclass
@@ -6,13 +6,13 @@
# ML <ml@gentoo.org>
# @AUTHOR:
# Original author: Matthieu Sozeau <mattam@gentoo.org> (retired)
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: ocamlfind (a.k.a. findlib) eclass
# @DESCRIPTION:
# ocamlfind (a.k.a. findlib) eclass
-case ${EAPI:-0} in
- [678]) ;;
+case ${EAPI} in
+ 7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -35,7 +35,7 @@ RDEPEND="dev-lang/ocaml:=[ocamlopt?]"
# @DESCRIPTION:
# Die if ocamlfind is not found
check_ocamlfind() {
- if [ ! -x "${EPREFIX}"/usr/bin/ocamlfind ] ; then
+ if [[ ! -x ${EPREFIX}/usr/bin/ocamlfind ]] ; then
eerror "In ${ECLASS}: could not find the ocamlfind executable"
eerror "Please report this bug on Gentoo's Bugzilla, assigning to ml@gentoo.org"
die "ocamlfind executable not found"
@@ -51,16 +51,16 @@ findlib_src_preinst() {
check_ocamlfind
# destdir is the ocaml sitelib
- local destdir=`ocamlfind printconf destdir`
+ local destdir=$(ocamlfind printconf destdir)
# strip off prefix
destdir=${destdir#${EPREFIX}}
- dodir ${destdir} || die "dodir failed"
+ dodir "${destdir}"
export OCAMLFIND_DESTDIR=${ED}${destdir}
# stublibs style
- dodir ${destdir}/stublibs || die "dodir failed"
+ dodir "${destdir}"/stublibs
export OCAMLFIND_LDCONF=ignore
}
diff --git a/eclass/font-ebdftopcf.eclass b/eclass/font-ebdftopcf.eclass
index 88256c3231bd..afd77e083bee 100644
--- a/eclass/font-ebdftopcf.eclass
+++ b/eclass/font-ebdftopcf.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: font-ebdftopcf.eclass
@@ -14,11 +14,9 @@
case ${EAPI} in
7) ;;
- *) die "EAPI=${EAPI:-0} is not supported" ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-EXPORT_FUNCTIONS src_compile
-
if [[ -z ${_FONT_EBDFTOPCF_ECLASS} ]]; then
_FONT_EBDFTOPCF_ECLASS=1
@@ -57,3 +55,5 @@ font-ebdftopcf_src_compile() {
}
fi
+
+EXPORT_FUNCTIONS src_compile
diff --git a/eclass/font.eclass b/eclass/font.eclass
index e772409fe201..3d2578172bc9 100644
--- a/eclass/font.eclass
+++ b/eclass/font.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: font.eclass
@@ -7,16 +7,14 @@
# @SUPPORTED_EAPIS: 7 8
# @BLURB: Eclass to make font installation uniform
-case ${EAPI:-0} in
- [7-8]) ;;
- *) die "EAPI ${EAPI} is not supported by font.eclass." ;;
+case ${EAPI} in
+ 7|8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_FONT_ECLASS} ]]; then
+if [[ -z ${_FONT_ECLASS} ]]; then
_FONT_ECLASS=1
-EXPORT_FUNCTIONS pkg_setup src_install pkg_postinst pkg_postrm
-
# @ECLASS_VARIABLE: FONT_SUFFIX
# @DEFAULT_UNSET
# @REQUIRED
@@ -264,3 +262,5 @@ font_pkg_postrm() {
}
fi
+
+EXPORT_FUNCTIONS pkg_setup src_install pkg_postinst pkg_postrm
diff --git a/eclass/fortran-2.eclass b/eclass/fortran-2.eclass
index e26dd700f7cf..72b3d2d1857b 100644
--- a/eclass/fortran-2.eclass
+++ b/eclass/fortran-2.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: fortran-2.eclass
@@ -26,18 +26,15 @@
#
# FORTRAN_NEED_OPENMP=1
-inherit toolchain-funcs
-
-case ${EAPI:-0} in
- # not used in the eclass, but left for backward compatibility with legacy users
- 5|6) inherit eutils ;;
- 7|8) ;;
- *) die "EAPI=${EAPI} is not supported" ;;
+case ${EAPI} in
+ 6|7|8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-EXPORT_FUNCTIONS pkg_setup
+if [[ -z ${_FORTRAN_2_ECLASS} ]]; then
+_FORTRAN_2_ECLASS=1
-if [[ ! ${_FORTRAN_2_CLASS} ]]; then
+inherit toolchain-funcs
# @ECLASS_VARIABLE: FORTRAN_NEED_OPENMP
# @DESCRIPTION:
@@ -293,5 +290,6 @@ fortran-2_pkg_setup() {
fi
}
-_FORTRAN_2_ECLASS=1
fi
+
+EXPORT_FUNCTIONS pkg_setup
diff --git a/eclass/frameworks.kde.org.eclass b/eclass/frameworks.kde.org.eclass
index 876c05c9b6af..5201464a76c8 100644
--- a/eclass/frameworks.kde.org.eclass
+++ b/eclass/frameworks.kde.org.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: frameworks.kde.org.eclass
@@ -19,7 +19,7 @@
case ${EAPI} in
8) ;;
- *) die "EAPI=${EAPI:-0} is not supported" ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
if [[ -z ${_FRAMEWORKS_KDE_ORG_ECLASS} ]]; then
diff --git a/eclass/freedict.eclass b/eclass/freedict.eclass
index f38ce93edc82..7a49a5f19778 100644
--- a/eclass/freedict.eclass
+++ b/eclass/freedict.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: freedict.eclass
@@ -12,6 +12,11 @@
# This eclass exists to ease the installation of freedict translation
# dictionaries.
+case ${EAPI} in
+ 7) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
if [[ -z ${_FREEDICT_ECLASS} ]]; then
_FREEDICT_ECLASS=1
@@ -20,11 +25,6 @@ _FREEDICT_ECLASS=1
# Strips PN of 'freedict' prefix, to be used in SRC_URI and doins
FREEDICT_P=${PN/freedict-/}
-case ${EAPI:-0} in
- 7) ;;
- *) die "${ECLASS}.eclass is banned in EAPI=${EAPI}" ;;
-esac
-
[[ ${FORLANG} ]] && die "FORLANG is banned, set DESCRIPTION instead"
[[ ${TOLANG} ]] && die "TOLANG is banned, set DESCRIPTION instead"
@@ -47,6 +47,6 @@ freedict_src_install() {
doins ${FREEDICT_P}.index
}
-EXPORT_FUNCTIONS src_install
-
fi
+
+EXPORT_FUNCTIONS src_install
diff --git a/eclass/gear.kde.org.eclass b/eclass/gear.kde.org.eclass
index 66c86b59fa32..5977c0f72e3c 100644
--- a/eclass/gear.kde.org.eclass
+++ b/eclass/gear.kde.org.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: gear.kde.org.eclass
@@ -19,7 +19,7 @@
case ${EAPI} in
8) ;;
- *) die "EAPI=${EAPI:-0} is not supported" ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
if [[ -z ${_GEAR_KDE_ORG_ECLASS} ]]; then
diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
index bdb28565e2f9..5c7dc29627cb 100644
--- a/eclass/git-r3.eclass
+++ b/eclass/git-r3.eclass
@@ -1,27 +1,26 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: git-r3.eclass
# @MAINTAINER:
# Michał Górny <mgorny@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6 7 8
+# @SUPPORTED_EAPIS: 6 7 8
# @BLURB: Eclass for fetching and unpacking git repositories.
# @DESCRIPTION:
# Third generation eclass for easing maintenance of live ebuilds using
# git as remote repository.
-case ${EAPI:-0} in
- 5|6|7|8) ;;
+case ${EAPI} in
+ 6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-EXPORT_FUNCTIONS src_unpack
-
-if [[ ! ${_GIT_R3} ]]; then
+if [[ -z ${_GIT_R3_ECLASS} ]]; then
+_GIT_R3_ECLASS=1
PROPERTIES+=" live"
-if [[ ${EAPI} != [56] ]]; then
+if [[ ${EAPI} != 6 ]]; then
BDEPEND=">=dev-vcs/git-1.8.2.1[curl]"
else
DEPEND=">=dev-vcs/git-1.8.2.1[curl]"
@@ -559,49 +558,46 @@ git-r3_fetch() {
local commit_id=${2:-${EGIT_COMMIT}}
local commit_date=${4:-${EGIT_COMMIT_DATE}}
- # support new override API for EAPI 6+
- if [[ ${EAPI} != 5 ]]; then
- # get the name and do some more processing:
- # 1) kill .git suffix,
- # 2) underscore (remaining) non-variable characters,
- # 3) add preceding underscore if it starts with a digit,
- # 4) uppercase.
- local override_name=${GIT_DIR##*/}
- override_name=${override_name%.git}
- override_name=${override_name//[^a-zA-Z0-9_]/_}
- override_name=${override_name^^}
-
- local varmap=(
- REPO:repos
- BRANCH:branch_name
- COMMIT:commit_id
- COMMIT_DATE:commit_date
- )
-
- local localvar livevar live_warn= override_vars=()
- for localvar in "${varmap[@]}"; do
- livevar=EGIT_OVERRIDE_${localvar%:*}_${override_name}
- localvar=${localvar#*:}
- override_vars+=( "${livevar}" )
-
- if [[ -n ${!livevar} ]]; then
- [[ ${localvar} == repos ]] && repos=()
- live_warn=1
- ewarn "Using ${livevar}=${!livevar}"
- declare "${localvar}=${!livevar}"
- fi
- done
+ # get the name and do some more processing:
+ # 1) kill .git suffix,
+ # 2) underscore (remaining) non-variable characters,
+ # 3) add preceding underscore if it starts with a digit,
+ # 4) uppercase.
+ local override_name=${GIT_DIR##*/}
+ override_name=${override_name%.git}
+ override_name=${override_name//[^a-zA-Z0-9_]/_}
+ override_name=${override_name^^}
+
+ local varmap=(
+ REPO:repos
+ BRANCH:branch_name
+ COMMIT:commit_id
+ COMMIT_DATE:commit_date
+ )
- if [[ ${live_warn} ]]; then
- ewarn "No support will be provided."
- else
- einfo "To override fetched repository properties, use:"
- local x
- for x in "${override_vars[@]}"; do
- einfo " ${x}"
- done
- einfo
+ local localvar livevar live_warn= override_vars=()
+ for localvar in "${varmap[@]}"; do
+ livevar=EGIT_OVERRIDE_${localvar%:*}_${override_name}
+ localvar=${localvar#*:}
+ override_vars+=( "${livevar}" )
+
+ if [[ -n ${!livevar} ]]; then
+ [[ ${localvar} == repos ]] && repos=()
+ live_warn=1
+ ewarn "Using ${livevar}=${!livevar}"
+ declare "${localvar}=${!livevar}"
fi
+ done
+
+ if [[ ${live_warn} ]]; then
+ ewarn "No support will be provided."
+ else
+ einfo "To override fetched repository properties, use:"
+ local x
+ for x in "${override_vars[@]}"; do
+ einfo " ${x}"
+ done
+ einfo
fi
# set final variables after applying overrides
@@ -1079,5 +1075,6 @@ git-r3_pkg_needrebuild() {
# 'export' locally until this gets into EAPI
pkg_needrebuild() { git-r3_pkg_needrebuild; }
-_GIT_R3=1
fi
+
+EXPORT_FUNCTIONS src_unpack
diff --git a/eclass/gnome2.eclass b/eclass/gnome2.eclass
index a701b58fd9e7..37fbb94e55cd 100644
--- a/eclass/gnome2.eclass
+++ b/eclass/gnome2.eclass
@@ -1,35 +1,34 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: gnome2.eclass
# @MAINTAINER:
# gnome@gentoo.org
-# @SUPPORTED_EAPIS: 5 6 7 8
+# @SUPPORTED_EAPIS: 6 7 8
# @PROVIDES: gnome2-utils
# @BLURB: Provides phases for Gnome/Gtk+ based packages.
# @DESCRIPTION:
# Exports portage base functions used by ebuilds written for packages using the
# GNOME framework. For additional functions, see gnome2-utils.eclass.
+case ${EAPI} in
+ 6|7|8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
+if [[ -z ${_GNOME2_ECLASS} ]]; then
+_GNOME2_ECLASS=1
+
# @ECLASS_VARIABLE: GNOME2_EAUTORECONF
# @DEFAULT_UNSET
# @DESCRIPTION:
# Run eautoreconf instead of only elibtoolize
GNOME2_EAUTORECONF=${GNOME2_EAUTORECONF:-""}
-[[ ${GNOME2_EAUTORECONF} == 'yes' ]] && inherit autotools
-[[ ${EAPI} == [56] ]] && inherit eutils ltprune
-inherit libtool gnome.org gnome2-utils xdg
+[[ ${GNOME2_EAUTORECONF} == yes ]] && inherit autotools
+[[ ${EAPI} == 6 ]] && inherit ltprune
-case ${EAPI} in
- 5)
- EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install pkg_preinst pkg_postinst pkg_postrm
- ;;
- 6|7|8)
- EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install pkg_preinst pkg_postinst pkg_postrm
- ;;
- *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
-esac
+inherit libtool gnome.org gnome2-utils xdg
# @ECLASS_VARIABLE: ELTCONF
# @DEFAULT_UNSET
@@ -37,34 +36,6 @@ esac
# Extra options passed to elibtoolize
ELTCONF=${ELTCONF:-""}
-# @ECLASS_VARIABLE: G2CONF
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Extra configure opts passed to econf.
-# Deprecated, pass extra arguments to gnome2_src_configure.
-# Banned in eapi6 and newer.
-if has ${EAPI} 5; then
- G2CONF=${G2CONF:-""}
-fi
-
-# @ECLASS_VARIABLE: GCONF_DEBUG
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Whether to handle debug or not.
-# Some gnome applications support various levels of debugging (yes, no, minimum,
-# etc), but using --disable-debug also removes g_assert which makes debugging
-# harder. This variable should be set to yes for such packages for the eclass
-# to handle it properly. It will enable minimal debug with USE=-debug.
-# Note that this is most commonly found in configure.ac as GNOME_DEBUG_CHECK.
-#
-# 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} 5; then
- if [[ ${GCONF_DEBUG} != "no" ]]; then
- IUSE="debug"
- fi
-fi
-
# @ECLASS_VARIABLE: GNOME2_ECLASS_GIO_MODULES
# @INTERNAL
# @DESCRIPTION:
@@ -72,47 +43,29 @@ fi
# @ECLASS_VARIABLE: GNOME2_LA_PUNT
# @DESCRIPTION:
-# In EAPIs 5 and 6, it relies on prune_libtool_files (from ltprune.eclass) for
+# In EAPI 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
GNOME2_LA_PUNT=${GNOME2_LA_PUNT:-""}
-# @FUNCTION: gnome2_src_unpack
-# @DESCRIPTION:
-# Stub function for old EAPI.
-gnome2_src_unpack() {
- if has ${EAPI} 5; then
- unpack ${A}
- cd "${S}"
- else
- die "gnome2_src_unpack is banned since eapi6"
- fi
-}
-
# @FUNCTION: gnome2_src_prepare
# @DESCRIPTION:
# Prepare environment for build, fix build of scrollkeeper documentation,
# run elibtoolize.
gnome2_src_prepare() {
- [[ ${EAPI} != 5 ]] && default
+ default
# Prevent assorted access violations and test failures
gnome2_environment_reset
- # Prevent scrollkeeper access violations
- # 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} 5 && gnome2_omf_fix
-
# Disable all deprecation warnings
gnome2_disable_deprecation_warning
# Run libtoolize or eautoreconf, bug #591584
# https://bugzilla.gnome.org/show_bug.cgi?id=655517
- if [[ ${GNOME2_EAUTORECONF} == 'yes' ]]; then
+ if [[ ${GNOME2_EAUTORECONF} == yes ]]; then
eautoreconf
else
elibtoolize ${ELTCONF}
@@ -123,29 +76,8 @@ gnome2_src_prepare() {
# @DESCRIPTION:
# Gnome specific configure handling
gnome2_src_configure() {
- # Deprecated for a long time now and banned since eapi6, see Gnome team policies
- if [[ -n ${G2CONF} ]] ; 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"
- fi
- fi
-
local g2conf=()
- if has ${EAPI} 5; then
- if [[ ${GCONF_DEBUG} != 'no' ]] ; then
- if use debug ; then
- g2conf+=( --enable-debug=yes )
- fi
- fi
- else
- if [[ -n ${GCONF_DEBUG} ]] ; then
- die "GCONF_DEBUG is banned since eapi6 in favor of each ebuild taking care of the proper handling of debug configure option"
- fi
- fi
-
# 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
@@ -187,36 +119,17 @@ gnome2_src_configure() {
g2conf+=( --enable-compile-warnings=minimum )
fi
- # Pass --docdir with proper directory, bug #482646 (not needed since eapi6)
- 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} 5; then
- addwrite "$(unset HOME; echo ~)/.gnome2"
- else
- addpredict "$(unset HOME; echo ~)/.gnome2"
- fi
+ addpredict "$(unset HOME; echo ~)/.gnome2"
- if has ${EAPI} 5; then
- econf ${g2conf[@]} ${G2CONF} "$@"
- else
- econf ${g2conf[@]} "$@"
- fi
+ econf ${g2conf[@]} "$@"
}
# @FUNCTION: gnome2_src_compile
# @DESCRIPTION:
# Only default src_compile for now
gnome2_src_compile() {
- if has ${EAPI} 5; then
- emake
- else
- default
- fi
+ default
}
# @FUNCTION: gnome2_src_install
@@ -233,40 +146,31 @@ gnome2_src_install() {
#
# if this is not present, scrollkeeper-update may segfault and
# create bogus directories in /var/lib/
- if has ${EAPI} 5; then
- dodir "${sk_tmp_dir}" || die "dodir failed"
- emake DESTDIR="${D}" "scrollkeeper_localstate_dir=${ED}${sk_tmp_dir} " "$@" install
- else
- default
- fi
+ default
unset GCONF_DISABLE_MAKEFILE_SCHEMA_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} 5; then
- einstalldocs
- else
- local d
- for d in HACKING MAINTAINERS; do
- [[ -s "${d}" ]] && dodoc "${d}"
- done
- fi
+ local d
+ for d in HACKING MAINTAINERS; do
+ [[ -s ${d} ]] && dodoc "${d}"
+ done
# Do not keep /var/lib/scrollkeeper because:
# 1. The scrollkeeper database is regenerated at pkg_postinst()
# 2. ${ED}/var/lib/scrollkeeper contains only indexes for the current pkg
# thus it makes no sense if pkg_postinst ISN'T run for some reason.
- rm -rf "${ED}${sk_tmp_dir}"
+ rm -rf "${ED}${sk_tmp_dir}" || die
rmdir "${ED}/var/lib" 2>/dev/null
rmdir "${ED}/var" 2>/dev/null
# Make sure this one doesn't get in the portage db
- rm -fr "${ED}/usr/share/applications/mimeinfo.cache"
+ rm -rf "${ED}/usr/share/applications/mimeinfo.cache" || die
# Delete all .la files
- if has ${EAPI} 5 6; then
+ if has ${EAPI} 6; then
case "${GNOME2_LA_PUNT}" in
yes) prune_libtool_files --modules;;
no) ;;
@@ -336,3 +240,7 @@ gnome2_pkg_postrm() {
gnome2_giomodule_cache_update
fi
}
+
+fi
+
+EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install pkg_preinst pkg_postinst pkg_postrm
diff --git a/eclass/gnustep-2.eclass b/eclass/gnustep-2.eclass
index e1d7f00da080..9750efa8d5c8 100644
--- a/eclass/gnustep-2.eclass
+++ b/eclass/gnustep-2.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: gnustep-2.eclass
@@ -33,7 +33,7 @@ esac
DEPEND+=" virtual/gnustep-back"
RDEPEND="${DEPEND}"
-# The following gnustep-based EXPORT_FUNCTIONS are available:
+# The following gnustep-based exported functions are available:
# * gnustep-base_pkg_setup
# * gnustep-base_src_prepare
# * gnustep-base_src_configure
diff --git a/eclass/go-module.eclass b/eclass/go-module.eclass
index 6bba9542cfc8..5cffbb1084d9 100644
--- a/eclass/go-module.eclass
+++ b/eclass/go-module.eclass
@@ -65,11 +65,10 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-inherit multiprocessing toolchain-funcs
-
-if [[ -z ${_GO_MODULE} ]]; then
+if [[ -z ${_GO_MODULE_ECLASS} ]]; then
+_GO_MODULE_ECLASS=1
-_GO_MODULE=1
+inherit multiprocessing toolchain-funcs
if [[ ! ${GO_OPTIONAL} ]]; then
BDEPEND=">=dev-lang/go-1.18"
@@ -79,8 +78,6 @@ if [[ ! ${GO_OPTIONAL} ]]; then
# Added here rather than to each affected package, so it can be cleaned up just
# once when pkgcheck is improved.
BDEPEND+=" app-arch/unzip"
-
- EXPORT_FUNCTIONS src_unpack
fi
# Force go to build in module mode.
@@ -526,3 +523,7 @@ _go-module_gomod_encode() {
}
fi
+
+if [[ ! ${GO_OPTIONAL} ]]; then
+ EXPORT_FUNCTIONS src_unpack
+fi
diff --git a/eclass/golang-build.eclass b/eclass/golang-build.eclass
index f24029a1a9fd..235313bd70f5 100644
--- a/eclass/golang-build.eclass
+++ b/eclass/golang-build.eclass
@@ -1,10 +1,10 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: golang-build.eclass
# @MAINTAINER:
# William Hubbs <williamh@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6 7
+# @SUPPORTED_EAPIS: 6 7
# @PROVIDES: golang-base
# @BLURB: Eclass for compiling go packages.
# @DEPRECATED: go-module.eclass
@@ -12,21 +12,15 @@
# This eclass provides default src_compile, src_test and src_install
# functions for software written in the Go programming language.
-inherit golang-base
-
-case "${EAPI:-0}" in
- 5|6|7)
- ;;
- *)
- die "${ECLASS}: Unsupported eapi (EAPI=${EAPI})"
- ;;
+case ${EAPI} in
+ 6|7) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-EXPORT_FUNCTIONS src_compile src_install src_test
-
-if [[ -z ${_GOLANG_BUILD} ]]; then
+if [[ -z ${_GOLANG_BUILD_ECLASS} ]]; then
+_GOLANG_BUILD_ECLASS=1
-_GOLANG_BUILD=1
+inherit golang-base
# @ECLASS_VARIABLE: EGO_BUILD_FLAGS
# @DEFAULT_UNSET
@@ -85,3 +79,5 @@ golang-build_src_test() {
}
fi
+
+EXPORT_FUNCTIONS src_compile src_install src_test
diff --git a/eclass/golang-vcs-snapshot.eclass b/eclass/golang-vcs-snapshot.eclass
index 5140064a651e..9c199bbbd8c5 100644
--- a/eclass/golang-vcs-snapshot.eclass
+++ b/eclass/golang-vcs-snapshot.eclass
@@ -1,10 +1,10 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: golang-vcs-snapshot.eclass
# @MAINTAINER:
# William Hubbs <williamh@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6 7
+# @SUPPORTED_EAPIS: 6 7
# @PROVIDES: golang-base
# @BLURB: eclass to unpack VCS snapshot tarballs for Go software
# @DEPRECATED: go-module.eclass
@@ -44,14 +44,15 @@
# ${WORKDIR}/${P}/src/github.com/user/package
# and add the vendored tarballs to ${WORKDIR}/src/${EGO_PN}/vendor
-inherit golang-base
-
-case ${EAPI:-0} in
- 5|6|7) ;;
- *) die "${ECLASS} API in EAPI ${EAPI} not yet established."
+case ${EAPI} in
+ 6|7) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-EXPORT_FUNCTIONS src_unpack
+if [[ -z ${_GOLANG_VCS_SNAPSHOT_ECLASS} ]]; then
+_GOLANG_VCS_SNAPSHOT_ECLASS=1
+
+inherit golang-base
# @ECLASS_VARIABLE: EGO_VENDOR
# @DESCRIPTION:
@@ -82,7 +83,7 @@ unset -f _golang-vcs-snapshot_set_vendor_uri
_golang-vcs-snapshot_dovendor() {
local VENDOR_PATH=$1 VENDORPN=$2 TARBALL=$3
- rm -fr "${VENDOR_PATH}/${VENDORPN}" || die
+ rm -rf "${VENDOR_PATH}/${VENDORPN}" || die
mkdir -p "${VENDOR_PATH}/${VENDORPN}" || die
tar -C "${VENDOR_PATH}/${VENDORPN}" -x --strip-components 1\
-f "${DISTDIR}"/${TARBALL} || die
@@ -117,3 +118,7 @@ golang-vcs-snapshot_src_unpack() {
done
fi
}
+
+fi
+
+EXPORT_FUNCTIONS src_unpack
diff --git a/eclass/golang-vcs.eclass b/eclass/golang-vcs.eclass
index 595412ea0c88..7eb60e5f2453 100644
--- a/eclass/golang-vcs.eclass
+++ b/eclass/golang-vcs.eclass
@@ -1,10 +1,10 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: golang-vcs.eclass
# @MAINTAINER:
# William Hubbs <williamh@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6 7
+# @SUPPORTED_EAPIS: 6 7
# @PROVIDES: golang-base
# @BLURB: Eclass for fetching and unpacking go repositories.
# @DEPRECATED: go-module.eclass
@@ -12,21 +12,15 @@
# This eclass is written to ease the maintenance of live ebuilds
# of software written in the Go programming language.
-inherit estack eutils golang-base
-
-case "${EAPI:-0}" in
- 5|6|7)
- ;;
- *)
- die "${ECLASS}: Unsupported eapi (EAPI=${EAPI})"
- ;;
+case ${EAPI} in
+ 6|7) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-EXPORT_FUNCTIONS src_unpack
-
-if [[ -z ${_GOLANG_VCS} ]]; then
+if [[ -z ${_GOLANG_VCS_ECLASS} ]]; then
+_GOLANG_VCS_ECLASS=1
-_GOLANG_VCS=1
+inherit estack eutils golang-base
PROPERTIES+=" live"
@@ -139,3 +133,5 @@ golang-vcs_src_unpack() {
}
fi
+
+EXPORT_FUNCTIONS src_unpack
diff --git a/eclass/haskell-cabal.eclass b/eclass/haskell-cabal.eclass
index 086e05426cda..12251a268b45 100644
--- a/eclass/haskell-cabal.eclass
+++ b/eclass/haskell-cabal.eclass
@@ -41,15 +41,16 @@
# is fixed.
case ${EAPI} in
- # eutils is for eqawarn
- 6|7) inherit eutils ;;
- 8) ;;
+ 6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-inherit ghc-package multilib toolchain-funcs
+if [[ -z ${_HASKELL_CABAL_ECLASS} ]]; then
+_HASKELL_CABAL_ECLASS=1
-EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_compile src_test src_install pkg_postinst pkg_postrm
+[[ ${EAPI} == 6 ]] && inherit eqawarn
+
+inherit ghc-package multilib toolchain-funcs
# @ECLASS_VARIABLE: CABAL_EXTRA_CONFIGURE_FLAGS
# @USER_VARIABLE
@@ -910,3 +911,7 @@ replace-hcflags() {
return 0
}
+
+fi
+
+EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_compile src_test src_install pkg_postinst pkg_postrm
diff --git a/eclass/java-ant-2.eclass b/eclass/java-ant-2.eclass
index c0c94f15e338..61a90f3f3196 100644
--- a/eclass/java-ant-2.eclass
+++ b/eclass/java-ant-2.eclass
@@ -15,18 +15,16 @@
# manual manipulation of build.xml files. Should be inherited after java-pkg-2
# or java-pkg-opt-2 eclass.
-inherit java-utils-2 multilib
-
-case ${EAPI:-0} in
- [678]) ;;
+case ${EAPI} in
+ 6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-EXPORT_FUNCTIONS src_configure
-
if [[ -z ${_JAVA_ANT_2_ECLASS} ]] ; then
_JAVA_ANT_2_ECLASS=1
+inherit java-utils-2 multilib
+
# This eclass provides functionality for Java packages which use
# ant to build. In particular, it will attempt to fix build.xml files, so that
# they use the appropriate 'target' and 'source' attributes.
@@ -439,3 +437,5 @@ java-ant_rewrite-bootclasspath() {
}
fi
+
+EXPORT_FUNCTIONS src_configure
diff --git a/eclass/java-vm-2.eclass b/eclass/java-vm-2.eclass
index ad814d7efd1a..01bbcf697fb4 100644
--- a/eclass/java-vm-2.eclass
+++ b/eclass/java-vm-2.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: java-vm-2.eclass
@@ -10,14 +10,15 @@
# This eclass provides functionality which assists with installing
# virtual machines, and ensures that they are recognized by java-config.
-case ${EAPI:-0} in
- [678]) ;;
- *) die "EAPI=${EAPI} is not supported" ;;
+case ${EAPI} in
+ 6|7|8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-inherit multilib pax-utils prefix xdg-utils
+if [[ -z ${_JAVA_VM_2_ECLASS} ]]; then
+_JAVA_VM_2_ECLASS=1
-EXPORT_FUNCTIONS pkg_setup pkg_postinst pkg_prerm pkg_postrm
+inherit multilib pax-utils prefix xdg-utils
RDEPEND="
dev-java/java-config
@@ -350,3 +351,7 @@ java-vm_sandbox-predict() {
echo "SANDBOX_PREDICT=\"${path}\"" > "${ED}/etc/sandbox.d/20${VMHANDLE}" \
|| die "Failed to write sandbox control file"
}
+
+fi
+
+EXPORT_FUNCTIONS pkg_setup pkg_postinst pkg_prerm pkg_postrm
diff --git a/eclass/kde.org.eclass b/eclass/kde.org.eclass
index efe3186f286c..629c57d9a082 100644
--- a/eclass/kde.org.eclass
+++ b/eclass/kde.org.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: kde.org.eclass
@@ -17,7 +17,7 @@
case ${EAPI} in
8) ;;
- *) die "EAPI=${EAPI:-0} is not supported" ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
if [[ -z ${_KDE_ORG_ECLASS} ]]; then
diff --git a/eclass/kodi-addon.eclass b/eclass/kodi-addon.eclass
index 6e7fa26f3c8a..b7678485795e 100644
--- a/eclass/kodi-addon.eclass
+++ b/eclass/kodi-addon.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: kodi-addon.eclass
@@ -17,8 +17,6 @@ esac
inherit cmake
-EXPORT_FUNCTIONS src_configure
-
# @FUNCTION: kodi-addon_src_configure
# @DESCRIPTION:
# Configure handling for Kodi addons
@@ -30,3 +28,5 @@ kodi-addon_src_configure() {
cmake_src_configure
}
+
+EXPORT_FUNCTIONS src_configure
diff --git a/eclass/libtool.eclass b/eclass/libtool.eclass
index a38f41588289..9797b22aabff 100644
--- a/eclass/libtool.eclass
+++ b/eclass/libtool.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: libtool.eclass
@@ -17,10 +17,10 @@
if [[ -z ${_LIBTOOL_ECLASS} ]]; then
_LIBTOOL_ECLASS=1
-case ${EAPI:-0} in
- 5|6) DEPEND=">=app-portage/elt-patches-20170815" ;;
+case ${EAPI} in
+ 6) DEPEND=">=app-portage/elt-patches-20170815" ;;
7|8) BDEPEND=">=app-portage/elt-patches-20170815" ;;
- *) die "${ECLASS}: EAPI ${EAPI} not supported" ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
inherit toolchain-funcs
diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
index a65d0c441ba2..ce04a0dc66a7 100644
--- a/eclass/linux-info.eclass
+++ b/eclass/linux-info.eclass
@@ -1,9 +1,10 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: linux-info.eclass
# @MAINTAINER:
# kernel@gentoo.org
+# @SUPPORTED_EAPIS: 6 7 8
# @AUTHOR:
# Original author: John Mylchreest <johnm@gentoo.org>
# @BLURB: eclass used for accessing kernel related information
@@ -26,6 +27,14 @@
# get_version
# get_running_version
+case ${EAPI} in
+ 6|7|8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
+if [[ -z ${_LINUX_INFO_ECLASS} ]]; then
+_LINUX_INFO_ECLASS=1
+
# A Couple of env vars are available to effect usage of this eclass
# These are as follows:
@@ -151,9 +160,7 @@ KERNEL_DIR="${KERNEL_DIR:-${ROOT%/}/usr/src/linux}"
# And to ensure all the weirdness with crosscompile
inherit toolchain-funcs
-[[ ${EAPI:-0} == [0123456] ]] && inherit eapi7-ver
-
-EXPORT_FUNCTIONS pkg_setup
+[[ ${EAPI} == 6 ]] && inherit eapi7-ver
# bug #75034
case ${ARCH} in
@@ -231,7 +238,6 @@ getfilevar() {
# We use nonfatal because we want the caller to take care of things #373151
# Pass need-config= to make to avoid config check in kernel Makefile.
# Pass dot-config=0 to avoid the config check in kernels prior to 5.4.
- [[ ${EAPI:-0} == [0123] ]] && nonfatal() { "$@"; }
echo -e "e:\\n\\t@echo \$(${1})\\ninclude ${basefname}" | \
nonfatal emake -C "${basedname}" --no-print-directory M="${T}" \
dot-config=0 need-config= need-compiler= \
@@ -1009,3 +1015,7 @@ kernel_get_makefile() {
[[ -s ${KV_DIR}/Makefile ]] && KERNEL_MAKEFILE="${KV_DIR}/Makefile" && return
}
+
+fi
+
+EXPORT_FUNCTIONS pkg_setup
diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass
index c97eaae1fc63..b182f08c5468 100644
--- a/eclass/llvm.org.eclass
+++ b/eclass/llvm.org.eclass
@@ -30,12 +30,9 @@
# llvm.org_set_globals
# @CODE
-case "${EAPI:-0}" in
- 7|8)
- ;;
- *)
- die "Unsupported EAPI=${EAPI} for ${ECLASS}"
- ;;
+case ${EAPI} in
+ 7|8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
# == version substrings ==
@@ -325,8 +322,6 @@ llvm.org_set_globals() {
# == phase functions ==
-EXPORT_FUNCTIONS src_unpack src_prepare
-
# @FUNCTION: llvm.org_src_unpack
# @DESCRIPTION:
# Unpack or checkout requested LLVM components.
@@ -472,3 +467,5 @@ llvm_install_manpages() {
doins "${WORKDIR}/llvm-${PV}-manpages/${LLVM_COMPONENTS[0]}"/*.1
fi
}
+
+EXPORT_FUNCTIONS src_unpack src_prepare
diff --git a/eclass/lua-single.eclass b/eclass/lua-single.eclass
index aadd3b4ea675..8432df0583bb 100644
--- a/eclass/lua-single.eclass
+++ b/eclass/lua-single.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: lua-single.eclass
@@ -64,23 +64,19 @@
# @CODE
case ${EAPI} in
- 7|8)
- ;;
+ 7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_LUA_SINGLE_R0} ]]; then
+if [[ -z ${_LUA_SINGLE_ECLASS} ]]; then
+_LUA_SINGLE_ECLASS=1
-if [[ ${_LUA_R0} ]]; then
+if [[ ${_LUA_ECLASS} ]]; then
die 'lua-single.eclass cannot be used with lua.eclass.'
fi
inherit lua-utils
-fi
-
-EXPORT_FUNCTIONS pkg_setup
-
# @ECLASS_VARIABLE: LUA_COMPAT
# @REQUIRED
# @PRE_INHERIT
@@ -276,8 +272,6 @@ _lua_single_set_globals() {
_lua_single_set_globals
unset -f _lua_single_set_globals
-if [[ ! ${_LUA_SINGLE_R0} ]]; then
-
# @FUNCTION: _lua_gen_usedep
# @USAGE: [<pattern>...]
# @INTERNAL
@@ -532,5 +526,6 @@ lua-single_pkg_setup() {
[[ ${MERGE_TYPE} != binary ]] && lua_setup
}
-_LUA_SINGLE_R0=1
fi
+
+EXPORT_FUNCTIONS pkg_setup
diff --git a/eclass/lua-utils.eclass b/eclass/lua-utils.eclass
index 475bd993894b..0ff36734dc8f 100644
--- a/eclass/lua-utils.eclass
+++ b/eclass/lua-utils.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: lua-utils.eclass
@@ -18,12 +18,12 @@
# functions. It can be inherited safely.
case ${EAPI} in
- 7|8)
- ;;
+ 7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_LUA_UTILS_R0} ]]; then
+if [[ -z ${_LUA_UTILS_ECLASS} ]]; then
+_LUA_UTILS_ECLASS=1
inherit toolchain-funcs
@@ -384,7 +384,7 @@ lua_enable_tests() {
busted)
test_directory="${2:-spec}"
test_pkg="dev-lua/busted"
- if [[ ! ${_LUA_SINGLE_R0} ]]; then
+ if [[ ! ${_LUA_SINGLE_ECLASS} ]]; then
eval "lua_src_test() {
busted --lua=\"\${ELUA}\" --output=\"plainTerminal\" \"${test_directory}\" || die \"Tests fail with \${ELUA}\"
}"
@@ -403,7 +403,7 @@ lua_enable_tests() {
local test_deps=${RDEPEND}
if [[ -n ${test_pkg} ]]; then
- if [[ ! ${_LUA_SINGLE_R0} ]]; then
+ if [[ ! ${_LUA_SINGLE_ECLASS} ]]; then
test_deps+=" ${test_pkg}[${LUA_USEDEP}]"
else
test_deps+=" $(lua_gen_cond_dep "
@@ -536,5 +536,4 @@ lua_get_version() {
echo "${LUA_VERSION}"
}
-_LUA_UTILS_R0=1
fi
diff --git a/eclass/lua.eclass b/eclass/lua.eclass
index 29b8b6ec6348..bb2e41ef1061 100644
--- a/eclass/lua.eclass
+++ b/eclass/lua.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: lua.eclass
@@ -52,21 +52,19 @@
# @CODE
case ${EAPI} in
- 7|8)
- ;;
+ 7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_LUA_R0} ]]; then
+if [[ -z ${_LUA_ECLASS} ]]; then
+_LUA_ECLASS=1
-if [[ ${_LUA_SINGLE_R0} ]]; then
+if [[ ${_LUA_SINGLE_ECLASS} ]]; then
die 'lua.eclass cannot be used with lua-single.eclass.'
fi
inherit multibuild lua-utils
-fi
-
# @ECLASS_VARIABLE: LUA_COMPAT
# @REQUIRED
# @PRE_INHERIT
@@ -197,8 +195,6 @@ fi
# lua_targets_lua5-1(-)?,lua_targets_lua5-3(-)?
# @CODE
-if [[ ! ${_LUA_R0} ]]; then
-
# @FUNCTION: _lua_validate_useflags
# @INTERNAL
# @DESCRIPTION:
@@ -314,9 +310,6 @@ lua_foreach_impl() {
multibuild_foreach_variant _lua_multibuild_wrapper "${@}"
}
-_LUA_R0=1
-fi
-
# @FUNCTION: _lua_set_globals
# @INTERNAL
# @DESCRIPTION:
@@ -375,3 +368,5 @@ _lua_set_globals() {
_lua_set_globals
unset -f _lua_set_globals
+
+fi
diff --git a/eclass/mate-desktop.org.eclass b/eclass/mate-desktop.org.eclass
index 2e45d864dd74..875e4615773c 100644
--- a/eclass/mate-desktop.org.eclass
+++ b/eclass/mate-desktop.org.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: mate-desktop.org.eclass
@@ -12,12 +12,14 @@
# Provide a default SRC_URI and EGIT_REPO_URI for MATE packages as well as
# exporting some useful values like the MATE_BRANCH
-# EAPIs < 7 are banned.
-case "${EAPI:-0}" in
+case ${EAPI} in
7) ;;
- *) die "EAPI=${EAPI:-0} is not supported" ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
+if [[ -z ${_MATE_DESKTOP_ORG_ECLASS} ]]; then
+_MATE_DESKTOP_ORG_ECLASS=1
+
if [[ ${PV} == 9999 ]]; then
inherit git-r3
fi
@@ -57,3 +59,5 @@ fi
# Set HOMEPAGE for all ebuilds
HOMEPAGE="https://mate-desktop.org"
+
+fi
diff --git a/eclass/mate.eclass b/eclass/mate.eclass
index c1886648140e..388cdf2f827d 100644
--- a/eclass/mate.eclass
+++ b/eclass/mate.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: mate.eclass
@@ -15,12 +15,14 @@
# MATE framework. Occassionally acts as a wrapper to gnome2 due to the
# fact that MATE is a GNOME fork. For additional functions, see gnome2-utils.eclass.
-# Check EAPI only
-case "${EAPI:-0}" in
+case ${EAPI} in
7) ;;
- *) die "EAPI=${EAPI:-0} is not supported" ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
+if [[ -z ${_MATE_ECLASS} ]]; then
+_MATE_ECLASS=1
+
# Inherit happens below after declaration of GNOME2_LA_PUNT
# @ECLASS_VARIABLE: MATE_LA_PUNT
@@ -157,4 +159,6 @@ mate_pkg_postrm() {
gnome2_pkg_postrm "$@"
}
+fi
+
EXPORT_FUNCTIONS src_prepare src_configure src_install pkg_preinst pkg_postinst pkg_postrm
diff --git a/eclass/meson-multilib.eclass b/eclass/meson-multilib.eclass
index 49c64418727e..0c069af11930 100644
--- a/eclass/meson-multilib.eclass
+++ b/eclass/meson-multilib.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: meson-multilib.eclass
@@ -31,8 +31,6 @@ _MESON_MULTILIB_ECLASS=1
inherit meson multilib-minimal
-EXPORT_FUNCTIONS src_configure src_compile src_test src_install
-
# @FUNCTION: meson_native_use_bool
# @USAGE: <USE flag> [option name]
# @DESCRIPTION:
@@ -130,3 +128,5 @@ multilib_src_install() {
}
fi
+
+EXPORT_FUNCTIONS src_configure src_compile src_test src_install
diff --git a/eclass/meson.eclass b/eclass/meson.eclass
index a79019ccfd35..881e24700053 100644
--- a/eclass/meson.eclass
+++ b/eclass/meson.eclass
@@ -1,4 +1,4 @@
-# Copyright 2017-2022 Gentoo Authors
+# Copyright 2017-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: meson.eclass
@@ -44,8 +44,6 @@ _MESON_ECLASS=1
inherit multiprocessing ninja-utils python-utils-r1 toolchain-funcs
-EXPORT_FUNCTIONS src_configure src_compile src_test src_install
-
BDEPEND=">=dev-util/meson-0.62.2
${NINJA_DEPEND}
dev-util/meson-format-array
@@ -449,3 +447,5 @@ meson_src_install() {
}
fi
+
+EXPORT_FUNCTIONS src_configure src_compile src_test src_install
diff --git a/eclass/mono-env.eclass b/eclass/mono-env.eclass
index 8cec214e615f..48712587ff3e 100644
--- a/eclass/mono-env.eclass
+++ b/eclass/mono-env.eclass
@@ -1,21 +1,19 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: mono-env.eclass
# @MAINTAINER:
# maintainer-needed@gentoo.org
-# @SUPPORTED_EAPIS: 5 6 7
+# @SUPPORTED_EAPIS: 6 7
# @BLURB: Set environment variables commonly used by dotnet packages.
# @DESCRIPTION:
# Set environment variables commonly used by dotnet packages.
-case ${EAPI:-0} in
- [567]) ;;
+case ${EAPI} in
+ 6|7) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-EXPORT_FUNCTIONS pkg_setup
-
if [[ -z ${_MONO_ENV_ECLASS} ]] ; then
_MONO_ENV_ECLASS=1
@@ -48,3 +46,5 @@ mono-env_pkg_setup() {
}
fi
+
+EXPORT_FUNCTIONS pkg_setup
diff --git a/eclass/mount-boot.eclass b/eclass/mount-boot.eclass
index 3111d9dcb9b5..73beb9adea67 100644
--- a/eclass/mount-boot.eclass
+++ b/eclass/mount-boot.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: mount-boot.eclass
@@ -13,13 +13,11 @@
# function tries to ensure that it's mounted in rw mode, exiting with an
# error if it can't. It does nothing if /boot isn't a separate partition.
-case ${EAPI:-0} in
+case ${EAPI} in
6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-EXPORT_FUNCTIONS pkg_pretend pkg_preinst pkg_postinst pkg_prerm pkg_postrm
-
# @FUNCTION: mount-boot_is_disabled
# @INTERNAL
# @DESCRIPTION:
@@ -111,3 +109,5 @@ mount-boot_pkg_prerm() {
mount-boot_pkg_postinst() { :; }
mount-boot_pkg_postrm() { :; }
+
+EXPORT_FUNCTIONS pkg_pretend pkg_preinst pkg_postinst pkg_prerm pkg_postrm
diff --git a/eclass/myspell-r2.eclass b/eclass/myspell-r2.eclass
index 965327ac1b58..05d48dc97dee 100644
--- a/eclass/myspell-r2.eclass
+++ b/eclass/myspell-r2.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: myspell-r2.eclass
@@ -37,15 +37,10 @@
# @CODE
case ${EAPI} in
- 7|8)
- ;;
- *)
- die "${ECLASS}: EAPI ${EAPI:-0} not supported"
- ;;
+ 7|8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-EXPORT_FUNCTIONS src_unpack src_install
-
# Basically no extra deps needed.
# Unzip is required for .oxt libreoffice extensions
# which are just fancy zip files.
@@ -133,3 +128,5 @@ myspell-r2_src_install() {
fi
done
}
+
+EXPORT_FUNCTIONS src_unpack src_install
diff --git a/eclass/netsurf.eclass b/eclass/netsurf.eclass
index 07b5ab3b5284..293f439e9715 100644
--- a/eclass/netsurf.eclass
+++ b/eclass/netsurf.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: netsurf.eclass
@@ -9,9 +9,9 @@
# @DESCRIPTION:
# Handle settings build environment for netsurf build system
-case "${EAPI:-0}" in
+case ${EAPI} in
7) ;;
- *) die "EAPI=${EAPI} is not supported" ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
inherit toolchain-funcs
diff --git a/eclass/office-ext-r1.eclass b/eclass/office-ext-r1.eclass
index 8cf472fe5bcc..abc0cabaa310 100644
--- a/eclass/office-ext-r1.eclass
+++ b/eclass/office-ext-r1.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: office-ext-r1.eclass
@@ -6,18 +6,18 @@
# The office team <office@gentoo.org>
# @AUTHOR:
# Tomáš Chvátal <scarabeus@gentoo.org>
-# @SUPPORTED_EAPIS: 5 7
+# @SUPPORTED_EAPIS: 7
# @BLURB: Eclass for installing libreoffice extensions
# @DESCRIPTION:
# Eclass for easing maintenance of libreoffice extensions.
-case "${EAPI:-0}" in
- 5) inherit eutils multilib ;;
- 7) inherit eutils ;;
- *) die "EAPI=${EAPI} is not supported" ;;
+case ${EAPI} in
+ 7) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-EXPORT_FUNCTIONS src_unpack src_install
+if [[ -z ${_OFFICE_EXT_R1_ECLASS} ]]; then
+_OFFICE_EXT_R1_ECLASS=1
# @ECLASS_VARIABLE: OFFICE_REQ_USE
# @PRE_INHERIT
@@ -112,7 +112,7 @@ office-ext-r1_src_unpack() {
for i in ${OFFICE_EXTENSIONS[@]}; do
# Unpack the extensions where required and add case for oxt
# which should be most common case for the extensions.
- if [[ -f "${OFFICE_EXTENSIONS_LOCATION}/${i}" ]] ; then
+ if [[ -f ${OFFICE_EXTENSIONS_LOCATION}/${i} ]] ; then
case ${i} in
*.oxt)
mkdir -p "${WORKDIR}/${i}/" || die
@@ -142,9 +142,13 @@ office-ext-r1_src_install() {
for j in ${OFFICE_EXTENSIONS[@]}; do
pushd "${WORKDIR}/${j}/" > /dev/null || die
insinto /usr/$(get_libdir)/${i}/share/extensions/${j/.oxt/}
- doins -r *
+ doins -r .
popd > /dev/null || die
done
fi
done
}
+
+fi
+
+EXPORT_FUNCTIONS src_unpack src_install
diff --git a/eclass/optfeature.eclass b/eclass/optfeature.eclass
index b44fc1b85251..c8b4911320d3 100644
--- a/eclass/optfeature.eclass
+++ b/eclass/optfeature.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: optfeature.eclass
@@ -9,7 +9,7 @@
case ${EAPI} in
7|8) ;;
- *) die "${ECLASS}: EAPI=${EAPI:-0} is not supported" ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
if [[ -z ${_OPTFEATURE_ECLASS} ]]; then
diff --git a/eclass/out-of-source.eclass b/eclass/out-of-source.eclass
index 06de39e6fc60..dd54c8933d4e 100644
--- a/eclass/out-of-source.eclass
+++ b/eclass/out-of-source.eclass
@@ -34,10 +34,10 @@
case ${EAPI} in
7|8);;
- *) die "EAPI ${EAPI:-0} unsupported (too old)";;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_OUT_OF_SOURCE_ECLASS} ]]; then
+if [[ -z ${_OUT_OF_SOURCE_ECLASS} ]]; then
_OUT_OF_SOURCE_ECLASS=1
# @ECLASS_VARIABLE: BUILD_DIR
diff --git a/eclass/php-pear-r2.eclass b/eclass/php-pear-r2.eclass
index 2d204ed24c3c..29bcf1e6fce8 100644
--- a/eclass/php-pear-r2.eclass
+++ b/eclass/php-pear-r2.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: php-pear-r2.eclass
@@ -14,20 +14,16 @@
# Note that this eclass doesn't handle dependencies of PEAR packages
# on purpose; please use (R)DEPEND to define them correctly!
-EXPORT_FUNCTIONS src_install pkg_postinst pkg_postrm
-
-case "${EAPI:-0}" in
- 6|7)
- ;;
- 8)
- IDEPEND=">=dev-php/pear-1.8.1"
- ;;
- *)
- die "Unsupported EAPI=${EAPI} for ${ECLASS}"
- ;;
+case ${EAPI} in
+ 6|7|8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
+if [[ -z ${_PHP_PEAR_R2_ECLASS} ]]; then
+_PHP_PEAR_R2_ECLASS=1
+
RDEPEND=">=dev-php/pear-1.8.1"
+[[ ${EAPI} != [67] ]] && IDEPEND=">=dev-php/pear-1.8.1"
# @ECLASS_VARIABLE: PHP_PEAR_PKG_NAME
# @DESCRIPTION:
@@ -129,3 +125,7 @@ php-pear-r2_pkg_postrm() {
# Uninstall known dependency
"${EROOT%/}/usr/bin/peardev" uninstall -nrO "${PHP_PEAR_DOMAIN}/${PHP_PEAR_PKG_NAME}"
}
+
+fi
+
+EXPORT_FUNCTIONS src_install pkg_postinst pkg_postrm
diff --git a/eclass/plasma-mobile.kde.org.eclass b/eclass/plasma-mobile.kde.org.eclass
index 73cb98a3c153..1e2c5b6eb4fe 100644
--- a/eclass/plasma-mobile.kde.org.eclass
+++ b/eclass/plasma-mobile.kde.org.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: plasma-mobile.kde.org.eclass
@@ -19,7 +19,7 @@
case ${EAPI} in
8) ;;
- *) die "EAPI=${EAPI:-0} is not supported" ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
if [[ -z ${_PLASMA_MOBILE_KDE_ORG_ECLASS} ]]; then
diff --git a/eclass/plasma.kde.org.eclass b/eclass/plasma.kde.org.eclass
index b0aad867ec1d..8fcf087896f1 100644
--- a/eclass/plasma.kde.org.eclass
+++ b/eclass/plasma.kde.org.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: plasma.kde.org.eclass
@@ -19,7 +19,7 @@
case ${EAPI} in
8) ;;
- *) die "EAPI=${EAPI:-0} is not supported" ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
if [[ -z ${_PLASMA_KDE_ORG_ECLASS} ]]; then
diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass
index 657922fe646d..4758defe6493 100644
--- a/eclass/python-r1.eclass
+++ b/eclass/python-r1.eclass
@@ -35,7 +35,7 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_PYTHON_R1_ECLASS} ]]; then
+if [[ -z ${_PYTHON_R1_ECLASS} ]]; then
_PYTHON_R1_ECLASS=1
if [[ ${_PYTHON_SINGLE_R1_ECLASS} ]]; then
@@ -616,7 +616,7 @@ _python_multibuild_wrapper() {
python_foreach_impl() {
debug-print-function ${FUNCNAME} "${@}"
- if [[ ${_DISTUTILS_R1} ]]; then
+ if [[ ${_DISTUTILS_R1_ECLASS} ]]; then
if has "${EBUILD_PHASE}" prepare configure compile test install &&
[[ ! ${_DISTUTILS_CALLING_FOREACH_IMPL} &&
! ${_DISTUTILS_FOREACH_IMPL_WARNED} ]]
diff --git a/eclass/qmail.eclass b/eclass/qmail.eclass
index b647ac5d8e3a..149bfa0c25f3 100644
--- a/eclass/qmail.eclass
+++ b/eclass/qmail.eclass
@@ -1,18 +1,18 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: qmail.eclass
# @MAINTAINER:
# Rolf Eike Beer <eike@sf-mail.de>
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: common qmail functions
-case ${EAPI:-0} in
- [678]) ;;
+case ${EAPI} in
+ 7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ -z ${_QMAIL_ECLASS} ]] ; then
+if [[ -z ${_QMAIL_ECLASS} ]]; then
_QMAIL_ECLASS=1
inherit flag-o-matic toolchain-funcs fixheadtails
@@ -58,7 +58,7 @@ is_prime() {
dospp() {
exeinto "${QMAIL_HOME}"/plugins/
- newexe ${1} ${2:-$(basename ${1})}
+ newexe ${1} ${2:-${1##*/}}
}
# @FUNCTION: dosupervise
@@ -68,7 +68,7 @@ dospp() {
dosupervise() {
local service=$1
local runfile=${2:-${service}} logfile=${3:-${service}-log}
- [[ -z "${service}" ]] && die "no service given"
+ [[ -z ${service} ]] && die "no service given"
dodir ${SUPERVISE_DIR}/${service}{,/log}
fperms +t ${SUPERVISE_DIR}/${service}{,/log}
@@ -92,16 +92,16 @@ qmail_set_cc() {
echo "${cc} ${CFLAGS} ${CPPFLAGS}" > ./conf-cc || die 'Patching conf-cc failed.'
echo "${ld} ${LDFLAGS}" > ./conf-ld || die 'Patching conf-ld failed.'
- sed -e "s#'ar #'$(tc-getAR) #" -e "s#'ranlib #'$(tc-getRANLIB) #" -i make-makelib.sh
+ sed -e "s#'ar #'$(tc-getAR) #" -e "s#'ranlib #'$(tc-getRANLIB) #" -i make-makelib.sh || die
}
genqmail_src_unpack() {
- cd "${WORKDIR}"
+ cd "${WORKDIR}" || die
[[ -n ${GENQMAIL_PV} ]] && unpack "${GENQMAIL_F}"
}
qmail_spp_src_unpack() {
- cd "${WORKDIR}"
+ cd "${WORKDIR}" || die
[[ -n ${QMAIL_SPP_PV} ]] && unpack "${QMAIL_SPP_F}"
}
@@ -109,23 +109,23 @@ qmail_spp_src_unpack() {
# @DESCRIPTION:
# Unpack common config files, and set built configuration (CFLAGS, LDFLAGS, etc)
qmail_src_postunpack() {
- cd "${S}"
+ cd "${S}" || die
qmail_set_cc
mysplit=${QMAIL_CONF_SPLIT:-23}
is_prime ${mysplit} || die "QMAIL_CONF_SPLIT is not a prime number."
einfo "Using conf-split value of ${mysplit}."
- echo -n ${mysplit} > "${S}"/conf-split
+ echo -n ${mysplit} > "${S}"/conf-split || die
}
qmail_src_compile() {
- cd "${S}"
+ cd "${S}" || die
emake it man "$@"
}
qmail_spp_src_compile() {
- cd "${GENQMAIL_S}"/spp/
+ cd "${GENQMAIL_S}"/spp/ || die
emake
}
@@ -152,6 +152,7 @@ qmail_base_install() {
qreceipt sendmail tcp-env
# obsolete tools, install if they are still present
+ local i
for i in elq maildirwatch pinq qail qsmhook; do
[[ -x ${i} ]] && doexe ${i}
done
@@ -167,7 +168,6 @@ qmail_base_install() {
exeopts -o qmailq -g qmail -m 4711
doexe qmail-queue
-
)
}
@@ -189,7 +189,7 @@ qmail_man_install() {
dodoc BLURB* INSTALL* PIC* README* REMOVE* \
SENDMAIL* TEST* THANKS* VERSION*
# notqmail converted the files to markdown
- if [ -f CHANGES ]; then
+ if [[ -f CHANGES ]]; then
dodoc CHANGES FAQ SECURITY THOUGHTS UPGRADE
else
dodoc CHANGES.md FAQ.md SECURITY.md THOUGHTS.md UPGRADE.md
@@ -225,13 +225,13 @@ qmail_maildir_install() {
"${MAILDIRMAKE}" "${D}${QMAIL_HOME}"/alias/.maildir
keepdir "${QMAIL_HOME}"/alias/.maildir/{cur,new,tmp}
+ local i
for i in "${QMAIL_HOME}"/alias/.qmail-{mailer-daemon,postmaster,root}; do
- if [[ ! -f "${ROOT}${i}" ]]; then
+ if [[ ! -f ${ROOT}${i} ]]; then
touch "${D}${i}"
fowners alias:qmail "${i}"
fi
done
-
)
}
@@ -240,7 +240,7 @@ qmail_tcprules_install() {
insinto "${TCPRULES_DIR}"
doins "${GENQMAIL_S}"/tcprules/Makefile.qmail
doins "${GENQMAIL_S}"/tcprules/tcp.qmail-*
- rm -f "${D}${TCPRULES_DIR}"/tcp.qmail-pop3sd
+ rm -f "${D}${TCPRULES_DIR}"/tcp.qmail-pop3sd || die
}
qmail_supervise_install_one() {
@@ -255,8 +255,9 @@ qmail_supervise_install_one() {
qmail_supervise_install() {
einfo "Installing supervise scripts"
- cd "${GENQMAIL_S}"/supervise
+ cd "${GENQMAIL_S}"/supervise || die
+ local i
for i in qmail-{send,smtpd,qmtpd,qmqpd}; do
qmail_supervise_install_one ${i}
done
@@ -273,6 +274,7 @@ qmail_spp_install() {
einfo "Installing qmail-spp plugins"
keepdir "${QMAIL_HOME}"/plugins/
+ local i
for i in authlog mfdnscheck ifauthnext tarpit; do
dospp "${GENQMAIL_S}"/spp/${i}
done
@@ -330,7 +332,7 @@ qmail_queue_setup() {
qmail_rootmail_fixup() {
local TMPCMD="ln -sf ${QMAIL_HOME}/alias/.maildir/ ${ROOT}/root/.maildir"
- if [[ -d "${ROOT}"/root/.maildir && ! -L "${ROOT}"/root/.maildir ]] ; then
+ if [[ -d ${ROOT}/root/.maildir && ! -L ${ROOT}/root/.maildir ]] ; then
elog "Previously the qmail ebuilds created /root/.maildir/ but not"
elog "every mail was delivered there. If the directory does not"
elog "contain any mail, please delete it and run:"
@@ -343,13 +345,14 @@ qmail_rootmail_fixup() {
}
qmail_tcprules_build() {
+ local f
for f in tcp.qmail-{smtp,qmtp,qmqp,pop3}; do
# please note that we don't check if it exists
# as we want it to make the cdb files anyway!
- src="${ROOT}${TCPRULES_DIR}/${f}"
- cdb="${ROOT}${TCPRULES_DIR}/${f}.cdb"
- tmp="${ROOT}${TCPRULES_DIR}/.${f}.tmp"
- [[ -e "${src}" ]] && tcprules "${cdb}" "${tmp}" < "${src}"
+ local src="${ROOT}${TCPRULES_DIR}/${f}"
+ local cdb="${ROOT}${TCPRULES_DIR}/${f}.cdb"
+ local tmp="${ROOT}${TCPRULES_DIR}/.${f}.tmp"
+ [[ -e ${src} ]] && tcprules "${cdb}" "${tmp}" < "${src}"
done
}
@@ -382,10 +385,10 @@ qmail_supervise_config_notice() {
}
qmail_config_fast() {
- if [[ ${ROOT} = / ]]; then
+ if [[ -z ${ROOT} ]]; then
local host=$(hostname --fqdn)
- if [[ -z "${host}" ]]; then
+ if [[ -z ${host} ]]; then
eerror
eerror "Cannot determine your fully-qualified hostname"
eerror "Please setup your /etc/hosts as described in"
@@ -394,7 +397,7 @@ qmail_config_fast() {
die "cannot determine FQDN"
fi
- if [[ ! -f "${ROOT}${QMAIL_HOME}"/control/me ]]; then
+ if [[ ! -f ${ROOT}${QMAIL_HOME}/control/me ]]; then
"${ROOT}${QMAIL_HOME}"/bin/config-fast ${host}
fi
else
diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass
index a3a7c88142b9..ae74c2e0540b 100644
--- a/eclass/qt5-build.eclass
+++ b/eclass/qt5-build.eclass
@@ -11,15 +11,17 @@
# @DESCRIPTION:
# This eclass contains various functions that are used when building Qt5.
-if [[ ${CATEGORY} != dev-qt ]]; then
- die "${ECLASS} is only to be used for building Qt 5"
-fi
-
case ${EAPI} in
8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
+if [[ -z ${_QT5_BUILD_ECLASS} ]]; then
+_QT5_BUILD_ECLASS=1
+
+[[ ${CATEGORY} != dev-qt ]] &&
+ die "${ECLASS} is only to be used for building Qt 5"
+
# @ECLASS_VARIABLE: QT5_BUILD_TYPE
# @DESCRIPTION:
# Default value is "release".
@@ -171,8 +173,6 @@ fi
###### Phase functions ######
-EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install src_test pkg_postinst pkg_postrm
-
# @FUNCTION: qt5-build_src_prepare
# @DESCRIPTION:
# Prepares the environment and patches the sources if necessary.
@@ -971,3 +971,7 @@ qt5_regenerate_global_configs() {
ewarn "${qmodule_pri} or ${qmodule_pri_orig} does not exist or is not a regular file"
fi
}
+
+fi
+
+EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install src_test pkg_postinst pkg_postrm
diff --git a/eclass/qt6-build.eclass b/eclass/qt6-build.eclass
index b7e062e6ef54..f92d37eba2f3 100644
--- a/eclass/qt6-build.eclass
+++ b/eclass/qt6-build.eclass
@@ -1,4 +1,4 @@
-# Copyright 2021-2022 Gentoo Authors
+# Copyright 2021-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: qt6-build.eclass
@@ -10,15 +10,17 @@
# This eclass contains various functions that are used when building Qt6.
# Requires EAPI 8.
-if [[ ${CATEGORY} != dev-qt ]]; then
- die "qt6-build.eclass is only to be used for building Qt 6"
-fi
-
case ${EAPI} in
- 8) : ;;
- *) die "qt6-build.eclass: unsupported EAPI=${EAPI:-0}" ;;
+ 8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
+if [[ -z ${_QT6_BUILD_ECLASS} ]]; then
+_QT6_BUILD_ECLASS=1
+
+[[ ${CATEGORY} != dev-qt ]] &&
+ die "${ECLASS} is only to be used for building Qt 6"
+
# @ECLASS_VARIABLE: QT6_MODULE
# @PRE_INHERIT
# @DESCRIPTION:
@@ -99,8 +101,6 @@ BDEPEND="
# DEPEND+=" test? ( ~dev-qt/qttest-${PV} )"
#fi
-EXPORT_FUNCTIONS src_prepare src_configure
-
###### Phase functions ######
# @FUNCTION: qt6-build_src_prepare
@@ -166,3 +166,7 @@ qt6_prepare_env() {
QT6_QMLDIR QT6_DATADIR QT6_DOCDIR QT6_TRANSLATIONDIR \
QT6_EXAMPLESDIR QT6_TESTSDIR QT6_SYSCONFDIR
}
+
+fi
+
+EXPORT_FUNCTIONS src_prepare src_configure
diff --git a/eclass/rebar.eclass b/eclass/rebar.eclass
index 1c7bc20def14..4c4c90fbcc11 100644
--- a/eclass/rebar.eclass
+++ b/eclass/rebar.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: rebar.eclass
@@ -24,7 +24,8 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-EXPORT_FUNCTIONS src_prepare src_compile src_test src_install
+if [[ -z ${_REBAR_ECLASS} ]]; then
+_REBAR_ECLASS=1
RDEPEND="dev-lang/erlang:="
DEPEND="${RDEPEND}"
@@ -256,3 +257,7 @@ rebar_src_install() {
einstalldocs
}
+
+fi
+
+EXPORT_FUNCTIONS src_prepare src_compile src_test src_install
diff --git a/eclass/ruby-ng.eclass b/eclass/ruby-ng.eclass
index d6b3d2a0669a..67c22d518a31 100644
--- a/eclass/ruby-ng.eclass
+++ b/eclass/ruby-ng.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: ruby-ng.eclass
@@ -67,26 +67,19 @@
# passed to "grep -E" to remove reporting of these shared objects.
case ${EAPI} in
- 6)
- inherit eqawarn estack toolchain-funcs
- ;;
- *)
- inherit estack
- ;;
+ 6|7|8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-inherit multilib ruby-utils
+if [[ -z ${_RUBY_NG_ECLASS} ]]; then
+_RUBY_NG_ECLASS=1
-EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_test src_install pkg_setup
+[[ ${EAPI} == 6 ]] && inherit eqawarn toolchain-funcs
+inherit estack multilib ruby-utils
# S is no longer automatically assigned when it doesn't exist.
S="${WORKDIR}"
-case ${EAPI} in
- 6|7|8) ;;
- *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
-esac
-
# @FUNCTION: ruby_implementation_depend
# @USAGE: target [comparator [version]]
# @RETURN: Package atom of a Ruby implementation to be used in dependencies.
@@ -799,3 +792,7 @@ ruby-ng_testrb-2() {
${RUBY} -S testrb-2 ${testrb_params} "$@" || die "testrb-2 failed"
}
+
+fi
+
+EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_test src_install pkg_setup
diff --git a/eclass/savedconfig.eclass b/eclass/savedconfig.eclass
index 4681fd25328b..cc5748543078 100644
--- a/eclass/savedconfig.eclass
+++ b/eclass/savedconfig.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: savedconfig.eclass
@@ -30,15 +30,18 @@
# 4. Emerge the package with just USE=savedconfig to get the custom
# build.
-inherit portability
-
-IUSE="savedconfig"
-
case ${EAPI} in
6|7|8) ;;
- *) die "EAPI=${EAPI:-0} is not supported" ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
+if [[ -z ${_SAVEDCONFIG_ECLASS} ]]; then
+_SAVEDCONFIG_ECLASS=1
+
+inherit portability
+
+IUSE="savedconfig"
+
# @FUNCTION: save_config
# @USAGE: <config files to save>
# @DESCRIPTION:
@@ -152,4 +155,6 @@ savedconfig_pkg_postinst() {
fi
}
+fi
+
EXPORT_FUNCTIONS pkg_postinst
diff --git a/eclass/sgml-catalog-r1.eclass b/eclass/sgml-catalog-r1.eclass
index 9f8bb13d6095..2258b3e2bf0f 100644
--- a/eclass/sgml-catalog-r1.eclass
+++ b/eclass/sgml-catalog-r1.eclass
@@ -1,4 +1,4 @@
-# Copyright 2019-2021 Gentoo Authors
+# Copyright 2019-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: sgml-catalog-r1.eclass
@@ -12,14 +12,13 @@
# This eclass regenerates /etc/sgml/catalog as necessary for the DocBook
# tooling. This is done via exported pkg_postinst and pkg_postrm phases.
-case ${EAPI:-0} in
+case ${EAPI} in
7) ;;
- *) die "Unsupported EAPI=${EAPI} for ${ECLASS}";;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-EXPORT_FUNCTIONS pkg_postinst pkg_postrm
-
-if [[ ! ${_SGML_CATALOG_R1} ]]; then
+if [[ -z ${_SGML_CATALOG_R1_ECLASS} ]]; then
+_SGML_CATALOG_R1_ECLASS=1
if [[ ${CATEGORY}/${PN} != app-text/sgml-common ]]; then
RDEPEND=">=app-text/sgml-common-0.6.3-r7"
@@ -64,5 +63,6 @@ sgml-catalog-r1_pkg_postrm() {
sgml-catalog-r1_update_env
}
-_SGML_CATALOG_R1=1
fi
+
+EXPORT_FUNCTIONS pkg_postinst pkg_postrm
diff --git a/eclass/ssl-cert.eclass b/eclass/ssl-cert.eclass
index 4b016ea82c87..83fbcf6143d1 100644
--- a/eclass/ssl-cert.eclass
+++ b/eclass/ssl-cert.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: ssl-cert.eclass
@@ -14,12 +14,12 @@
# @EXAMPLE:
# "install_cert /foo/bar" installs ${ROOT}/foo/bar.{key,csr,crt,pem}
-case "${EAPI}" in
+case ${EAPI} in
6|7|8) ;;
- *) die "EAPI=${EAPI:-0} is not supported" ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_SSL_CERT_ECLASS} ]]; then
+if [[ -z ${_SSL_CERT_ECLASS} ]]; then
_SSL_CERT_ECLASS=1
# @ECLASS_VARIABLE: SSL_CERT_MANDATORY
diff --git a/eclass/subversion.eclass b/eclass/subversion.eclass
index 349878618427..48ee15105adc 100644
--- a/eclass/subversion.eclass
+++ b/eclass/subversion.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: subversion.eclass
@@ -6,28 +6,26 @@
# Akinori Hattori <hattya@gentoo.org>
# @AUTHOR:
# Original Author: Akinori Hattori <hattya@gentoo.org>
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: Fetch software sources from subversion repositories
# @DESCRIPTION:
# The subversion eclass provides functions to fetch software sources
# from subversion repositories.
case ${EAPI} in
- 6|7|8) inherit estack ;;
- *) die "${ECLASS}: EAPI ${EAPI:-0} is not supported" ;;
+ 7|8) inherit estack ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
+if [[ -z ${_SUBVERSION_ECLASS} ]]; then
+_SUBVERSION_ECLASS=1
+
PROPERTIES+=" live"
-DEPEND="
+BDEPEND="
dev-vcs/subversion[http(+)]
net-misc/rsync"
-case ${EAPI} in
- 6) ;;
- *) BDEPEND="${DEPEND}"; DEPEND="" ;;
-esac
-
# @ECLASS_VARIABLE: ESVN_STORE_DIR
# @USER_VARIABLE
# @DESCRIPTION:
@@ -177,7 +175,7 @@ subversion_fetch() {
die "${ECLASS}: ESVN_REPO_URI (or specified URI) is empty."
fi
- [[ -n "${ESVN_REVISION}" ]] && revision="${ESVN_REVISION}"
+ [[ -n ${ESVN_REVISION} ]] && revision="${ESVN_REVISION}"
# check for the scheme
local scheme="${repo_uri%%:*}"
@@ -196,7 +194,7 @@ subversion_fetch() {
addread "/etc/subversion"
addwrite "${ESVN_STORE_DIR}"
- if [[ -n "${ESVN_UMASK}" ]]; then
+ if [[ -n ${ESVN_UMASK} ]]; then
eumask_push "${ESVN_UMASK}"
fi
@@ -210,9 +208,9 @@ subversion_fetch() {
local wc_path="$(subversion__get_wc_path "${repo_uri}")"
local options="${ESVN_OPTIONS} --config-dir ${ESVN_STORE_DIR}/.subversion"
- [[ -n "${revision}" ]] && options="${options} -r ${revision}"
+ [[ -n ${revision} ]] && options="${options} -r ${revision}"
- if [[ "${ESVN_OPTIONS}" = *-r* ]]; then
+ if [[ ${ESVN_OPTIONS} == *-r* ]]; then
ewarn "\${ESVN_OPTIONS} contains -r, this usage is unsupported. Please"
ewarn "see \${ESVN_REPO_URI}"
fi
@@ -237,7 +235,7 @@ subversion_fetch() {
mkdir -m 775 -p "${ESVN_PROJECT}" || die "${ECLASS}: can't mkdir ${ESVN_PROJECT}."
cd "${ESVN_PROJECT}" || die "${ECLASS}: can't chdir to ${ESVN_PROJECT}"
- if [[ -n "${ESVN_USER}" ]]; then
+ if [[ -n ${ESVN_USER} ]]; then
${ESVN_FETCH_CMD} ${options} --username "${ESVN_USER}" --password "${ESVN_PASSWORD}" "${repo_uri}" || die "${ECLASS}: can't fetch to ${wc_path} from ${repo_uri}."
else
${ESVN_FETCH_CMD} ${options} "${repo_uri}" || die "${ECLASS}: can't fetch to ${wc_path} from ${repo_uri}."
@@ -276,13 +274,13 @@ subversion_fetch() {
einfo " new UUID: $(subversion__svn_info "${repo_uri}" "Repository UUID")"
einfo " repository: ${repo_uri}${revision:+@}${revision}"
- rm -fr "${ESVN_PROJECT}" || die
+ rm -rf "${ESVN_PROJECT}" || die
debug-print "${FUNCNAME}: ${ESVN_FETCH_CMD} ${options} ${repo_uri}"
mkdir -m 775 -p "${ESVN_PROJECT}" || die "${ECLASS}: can't mkdir ${ESVN_PROJECT}."
cd "${ESVN_PROJECT}" || die "${ECLASS}: can't chdir to ${ESVN_PROJECT}"
- if [[ -n "${ESVN_USER}" ]]; then
+ if [[ -n ${ESVN_USER} ]]; then
${ESVN_FETCH_CMD} ${options} --username "${ESVN_USER}" --password "${ESVN_PASSWORD}" "${repo_uri}" || die "${ECLASS}: can't fetch to ${wc_path} from ${repo_uri}."
else
${ESVN_FETCH_CMD} ${options} "${repo_uri}" || die "${ECLASS}: can't fetch to ${wc_path} from ${repo_uri}."
@@ -295,7 +293,7 @@ subversion_fetch() {
debug-print "${FUNCNAME}: ${ESVN_SWITCH_CMD} ${options} ${repo_uri}"
cd "${wc_path}" || die "${ECLASS}: can't chdir to ${wc_path}"
- if [[ -n "${ESVN_USER}" ]]; then
+ if [[ -n ${ESVN_USER} ]]; then
${ESVN_SWITCH_CMD} ${options} --username "${ESVN_USER}" --password "${ESVN_PASSWORD}" ${repo_uri} || die "${ECLASS}: can't update ${wc_path} from ${repo_uri}."
else
${ESVN_SWITCH_CMD} ${options} ${repo_uri} || die "${ECLASS}: can't update ${wc_path} from ${repo_uri}."
@@ -308,7 +306,7 @@ subversion_fetch() {
debug-print "${FUNCNAME}: ${ESVN_UPDATE_CMD} ${options}"
cd "${wc_path}" || die "${ECLASS}: can't chdir to ${wc_path}"
- if [[ -n "${ESVN_USER}" ]]; then
+ if [[ -n ${ESVN_USER} ]]; then
${ESVN_UPDATE_CMD} ${options} --username "${ESVN_USER}" --password "${ESVN_PASSWORD}" || die "${ECLASS}: can't update ${wc_path} from ${repo_uri}."
else
${ESVN_UPDATE_CMD} ${options} || die "${ECLASS}: can't update ${wc_path} from ${repo_uri}."
@@ -320,7 +318,7 @@ subversion_fetch() {
fi
fi
- if [[ -n "${ESVN_UMASK}" ]]; then
+ if [[ -n ${ESVN_UMASK} ]]; then
eumask_pop
fi
@@ -384,7 +382,7 @@ subversion_src_unpack() {
subversion_pkg_preinst() {
local pkgdate=$(date "+%Y%m%d %H:%M:%S")
if [[ -n ${ESCM_LOGDIR} ]]; then
- local dir="${EROOT%/}${ESCM_LOGDIR}/${CATEGORY}"
+ local dir="${EROOT}${ESCM_LOGDIR}/${CATEGORY}"
if [[ ! -d ${dir} ]]; then
mkdir -p "${dir}" || eerror "Failed to create '${dir}' for logging svn revision"
fi
@@ -450,7 +448,7 @@ subversion__get_peg_revision() {
debug-print "${FUNCNAME}: repo_uri = ${repo_uri}"
# repo_uri has peg revision?
- if [[ ${repo_uri} = *@* ]]; then
+ if [[ ${repo_uri} == *@* ]]; then
peg_rev="${repo_uri##*@}"
debug-print "${FUNCNAME}: peg_rev = ${peg_rev}"
else
@@ -460,4 +458,6 @@ subversion__get_peg_revision() {
echo "${peg_rev}"
}
+fi
+
EXPORT_FUNCTIONS src_unpack pkg_preinst
diff --git a/eclass/sword-module.eclass b/eclass/sword-module.eclass
index 565110d2dd0b..be3725a6ec55 100644
--- a/eclass/sword-module.eclass
+++ b/eclass/sword-module.eclass
@@ -1,6 +1,7 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
+# @DEAD
# @ECLASS: sword-module.eclass
# @MAINTAINER:
# Marek Szuba <marecki@gentoo.org>
diff --git a/eclass/tests/distutils-r1.sh b/eclass/tests/distutils-r1.sh
index a42d4cc4641a..c895af3fc9a0 100755
--- a/eclass/tests/distutils-r1.sh
+++ b/eclass/tests/distutils-r1.sh
@@ -59,7 +59,7 @@ test-DISTUTILS_USE_SETUPTOOLS() {
local BDEPEND=
local RDEPEND=
- unset _DISTUTILS_R1
+ unset _DISTUTILS_R1_ECLASS
inherit distutils-r1
local ret var val
diff --git a/eclass/tests/distutils-r1_single.sh b/eclass/tests/distutils-r1_single.sh
index 0a671e2b739b..2035f1454c60 100755
--- a/eclass/tests/distutils-r1_single.sh
+++ b/eclass/tests/distutils-r1_single.sh
@@ -48,7 +48,7 @@ test-DISTUTILS_USE_SETUPTOOLS() {
local BDEPEND=
local RDEPEND=
- unset _DISTUTILS_R1
+ unset _DISTUTILS_R1_ECLASS
inherit distutils-r1
local ret var val
diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass
index 40e2c3530510..f43d10926857 100644
--- a/eclass/texlive-common.eclass
+++ b/eclass/texlive-common.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: texlive-common.eclass
@@ -14,15 +14,14 @@
#
# Note that this eclass *must* not assume the presence of any standard tex too
+case ${EAPI} in
+ 7) inherit eapi8-dosym ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
if [[ -z ${_TEXLIVE_COMMON_ECLASS} ]]; then
_TEXLIVE_COMMON_ECLASS=1
-case ${EAPI:-0} in
- [0-6]) die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" ;;
- 7) inherit eapi8-dosym ;;
- *) die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" ;;
-esac
-
TEXMF_PATH=/usr/share/texmf
TEXMF_DIST_PATH=/usr/share/texmf-dist
TEXMF_VAR_PATH=/var/lib/texmf
diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass
index 68276714a4bc..a53c22dde205 100644
--- a/eclass/texlive-module.eclass
+++ b/eclass/texlive-module.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: texlive-module.eclass
@@ -71,14 +71,15 @@
# Information to display about the package.
# e.g. for enabling/disabling a feature
+case ${EAPI} in
+ 7) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
if [[ -z ${_TEXLIVE_MODULE_ECLASS} ]]; then
_TEXLIVE_MODULE_ECLASS=1
-case ${EAPI:-0} in
- [0-6]) die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" ;;
- 7) inherit texlive-common ;;
- *) die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" ;;
-esac
+inherit texlive-common
HOMEPAGE="http://www.tug.org/texlive/"
@@ -447,6 +448,6 @@ texlive-module_pkg_postrm() {
etexmf-update
}
-EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_postinst pkg_postrm
-
fi
+
+EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_postinst pkg_postrm
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 06c044fd1d38..2d7801259019 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -12,17 +12,17 @@
# instead.
case ${EAPI} in
- 7) inherit eutils ;;
- 8) ;;
+ 7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_TOOLCHAIN_ECLASS} ]]; then
+if [[ -z ${_TOOLCHAIN_ECLASS} ]]; then
_TOOLCHAIN_ECLASS=1
DESCRIPTION="The GNU Compiler Collection"
HOMEPAGE="https://gcc.gnu.org/"
+[[ ${EAPI} == 7 ]] && inherit eutils
inherit edo flag-o-matic gnuconfig libtool multilib pax-utils toolchain-funcs prefix
tc_is_live() {
@@ -2828,9 +2828,6 @@ toolchain_death_notice() {
fi
-EXPORT_FUNCTIONS pkg_pretend pkg_setup src_unpack src_prepare src_configure \
- src_compile src_test src_install pkg_postinst pkg_postrm
-
# Note [implicitly enabled flags]
# -------------------------------
# Usually configure-based packages handle explicit feature requests
@@ -2848,3 +2845,5 @@ EXPORT_FUNCTIONS pkg_pretend pkg_setup src_unpack src_prepare src_configure \
# Thus safer way to enable/disable the feature is to rely on implicit
# enabled-by-default state:
# econf $(usex foo '' --disable-foo)
+
+EXPORT_FUNCTIONS pkg_pretend pkg_setup src_unpack src_prepare src_configure src_compile src_test src_install pkg_postinst pkg_postrm
diff --git a/eclass/tree-sitter-grammar.eclass b/eclass/tree-sitter-grammar.eclass
index c607ea9ddfb7..e74d18653b8a 100644
--- a/eclass/tree-sitter-grammar.eclass
+++ b/eclass/tree-sitter-grammar.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: tree-sitter-grammar.eclass
@@ -10,17 +10,15 @@
# @SUPPORTED_EAPIS: 8
# @BLURB: Common functions and variables for Tree Sitter grammars
-inherit edo
-
-if [[ -z ${_TREE_SITTER_GRAMMAR_ECLASS} ]]; then
-_TREE_SITTER_GRAMMAR_ECLASS=1
-
case ${EAPI} in
8) ;;
- *) die "EAPI=${EAPI:-0} is not supported" ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-inherit multilib toolchain-funcs
+if [[ -z ${_TREE_SITTER_GRAMMAR_ECLASS} ]]; then
+_TREE_SITTER_GRAMMAR_ECLASS=1
+
+inherit edo multilib toolchain-funcs
SRC_URI="https://github.com/tree-sitter/${PN}/archive/${TS_PV:-v${PV}}.tar.gz
-> ${P}.tar.gz"
@@ -33,8 +31,6 @@ BDEPEND+=" test? ( dev-util/tree-sitter-cli )"
IUSE+=" test"
RESTRICT+=" !test? ( test )"
-EXPORT_FUNCTIONS src_compile src_test src_install
-
# @ECLASS_VARIABLE: TS_PV
# @PRE_INHERIT
# @DEFAULT_UNSET
@@ -115,4 +111,7 @@ tree-sitter-grammar_src_install() {
dosym "${soname}" \
/usr/$(get_libdir)/lib${PN}$(get_libname)
}
+
fi
+
+EXPORT_FUNCTIONS src_compile src_test src_install
diff --git a/eclass/unpacker.eclass b/eclass/unpacker.eclass
index 44ff2af5acf3..2a0dcf45d76a 100644
--- a/eclass/unpacker.eclass
+++ b/eclass/unpacker.eclass
@@ -15,8 +15,8 @@
# - merge rpm unpacking
# - support partial unpacks?
-case ${EAPI:-0} in
- [678]) ;;
+case ${EAPI} in
+ 6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -642,6 +642,6 @@ unpacker_src_uri_depends() {
echo "${deps[*]}"
}
-EXPORT_FUNCTIONS src_unpack
-
fi
+
+EXPORT_FUNCTIONS src_unpack
diff --git a/eclass/vdr-plugin-2.eclass b/eclass/vdr-plugin-2.eclass
index 546dbb803bf1..a56b1d41c882 100644
--- a/eclass/vdr-plugin-2.eclass
+++ b/eclass/vdr-plugin-2.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: vdr-plugin-2.eclass
@@ -9,7 +9,7 @@
# Joerg Bornkessel <hd_brummy@gentoo.org>
# Christian Ruppert <idl0r@gentoo.org>
# (undisclosed contributors)
-# @SUPPORTED_EAPIS: 5 6 7 8
+# @SUPPORTED_EAPIS: 6 7 8
# @BLURB: common vdr plugin ebuild functions
# @DESCRIPTION:
# Eclass for easing maintenance of vdr plugin ebuilds
@@ -60,29 +60,16 @@
# PO_SUBDIR="bla foo/bla"
# @CODE
-# Applying your own local/user patches:
-# This is done by using the
-# (EAPI = 5) epatch_user() function of the eutils.eclass,
-# (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
-# use, ignoring any more general directories which might exist as well.
-#
-# For more details about it please take a look at the eutils.class.
-
-[[ ${EAPI} == [5] ]] && inherit multilib
-[[ ${EAPI} == [56] ]] && inherit eutils
-inherit flag-o-matic strip-linguas toolchain-funcs unpacker
-
case ${EAPI} in
- 5|6|7|8)
- ;;
- *) die "${ECLASS}: EAPI ${EAPI:-0} not supported"
- ;;
+ 6|7|8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_compile src_install pkg_postinst pkg_postrm pkg_config
+if [[ -z ${_VDR_PLUGIN_2_ECLASS} ]]; then
+_VDR_PLUGIN_2_ECLASS=1
+
+[[ ${EAPI} == 6 ]] && inherit eutils
+inherit flag-o-matic strip-linguas toolchain-funcs unpacker
# Name of the plugin stripped from all vdrplugin-, vdr- and -cvs pre- and postfixes
VDRPLUGIN="${PN/#vdrplugin-/}"
@@ -96,12 +83,16 @@ S="${WORKDIR}/${VDRPLUGIN}-${PV}"
# depend on headers for DVB-driver and vdr-scripts
case ${EAPI} in
- 5|6) DEPEND="media-tv/gentoo-vdr-scripts
- virtual/linuxtv-dvb-headers
- virtual/pkgconfig" ;;
- *) BDEPEND="virtual/pkgconfig"
- DEPEND="media-tv/gentoo-vdr-scripts
- virtual/linuxtv-dvb-headers" ;;
+ 6)
+ DEPEND="media-tv/gentoo-vdr-scripts
+ virtual/linuxtv-dvb-headers
+ virtual/pkgconfig"
+ ;;
+ *)
+ BDEPEND="virtual/pkgconfig"
+ DEPEND="media-tv/gentoo-vdr-scripts
+ virtual/linuxtv-dvb-headers"
+ ;;
esac
RDEPEND="media-tv/gentoo-vdr-scripts
app-eselect/eselect-vdr"
@@ -467,11 +458,7 @@ vdr-plugin-2_src_util() {
;;
add_local_patch)
cd "${S}" || die "Could not change to plugin-source-directory (src_util)"
- if [[ ${EAPI} != [5] ]]; then
- eapply_user
- else
- epatch_user
- fi
+ eapply_user
;;
patchmakefile)
cd "${S}" || die "Could not change to plugin-source-directory (src_util)"
@@ -514,8 +501,7 @@ vdr-plugin-2_src_prepare() {
die "vdr-plugin-2_src_prepare not called!"
fi
- [[ ${EAPI} == [5] ]] && [[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}"
- [[ ${EAPI} != [5] ]] && [[ ${PATCHES[@]} ]] && eapply "${PATCHES[@]}"
+ [[ -n ${PATCHES[@]} ]] && eapply "${PATCHES[@]}"
debug-print "$FUNCNAME: applying user patches"
@@ -626,14 +612,7 @@ vdr-plugin-2_src_install() {
vdr_create_header_checksum_file ${vdr_plugin_list}
vdr_create_plugindb_file ${vdr_plugin_list}
- if [[ ${EAPI} != [45] ]]; then
- einstalldocs
- else
- local docfile
- for docfile in README* HISTORY CHANGELOG; do
- [[ -f ${docfile} ]] && dodoc ${docfile}
- done
- fi
+ einstalldocs
# if VDR_CONFD_FILE is empty and ${FILESDIR}/confd exists take it
[[ -z ${VDR_CONFD_FILE} ]] && [[ -e ${FILESDIR}/confd ]] && VDR_CONFD_FILE=${FILESDIR}/confd
@@ -668,3 +647,7 @@ vdr-plugin-2_pkg_postrm() {
vdr-plugin-2_pkg_config() {
:
}
+
+fi
+
+EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_compile src_install pkg_postinst pkg_postrm pkg_config
diff --git a/eclass/verify-sig.eclass b/eclass/verify-sig.eclass
index f67a3b10a0bf..5e757cdd6038 100644
--- a/eclass/verify-sig.eclass
+++ b/eclass/verify-sig.eclass
@@ -45,9 +45,8 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-EXPORT_FUNCTIONS src_unpack
-
-if [[ ! ${_VERIFY_SIG_ECLASS} ]]; then
+if [[ -z ${_VERIFY_SIG_ECLASS} ]]; then
+_VERIFY_SIG_ECLASS=1
IUSE="verify-sig"
@@ -390,5 +389,6 @@ verify-sig_src_unpack() {
default_src_unpack
}
-_VERIFY_SIG_ECLASS=1
fi
+
+EXPORT_FUNCTIONS src_unpack
diff --git a/eclass/vim-plugin.eclass b/eclass/vim-plugin.eclass
index edf1c94d31b1..81e1e54f638d 100644
--- a/eclass/vim-plugin.eclass
+++ b/eclass/vim-plugin.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: vim-plugin.eclass
@@ -13,15 +13,17 @@
# documentation, for which we make a special case via vim-doc.eclass.
case ${EAPI} in
- 6|7) ;;
- 8) _DEFINE_VIM_PLUGIN_SRC_PREPARE=true ;;
+ 6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_VIM_PLUGIN_ECLASS} ]]; then
+if [[ -z ${_VIM_PLUGIN_ECLASS} ]]; then
+_VIM_PLUGIN_ECLASS=1
inherit vim-doc
+[[ ${EAPI} != [67] ]] && _DEFINE_VIM_PLUGIN_SRC_PREPARE=true
+
# @ECLASS_VARIABLE: VIM_PLUGIN_VIM_VERSION
# @DESCRIPTION:
# Minimum Vim version the plugin supports.
@@ -230,13 +232,9 @@ display_vim_plugin_help() {
fi
}
-_VIM_PLUGIN_ECLASS=1
fi
-EXPORT_FUNCTIONS src_install pkg_postinst pkg_postrm
-
# src_prepare is only exported in EAPI >= 8
-case ${EAPI} in
- 6|7) ;;
- *) EXPORT_FUNCTIONS src_prepare ;;
-esac
+[[ ${_DEFINE_VIM_PLUGIN_SRC_PREPARE} ]] && EXPORT_FUNCTIONS src_prepare
+
+EXPORT_FUNCTIONS src_install pkg_postinst pkg_postrm
diff --git a/eclass/vim-spell.eclass b/eclass/vim-spell.eclass
index 8acf29a5580d..38db4ccda13f 100644
--- a/eclass/vim-spell.eclass
+++ b/eclass/vim-spell.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: vim-spell.eclass
@@ -63,13 +63,11 @@
# spell files. It's best to let upstream know if you've generated spell files
# for another language rather than keeping them Gentoo-specific.
-case ${EAPI:-0} in
- [67]) ;;
+case ${EAPI} in
+ 6|7) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-EXPORT_FUNCTIONS src_install pkg_postinst
-
if [[ -z ${_VIM_SPELL_ECLASS} ]] ; then
_VIM_SPELL_ECLASS=1
@@ -157,3 +155,5 @@ vim-spell_pkg_postinst() {
}
fi
+
+EXPORT_FUNCTIONS src_install pkg_postinst
diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
index e04834d39bd1..2513f4e16256 100644
--- a/eclass/virtualx.eclass
+++ b/eclass/virtualx.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: virtualx.eclass
@@ -11,10 +11,10 @@
case ${EAPI} in
6|7|8) ;;
- *) die "${ECLASS}: EAPI ${EAPI:-0} is not supported." ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_VIRTUALX_ECLASS} ]]; then
+if [[ -z ${_VIRTUALX_ECLASS} ]]; then
_VIRTUALX_ECLASS=1
# @ECLASS_VARIABLE: VIRTUALX_REQUIRED
diff --git a/eclass/webapp.eclass b/eclass/webapp.eclass
index 3bc177dc3e78..9fb646613426 100644
--- a/eclass/webapp.eclass
+++ b/eclass/webapp.eclass
@@ -1,22 +1,20 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: webapp.eclass
# @MAINTAINER:
# web-apps@gentoo.org
-# @SUPPORTED_EAPIS: 5 6 7 8
+# @SUPPORTED_EAPIS: 6 7 8
# @BLURB: functions for installing applications to run under a web server
# @DESCRIPTION:
# The webapp eclass contains functions to handle web applications with
# webapp-config. Part of the implementation of GLEP #11
-case ${EAPI:-0} in
- [5678]) ;;
+case ${EAPI} in
+ 6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-EXPORT_FUNCTIONS pkg_postinst pkg_setup src_install pkg_prerm
-
if [[ -z ${_WEBAPP_ECLASS} ]]; then
_WEBAPP_ECLASS=1
@@ -588,3 +586,5 @@ webapp_pkg_prerm() {
}
fi
+
+EXPORT_FUNCTIONS pkg_postinst pkg_setup src_install pkg_prerm
diff --git a/eclass/xdg.eclass b/eclass/xdg.eclass
index a3e75103a046..14c56047af45 100644
--- a/eclass/xdg.eclass
+++ b/eclass/xdg.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: xdg.eclass
@@ -6,56 +6,54 @@
# freedesktop-bugs@gentoo.org
# @AUTHOR:
# Original author: Gilles Dartiguelongue <eva@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6 7 8
+# @SUPPORTED_EAPIS: 6 7 8
# @PROVIDES: xdg-utils
# @BLURB: Provides phases for XDG compliant packages.
# @DESCRIPTION:
# Utility eclass to update the desktop, icon and shared mime info as laid
# out in the freedesktop specs & implementations
-inherit xdg-utils
-
-_DEFINE_XDG_SRC_PREPARE=false
-case "${EAPI}" in
- 5|6|7)
- # src_prepare is only exported in EAPI < 8.
- EXPORT_FUNCTIONS src_prepare
- _DEFINE_XDG_SRC_PREPARE=true
- ;;
- 8)
- ;;
- *) die "${ECLASS}: EAPI=${EAPI} is not supported" ;;
+case ${EAPI} in
+ 6|7|8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-EXPORT_FUNCTIONS pkg_preinst pkg_postinst pkg_postrm
+
+if [[ -z ${_XDG_ECLASS} ]]; then
+_XDG_ECLASS=1
+
+inherit xdg-utils
# Avoid dependency loop as both depend on glib-2
-if [[ ${CATEGORY}/${P} != dev-libs/glib-2.* ]] ; then
-_XDG_DEPEND="
+[[ ${CATEGORY}/${P} != dev-libs/glib-2.* ]] && _XDG_DEPEND="
dev-util/desktop-file-utils
x11-misc/shared-mime-info
"
-case "${EAPI}" in
- 5|6|7)
+case ${EAPI} in
+ 6|7)
+ # src_prepare is only exported in EAPI < 8.
+ # @FUNCTION: xdg_src_prepare
+ # @DESCRIPTION:
+ # Prepare sources to work with XDG standards.
+ # Note that this function is only defined and exported in EAPIs < 8.
+ xdg_src_prepare() {
+ xdg_environment_reset
+ default
+ }
+
+ EXPORT_FUNCTIONS src_prepare
+
DEPEND="${_XDG_DEPEND}"
;;
*)
+ xdg_src_prepare() {
+ die "Called xdg_src_prepare in EAPI >= 8"
+ }
+
IDEPEND="${_XDG_DEPEND}"
;;
esac
-fi
-
-if ${_DEFINE_XDG_SRC_PREPARE}; then
-# @FUNCTION: xdg_src_prepare
-# @DESCRIPTION:
-# Prepare sources to work with XDG standards.
-# Note that this function is only defined and exported in EAPIs < 8.
-xdg_src_prepare() {
- xdg_environment_reset
-
- [[ ${EAPI} != 5 ]] && default
-}
-fi
+unset _XDG_DEPEND
# @FUNCTION: xdg_pkg_preinst
# @DESCRIPTION:
@@ -127,3 +125,6 @@ xdg_pkg_postrm() {
fi
}
+fi
+
+EXPORT_FUNCTIONS pkg_preinst pkg_postinst pkg_postrm
diff --git a/eclass/xorg-3.eclass b/eclass/xorg-3.eclass
index a63655e10ece..a68341591edd 100644
--- a/eclass/xorg-3.eclass
+++ b/eclass/xorg-3.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: xorg-3.eclass
@@ -22,6 +22,14 @@
# with the other X packages, you don't need to set SRC_URI. Pretty much
# everything else should be automatic.
+case ${EAPI} in
+ 7|8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
+if [[ -z ${_XORG_3_ECLASS} ]]; then
+_XORG_3_ECLASS=1
+
GIT_ECLASS=""
if [[ ${PV} == *9999* ]]; then
GIT_ECLASS="git-r3"
@@ -54,19 +62,7 @@ inherit autotools libtool multilib toolchain-funcs flag-o-matic \
${FONT_ECLASS} ${GIT_ECLASS}
unset FONT_ECLASS GIT_ECLASS
-if [[ ${XORG_MULTILIB} == yes ]]; then
- inherit multilib-minimal
-fi
-
-case "${EAPI:-0}" in
- [7-8]) ;;
- *) die "EAPI=${EAPI} is not supported" ;;
-esac
-
-# exports must be ALWAYS after inherit
-EXPORT_FUNCTIONS src_prepare src_configure src_unpack src_compile src_install pkg_postinst pkg_postrm
-
-IUSE=""
+[[ ${XORG_MULTILIB} == yes ]] && inherit multilib-minimal
# @ECLASS_VARIABLE: XORG_EAUTORECONF
# @PRE_INHERIT
@@ -546,3 +542,7 @@ create_fonts_dir() {
-- "${EROOT}/usr/share/fonts/${FONT_DIR}"
eend $?
}
+
+fi
+
+EXPORT_FUNCTIONS src_prepare src_configure src_unpack src_compile src_install pkg_postinst pkg_postrm
diff --git a/sys-libs/zlib-ng/Manifest b/sys-libs/zlib-ng/Manifest
index 83cf6ac918fc..cdd93f9171bb 100644
--- a/sys-libs/zlib-ng/Manifest
+++ b/sys-libs/zlib-ng/Manifest
@@ -1,2 +1 @@
-DIST zlib-ng-2.0.6.tar.gz 817951 BLAKE2B 52993caadf14817e328b180d728586e1332ea04504288264934ef49441cb8b8c4a2412d4c11d1982f3764fef5e4fb7ebab442b407e57d9d5f08a5b2ed890bba9 SHA512 4888f17160d0a87a9b349704047ae0d0dc57237a10e11adae09ace957afa9743cce5191db67cb082991421fc961ce68011199621034d2369c0e7724fad58b4c5
DIST zlib-ng-2.0.7.tar.gz 853381 BLAKE2B 89672bd35ee54df72ff995c1b4ed188538011be4cd077e464f21a088b0b70b3f95b4259dc546a65e8d4900dc5bd5bb98041875e361000898b34518f7e008b99b SHA512 1c19a62bb00727ac49049c299fb70060da95b5fafa448144ae4133372ec8c3da15cef6c1303485290f269b23c580696554ca0383dba3e1f9609f65c332981988
diff --git a/sys-libs/zlib-ng/zlib-ng-2.0.6.ebuild b/sys-libs/zlib-ng/zlib-ng-2.0.6.ebuild
deleted file mode 100644
index 641a623a64aa..000000000000
--- a/sys-libs/zlib-ng/zlib-ng-2.0.6.ebuild
+++ /dev/null
@@ -1,78 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Worth keeping an eye on 'develop' branch upstream for possible backports,
-# as they copied this practice from sys-libs/zlib upstream.
-
-inherit cmake
-
-DESCRIPTION="Fork of the zlib data compression library"
-HOMEPAGE="https://github.com/zlib-ng/zlib-ng"
-SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="ZLIB"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
-
-CPU_USE=( cpu_flags_{x86_{avx2,sse2,ssse3,sse4a,pclmul},arm_{crc32,neon},ppc_vsx2} )
-IUSE="compat ${CPU_USE[@]} test"
-
-RESTRICT="!test? ( test )"
-
-RDEPEND="compat? ( !sys-libs/zlib )"
-
-src_configure() {
- local mycmakeargs=(
- -DZLIB_COMPAT="$(usex compat)"
- -DZLIB_ENABLE_TESTS="$(usex test)"
- # Unaligned access is controversial and undefined behaviour
- # Let's keep it off for now
- # https://github.com/gentoo/gentoo/pull/17167
- -DWITH_UNALIGNED="OFF"
- )
-
- # The intrinsics options are all defined conditionally, so we need
- # to enable them on/off per-arch here for now.
- if use amd64 || use x86 ; then
- mycmakeargs+=(
- -DWITH_AVX2=$(usex cpu_flags_x86_avx2)
- -DWITH_SSE2=$(usex cpu_flags_x86_sse2)
- -DWITH_SSSE3=$(usex cpu_flags_x86_ssse3)
- -DWITH_SSE4=$(usex cpu_flags_x86_sse4a)
- -DWITH_PCLMULQDQ=$(usex cpu_flags_x86_pclmul)
- )
- fi
-
- if use arm || use arm64 ; then
- mycmakeargs+=(
- -DWITH_ACLE=$(usex cpu_flags_arm_crc32)
- -DWITH_NEON=$(usex cpu_flags_arm_neon)
- )
- fi
-
- if use ppc || use ppc64 ; then
- # The POWER8 support is VSX which was introduced
- # VSX2 was introduced with POWER8, so use that as a proxy for it
- mycmakeargs+=(
- -DWITH_POWER8=$(usex cpu_flags_ppc_vsx2)
- )
- fi
-
- # TODO: There's no s390x USE_EXPAND yet
-
- cmake_src_configure
-}
-
-src_install() {
- cmake_src_install
-
- if use compat ; then
- ewarn "zlib-ng is experimental and replacing the system zlib is dangerous"
- ewarn "Please be careful!"
- ewarn
- ewarn "The following link explains the guarantees (and what is NOT guaranteed):"
- ewarn "https://github.com/zlib-ng/zlib-ng/blob/2.0.x/PORTING.md"
- fi
-}