Gentoo Archives: gentoo-commits

From: Aisha Tammy <gentoo@×××××.cc>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: net-libs/usockets/files/, net-libs/usockets/
Date: Thu, 09 Sep 2021 16:14:47
Message-Id: 1631203992.23815a296438a9a87459b086bafcfed6d66e696d.epsilon-0@gentoo
1 commit: 23815a296438a9a87459b086bafcfed6d66e696d
2 Author: Aisha Tammy <gentoo <AT> aisha <DOT> cc>
3 AuthorDate: Thu Sep 9 16:13:12 2021 +0000
4 Commit: Aisha Tammy <gentoo <AT> aisha <DOT> cc>
5 CommitDate: Thu Sep 9 16:13:12 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=23815a29
7
8 net-libs/usockets: drop old version
9
10 Package-Manager: Portage-3.0.18, Repoman-3.0.3
11 Signed-off-by: Aisha Tammy <gentoo <AT> aisha.cc>
12
13 net-libs/usockets/Manifest | 1 -
14 .../usockets/files/usockets-0.7.1-Makefile.patch | 124 ---------------------
15 .../usockets/usockets-0.7.1_p20210214-r2.ebuild | 48 --------
16 3 files changed, 173 deletions(-)
17
18 diff --git a/net-libs/usockets/Manifest b/net-libs/usockets/Manifest
19 index 7f03a5189..84b397210 100644
20 --- a/net-libs/usockets/Manifest
21 +++ b/net-libs/usockets/Manifest
22 @@ -1,2 +1 @@
23 -DIST usockets-0.7.1_p20210214.tar.gz 62372 BLAKE2B 2853792af6f86954d7920cd33936ddd586cdeb9149dbffd0687b3bbc0965526d28c363864398d17182df9e038c35dc384271f01e72f7a60189319b9e820de3cb SHA512 d4827982a288c81edfcb167cfa6ee8fe11bbae90d25ed9086c006cf6098dfad8b6b910f8fb93ecc67fbea76452627dd4666c7ae3d74fb20112f8e22f7091ec11
24 DIST usockets-0.7.1_p20210909.tar.gz 65495 BLAKE2B 23aeb6ec3c330926aa375f0dedf4eb0e63f89fd833145cc3af47936de8ffa2139273710eee7019c2f5c12d7715746a38a6b64a3e48a349a2893599116ca623d8 SHA512 29bac37a75172cdb2881b27d142972a235470e8e0ec85e98c1bfd5f587ab1f777001e69a57bfc46b87a74bf73f4a166300e42e9f0ed908810bcf5c46290abdce
25
26 diff --git a/net-libs/usockets/files/usockets-0.7.1-Makefile.patch b/net-libs/usockets/files/usockets-0.7.1-Makefile.patch
27 deleted file mode 100644
28 index 2d3a47d29..000000000
29 --- a/net-libs/usockets/files/usockets-0.7.1-Makefile.patch
30 +++ /dev/null
31 @@ -1,124 +0,0 @@
32 -diff --git a/Makefile b/Makefile
33 -index 9b54cac..a610bcc 100644
34 ---- a/Makefile
35 -+++ b/Makefile
36 -@@ -1,60 +1,59 @@
37 -+DESTDIR ?=
38 -+
39 -+prefix ?= /usr
40 -+exec_prefix ?= $(prefix)
41 -+LIB ?= lib
42 -+libdir ?= $(exec_prefix)/$(LIB)
43 -+includedir ?= $(exec_prefix)/include
44 -+
45 -+PKG_CONFIG ?= pkg-config
46 -+
47 -+VERSION ?= 0.0
48 -+LIBTARGET = libusockets.so.$(VERSION)
49 -+
50 -+REQUIRES =
51 -+COMMON_FLAGS = -Isrc
52 -+
53 - # WITH_OPENSSL=1 enables OpenSSL 1.1+ support or BoringSSL
54 - # For now we need to link with C++ for OpenSSL support, but should be removed with time
55 - ifeq ($(WITH_OPENSSL),1)
56 -- override CFLAGS += -DLIBUS_USE_OPENSSL
57 -- # With problems on macOS, make sure to pass needed LDFLAGS required to find these
58 -- override LDFLAGS += -lssl -lcrypto -lstdc++
59 --else
60 -- # WITH_WOLFSSL=1 enables WolfSSL 4.2.0 support (mutually exclusive with OpenSSL)
61 -- ifeq ($(WITH_WOLFSSL),1)
62 -- # todo: change these
63 -- override CFLAGS += -DLIBUS_USE_WOLFSSL -I/usr/local/include
64 -- override LDFLAGS += -L/usr/local/lib -lwolfssl
65 -- else
66 -- override CFLAGS += -DLIBUS_NO_SSL
67 -- endif
68 -+COMMON_FLAGS += -DLIBUS_USE_OPENSSL
69 -+LDFLAGS += -lssl -lcrypto -lstdc++
70 -+REQUIRES += libssl libcrypto
71 - endif
72 -
73 - # WITH_LIBUV=1 builds with libuv as event-loop
74 - ifeq ($(WITH_LIBUV),1)
75 -- override CFLAGS += -DLIBUS_USE_LIBUV
76 -- override LDFLAGS += -luv
77 -+COMMON_FLAGS += -DLIBUS_USE_LIBUV
78 -+REQUIRES += libuv
79 - endif
80 -
81 --# WITH_GCD=1 builds with libdispatch as event-loop
82 --ifeq ($(WITH_GCD),1)
83 -- override CFLAGS += -DLIBUS_USE_GCD
84 -- override LDFLAGS += -framework CoreFoundation
85 --endif
86 -+CFLAGS += -std=c11 $(COMMON_FLAGS)
87 -+CXXFLAGS += -std=c++17 $(COMMON_FLAGS)
88 -
89 --# WITH_ASAN builds with sanitizers
90 --ifeq ($(WITH_ASAN),1)
91 -- override CFLAGS += -fsanitize=address -g
92 -- override LDFLAGS += -fsanitize=address
93 --endif
94 --
95 --override CFLAGS += -std=c11 -Isrc
96 --override LDFLAGS += uSockets.a
97 --
98 --# By default we build the uSockets.a static library
99 - default:
100 -- rm -f *.o
101 -- $(CC) $(CFLAGS) -flto -O3 -c src/*.c src/eventing/*.c src/crypto/*.c
102 --# For now we do rely on C++17 for OpenSSL support but we will be porting this work to C11
103 -+ $(CC) $(CFLAGS) -fPIC -c src/*.c src/eventing/*.c src/crypto/*.c
104 - ifeq ($(WITH_OPENSSL),1)
105 -- $(CXX) $(CXXFLAGS) -std=c++17 -flto -O3 -c src/crypto/*.cpp
106 -+ $(CXX) $(CXXFLAGS) -fPIC -c src/crypto/*.cpp
107 - endif
108 -- $(AR) rvs uSockets.a *.o
109 --
110 --# Builds all examples
111 --.PHONY: examples
112 --examples: default
113 -- for f in examples/*.c; do $(CC) -flto -O3 $(CFLAGS) -o $$(basename "$$f" ".c") "$$f" $(LDFLAGS); done
114 --
115 --swift_examples:
116 -- swiftc -O -I . examples/swift_http_server/main.swift uSockets.a -o swift_http_server
117 -+ $(AR) rvs libusockets.a *.o
118 -+ $(CC) -shared -o $(LIBTARGET) *.o -Wl,-soname,$(LIBTARGET) `$(PKG_CONFIG) --libs $(REQUIRES)` $(LDFLAGS)
119 -+ sed -e "s:@PREFIX@:$(prefix):" -e "s:@REQUIRES@:$(REQUIRES):" \
120 -+ -e "s:@LIB@:$(LIB):" -e "s:@VERSION@:$(VERSION):" libusockets.pc.in > libusockets.pc
121 -+
122 -+install:
123 -+ install -d "$(DESTDIR)$(libdir)/pkgconfig" "$(DESTDIR)$(includedir)"
124 -+ install -m 644 src/libusockets.h "$(DESTDIR)$(includedir)/"
125 -+ install -m 755 $(LIBTARGET) "$(DESTDIR)$(libdir)"
126 -+ ln -sf $(LIBTARGET) "$(DESTDIR)$(libdir)/libusockets.so"
127 -+ install -m 755 libusockets.a "$(DESTDIR)$(libdir)/"
128 -+ install -m 644 libusockets.pc "$(DESTDIR)$(libdir)/pkgconfig/"
129 -
130 - clean:
131 - rm -f *.o
132 - rm -f *.a
133 -+ rm -f *.so
134 - rm -rf .certs
135 -+ rm -f libusockets.pc
136 -+
137 -+.PHONY: default install clean
138 -diff --git a/libusockets.pc.in b/libusockets.pc.in
139 -new file mode 100644
140 -index 0000000..b818020
141 ---- /dev/null
142 -+++ b/libusockets.pc.in
143 -@@ -0,0 +1,12 @@
144 -+prefix=@PREFIX@
145 -+libdir=${prefix}/@LIB@
146 -+includedir=${prefix}/include
147 -+
148 -+Name: uSockets
149 -+Version: @VERSION@
150 -+Description: eventing, networking and crypto for async applications.
151 -+URL: https://github.com/uNetworking/uSockets
152 -+
153 -+Cflags: -I${includedir}
154 -+Libs: -L${libdir} -lusockets
155 -+Requires.private: @REQUIRES@
156
157 diff --git a/net-libs/usockets/usockets-0.7.1_p20210214-r2.ebuild b/net-libs/usockets/usockets-0.7.1_p20210214-r2.ebuild
158 deleted file mode 100644
159 index 0e1f15d5b..000000000
160 --- a/net-libs/usockets/usockets-0.7.1_p20210214-r2.ebuild
161 +++ /dev/null
162 @@ -1,48 +0,0 @@
163 -# Copyright 2019-2021 Gentoo Authors
164 -# Distributed under the terms of the GNU General Public License v2
165 -
166 -EAPI=7
167 -
168 -inherit toolchain-funcs
169 -
170 -DESCRIPTION="tiny eventing, networking & crypto for async applications"
171 -HOMEPAGE="https://github.com/uNetworking/uSockets"
172 -
173 -if [[ ${PV} == 9999 ]]; then
174 - inherit git-r3
175 - EGIT_REPO_URI="https://github.com/uNetworking/uSockets.git"
176 -else
177 - COMMIT=5440dbac79bd76444175b76ee95dfcade12a6aac
178 - SRC_URI="https://github.com/uNetworking/uSockets/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
179 - KEYWORDS="~amd64 ~arm64 ~x86"
180 - S="${WORKDIR}/uSockets-${COMMIT}"
181 -fi
182 -
183 -LICENSE="Apache-2.0"
184 -SLOT="0"
185 -IUSE="libuv +ssl"
186 -
187 -DEPEND="
188 - libuv? ( dev-libs/libuv )
189 - ssl? ( >=dev-libs/openssl-1.1.0 )
190 -"
191 -RDEPEND="${DEPEND}"
192 -
193 -PATCHES=(
194 - "${FILESDIR}/${PN}-0.7.1-Makefile.patch"
195 -)
196 -
197 -src_configure() {
198 - tc-export CC CXX AR
199 - export VERSION="${PV%_*}" \
200 - LIB="$(get_libdir)" \
201 - WITH_OPENSSL="$(usex ssl 1 0)"
202 - WITH_LIBUV="$(usex libuv 1 0)"
203 - default
204 -}
205 -
206 -src_install() {
207 - default
208 - einstalldocs
209 - rm -f "${ED}/usr/$(get_libdir)/libusockets.a" || die
210 -}