]> TLD Linux GIT Repositories - packages/mysql.git/blob - mysql-cmake.patch
- fix zlib library being listed as incorrect -lzlib instead of -lz
[packages/mysql.git] / mysql-cmake.patch
1 diff -ur percona-server-5.7.28-31.orig/cmake/readline.cmake percona-server-5.7.28-31/cmake/readline.cmake
2 --- percona-server-5.7.28-31.orig/cmake/readline.cmake  2019-12-16 23:52:33.110000000 +0100
3 +++ percona-server-5.7.28-31/cmake/readline.cmake       2019-12-16 23:53:01.681000000 +0100
4 @@ -119,23 +119,23 @@
5  
6  MACRO (FIND_SYSTEM_EDITLINE)
7    FIND_PATH(FOUND_EDITLINE_READLINE
8 -    NAMES editline/readline.h
9 +    NAMES readline/readline.h
10    )
11    IF(FOUND_EDITLINE_READLINE)
12 -    SET(EDITLINE_INCLUDE_DIR "${FOUND_EDITLINE_READLINE}/editline")
13 +    SET(EDITLINE_INCLUDE_DIR "${FOUND_EDITLINE_READLINE}/readline")
14    ELSE()
15      # Different path on FreeBSD
16      FIND_PATH(FOUND_EDIT_READLINE_READLINE
17        NAMES edit/readline/readline.h
18      )
19      IF(FOUND_EDIT_READLINE_READLINE)
20 -      SET(EDITLINE_INCLUDE_DIR "${FOUND_EDIT_READLINE_READLINE}/edit/readline")
21 +      SET(EDITLINE_INCLUDE_DIR "${FOUND_EDIT_READLINE_READLINE}/readline")
22      ENDIF()
23    ENDIF()
24  
25    FIND_LIBRARY(EDITLINE_LIBRARY
26      NAMES
27 -    edit
28 +    readline
29    )
30    MARK_AS_ADVANCED(EDITLINE_INCLUDE_DIR EDITLINE_LIBRARY)
31  
32 @@ -148,7 +148,7 @@
33      SET(CMAKE_REQUIRED_LIBRARIES ${EDITLINE_LIBRARY})
34      CHECK_CXX_SOURCE_COMPILES("
35      #include <stdio.h>
36 -    #include <readline.h>
37 +    #include <readline/history.h>
38      int main(int argc, char **argv)
39      {
40         HIST_ENTRY entry;
41 @@ -158,14 +158,13 @@
42  
43      CHECK_CXX_SOURCE_COMPILES("
44      #include <stdio.h>
45 -    #include <readline.h>
46 +    #include <readline/readline.h>
47      int main(int argc, char **argv)
48      {
49 -      typedef int MYFunction(const char*, int);
50 -      MYFunction* myf= rl_completion_entry_function;
51 -      int res= (myf)(NULL, 0);
52 -      completion_matches(0,0);
53 -      return res;
54 +      rl_compentry_func_t *myf= rl_completion_entry_function;
55 +      char *res= (myf)(NULL, 0);
56 +      rl_completion_matches(0,0);
57 +      return res ? 0 : 1;
58      }"
59      EDITLINE_HAVE_COMPLETION_INT)
60