sys-apps/gentoo-functions: Sync with Gentoo

It's from Gentoo commit 00134303fd6b8946bcfae64b4da24ecd9ac3e348.
This commit is contained in:
Flatcar Buildbot 2024-07-01 07:18:02 +00:00 committed by Mathieu Tortuyaux
parent e0fa16303f
commit 55811f3347
No known key found for this signature in database
GPG Key ID: AC5CCFB52545D9B8
4 changed files with 60 additions and 7 deletions

View File

@ -1,2 +1,3 @@
DIST gentoo-functions-0.19.tar.bz2 12079 BLAKE2B be0a3a54d4dee1755866047b670a69cd6fec368239123c3f0c08180b79a33c20147bca0e35e568faef6877513551e731bdf0c181aeb0460f6574d2d708219373 SHA512 2674d3fe5724cc6d685ae58bf0ee33f4a1bdba2c5e5809cfb193fd0a710d4678c2d9392c2c62d2321cf455f524950266dc1629ab684fe46632d179e539d5a39e
DIST gentoo-functions-1.0.tar.bz2 18066 BLAKE2B a843de65d5d8f93396713dd5c80377dad478482d5749736ec3a08e0d0cc40f1a2ce5c967282b8060452d73f6377590f06e5c2a12cdfc753e7f6a18754cde4997 SHA512 057a7159a613108710a40f2ca54403adf64ab9649732be49d3a72314e2ca3c65d7a9093168e26ec12814203e1fe14cc1fc5cf2cefa2f923ec8bb714972d20f55
DIST gentoo-functions-1.5.tar.bz2 15808 BLAKE2B 99c330eb4c7f1d7af67b6f93dba565f9ea37c15e82d0b97157067279671dc3918668bf8120f7c410f018d67761cee41320efaec4df43639765d023b23a3a9a7f SHA512 f7add7770f40e110864f16978e968bfd937c1a5099e336cc04f6861483bae36ff7932f502994df1ddfa347beef8736bd39bd276bafbe04190c9915446457ce15
DIST gentoo-functions-1.6.tar.bz2 16795 BLAKE2B c901cdb8f2fcb507b5397e9ce674a12641f2129b9be05776bb272e09b9db3a6d205e6a00ef51f71b3203eac4e333b297cfe5ae5d61f9dd43074073a749ca171e SHA512 922b801c79f12d15bcabdb6cd52246cc60a4b512dfcc10bb3933f07d2ec03e01fe5be72502ae34c87374c8a7e880ce268e7dc8d1afcbd28b65efb51b9e467306

View File

@ -0,0 +1,36 @@
# Copyright 2014-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
if [[ ${PV} == 9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gentoo-functions.git"
else
SRC_URI="https://gitweb.gentoo.org/proj/gentoo-functions.git/snapshot/${P}.tar.bz2"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
inherit meson
DESCRIPTION="Base functions required by all Gentoo systems"
HOMEPAGE="https://gitweb.gentoo.org/proj/gentoo-functions.git"
LICENSE="GPL-2 public-domain"
SLOT="0"
IUSE="test"
RESTRICT="!test? ( test )"
# Specifically needs GNU find, as well.
RDEPEND=">=sys-apps/findutils-4.9"
src_configure() {
local emesonargs=(
# Deliberately avoid /usr as consumers assume we're at /lib/gentoo.
--prefix="${EPREFIX:-/}"
--mandir="${EPREFIX}/usr/share/man"
$(meson_use test tests)
)
meson_src_configure
}

View File

@ -1,8 +1,13 @@
# Copyright 2014-2023 Gentoo Authors
# Copyright 2014-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit meson
DESCRIPTION="Base functions required by all Gentoo systems"
HOMEPAGE="https://gitweb.gentoo.org/proj/gentoo-functions.git"
if [[ ${PV} == 9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gentoo-functions.git"
@ -11,11 +16,6 @@ else
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
inherit meson
DESCRIPTION="Base functions required by all Gentoo systems"
HOMEPAGE="https://gitweb.gentoo.org/proj/gentoo-functions.git"
LICENSE="GPL-2 public-domain"
SLOT="0"
IUSE="test"
@ -34,3 +34,19 @@ src_configure() {
meson_src_configure
}
src_install() {
meson_src_install
if [[ ${EPREFIX} ]]; then
while read -r; do
if [[ ${REPLY} == $'\t'genfun_prefix= ]]; then
printf 'genfun_prefix=%q\n' "${EPREFIX}"
else
printf '%s\n' "${REPLY}"
fi || ! break
done < "${ED}/lib/gentoo/functions.sh" > "${T}/functions.sh" \
&& mv -- "${T}/functions.sh" "${ED}/lib/gentoo/functions.sh" \
|| die
fi
}