pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/databases/mariadb55-client



Module Name:    pkgsrc
Committed By:   roy
Date:           Fri Feb  3 16:20:18 UTC 2017

Modified Files:
        pkgsrc/databases/mariadb55-client: Makefile.common distinfo
        pkgsrc/databases/mariadb55-client/patches: patch-client_mysql.cc
            patch-cmake_readline.cmake

Log Message:
Fix build with clang and libedit.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 pkgsrc/databases/mariadb55-client/Makefile.common
cvs rdiff -u -r1.5 -r1.6 pkgsrc/databases/mariadb55-client/distinfo
cvs rdiff -u -r1.2 -r1.3 \
    pkgsrc/databases/mariadb55-client/patches/patch-client_mysql.cc \
    pkgsrc/databases/mariadb55-client/patches/patch-cmake_readline.cmake

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/databases/mariadb55-client/Makefile.common
diff -u pkgsrc/databases/mariadb55-client/Makefile.common:1.4 pkgsrc/databases/mariadb55-client/Makefile.common:1.5
--- pkgsrc/databases/mariadb55-client/Makefile.common:1.4       Tue Sep 13 19:15:13 2016
+++ pkgsrc/databases/mariadb55-client/Makefile.common   Fri Feb  3 16:20:18 2017
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.4 2016/09/13 19:15:13 maya Exp $
+# $NetBSD: Makefile.common,v 1.5 2017/02/03 16:20:18 roy Exp $
 #
 # used by databases/mariadb55-client/Makefile
 # used by databases/mariadb55-server/Makefile
@@ -63,7 +63,6 @@ CMAKE_ARGS+=          -DINSTALL_SUPPORTFILESDIR=
 CMAKE_ARGS+=           -DMYSQL_DATADIR=${MYSQL_DATADIR}
 
 # always use our own readline, not MySQL bundled one
-CMAKE_ARGS+=           -DWITH_LIBEDIT=OFF
 CMAKE_ARGS+=           -DWITH_READLINE=OFF
 CMAKE_ARGS+=           -DDEFAULT_CHARSET=${MYSQL_CHARSET:Q}
 CMAKE_ARGS+=           -DDEFAULT_COLLATION=${MYSQL_COLLATION:Q}
@@ -120,12 +119,9 @@ SUBST_MESSAGE.scr= Fixing scripts.
 
 .include "../../mk/readline.buildlink3.mk"
 .if !empty(READLINE_TYPE:Mreadline)
-CMAKE_ARGS+=   -DREADLINE_FOUND=system
-LDFLAGS+=      -lreadline
+CMAKE_ARGS+=    -DREADLINE_INCLUDE_DIR=${BUILDLINK_PREFIX.editlinereadline}/include/readline
 .else
-CMAKE_ARGS+=   -DLIBEDIT_FOUND=system
-LDFLAGS+=      -ledit
+CMAKE_ARGS+=    -DLIBEDIT_INCLUDE_DIR=${BUILDLINK_PREFIX.editlinereadline}/include/readline
 .endif
-CMAKE_ARGS+=   -DREADLINE_INCLUDE_DIR=${BUILDLINK_PREFIX.editlinereadline}/include/readline
 
 .include "../../devel/zlib/buildlink3.mk"

Index: pkgsrc/databases/mariadb55-client/distinfo
diff -u pkgsrc/databases/mariadb55-client/distinfo:1.5 pkgsrc/databases/mariadb55-client/distinfo:1.6
--- pkgsrc/databases/mariadb55-client/distinfo:1.5      Tue Sep 13 19:15:13 2016
+++ pkgsrc/databases/mariadb55-client/distinfo  Fri Feb  3 16:20:18 2017
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.5 2016/09/13 19:15:13 maya Exp $
+$NetBSD: distinfo,v 1.6 2017/02/03 16:20:18 roy Exp $
 
 SHA1 (mariadb-5.5.52.tar.gz) = bbedcc0eba7580d1ef16f2dfe4868cf9f31a636d
 RMD160 (mariadb-5.5.52.tar.gz) = fcad9e40ecd29b341a8cdc42afc18aa83b85e60c
