public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:master commit in: www-apps/uwebsockets/files/, net-libs/usockets/files/, www-apps/uwebsockets/
@ 2020-11-23 22:06 Andrew Ammerlaan
  0 siblings, 0 replies; only message in thread
From: Andrew Ammerlaan @ 2020-11-23 22:06 UTC (permalink / raw
  To: gentoo-commits

commit:     b8c8630254730e08b4acd5c29b1f1f99b9d12102
Author:     epsilonKNOT <gentoo <AT> aisha <DOT> cc>
AuthorDate: Mon Nov 23 12:14:06 2020 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Mon Nov 23 12:17:25 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b8c86302

net-libs/usockets: remove internal install

make it compatible with freebsd installation
also gets rid of uebsockets patch

Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Aisha Tammy <gentoo <AT> aisha.cc>

 .../usockets/files/usockets-0.6.0-Makefile.patch   | 52 ++++++++++------------
 .../uwebsockets/files/uwebsockets-src_Loop.h.patch | 13 ------
 www-apps/uwebsockets/uwebsockets-18.15.0.ebuild    |  6 +--
 www-apps/uwebsockets/uwebsockets-9999.ebuild       |  6 +--
 4 files changed, 26 insertions(+), 51 deletions(-)

diff --git a/net-libs/usockets/files/usockets-0.6.0-Makefile.patch b/net-libs/usockets/files/usockets-0.6.0-Makefile.patch
index ebc9a0db..4994b29d 100644
--- a/net-libs/usockets/files/usockets-0.6.0-Makefile.patch
+++ b/net-libs/usockets/files/usockets-0.6.0-Makefile.patch
@@ -1,21 +1,23 @@
 diff --git a/Makefile b/Makefile
-index 27f97ce..c269c3f 100644
+index 27f97ce..f8bf8d7 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -1,60 +1,62 @@
+@@ -1,60 +1,59 @@
 +DESTDIR ?=
 +
 +prefix ?=	/usr
 +exec_prefix ?=	$(prefix)
 +LIB ?=		lib
 +libdir ?=	$(exec_prefix)/$(LIB)
-+includedir ?=	$(exec_prefix)/include/uSockets
++includedir ?=	$(exec_prefix)/include
++
++PKG_CONFIG ?=	pkg-config
 +
 +VERSION ?=	0.0
 +LIBTARGET =	libusockets.so.$(VERSION)
 +
-+LIBS =
 +REQUIRES =
++COMMON_FLAGS =	-Isrc
 +
  # 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
@@ -32,8 +34,8 @@ index 27f97ce..c269c3f 100644
 -	else
 -		override CFLAGS += -DLIBUS_NO_SSL
 -	endif
-+CFLAGS +=	-DLIBUS_USE_OPENSSL
-+LIBS +=		-lssl -lcrypto -lstdc++
++COMMON_FLAGS +=	-DLIBUS_USE_OPENSSL
++LDFLAGS +=	-lstdc++
 +REQUIRES +=	libssl libcrypto
  endif
  
@@ -41,16 +43,17 @@ index 27f97ce..c269c3f 100644
  ifeq ($(WITH_LIBUV),1)
 -	override CFLAGS += -DLIBUS_USE_LIBUV
 -	override LDFLAGS += -luv
--endif
--
++COMMON_FLAGS +=	-DLIBUS_USE_LIBUV
++REQUIRES +=	libuv
+ endif
+ 
 -# WITH_GCD=1 builds with libdispatch as event-loop
 -ifeq ($(WITH_GCD),1)
 -	override CFLAGS += -DLIBUS_USE_GCD
 -	override LDFLAGS += -framework CoreFoundation
-+CFLAGS +=	-DLIBUS_USE_LIBUV
-+LIBS +=		-luv
-+REQUIRES +=	libuv
- endif
+-endif
++CFLAGS +=	-std=c11 $(COMMON_FLAGS)
++CXXFLAGS +=	-std=c++17 $(COMMON_FLAGS)
  
 -# WITH_ASAN builds with sanitizers
 -ifeq ($(WITH_ASAN),1)
@@ -60,8 +63,7 @@ index 27f97ce..c269c3f 100644
 -
 -override CFLAGS += -std=c11 -Isrc
 -override LDFLAGS += uSockets.a
-+CFLAGS += -std=c11 -Isrc
- 
+-
 -# By default we build the uSockets.a static library
  default:
 -	rm -f *.o
@@ -70,7 +72,7 @@ index 27f97ce..c269c3f 100644
 +	$(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
-+	$(CXX) $(CXXFLAGS) -fPIC -std=c++17 -c src/crypto/*.cpp
++	$(CXX) $(CXXFLAGS) -fPIC -c src/crypto/*.cpp
  endif
 -	$(AR) rvs uSockets.a *.o
 -
@@ -82,18 +84,13 @@ index 27f97ce..c269c3f 100644
 -swift_examples:
 -	swiftc -O -I . examples/swift_http_server/main.swift uSockets.a -o swift_http_server
 +	$(AR) rvs libusockets.a *.o
-+	$(CC) -shared -fPIC -Wl,-soname,$(LIBTARGET) $(CFLAGS) -o $(LIBTARGET) *.o $(LIBS) $(LDFLAGS)
++	$(CC) -shared -o $(LIBTARGET) *.o -Wl,-soname,$(LIBTARGET) `$(PKG_CONFIG) --libs $(REQUIRES)` $(LDFLAGS)
 +	sed -e "s:@PREFIX@:$(prefix):" -e "s:@REQUIRES@:$(REQUIRES):" \
 +	-e "s:@LIB@:$(LIB):" -e "s:@VERSION@:$(VERSION):" libusockets.pc.in > libusockets.pc
 +
 +install:
-+	install -d "$(DESTDIR)$(libdir)/pkgconfig" \
-+	"$(DESTDIR)$(includedir)/internal/eventing" \
-+	"$(DESTDIR)$(includedir)/internal/networking"
-+	install -m 644 src/*.h "$(DESTDIR)$(includedir)/"
-+	install -m 644 src/internal/*.h "$(DESTDIR)$(includedir)/internal/"
-+	install -m 644 src/internal/eventing/*.h "$(DESTDIR)$(includedir)/internal/eventing/"
-+	install -m 644 src/internal/networking/*.h "$(DESTDIR)$(includedir)/internal/networking/"
++	install -d "$(DESTDIR)$(libdir)/pkgconfig" "$(DESTDIR)$(includedir)"
++	install -m 644 src/libusockets.h "$(DESTDIR)$(includedir)/"
 +	install -m 755 $(LIBTARGET) "$(DESTDIR)$(libdir)"
 +	ln -sf $(LIBTARGET) "$(DESTDIR)$(libdir)/libusockets.so"
 +	install -m 755 libusockets.a "$(DESTDIR)$(libdir)/"
@@ -106,16 +103,15 @@ index 27f97ce..c269c3f 100644
  	rm -rf .certs
 +	rm -f libusockets.pc
 +
-+.PHONY: 
++.PHONY: default install clean
 diff --git a/libusockets.pc.in b/libusockets.pc.in
 new file mode 100644
-index 0000000..b63637b
+index 0000000..b818020
 --- /dev/null
 +++ b/libusockets.pc.in
-@@ -0,0 +1,13 @@
+@@ -0,0 +1,12 @@
 +prefix=@PREFIX@
-+exec_prefix=${prefix}
-+libdir=${exec_prefix}/@LIB@
++libdir=${prefix}/@LIB@
 +includedir=${prefix}/include
 +
 +Name: uSockets

diff --git a/www-apps/uwebsockets/files/uwebsockets-src_Loop.h.patch b/www-apps/uwebsockets/files/uwebsockets-src_Loop.h.patch
deleted file mode 100644
index d4bded9f..00000000
--- a/www-apps/uwebsockets/files/uwebsockets-src_Loop.h.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/Loop.h b/src/Loop.h
-index 3681dad..03d8a75 100644
---- a/src/Loop.h
-+++ b/src/Loop.h
-@@ -21,7 +21,7 @@
- /* The loop is lazily created per-thread and run with uWS::run() */
- 
- #include "LoopData.h"
--#include <libusockets.h>
-+#include <uSockets/libusockets.h>
- 
- namespace uWS {
- struct Loop {

diff --git a/www-apps/uwebsockets/uwebsockets-18.15.0.ebuild b/www-apps/uwebsockets/uwebsockets-18.15.0.ebuild
index 2738b66d..d6c2b035 100644
--- a/www-apps/uwebsockets/uwebsockets-18.15.0.ebuild
+++ b/www-apps/uwebsockets/uwebsockets-18.15.0.ebuild
@@ -17,11 +17,7 @@ fi
 
 LICENSE="Apache-2.0"
 SLOT="0"
-RDEPEND=">=net-libs/usockets-0.4.1"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-src_Loop.h.patch"
-)
+RDEPEND=">=net-libs/usockets-0.6.0"
 
 src_prepare() {
 	default

diff --git a/www-apps/uwebsockets/uwebsockets-9999.ebuild b/www-apps/uwebsockets/uwebsockets-9999.ebuild
index 2738b66d..d6c2b035 100644
--- a/www-apps/uwebsockets/uwebsockets-9999.ebuild
+++ b/www-apps/uwebsockets/uwebsockets-9999.ebuild
@@ -17,11 +17,7 @@ fi
 
 LICENSE="Apache-2.0"
 SLOT="0"
-RDEPEND=">=net-libs/usockets-0.4.1"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-src_Loop.h.patch"
-)
+RDEPEND=">=net-libs/usockets-0.6.0"
 
 src_prepare() {
 	default


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-11-23 22:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-23 22:06 [gentoo-commits] repo/proj/guru:master commit in: www-apps/uwebsockets/files/, net-libs/usockets/files/, www-apps/uwebsockets/ Andrew Ammerlaan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox