summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-06-13 00:08:30 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-06-13 00:08:30 +0100
commit0ebcd2cbf178600b5eb36b2f24cdbb3d2f4a9000 (patch)
tree941e6ba8c256dd27e9f9ca634f08d4bf0278798e /eclass
parentf0ddcad13515f66d2f3bf827d33c277bdba7e1dd (diff)
gentoo auto-resync : 13:06:2024 - 00:08:29
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin39213 -> 39073 bytes
-rw-r--r--eclass/cargo.eclass36
-rw-r--r--eclass/ecm.eclass6
-rw-r--r--eclass/kde.org.eclass3
-rw-r--r--eclass/postgres-multi.eclass6
-rw-r--r--eclass/rust-toolchain.eclass34
-rwxr-xr-xeclass/tests/cargo-bench.sh4
-rwxr-xr-xeclass/tests/git-r3.sh208
-rwxr-xr-xeclass/tests/linux-info_get_running_version.sh12
-rwxr-xr-xeclass/tests/pypi-bench.sh4
-rwxr-xr-xeclass/tests/python-utils-bench.sh4
-rwxr-xr-xeclass/tests/toolchain-funcs.sh4
12 files changed, 55 insertions, 266 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index c4b0eb13baa3..c18826eac202 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass
index a685cd99fb38..40d98211ce7f 100644
--- a/eclass/cargo.eclass
+++ b/eclass/cargo.eclass
@@ -7,11 +7,11 @@
# @AUTHOR:
# Doug Goldstein <cardoe@gentoo.org>
# Georgy Yakovlev <gyakovlev@gentoo.org>
-# @SUPPORTED_EAPIS: 7 8
+# @SUPPORTED_EAPIS: 8
# @BLURB: common functions and variables for cargo builds
case ${EAPI} in
- 7|8) ;;
+ 8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -23,10 +23,6 @@ _CARGO_ECLASS=1
RUST_DEPEND="virtual/rust"
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
@@ -38,7 +34,7 @@ case ${EAPI} in
;;
esac
-inherit flag-o-matic multiprocessing toolchain-funcs
+inherit flag-o-matic multiprocessing rust-toolchain toolchain-funcs
[[ ! ${CARGO_OPTIONAL} ]] && BDEPEND="${RUST_DEPEND}"
@@ -529,6 +525,21 @@ cargo_src_compile() {
filter-lto
tc-export AR CC CXX PKG_CONFIG
+ if tc-is-cross-compiler; then
+ export CARGO_BUILD_TARGET=$(rust_abi)
+ local TRIPLE=${CARGO_BUILD_TARGET//-/_}
+ export CARGO_TARGET_"${TRIPLE^^}"_LINKER=$(tc-getCC)
+
+ # Set vars for cc-rs crate.
+ tc-export_build_env
+ export \
+ HOST_AR=$(tc-getBUILD_AR)
+ HOST_CC=$(tc-getBUILD_CC)
+ HOST_CXX=$(tc-getBUILD_CXX)
+ HOST_CFLAGS=${BUILD_CFLAGS}
+ HOST_CXXFLAGS=${BUILD_CXXFLAGS}
+ fi
+
set -- cargo build $(usex debug "" --release) ${ECARGO_ARGS[@]} "$@"
einfo "${@}"
"${@}" || die "cargo build failed"
@@ -556,17 +567,6 @@ cargo_src_install() {
rm -f "${ED}/usr/.crates.toml" || die
rm -f "${ED}/usr/.crates2.json" || die
-
- # it turned out to be non-standard dir, so get rid of it future EAPI
- # and only run for EAPI=7
- # https://bugs.gentoo.org/715890
- case ${EAPI:-0} in
- 7)
- if [ -d "${S}/man" ]; then
- doman "${S}/man" || return 0
- fi
- ;;
- esac
}
# @FUNCTION: cargo_src_test
diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass
index 6d64815984cc..d36b11ebd5e8 100644
--- a/eclass/ecm.eclass
+++ b/eclass/ecm.eclass
@@ -584,6 +584,12 @@ ecm_src_configure() {
# move handbook outside of doc dir, bug 667138
-DKDE_INSTALL_DOCBUNDLEDIR="${EPREFIX}/usr/share/help"
)
+
+ # bug 928345
+ # TODO: Eventually it should be put to upstream as to why LIBEXECDIR
+ # in KDEInstallDirsCommon.cmake is set to EXECROOTDIR/LIBDIR/libexec
+ [[ ${_KFSLOT} == 6 ]] && \
+ cmakeargs+=( -DKDE_INSTALL_LIBEXECDIR="${EPREFIX}/usr/libexec" )
fi
# allow the ebuild to override what we set here
diff --git a/eclass/kde.org.eclass b/eclass/kde.org.eclass
index b9d68ccbf5c2..9be501ce9e3f 100644
--- a/eclass/kde.org.eclass
+++ b/eclass/kde.org.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: kde.org.eclass
@@ -55,6 +55,7 @@ declare -A KDE_ORG_CATEGORIES=(
[games-board]=games
[games-kids]=education
[games-mud]=games
+ [games-puzzle]=games
[kde-frameworks]=frameworks
[kde-plasma]=plasma
[mail-client]=pim
diff --git a/eclass/postgres-multi.eclass b/eclass/postgres-multi.eclass
index d93df851cd24..92299b8cf34c 100644
--- a/eclass/postgres-multi.eclass
+++ b/eclass/postgres-multi.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: postgres-multi.eclass
@@ -6,7 +6,7 @@
# PostgreSQL <pgsql-bugs@gentoo.org>
# @AUTHOR:
# Aaron W. Swenson <titanofold@gentoo.org>
-# @SUPPORTED_EAPIS: 7
+# @SUPPORTED_EAPIS: 7 8
# @PROVIDES: multibuild postgres
# @BLURB: An eclass to build PostgreSQL-related packages against multiple slots
# @DESCRIPTION:
@@ -15,7 +15,7 @@
# POSTGRES_TARGETS use flags.
case ${EAPI} in
- 7) ;;
+ 7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
diff --git a/eclass/rust-toolchain.eclass b/eclass/rust-toolchain.eclass
index 5824a48734f9..111aece796ce 100644
--- a/eclass/rust-toolchain.eclass
+++ b/eclass/rust-toolchain.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: rust-toolchain.eclass
@@ -7,17 +7,14 @@
# @SUPPORTED_EAPIS: 8
# @BLURB: helps map gentoo arches to rust ABIs
# @DESCRIPTION:
-# This eclass contains a src_unpack default phase function, and
-# helper functions, to aid in proper rust-ABI handling for various
-# gentoo arches.
+# This eclass contains helper functions, to aid in proper rust-ABI handling for
+# various gentoo arches.
case ${EAPI} in
8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-inherit multilib-build
-
# @ECLASS_VARIABLE: RUST_TOOLCHAIN_BASEURL
# @DESCRIPTION:
# This variable specifies the base URL used by the
@@ -48,7 +45,8 @@ rust_abi() {
powerpc64le*) echo powerpc64le-unknown-linux-gnu;;
powerpc64*) echo powerpc64-unknown-linux-gnu;;
powerpc*) echo powerpc-unknown-linux-gnu;;
- riscv64*) echo riscv64gc-unknown-linux-gnu;;
+ riscv64*gnu) echo riscv64gc-unknown-linux-gnu;;
+ riscv64*musl) echo riscv64gc-unknown-linux-musl;;
s390x*) echo s390x-unknown-linux-gnu;;
x86_64*gnu) echo x86_64-unknown-linux-gnu;;
x86_64*musl) echo x86_64-unknown-linux-musl;;
@@ -56,24 +54,6 @@ rust_abi() {
esac
}
-# @FUNCTION: rust_all_abis
-# @DESCRIPTION:
-# Outputs a list of all the enabled Rust ABIs
-rust_all_abis() {
- if use multilib; then
- local abi
- local ALL_ABIS=()
- for abi in $(multilib_get_enabled_abis); do
- ALL_ABIS+=( $(rust_abi $(get_abi_CHOST ${abi})) )
- done
- local abi_list
- IFS=, eval 'abi_list=${ALL_ABIS[*]}'
- echo ${abi_list}
- else
- rust_abi
- fi
-}
-
# @FUNCTION: rust_arch_uri
# @USAGE: <rust-ABI> <base-uri> [alt-distfile-basename]
# @DESCRIPTION:
@@ -127,7 +107,9 @@ rust_all_arch_uris()
big-endian? ( $(rust_arch_uri powerpc64-unknown-linux-gnu "$@") )
!big-endian? ( $(rust_arch_uri powerpc64le-unknown-linux-gnu "$@") )
)
- riscv? ( $(rust_arch_uri riscv64gc-unknown-linux-gnu "$@") )
+ riscv? (
+ elibc_glibc? ( $(rust_arch_uri riscv64gc-unknown-linux-gnu "$@") )
+ )
s390? ( $(rust_arch_uri s390x-unknown-linux-gnu "$@") )
"
diff --git a/eclass/tests/cargo-bench.sh b/eclass/tests/cargo-bench.sh
index d30b04569905..9347fe339c12 100755
--- a/eclass/tests/cargo-bench.sh
+++ b/eclass/tests/cargo-bench.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2023 Gentoo Authors
+# Copyright 2023-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -39,7 +39,7 @@ timeit() {
local xr avg
for x in real user; do
xr="${x}[*]"
- avg=$(dc -S 3 -e "${ITERATIONS} ${RUNS} * ${!xr} + + / p")
+ avg=$(dc -e "3 k ${ITERATIONS} ${RUNS} * ${!xr} + + / p")
printf '%s %4.0f it/s\n' "${x}" "${avg}"
done
diff --git a/eclass/tests/git-r3.sh b/eclass/tests/git-r3.sh
deleted file mode 100755
index 02cbcbc59125..000000000000
--- a/eclass/tests/git-r3.sh
+++ /dev/null
@@ -1,208 +0,0 @@
-#!/bin/bash
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# git no longer allows ext: protocol, meh
-exit 0
-
-EAPI=7
-
-source tests-common.sh || exit
-
-inherit git-r3
-
-testdir=${pkg_root}/git
-mkdir "${testdir}" || die "unable to mkdir testdir"
-cd "${testdir}" || die "unable to cd to testdir"
-
-EGIT3_STORE_DIR=store
-mkdir "${EGIT3_STORE_DIR}" || die "unable to mkdir store"
-
-test_file() {
- local fn=${1}
- local expect=${2}
-
- if [[ ! -f ${fn} ]]; then
- eerror "${fn} does not exist (not checked out?)"
- else
- local got=$(<"${fn}")
-
- if [[ ${got} != ${expect} ]]; then
- eerror "${fn}, expected: ${expect}, got: ${got}"
- else
- return 0
- fi
- fi
- return 1
-}
-
-test_no_file() {
- local fn=${1}
-
- if [[ -f ${fn} ]]; then
- eerror "${fn} exists (wtf?!)"
- else
- return 0
- fi
- return 1
-}
-
-test_repo_clean() {
- local P=${P}_${FUNCNAME#test_}
-
- (
- mkdir repo
- cd repo
- git init -q
- echo test > file
- git add file
- git commit -m 1 -q
- echo other-text > file2
- git add file2
- git commit -m 2 -q
- ) || die "unable to prepare repo"
-
- # we need to use an array to preserve whitespace
- local EGIT_REPO_URI=(
- "ext::git daemon --export-all --base-path=. --inetd %G/repo"
- )
-
- tbegin "fetching from a simple repo"
- (
- git-r3_src_unpack
- test_file "${WORKDIR}/${P}/file" test && \
- test_file "${WORKDIR}/${P}/file2" other-text
- ) &>fetch.log
-
- eend ${?} || cat fetch.log
-}
-
-test_repo_revert() {
- local P=${P}_${FUNCNAME#test_}
-
- (
- cd repo
- git revert -n HEAD^
- git commit -m r1 -q
- ) || die "unable to prepare repo"
-
- # we need to use an array to preserve whitespace
- local EGIT_REPO_URI=(
- "ext::git daemon --export-all --base-path=. --inetd %G/repo"
- )
-
- tbegin "fetching revert"
- (
- git-r3_src_unpack
- test_no_file "${WORKDIR}/${P}/file" && \
- test_file "${WORKDIR}/${P}/file2" other-text
- ) &>fetch.log
-
- eend ${?} || cat fetch.log
-}
-
-test_repo_branch() {
- local P=${P}_${FUNCNAME#test_}
-
- (
- cd repo
- git branch -q other-branch HEAD^
- git checkout -q other-branch
- echo one-more > file3
- git add file3
- git commit -m 3 -q
- git checkout -q master
- ) || die "unable to prepare repo"
-
- # we need to use an array to preserve whitespace
- local EGIT_REPO_URI=(
- "ext::git daemon --export-all --base-path=. --inetd %G/repo"
- )
- local EGIT_BRANCH=other-branch
-
- tbegin "switching branches"
- (
- git-r3_src_unpack
- test_file "${WORKDIR}/${P}/file" test && \
- test_file "${WORKDIR}/${P}/file2" other-text && \
- test_file "${WORKDIR}/${P}/file3" one-more
- ) &>fetch.log
-
- eend ${?} || cat fetch.log
-}
-
-test_repo_merge() {
- local P=${P}_${FUNCNAME#test_}
-
- (
- cd repo
- git branch -q one-more-branch HEAD^
- git checkout -q one-more-branch
- echo foobarbaz > file3
- git add file3
- git commit -m 3b -q
- git checkout -q master
- git merge -m 4 -q one-more-branch
- ) || die "unable to prepare repo"
-
- # we need to use an array to preserve whitespace
- local EGIT_REPO_URI=(
- "ext::git daemon --export-all --base-path=. --inetd %G/repo"
- )
-
- tbegin "fetching a merge commit"
- (
- git-r3_src_unpack
- test_no_file "${WORKDIR}/${P}/file" && \
- test_file "${WORKDIR}/${P}/file2" other-text && \
- test_file "${WORKDIR}/${P}/file3" foobarbaz
- ) &>fetch.log
-
- eend ${?} || cat fetch.log
-}
-
-test_repo_revert_merge() {
- local P=${P}_${FUNCNAME#test_}
-
- (
- cd repo
- git branch -q to-be-reverted
- git checkout -q to-be-reverted
- echo trrm > file3
- git add file3
- git commit -m 5b -q
- git checkout -q master
- echo trrm > file2
- git add file2
- git commit -m 5 -q
- git merge -m 6 -q to-be-reverted
- echo trrm > file
- git add file
- git commit -m 7 -q
- git revert -m 1 -n HEAD^
- git commit -m 7r -q
- ) || die "unable to prepare repo"
-
- # we need to use an array to preserve whitespace
- local EGIT_REPO_URI=(
- "ext::git daemon --export-all --base-path=. --inetd %G/repo"
- )
-
- tbegin "fetching a revert of a merge commit"
- (
- git-r3_src_unpack
- test_file "${WORKDIR}/${P}/file" trrm && \
- test_file "${WORKDIR}/${P}/file2" trrm && \
- test_file "${WORKDIR}/${P}/file3" foobarbaz
- ) &>fetch.log
-
- eend ${?} || cat fetch.log
-}
-
-test_repo_clean
-test_repo_revert
-test_repo_branch
-test_repo_merge
-test_repo_revert_merge
-
-texit
diff --git a/eclass/tests/linux-info_get_running_version.sh b/eclass/tests/linux-info_get_running_version.sh
index 57aaf2fedcd4..b8ae8c4b85ae 100755
--- a/eclass/tests/linux-info_get_running_version.sh
+++ b/eclass/tests/linux-info_get_running_version.sh
@@ -1,12 +1,20 @@
#!/bin/bash
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=8
source tests-common.sh || exit
+source version-funcs.sh || exit
inherit linux-info
+use() {
+ case $1 in
+ kernel_linux) return 0 ;;
+ esac
+ die "${FUNCNAME[0]}: unknown flag"
+}
+
test_get_running_version() {
local test_kv=$1 major=$2 minor=$3 patch=$4 extra=$5
tbegin "get_running_version ${test_kv}"
diff --git a/eclass/tests/pypi-bench.sh b/eclass/tests/pypi-bench.sh
index cce93527b729..02855563db3f 100755
--- a/eclass/tests/pypi-bench.sh
+++ b/eclass/tests/pypi-bench.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2023 Gentoo Authors
+# Copyright 2023-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -39,7 +39,7 @@ timeit() {
local xr avg
for x in real user; do
xr="${x}[*]"
- avg=$(dc -S 3 -e "${ITERATIONS} ${RUNS} * ${!xr} + + / p")
+ avg=$(dc -e "3 k ${ITERATIONS} ${RUNS} * ${!xr} + + / p")
printf '%s %4.0f it/s\n' "${x}" "${avg}"
done
diff --git a/eclass/tests/python-utils-bench.sh b/eclass/tests/python-utils-bench.sh
index 7f27adef5509..f718b9f125cb 100755
--- a/eclass/tests/python-utils-bench.sh
+++ b/eclass/tests/python-utils-bench.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2023 Gentoo Authors
+# Copyright 2023-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -38,7 +38,7 @@ timeit() {
local xr avg
for x in real user; do
xr="${x}[*]"
- avg=$(dc -S 3 -e "${ITERATIONS} ${RUNS} * ${!xr} + + / p")
+ avg=$(dc -e "3 k ${ITERATIONS} ${RUNS} * ${!xr} + + / p")
printf '%s %4.0f it/s\n' "${x}" "${avg}"
done
diff --git a/eclass/tests/toolchain-funcs.sh b/eclass/tests/toolchain-funcs.sh
index 08cfd74611aa..ee10ddf50c1e 100755
--- a/eclass/tests/toolchain-funcs.sh
+++ b/eclass/tests/toolchain-funcs.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -28,7 +28,7 @@ test-tc-arch-kernel() {
tbegin "tc-arch-kernel() (KV=2.6.30)"
test-tc-arch-kernel 2.6.30 \
i{3..6}86:x86 x86_64:x86 \
- powerpc{,64}:powerpc i{3..6}86-gentoo-freebsd:i386 \
+ powerpc{,64}:powerpc \
or1k:openrisc or1k-linux-musl:openrisc
tend $?