From 359205b4f5b151a6ddff93cd75fd569a6f5c54b4 Mon Sep 17 00:00:00 2001 From: James Hilliard Date: Fri, 6 Jan 2023 18:04:34 -0700 Subject: [PATCH] package/hiredis: enable host package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The host-hiredis package is needed for the upcoming ccache update. So, being a dependency of ccache, we can't use ccache, so we must unset the options set by the cmake infra (this will be true only when we eventually bump ccache, but hiredis builds very fast even without ccache so we don't care about ccache even now). Reorder CONF_OPTS assignments so that comments apply equally to the host and target variants. Cc: Dominik Michael Rauh Cc: Anders F Björklund Signed-off-by: James Hilliard [yann.morin.1998@free.fr: - add Dominik and Anders in Cc to ack they provided inspiration - use -Ufoo instead of -Dfoo="" (as per Dominik & Anders) - reorder CONF_OPTS assignments ] Signed-off-by: Yann E. MORIN --- package/hiredis/hiredis.mk | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/package/hiredis/hiredis.mk b/package/hiredis/hiredis.mk index f79b6c757a..a2f7627b58 100644 --- a/package/hiredis/hiredis.mk +++ b/package/hiredis/hiredis.mk @@ -11,9 +11,14 @@ HIREDIS_LICENSE = BSD-3-Clause HIREDIS_LICENSE_FILES = COPYING HIREDIS_CPE_ID_VENDOR = redislabs HIREDIS_INSTALL_STAGING = YES + +HIREDIS_CONF_OPTS = -DDISABLE_TESTS=ON +HOST_HIREDIS_CONF_OPTS = -DDISABLE_TESTS=ON -DENABLE_SSL=OFF + # Set CMAKE_BUILD_TYPE to Release or the libraries will be suffixed with "d" -# resulting in a build failure with collectd -HIREDIS_CONF_OPTS = -DCMAKE_BUILD_TYPE=Release -DDISABLE_TESTS=ON +# resulting in build failures when linking. +HIREDIS_CONF_OPTS += -DCMAKE_BUILD_TYPE=Release +HOST_HIREDIS_CONF_OPTS += -DCMAKE_BUILD_TYPE=Release ifeq ($(BR2_PACKAGE_OPENSSL)$(BR2_TOOLCHAIN_HAS_THREADS),yy) HIREDIS_CONF_OPTS += -DENABLE_SSL=ON @@ -22,4 +27,11 @@ else HIREDIS_CONF_OPTS += -DENABLE_SSL=OFF endif +# We may be a ccache dependency, so we can't use ccache; reset the +# options set by the cmake infra. +HOST_HIREDIS_CONF_OPTS += \ + -UCMAKE_C_COMPILER_LAUNCHER \ + -UCMAKE_CXX_COMPILER_LAUNCHER + $(eval $(cmake-package)) +$(eval $(host-cmake-package))