mysql-workbench: fix build
This commit is contained in:
parent
0e619d7837
commit
675e083b69
2 changed files with 38 additions and 10 deletions
|
@ -80,14 +80,16 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
|
||||
# a newer libxml2 version has changed some interfaces
|
||||
./fix-xml2.patch
|
||||
|
||||
# Don't try to override the ANTLR_JAR_PATH specified in cmakeFlags
|
||||
./dont-search-for-antlr-jar.patch
|
||||
];
|
||||
|
||||
# 1. have it look for 4.12.0 instead of 4.11.1
|
||||
# 2. for some reason CMakeCache.txt is part of source code
|
||||
preConfigure = ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace "antlr-4.11.1-complete.jar" "antlr-4.12.0-complete.jar"
|
||||
postPatch = ''
|
||||
# For some reason CMakeCache.txt is part of source code, remove it
|
||||
rm -f build/CMakeCache.txt
|
||||
|
||||
patchShebangs tools/get_wb_version.sh
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -139,10 +141,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
zstd
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs tools/get_wb_version.sh
|
||||
'';
|
||||
|
||||
# GCC 13: error: 'int64_t' in namespace 'std' does not name a type
|
||||
# when updating the version make sure this is still needed
|
||||
env.CXXFLAGS = "-include cstdint";
|
||||
|
@ -164,7 +162,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
# mysql-workbench 8.0.21 depends on libmysqlconnectorcpp 1.1.8.
|
||||
# Newer versions of connector still provide the legacy library when enabled
|
||||
# but the headers are in a different location.
|
||||
"-DWITH_ANTLR_JAR=${antlr4_12.jarLocation}"
|
||||
"-DANTLR_JAR_PATH=${antlr4_12.jarLocation}"
|
||||
"-DMySQLCppConn_INCLUDE_DIR=${libmysqlconnectorcpp}/include/jdbc"
|
||||
];
|
||||
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index b7320bb..d7169da 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -143,25 +143,6 @@ check_function_exists (strtoull HAVE_STRTOULL)
|
||||
check_function_exists (strtoimax HAVE_STRTOIMAX)
|
||||
check_function_exists (strtoumax HAVE_STRTOUMAX)
|
||||
|
||||
-set(ANTLR_JAR_FILENAME "antlr-4.11.1-complete.jar")
|
||||
-get_filename_component(SOURCE_PARENT_DIR ${CMAKE_SOURCE_DIR} DIRECTORY)
|
||||
-set(LINUX_RES_BIN_DIR ${SOURCE_PARENT_DIR}/linux-res/bin)
|
||||
-message("WITH_ANTLR_JAR: ${WITH_ANTLR_JAR}")
|
||||
-if(WITH_ANTLR_JAR)
|
||||
- get_filename_component(ANTLR_JAR_USER_DIR ${WITH_ANTLR_JAR} DIRECTORY)
|
||||
- find_path(ANTLR_JAR_PATH ${ANTLR_JAR_FILENAME} ${LINUX_RES_BIN_DIR} ${ANTLR_JAR_USER_DIR})
|
||||
-else(WITH_ANTLR_JAR)
|
||||
- find_path(ANTLR_JAR_PATH ${ANTLR_JAR_FILENAME} ${LINUX_RES_BIN_DIR})
|
||||
-endif(WITH_ANTLR_JAR)
|
||||
-
|
||||
-if(ANTLR_JAR_PATH AND Java_JAVA_EXECUTABLE)
|
||||
- set(ANTLR_JAR_PATH ${ANTLR_JAR_PATH}/${ANTLR_JAR_FILENAME})
|
||||
- message(STATUS "ANTLR jar: " ${ANTLR_JAR_PATH})
|
||||
-else()
|
||||
- message(WARNING ${ANTLR_JAR_FILENAME} " or java runtime wasn't found which is required if you'd like to rebuild Lexer and Parser files")
|
||||
-endif()
|
||||
-
|
||||
-
|
||||
if (UNIX)
|
||||
if (NOT LIB_INSTALL_DIR)
|
||||
set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib")
|
Loading…
Reference in a new issue