All of lore.kernel.org
 help / color / mirror / Atom feed
From: Baruch Siach <baruch@tkos.co.il>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 1/1] libuwsc: new package
Date: Thu, 05 Sep 2019 20:18:09 +0300	[thread overview]
Message-ID: <8736haacha.fsf@tarshish> (raw)
In-Reply-To: <CAGN0SiFoATkt0g+ktzYukqPKVMJWeQmdhqsWQqvwa5OJ=Ds=wQ@mail.gmail.com>

Hi Jianhui Zhao,

A few more comments below.

On Thu, Sep 05 2019, ??? wrote:
> Signed-off-by: ??? <zhaojh329@gmail.com>
>
> ---
> Changes v1 -> v2:
>   - Remove config options for optional dependencies (suggested by Baruch Siach)
> ---
>  package/Config.in            |  1 +
>  package/libuwsc/Config.in    |  8 ++++++++
>  package/libuwsc/libuwsc.hash |  3 +++
>  package/libuwsc/libuwsc.mk   | 32 ++++++++++++++++++++++++++++++++
>  4 files changed, 44 insertions(+)
>  create mode 100644 package/libuwsc/Config.in
>  create mode 100644 package/libuwsc/libuwsc.hash
>  create mode 100644 package/libuwsc/libuwsc.mk
>
> diff --git a/package/Config.in b/package/Config.in
> index 9336261c5d..a9f3867949 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -1624,6 +1624,7 @@ menu "Networking"
>   source "package/libupnp18/Config.in"
>   source "package/libupnpp/Config.in"
>   source "package/liburiparser/Config.in"
> + source "package/libuwsc/Config.in"
>   source "package/libvncserver/Config.in"
>   source "package/libwebsock/Config.in"
>   source "package/libwebsockets/Config.in"
> diff --git a/package/libuwsc/Config.in b/package/libuwsc/Config.in
> new file mode 100644
> index 0000000000..ae99b6d2dc
> --- /dev/null
> +++ b/package/libuwsc/Config.in
> @@ -0,0 +1,8 @@
> +config BR2_PACKAGE_LIBUWSC
> + bool "libuwsc"
> + select BR2_PACKAGE_LIBEV
> + help
> +   A Lightweight and fully asynchronous WebSocket client
> +   library based on libev.
> +
> +   https://github.com/zhaojh329/libuwsc
> diff --git a/package/libuwsc/libuwsc.hash b/package/libuwsc/libuwsc.hash
> new file mode 100644
> index 0000000000..f137b3613b
> --- /dev/null
> +++ b/package/libuwsc/libuwsc.hash
> @@ -0,0 +1,3 @@
> +# Locally calculated
> +sha256 bae2cd13eda86876ebcf99a38a069f5e8c01717713d2fec25031051b9c47624b
>  libuwsc-3.3.2.tar.gz
> +sha256 e557975decde6439395e72dce7690d974d1a493722a7be5228794ec944f0c5db
>  LICENSE
> diff --git a/package/libuwsc/libuwsc.mk b/package/libuwsc/libuwsc.mk
> new file mode 100644
> index 0000000000..9fbd00a380
> --- /dev/null
> +++ b/package/libuwsc/libuwsc.mk
> @@ -0,0 +1,32 @@
> +################################################################################
> +#
> +# libuwsc
> +#
> +################################################################################
> +
> +LIBUWSC_VERSION = 3.3.2
> +LIBUWSC_SITE =
> https://github.com/zhaojh329/libuwsc/releases/download/v$(LIBUWSC_VERSION)

Your patch seems to be newline damaged. It can't be applied directly. I
suggest that you use 'git send-email' to avoid patch mangling.

> +LIBUWSC_LICENSE = MIT
> +LIBUWSC_LICENSE_FILES = LICENSE
> +LIBUWSC_INSTALL_STAGING = YES
> +LIBUWSC_DEPENDENCIES = libev
> +
> +ifeq ($(BR2_PACKAGE_OPENSSL),y)
> +LIBUWSC_DEPENDENCIES += openssl
> +LIBUWSC_CONF_OPTS += -DUWSC_USE_OPENSSL=ON
> +else ifeq ($(BR2_PACKAGE_WOLFSSL),y)
> +LIBUWSC_DEPENDENCIES += wolfssl
> +LIBUWSC_CONF_OPTS += -DUWSC_USE_WOLFSSL=ON
> +else ifeq ($(BR2_PACKAGE_MBEDTLS),y)
> +LIBUWSC_DEPENDENCIES += mbedtls
> +LIBUWSC_CONF_OPTS += -DUWSC_USE_MBEDTLS=ON
> +endif

When no support SSL backend is available you should explicitly disable
SSL support. I believe something line this would work:

else
LIBUWSC_CONF_OPTS += -DUWSC_SSL_SUPPORT=OFF
endif

> +
> +ifneq ($(BR2_USE_MMU),)
> +ifneq ($(findstring $(BR2_PACKAGE_LUA_5_1)$(BR2_PACKAGE_LUA_5_3), y),)

Just do

ifeq ($(BR2_USE_MMU)$(BR2_PACKAGE_LUA_5_1)$(BR2_PACKAGE_LUA_5_3),yy)

That works because only one lua version can be enabled for a given
configuration.

But why is MMU required, actually? I see no fork() call in the code.

> +LIBUWSC_DEPENDENCIES += lua
> +LIBUWSC_CONF_OPTS += -DUWSC_LUA_SUPPORT=ON

Here again lua support should be disabled explicitly in the 'else' part.

> +endif
> +endif
> +
> +$(eval $(cmake-package))

baruch

--
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

      reply	other threads:[~2019-09-05 17:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-05 14:34 [Buildroot] [PATCH v2 1/1] libuwsc: new package 赵建辉
2019-09-05 17:18 ` Baruch Siach [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8736haacha.fsf@tarshish \
    --to=baruch@tkos.co.il \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.