net-libs/libtirpc: Sync with Gentoo

It's from Gentoo commit cdaeb8c538bb205e9aff21616d7fa12bf0a76668.
This commit is contained in:
Krzesimir Nowak 2025-04-03 14:50:25 +02:00
parent 4af7517807
commit 406df4d659
4 changed files with 78 additions and 31 deletions

View File

@ -1,2 +1,3 @@
DIST libtirpc-1.3.4.tar.bz2 563292 BLAKE2B 33371e83e9f54e9d6d434b75d3a95bedefce63050846483471e302b1fbb3b63a18db90b652050c43e1c6e42b03e34bafb2fb6ae89787f05af0cf747319825424 SHA512 004e61b5853717324790c46cda5ff227d525909f189194ae72a1ec8f476ca35d7f4c1f03c0fbc690c1696d60a212675b09246dbe627fdbf1a9a47f5664e82b00
DIST libtirpc-1.3.5.tar.bz2 565188 BLAKE2B 1ae1cc0be1c52bca8fbe2300159d9298b069b3f81adde7f50da3fb7049f9b9f628393dfe94e9276facfeea2b1ccdc9a52632fee4af432c36e457fd3ff2b0963c SHA512 c80a953671c5692294efe7425e41c7f12bd4c430f473f9ea71883168cb4a69111f0018122bd0e7982e18f4576e45d4977ce0790743382faae006c446813d2a4f
DIST libtirpc-1.3.6.tar.bz2 566384 BLAKE2B 521e1e3d2ceefd668f1b0d52b7c0342b97952d322eeb7bf740bb1eb1fb88a14b0a2fce57f07a9fd3797d289f57f511085924bba3d8984f15c799468d30f47500 SHA512 f3ccc45f9de8d517ccc10dd4b68b844bbe71a2cb61ca5819995d97319353f7e24cfee205e09dddf65cf47605314176aee161091d7379b6113ee8d1f5077c93d0
DIST libtirpc-glibc-nfs.tar.xz 8948 BLAKE2B 7316623d9f2b6928e296137fe2bf6794b208d549c2ffba9e4a35b47f7b04bf023798a09f38c02d039debf6adc466d7689cf3c8274d71a22eaff08729642c0a28 SHA512 90255bf0a27af16164e0710dd940778609925d473f4343093ff19d98cc4f23023788bf4edf0178eae1961afc0ba8b69b273de95b7d7e2afdb706701d8ba6f7ba

View File

@ -1,7 +0,0 @@
This is a fork of gentoo package. We have it on overlay because:
- We change the NETCONFIG macro value from `"/etc/netconfig"` to
`"/usr/share/tirpc/netconfig"`.
- We update the installation of the netconfig accordingly to the
previous point.

View File

@ -1,20 +1,20 @@
# Copyright 1999-2023 Gentoo Authors
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit flag-o-matic multilib-minimal toolchain-funcs usr-ldscript
inherit flag-o-matic libtool multilib-minimal
DESCRIPTION="Transport Independent RPC library (SunRPC replacement)"
HOMEPAGE="https://sourceforge.net/projects/libtirpc/ https://git.linux-nfs.org/?p=steved/libtirpc.git"
SRC_URI="
mirror://sourceforge/${PN}/${P}.tar.bz2
mirror://gentoo/${PN}-glibc-nfs.tar.xz
https://downloads.sourceforge.net/${PN}/${P}.tar.bz2
https://dev.gentoo.org/~sam/distfiles/${PN}-glibc-nfs.tar.xz
"
LICENSE="BSD BSD-2 BSD-4 LGPL-2.1+"
SLOT="0/3" # subslot matches SONAME major
KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
IUSE="kerberos static-libs"
RDEPEND="kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )"
@ -31,39 +31,25 @@ src_prepare() {
cp -ra "${WORKDIR}"/tirpc "${S}"/ || die
default
# Flatcar: Set netconfig path to /usr so NFS works in
# PXE/ISO-booted systems.
sed -i -e "s,/etc,/usr/share/tirpc," "${S}/tirpc/netconfig.h" || die
elibtoolize
}
multilib_src_configure() {
# ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
# https://github.com/gentoo/gentoo/pull/28355
# mold needs this too but right now tc-ld-is-mold is also not available
if tc-ld-is-lld; then
append-ldflags -Wl,--undefined-version
fi
append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
local myeconfargs=(
$(use_enable kerberos gssapi)
$(use_enable static-libs static)
KRB5_CONFIG="${ESYSROOT}"/usr/bin/krb5-config
)
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
}
multilib_src_install() {
default
# libtirpc replaces rpc support in glibc, so we need it in /
gen_usr_ldscript -a tirpc
}
multilib_src_install_all() {
einstalldocs
insinto /usr/share/tirpc
insinto /etc
doins doc/netconfig
insinto /usr/include/tirpc

View File

@ -0,0 +1,67 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit flag-o-matic libtool multilib-minimal
DESCRIPTION="Transport Independent RPC library (SunRPC replacement)"
HOMEPAGE="https://sourceforge.net/projects/libtirpc/ https://git.linux-nfs.org/?p=steved/libtirpc.git"
SRC_URI="
https://downloads.sourceforge.net/${PN}/${P}.tar.bz2
https://dev.gentoo.org/~sam/distfiles/${PN}-glibc-nfs.tar.xz
"
LICENSE="BSD BSD-2 BSD-4 LGPL-2.1+"
SLOT="0/3" # subslot matches SONAME major
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
IUSE="kerberos static-libs"
RDEPEND="kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )"
DEPEND="
${RDEPEND}
elibc_musl? ( sys-libs/queue-standalone )
"
BDEPEND="
app-arch/xz-utils
virtual/pkgconfig
"
src_prepare() {
cp -ra "${WORKDIR}"/tirpc "${S}"/ || die
default
elibtoolize
}
multilib_src_configure() {
# bug #943709
append-cflags -std=gnu17
append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
# bug #911863
append-lfs-flags
local myeconfargs=(
$(use_enable kerberos gssapi)
$(use_enable static-libs static)
KRB5_CONFIG="${ESYSROOT}"/usr/bin/krb5-config
)
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
}
multilib_src_install_all() {
einstalldocs
insinto /etc
doins doc/netconfig
insinto /usr/include/tirpc
doins -r "${WORKDIR}"/tirpc/*
# makes sure that the linking order for nfs-utils is proper, as
# libtool would inject a libgssglue dependency in the list.
if ! use static-libs ; then
find "${ED}" -name "*.la" -delete || die
fi
}