aboutsummaryrefslogtreecommitdiffstats
path: root/databases/mysql80-client
diff options
context:
space:
mode:
authorlifanov <lifanov@FreeBSD.org>2017-01-08 04:34:46 +0800
committerlifanov <lifanov@FreeBSD.org>2017-01-08 04:34:46 +0800
commit0cc8827e2931d1333b7d450ac10e1a2cc1bc4e59 (patch)
tree317be9105acc04fa055523ebb9f20f1cc249c71f /databases/mysql80-client
parent939a09271df20cbeaa0fcc8f5ffd675c28d31c85 (diff)
downloadfreebsd-ports-gnome-0cc8827e2931d1333b7d450ac10e1a2cc1bc4e59.tar.gz
freebsd-ports-gnome-0cc8827e2931d1333b7d450ac10e1a2cc1bc4e59.tar.zst
freebsd-ports-gnome-0cc8827e2931d1333b7d450ac10e1a2cc1bc4e59.zip
add databases/mysql80-server and databases/mysql80-client
This is a development snapshot of upcoming MySQL 8.0. PR: 215738 Submitted by: Mahdi Mokhtari <mokhi64@gmail.com> Reviewed by: matthew, feld Approved by: matthew (mentor), feld Differential Revision: https://reviews.freebsd.org/D9031
Diffstat (limited to 'databases/mysql80-client')
-rw-r--r--databases/mysql80-client/Makefile42
-rw-r--r--databases/mysql80-client/files/patch-CMakeLists.txt36
-rw-r--r--databases/mysql80-client/files/patch-client_CMakeLists.txt36
-rw-r--r--databases/mysql80-client/files/patch-cmake_os_DragonFly.cmake27
-rw-r--r--databases/mysql80-client/files/patch-cmake_ssl.cmake15
-rw-r--r--databases/mysql80-client/files/patch-cmd-line-utils_libedit_chartype.h11
-rw-r--r--databases/mysql80-client/files/patch-cmd-line-utils_libedit_vi.c20
-rw-r--r--databases/mysql80-client/files/patch-extra_CMakeLists.txt33
-rw-r--r--databases/mysql80-client/files/patch-include_CMakeLists.txt10
-rw-r--r--databases/mysql80-client/files/patch-include_my__compare.h11
-rw-r--r--databases/mysql80-client/files/patch-include_myisam.h11
-rw-r--r--databases/mysql80-client/files/patch-libmysql_CMakeLists.txt11
-rw-r--r--databases/mysql80-client/files/patch-man_CMakeLists.txt13
-rw-r--r--databases/mysql80-client/files/patch-mysys__ssl_my__default.cc61
-rw-r--r--databases/mysql80-client/files/patch-scripts_CMakeLists.txt64
-rw-r--r--databases/mysql80-client/files/patch-storage_myisam_mi__dynrec.c23
-rw-r--r--databases/mysql80-client/files/patch-support-files_CMakeLists.txt37
-rw-r--r--databases/mysql80-client/pkg-message12
-rw-r--r--databases/mysql80-client/pkg-plist163
19 files changed, 636 insertions, 0 deletions
diff --git a/databases/mysql80-client/Makefile b/databases/mysql80-client/Makefile
new file mode 100644
index 000000000000..072b480c56a5
--- /dev/null
+++ b/databases/mysql80-client/Makefile
@@ -0,0 +1,42 @@
+# Created by: "Mahdi Mokhtari <mokhi64@gmail.com>"
+# $FreeBSD$
+
+PORTNAME= mysql
+PORTREVISION?= 0
+PKGNAMESUFFIX= 80-client
+
+COMMENT= Multithreaded SQL database (client)
+
+LICENSE+= LGPL21
+
+BROKEN_powerpc64= Does not build
+BROKEN_sparc64= Does not build: reports unsupported compiler
+
+MASTERDIR= ${.CURDIR}/../mysql80-server
+
+PKGMESSAGE= ${.CURDIR}/pkg-message
+PATCHDIR= ${.CURDIR}/files
+PLIST= ${.CURDIR}/pkg-plist
+
+CONFLICTS_INSTALL= mysql8[1-9]-client-* \
+ mysql[0-79][0-9]-client-* \
+ mariadb[0-9][0-9]-client-* \
+ percona[0-9][0-9]-client-*
+
+CMAKE_ARGS+= -DWITHOUT_SERVER=1
+
+USE_LDCONFIG+= ${PREFIX}/lib/mysql
+
+MMAN1= comp_err.1 msql2mysql.1 mysql.1 mysql_config.1 mysql_config_editor.1 mysql_find_rows.1 \
+ mysql_waitpid.1 mysqlaccess.1 mysqladmin.1 mysqlbinlog.1 \
+ mysqlcheck.1 mysqldump.1 mysqlimport.1 mysqlshow.1 mysqlslap.1
+
+CLIENT_ONLY= yes
+
+# issue 166367: adding symlinks for back-compatibility with ${lib}_r
+post-install:
+ @${LN} -s libmysqlclient.a ${STAGEDIR}${PREFIX}/lib/mysql/libmysqlclient_r.a
+ @${LN} -s libmysqlclient.so ${STAGEDIR}${PREFIX}/lib/mysql/libmysqlclient_r.so
+ @${LN} -s libmysqlclient.so.21 ${STAGEDIR}${PREFIX}/lib/mysql/libmysqlclient_r.so.21
+
+.include "${MASTERDIR}/Makefile"
diff --git a/databases/mysql80-client/files/patch-CMakeLists.txt b/databases/mysql80-client/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..4d202eb72f10
--- /dev/null
+++ b/databases/mysql80-client/files/patch-CMakeLists.txt
@@ -0,0 +1,36 @@
+--- CMakeLists.txt.orig 2016-03-28 18:06:12 UTC
++++ CMakeLists.txt
+@@ -606,8 +606,8 @@ ENDIF()
+
+ ADD_SUBDIRECTORY(extra)
+ ADD_SUBDIRECTORY(client)
+-ADD_SUBDIRECTORY(sql/share)
+ ADD_SUBDIRECTORY(libservices)
++ADD_SUBDIRECTORY(support-files)
+
+ IF(UNIX)
+ ADD_SUBDIRECTORY(man)
+@@ -676,14 +676,13 @@ ELSE()
+ SET(CPACK_GENERATOR "TGZ")
+ ENDIF()
+ ADD_SUBDIRECTORY(packaging/WiX)
+-ADD_SUBDIRECTORY(packaging/solaris)
+
+ IF(UNIX)
+- INSTALL(FILES Docs/mysql.info DESTINATION ${INSTALL_INFODIR} OPTIONAL COMPONENT Info)
+ ENDIF()
+ #
+ # RPM installs documentation directly from the source tree
+ #
++IF(FALSE)
+ IF(NOT INSTALL_LAYOUT MATCHES "RPM")
+ INSTALL(FILES COPYING LICENSE.mysql
+ DESTINATION ${INSTALL_DOCREADMEDIR}
+@@ -706,6 +705,7 @@ IF(NOT INSTALL_LAYOUT MATCHES "RPM")
+ PATTERN "sp-imp-spec.txt" EXCLUDE
+ )
+ ENDIF()
++ENDIF()
+
+ INCLUDE(CPack)
+
diff --git a/databases/mysql80-client/files/patch-client_CMakeLists.txt b/databases/mysql80-client/files/patch-client_CMakeLists.txt
new file mode 100644
index 000000000000..35bf110e5346
--- /dev/null
+++ b/databases/mysql80-client/files/patch-client_CMakeLists.txt
@@ -0,0 +1,36 @@
+--- client/CMakeLists.txt.orig 2016-08-25 12:32:09 UTC
++++ client/CMakeLists.txt
+@@ -47,6 +47,7 @@ IF(UNIX)
+ TARGET_LINK_LIBRARIES(mysql ${EDITLINE_LIBRARY})
+ ENDIF(UNIX)
+
++IF(FALSE)
+ IF(NOT WITHOUT_SERVER)
+ MYSQL_ADD_EXECUTABLE(mysql_upgrade
+ upgrade/program.cc
+@@ -57,11 +58,14 @@ ADD_COMPILE_FLAGS(
+ TARGET_LINK_LIBRARIES(mysql_upgrade mysqlclient client_base mysqlcheck_core)
+ ADD_DEPENDENCIES(mysql_upgrade GenFixPrivs GenSysSchema)
+ ENDIF()
++ENDIF()
+
++IF(FALSE)
+ MYSQL_ADD_EXECUTABLE(mysqltest mysqltest.cc COMPONENT Test)
+ SET_SOURCE_FILES_PROPERTIES(mysqltest.cc PROPERTIES COMPILE_FLAGS "-DTHREADS")
+ TARGET_LINK_LIBRARIES(mysqltest mysqlclient regex)
+ ADD_DEPENDENCIES(mysqltest GenError GenClientError)
++ENDIF()
+
+ ADD_CONVENIENCE_LIBRARY(mysqlcheck_core check/mysqlcheck_core.cc)
+ TARGET_LINK_LIBRARIES(mysqlcheck_core mysqlclient)
+@@ -113,8 +117,10 @@ TARGET_LINK_LIBRARIES(mysqlslap mysqlcli
+ MYSQL_ADD_EXECUTABLE(mysql_config_editor mysql_config_editor.cc)
+ TARGET_LINK_LIBRARIES(mysql_config_editor mysqlclient)
+
++IF(FALSE)
+ MYSQL_ADD_EXECUTABLE(mysql_secure_installation mysql_secure_installation.cc)
+ TARGET_LINK_LIBRARIES(mysql_secure_installation mysqlclient)
++ENDIF()
+
+ MYSQL_ADD_EXECUTABLE(mysql_ssl_rsa_setup mysql_ssl_rsa_setup.cc path.cc logger.cc)
+ TARGET_LINK_LIBRARIES(mysql_ssl_rsa_setup mysys mysys_ssl)
diff --git a/databases/mysql80-client/files/patch-cmake_os_DragonFly.cmake b/databases/mysql80-client/files/patch-cmake_os_DragonFly.cmake
new file mode 100644
index 000000000000..83c154ee3bcf
--- /dev/null
+++ b/databases/mysql80-client/files/patch-cmake_os_DragonFly.cmake
@@ -0,0 +1,27 @@
+--- cmake/os/DragonFly.cmake.orig 2016-04-14 10:16:17 UTC
++++ cmake/os/DragonFly.cmake
+@@ -0,0 +1,24 @@
++INCLUDE(CheckCSourceRuns)
++
++# We require at least GCC 4.4 or Clang 3.3.
++IF(NOT FORCE_UNSUPPORTED_COMPILER)
++ IF(CMAKE_COMPILER_IS_GNUCC)
++ EXECUTE_PROCESS(COMMAND ${CMAKE_C_COMPILER} -dumpversion
++ OUTPUT_VARIABLE GCC_VERSION)
++ IF(GCC_VERSION VERSION_LESS 4.4)
++ MESSAGE(FATAL_ERROR "GCC 4.4 or newer is required!")
++ ENDIF()
++ ELSEIF(CMAKE_C_COMPILER_ID MATCHES "Clang")
++ CHECK_C_SOURCE_RUNS("
++ int main()
++ {
++ return (__clang_major__ < 3) ||
++ (__clang_major__ == 3 && __clang_minor__ < 3);
++ }" HAVE_SUPPORTED_CLANG_VERSION)
++ IF(NOT HAVE_SUPPORTED_CLANG_VERSION)
++ MESSAGE(FATAL_ERROR "Clang 3.3 or newer is required!")
++ ENDIF()
++ ELSE()
++ MESSAGE(FATAL_ERROR "Unsupported compiler!")
++ ENDIF()
++ENDIF()
diff --git a/databases/mysql80-client/files/patch-cmake_ssl.cmake b/databases/mysql80-client/files/patch-cmake_ssl.cmake
new file mode 100644
index 000000000000..c9a66c421b23
--- /dev/null
+++ b/databases/mysql80-client/files/patch-cmake_ssl.cmake
@@ -0,0 +1,15 @@
+--- cmake/ssl.cmake.orig 2016-08-12 10:55:07 UTC
++++ cmake/ssl.cmake
+@@ -179,6 +179,12 @@ MACRO (MYSQL_CHECK_SSL)
+ OPENSSL_MAJOR_VERSION STREQUAL "1"
+ )
+ SET(OPENSSL_FOUND TRUE)
++ ELSEIF(OPENSSL_INCLUDE_DIR AND
++ OPENSSL_LIBRARY AND
++ CRYPTO_LIBRARY AND
++ OPENSSL_MAJOR_VERSION STREQUAL "2"
++ )
++ SET(OPENSSL_FOUND TRUE)
+ ELSE()
+ SET(OPENSSL_FOUND FALSE)
+ ENDIF()
diff --git a/databases/mysql80-client/files/patch-cmd-line-utils_libedit_chartype.h b/databases/mysql80-client/files/patch-cmd-line-utils_libedit_chartype.h
new file mode 100644
index 000000000000..34fbf5a45509
--- /dev/null
+++ b/databases/mysql80-client/files/patch-cmd-line-utils_libedit_chartype.h
@@ -0,0 +1,11 @@
+--- cmd-line-utils/libedit/chartype.h.orig 2016-03-28 18:06:12 UTC
++++ cmd-line-utils/libedit/chartype.h
+@@ -49,7 +49,7 @@
+ TODO : Verify if FreeBSD & AIX stores ISO 10646 in wchar_t. */
+ #if !defined(__NetBSD__) && !defined(__sun) \
+ && !(defined(__APPLE__) && defined(__MACH__)) \
+- && !defined(__FreeBSD__) && !defined(_AIX)
++ && !defined(__FreeBSD__) && !defined(_AIX) && !defined(__DragonFly__)
+ #ifndef __STDC_ISO_10646__
+ /* In many places it is assumed that the first 127 code points are ASCII
+ * compatible, so ensure wchar_t indeed does ISO 10646 and not some other
diff --git a/databases/mysql80-client/files/patch-cmd-line-utils_libedit_vi.c b/databases/mysql80-client/files/patch-cmd-line-utils_libedit_vi.c
new file mode 100644
index 000000000000..cb3e255991ab
--- /dev/null
+++ b/databases/mysql80-client/files/patch-cmd-line-utils_libedit_vi.c
@@ -0,0 +1,20 @@
+--- cmd-line-utils/libedit/vi.c.orig 2016-03-28 18:06:12 UTC
++++ cmd-line-utils/libedit/vi.c
+@@ -919,7 +919,7 @@ vi_comment_out(EditLine *el, Int c __att
+ * NB: posix implies that we should enter insert mode, however
+ * this is against historical precedent...
+ */
+-#if defined(__weak_reference) && !defined(__FreeBSD__)
++#if defined(__weak_reference) && !defined(__FreeBSD__) && !defined(__DragonFly__)
+ __weakref_visible char *my_get_alias_text(const char *)
+ __weak_reference(get_alias_text);
+ #endif
+@@ -928,7 +928,7 @@ protected el_action_t
+ vi_alias(EditLine *el __attribute__((__unused__)),
+ Int c __attribute__((__unused__)))
+ {
+-#if defined(__weak_reference) && !defined(__FreeBSD__)
++#if defined(__weak_reference) && !defined(__FreeBSD__) && !defined(__DragonFly__)
+ char alias_name[3];
+ char *alias_text;
+
diff --git a/databases/mysql80-client/files/patch-extra_CMakeLists.txt b/databases/mysql80-client/files/patch-extra_CMakeLists.txt
new file mode 100644
index 000000000000..045b98549e41
--- /dev/null
+++ b/databases/mysql80-client/files/patch-extra_CMakeLists.txt
@@ -0,0 +1,33 @@
+--- extra/CMakeLists.txt.orig 2016-03-28 18:06:12 UTC
++++ extra/CMakeLists.txt
+@@ -45,6 +45,7 @@ ENDIF()
+
+ ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/include/mysqld_error.h
+ ${PROJECT_BINARY_DIR}/sql/share/english/errmsg.sys
++ COMMAND mkdir -p ${PROJECT_BINARY_DIR}/sql/share/
+ COMMAND comp_err
+ --charset=${PROJECT_SOURCE_DIR}/sql/share/charsets
+ --out-dir=${PROJECT_BINARY_DIR}/sql/share/
+@@ -73,6 +74,7 @@ IF (WIN32 AND WITH_SSL_PATH AND HAVE_CRY
+ ENDIF()
+
+
++IF(FALSE)
+ MYSQL_ADD_EXECUTABLE(my_print_defaults my_print_defaults.c)
+ TARGET_LINK_LIBRARIES(my_print_defaults mysys mysys_ssl)
+ SET_TARGET_PROPERTIES(my_print_defaults PROPERTIES LINKER_LANGUAGE CXX)
+@@ -142,11 +144,14 @@ IF(WITH_INNOBASE_STORAGE_ENGINE)
+ TARGET_LINK_LIBRARIES(innochecksum mysys mysys_ssl ${LZ4_LIBRARY})
+ ADD_DEPENDENCIES(innochecksum GenError)
+ ENDIF()
++ENDIF()
+
++IF(FALSE)
+ IF(UNIX)
+ MYSQL_ADD_EXECUTABLE(resolve_stack_dump resolve_stack_dump.cc)
+ TARGET_LINK_LIBRARIES(resolve_stack_dump mysys mysys_ssl)
+ ENDIF()
++ENDIF()
+
+ # In published release builds on Solaris, we need to bundle gcc source.
+ # PB2 will take care of putting it in extra/ when needed
diff --git a/databases/mysql80-client/files/patch-include_CMakeLists.txt b/databases/mysql80-client/files/patch-include_CMakeLists.txt
new file mode 100644
index 000000000000..1fc41ad15601
--- /dev/null
+++ b/databases/mysql80-client/files/patch-include_CMakeLists.txt
@@ -0,0 +1,10 @@
+--- include/CMakeLists.txt.orig 2016-03-28 18:06:12 UTC
++++ include/CMakeLists.txt
+@@ -38,6 +38,7 @@ SET(HEADERS_ABI
+
+ SET(HEADERS
+ ${HEADERS_ABI}
++ hash.h
+ my_dbug.h
+ m_string.h
+ my_sys.h
diff --git a/databases/mysql80-client/files/patch-include_my__compare.h b/databases/mysql80-client/files/patch-include_my__compare.h
new file mode 100644
index 000000000000..1a64142bb658
--- /dev/null
+++ b/databases/mysql80-client/files/patch-include_my__compare.h
@@ -0,0 +1,11 @@
+--- include/my_compare.h.orig 2016-03-28 18:06:12 UTC
++++ include/my_compare.h
+@@ -40,7 +40,7 @@ extern "C" {
+ But beware the dependency of MI_MAX_POSSIBLE_KEY_BUFF and HA_MAX_KEY_LENGTH.
+ */
+
+-#define HA_MAX_KEY_LENGTH 1000 /* Max length in bytes */
++#define HA_MAX_KEY_LENGTH 4000 /* Max length in bytes */
+ #define HA_MAX_KEY_SEG 16 /* Max segments for key */
+
+ #define HA_MAX_POSSIBLE_KEY_BUFF (HA_MAX_KEY_LENGTH + 24+ 6+6)
diff --git a/databases/mysql80-client/files/patch-include_myisam.h b/databases/mysql80-client/files/patch-include_myisam.h
new file mode 100644
index 000000000000..0a4b795e9426
--- /dev/null
+++ b/databases/mysql80-client/files/patch-include_myisam.h
@@ -0,0 +1,11 @@
+--- include/myisam.h.orig 2016-03-28 18:06:12 UTC
++++ include/myisam.h
+@@ -45,7 +45,7 @@ extern "C" {
+ The following defines can be increased if necessary.
+ But beware the dependency of MI_MAX_POSSIBLE_KEY_BUFF and MI_MAX_KEY_LENGTH.
+ */
+-#define MI_MAX_KEY_LENGTH 1000 /* Max length in bytes */
++#define MI_MAX_KEY_LENGTH 4000 /* Max length in bytes */
+ #define MI_MAX_KEY_SEG 16 /* Max segments for key */
+
+ #define MI_MAX_KEY_BUFF (MI_MAX_KEY_LENGTH+MI_MAX_KEY_SEG*6+8+8)
diff --git a/databases/mysql80-client/files/patch-libmysql_CMakeLists.txt b/databases/mysql80-client/files/patch-libmysql_CMakeLists.txt
new file mode 100644
index 000000000000..b90821a7f767
--- /dev/null
+++ b/databases/mysql80-client/files/patch-libmysql_CMakeLists.txt
@@ -0,0 +1,11 @@
+--- libmysql/CMakeLists.txt.orig 2016-03-28 18:06:12 UTC
++++ libmysql/CMakeLists.txt
+@@ -260,7 +260,7 @@ IF(NOT DISABLE_SHARED)
+ COMPONENT SharedLibraries)
+ IF(UNIX)
+ # libtool compatability
+- IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR APPLE)
++ IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD|DragonFly" OR APPLE)
+ SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}")
+ ELSE()
+ SET(OS_SHARED_LIB_VERSION
diff --git a/databases/mysql80-client/files/patch-man_CMakeLists.txt b/databases/mysql80-client/files/patch-man_CMakeLists.txt
new file mode 100644
index 000000000000..e02a804949d8
--- /dev/null
+++ b/databases/mysql80-client/files/patch-man_CMakeLists.txt
@@ -0,0 +1,13 @@
+--- man/CMakeLists.txt.orig 2015-11-29 19:16:24 UTC
++++ man/CMakeLists.txt
+@@ -15,10 +15,6 @@
+
+ # Copy man pages
+ FILE(GLOB MAN1_FILES *.1)
+-FILE(GLOB MAN1_EXCLUDE make_win_bin_dist.1)
+-FILE(GLOB MAN1_NDB ndb*.1)
+-FILE(GLOB MAN8_FILES *.8)
+-FILE(GLOB MAN8_NDB ndb*.8)
+ IF(MAN1_FILES)
+ IF(MAN1_EXCLUDE)
+ LIST(REMOVE_ITEM MAN1_FILES ${MAN1_EXCLUDE})
diff --git a/databases/mysql80-client/files/patch-mysys__ssl_my__default.cc b/databases/mysql80-client/files/patch-mysys__ssl_my__default.cc
new file mode 100644
index 000000000000..ea05679341fa
--- /dev/null
+++ b/databases/mysql80-client/files/patch-mysys__ssl_my__default.cc
@@ -0,0 +1,61 @@
+--- mysys_ssl/my_default.cc.orig 2016-08-25 11:52:06 UTC
++++ mysys_ssl/my_default.cc
+@@ -114,7 +114,7 @@ static my_bool defaults_already_read= FA
+
+ /* Which directories are searched for options (and in which order) */
+
+-#define MAX_DEFAULT_DIRS 6
++#define MAX_DEFAULT_DIRS 7
+ #define DEFAULT_DIRS_SIZE (MAX_DEFAULT_DIRS + 1) /* Terminate with NULL */
+ static const char **default_directories = NULL;
+
+@@ -914,6 +914,14 @@ static int search_default_file_with_ext(
+ return 1; /* Ignore wrong files */
+ }
+
++ if (strstr(name, "/etc") == name)
++ {
++ fprintf(stderr,
++ "error: Config file %s in invalid location, please move to or merge with /usr/local%s\n",
++ name,name);
++ goto err;
++ }
++
+ while (mysql_file_getline(buff, sizeof(buff) - 1, fp, is_login_file))
+ {
+ line++;
+@@ -1252,7 +1260,8 @@ void my_print_default_files(const char *
+ end[(strlen(end)-1)] = ' ';
+ else
+ strxmov(end, conf_file, *ext , " ", NullS);
+- fputs(name, stdout);
++ if (strstr(name, "/etc") != name)
++ fputs(name, stdout);
+ }
+ }
+ }
+@@ -1411,13 +1420,8 @@ static const char **init_default_directo
+
+ #else
+
+- errors += add_directory(alloc, "/etc/", dirs);
+- errors += add_directory(alloc, "/etc/mysql/", dirs);
+-
+-#if defined(DEFAULT_SYSCONFDIR)
+- if (DEFAULT_SYSCONFDIR[0])
+- errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs);
+-#endif /* DEFAULT_SYSCONFDIR */
++ errors += add_directory(alloc, "/usr/local/etc/", dirs);
++ errors += add_directory(alloc, "/usr/local/etc/mysql/", dirs);
+
+ #endif
+
+@@ -1488,7 +1492,7 @@ int check_file_permissions(const char *f
+ MY_STAT stat_info;
+
+ if (!my_stat(file_name,&stat_info,MYF(0)))
+- return 1;
++ return 0;
+ /*
+ Ignore .mylogin.cnf file if not exclusively readable/writable
+ by current user.
diff --git a/databases/mysql80-client/files/patch-scripts_CMakeLists.txt b/databases/mysql80-client/files/patch-scripts_CMakeLists.txt
new file mode 100644
index 000000000000..3e59f3170ddd
--- /dev/null
+++ b/databases/mysql80-client/files/patch-scripts_CMakeLists.txt
@@ -0,0 +1,64 @@
+--- scripts/CMakeLists.txt.orig 2016-03-28 18:06:12 UTC
++++ scripts/CMakeLists.txt
+@@ -43,6 +43,7 @@ ELSE()
+ MESSAGE(FATAL_ERROR "Cannot concatenate files")
+ ENDIF()
+
++IF(FALSE)
+ # Build mysql_fix_privilege_tables.c
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/mysql_fix_privilege_tables_sql.c
+@@ -63,6 +64,7 @@ ADD_CUSTOM_TARGET(GenFixPrivs
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/mysql_fix_privilege_tables_sql.c
+ ${CMAKE_CURRENT_BINARY_DIR}/sql_commands_sys_schema.h
+ )
++ENDIF()
+
+ # If we do not have performance schema compiled in then sys will not work,
+ # so only create an empty sys database with an auto-generated file,
+@@ -143,6 +145,7 @@ IF(NOT WITHOUT_SERVER)
+ )
+ ENDIF()
+
++IF(FALSE)
+ IF(UNIX)
+ FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/make_binary_distribution
+ "cd ${CMAKE_BINARY_DIR} && '${CMAKE_CPACK_COMMAND}' -G TGZ --config CPackConfig.cmake\n" )
+@@ -150,6 +153,7 @@ IF(UNIX)
+ COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/make_binary_distribution
+ )
+ ENDIF()
++ENDIF()
+
+ IF(NOT WITHOUT_SERVER)
+ INSTALL(FILES
+@@ -347,6 +351,8 @@ MACRO(EXTRACT_LINK_LIBRARIES target var)
+ GET_FILENAME_COMPONENT(lib "${lib}" NAME_WE)
+ STRING(REGEX REPLACE "^lib" "" lib "${lib}")
+ SET(${var} "${${var}}-l${lib} " )
++ ELSEIF(lib STREQUAL "-pthread")
++ SET(${var} "${${var}}-pthread " )
+ ELSE()
+ SET(${var} "${${var}}-l${lib} " )
+ ENDIF()
+@@ -430,19 +436,7 @@ ELSE()
+ # On Unix, most of the files end up in the bin directory
+ SET(mysql_config_COMPONENT COMPONENT Development)
+
+- IF(WITH_SYSTEMD)
+- SET(BIN_SCRIPTS
+- mysql_config
+- mysqldumpslow
+- )
+- ELSE()
+- SET(BIN_SCRIPTS
+- mysql_config
+- mysqldumpslow
+- mysqld_multi
+- mysqld_safe
+- )
+- ENDIF()
++ SET(BIN_SCRIPTS mysql_config)
+
+ SET(PKGCONFIG_FILE ${LIBMYSQL_OS_OUTPUT_NAME}.pc)
+ STRING(REGEX REPLACE "/mysql$" "" PKGCONFIG_DIR "${INSTALL_LIBDIR}")
diff --git a/databases/mysql80-client/files/patch-storage_myisam_mi__dynrec.c b/databases/mysql80-client/files/patch-storage_myisam_mi__dynrec.c
new file mode 100644
index 000000000000..282cffdbcbc5
--- /dev/null
+++ b/databases/mysql80-client/files/patch-storage_myisam_mi__dynrec.c
@@ -0,0 +1,23 @@
+--- storage/myisam/mi_dynrec.c.orig 2016-03-28 18:06:12 UTC
++++ storage/myisam/mi_dynrec.c
+@@ -65,18 +65,13 @@ my_bool mi_dynmap_file(MI_INFO *info, my
+ DBUG_RETURN(1);
+ }
+ /*
+- I wonder if it is good to use MAP_NORESERVE. From the Linux man page:
+- MAP_NORESERVE
+- Do not reserve swap space for this mapping. When swap space is
+- reserved, one has the guarantee that it is possible to modify the
+- mapping. When swap space is not reserved one might get SIGSEGV
+- upon a write if no physical memory is available.
++ MAP_NORESERVE is unimplemented in FreeBSD
+ */
+ info->s->file_map= (uchar*)
+ my_mmap(0, (size_t) size,
+ info->s->mode==O_RDONLY ? PROT_READ :
+ PROT_READ | PROT_WRITE,
+- MAP_SHARED | MAP_NORESERVE,
++ MAP_SHARED,
+ info->dfile, 0L);
+ if (info->s->file_map == (uchar*) MAP_FAILED)
+ {
diff --git a/databases/mysql80-client/files/patch-support-files_CMakeLists.txt b/databases/mysql80-client/files/patch-support-files_CMakeLists.txt
new file mode 100644
index 000000000000..218a1e701b67
--- /dev/null
+++ b/databases/mysql80-client/files/patch-support-files_CMakeLists.txt
@@ -0,0 +1,37 @@
+--- support-files/CMakeLists.txt.orig 2016-03-28 18:06:12 UTC
++++ support-files/CMakeLists.txt
+@@ -44,14 +44,17 @@ ELSE()
+ SET(inst_location ${INSTALL_SUPPORTFILESDIR})
+ ENDIF()
+
++IF(FALSE)
+ SET(inifile my-default)
+ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${inifile}.cnf.sh
+ ${CMAKE_CURRENT_BINARY_DIR}/${inifile}.${ini_file_extension} @ONLY)
+ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${inifile}.${ini_file_extension}
+ DESTINATION ${inst_location} COMPONENT IniFiles)
++ENDIF()
+
+ IF(UNIX)
+ SET(prefix ${CMAKE_INSTALL_PREFIX})
++IF(FALSE)
+ FOREACH(script mysqld_multi.server mysql-log-rotate)
+ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${script}.sh
+ ${CMAKE_CURRENT_BINARY_DIR}/${script} @ONLY )
+@@ -68,9 +71,11 @@ IF(UNIX)
+ IF(INSTALL_SUPPORTFILESDIR)
+ INSTALL(FILES magic DESTINATION ${inst_location} COMPONENT SupportFiles)
+ ENDIF()
++ENDIF()
+
+ INSTALL(FILES mysql.m4 DESTINATION ${INSTALL_SHAREDIR}/aclocal COMPONENT Development)
+
++IF(FALSE)
+ SET(bindir ${prefix}/${INSTALL_BINDIR})
+ SET(sbindir ${prefix}/${INSTALL_SBINDIR})
+ SET(scriptdir ${prefix}/${INSTALL_SCRIPTDIR})
+@@ -83,3 +88,4 @@ IF(UNIX)
+ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ
+ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
+ ENDIF()
++ENDIF()
diff --git a/databases/mysql80-client/pkg-message b/databases/mysql80-client/pkg-message
new file mode 100644
index 000000000000..f94e2e7223fd
--- /dev/null
+++ b/databases/mysql80-client/pkg-message
@@ -0,0 +1,12 @@
+* * * * * * * * * * * * * * * * * * * * * * * *
+
+This is the mysql CLIENT without the server.
+for complete server and client, please install databases/mysql80-server
+
+* * * * * * * * * * * * * * * * * * * * * * * *
+
+* * * * * * * * * * * * * * * * * * * * * * * *
+
+WARNING: THIS IS STILL-IN-DEV PROJECT! USE WITH CAUTION ON PRODUCTION ENVS!
+
+* * * * * * * * * * * * * * * * * * * * * * * *
diff --git a/databases/mysql80-client/pkg-plist b/databases/mysql80-client/pkg-plist
new file mode 100644
index 000000000000..5ddbca8c8fe9
--- /dev/null
+++ b/databases/mysql80-client/pkg-plist
@@ -0,0 +1,163 @@
+bin/mysql
+bin/mysql_config
+bin/mysql_config_editor
+bin/mysql_ssl_rsa_setup
+bin/mysqladmin
+bin/mysqlbinlog
+bin/mysqlcheck
+bin/mysqldump
+bin/mysqlimport
+bin/mysqlpump
+bin/mysqlshow
+bin/mysqlslap
+include/mysql/binary_log_types.h
+include/mysql/big_endian.h
+include/mysql/byte_order_generic.h
+include/mysql/byte_order_generic_x86.h
+include/mysql/decimal.h
+include/mysql/errmsg.h
+include/mysql/hash.h
+include/mysql/keycache.h
+include/mysql/little_endian.h
+include/mysql/m_ctype.h
+include/mysql/m_string.h
+include/mysql/my_alloc.h
+include/mysql/my_byteorder.h
+include/mysql/my_command.h
+include/mysql/my_compiler.h
+include/mysql/my_config.h
+include/mysql/my_dbug.h
+include/mysql/my_dir.h
+include/mysql/my_getopt.h
+include/mysql/my_global.h
+include/mysql/my_list.h
+include/mysql/my_sys.h
+include/mysql/my_thread.h
+include/mysql/my_thread_local.h
+include/mysql/my_xml.h
+include/mysql/mysql.h
+include/mysql/mysql/client_authentication.h
+include/mysql/mysql/client_plugin.h
+include/mysql/mysql/client_plugin.h.pp
+include/mysql/mysql/com_data.h
+include/mysql/mysql/get_password.h
+include/mysql/mysql/group_replication_priv.h
+include/mysql/mysql/innodb_priv.h
+include/mysql/mysql/mysql_lex_string.h
+include/mysql/mysql/plugin.h
+include/mysql/mysql/plugin_audit.h
+include/mysql/mysql/plugin_audit.h.pp
+include/mysql/mysql/plugin_auth.h
+include/mysql/mysql/plugin_auth.h.pp
+include/mysql/mysql/plugin_auth_common.h
+include/mysql/mysql/plugin_ftparser.h
+include/mysql/mysql/plugin_ftparser.h.pp
+include/mysql/mysql/plugin_group_replication.h
+include/mysql/mysql/plugin_keyring.h
+include/mysql/mysql/plugin_keyring.h.pp
+include/mysql/mysql/plugin_query_rewrite.h
+include/mysql/mysql/plugin_trace.h
+include/mysql/mysql/plugin_validate_password.h
+include/mysql/mysql/components/component_implementation.h
+include/mysql/mysql/components/my_service.h
+include/mysql/mysql/components/service.h
+include/mysql/mysql/components/service_implementation.h
+include/mysql/mysql/components/services/dynamic_loader.h
+include/mysql/mysql/components/services/dynamic_loader_scheme_file.h
+include/mysql/mysql/components/services/persistent_dynamic_loader.h
+include/mysql/mysql/components/services/registry.h
+include/mysql/mysql/psi/mysql_cond.h
+include/mysql/mysql/psi/mysql_error.h
+include/mysql/mysql/psi/mysql_mutex.h
+include/mysql/mysql/psi/mysql_rwlock.h
+include/mysql/mysql/psi/psi_cond.h
+include/mysql/mysql/psi/psi_error.h
+include/mysql/mysql/psi/psi_file.h
+include/mysql/mysql/psi/psi_idle.h
+include/mysql/mysql/psi/psi_mdl.h
+include/mysql/mysql/psi/psi_mutex.h
+include/mysql/mysql/psi/psi_rwlock.h
+include/mysql/mysql/psi/psi_socket.h
+include/mysql/mysql/psi/psi_stage.h
+include/mysql/mysql/psi/psi_statement.h
+include/mysql/mysql/psi/psi_table.h
+include/mysql/mysql/psi/psi_thread.h
+include/mysql/mysql/psi/psi_transaction.h
+include/mysql/mysql/psi/mysql_file.h
+include/mysql/mysql/psi/mysql_idle.h
+include/mysql/mysql/psi/mysql_mdl.h
+include/mysql/mysql/psi/mysql_memory.h
+include/mysql/mysql/psi/mysql_ps.h
+include/mysql/mysql/psi/mysql_socket.h
+include/mysql/mysql/psi/mysql_sp.h
+include/mysql/mysql/psi/mysql_stage.h
+include/mysql/mysql/psi/mysql_statement.h
+include/mysql/mysql/psi/mysql_table.h
+include/mysql/mysql/psi/mysql_thread.h
+include/mysql/mysql/psi/mysql_transaction.h
+include/mysql/mysql/psi/psi_base.h
+include/mysql/mysql/psi/psi_memory.h
+include/mysql/mysql/service_command.h
+include/mysql/mysql/service_locking.h
+include/mysql/mysql/service_my_plugin_log.h
+include/mysql/mysql/service_my_snprintf.h
+include/mysql/mysql/service_mysql_alloc.h
+include/mysql/mysql/service_mysql_keyring.h
+include/mysql/mysql/service_mysql_password_policy.h
+include/mysql/mysql/service_mysql_string.h
+include/mysql/mysql/service_parser.h
+include/mysql/mysql/service_rpl_transaction_ctx.h
+include/mysql/mysql/service_rpl_transaction_write_set.h
+include/mysql/mysql/service_rules_table.h
+include/mysql/mysql/service_security_context.h
+include/mysql/mysql/service_srv_session.h
+include/mysql/mysql/service_srv_session_info.h
+include/mysql/mysql/service_ssl_wrapper.h
+include/mysql/mysql/service_thd_alloc.h
+include/mysql/mysql/service_thd_engine_lock.h
+include/mysql/mysql/service_thd_wait.h
+include/mysql/mysql/service_thread_scheduler.h
+include/mysql/mysql/services.h
+include/mysql/mysql/services.h.pp
+include/mysql/mysql/thread_pool_priv.h
+include/mysql/mysql/thread_type.h
+include/mysql/mysql_com.h
+include/mysql/mysql_com_server.h
+include/mysql/mysql_time.h
+include/mysql/mysql_version.h
+include/mysql/mysqld_ername.h
+include/mysql/mysqld_error.h
+include/mysql/plugin.h
+include/mysql/plugin_audit.h
+include/mysql/plugin_ftparser.h
+include/mysql/plugin_group_replication.h
+include/mysql/plugin_keyring.h
+include/mysql/plugin_validate_password.h
+include/mysql/sql_common.h
+include/mysql/sslopt-case.h
+include/mysql/sslopt-longopts.h
+include/mysql/sslopt-vars.h
+include/mysql/thr_cond.h
+include/mysql/thr_mutex.h
+include/mysql/thr_rwlock.h
+include/mysql/typelib.h
+lib/mysql/libmysqlclient.a
+lib/mysql/libmysqlclient.so
+lib/mysql/libmysqlclient.so.21
+lib/mysql/libmysqlservices.a
+lib/mysql/libmysqlclient_r.a
+lib/mysql/libmysqlclient_r.so
+lib/mysql/libmysqlclient_r.so.21
+libdata/pkgconfig/mysqlclient.pc
+man/man1/comp_err.1.gz
+man/man1/mysql.1.gz
+man/man1/mysql_config.1.gz
+man/man1/mysql_config_editor.1.gz
+man/man1/mysqladmin.1.gz
+man/man1/mysqlbinlog.1.gz
+man/man1/mysqlcheck.1.gz
+man/man1/mysqldump.1.gz
+man/man1/mysqlimport.1.gz
+man/man1/mysqlshow.1.gz
+man/man1/mysqlslap.1.gz
+share/aclocal/mysql.m4