From 605bca2dc60143815d03b01e4f9e0e43d8934a05 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 16 Jun 2025 07:12:53 +0000 Subject: [PATCH] net-libs/rpcsvc-proto: Sync with Gentoo It's from Gentoo commit 9bde1eeaa3e03433543ff9b9a2f62dd8ff57e804. --- .../rpcsvc-proto-1.4.4-prebuilt-rpcgen.patch | 43 ++++++++++++ .../rpcsvc-proto/rpcsvc-proto-1.4.4-r1.ebuild | 70 +++++++++++++++++++ 2 files changed, 113 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/net-libs/rpcsvc-proto/files/rpcsvc-proto-1.4.4-prebuilt-rpcgen.patch create mode 100644 sdk_container/src/third_party/portage-stable/net-libs/rpcsvc-proto/rpcsvc-proto-1.4.4-r1.ebuild diff --git a/sdk_container/src/third_party/portage-stable/net-libs/rpcsvc-proto/files/rpcsvc-proto-1.4.4-prebuilt-rpcgen.patch b/sdk_container/src/third_party/portage-stable/net-libs/rpcsvc-proto/files/rpcsvc-proto-1.4.4-prebuilt-rpcgen.patch new file mode 100644 index 0000000000..ef881a92c1 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-libs/rpcsvc-proto/files/rpcsvc-proto-1.4.4-prebuilt-rpcgen.patch @@ -0,0 +1,43 @@ +From 7dc8c2a5051208c8808405c8bbdb3fca0cf43f74 Mon Sep 17 00:00:00 2001 +From: James Le Cuirot +Date: Fri, 2 May 2025 16:39:19 +0100 +Subject: [PATCH] configure.ac: Add --with-prebuilt-rpcgen option for + cross-compiling + +If given an argument, it will use that program to generate the rpcsvc +headers. Otherwise, it will use "rpcgen" from the PATH. + +Closes: https://github.com/thkukuk/rpcsvc-proto/issues/13 +Signed-off-by: James Le Cuirot +--- a/configure.ac ++++ b/configure.ac +@@ -23,4 +23,18 @@ AM_GNU_GETTEXT([external]) + AM_GNU_GETTEXT_VERSION([0.20.2]) + AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.2]) + ++RPCGEN='$(top_builddir)/rpcgen/rpcgen' ++AC_ARG_WITH([prebuilt-rpcgen], ++ AS_HELP_STRING( ++ [--with-prebuilt-rpcgen], ++ [use prebuilt rpcgen to generate rpcsvc headers] ++ ), ++ AS_CASE([$withval], ++ [no], [], ++ [yes], [RPCGEN=rpcgen], ++ [RPCGEN=$withval] ++ ) ++) ++AC_SUBST([RPCGEN]) ++ + AC_OUTPUT([Makefile rpcgen/Makefile rpcsvc/Makefile po/Makefile.in]) +--- a/rpcsvc/Makefile.am ++++ b/rpcsvc/Makefile.am +@@ -12,4 +12,4 @@ nodist_rpcsvc_HEADERS = klm_prot.h nlm_prot.h rstat.h spray.h \ + nfs_prot.h rquota.h sm_inter.h + + .x.h: +- $(top_builddir)/rpcgen/rpcgen -h -o $@ $< ++ $(RPCGEN) -h -o $@ $< +-- +2.49.0 + diff --git a/sdk_container/src/third_party/portage-stable/net-libs/rpcsvc-proto/rpcsvc-proto-1.4.4-r1.ebuild b/sdk_container/src/third_party/portage-stable/net-libs/rpcsvc-proto/rpcsvc-proto-1.4.4-r1.ebuild new file mode 100644 index 0000000000..7f825b44e1 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-libs/rpcsvc-proto/rpcsvc-proto-1.4.4-r1.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools 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" + +LICENSE="LGPL-2.1+ BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + +RDEPEND=" + !/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_configure() { + local myconf=() + + if tc-is-cross-compiler; then + mkdir "${WORKDIR}"/build || die + pushd "${WORKDIR}"/build >/dev/null || die + ECONF_SOURCE="${S}" econf_build + popd >/dev/null || die + myconf+=( --with-prebuilt-rpcgen="${WORKDIR}"/build/rpcgen/rpcgen ) + fi + + econf "${myconf[@]}" +} + +src_compile() { + tc-is-cross-compiler && emake -C "${WORKDIR}"/build/rpcgen + emake +} + +src_install() { + default + + # provided by sys-fs/quota[rpc] + rm "${ED}"/usr/include/rpcsvc/rquota.{x,h} || die +}