commit: 753e8bf323bb15a1432a121ef768c6e071867616
Author: epsilonKNOT <gentoo <AT> aisha <DOT> cc>
AuthorDate: Sun Nov 22 23:33:44 2020 +0000
Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Sun Nov 22 23:33:44 2020 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=753e8bf3
net-libs/usockets: fix ssl build
Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Aisha Tammy <gentoo <AT> aisha.cc>
net-libs/usockets/files/usockets-Makefile.patch | 17 +++++++++--------
.../{usockets-0.6.0.ebuild => usockets-0.6.0-r1.ebuild} | 2 +-
net-libs/usockets/usockets-9999.ebuild | 2 +-
3 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/net-libs/usockets/files/usockets-Makefile.patch
b/net-libs/usockets/files/usockets-Makefile.patch
index c641db0b..a3c50bc1 100644
--- a/net-libs/usockets/files/usockets-Makefile.patch
+++ b/net-libs/usockets/files/usockets-Makefile.patch
@@ -1,5 +1,5 @@
diff --git a/Makefile b/Makefile
-index 27f97ce..1a01539 100644
+index 27f97ce..066305c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,13 @@
@@ -8,7 +8,7 @@ index 27f97ce..1a01539 100644
+prefix ?= "/usr/local"
+exec_prefix ?= "$(prefix)"
+libdir ?= "$(exec_prefix)/lib"
-+includedir?= "$(exec_prefix)/include/uSockets"
++includedir ?= "$(exec_prefix)/include/uSockets"
+
+# OpenBSD specific library version
+LIBTARGET = libusockets.so.$(LIBusockets_VERSION)
@@ -16,7 +16,7 @@ index 27f97ce..1a01539 100644
# WITH_OPENSSL=1 enables OpenSSL 1.1+ support or BoringSSL
# For now we need to link with C++ for OpenSSL support, but should be removed
with time
ifeq ($(WITH_OPENSSL),1)
-@@ -34,17 +44,28 @@ ifeq ($(WITH_ASAN),1)
+@@ -34,17 +44,31 @@ ifeq ($(WITH_ASAN),1)
endif
override CFLAGS += -std=c11 -Isrc
@@ -28,11 +28,12 @@ index 27f97ce..1a01539 100644
rm -f *.o
- $(CC) $(CFLAGS) -flto -O3 -c src/*.c src/eventing/*.c src/crypto/*.c
-# For now we do rely on C++17 for OpenSSL support but we will be porting this
work to C11
--ifeq ($(WITH_OPENSSL),1)
++ $(CC) $(CFLAGS) -fPIC -c src/*.c src/eventing/*.c src/crypto/*.c
+ ifeq ($(WITH_OPENSSL),1)
- $(CXX) $(CXXFLAGS) -std=c++17 -flto -O3 -c src/crypto/*.cpp
--endif
++ $(CXX) $(CXXFLAGS) -fPIC -std=c++17 -c src/crypto/*.cpp
+ endif
- $(AR) rvs uSockets.a *.o
-+ $(CC) -fPIC -c src/*.c src/eventing/*.c src/crypto/*.c $(CFLAGS)
+ $(AR) rvs libusockets.a *.o
+ $(CC) -shared -fPIC -Wl,-soname,$(LIBTARGET) $(CFLAGS) -o $(LIBTARGET)
*.o $(LDFLAGS)
+
@@ -41,8 +42,8 @@ index 27f97ce..1a01539 100644
+ install -d "$(DESTDIR)$(libdir)" \
+ "$(DESTDIR)$(includedir)/internal/eventing" \
+ "$(DESTDIR)$(includedir)/internal/networking"
-+ # OpenBSD specific library version
+ install -m 755 $(LIBTARGET) "$(DESTDIR)$(libdir)/"
++ ln -sf $(LIBTARGET)"$(DESTDIR)$(libdir)/libusockets.so"
+ # install static library
+ install -m 755 libusockets.a "$(DESTDIR)$(libdir)/"
+ # we also install all the header files
@@ -53,7 +54,7 @@ index 27f97ce..1a01539 100644
# Builds all examples
.PHONY: examples
-@@ -57,4 +78,5 @@ swift_examples:
+@@ -57,4 +81,5 @@ swift_examples:
clean:
rm -f *.o
rm -f *.a
diff --git a/net-libs/usockets/usockets-0.6.0.ebuild
b/net-libs/usockets/usockets-0.6.0-r1.ebuild
similarity index 98%
rename from net-libs/usockets/usockets-0.6.0.ebuild
rename to net-libs/usockets/usockets-0.6.0-r1.ebuild
index 07f68285..2da9a11a 100644
--- a/net-libs/usockets/usockets-0.6.0.ebuild
+++ b/net-libs/usockets/usockets-0.6.0-r1.ebuild
@@ -44,7 +44,7 @@ src_compile() {
src_install() {
emake libdir="/usr/$(get_libdir)" \
prefix="/usr" \
- DESTDIR="${D}" \
+ DESTDIR="${ED}" \
LIBusockets_VERSION=${PV} \
install
einstalldocs
diff --git a/net-libs/usockets/usockets-9999.ebuild
b/net-libs/usockets/usockets-9999.ebuild
index 07f68285..2da9a11a 100644
--- a/net-libs/usockets/usockets-9999.ebuild
+++ b/net-libs/usockets/usockets-9999.ebuild
@@ -44,7 +44,7 @@ src_compile() {
src_install() {
emake libdir="/usr/$(get_libdir)" \
prefix="/usr" \
- DESTDIR="${D}" \
+ DESTDIR="${ED}" \
LIBusockets_VERSION=${PV} \
install
einstalldocs