Diff libuv-1.40.0 with a libuv-9999

/usr/portage/dev-libs/libuv/libuv-9999.ebuild 2021-05-03 02:09:00.000000000 +0300
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4 4
EAPI=7
5

  
5 6
inherit autotools multilib-minimal
6 7

  
7 8
DESCRIPTION="Cross-platform asychronous I/O"
8 9
HOMEPAGE="https://github.com/libuv/libuv"
9
SRC_URI="https://github.com/libuv/libuv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
10

  
11
if [[ ${PV} = 9999* ]]; then
12
	EGIT_REPO_URI="https://github.com/libuv/libuv.git"
13
	inherit git-r3
14
else
15
	SRC_URI="https://github.com/libuv/libuv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
16
	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"
17
fi
10 18

  
11 19
LICENSE="BSD BSD-2 ISC MIT"
12 20
SLOT="0/1"
13
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"
14
IUSE="static-libs"
15
RESTRICT="test"
16 21

  
17 22
BDEPEND="
18 23
	sys-devel/libtool
......
26 31
		> m4/libuv-extra-automake-flags.m4 || die
27 32

  
28 33
	if [[ ${CHOST} == *-darwin* && ${CHOST##*darwin} -le 9 ]] ; then
29
		sed -i -e '/!defined(__DragonFly__)/i!defined(__APPLE__) && \\' \
30
			src/unix/udp.c || die
31
		sed -i -e '/err = pthread_setname_np/cerr = 0;' \
32
			src/unix/darwin-proctitle.c || die
33
		sed -i -e '/int uv_if_indextoname/i\
34
		static size_t strnlen(char *x, size_t len) {\
35
			char *r = memchr(x, '"'"'\\n'"'"', len);\
36
			if (r == NULL)\
37
				return len;\
38
			else\
39
				return r - x;\
40
		}' \
41
			src/unix/getaddrinfo.c || die
34
		eapply "${FILESDIR}"/${PN}-1.41.0-darwin.patch
42 35
	fi
43 36

  
44 37
	# upstream fails to ship a configure script
......
47 40

  
48 41
multilib_src_configure() {
49 42
	local myeconfargs=(
43
		--disable-static
50 44
		cc_cv_cflags__g=no
51
		$(use_enable static-libs static)
52 45
	)
46

  
53 47
	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
54 48
}
55 49

  
56 50
multilib_src_test() {
57
	mkdir "${BUILD_DIR}"/test || die
58 51
	cp -pPR "${S}"/test/fixtures "${BUILD_DIR}"/test/fixtures || die
59 52
	default
60 53
}
61 54

  
62 55
multilib_src_install_all() {
63 56
	einstalldocs
64
	find "${D}" -name '*.la' -delete || die
57
	find "${ED}" -name '*.la' -delete || die
65 58
}
Thank you!