summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-05-14 00:01:24 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-05-14 00:01:24 +0100
commit59c2499e0c9720169c9d5a02168c51c807a21467 (patch)
tree48c68a8a7e0094b2edaace12850e6c059bc3636b /eclass
parenta25cc082a26782e5d39ded4559c91ff11bc3c299 (diff)
gentoo auto-resync : 14:05:2024 - 00:01:24
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin39582 -> 39416 bytes
-rw-r--r--eclass/acct-group.eclass18
-rw-r--r--eclass/acct-user.eclass22
-rw-r--r--eclass/ant-tasks.eclass172
-rw-r--r--eclass/texlive-module.eclass2
-rw-r--r--eclass/toolchain.eclass2
6 files changed, 24 insertions, 192 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index 4bf9a6a3eaad..f6ed992a62be 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/acct-group.eclass b/eclass/acct-group.eclass
index a0ad86066309..2c2c88cfc7e1 100644
--- a/eclass/acct-group.eclass
+++ b/eclass/acct-group.eclass
@@ -1,4 +1,4 @@
-# Copyright 2019-2023 Gentoo Authors
+# Copyright 2019-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: acct-group.eclass
@@ -50,12 +50,12 @@ inherit user-info
# << Eclass variables >>
# @ECLASS_VARIABLE: ACCT_GROUP_NAME
-# @INTERNAL
# @DESCRIPTION:
# The name of the group. This is forced to ${PN} and the policy
-# prohibits it from being changed.
+# prohibits it from being changed. The variable is left writable for
+# use in overlays; package naming restrictions would prohibit some
+# otherwise-valid group names.
ACCT_GROUP_NAME=${PN}
-readonly ACCT_GROUP_NAME
# @ECLASS_VARIABLE: ACCT_GROUP_ID
# @REQUIRED
@@ -96,8 +96,9 @@ acct-group_pkg_pretend() {
[[ ${ACCT_GROUP_ID} -ge -1 ]] || die "Ebuild error: ACCT_GROUP_ID=${ACCT_GROUP_ID} invalid!"
local group_id=${ACCT_GROUP_ID}
- # check for the override
- local override_name=${ACCT_GROUP_NAME^^}
+ # check for the override, use PN in case this is an overlay and
+ # ACCT_GROUP_NAME is not PN and not valid in a bash variable name
+ local override_name=${PN^^}
local override_var=ACCT_GROUP_${override_name//-/_}_ID
if [[ -n ${!override_var} ]]; then
group_id=${!override_var}
@@ -132,8 +133,9 @@ acct-group_pkg_pretend() {
acct-group_src_install() {
debug-print-function ${FUNCNAME} "${@}"
- # check for the override
- local override_name=${ACCT_GROUP_NAME^^}
+ # check for the override, use PN in case this is an overlay and
+ # ACCT_GROUP_NAME is not PN and not valid in a bash variable name
+ local override_name=${PN^^}
local override_var=ACCT_GROUP_${override_name//-/_}_ID
if [[ -n ${!override_var} ]]; then
ewarn "${override_var}=${!override_var} override in effect, support will not be provided."
diff --git a/eclass/acct-user.eclass b/eclass/acct-user.eclass
index 66a4d6667888..9eab1f4c4ae6 100644
--- a/eclass/acct-user.eclass
+++ b/eclass/acct-user.eclass
@@ -1,4 +1,4 @@
-# Copyright 2019-2023 Gentoo Authors
+# Copyright 2019-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: acct-user.eclass
@@ -58,12 +58,12 @@ inherit user-info
# << Eclass variables >>
# @ECLASS_VARIABLE: ACCT_USER_NAME
-# @INTERNAL
# @DESCRIPTION:
-# The name of the user. This is forced to ${PN} and the policy prohibits
-# it from being changed.
+# The name of the user. This is forced to ${PN} and the policy
+# prohibits it from being changed. The variable is left writable for
+# use in overlays; package naming restrictions would prohibit some
+# otherwise-valid usernames.
ACCT_USER_NAME=${PN}
-readonly ACCT_USER_NAME
# @ECLASS_VARIABLE: ACCT_USER_ID
# @REQUIRED
@@ -231,8 +231,9 @@ acct-user_pkg_pretend() {
[[ ${ACCT_USER_ID} -ge -1 ]] || die "Ebuild error: ACCT_USER_ID=${ACCT_USER_ID} invalid!"
local user_id=${ACCT_USER_ID}
- # check for the override
- local override_name=${ACCT_USER_NAME^^}
+ # check for the override, use PN in case this is an overlay and
+ # ACCT_USER_NAME is not PN and not valid in a bash variable name
+ local override_name=${PN^^}
local override_var=ACCT_USER_${override_name//-/_}_ID
if [[ -n ${!override_var} ]]; then
user_id=${!override_var}
@@ -274,8 +275,9 @@ acct-user_src_install() {
# serialize for override support
local ACCT_USER_GROUPS=${ACCT_USER_GROUPS[*]}
- # support make.conf overrides
- local override_name=${ACCT_USER_NAME^^}
+ # support make.conf overrides, use PN in case this is an overlay and
+ # ACCT_USER_NAME is not PN and not valid in a bash variable name
+ local override_name=${PN^^}
override_name=${override_name//-/_}
local var
for var in ACCT_USER_{ID,COMMENT,SHELL,HOME{,_OWNER,_PERMS},GROUPS}; do
@@ -437,7 +439,7 @@ acct-user_pkg_postinst() {
has "${g}" "${groups[@]}" || del_groups+="${del_groups:+, }${g}"
done
if [[ -n ${del_groups} ]]; then
- local override_name=${ACCT_USER_NAME^^}
+ local override_name=${PN^^}
override_name=${override_name//-/_}
ewarn "Removing user ${ACCT_USER_NAME} from group(s): ${del_groups}"
ewarn "To retain the user's group membership in the local system"
diff --git a/eclass/ant-tasks.eclass b/eclass/ant-tasks.eclass
deleted file mode 100644
index 2b10e0f3e1e0..000000000000
--- a/eclass/ant-tasks.eclass
+++ /dev/null
@@ -1,172 +0,0 @@
-# Copyright 2007-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# @DEAD
-# @ECLASS: ant-tasks.eclass
-# @MAINTAINER:
-# java@gentoo.org
-# @AUTHOR:
-# Vlastimil Babka <caster@gentoo.org>
-# @SUPPORTED_EAPIS: 7
-# @PROVIDES: java-utils-2
-# @BLURB: Eclass for building dev-java/ant-* packages
-# @DESCRIPTION:
-# This eclass provides functionality and default ebuild variables for building
-# dev-java/ant-* packages easily.
-
-case ${EAPI} in
- 7) ;;
- *) 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
-
-# @ECLASS_VARIABLE: ANT_TASK_JDKVER
-# @PRE_INHERIT
-# @DESCRIPTION:
-# Affects the >=virtual/jdk version set in DEPEND string. Defaults to 1.8, can
-# be overridden from ebuild BEFORE inheriting this eclass.
-ANT_TASK_JDKVER=${ANT_TASK_JDKVER-1.8}
-
-# @ECLASS_VARIABLE: ANT_TASK_JREVER
-# @PRE_INHERIT
-# @DESCRIPTION:
-# Affects the >=virtual/jre version set in DEPEND string. Defaults to 1.8, can
-# be overridden from ebuild BEFORE inheriting this eclass.
-ANT_TASK_JREVER=${ANT_TASK_JREVER-1.8}
-
-# @ECLASS_VARIABLE: ANT_TASK_NAME
-# @DESCRIPTION:
-# The name of this ant task as recognized by ant's build.xml, derived from $PN
-# by removing the ant- prefix. Read-only.
-ANT_TASK_NAME="${PN#ant-}"
-
-# @ECLASS_VARIABLE: ANT_TASK_DEPNAME
-# @PRE_INHERIT
-# @DESCRIPTION:
-# Specifies JAVA_PKG_NAME (PN{-SLOT} used with java-pkg_jar-from) of the package
-# that this one depends on. Defaults to the name of ant task, ebuild can
-# override it before inheriting this eclass. In case there is more than one
-# dependency, the variable can be specified as bash array with multiple strings,
-# one for each dependency.
-ANT_TASK_DEPNAME=${ANT_TASK_DEPNAME-${ANT_TASK_NAME}}
-
-# @ECLASS_VARIABLE: ANT_TASK_DISABLE_VM_DEPS
-# @PRE_INHERIT
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# If set, no JDK/JRE deps are added.
-
-# @VARIABLE: ANT_TASK_PV
-# @INTERNAL
-# @DESCRIPTION:
-# Version of ant-core this task is intended to register and thus load with.
-ANT_TASK_PV="${PV}"
-
-# default for final releases
-MY_PV=${PV}
-
-UPSTREAM_PREFIX="mirror://apache/ant/source"
-GENTOO_PREFIX="https://dev.gentoo.org/~fordfrog/distfiles"
-
-# source/workdir name
-MY_P="apache-ant-${MY_PV}"
-
-# Default values for standard ebuild variables, can be overridden from ebuild.
-DESCRIPTION="Apache Ant's optional tasks depending on ${ANT_TASK_DEPNAME}"
-HOMEPAGE="https://ant.apache.org/"
-SRC_URI="${UPSTREAM_PREFIX}/${MY_P}-src.tar.bz2
- ${GENTOO_PREFIX}/ant-${PV}-gentoo.tar.bz2"
-LICENSE="Apache-2.0"
-SLOT="0"
-
-RDEPEND="~dev-java/ant-core-${PV}:0"
-DEPEND="${RDEPEND}"
-
-if [[ -z "${ANT_TASK_DISABLE_VM_DEPS}" ]]; then
- RDEPEND+=" >=virtual/jre-${ANT_TASK_JREVER}"
- DEPEND+=" >=virtual/jdk-${ANT_TASK_JDKVER}"
-fi
-
-# Would run the full ant test suite for every ant task
-RESTRICT="test"
-
-S="${WORKDIR}/${MY_P}"
-
-# @FUNCTION: ant-tasks_src_unpack
-# @USAGE: [ base ] [ jar-dep ] [ all ]
-# @DESCRIPTION:
-# The function Is split into two parts, defaults to both of them ('all').
-#
-# base: performs the unpack, build.xml replacement and symlinks ant.jar from
-# ant-core
-#
-# jar-dep: symlinks the jar file(s) from dependency package(s)
-ant-tasks_src_unpack() {
- [[ -z "${1}" ]] && ant-tasks_src_unpack all
-
- while [[ -n "${1}" ]]; do
- case ${1} in
- base)
- unpack ${A}
- cd "${S}"
-
- # replace build.xml with our modified for split building
- if [ -e "${WORKDIR}"/${PV}-build.patch ] ; then
- eapply "${WORKDIR}"/${PV}-build.patch
- else
- mv -f "${WORKDIR}"/build.xml .
- fi
-
- cd lib
- # remove bundled xerces
- rm -f *.jar
-
- # ant.jar to build against
- java-pkg_jar-from --build-only ant-core ant.jar;;
- jar-dep)
- # get jar from the dependency package(s)
- if [[ -n "${ANT_TASK_DEPNAME}" ]]; then
- for depname in "${ANT_TASK_DEPNAME[@]}"; do
- java-pkg_jar-from ${depname}
- done
- fi;;
- all)
- ant-tasks_src_unpack base jar-dep;;
- esac
- shift
- done
-
-}
-
-# @FUNCTION: ant-tasks_src_compile
-# @DESCRIPTION:
-# Compiles the jar with installed ant-core.
-ant-tasks_src_compile() {
- ANT_TASKS="none" eant -Dbuild.dep=${ANT_TASK_NAME} jar-dep
-}
-
-# @FUNCTION: ant-tasks_src_install
-# @DESCRIPTION:
-# Installs the jar and registers its presence for the ant launcher script.
-# Version param ensures it won't get loaded (thus break) when ant-core is
-# updated to newer version.
-ant-tasks_src_install() {
- java-pkg_dojar build/lib/${PN}.jar
- java-pkg_register-ant-task --version "${ANT_TASK_PV}"
-
- # create the compatibility symlink
- 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/texlive-module.eclass b/eclass/texlive-module.eclass
index da33e25a39dc..0daca41961ff 100644
--- a/eclass/texlive-module.eclass
+++ b/eclass/texlive-module.eclass
@@ -360,7 +360,7 @@ texlive-module_src_install() {
cp -pR texmf-doc "${ED}/usr/share/" || die
fi
- if ver_test -ge 2023 && [[ ${CATEGORY} == dev-texlive ]]; then
+ if ver_test -ge 2023 && [[ -d texmf-dist/doc/man && ${CATEGORY} == dev-texlive ]]; then
local texlive_core_man_pages=(
afm2pl.1
aleph.1
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 25dedd4e5262..7d69f3b90e91 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -393,7 +393,7 @@ fi
# TODO: Add a pkg_setup & pkg_pretend check for whether the active compiler
# supports Ada.
-if tc_has_feature ada ; then
+if [[ ${PN} != gnat-gpl ]] && tc_has_feature ada ; then
BDEPEND+=" ada? ( || ( sys-devel/gcc[ada] dev-lang/gnat-gpl[ada] ) )"
fi