aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorepsilonKNOT <gentoo@aisha.cc>2020-11-22 18:33:44 -0500
committerepsilonKNOT <gentoo@aisha.cc>2020-11-22 18:33:44 -0500
commit753e8bf323bb15a1432a121ef768c6e071867616 (patch)
tree965f7432887626747bbbfa45a08fc5390719909d /net-libs
parentAdding upstream information to my metadata files (diff)
downloadguru-753e8bf323bb15a1432a121ef768c6e071867616.tar.gz
guru-753e8bf323bb15a1432a121ef768c6e071867616.tar.bz2
guru-753e8bf323bb15a1432a121ef768c6e071867616.zip
net-libs/usockets: fix ssl build
Package-Manager: Portage-3.0.8, Repoman-3.0.2 Signed-off-by: Aisha Tammy <gentoo@aisha.cc>
Diffstat (limited to 'net-libs')
-rw-r--r--net-libs/usockets/files/usockets-Makefile.patch17
-rw-r--r--net-libs/usockets/usockets-0.6.0-r1.ebuild (renamed from net-libs/usockets/usockets-0.6.0.ebuild)2
-rw-r--r--net-libs/usockets/usockets-9999.ebuild2
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 c641db0b1..a3c50bc17 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
index 07f682856..2da9a11ab 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 07f682856..2da9a11ab 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