1 |
commit: 367bd1fba654a886557adf29a6afeba97ac1f8df |
2 |
Author: Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr> |
3 |
AuthorDate: Wed Apr 21 12:06:15 2021 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun May 2 22:58:45 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=367bd1fb |
7 |
|
8 |
dev-libs/libuv: Bump to 1.41.0 |
9 |
|
10 |
* Re-enable test suite |
11 |
* Drop static-libs support |
12 |
* Add live ebuild template |
13 |
|
14 |
Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr> |
15 |
Closes: https://github.com/gentoo/gentoo/pull/20487 |
16 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
17 |
|
18 |
dev-libs/libuv/Manifest | 1 + |
19 |
dev-libs/libuv/files/libuv-1.41.0-darwin.patch | 45 ++++++++++++++++++++ |
20 |
dev-libs/libuv/libuv-1.41.0.ebuild | 58 ++++++++++++++++++++++++++ |
21 |
3 files changed, 104 insertions(+) |
22 |
|
23 |
diff --git a/dev-libs/libuv/Manifest b/dev-libs/libuv/Manifest |
24 |
index 02d820c979e..8d0210f2fd5 100644 |
25 |
--- a/dev-libs/libuv/Manifest |
26 |
+++ b/dev-libs/libuv/Manifest |
27 |
@@ -1 +1,2 @@ |
28 |
DIST libuv-1.40.0.tar.gz 1274587 BLAKE2B 91d0e64a92be5686c0da3c4ad35fa52351012434a2a23db3fd91c26fc8e7b42d20d183a861feb876e2b5ab43e45ab59e720299f622a79c6bbdc6350b4b9e6e3d SHA512 14a6880e636e9d046e1f4c86061d7ca5fe0cdae0efb0c6fec6b6ad03b17c626da479d6cc1ae84da281ec04a75e0d56fa99ef25164432cdb246cf59f0964a7e8b |
29 |
+DIST libuv-1.41.0.tar.gz 1281268 BLAKE2B 6d6fef33953c4d03835adfdd66e9a44c61071440ceeea48d88bcf6593e2a35c7d0878369c87b38a92f66ead2ab0f799d4b7476ced3707ca7f41e39f93875bdc4 SHA512 bb08a1970a10e8d9571ffea3d021643de30ec212cd51317b98d6cf0cfe55d6877992921fb01d1188a6d466687335b77885685d924f8cb7200a0bec30eee05c65 |
30 |
|
31 |
diff --git a/dev-libs/libuv/files/libuv-1.41.0-darwin.patch b/dev-libs/libuv/files/libuv-1.41.0-darwin.patch |
32 |
new file mode 100644 |
33 |
index 00000000000..a2b02d7b34f |
34 |
--- /dev/null |
35 |
+++ b/dev-libs/libuv/files/libuv-1.41.0-darwin.patch |
36 |
@@ -0,0 +1,45 @@ |
37 |
+--- a/src/unix/darwin-proctitle.c |
38 |
++++ b/src/unix/darwin-proctitle.c |
39 |
+@@ -41,7 +41,7 @@ static int uv__pthread_setname_np(const char* name) { |
40 |
+ strncpy(namebuf, name, sizeof(namebuf) - 1); |
41 |
+ namebuf[sizeof(namebuf) - 1] = '\0'; |
42 |
+ |
43 |
+- err = pthread_setname_np(namebuf); |
44 |
++ err = 0; |
45 |
+ if (err) |
46 |
+ return UV__ERR(err); |
47 |
+ |
48 |
+--- a/src/unix/getaddrinfo.c |
49 |
++++ b/src/unix/getaddrinfo.c |
50 |
+@@ -225,6 +225,13 @@ void uv_freeaddrinfo(struct addrinfo* ai) { |
51 |
+ freeaddrinfo(ai); |
52 |
+ } |
53 |
+ |
54 |
++static size_t strnlen(char *x, size_t len) { |
55 |
++ char *r = memchr(x, '\n', len); |
56 |
++ if (r == NULL) |
57 |
++ return len; |
58 |
++ else |
59 |
++ return r - x; |
60 |
++} |
61 |
+ |
62 |
+ int uv_if_indextoname(unsigned int ifindex, char* buffer, size_t* size) { |
63 |
+ char ifname_buf[UV_IF_NAMESIZE]; |
64 |
+--- a/src/unix/udp.c |
65 |
++++ b/src/unix/udp.c |
66 |
+@@ -854,6 +854,7 @@ static int uv__udp_set_membership6(uv_udp_t* handle, |
67 |
+ #if !defined(__OpenBSD__) && \ |
68 |
+ !defined(__NetBSD__) && \ |
69 |
+ !defined(__ANDROID__) && \ |
70 |
++ !defined(__APPLE__) && \ |
71 |
+ !defined(__DragonFly__) & \ |
72 |
+ !defined(__QNX__) |
73 |
+ static int uv__udp_set_source_membership4(uv_udp_t* handle, |
74 |
+@@ -1046,6 +1047,7 @@ int uv_udp_set_source_membership(uv_udp_t* handle, |
75 |
+ #if !defined(__OpenBSD__) && \ |
76 |
+ !defined(__NetBSD__) && \ |
77 |
+ !defined(__ANDROID__) && \ |
78 |
++ !defined(__APPLE__) && \ |
79 |
+ !defined(__DragonFly__) && \ |
80 |
+ !defined(__QNX__) |
81 |
+ int err; |
82 |
|
83 |
diff --git a/dev-libs/libuv/libuv-1.41.0.ebuild b/dev-libs/libuv/libuv-1.41.0.ebuild |
84 |
new file mode 100644 |
85 |
index 00000000000..f1d10ed56e9 |
86 |
--- /dev/null |
87 |
+++ b/dev-libs/libuv/libuv-1.41.0.ebuild |
88 |
@@ -0,0 +1,58 @@ |
89 |
+# Copyright 1999-2021 Gentoo Authors |
90 |
+# Distributed under the terms of the GNU General Public License v2 |
91 |
+ |
92 |
+EAPI=7 |
93 |
+ |
94 |
+inherit autotools multilib-minimal |
95 |
+ |
96 |
+DESCRIPTION="Cross-platform asychronous I/O" |
97 |
+HOMEPAGE="https://github.com/libuv/libuv" |
98 |
+ |
99 |
+if [[ ${PV} = 9999* ]]; then |
100 |
+ EGIT_REPO_URI="https://github.com/libuv/libuv.git" |
101 |
+ inherit git-r3 |
102 |
+else |
103 |
+ SRC_URI="https://github.com/libuv/libuv/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
104 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
105 |
+fi |
106 |
+ |
107 |
+LICENSE="BSD BSD-2 ISC MIT" |
108 |
+SLOT="0/1" |
109 |
+ |
110 |
+BDEPEND=" |
111 |
+ sys-devel/libtool |
112 |
+ virtual/pkgconfig |
113 |
+" |
114 |
+ |
115 |
+src_prepare() { |
116 |
+ default |
117 |
+ |
118 |
+ echo "m4_define([UV_EXTRA_AUTOMAKE_FLAGS], [serial-tests])" \ |
119 |
+ > m4/libuv-extra-automake-flags.m4 || die |
120 |
+ |
121 |
+ if [[ ${CHOST} == *-darwin* && ${CHOST##*darwin} -le 9 ]] ; then |
122 |
+ eapply "${FILESDIR}"/${PN}-1.41.0-darwin.patch |
123 |
+ fi |
124 |
+ |
125 |
+ # upstream fails to ship a configure script |
126 |
+ eautoreconf |
127 |
+} |
128 |
+ |
129 |
+multilib_src_configure() { |
130 |
+ local myeconfargs=( |
131 |
+ --disable-static |
132 |
+ cc_cv_cflags__g=no |
133 |
+ ) |
134 |
+ |
135 |
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" |
136 |
+} |
137 |
+ |
138 |
+multilib_src_test() { |
139 |
+ cp -pPR "${S}"/test/fixtures "${BUILD_DIR}"/test/fixtures || die |
140 |
+ default |
141 |
+} |
142 |
+ |
143 |
+multilib_src_install_all() { |
144 |
+ einstalldocs |
145 |
+ find "${ED}" -name '*.la' -delete || die |
146 |
+} |