mariadb: Try to give it some love

- Minor version update
- Remove gssapi plugin to avoid krb5 dependency
- Build with system libedit instead of outdated bundled readline
- Mark up dependency on ncurses
- Some formatting
This commit is contained in:
Fredrik Fornwall 2017-04-07 03:39:22 +02:00
parent 4fb1e57f8f
commit a3a9021af1
4 changed files with 68 additions and 23 deletions

View File

@ -1,17 +1,37 @@
TERMUX_PKG_VERSION=10.1.21
TERMUX_PKG_HOMEPAGE=https://mariadb.org
TERMUX_PKG_SRCURL=http://mirror.fibergrid.in/mariadb//mariadb-$TERMUX_PKG_VERSION/source/mariadb-$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=5a816355781ea22a6c65a436d8162f19bd292ec90e2b7d9499c031ae4a659490
TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" -DSTACK_DIRECTION=-1 -DIMPORT_EXECUTABLES=$TERMUX_PKG_HOSTBUILD_DIR/import_executables.cmake -DPLUGIN_EXAMPLE=NO
-DCMAKE_USE_SYSTEM_LIBRARIES=True -DWITH_WSREP=False -DHAVE_UCONTEXT_H=False -DWITH_READLINE=ON -DWITH_PCRE=system -DWITH_JEMALLOC=OFF
-DWITH_SSL=system -DPLUGIN_DAEMON_EXAMPLE=NO -DINSTALL_UNIX_ADDRDIR=$TERMUX_PREFIX/tmp/mysqld.sock -DINSTALL_SCRIPTDIR=$TERMUX_PREFIX/bin
-DWITH_EXTRA_CHARSETS=complex -DMYSQL_DATADIR=$TERMUX_PREFIX/var/lib/mysql -DINSTALL_MANDIR=$TERMUX_PREFIX/share/man
-DINSTALL_PLUGINDIR=$TERMUX_PREFIX/lib/mysql/plugin -DBUILD_CONFIG=mysql_release -DENABLED_LOCAL_INFILE=ON -DTMPDIR=$TERMUX_PREFIX/tmp" #-DHAVE_IB_GCC_ATOMIC_BUILTINS=True
TERMUX_PKG_HOSTBUILD=true
TERMUX_PKG_DEPENDS="openssl, pcre, libcrypt, libbz2, libandroid-support, libandroid-glob, krb5, libgnustl"
TERMUX_PKG_MAINTAINER="Vishal Biswas @vishalbiswas"
TERMUX_PKG_DESCRIPTION="A drop-in replacement for mysql server"
TERMUX_PKG_VERSION=10.1.22
TERMUX_PKG_SRCURL=http://mirror.fibergrid.in/mariadb//mariadb-$TERMUX_PKG_VERSION/source/mariadb-$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=bcb0572e7ad32cea9740a21e9255f733bdf60a5561ffbda317c22dd12b3966ce
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-DBUILD_CONFIG=mysql_release
-DENABLED_LOCAL_INFILE=ON
-DHAVE_UCONTEXT_H=False
-DIMPORT_EXECUTABLES=$TERMUX_PKG_HOSTBUILD_DIR/import_executables.cmake
-DINSTALL_MANDIR=$TERMUX_PREFIX/share/man
-DINSTALL_PLUGINDIR=$TERMUX_PREFIX/lib/mysql/plugin
-DINSTALL_SCRIPTDIR=$TERMUX_PREFIX/bin
-DINSTALL_UNIX_ADDRDIR=$TERMUX_PREFIX/tmp/mysqld.sock
-DMYSQL_DATADIR=$TERMUX_PREFIX/var/lib/mysql
-DPLUGIN_AUTH_GSSAPI_CLIENT=NO
-DPLUGIN_AUTH_GSSAPI=NO
-DPLUGIN_DAEMON_EXAMPLE=NO
-DPLUGIN_EXAMPLE=NO
-DPLUGIN_GSSAPI=NO
-DSTACK_DIRECTION=-1
-DTMPDIR=$TERMUX_PREFIX/tmp
-DWITH_EXTRA_CHARSETS=complex
-DWITH_JEMALLOC=OFF
-DWITH_PCRE=system
-DWITH_READLINE=OFF
-DWITH_SSL=system
-DWITH_WSREP=False
"
TERMUX_PKG_HOSTBUILD=true
TERMUX_PKG_DEPENDS="liblzma, ncurses, libedit, openssl, pcre, libcrypt, libbz2, libandroid-support, libandroid-glob"
TERMUX_PKG_MAINTAINER="Vishal Biswas @vishalbiswas"
TERMUX_PKG_CONFLICTS="mysql"
TERMUX_PKG_RM_AFTER_INSTALL="bin/mysqltest*"
termux_step_host_build () {
termux_setup_cmake

View File

@ -0,0 +1,25 @@
diff -u -r ../mariadb-10.1.22/client/mysql.cc ./client/mysql.cc
--- ../mariadb-10.1.22/client/mysql.cc 2017-03-11 20:08:54.000000000 +0100
+++ ./client/mysql.cc 2017-04-07 03:12:08.091397345 +0200
@@ -2676,9 +2676,9 @@
#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);
+ 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);
#else
rl_attempted_completion_function= (CPPFunction*)&new_mysql_completion;
rl_completion_entry_function= &no_completion;
@@ -2700,7 +2700,7 @@
#if defined(USE_NEW_READLINE_INTERFACE)
return rl_completion_matches(text, new_command_generator);
#else
- return completion_matches((char *)text, (CPFunction *)new_command_generator);
+ return completion_matches((char *)text, (rl_compentry_func_t *)new_command_generator);
#endif
else
return (char**) 0;

View File

@ -0,0 +1,12 @@
diff -u -r ../mariadb-10.1.22/cmake/readline.cmake ./cmake/readline.cmake
--- ../mariadb-10.1.22/cmake/readline.cmake 2017-03-11 20:08:54.000000000 +0100
+++ ./cmake/readline.cmake 2017-04-07 02:43:58.242765383 +0200
@@ -180,7 +180,7 @@
#include <readline.h>
int main(int argc, char **argv)
{
- int res= (*rl_completion_entry_function)(0,0);
+ char* res= (*rl_completion_entry_function)(0,0);
completion_matches(0,0);
}"
LIBEDIT_INTERFACE)

View File

@ -1,12 +0,0 @@
--- ./extra/readline/complete.c 2017-01-18 01:08:19.000000000 +0530
+++ ../complete.c 2017-02-03 08:35:29.752470580 +0530
@@ -1854,8 +1854,8 @@
username = savestring (&text[first_char_loc]);
#if defined (HAVE_GETPWENT)
namelen = strlen (username);
-#endif
setpwent ();
+#endif
}
#if defined (HAVE_GETPWENT)