mbedtls: Apply configuration in Configure instead of Prepare

This ensures mbedtls_config.h is correctly updated and the package rebuilt
accordingly when configuration options are changed after the source is first
prepared.

Signed-off-by: Karsten Sperling <ksperling@apple.com>
Link: https://github.com/openwrt/openwrt/pull/19358
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
Karsten Sperling 2025-07-08 13:25:39 +12:00 committed by Hauke Mehrtens
parent 0ac2d64d92
commit 5359639c2b

View file

@ -137,14 +137,12 @@ CMAKE_OPTIONS += \
-DENABLE_TESTING:Bool=OFF \ -DENABLE_TESTING:Bool=OFF \
-DENABLE_PROGRAMS:Bool=ON -DENABLE_PROGRAMS:Bool=ON
define Build/Prepare define Build/Configure
$(call Build/Prepare/Default) $(call Build/Configure/Default,)
$(foreach opt,$(MBEDTLS_BUILD_OPTS),
$(if $(strip $(foreach opt,$(MBEDTLS_BUILD_OPTS),$($(opt)))), $(PKG_BUILD_DIR)/scripts/config.py \
$(foreach opt,$(MBEDTLS_BUILD_OPTS), -f $(PKG_BUILD_DIR)/include/mbedtls/mbedtls_config.h \
$(PKG_BUILD_DIR)/scripts/config.py \ $(if $($(opt)),set,unset) $(patsubst CONFIG_%,%,$(opt)))
-f $(PKG_BUILD_DIR)/include/mbedtls/mbedtls_config.h \
$(if $($(opt)),set,unset) $(patsubst CONFIG_%,%,$(opt))),)
endef endef
define Build/InstallDev define Build/InstallDev