From 37e26947565df581e2e0e1b41b0d5b4a3e8a7df1 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Sun, 28 Aug 2022 21:54:45 +0200 Subject: [PATCH] package/mbedtls: use pre-configure, not post-patch, hooks to configure Currently, we use post-patch hooks to apply our configuration settings. This works, but this is semantically wrong; post-patch hooks are there to amend the source code to actually fix it (i.e. because it can't be done with a patch for example). Configuring the package, on the other hand, belong to the configure step, and if we need to tweak the source code for configuration purposes, this should be done in pre-configure hooks. Signed-off-by: Yann E. MORIN Cc: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- package/mbedtls/mbedtls.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/mbedtls/mbedtls.mk b/package/mbedtls/mbedtls.mk index 1a888e8c67..49ea7886f6 100644 --- a/package/mbedtls/mbedtls.mk +++ b/package/mbedtls/mbedtls.mk @@ -25,7 +25,7 @@ define MBEDTLS_ENABLE_THREADING $(SED) "s://#define MBEDTLS_THREADING_PTHREAD:#define MBEDTLS_THREADING_PTHREAD:" \ $(@D)/include/mbedtls/config.h endef -MBEDTLS_POST_PATCH_HOOKS += MBEDTLS_ENABLE_THREADING +MBEDTLS_PRE_CONFIGURE_HOOKS += MBEDTLS_ENABLE_THREADING ifeq ($(BR2_STATIC_LIBS),y) MBEDTLS_CONF_OPTS += -DLINK_WITH_PTHREAD=ON endif @@ -49,7 +49,7 @@ define MBEDTLS_ENABLE_ZLIB $(SED) "s://#define MBEDTLS_ZLIB_SUPPORT:#define MBEDTLS_ZLIB_SUPPORT:" \ $(@D)/include/mbedtls/config.h endef -MBEDTLS_POST_PATCH_HOOKS += MBEDTLS_ENABLE_ZLIB +MBEDTLS_PRE_CONFIGURE_HOOKS += MBEDTLS_ENABLE_ZLIB else MBEDTLS_CONF_OPTS += -DENABLE_ZLIB_SUPPORT=OFF endif @@ -77,7 +77,7 @@ define MBEDTLS_ENABLE_DTLS_SRTP $(SED) "s://#define MBEDTLS_SSL_DTLS_SRTP:#define MBEDTLS_SSL_DTLS_SRTP:" \ $(@D)/include/mbedtls/config.h endef -MBEDTLS_POST_PATCH_HOOKS += MBEDTLS_ENABLE_DTLS_SRTP +MBEDTLS_PRE_CONFIGURE_HOOKS += MBEDTLS_ENABLE_DTLS_SRTP endif $(eval $(cmake-package))