From 3d0360712089237d4f2f80dcb4554f63dabcc77c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Wed, 8 Apr 2020 13:22:00 +0200 Subject: [PATCH] mysql: fix cross build Closes: #20741 --- srcpkgs/mysql/template | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/srcpkgs/mysql/template b/srcpkgs/mysql/template index 60af7eb0f2..88b02dd062 100644 --- a/srcpkgs/mysql/template +++ b/srcpkgs/mysql/template @@ -46,23 +46,31 @@ pre_configure() { if [ "$CROSS_BUILD" ]; then CC= CXX= CPP= LD= AR= AS= RANLIB= CFLAGS= CXXFLAGS= LDFLAGS= cmake . make comp_err comp_sql gen_lex_hash gen_lex_token - mkdir -p bin.host - cp extra/comp_err bin.host - cp scripts/comp_sql bin.host - cp sql/gen_lex_hash bin.host - cp sql/gen_lex_token bin.host + mkdir -p bin.host/{extra,scripts,sql} + cp extra/comp_err bin.host/extra + cp scripts/comp_sql bin.host/scripts + cp sql/gen_lex_hash bin.host/sql + cp sql/gen_lex_token bin.host/sql make clean + # Remove the rules for the host binaries to not + # have them overwritten with target binaries rm CMakeCache.txt + vsed -i ${wrksrc}/scripts/CMakeLists.txt \ + -e "/ADD_EXECUTABLE(comp_sql/d" + vsed -i ${wrksrc}/sql/CMakeLists.txt \ + -e "/ADD_EXECUTABLE(gen_lex_hash/d" \ + -e "/ADD_EXECUTABLE(gen_lex_token/d" \ + -e "/ADD_DEPENDENCIES(gen_lex_token/d" fi } pre_build() { if [ "$CROSS_BUILD" ]; then - cp bin.host/comp_err ${wrksrc}/extra - cp bin.host/comp_sql ${wrksrc}/scripts - cp bin.host/gen_lex_hash ${wrksrc}/sql - cp bin.host/gen_lex_token ${wrksrc}/sql - export PATH=${PATH}:${wrksrc}/extra:${wrksrc}/scripts:${wrksrc}/sql + mkdir -p ${wrksrc}/build + cp -a ${wrksrc}/bin.host/* ${wrksrc}/build + mkdir -p ${wrksrc}/build/libmysqld + cp ${wrksrc}/bin.host/sql/gen_lex_token ${wrksrc}/build/libmysqld + export PATH=${PATH}:${wrksrc}/build/extra:${wrksrc}/build/scripts:${wrksrc}/build/sql fi }