Explorar el Código

package/libest: auto-select safeclib to avoid use of bundled copy of library

Support for libsafec can not be completely disabled - currently,
--disable-safec does not exactly allow for compiling libest on
systems without libsafec, but instead just uses bundled copy of
library from safe_c_stub/

To avoid that, do automatically select the full-featured safeclib
package and always use --with-system-libsafec

Signed-off-by: Aleksandr Makarov <aleksandr.o.makarov@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Aleksandr Makarov hace 3 años
padre
commit
a36b947d52
Se han modificado 2 ficheros con 6 adiciones y 9 borrados
  1. 1 0
      package/libest/Config.in
  2. 5 9
      package/libest/libest.mk

+ 1 - 0
package/libest/Config.in

@@ -7,6 +7,7 @@ config BR2_PACKAGE_LIBEST
 	select BR2_PACKAGE_LIBEXECINFO if !BR2_TOOLCHAIN_USES_GLIBC
 	select BR2_PACKAGE_OPENSSL
 	select BR2_PACKAGE_OPENSSL_FORCE_LIBOPENSSL
+	select BR2_PACKAGE_SAFECLIB
 	help
 	  libest is a C implementation of RFC 7030 (Enrollment over
 	  Secure Transport).

+ 5 - 9
package/libest/libest.mk

@@ -12,14 +12,17 @@ LIBEST_LICENSE = BSD-3-Clause, MIT, W3C
 LIBEST_LICENSE_FILES = LICENSE
 LIBEST_INSTALL_STAGING = YES
 LIBEST_AUTORECONF = YES
-LIBEST_DEPENDENCIES = openssl host-pkgconf
+LIBEST_DEPENDENCIES = openssl host-pkgconf safeclib
 # libcoap support is explicitly disabled because it breaks the build
+# libsafec support is explicitly enabled because we want to avoid
+# possible hidden use of bundled copy of library.
 LIBEST_CONF_OPTS = \
 	--with-ssl-dir=$(STAGING_DIR)/usr \
 	$(if $(BR2_TOOLCHAIN_HAS_THREADS),--enable-pthreads,--disable-pthreads) \
 	$(if $(BR2_PACKAGE_LIBEST_BRSKI),--enable-brski,--disable-brski) \
 	--disable-examples \
-	--without-libcoap-dir
+	--without-libcoap-dir \
+	--with-system-libsafec
 
 ifeq ($(BR2_PACKAGE_LIBEXECINFO),y)
 LIBEST_DEPENDENCIES += libexecinfo
@@ -55,13 +58,6 @@ else
 LIBEST_CONF_OPTS += --without-uriparser-dir
 endif
 
-ifeq ($(BR2_PACKAGE_SAFECLIB),y)
-LIBEST_CONF_OPTS += --with-system-libsafec
-LIBEST_DEPENDENCIES += safeclib
-else
-LIBEST_CONF_OPTS += --without-system-libsafec
-endif
-
 define LIBEST_INSTALL_PC
 	$(INSTALL) -c -m 0644 $(LIBEST_PKGDIR)/libest.pc \
 		$(STAGING_DIR)/usr/lib/pkgconfig/libest.pc