From patchwork Sat Sep 9 21:29:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Kulhavy X-Patchwork-Id: 811983 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xqS543lT0z9t2M for ; Sun, 10 Sep 2017 07:29:44 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 9B0BC88DB2; Sat, 9 Sep 2017 21:29:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AVEtwlA7k6fE; Sat, 9 Sep 2017 21:29:41 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 7A6A088D07; Sat, 9 Sep 2017 21:29:41 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 09A111BFFC3 for ; Sat, 9 Sep 2017 21:29:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 039AA8A061 for ; Sat, 9 Sep 2017 21:29:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vz4u29wVMYIR for ; Sat, 9 Sep 2017 21:29:39 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from vie01a-dmta-ch01-3.mx.upcmail.net (vie01a-dmta-ch01-3.mx.upcmail.net [84.116.36.93]) by hemlock.osuosl.org (Postfix) with ESMTPS id B17118A040 for ; Sat, 9 Sep 2017 21:29:39 +0000 (UTC) Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-ch01.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1dqnJo-0006nx-0U for buildroot@buildroot.org; Sat, 09 Sep 2017 23:29:36 +0200 Received: from localhost.localdomain ([83.150.41.162]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id 7ZVX1w00q3VvXnX01ZVayl; Sat, 09 Sep 2017 23:29:35 +0200 X-SourceIP: 83.150.41.162 X-Authenticated-Sender: brain@hispeed.ch From: Petr Kulhavy To: buildroot@buildroot.org Date: Sat, 9 Sep 2017 23:29:30 +0200 Message-Id: <1504992570-8893-1-git-send-email-brain@jikos.cz> X-Mailer: git-send-email 2.7.4 Cc: Petr Kulhavy Subject: [Buildroot] [PATCH 1/1] package/uwebsockets: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add uWebSockets, a lightweight, efficient and scalable WebSocket library. https://github.com/uNetworking/uWebSockets Signed-off-by: Petr Kulhavy --- DEVELOPERS | 1 + package/Config.in | 1 + package/uwebsockets/Config.in | 20 ++++++++++++++++++++ package/uwebsockets/uwebsockets.hash | 2 ++ package/uwebsockets/uwebsockets.mk | 36 ++++++++++++++++++++++++++++++++++++ 5 files changed, 60 insertions(+) create mode 100644 package/uwebsockets/Config.in create mode 100644 package/uwebsockets/uwebsockets.hash create mode 100644 package/uwebsockets/uwebsockets.mk diff --git a/DEVELOPERS b/DEVELOPERS index 2bd3aca..8737384 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1368,6 +1368,7 @@ F: package/sdl2_ttf/ N: Petr Kulhavy F: package/linuxptp/ +F: package/uwebsockets/ N: Petr Vorel F: package/linux-backports/ diff --git a/package/Config.in b/package/Config.in index d926f7e..0afae7a 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1384,6 +1384,7 @@ menu "Networking" source "package/sofia-sip/Config.in" source "package/thrift/Config.in" source "package/usbredir/Config.in" + source "package/uwebsockets/Config.in" source "package/zeromq/Config.in" source "package/zmqpp/Config.in" source "package/zyre/Config.in" diff --git a/package/uwebsockets/Config.in b/package/uwebsockets/Config.in new file mode 100644 index 0000000..fff5d7a --- /dev/null +++ b/package/uwebsockets/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_UWEBSOCKETS + bool "uWebSockets" + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_OPENSSL + help + uWebSockets is one of the most lightweight, efficient and + scalable WebSocket and HTTP server implementations available. + It features an easy-to-use, fully async object-oriented + interface and scales to millions of connections using only + a fraction of memory compared to the competition. While + performance and scalability are two of our top priorities, + we consider security, stability and standards compliance + paramount. License is zlib/libpng (very permissive & suits + commercial applications). + + https://github.com/uNetworking/uWebSockets + +comment "uWebSockets needs a toolchain with C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/uwebsockets/uwebsockets.hash b/package/uwebsockets/uwebsockets.hash new file mode 100644 index 0000000..b07c48c --- /dev/null +++ b/package/uwebsockets/uwebsockets.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 9d7854fe3b8c43903957ccd9001e954e210e14a0545549515a9f020bf275c4fc uwebsockets-v0.14.4.tar.gz diff --git a/package/uwebsockets/uwebsockets.mk b/package/uwebsockets/uwebsockets.mk new file mode 100644 index 0000000..084385e --- /dev/null +++ b/package/uwebsockets/uwebsockets.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# uWebSockets +# +################################################################################ + +UWEBSOCKETS_VERSION = v0.14.4 +UWEBSOCKETS_SITE = $(call github,uNetworking,uWebSockets,$(UWEBSOCKETS_VERSION)) +UWEBSOCKETS_LICENSE = Zlib +UWEBSOCKETS_LICENSE_FILES = LICENSE +UWEBSOCKETS_DEPENDENCIES = zlib openssl + +UWEBSOCKETS_INSTALL_STAGING = YES +UWEBSOCKETS_CFLAGS = $(TARGET_CFLAGS) + +ifeq ($(BR2_PACKAGE_BOOST),y) +UWEBSOCKETS_CFLAGS += -DUSE_ASIO +else ifeq ($(BR2_PACKAGE_LIBUV),y) +UWEBSOCKETS_CFLAGS += -DUSE_LIBUV +endif + +define UWEBSOCKETS_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) CXXFLAGS="$(UWEBSOCKETS_CFLAGS)" -C $(@D) Linux +endef + +define UWEBSOCKETS_INSTALL_STAGING_CMDS + $(INSTALL) -d -m 0755 $(STAGING_DIR)/usr/include/uWS/ + $(INSTALL) -D -m 0644 $(@D)/src/*.h $(STAGING_DIR)/usr/include/uWS/ +endef + +define UWEBSOCKETS_INSTALL_TARGET_CMDS + $(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/lib/ + $(INSTALL) -D -m 0755 $(@D)/libuWS.so* $(TARGET_DIR)/usr/lib/ +endef + +$(eval $(generic-package))