sys-apps/gentoo-functions: Sync with Gentoo

It's from Gentoo commit c4abab34f5ed78333d0b21355aa21ca31f6b2cca.
This commit is contained in:
Flatcar Buildbot 2024-10-07 07:07:41 +00:00 committed by Krzesimir Nowak
parent cf1c17f371
commit 000100eb60
2 changed files with 50 additions and 0 deletions

View File

@ -1,2 +1,3 @@
DIST gentoo-functions-0.19.tar.bz2 12079 BLAKE2B be0a3a54d4dee1755866047b670a69cd6fec368239123c3f0c08180b79a33c20147bca0e35e568faef6877513551e731bdf0c181aeb0460f6574d2d708219373 SHA512 2674d3fe5724cc6d685ae58bf0ee33f4a1bdba2c5e5809cfb193fd0a710d4678c2d9392c2c62d2321cf455f524950266dc1629ab684fe46632d179e539d5a39e
DIST gentoo-functions-1.7.2.tar.bz2 29059 BLAKE2B 2b3d13e6f5b553fd0fa7a0880677bd61c82c8815d3801a2d80e7632a97c36f81b41075109856f6248ad0eb2453b511066e63a110c97984e6427135ad19cdc234 SHA512 3839b04784576cc5c5824b24f967862ea421be051983d1ac587de7e21b0fbc4f403e0d4f707ee5cbcf466ec4a12d188da9413a81ca71993c957328ff225cb9af
DIST gentoo-functions-1.7.3.tar.bz2 29623 BLAKE2B e37fcaf7ca70eda4507f8b539ad37c989a3a6d28d2a063aa1650f60f8cbb28b00103ffea0f1221fd4e8379d4066bca1fd5aeee30073eed6274cfaaaa277bee84 SHA512 4c5d5c9e8b93e366c5483e8777dfdc15afc6764110cc69f751bb5cc1e335dd70e0952017ea55f1be70fcd5120f07708b1601638c97132f53acde8b3f5a4afe34

View File

@ -0,0 +1,49 @@
# 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"
else
SRC_URI="https://gitweb.gentoo.org/proj/gentoo-functions.git/snapshot/${P}.tar.bz2"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
LICENSE="GPL-2"
SLOT="0"
IUSE="test"
RESTRICT="!test? ( test )"
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
}
src_install() {
meson_src_install
if [[ ${EPREFIX} ]]; then
while read -r; do
if [[ ${REPLY} == $'\t'genfun_prefix= ]]; then
printf '\tgenfun_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
}