mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-09 23:23:00 -04:00
net-libs/usockets: fix ssl build
Package-Manager: Portage-3.0.8, Repoman-3.0.2 Signed-off-by: Aisha Tammy <gentoo@aisha.cc>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -44,7 +44,7 @@ src_compile() {
|
||||
src_install() {
|
||||
emake libdir="/usr/$(get_libdir)" \
|
||||
prefix="/usr" \
|
||||
DESTDIR="${D}" \
|
||||
DESTDIR="${ED}" \
|
||||
LIBusockets_VERSION=${PV} \
|
||||
install
|
||||
einstalldocs
|
||||
@@ -44,7 +44,7 @@ src_compile() {
|
||||
src_install() {
|
||||
emake libdir="/usr/$(get_libdir)" \
|
||||
prefix="/usr" \
|
||||
DESTDIR="${D}" \
|
||||
DESTDIR="${ED}" \
|
||||
LIBusockets_VERSION=${PV} \
|
||||
install
|
||||
einstalldocs
|
||||
|
||||
Reference in New Issue
Block a user