Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@××××××.net>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:master commit in: net-libs/usockets/files/, net-libs/usockets/
Date: Thu, 30 Jul 2020 16:16:43
Message-Id: 1596026665.76c4834856ed8b49748d7f2bcc844eb79d41b09e.andrewammerlaan@gentoo
1 commit: 76c4834856ed8b49748d7f2bcc844eb79d41b09e
2 Author: Aisha Tammy <gentoo <AT> aisha <DOT> cc>
3 AuthorDate: Wed Jul 29 12:37:17 2020 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
5 CommitDate: Wed Jul 29 12:44:25 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=76c48348
7
8 net-libs/usockets: update to 0.5.0
9
10 Package-Manager: Portage-2.3.103, Repoman-2.3.23
11 Signed-off-by: Aisha Tammy <gentoo <AT> aisha.cc>
12
13 net-libs/usockets/Manifest | 1 +
14 net-libs/usockets/files/usockets-Makefile.patch | 12 +++---
15 net-libs/usockets/usockets-0.5.0.ebuild | 54 +++++++++++++++++++++++++
16 3 files changed, 61 insertions(+), 6 deletions(-)
17
18 diff --git a/net-libs/usockets/Manifest b/net-libs/usockets/Manifest
19 index 26023b0..57d722f 100644
20 --- a/net-libs/usockets/Manifest
21 +++ b/net-libs/usockets/Manifest
22 @@ -1 +1,2 @@
23 DIST usockets-0.4.1.tar.gz 49955 BLAKE2B 581b5745c4b1562fe21ac81736ebc6db95ed9e25a47e3124fa4dbc25978cde9f901a651cbc99128952282407f506900cae79a59bb1aab8d5e951e114d1f8f3b7 SHA512 2fbb37e0d3768c4b79b100132edd4aea65c7483186394d9dd5729385031e257ebe7ba04e53cb67f796edbc035074268920a1fdb11be79a74cb83799a7b61f7c0
24 +DIST usockets-0.5.0.tar.gz 50852 BLAKE2B 69d36f4bad6e2bf87a8b33a023678b29d2aa2feea86ccd92d02d38e9b336d9b97a0d9709b381d7b2b1a20c86964eaa9fec8d7edaa322288b232ce7c3ea84f056 SHA512 ac734c1e6f50b0485456d5b0f06d6aeb5457b2b3cc1fc2c795773a469e0bdf7223256ba252d1f9cbead10948ca47ce8bcdbabc147fc3e6be59d1a051409375bd
25
26 diff --git a/net-libs/usockets/files/usockets-Makefile.patch b/net-libs/usockets/files/usockets-Makefile.patch
27 index 5be09ee..5a10570 100644
28 --- a/net-libs/usockets/files/usockets-Makefile.patch
29 +++ b/net-libs/usockets/files/usockets-Makefile.patch
30 @@ -1,8 +1,8 @@
31 diff --git a/Makefile b/Makefile
32 -index fa6e2ff..ca2603f 100644
33 +index 7d33414..6f3e53a 100644
34 --- a/Makefile
35 +++ b/Makefile
36 -@@ -1,3 +1,14 @@
37 +@@ -1,3 +1,13 @@
38 +DESTDIR ?=
39 +
40 +prefix ?= "/usr/local"
41 @@ -13,11 +13,10 @@ index fa6e2ff..ca2603f 100644
42 +# OpenBSD specific library version
43 +LIBTARGET = libusockets.so.$(LIBusockets_VERSION)
44 +
45 -+
46 - # WITH_OPENSSL=1 enables OpenSSL 1.1+ support
47 + # WITH_OPENSSL=1 enables OpenSSL 1.1+ support or BoringSSL
48 ifeq ($(WITH_OPENSSL),1)
49 override CFLAGS += -DLIBUS_USE_OPENSSL
50 -@@ -33,13 +44,27 @@ ifeq ($(WITH_ASAN),1)
51 +@@ -33,13 +43,27 @@ ifeq ($(WITH_ASAN),1)
52 endif
53
54 override CFLAGS += -std=c11 -Isrc
55 @@ -49,9 +48,10 @@ index fa6e2ff..ca2603f 100644
56
57 # Builds all examples
58 .PHONY: examples
59 -@@ -52,4 +77,5 @@ swift_examples:
60 +@@ -52,4 +76,6 @@ swift_examples:
61 clean:
62 rm -f *.o
63 rm -f *.a
64 + rm -f *.so
65 rm -rf .certs
66 ++
67
68 diff --git a/net-libs/usockets/usockets-0.5.0.ebuild b/net-libs/usockets/usockets-0.5.0.ebuild
69 new file mode 100644
70 index 0000000..07f6828
71 --- /dev/null
72 +++ b/net-libs/usockets/usockets-0.5.0.ebuild
73 @@ -0,0 +1,54 @@
74 +# Copyright 2019-2020 Gentoo Authors
75 +# Distributed under the terms of the GNU General Public License v2
76 +
77 +EAPI=7
78 +
79 +inherit multilib
80 +
81 +DESCRIPTION="tiny eventing, networking & crypto for async applications"
82 +HOMEPAGE="https://github.com/uNetworking/uSockets"
83 +
84 +if [[ ${PV} == 9999 ]]; then
85 + inherit git-r3
86 + EGIT_REPO_URI="https://github.com/uNetworking/uSockets.git"
87 +else
88 + SRC_URI="https://github.com/uNetworking/uSockets/archive/v${PV}.tar.gz -> ${P}.tar.gz"
89 + KEYWORDS="~amd64 ~arm64 ~x86"
90 + S="${WORKDIR}/uSockets-${PV}"
91 +fi
92 +
93 +LICENSE="Apache-2.0"
94 +SLOT="0"
95 +IUSE="libuv +ssl libressl static-libs"
96 +
97 +DEPEND="ssl? (
98 + libressl? ( >=dev-libs/libressl-3.0.0:=[static-libs?] )
99 + !libressl? ( >=dev-libs/openssl-1.1.0:=[static-libs?] )
100 + )
101 + libuv? ( dev-libs/libuv[static-libs?] )
102 +"
103 +RDEPEND="${DEPEND}"
104 +
105 +PATCHES=(
106 + "${FILESDIR}/usockets-Makefile.patch"
107 +)
108 +
109 +src_compile() {
110 + # the Makefile uses environment variables
111 + emake LIBusockets_VERSION=${PV} \
112 + WITH_OPENSSL=$(usex ssl 1 0) \
113 + WITH_LIBUV=$(usex libuv 1 0) \
114 + default
115 +}
116 +
117 +src_install() {
118 + emake libdir="/usr/$(get_libdir)" \
119 + prefix="/usr" \
120 + DESTDIR="${D}" \
121 + LIBusockets_VERSION=${PV} \
122 + install
123 + einstalldocs
124 + if ! use static-libs; then
125 + rm "${D}/usr/$(get_libdir)/libusockets.a" || die
126 + fi
127 +}