net-libs/rpcsvc-proto: Drop obsolete preprocessor conditional (#650852)
authorPacho Ramos <pacho@gentoo.org>
Sun, 15 Apr 2018 12:45:39 +0000 (14:45 +0200)
committerPacho Ramos <pacho@gentoo.org>
Sun, 15 Apr 2018 12:46:03 +0000 (14:46 +0200)
Package-Manager: Portage-2.3.28, Repoman-2.3.9

net-libs/rpcsvc-proto/files/rpcsvc-proto-1.3.1-old-preprocessor.patch [new file with mode: 0644]
net-libs/rpcsvc-proto/rpcsvc-proto-1.3.1-r1.ebuild [new file with mode: 0644]

diff --git a/net-libs/rpcsvc-proto/files/rpcsvc-proto-1.3.1-old-preprocessor.patch b/net-libs/rpcsvc-proto/files/rpcsvc-proto-1.3.1-old-preprocessor.patch
new file mode 100644 (file)
index 0000000..5d77786
--- /dev/null
@@ -0,0 +1,31 @@
+From ce0ed4f45918f9230db435ee3b733090fa4f9620 Mon Sep 17 00:00:00 2001
+From: Florian Weimer <fweimer@redhat.com>
+Date: Tue, 27 Mar 2018 12:08:30 +0200
+Subject: [PATCH] Remove historic _RPC_THREAD_SAFE_ preprocessor conditional
+
+When the code was imported from glibc, the -D_RPC_THREAD_SAFE_
+build flag was missed.
+---
+ rpcgen/rpc_main.c | 9 ---------
+ 1 file changed, 9 deletions(-)
+
+diff --git a/rpcgen/rpc_main.c b/rpcgen/rpc_main.c
+index 94bd818..1b26e52 100644
+--- a/rpcgen/rpc_main.c
++++ b/rpcgen/rpc_main.c
+@@ -1346,15 +1346,6 @@ parseargs (int argc, const char *argv[], struct commandline *cmd)
+   cmd->Scflag = flag['C'];
+   cmd->makefileflag = flag['M'];
+-#ifndef _RPC_THREAD_SAFE_
+-  if (mtflag || newstyle)
+-    {
+-      /* glibc doesn't support these flags.  */
+-      f_print (stderr,
+-             _("This implementation doesn't support newstyle or MT-safe code!\n"));
+-      return (0);
+-    }
+-#endif
+   if (tirpcflag)
+     {
+       pmflag = inetdflag ? 0 : 1;    /* pmflag or inetdflag is always TRUE */
diff --git a/net-libs/rpcsvc-proto/rpcsvc-proto-1.3.1-r1.ebuild b/net-libs/rpcsvc-proto/rpcsvc-proto-1.3.1-r1.ebuild
new file mode 100644 (file)
index 0000000..414a3aa
--- /dev/null
@@ -0,0 +1,30 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools
+
+DESCRIPTION="rpcsvc protocol definitions from glibc"
+HOMEPAGE="https://github.com/thkukuk/rpcsvc-proto"
+SRC_URI="https://github.com/thkukuk/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+SLOT="0"
+LICENSE="LGPL-2.1+ BSD"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE=""
+
+RDEPEND="!<sys-libs/glibc-2.26"
+
+src_prepare(){
+       default
+       eapply "${FILESDIR}"/${P}-old-preprocessor.patch #650852
+       eautoreconf
+}
+
+src_install(){
+       default
+
+       # provided by sys-fs/quota[rpc]
+       rm "${ED%/}"/usr/include/rpcsvc/rquota.{x,h} || die
+}