summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2022-09-14 19:50:07 -0400
committerMike Gilbert <floppym@gentoo.org>2022-09-14 19:53:11 -0400
commit71c382f745b42db23de0e3a1e3adb3ba9d4cda3c (patch)
tree5c5ea3a7e3df5a6d7e4f28c1edbedc00f6b0b186 /net-libs/rpcsvc-proto
parentnet-misc/ipv6calc: fix underlinking (diff)
downloadgentoo-71c382f745b42db23de0e3a1e3adb3ba9d4cda3c.tar.gz
gentoo-71c382f745b42db23de0e3a1e3adb3ba9d4cda3c.tar.bz2
gentoo-71c382f745b42db23de0e3a1e3adb3ba9d4cda3c.zip
net-libs/rpcsvc-proto: search for a valid 'cpp' command
Closes: https://bugs.gentoo.org/870061 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'net-libs/rpcsvc-proto')
-rw-r--r--net-libs/rpcsvc-proto/rpcsvc-proto-1.4.3-r1.ebuild17
1 files changed, 12 insertions, 5 deletions
diff --git a/net-libs/rpcsvc-proto/rpcsvc-proto-1.4.3-r1.ebuild b/net-libs/rpcsvc-proto/rpcsvc-proto-1.4.3-r1.ebuild
index f7687c8b7eca..480e738d5930 100644
--- a/net-libs/rpcsvc-proto/rpcsvc-proto-1.4.3-r1.ebuild
+++ b/net-libs/rpcsvc-proto/rpcsvc-proto-1.4.3-r1.ebuild
@@ -3,8 +3,6 @@
EAPI=8
-inherit toolchain-funcs
-
DESCRIPTION="rpcsvc protocol definitions from glibc"
HOMEPAGE="https://github.com/thkukuk/rpcsvc-proto"
SRC_URI="https://github.com/thkukuk/rpcsvc-proto/releases/download/v${PV}/${P}.tar.xz"
@@ -21,9 +19,18 @@ BDEPEND="sys-devel/gettext"
src_prepare() {
default
- # Use ${CHOST}-cpp, not 'cpp': bug #718138
- # Ideally we should use @CPP@ but rpcgen makes it hard to use '${CHOST}-gcc -E'
- sed -i -s "s/CPP = \"cpp\";/CPP = \"$(tc-getPROG CPP cpp)\";/" rpcgen/rpc_main.c || die
+ # Search for a valid 'cpp' command.
+ # The CPP envvar might contain '${CC} -E', which does not work for rpcgen.
+ # Bug 718138, 870031, 870061.
+ local x cpp=
+ for x in {${CHOST}-,}{,clang-}cpp; do
+ if type -P "${x}" >/dev/null; then
+ cpp=${x}
+ break
+ fi
+ done
+ [[ -n ${cpp} ]] || die "Unable to find cpp"
+ sed -i -e "s/CPP = \"cpp\";/CPP = \"${cpp}\";/" rpcgen/rpc_main.c || die
}
src_install() {