@@ -11,14 +11,14 @@ Size (sphinx-2.2.7-release.tar.gz) = 296
 SHA1 (patch-BUILD_compile-pentium-gcov) = 02b414235a2cdfc1d5c95946010e0cdbada76c5d
 SHA1 (patch-CMakeLists.txt) = 9c56523626837ab83ecef26f1c0609e084976fa7
 SHA1 (patch-client_completion_hash.cc) = 810dab31e17a19804323059d38f5ec7f0d55c3ab
-SHA1 (patch-client_mysql.cc) = bb50cbd627ce71bcc792ad285016e0269dbc741c
+SHA1 (patch-client_mysql.cc) = e2f1ef8325d08c8bc68ea0849f0cc8d49f9a69a1
 SHA1 (patch-client_mysqladmin.cc) = ab05c6944d50c9b22365426656f0b61a5906d632
 SHA1 (patch-client_mysqlbinlog.cc) = 00146dfd7d0a6e0bb1a8c30395bc707af3b4a6c7
 SHA1 (patch-client_mysqlshow.c) = 82ddfb98ab85b3e96e56b5ecc0df25cc315b8dbc
 SHA1 (patch-cmake_dtrace.cmake) = 460799dee4d7f9d6c1e3b2dbf0412f8576297991
 SHA1 (patch-cmake_libutils.cmake) = 0c3f25f8e73ab0a062b539a8d551342a6ddf57c4
 SHA1 (patch-cmake_plugin.cmake) = b7566d25c80c2492a96c5617b96f9b6212b0fe93
-SHA1 (patch-cmake_readline.cmake) = eeadad96a6c8f042c82134b5488956f8094ba4ac
+SHA1 (patch-cmake_readline.cmake) = 4652c45743919857a888fa216fc6bd0a6567d9c9
 SHA1 (patch-config.h.cmake) = 75d4c09eb34353057c6a8e36523f55d1bfdace59
 SHA1 (patch-include_CMakeLists.txt) = 9ce9db088fda6ed76039b818c27b74d584bae151
 SHA1 (patch-include_my__context.h) = 16e9f69c35243967e5b95022b0350b36c02725da

Index: pkgsrc/databases/mariadb55-client/patches/patch-client_mysql.cc
diff -u pkgsrc/databases/mariadb55-client/patches/patch-client_mysql.cc:1.2 pkgsrc/databases/mariadb55-client/patches/patch-client_mysql.cc:1.3
--- pkgsrc/databases/mariadb55-client/patches/patch-client_mysql.cc:1.2 Thu May  7 12:45:29 2015
+++ pkgsrc/databases/mariadb55-client/patches/patch-client_mysql.cc     Fri Feb  3 16:20:18 2017
@@ -1,6 +1,6 @@
-$NetBSD: patch-client_mysql.cc,v 1.2 2015/05/07 12:45:29 fhajny Exp $
+$NetBSD: patch-client_mysql.cc,v 1.3 2017/02/03 16:20:18 roy Exp $
 
