Skip to content

Commit

Permalink
net-libs/libtirpc: Sync with Gentoo
Browse files Browse the repository at this point in the history
It's from Gentoo commit 1fd13e4d6fb8ad865f249f6b723a0e5c7297c2e6.
  • Loading branch information
krnowak committed Oct 12, 2023
1 parent b54e9a6 commit cefac86
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 292 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
DIST libtirpc-1.3.2.tar.bz2 513151 BLAKE2B 375b7bb046244f4666522c4f148428349fe1867b095dc5e268d037ba26982f88df70b0ad21fbe2b99150f644806a46651b524c3b9f7fe2499469806ea50b0331 SHA512 8664d5c4f842ee5acf83b9c1cadb7871f17b8157a7c4500e2236dcfb3a25768cab39f7c5123758dcd7381e30eb028ddfa26a28f458283f2dcea3426c9878c255
DIST libtirpc-1.3.4.tar.bz2 563292 BLAKE2B 33371e83e9f54e9d6d434b75d3a95bedefce63050846483471e302b1fbb3b63a18db90b652050c43e1c6e42b03e34bafb2fb6ae89787f05af0cf747319825424 SHA512 004e61b5853717324790c46cda5ff227d525909f189194ae72a1ec8f476ca35d7f4c1f03c0fbc690c1696d60a212675b09246dbe627fdbf1a9a47f5664e82b00
DIST libtirpc-glibc-nfs.tar.xz 8948 BLAKE2B 7316623d9f2b6928e296137fe2bf6794b208d549c2ffba9e4a35b47f7b04bf023798a09f38c02d039debf6adc466d7689cf3c8274d71a22eaff08729642c0a28 SHA512 90255bf0a27af16164e0710dd940778609925d473f4343093ff19d98cc4f23023788bf4edf0178eae1961afc0ba8b69b273de95b7d7e2afdb706701d8ba6f7ba

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,47 +1,51 @@
# Copyright 1999-2022 Gentoo Authors
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7
EAPI=8

inherit multilib-minimal usr-ldscript
inherit flag-o-matic multilib-minimal toolchain-funcs usr-ldscript

DESCRIPTION="Transport Independent RPC library (SunRPC replacement)"
HOMEPAGE="https://sourceforge.net/projects/libtirpc/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2
mirror://gentoo/${PN}-glibc-nfs.tar.xz"
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
"

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"
IUSE="ipv6 kerberos static-libs"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~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 )"
DEPEND="
${RDEPEND}
elibc_musl? ( sys-libs/queue-standalone )
"
BDEPEND="
app-arch/xz-utils
virtual/pkgconfig"
virtual/pkgconfig
"

src_prepare() {
local PATCHES=(
"${FILESDIR}"/libtirpc-1.3.2-dos.patch
"${FILESDIR}"/libtirpc-1.3.2-use-after-free.patch
"${FILESDIR}"/libtirpc-1.3.2-memory-leak.patch
)
cp -r "${WORKDIR}"/tirpc "${S}"/ || die
default
cp -ra "${WORKDIR}"/tirpc "${S}"/ || die

# 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
default
}

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

local myeconfargs=(
$(use_enable ipv6)
$(use_enable kerberos gssapi)
$(use_enable static-libs static)
)

ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
}

Expand All @@ -55,7 +59,7 @@ multilib_src_install() {
multilib_src_install_all() {
einstalldocs

insinto /usr/share/tirpc
insinto /etc
doins doc/netconfig

insinto /usr/include/tirpc
Expand Down

0 comments on commit cefac86

Please sign in to comment.