1 |
commit: 81052c9a262f68e6d9898e54fc35678cc8b2e822 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jan 7 19:52:26 2020 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jan 7 19:52:36 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=81052c9a |
7 |
|
8 |
net-libs/rpcsvc-proto: use external libintl where needed, bug #637084 |
9 |
|
10 |
Reported-by: Anton |
11 |
Closes: https://bugs.gentoo.org/637084 |
12 |
Package-Manager: Portage-2.3.84, Repoman-2.3.20 |
13 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
14 |
|
15 |
.../files/rpcsvc-proto-1.4-external-libintl.patch | 47 ++++++++++++++++++++++ |
16 |
net-libs/rpcsvc-proto/rpcsvc-proto-1.4-r1.ebuild | 36 +++++++++++++++++ |
17 |
2 files changed, 83 insertions(+) |
18 |
|
19 |
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 |
20 |
new file mode 100644 |
21 |
index 00000000000..a5088735bbb |
22 |
--- /dev/null |
23 |
+++ b/net-libs/rpcsvc-proto/files/rpcsvc-proto-1.4-external-libintl.patch |
24 |
@@ -0,0 +1,47 @@ |
25 |
+From 2527c37f956aa38408e251587556a6c8389af319 Mon Sep 17 00:00:00 2001 |
26 |
+From: Sergei Trofimovich <slyfox@g.o> |
27 |
+Date: Sun, 29 Dec 2019 23:38:28 +0000 |
28 |
+Subject: [PATCH] configure.ac: autodetect need for external libintl |
29 |
+ |
30 |
+uclibc-ng and macos standard libraries don't provide libintl |
31 |
+facilities. As a result build fails as |
32 |
+(x86_64-gentoo-linux-uclibc example): |
33 |
+ |
34 |
+``` |
35 |
+... |
36 |
+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 |
37 |
+/usr/lib/gcc/x86_64-gentoo-linux-uclibc/9.2.0/../../../../x86_64-gentoo-linux-uclibc/bin/ld: rpc_main.o: in function `usage': |
38 |
+/root/rpcsvc-proto/rpcgen/rpc_main.c:1403: undefined reference to `libintl_gettext' |
39 |
+/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' |
40 |
+... |
41 |
+``` |
42 |
+ |
43 |
+The change is simple: add gettext m4 macros to detect need |
44 |
+for libintl and link to an external library if needed. |
45 |
+ |
46 |
+Tested on x86_64-glibc and x86_64-uclibc-ng. |
47 |
+ |
48 |
+Reported-by: Anton |
49 |
+Bug: https://bugs.gentoo.org/637084 |
50 |
+Signed-off-by: Sergei Trofimovich <slyfox@g.o> |
51 |
+ |
52 |
+--- a/configure.ac |
53 |
++++ b/configure.ac |
54 |
+@@ -16,4 +16,7 @@ AC_ISC_POSIX |
55 |
+ AC_PROG_INSTALL |
56 |
+ AC_PROG_MAKE_SET |
57 |
+ |
58 |
++AM_GNU_GETTEXT([external]) |
59 |
++AM_GNU_GETTEXT_VERSION([0.18.1]) |
60 |
++ |
61 |
+ AC_OUTPUT([Makefile rpcgen/Makefile rpcsvc/Makefile]) |
62 |
+--- a/rpcgen/Makefile.am |
63 |
++++ b/rpcgen/Makefile.am |
64 |
+@@ -10,3 +10,4 @@ noinst_HEADERS = proto.h rpc_parse.h rpc_scan.h rpc_util.h |
65 |
+ rpcgen_SOURCES = rpc_clntout.c rpc_cout.c rpc_hout.c rpc_main.c \ |
66 |
+ rpc_parse.c rpc_sample.c rpc_scan.c rpc_svcout.c rpc_tblout.c \ |
67 |
+ rpc_util.c |
68 |
++rpcgen_LDADD = $(LIBINTL) |
69 |
+-- |
70 |
+2.24.1 |
71 |
+ |
72 |
|
73 |
diff --git a/net-libs/rpcsvc-proto/rpcsvc-proto-1.4-r1.ebuild b/net-libs/rpcsvc-proto/rpcsvc-proto-1.4-r1.ebuild |
74 |
new file mode 100644 |
75 |
index 00000000000..7a8ead0d69d |
76 |
--- /dev/null |
77 |
+++ b/net-libs/rpcsvc-proto/rpcsvc-proto-1.4-r1.ebuild |
78 |
@@ -0,0 +1,36 @@ |
79 |
+# Copyright 1999-2020 Gentoo Authors |
80 |
+# Distributed under the terms of the GNU General Public License v2 |
81 |
+ |
82 |
+EAPI=7 |
83 |
+ |
84 |
+inherit autotools |
85 |
+ |
86 |
+DESCRIPTION="rpcsvc protocol definitions from glibc" |
87 |
+HOMEPAGE="https://github.com/thkukuk/rpcsvc-proto" |
88 |
+SRC_URI="https://github.com/thkukuk/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
89 |
+ |
90 |
+SLOT="0" |
91 |
+LICENSE="LGPL-2.1+ BSD" |
92 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86" |
93 |
+IUSE="" |
94 |
+ |
95 |
+# sys-devel/gettext is only for libintl detection macros. |
96 |
+DEPEND="sys-devel/gettext" |
97 |
+RDEPEND=" |
98 |
+ !<sys-libs/glibc-2.26 |
99 |
+ virtual/libintl |
100 |
+" |
101 |
+ |
102 |
+PATCHES=("${FILESDIR}"/${P}-external-libintl.patch) |
103 |
+ |
104 |
+src_prepare(){ |
105 |
+ default |
106 |
+ eautoreconf |
107 |
+} |
108 |
+ |
109 |
+src_install(){ |
110 |
+ default |
111 |
+ |
112 |
+ # provided by sys-fs/quota[rpc] |
113 |
+ rm "${ED}"/usr/include/rpcsvc/rquota.{x,h} || die |
114 |
+} |