diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2020-01-07 19:52:26 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2020-01-07 19:52:36 +0000 |
commit | 81052c9a262f68e6d9898e54fc35678cc8b2e822 (patch) | |
tree | 31646e9adcfeb656c1788db7ff5ce3bb1770fcfc /net-libs/rpcsvc-proto | |
parent | sys-libs/e2fsprogs-libs: Removed old (diff) | |
download | gentoo-81052c9a262f68e6d9898e54fc35678cc8b2e822.tar.gz gentoo-81052c9a262f68e6d9898e54fc35678cc8b2e822.tar.bz2 gentoo-81052c9a262f68e6d9898e54fc35678cc8b2e822.zip |
net-libs/rpcsvc-proto: use external libintl where needed, bug #637084
Reported-by: Anton
Closes: https://bugs.gentoo.org/637084
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'net-libs/rpcsvc-proto')
-rw-r--r-- | net-libs/rpcsvc-proto/files/rpcsvc-proto-1.4-external-libintl.patch | 47 | ||||
-rw-r--r-- | net-libs/rpcsvc-proto/rpcsvc-proto-1.4-r1.ebuild | 36 |
2 files changed, 83 insertions, 0 deletions
diff --git a/net-libs/rpcsvc-proto/files/rpcsvc-proto-1.4-external-libintl.patch b/net-libs/rpcsvc-proto/files/rpcsvc-proto-1.4-external-libintl.patch new file mode 100644 index 000000000000..a5088735bbb1 --- /dev/null +++ b/net-libs/rpcsvc-proto/files/rpcsvc-proto-1.4-external-libintl.patch @@ -0,0 +1,47 @@ +From 2527c37f956aa38408e251587556a6c8389af319 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich <slyfox@gentoo.org> +Date: Sun, 29 Dec 2019 23:38:28 +0000 +Subject: [PATCH] configure.ac: autodetect need for external libintl + +uclibc-ng and macos standard libraries don't provide libintl +facilities. As a result build fails as +(x86_64-gentoo-linux-uclibc example): + +``` +... +gcc -g -O2 -o rpcgen rpc_clntout.o rpc_cout.o rpc_hout.o rpc_main.o rpc_parse.o rpc_sample.o rpc_scan.o rpc_svcout.o rpc_tblout.o rpc_util.o +/usr/lib/gcc/x86_64-gentoo-linux-uclibc/9.2.0/../../../../x86_64-gentoo-linux-uclibc/bin/ld: rpc_main.o: in function `usage': +/root/rpcsvc-proto/rpcgen/rpc_main.c:1403: undefined reference to `libintl_gettext' +/usr/lib/gcc/x86_64-gentoo-linux-uclibc/9.2.0/../../../../x86_64-gentoo-linux-uclibc/bin/ld: /root/rpcsvc-proto/rpcgen/rpc_main.c:1404: undefined reference to `libintl_gettext' +... +``` + +The change is simple: add gettext m4 macros to detect need +for libintl and link to an external library if needed. + +Tested on x86_64-glibc and x86_64-uclibc-ng. + +Reported-by: Anton +Bug: https://bugs.gentoo.org/637084 +Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> + +--- a/configure.ac ++++ b/configure.ac +@@ -16,4 +16,7 @@ AC_ISC_POSIX + AC_PROG_INSTALL + AC_PROG_MAKE_SET + ++AM_GNU_GETTEXT([external]) ++AM_GNU_GETTEXT_VERSION([0.18.1]) ++ + AC_OUTPUT([Makefile rpcgen/Makefile rpcsvc/Makefile]) +--- a/rpcgen/Makefile.am ++++ b/rpcgen/Makefile.am +@@ -10,3 +10,4 @@ noinst_HEADERS = proto.h rpc_parse.h rpc_scan.h rpc_util.h + rpcgen_SOURCES = rpc_clntout.c rpc_cout.c rpc_hout.c rpc_main.c \ + rpc_parse.c rpc_sample.c rpc_scan.c rpc_svcout.c rpc_tblout.c \ + rpc_util.c ++rpcgen_LDADD = $(LIBINTL) +-- +2.24.1 + diff --git a/net-libs/rpcsvc-proto/rpcsvc-proto-1.4-r1.ebuild b/net-libs/rpcsvc-proto/rpcsvc-proto-1.4-r1.ebuild new file mode 100644 index 000000000000..7a8ead0d69d7 --- /dev/null +++ b/net-libs/rpcsvc-proto/rpcsvc-proto-1.4-r1.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +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 ~riscv ~s390 ~sh ~sparc ~x86" +IUSE="" + +# sys-devel/gettext is only for libintl detection macros. +DEPEND="sys-devel/gettext" +RDEPEND=" + !<sys-libs/glibc-2.26 + virtual/libintl +" + +PATCHES=("${FILESDIR}"/${P}-external-libintl.patch) + +src_prepare(){ + default + eautoreconf +} + +src_install(){ + default + + # provided by sys-fs/quota[rpc] + rm "${ED}"/usr/include/rpcsvc/rquota.{x,h} || die +} |