2017-01-22 22:00:20 +01:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# bctoolbox
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2020-11-17 21:16:58 +01:00
|
|
|
BCTOOLBOX_VERSION = 4.4.8
|
2017-01-22 22:00:20 +01:00
|
|
|
BCTOOLBOX_SITE = $(call github,BelledonneCommunications,bctoolbox,$(BCTOOLBOX_VERSION))
|
2020-11-17 21:16:58 +01:00
|
|
|
BCTOOLBOX_LICENSE = GPL-3.0+
|
|
|
|
BCTOOLBOX_LICENSE_FILES = LICENSE.txt
|
2017-01-22 22:00:20 +01:00
|
|
|
BCTOOLBOX_INSTALL_STAGING = YES
|
|
|
|
|
2017-02-14 23:44:02 +01:00
|
|
|
# Set CMAKE_SKIP_RPATH to prevent bctoolbox from adding the rpath to
|
|
|
|
# shared library.
|
2017-01-22 22:00:20 +01:00
|
|
|
BCTOOLBOX_CONF_OPTS = \
|
2017-03-16 14:04:34 +01:00
|
|
|
-DENABLE_POLARSSL=OFF \
|
2017-01-22 22:00:20 +01:00
|
|
|
-DENABLE_STRICT=OFF \
|
|
|
|
-DENABLE_TESTS_COMPONENT=OFF \
|
|
|
|
-DENABLE_TESTS=OFF \
|
2017-02-14 23:44:02 +01:00
|
|
|
-DCMAKE_SKIP_RPATH=ON
|
2017-01-22 22:00:20 +01:00
|
|
|
|
2020-02-27 18:47:09 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBICONV),y)
|
|
|
|
BCTOOLBOX_DEPENDENCIES += libiconv
|
|
|
|
BCTOOLBOX_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -liconv"
|
|
|
|
endif
|
|
|
|
|
bctoolbox: fix mbedtls/polarssl dependency
Currently we force selection on mbedtls for bctoolbox. If, for whatever
reason, mbedTLS is not found, bctoolbox searches for PolarSSL and, if
not present, fails with:
```
Could NOT find PolarSSL (missing: POLARSSL_INCLUDE_DIRS
HAVE_POLARSSL_SSL_H)
```
This happens because bctoolbox enables support for mbedTLS and PolarSSL
by default, whereas, if both are enabled, mbedTLS is preferred over
PolarSSL.
However, crypto support is not mandatory and support for both libraries
can be turned off. Therefore, optionally depend on mbedTLS or PolarSSL
and enable/disable the library support explicitly.
This fixes the issue of searching for PolarSSL altough the dependency is
not declared in the bctoolbox package.
Note, that this does not fix the issue why mbedtls is not found although
it is enabled. This issue is address in this thread [1].
Fixes:
http://autobuild.buildroot.net/results/cfe/cfeb2f542598e5d450b332fb51a6d79bae24158c/
.. and more.
[1] http://lists.busybox.net/pipermail/buildroot/2017-February/183055.html
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-02-14 23:44:01 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_MBEDTLS),y)
|
|
|
|
BCTOOLBOX_DEPENDENCIES += mbedtls
|
|
|
|
BCTOOLBOX_CONF_OPTS += -DENABLE_MBEDTLS=ON
|
|
|
|
else
|
|
|
|
BCTOOLBOX_CONF_OPTS += -DENABLE_MBEDTLS=OFF
|
|
|
|
endif
|
|
|
|
|
2017-01-22 22:00:20 +01:00
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
|
|
|
BCTOOLBOX_CONF_OPTS += -DENABLE_SHARED=OFF -DENABLE_STATIC=ON
|
|
|
|
else ifeq ($(BR2_SHARED_STATIC_LIBS),y)
|
|
|
|
BCTOOLBOX_CONF_OPTS += -DENABLE_SHARED=ON -DENABLE_STATIC=ON
|
|
|
|
else ifeq ($(BR2_SHARED_LIBS),y)
|
|
|
|
BCTOOLBOX_CONF_OPTS += -DENABLE_SHARED=ON -DENABLE_STATIC=OFF
|
|
|
|
endif
|
|
|
|
|
|
|
|
$(eval $(cmake-package))
|