1 |
commit: 1713cdefbadcab1daa9340c5fd13611d7e7454a9 |
2 |
Author: Aisha Tammy <gentoo <AT> aisha <DOT> cc> |
3 |
AuthorDate: Tue Sep 8 20:33:25 2020 +0000 |
4 |
Commit: Aisha Tammy <gentoo <AT> aisha <DOT> cc> |
5 |
CommitDate: Tue Sep 8 20:33:25 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=1713cdef |
7 |
|
8 |
net-libs/usockets: version bump |
9 |
|
10 |
Package-Manager: Portage-3.0.5, Repoman-3.0.1 |
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 | 24 ++++++----- |
15 |
net-libs/usockets/usockets-0.6.0.ebuild | 54 +++++++++++++++++++++++++ |
16 |
3 files changed, 69 insertions(+), 10 deletions(-) |
17 |
|
18 |
diff --git a/net-libs/usockets/Manifest b/net-libs/usockets/Manifest |
19 |
index 8d649f4a..af6d36e3 100644 |
20 |
--- a/net-libs/usockets/Manifest |
21 |
+++ b/net-libs/usockets/Manifest |
22 |
@@ -1 +1,2 @@ |
23 |
DIST usockets-0.5.0.tar.gz 50852 BLAKE2B 69d36f4bad6e2bf87a8b33a023678b29d2aa2feea86ccd92d02d38e9b336d9b97a0d9709b381d7b2b1a20c86964eaa9fec8d7edaa322288b232ce7c3ea84f056 SHA512 ac734c1e6f50b0485456d5b0f06d6aeb5457b2b3cc1fc2c795773a469e0bdf7223256ba252d1f9cbead10948ca47ce8bcdbabc147fc3e6be59d1a051409375bd |
24 |
+DIST usockets-0.6.0.tar.gz 57590 BLAKE2B 8438a3d2a1861d995410fcda8b888d561de2fb51af319e58c529f1113cb8e4d0f821b1649618c28d43dbc64f28b6b4e90f7e0bd51fcabc5afdc8318ca8f21448 SHA512 0803a117334d4dc38b4936e6f1d34984a9fba30da1c360c3ff3d7ce14275a4ac9c4a4e7b407791fc3661c50be6b6a8335d26f808b21d0ade5f85ab721b14a500 |
25 |
|
26 |
diff --git a/net-libs/usockets/files/usockets-Makefile.patch b/net-libs/usockets/files/usockets-Makefile.patch |
27 |
index 5a105704..c641db0b 100644 |
28 |
--- a/net-libs/usockets/files/usockets-Makefile.patch |
29 |
+++ b/net-libs/usockets/files/usockets-Makefile.patch |
30 |
@@ -1,31 +1,36 @@ |
31 |
diff --git a/Makefile b/Makefile |
32 |
-index 7d33414..6f3e53a 100644 |
33 |
+index 27f97ce..1a01539 100644 |
34 |
--- a/Makefile |
35 |
+++ b/Makefile |
36 |
@@ -1,3 +1,13 @@ |
37 |
+DESTDIR ?= |
38 |
+ |
39 |
-+prefix ?= "/usr/local" |
40 |
-+exec_prefix ?= "$(prefix)" |
41 |
-+libdir ?= "$(exec_prefix)/lib" |
42 |
-+includedir?= "$(exec_prefix)/include/uSockets" |
43 |
++prefix ?= "/usr/local" |
44 |
++exec_prefix ?= "$(prefix)" |
45 |
++libdir ?= "$(exec_prefix)/lib" |
46 |
++includedir?= "$(exec_prefix)/include/uSockets" |
47 |
+ |
48 |
+# OpenBSD specific library version |
49 |
-+LIBTARGET = libusockets.so.$(LIBusockets_VERSION) |
50 |
++LIBTARGET = libusockets.so.$(LIBusockets_VERSION) |
51 |
+ |
52 |
# WITH_OPENSSL=1 enables OpenSSL 1.1+ support or BoringSSL |
53 |
+ # For now we need to link with C++ for OpenSSL support, but should be removed with time |
54 |
ifeq ($(WITH_OPENSSL),1) |
55 |
- override CFLAGS += -DLIBUS_USE_OPENSSL |
56 |
-@@ -33,13 +43,27 @@ ifeq ($(WITH_ASAN),1) |
57 |
+@@ -34,17 +44,28 @@ ifeq ($(WITH_ASAN),1) |
58 |
endif |
59 |
|
60 |
override CFLAGS += -std=c11 -Isrc |
61 |
-override LDFLAGS += uSockets.a |
62 |
|
63 |
-# By default we build the uSockets.a static library |
64 |
++ |
65 |
default: |
66 |
rm -f *.o |
67 |
- $(CC) $(CFLAGS) -flto -O3 -c src/*.c src/eventing/*.c src/crypto/*.c |
68 |
+-# For now we do rely on C++17 for OpenSSL support but we will be porting this work to C11 |
69 |
+-ifeq ($(WITH_OPENSSL),1) |
70 |
+- $(CXX) $(CXXFLAGS) -std=c++17 -flto -O3 -c src/crypto/*.cpp |
71 |
+-endif |
72 |
- $(AR) rvs uSockets.a *.o |
73 |
+ $(CC) -fPIC -c src/*.c src/eventing/*.c src/crypto/*.c $(CFLAGS) |
74 |
+ $(AR) rvs libusockets.a *.o |
75 |
@@ -48,10 +53,9 @@ index 7d33414..6f3e53a 100644 |
76 |
|
77 |
# Builds all examples |
78 |
.PHONY: examples |
79 |
-@@ -52,4 +76,6 @@ swift_examples: |
80 |
+@@ -57,4 +78,5 @@ swift_examples: |
81 |
clean: |
82 |
rm -f *.o |
83 |
rm -f *.a |
84 |
+ rm -f *.so |
85 |
rm -rf .certs |
86 |
-+ |
87 |
|
88 |
diff --git a/net-libs/usockets/usockets-0.6.0.ebuild b/net-libs/usockets/usockets-0.6.0.ebuild |
89 |
new file mode 100644 |
90 |
index 00000000..07f68285 |
91 |
--- /dev/null |
92 |
+++ b/net-libs/usockets/usockets-0.6.0.ebuild |
93 |
@@ -0,0 +1,54 @@ |
94 |
+# Copyright 2019-2020 Gentoo Authors |
95 |
+# Distributed under the terms of the GNU General Public License v2 |
96 |
+ |
97 |
+EAPI=7 |
98 |
+ |
99 |
+inherit multilib |
100 |
+ |
101 |
+DESCRIPTION="tiny eventing, networking & crypto for async applications" |
102 |
+HOMEPAGE="https://github.com/uNetworking/uSockets" |
103 |
+ |
104 |
+if [[ ${PV} == 9999 ]]; then |
105 |
+ inherit git-r3 |
106 |
+ EGIT_REPO_URI="https://github.com/uNetworking/uSockets.git" |
107 |
+else |
108 |
+ SRC_URI="https://github.com/uNetworking/uSockets/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
109 |
+ KEYWORDS="~amd64 ~arm64 ~x86" |
110 |
+ S="${WORKDIR}/uSockets-${PV}" |
111 |
+fi |
112 |
+ |
113 |
+LICENSE="Apache-2.0" |
114 |
+SLOT="0" |
115 |
+IUSE="libuv +ssl libressl static-libs" |
116 |
+ |
117 |
+DEPEND="ssl? ( |
118 |
+ libressl? ( >=dev-libs/libressl-3.0.0:=[static-libs?] ) |
119 |
+ !libressl? ( >=dev-libs/openssl-1.1.0:=[static-libs?] ) |
120 |
+ ) |
121 |
+ libuv? ( dev-libs/libuv[static-libs?] ) |
122 |
+" |
123 |
+RDEPEND="${DEPEND}" |
124 |
+ |
125 |
+PATCHES=( |
126 |
+ "${FILESDIR}/usockets-Makefile.patch" |
127 |
+) |
128 |
+ |
129 |
+src_compile() { |
130 |
+ # the Makefile uses environment variables |
131 |
+ emake LIBusockets_VERSION=${PV} \ |
132 |
+ WITH_OPENSSL=$(usex ssl 1 0) \ |
133 |
+ WITH_LIBUV=$(usex libuv 1 0) \ |
134 |
+ default |
135 |
+} |
136 |
+ |
137 |
+src_install() { |
138 |
+ emake libdir="/usr/$(get_libdir)" \ |
139 |
+ prefix="/usr" \ |
140 |
+ DESTDIR="${D}" \ |
141 |
+ LIBusockets_VERSION=${PV} \ |
142 |
+ install |
143 |
+ einstalldocs |
144 |
+ if ! use static-libs; then |
145 |
+ rm "${D}/usr/$(get_libdir)/libusockets.a" || die |
146 |
+ fi |
147 |
+} |