From 7d3c2a1e486ac10a15f4c61c71d08c4100589ef8 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Thu, 29 Aug 2024 23:58:28 +0000 Subject: [PATCH] native/libmysqlclient: Fix build by using legacy cmake version Ported over code from mk/spksrc.cross-cmake-env.mk to mk/spksrc.native-cmake-env.mk to handle similarly options: - USE_NATIVE_CMAKE_LEGACY - USE_NATIVE_CMAKE --- mk/spksrc.native-cmake-env.mk | 13 +++++++++++-- native/libmysqlclient/Makefile | 2 ++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/mk/spksrc.native-cmake-env.mk b/mk/spksrc.native-cmake-env.mk index 4b4b71c5490..375d1da2d10 100644 --- a/mk/spksrc.native-cmake-env.mk +++ b/mk/spksrc.native-cmake-env.mk @@ -3,11 +3,20 @@ CMAKE_ARGS += -DCMAKE_INSTALL_PREFIX=$(INSTALL_PREFIX) CMAKE_ARGS += -DCMAKE_BUILD_TYPE=Release -# Use native cmake +# Use native cmake (latest stable) ifeq ($(strip $(USE_NATIVE_CMAKE)),1) BUILD_DEPENDS += native/cmake - CMAKE_PATH = $(realpath $(WORK_DIR)/../../../native/cmake/work-native/install/usr/local/bin) + CMAKE_PATH = $(abspath $(CURDIR)/../../native/cmake/work-native/install/usr/local/bin) ENV += PATH=$(CMAKE_PATH):$$PATH + export PATH := $(CMAKE_PATH):$(PATH) +endif + +# Use native cmake (Debian 10 "Buster") +ifeq ($(strip $(USE_NATIVE_CMAKE_LEGACY)),1) + BUILD_DEPENDS += native/cmake-legacy + CMAKE_PATH = $(abspath $(CURDIR)/../../native/cmake-legacy/work-native/install/usr/local/bin) + ENV += PATH=$(CMAKE_PATH):$$PATH + export PATH := $(CMAKE_PATH):$(PATH) endif # Use ninja to build diff --git a/native/libmysqlclient/Makefile b/native/libmysqlclient/Makefile index 906c1b73c42..8a057dbaae0 100644 --- a/native/libmysqlclient/Makefile +++ b/native/libmysqlclient/Makefile @@ -15,6 +15,8 @@ LICENSE = GNU GPLv2 PRE_INSTALL_TARGET = libmysqlclient_pre_install +USE_NATIVE_CMAKE_LEGACY = 1 + # MySQL specific: CMAKE_ARGS += -DSTACK_DIRECTION=1 CMAKE_ARGS += -DWITH_UNIT_TESTS=OFF