---- client/mysql.cc.orig       2015-02-13 12:07:00.000000000 +0000
+--- client/mysql.cc.orig       2016-09-12 14:54:54.000000000 +0000
 +++ client/mysql.cc
 @@ -89,7 +89,7 @@ extern "C" {
  #if defined(__WIN__)
@@ -11,9 +11,26 @@ $NetBSD: patch-client_mysql.cc,v 1.2 201
  #define HAVE_READLINE
  #define USE_POPEN
  #endif
-@@ -2640,7 +2640,11 @@ static void initialize_readline (char *n
-   rl_completion_entry_function= &no_completion;
-   rl_add_defun("magic-space", (Function*)&fake_magic_space, -1);
+@@ -2634,20 +2634,20 @@ static void initialize_readline (char *n
+   rl_readline_name = name;
+ 
+   /* Tell the completer that we want a crack first. */
+-#if defined(USE_NEW_READLINE_INTERFACE)
++#if defined(USE_NEW_READLINE_INTERFACE) || defined(USE_LIBEDIT_INTERFACE)
++#if defined(USE_LIBEDIT_INTERFACE) && defined(HAVE_LOCALE_H)
++  setlocale(LC_ALL,""); /* so as libedit use isprint */
++#endif
+   rl_attempted_completion_function= (rl_completion_func_t*)&new_mysql_completion;
+   rl_completion_entry_function= (rl_compentry_func_t*)&no_completion;
+ 
+   rl_add_defun("magic-space", (rl_command_func_t *)&fake_magic_space, -1);
+-#elif defined(USE_LIBEDIT_INTERFACE)
+-#ifdef HAVE_LOCALE_H
+-  setlocale(LC_ALL,""); /* so as libedit use isprint */
+-#endif
+-  rl_attempted_completion_function= (CPPFunction*)&new_mysql_completion;
+-  rl_completion_entry_function= &no_completion;
+-  rl_add_defun("magic-space", (Function*)&fake_magic_space, -1);
  #else
 +# if defined(USE_READLINE_V6)
 +  rl_attempted_completion_function= (rl_completion_func_t*)&new_mysql_completion;
@@ -23,12 +40,12 @@ $NetBSD: patch-client_mysql.cc,v 1.2 201
    rl_completion_entry_function= &no_completion;
  #endif
  }
-@@ -2657,7 +2661,7 @@ static char **new_mysql_completion(const
+@@ -2664,7 +2664,7 @@ static char **new_mysql_completion(const
                                     int end __attribute__((unused)))
  {
    if (!status.batch && !quick)
 -#if defined(USE_NEW_READLINE_INTERFACE)
-+#if defined(USE_NEW_READLINE_INTERFACE) || defined(USE_READLINE_V6)
++#if defined(USE_NEW_READLINE_INTERFACE) || defined(USE_LIBEDIT_INTERFACE) || defined(USE_READLINE_V6)
      return rl_completion_matches(text, new_command_generator);
  #else
      return completion_matches((char *)text, (CPFunction *)new_command_generator);
Index: pkgsrc/databases/mariadb55-client/patches/patch-cmake_readline.cmake
diff -u pkgsrc/databases/mariadb55-client/patches/patch-cmake_readline.cmake:1.2 pkgsrc/databases/mariadb55-client/patches/patch-cmake_readline.cmake:1.3
--- pkgsrc/databases/mariadb55-client/patches/patch-cmake_readline.cmake:1.2    Thu May  7 12:45:29 2015
+++ pkgsrc/databases/mariadb55-client/patches/patch-cmake_readline.cmake        Fri Feb  3 16:20:18 2017
@@ -1,92 +1,17 @@
-$NetBSD: patch-cmake_readline.cmake,v 1.2 2015/05/07 12:45:29 fhajny Exp $
+$NetBSD: patch-cmake_readline.cmake,v 1.3 2017/02/03 16:20:18 roy Exp $
 
-Fix cmake's check build error. Borrowed from mysql56's readline.cmake.
-Fi build with pkgsrc readline>=6 that removed some deprecated symbols.
---- cmake/readline.cmake.orig  2015-02-13 12:07:00.000000000 +0000
+--- cmake/readline.cmake.orig  2016-09-12 14:54:54.000000000 +0000
 +++ cmake/readline.cmake
-@@ -132,7 +132,7 @@ MACRO (MYSQL_FIND_SYSTEM_READLINE)
-     SET(CMAKE_REQUIRED_INCLUDES ${READLINE_INCLUDE_DIR})
-     CHECK_CXX_SOURCE_COMPILES("
-     #include <stdio.h>
--    #include <readline.h>
-+    #include <readline/readline.h>
-     int main(int argc, char **argv)
-     {
-       rl_completion_func_t *func1= (rl_completion_func_t*)0;
-@@ -142,7 +142,7 @@ MACRO (MYSQL_FIND_SYSTEM_READLINE)
- 
-     CHECK_C_SOURCE_COMPILES("
-     #include <stdio.h>
--    #include <readline.h>
-+    #include <readline/readline.h>
-     #if RL_VERSION_MAJOR > 5
-     #error
-     #endif
-@@ -152,6 +152,19 @@ MACRO (MYSQL_FIND_SYSTEM_READLINE)
-     }"
-     READLINE_V5)
- 
-+    CHECK_C_SOURCE_COMPILES("
-+    #include <stdio.h>
-+    #include <readline/readline.h>
-+    #if RL_VERSION_MAJOR < 6
-+    #error
-+    #endif
-+    int main(int argc, char **argv)
-+    {
-+      return 0;
-+    }"
-+    READLINE_V6)
-+    SET(USE_READLINE_V6 ${READLINE_V6})
-+
-     IF(NEW_READLINE_INTERFACE)
-       IF (READLINE_V5)
-         SET(USE_NEW_READLINE_INTERFACE 1)
-@@ -180,8 +193,11 @@ MACRO (MYSQL_FIND_SYSTEM_LIBEDIT)
+@@ -180,8 +180,11 @@ MACRO (MYSQL_FIND_SYSTEM_LIBEDIT)
      #include <readline.h>
      int main(int argc, char **argv)
      {
 -      int res= (*rl_completion_entry_function)(0,0);
-+      typedef int MYFunction(const char*, int);
++      typedef char * MYFunction(const char*, int);
 +      MYFunction* myf= rl_completion_entry_function;
-+      int res= (myf)(NULL, 0);
++      char * res= (myf)(NULL, 0);
        completion_matches(0,0);
-+      return res;
++      return 0;
      }"
      LIBEDIT_INTERFACE)
      SET(USE_LIBEDIT_INTERFACE ${LIBEDIT_INTERFACE})
-@@ -195,32 +211,13 @@ MACRO (MYSQL_CHECK_READLINE)
-     SET(WITH_READLINE OFF CACHE BOOL "Use bundled readline")
-     FIND_CURSES()
- 
--    IF(WITH_READLINE)
--      MYSQL_USE_BUNDLED_READLINE()
--    ELSE()
--      # OSX includes incompatible readline lib
--      IF (NOT APPLE)
--        MYSQL_FIND_SYSTEM_READLINE()
--      ENDIF()
--      IF(USE_NEW_READLINE_INTERFACE)
--        SET(MY_READLINE_INCLUDE_DIR ${READLINE_INCLUDE_DIR})
--        SET(MY_READLINE_LIBRARY ${READLINE_LIBRARY} ${CURSES_LIBRARY})
--      ELSE()
--        MYSQL_FIND_SYSTEM_LIBEDIT()
--        IF(USE_LIBEDIT_INTERFACE)
--          SET(MY_READLINE_INCLUDE_DIR ${LIBEDIT_INCLUDE_DIR})
--          SET(MY_READLINE_LIBRARY ${LIBEDIT_LIBRARY} ${CURSES_LIBRARY})
--        ELSE()
--          MYSQL_USE_BUNDLED_READLINE()
--        ENDIF()
--      ENDIF()
--    ENDIF()
-+    MYSQL_FIND_SYSTEM_READLINE()
- 
-     SET(CMAKE_REQUIRED_LIBRARIES ${MY_READLINE_LIBRARY})
-     SET(CMAKE_REQUIRED_INCLUDES ${MY_READLINE_INCLUDE_DIR})
-     CHECK_CXX_SOURCE_COMPILES("
-     #include <stdio.h>
--    #include <readline.h>
-+    #include <readline/readline.h>
-     int main(int argc, char **argv)
-     {
-        HIST_ENTRY entry;



Home | Main Index | Thread Index | Old Index