2013-02-06 02:28:59 +01:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# libwebsockets
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2021-01-05 14:20:00 +01:00
|
|
|
LIBWEBSOCKETS_VERSION = 4.0.21
|
package: remove 'v' prefix from github-fetched packages
On Github, a large number of projects name their tag vXYZ (i.e v3.0,
v0.1, etc.). In some packages we do:
<pkg>_VERSION = v0.3
<pkg>_SITE = $(call github foo,bar,$(<pkg>_VERSION))
And in some other packages we do:
<pkg>_VERSION = 0.3
<pkg>_SITE = $(call github foo,bar,v$(<pkg>_VERSION))
I.e in one case we consider the version to be v0.3, in the other case
we consider 0.3 to be the version.
The problem with v0.3 is that when used in conjunction with
release-monitoring.org, it doesn't work very well, because
release-monitoring.org has the concept of "version prefix" and using
that they drop the "v" prefix for the version.
Therefore, a number of packages in Buildroot have a version that
doesn't match with release-monitoring.org because Buildroot has 'v0.3'
and release-monitoring.org has '0.3'.
Since really the version number of 0.3, is makes sense to update our
packages to drop this 'v'.
This commit only addresses the (common) case of github packages where
the prefix is simply 'v'. Other cases will be handled by separate
commits. Also, there are a few cases that couldn't be handled
mechanically that aren't covered by this commit.
Signed-off-by: Victor Huesca <victor.huesca@bootlin.com>
[Arnout: don't change flatbuffers, json-for-modern-cpp, libpagekite,
python-scapy3k, softether]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-06-12 08:42:06 +02:00
|
|
|
LIBWEBSOCKETS_SITE = $(call github,warmcat,libwebsockets,v$(LIBWEBSOCKETS_VERSION))
|
2020-07-26 04:28:59 +02:00
|
|
|
LIBWEBSOCKETS_LICENSE = MIT with exceptions
|
2014-05-01 00:45:00 +02:00
|
|
|
LIBWEBSOCKETS_LICENSE_FILES = LICENSE
|
2013-02-06 02:28:59 +01:00
|
|
|
LIBWEBSOCKETS_DEPENDENCIES = zlib
|
|
|
|
LIBWEBSOCKETS_INSTALL_STAGING = YES
|
2020-06-12 13:31:53 +02:00
|
|
|
LIBWEBSOCKETS_CONF_OPTS = \
|
|
|
|
-DLWS_WITHOUT_TESTAPPS=ON \
|
|
|
|
-DLWS_IPV6=ON \
|
package/libwebsockets: add support for extensions
libwebsockets currently depends on zlib, however, as of commit
13ba5bbc633ea962d46d9f2bfb2e87c9f7e83b62 (from 2013!) zlib is not actually a
requirement if extensions are not enabled.
By default, libwebsockets sets the "LWS_WITHOUT_EXTENSIONS" option to "ON,"
which removes the need for zlib as a dependency. Because of this default
setting, there are two options:
1) Remove the dependency on zlib, create a new option under Config.in to allow
a user to enable extensions, add zlib as a dependency, and set
LWS_WITHOUT_EXTENSIONS to "OFF" if that option is selected.
2) Keep the dependency and explicitly set LWS_WITHOUT_EXTENSIONS to "OFF."
Below are the size differences in bytes:
- Without zlib and extensions: 44636
- With zlib and without extensions: 44720
- With zlib and with extensions: 44732
Considering the size difference between all 3 is an incredible 96 bytes, and
the difference between what we have now, and enabling extensions is an
insurmountable 12 bytes, it is safe to keep the dependency on zlib and always
enable extensions.
Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-07-26 04:28:58 +02:00
|
|
|
-DLWS_UNIX_SOCK=ON \
|
|
|
|
-DLWS_WITHOUT_EXTENSIONS=OFF
|
2014-10-31 14:49:02 +01:00
|
|
|
|
2016-03-30 22:22:37 +02:00
|
|
|
# If LWS_MAX_SMP=1, then there is no code related to pthreads compiled
|
|
|
|
# in the library. If unset, LWS_MAX_SMP defaults to 32 and a small
|
|
|
|
# amount of pthread mutex code is built into the library.
|
|
|
|
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),)
|
|
|
|
LIBWEBSOCKETS_CONF_OPTS += -DLWS_MAX_SMP=1
|
|
|
|
else
|
|
|
|
LIBWEBSOCKETS_CONF_OPTS += -DLWS_MAX_SMP=
|
|
|
|
endif
|
|
|
|
|
2014-05-01 00:45:00 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
2014-11-03 11:03:30 +01:00
|
|
|
LIBWEBSOCKETS_DEPENDENCIES += openssl host-openssl
|
2014-10-31 14:49:02 +01:00
|
|
|
LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_SSL=ON
|
2014-05-01 00:45:00 +02:00
|
|
|
else
|
2014-10-31 14:49:02 +01:00
|
|
|
LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_SSL=OFF
|
2014-05-01 00:45:00 +02:00
|
|
|
endif
|
|
|
|
|
2016-03-02 22:35:40 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBEV),y)
|
|
|
|
LIBWEBSOCKETS_DEPENDENCIES += libev
|
2019-10-06 14:53:38 +02:00
|
|
|
LIBWEBSOCKETS_CONF_OPTS += \
|
|
|
|
-DLWS_WITH_LIBEV=ON \
|
|
|
|
-DLWS_WITH_LIBEVENT=OFF
|
|
|
|
else ifeq ($(BR2_PACKAGE_LIBEVENT),y)
|
2018-06-10 15:54:34 +02:00
|
|
|
LIBWEBSOCKETS_DEPENDENCIES += libevent
|
2019-10-06 14:53:38 +02:00
|
|
|
LIBWEBSOCKETS_CONF_OPTS += \
|
|
|
|
-DLWS_WITH_LIBEV=OFF \
|
|
|
|
-DLWS_WITH_LIBEVENT=ON
|
2018-06-10 15:54:34 +02:00
|
|
|
else
|
2019-10-06 14:53:38 +02:00
|
|
|
LIBWEBSOCKETS_CONF_OPTS += \
|
|
|
|
-DLWS_WITH_LIBEV=OFF \
|
|
|
|
-DLWS_WITH_LIBEVENT=OFF
|
2018-06-10 15:54:34 +02:00
|
|
|
endif
|
|
|
|
|
2020-07-26 04:29:00 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBGLIB2),y)
|
|
|
|
LIBWEBSOCKETS_DEPENDENCIES += libglib2
|
|
|
|
LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_GLIB=ON
|
|
|
|
else
|
|
|
|
LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_GLIB=OFF
|
|
|
|
endif
|
|
|
|
|
2020-07-26 04:29:01 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBMOUNT),y)
|
|
|
|
LIBWEBSOCKETS_DEPENDENCIES += util-linux
|
|
|
|
LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_FSMOUNT=ON
|
|
|
|
else
|
|
|
|
LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_FSMOUNT=OFF
|
|
|
|
endif
|
|
|
|
|
2016-03-02 22:35:40 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBUV),y)
|
|
|
|
LIBWEBSOCKETS_DEPENDENCIES += libuv
|
|
|
|
LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_LIBUV=ON
|
|
|
|
else
|
|
|
|
LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_LIBUV=OFF
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_SHARED_LIBS),y)
|
|
|
|
LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_STATIC=OFF
|
|
|
|
endif
|
|
|
|
|
2014-05-01 00:45:00 +02:00
|
|
|
$(eval $(cmake-package))
|