]> git.pld-linux.org Git - packages/mysql.git/commitdiff
- revert to readline
authorAdam Osuchowski <adwol@pld-linux.org>
Sun, 9 Feb 2014 06:07:06 +0000 (07:07 +0100)
committerAdam Osuchowski <adwol@pld-linux.org>
Sun, 9 Feb 2014 06:07:06 +0000 (07:07 +0100)
mysql-cmake.patch [new file with mode: 0644]
mysql-readline.patch [new file with mode: 0644]
mysql.spec

diff --git a/mysql-cmake.patch b/mysql-cmake.patch
new file mode 100644 (file)
index 0000000..7b7ae1c
--- /dev/null
@@ -0,0 +1,59 @@
+--- Percona-Server-5.6.15-rel63.0/cmake/readline.cmake.orig    2013-12-18 10:52:13.000000000 +0100
++++ Percona-Server-5.6.15-rel63.0/cmake/readline.cmake 2014-02-09 06:17:56.079619159 +0100
+@@ -131,23 +131,23 @@
+ MACRO (FIND_SYSTEM_EDITLINE)
+   FIND_PATH(FOUND_EDITLINE_READLINE
+-    NAMES editline/readline.h
++    NAMES readline/readline.h
+   )
+   IF(FOUND_EDITLINE_READLINE)
+-    SET(EDITLINE_INCLUDE_DIR "${FOUND_EDITLINE_READLINE}/editline")
++    SET(EDITLINE_INCLUDE_DIR "${FOUND_EDITLINE_READLINE}/readline")
+   ELSE()
+     # Different path on FreeBSD
+     FIND_PATH(FOUND_EDIT_READLINE_READLINE
+       NAMES edit/readline/readline.h
+     )
+     IF(FOUND_EDIT_READLINE_READLINE)
+-      SET(EDITLINE_INCLUDE_DIR "${FOUND_EDIT_READLINE_READLINE}/edit/readline")
++      SET(EDITLINE_INCLUDE_DIR "${FOUND_EDIT_READLINE_READLINE}/readline")
+     ENDIF()
+   ENDIF()
+   FIND_LIBRARY(EDITLINE_LIBRARY
+     NAMES
+-    edit
++    readline
+   )
+   MARK_AS_ADVANCED(EDITLINE_INCLUDE_DIR EDITLINE_LIBRARY)
+@@ -160,7 +160,7 @@
+     SET(CMAKE_REQUIRED_LIBRARIES ${EDITLINE_LIBRARY})
+     CHECK_CXX_SOURCE_COMPILES("
+     #include <stdio.h>
+-    #include <readline.h>
++    #include <readline/history.h>
+     int main(int argc, char **argv)
+     {
+        HIST_ENTRY entry;
+@@ -170,14 +170,13 @@
+     CHECK_CXX_SOURCE_COMPILES("
+     #include <stdio.h>
+-    #include <readline.h>
++    #include <readline/readline.h>
+     int main(int argc, char **argv)
+     {
+-      typedef int MYFunction(const char*, int);
+-      MYFunction* myf= rl_completion_entry_function;
+-      int res= (myf)(NULL, 0);
+-      completion_matches(0,0);
+-      return res;
++      rl_compentry_func_t *myf= rl_completion_entry_function;
++      char *res= (myf)(NULL, 0);
++      rl_completion_matches(0,0);
++      return res ? 0 : 1;
+     }"
+     EDITLINE_HAVE_COMPLETION)
diff --git a/mysql-readline.patch b/mysql-readline.patch
new file mode 100644 (file)
index 0000000..ed12c3a
--- /dev/null
@@ -0,0 +1,21 @@
+--- Percona-Server-5.6.15-rel63.0/client/mysql.cc.orig 2014-02-09 06:23:16.085128298 +0100
++++ Percona-Server-5.6.15-rel63.0/client/mysql.cc      2014-02-09 06:38:54.561791068 +0100
+@@ -103,7 +103,9 @@
+ #include <conio.h>
+ #else
+ #include <readline.h>
++#include <history.h>
+ #define HAVE_READLINE
++#define USE_NEW_READLINE_INTERFACE
+ #define USE_POPEN
+ #endif
+   //int vidattr(long unsigned int attrs);     // Was missing in sun curses
+@@ -1107,7 +1109,7 @@
+ } HIST_ENTRY; 
+ #endif
+-extern "C" int add_history(const char *command); /* From readline directory */
++extern "C" void add_history(const char *command); /* From readline directory */
+ extern "C" int read_history(const char *command);
+ extern "C" int write_history(const char *command);
+ extern "C" HIST_ENTRY *history_get(int num);
index 565a3ad25301fb03fda6d15d5931ff903fbf6dcd..ad91a7169e423b246d50e6dbbdff24b6817c3322 100644 (file)
@@ -23,7 +23,7 @@
 %bcond_with    tests           # FIXME: don't run correctly
 %bcond_with    ndb             # NDB is now a separate product, this here is broken, so disable it
 
-%define                rel     2
+%define                rel     3
 %define                percona_rel     63.0
 %include       /usr/lib/rpm/macros.perl
 Summary:       MySQL: a very fast and reliable SQL database engine
@@ -76,10 +76,12 @@ Patch20:    %{name}-dubious-exports.patch
 Patch21:       bison3.patch
 Patch22:       bug-66589.patch
 Patch23:       bug-44278.patch
+Patch24:       %{name}-cmake.patch
+Patch25:       %{name}-readline.patch
 URL:           http://www.mysql.com/products/community/
 BuildRequires: bison >= 1.875
 BuildRequires: cmake >= 2.6
-BuildRequires: libedit-devel
+BuildRequires: readline-devel >= 6.2
 %if "%{pld_release}" == "ac"
 BuildRequires: libstdc++4-devel >= 5:4.0
 %else
@@ -305,6 +307,7 @@ Summary(uk.UTF-8):  MySQL клієнт
 Group:         Applications/Databases
 Requires:      %{name}-charsets = %{version}-%{release}
 Requires:      %{name}-libs = %{version}-%{release}
+Requires:      readline >= 6.2
 Obsoletes:     MySQL-client
 
 %description client
@@ -510,6 +513,8 @@ mv sphinx-*/mysqlse storage/sphinx
 %patch21 -p1
 %patch22 -p1
 %patch23 -p1
+%patch24 -p1
+%patch25 -p1
 
 # to get these files rebuild
 [ -f sql/sql_yacc.cc ] && rm sql/sql_yacc.cc
This page took 0.057146 seconds and 4 git commands to generate.