aboutsummaryrefslogtreecommitdiff
path: root/databases/mariadb100-client
diff options
context:
space:
mode:
authorJohn Marino <marino@FreeBSD.org>2014-11-04 08:21:55 +0000
committerJohn Marino <marino@FreeBSD.org>2014-11-04 08:21:55 +0000
commitd2bcf058dc37256369bad9b9a1157fc76c059467 (patch)
tree72ab3bccf2944cb7cd4cc6703c6db257586e3e02 /databases/mariadb100-client
parent24254e934a4e8fb1982db148d4aa85bf4ee67c69 (diff)
downloadports-d2bcf058dc37256369bad9b9a1157fc76c059467.tar.gz
ports-d2bcf058dc37256369bad9b9a1157fc76c059467.zip
Notes
Diffstat (limited to 'databases/mariadb100-client')
-rw-r--r--databases/mariadb100-client/Makefile28
-rw-r--r--databases/mariadb100-client/files/patch-CMakeLists.txt55
-rw-r--r--databases/mariadb100-client/files/patch-client_CMakeLists.txt57
-rw-r--r--databases/mariadb100-client/files/patch-cmake__jemalloc.cmake18
-rw-r--r--databases/mariadb100-client/files/patch-extra_CMakeLists.txt25
-rw-r--r--databases/mariadb100-client/files/patch-extra_yassl_taocrypt_src_integer.cpp11
-rw-r--r--databases/mariadb100-client/files/patch-include_CMakeLists.txt22
-rw-r--r--databases/mariadb100-client/files/patch-include_my_compare.h11
-rw-r--r--databases/mariadb100-client/files/patch-libmysql_CMakeLists.txt11
-rw-r--r--databases/mariadb100-client/files/patch-libservices_CMakeLists.txt9
-rw-r--r--databases/mariadb100-client/files/patch-man_CMakeLists.txt16
-rw-r--r--databases/mariadb100-client/files/patch-mysys_my_default.c61
-rw-r--r--databases/mariadb100-client/files/patch-pcre_CMakeLists.txt11
-rw-r--r--databases/mariadb100-client/files/patch-scripts_CMakeLists.txt78
-rw-r--r--databases/mariadb100-client/files/patch-scripts_mysql_config.sh14
-rw-r--r--databases/mariadb100-client/files/patch-sql_CMakeLists.txt14
-rw-r--r--databases/mariadb100-client/files/patch-support-files_CMakeLists.txt48
-rw-r--r--databases/mariadb100-client/files/pkg-message.in7
-rw-r--r--databases/mariadb100-client/pkg-plist104
19 files changed, 600 insertions, 0 deletions
diff --git a/databases/mariadb100-client/Makefile b/databases/mariadb100-client/Makefile
new file mode 100644
index 000000000000..729ca9482df0
--- /dev/null
+++ b/databases/mariadb100-client/Makefile
@@ -0,0 +1,28 @@
+# $FreeBSD$
+
+PORTNAME= mariadb
+PKGNAMESUFFIX= 100-client
+
+COMMENT= Multithreaded SQL database (client)
+
+MASTERDIR= ${.CURDIR}/../mariadb100-server
+
+FILESDIR= ${.CURDIR}/files
+PATCHDIR= ${.CURDIR}/files
+PLIST= ${.CURDIR}/pkg-plist
+
+CONFLICTS_INSTALL= mysql[0-9][0-9]-client-* \
+ mariadb[0-46-9][0-9]-client-* \
+ mariadb5.[0-46-9]-client-* \
+ percona[0-9][0-9]-client-*
+
+CMAKE_ARGS+= -DWITHOUT_SERVER=1
+
+USE_LDCONFIG= ${PREFIX}/lib/mysql
+
+CLIENT_ONLY= yes
+
+post-install:
+ ${RM} ${STAGEDIR}${PREFIX}/share/aclocal/mysql.m4
+
+.include "${MASTERDIR}/Makefile"
diff --git a/databases/mariadb100-client/files/patch-CMakeLists.txt b/databases/mariadb100-client/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..a346520af0dc
--- /dev/null
+++ b/databases/mariadb100-client/files/patch-CMakeLists.txt
@@ -0,0 +1,55 @@
+--- CMakeLists.txt.orig 2014-09-25 00:29:47.000000000 +0200
++++ CMakeLists.txt 2014-09-27 09:57:32.000000000 +0200
+@@ -430,28 +430,8 @@
+ ADD_SUBDIRECTORY(extra)
+ ADD_SUBDIRECTORY(libservices)
+ ADD_SUBDIRECTORY(scripts)
+-ADD_SUBDIRECTORY(sql/share)
+ ADD_SUBDIRECTORY(support-files)
+
+-IF(NOT WITHOUT_SERVER)
+- ADD_SUBDIRECTORY(tests)
+- ADD_SUBDIRECTORY(sql)
+- OPTION (WITH_EMBEDDED_SERVER "Compile MySQL with embedded server" OFF)
+- IF(WITH_EMBEDDED_SERVER)
+- ADD_SUBDIRECTORY(libmysqld)
+- ADD_SUBDIRECTORY(libmysqld/examples)
+- ENDIF(WITH_EMBEDDED_SERVER)
+-
+- ADD_SUBDIRECTORY(mysql-test)
+- ADD_SUBDIRECTORY(mysql-test/lib/My/SafeProcess)
+- ADD_SUBDIRECTORY(sql-bench)
+-
+- IF(EXISTS ${CMAKE_SOURCE_DIR}/internal/CMakeLists.txt)
+- ADD_SUBDIRECTORY(internal)
+- ENDIF()
+- ADD_SUBDIRECTORY(packaging/rpm-oel)
+-ENDIF()
+-
+ IF(UNIX)
+ ADD_SUBDIRECTORY(man)
+ ENDIF()
+@@ -463,7 +443,6 @@
+ ADD_SUBDIRECTORY(win/upgrade_wizard)
+ ADD_SUBDIRECTORY(win/packaging)
+ ENDIF()
+-ADD_SUBDIRECTORY(packaging/solaris)
+
+ IF(NOT CMAKE_CROSSCOMPILING)
+ SET(EXPORTED comp_err comp_sql factorial)
+@@ -506,6 +485,7 @@
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+ )
+
++IF(FALSE)
+ INSTALL_DOCUMENTATION(README CREDITS COPYING COPYING.LESSER EXCEPTIONS-CLIENT
+ COMPONENT Readme)
+
+@@ -516,6 +496,7 @@
+ IF(UNIX)
+ INSTALL_DOCUMENTATION(Docs/INSTALL-BINARY COMPONENT Readme)
+ ENDIF()
++ENDIF()
+
+ INCLUDE(CPack)
+
diff --git a/databases/mariadb100-client/files/patch-client_CMakeLists.txt b/databases/mariadb100-client/files/patch-client_CMakeLists.txt
new file mode 100644
index 000000000000..7acc3e306f79
--- /dev/null
+++ b/databases/mariadb100-client/files/patch-client_CMakeLists.txt
@@ -0,0 +1,57 @@
+--- client/CMakeLists.txt.orig 2014-08-09 00:13:48.000000000 +0200
++++ client/CMakeLists.txt 2014-09-05 22:40:26.210338712 +0200
+@@ -38,11 +38,12 @@
+ SET_TARGET_PROPERTIES(mysql PROPERTIES ENABLE_EXPORTS TRUE)
+ ENDIF(UNIX)
+
++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 pcre pcreposix)
+ SET_TARGET_PROPERTIES(mysqltest PROPERTIES ENABLE_EXPORTS TRUE)
+-
++ENDIF()
+
+ MYSQL_ADD_EXECUTABLE(mysqlcheck mysqlcheck.c)
+ TARGET_LINK_LIBRARIES(mysqlcheck mysqlclient)
+@@ -53,21 +54,25 @@
+ MYSQL_ADD_EXECUTABLE(mysqlimport mysqlimport.c)
+ TARGET_LINK_LIBRARIES(mysqlimport mysqlclient)
+
++IF(FALSE)
+ MYSQL_ADD_EXECUTABLE(mysql_upgrade mysql_upgrade.c COMPONENT Server)
+ TARGET_LINK_LIBRARIES(mysql_upgrade mysqlclient)
+ ADD_DEPENDENCIES(mysql_upgrade GenFixPrivs)
++ENDIF()
+
+ MYSQL_ADD_EXECUTABLE(mysqlshow mysqlshow.c)
+ TARGET_LINK_LIBRARIES(mysqlshow mysqlclient)
+
++IF(FALSE)
+ MYSQL_ADD_EXECUTABLE(mysql_plugin mysql_plugin.c)
+ TARGET_LINK_LIBRARIES(mysql_plugin mysqlclient)
++ENDIF()
+
+ MYSQL_ADD_EXECUTABLE(mysqlbinlog mysqlbinlog.cc)
+ TARGET_LINK_LIBRARIES(mysqlbinlog mysqlclient)
+
+ MYSQL_ADD_EXECUTABLE(mysqladmin mysqladmin.cc)
+-TARGET_LINK_LIBRARIES(mysqladmin mysqlclient)
++tARGET_LINK_LIBRARIES(mysqladmin mysqlclient)
+
+ MYSQL_ADD_EXECUTABLE(mysqlslap mysqlslap.c)
+ SET_SOURCE_FILES_PROPERTIES(mysqlslap.c PROPERTIES COMPILE_FLAGS "-DTHREADS")
+@@ -79,10 +84,12 @@
+ ENDIF(WIN32)
+
+ # async_example is just a code example, do not install it.
++IF(FALSE)
+ ADD_EXECUTABLE(async_example async_example.c)
+ TARGET_LINK_LIBRARIES(async_example mysqlclient)
++ENDIF()
+
+-SET_TARGET_PROPERTIES (mysqlcheck mysqldump mysqlimport mysql_upgrade mysqlshow mysqlslap mysql_plugin async_example
++SET_TARGET_PROPERTIES (mysqlcheck mysqldump mysqlimport mysqlshow mysqlslap
+ PROPERTIES HAS_CXX TRUE)
+
+ ADD_DEFINITIONS(-DHAVE_DLOPEN)
diff --git a/databases/mariadb100-client/files/patch-cmake__jemalloc.cmake b/databases/mariadb100-client/files/patch-cmake__jemalloc.cmake
new file mode 100644
index 000000000000..aea0487ba809
--- /dev/null
+++ b/databases/mariadb100-client/files/patch-cmake__jemalloc.cmake
@@ -0,0 +1,18 @@
+--- cmake/jemalloc.cmake.orig 2014-09-25 00:29:47.000000000 +0200
++++ cmake/jemalloc.cmake 2014-09-27 10:05:48.000000000 +0200
+@@ -24,12 +24,12 @@
+ SET(what system)
+ ENDIF()
+
+- CHECK_LIBRARY_EXISTS(${libname} malloc_stats_print "" HAVE_JEMALLOC)
++ CHECK_LIBRARY_EXISTS(c malloc_stats_print "" HAVE_JEMALLOC)
+ SET(CMAKE_REQUIRED_LIBRARIES)
+
+ IF (HAVE_JEMALLOC)
+- SET(LIBJEMALLOC ${libname})
+- SET(MALLOC_LIBRARY "${what} jemalloc")
++ SET(LIBJEMALLOC c)
++ SET(MALLOC_LIBRARY "system jemalloc")
+ ELSEIF (NOT WITH_JEMALLOC STREQUAL "auto")
+ MESSAGE(FATAL_ERROR "${libname} is not found")
+ ENDIF()
diff --git a/databases/mariadb100-client/files/patch-extra_CMakeLists.txt b/databases/mariadb100-client/files/patch-extra_CMakeLists.txt
new file mode 100644
index 000000000000..f08649d6ed04
--- /dev/null
+++ b/databases/mariadb100-client/files/patch-extra_CMakeLists.txt
@@ -0,0 +1,25 @@
+--- extra/CMakeLists.txt.orig 2012-12-17 03:38:29.000000000 +0200
++++ extra/CMakeLists.txt 2012-12-17 03:40:12.000000000 +0200
+@@ -54,6 +54,7 @@
+ DEPENDS
+ ${CMAKE_BINARY_DIR}/include/mysqld_error.h.tmp)
+
++IF(FALSE)
+ MYSQL_ADD_EXECUTABLE(my_print_defaults my_print_defaults.c)
+ TARGET_LINK_LIBRARIES(my_print_defaults mysys)
+
+@@ -74,11 +75,14 @@
+
+ MYSQL_ADD_EXECUTABLE(replace replace.c COMPONENT Server)
+ TARGET_LINK_LIBRARIES(replace mysys)
++ENDIF()
+ IF(UNIX)
++IF(FALSE)
+ MYSQL_ADD_EXECUTABLE(innochecksum innochecksum.c)
+
+ MYSQL_ADD_EXECUTABLE(resolve_stack_dump resolve_stack_dump.c)
+ TARGET_LINK_LIBRARIES(resolve_stack_dump mysys)
++ENDIF()
+
+ MYSQL_ADD_EXECUTABLE(mysql_waitpid mysql_waitpid.c COMPONENT Client)
+ TARGET_LINK_LIBRARIES(mysql_waitpid mysys)
diff --git a/databases/mariadb100-client/files/patch-extra_yassl_taocrypt_src_integer.cpp b/databases/mariadb100-client/files/patch-extra_yassl_taocrypt_src_integer.cpp
new file mode 100644
index 000000000000..214edfd8834a
--- /dev/null
+++ b/databases/mariadb100-client/files/patch-extra_yassl_taocrypt_src_integer.cpp
@@ -0,0 +1,11 @@
+--- extra/yassl/taocrypt/src/integer.cpp.orig 2014-04-15 14:02:39.000000000 +0300
++++ extra/yassl/taocrypt/src/integer.cpp 2014-05-16 17:00:15.000000000 +0300
+@@ -75,7 +75,7 @@
+ CPP_TYPENAME AlignedAllocator<T>::pointer AlignedAllocator<T>::allocate(
+ size_type n, const void *)
+ {
+- if (n > this->max_size())
++ if (n > AlignedAllocator<T>::max_size())
+ return 0;
+ if (n == 0)
+ return 0;
diff --git a/databases/mariadb100-client/files/patch-include_CMakeLists.txt b/databases/mariadb100-client/files/patch-include_CMakeLists.txt
new file mode 100644
index 000000000000..e4c1761275ca
--- /dev/null
+++ b/databases/mariadb100-client/files/patch-include_CMakeLists.txt
@@ -0,0 +1,22 @@
+--- include/CMakeLists.txt.orig 2012-11-28 17:49:47.000000000 +0200
++++ include/CMakeLists.txt 2012-12-23 00:48:29.000000000 +0200
+@@ -58,13 +58,18 @@
+ FOREACH(f ${HEADERS_GEN_CONFIGURE})
+ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${f} DESTINATION ${INSTALL_INCLUDEDIR} COMPONENT Development PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
+ ENDFOREACH(f)
+-INSTALL(DIRECTORY mysql/ DESTINATION ${INSTALL_INCLUDEDIR} COMPONENT Development FILES_MATCHING PATTERN "*.h")
++INSTALL(DIRECTORY mysql/ DESTINATION ${INSTALL_INCLUDEDIR} COMPONENT Development
++ FILES_MATCHING PATTERN "*.h"
++ PATTERN "psi_abi*" EXCLUDE
++)
+
+ STRING(REPLACE "." "\\." EXCL_RE "${HEADERS};${HEADERS_GEN_CONFIGURE}")
+ STRING(REPLACE ";" "|" EXCL_RE "${EXCL_RE}")
+
++IF(FALSE)
+ INSTALL(DIRECTORY . DESTINATION ${INSTALL_INCLUDEDIR}/private COMPONENT Development
+ FILES_MATCHING PATTERN "*.h"
+ PATTERN CMakeFiles EXCLUDE
+ PATTERN mysql EXCLUDE
+ REGEX "\\./(${EXCL_RE}$)" EXCLUDE)
++ENDIF()
diff --git a/databases/mariadb100-client/files/patch-include_my_compare.h b/databases/mariadb100-client/files/patch-include_my_compare.h
new file mode 100644
index 000000000000..ad948aa1b5db
--- /dev/null
+++ b/databases/mariadb100-client/files/patch-include_my_compare.h
@@ -0,0 +1,11 @@
+--- include/my_compare.h.orig 2012-12-17 03:52:37.000000000 +0200
++++ include/my_compare.h 2012-12-17 03:53:40.000000000 +0200
+@@ -40,7 +40,7 @@
+ 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 32 /* Max segments for key */
+
+ #define HA_MAX_POSSIBLE_KEY_BUFF (HA_MAX_KEY_LENGTH + 24+ 6+6)
diff --git a/databases/mariadb100-client/files/patch-libmysql_CMakeLists.txt b/databases/mariadb100-client/files/patch-libmysql_CMakeLists.txt
new file mode 100644
index 000000000000..5b7f086a93ae
--- /dev/null
+++ b/databases/mariadb100-client/files/patch-libmysql_CMakeLists.txt
@@ -0,0 +1,11 @@
+--- libmysql/CMakeLists.txt.orig 2014-09-24 22:29:47 UTC
++++ libmysql/CMakeLists.txt
+@@ -437,6 +437,8 @@ IF(NOT DISABLE_SHARED)
+ # libtool compatability
+ IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR APPLE)
+ SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}")
++ ELSEIF(CMAKE_SYSTEM_NAME MATCHES "DragonFly")
++ SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}")
+ ELSEIF(CMAKE_SYSTEM_NAME MATCHES "HP-UX")
+ SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}.0")
+ ELSE()
diff --git a/databases/mariadb100-client/files/patch-libservices_CMakeLists.txt b/databases/mariadb100-client/files/patch-libservices_CMakeLists.txt
new file mode 100644
index 000000000000..beb30eb10a81
--- /dev/null
+++ b/databases/mariadb100-client/files/patch-libservices_CMakeLists.txt
@@ -0,0 +1,9 @@
+--- libservices/CMakeLists.txt.orig 2014-08-09 00:13:47.000000000 +0200
++++ libservices/CMakeLists.txt 2014-09-05 22:29:05.110415834 +0200
+@@ -29,4 +29,6 @@
+ logger_service.c)
+
+ ADD_CONVENIENCE_LIBRARY(mysqlservices ${MYSQLSERVICES_SOURCES})
++IF(FALSE)
+ INSTALL(TARGETS mysqlservices DESTINATION ${INSTALL_LIBDIR} COMPONENT Development)
++ENDIF()
diff --git a/databases/mariadb100-client/files/patch-man_CMakeLists.txt b/databases/mariadb100-client/files/patch-man_CMakeLists.txt
new file mode 100644
index 000000000000..09dd6e3b0f7d
--- /dev/null
+++ b/databases/mariadb100-client/files/patch-man_CMakeLists.txt
@@ -0,0 +1,16 @@
+--- man/CMakeLists.txt.orig 2012-12-22 21:30:12.000000000 +0200
++++ man/CMakeLists.txt 2012-12-22 21:30:54.000000000 +0200
+@@ -30,9 +30,13 @@
+ SET(MAN1_TEST mysql-stress-test.pl.1 mysql-test-run.pl.1 mysql_client_test.1
+ mysqltest_embedded.1 mysql_client_test_embedded.1)
+
++IF(FALSE)
+ INSTALL(FILES ${MAN1_SERVER} DESTINATION ${INSTALL_MANDIR}/man1 COMPONENT ManPagesServer)
+ INSTALL(FILES ${MAN8_SERVER} DESTINATION ${INSTALL_MANDIR}/man8 COMPONENT ManPagesServer)
++ENDIF()
+ INSTALL(FILES ${MAN1_CLIENT} DESTINATION ${INSTALL_MANDIR}/man1 COMPONENT ManPagesClient)
+ INSTALL(FILES ${MAN1_DEVEL} DESTINATION ${INSTALL_MANDIR}/man1 COMPONENT ManPagesDevelopment)
++IF(FALSE)
+ INSTALL(FILES ${MAN1_TEST} DESTINATION ${INSTALL_MANDIR}/man1 COMPONENT ManPagesTest)
++ENDIF()
+
diff --git a/databases/mariadb100-client/files/patch-mysys_my_default.c b/databases/mariadb100-client/files/patch-mysys_my_default.c
new file mode 100644
index 000000000000..fef69528a070
--- /dev/null
+++ b/databases/mariadb100-client/files/patch-mysys_my_default.c
@@ -0,0 +1,61 @@
+--- mysys/my_default.c.orig 2014-08-09 00:13:39.000000000 +0200
++++ mysys/my_default.c 2014-09-05 19:56:48.006019959 +0200
+@@ -90,7 +90,7 @@
+
+ /* 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;
+
+@@ -785,7 +785,7 @@
+ {
+ MY_STAT stat_info;
+ if (!my_stat(name,&stat_info,MYF(0)))
+- return 1;
++ return 0;
+ /*
+ Ignore world-writable regular files.
+ This is mainly done to protect us to not read a file created by
+@@ -803,6 +803,14 @@
+ if (!(fp= mysql_file_fopen(key_file_cnf, name, O_RDONLY, MYF(0))))
+ 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_fgets(buff, sizeof(buff) - 1, fp))
+ {
+ line++;
+@@ -1067,7 +1075,8 @@
+ if (name[0] == FN_HOMELIB) /* Add . to filenames in home */
+ *end++= '.';
+ strxmov(end, conf_file, *ext, " ", NullS);
+- fputs(name, stdout);
++ if (strstr(name, "/etc") != name)
++ fputs(name, stdout);
+ }
+ }
+ }
+@@ -1223,13 +1232,10 @@
+
+ #else
+
+-#if defined(DEFAULT_SYSCONFDIR)
+- if (DEFAULT_SYSCONFDIR[0])
+- errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs);
+-#else
+ errors += add_directory(alloc, "/etc/", dirs);
+ errors += add_directory(alloc, "/etc/mysql/", dirs);
+-#endif /* DEFAULT_SYSCONFDIR */
++ errors += add_directory(alloc, "/usr/local/etc/", dirs);
++ errors += add_directory(alloc, "/usr/local/etc/mysql/", dirs);
+
+ #endif
+
diff --git a/databases/mariadb100-client/files/patch-pcre_CMakeLists.txt b/databases/mariadb100-client/files/patch-pcre_CMakeLists.txt
new file mode 100644
index 000000000000..2c46f7484de7
--- /dev/null
+++ b/databases/mariadb100-client/files/patch-pcre_CMakeLists.txt
@@ -0,0 +1,11 @@
+--- pcre/CMakeLists.txt.orig 2014-08-09 00:13:36.000000000 +0200
++++ pcre/CMakeLists.txt 2014-09-05 20:08:49.090972949 +0200
+@@ -513,6 +513,8 @@
+ MESSAGE(STATUS "")
+ ENDIF(PCRE_SHOW_REPORT)
+
++IF(FALSE)
+ INSTALL(FILES ${CMAKE_BINARY_DIR}/pcre/pcre.h DESTINATION ${INSTALL_INCLUDEDIR}/private COMPONENT Development)
++ENDIF()
+
+ # end CMakeLists.txt
diff --git a/databases/mariadb100-client/files/patch-scripts_CMakeLists.txt b/databases/mariadb100-client/files/patch-scripts_CMakeLists.txt
new file mode 100644
index 000000000000..729f635ef36e
--- /dev/null
+++ b/databases/mariadb100-client/files/patch-scripts_CMakeLists.txt
@@ -0,0 +1,78 @@
+--- scripts/CMakeLists.txt.orig 2014-08-09 00:13:37.000000000 +0200
++++ scripts/CMakeLists.txt 2014-09-05 22:33:01.060378167 +0200
+@@ -72,6 +72,7 @@
+ )
+ ENDIF()
+
++IF(FALSE)
+ INSTALL(FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/mysql_system_tables.sql
+ ${CMAKE_CURRENT_SOURCE_DIR}/mysql_system_tables_data.sql
+@@ -81,6 +82,7 @@
+ ${FIX_PRIVILEGES_SQL}
+ DESTINATION ${INSTALL_MYSQLSHAREDIR} COMPONENT Server
+ )
++ENDIF()
+
+ # TCMalloc hacks
+ IF(MALLOC_LIB)
+@@ -140,6 +142,7 @@
+ SET(HOSTNAME "hostname")
+ SET(MYSQLD_USER "mysql")
+
++IF(FALSE)
+ # Required for mysqlbug until autotools are deprecated, once done remove these
+ # and expand default cmake variables
+ SET(CC ${CMAKE_C_COMPILER})
+@@ -180,6 +183,7 @@
+ DESTINATION ${INSTALL_BINDIR}
+ COMPONENT Server
+ )
++ENDIF()
+
+ ENDIF(UNIX)
+
+@@ -204,6 +208,7 @@
+ SET(localstatedir ${MYSQL_DATADIR})
+ ENDIF()
+
++IF()
+ IF(UNIX)
+ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_install_db.sh
+ ${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db ESCAPE_QUOTES @ONLY)
+@@ -219,6 +224,7 @@
+ COMPONENT Server
+ )
+ ENDIF()
++ENDIF()
+
+ SET(prefix "${CMAKE_INSTALL_PREFIX}")
+ IF(INSTALL_SYSCONFDIR)
+@@ -281,6 +287,8 @@
+ STRING(REGEX REPLACE "^lib" "" lib "${lib}")
+ SET(${var} "${${var}}-l${lib} " )
+ ENDIF()
++ ELSEIF(lib STREQUAL "-pthread")
++ SET(${var} "${${var}}-pthread " )
+ ELSE()
+ SET(${var} "${${var}}-l${lib} " )
+ ENDIF()
+@@ -339,18 +347,8 @@
+ SET(BIN_SCRIPTS
+ msql2mysql
+ mysql_config
+- mysql_fix_extensions
+- mysql_setpermission
+- mysql_secure_installation
+- mysql_zap
+ mysqlaccess
+- mysql_convert_table_format
+ mysql_find_rows
+- mytop
+- mysqlhotcopy
+- mysqldumpslow
+- mysqld_multi
+- mysqld_safe
+ )
+ FOREACH(file ${BIN_SCRIPTS})
+ IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh)
diff --git a/databases/mariadb100-client/files/patch-scripts_mysql_config.sh b/databases/mariadb100-client/files/patch-scripts_mysql_config.sh
new file mode 100644
index 000000000000..5271d5256b8f
--- /dev/null
+++ b/databases/mariadb100-client/files/patch-scripts_mysql_config.sh
@@ -0,0 +1,14 @@
+--- scripts/mysql_config.sh.orig 2014-04-15 14:02:39.000000000 +0300
++++ scripts/mysql_config.sh 2014-05-16 19:08:41.000000000 +0300
+@@ -108,8 +108,11 @@
+ # We intentionally add a space to the beginning and end of lib strings, simplifies replace later
+ libs=" $ldflags -L$pkglibdir @RPATH_OPTION@ -lmysqlclient @ZLIB_DEPS@ @NON_THREADED_LIBS@"
+ libs="$libs @openssl_libs@ @STATIC_NSS_FLAGS@ "
++libs="$libs -L%%LOCALBASE%%/lib "
+ libs_r=" $ldflags -L$pkglibdir @RPATH_OPTION@ -lmysqlclient_r @ZLIB_DEPS@ @CLIENT_LIBS@ @openssl_libs@ "
++libs_r="$libs_r -L%%LOCALBASE%%/lib "
+ embedded_libs=" $ldflags -L$pkglibdir @RPATH_OPTION@ -lmysqld @LIBDL@ @ZLIB_DEPS@ @LIBS@ @WRAPLIBS@ @openssl_libs@ "
++embedded_libs="$embedded_libs -L%%LOCALBASE%%/lib "
+
+ if [ -r "$pkglibdir/libmygcc.a" ]; then
+ # When linking against the static library with a different version of GCC
diff --git a/databases/mariadb100-client/files/patch-sql_CMakeLists.txt b/databases/mariadb100-client/files/patch-sql_CMakeLists.txt
new file mode 100644
index 000000000000..4c14473d5e2d
--- /dev/null
+++ b/databases/mariadb100-client/files/patch-sql_CMakeLists.txt
@@ -0,0 +1,14 @@
+--- sql/CMakeLists.txt.orig 2014-09-05 22:49:59.808332000 +0200
++++ sql/CMakeLists.txt 2014-09-05 22:50:18.768326206 +0200
+@@ -226,9 +226,9 @@
+ )
+
+ # Gen_lex_hash
+-IF(NOT CMAKE_CROSSCOMPILING)
++
+ ADD_EXECUTABLE(gen_lex_hash gen_lex_hash.cc)
+-ENDIF()
++
+
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h
diff --git a/databases/mariadb100-client/files/patch-support-files_CMakeLists.txt b/databases/mariadb100-client/files/patch-support-files_CMakeLists.txt
new file mode 100644
index 000000000000..314bf0b121fe
--- /dev/null
+++ b/databases/mariadb100-client/files/patch-support-files_CMakeLists.txt
@@ -0,0 +1,48 @@
+--- support-files/CMakeLists.txt.orig 2014-06-13 13:36:52.080474738 +0300
++++ support-files/CMakeLists.txt 2014-06-13 13:50:59.537282325 +0300
+@@ -41,15 +41,18 @@
+ SET(inst_location ${INSTALL_SUPPORTFILESDIR})
+ ENDIF()
+
++IF(FALSE)
+ FOREACH(inifile my-huge my-innodb-heavy-4G my-large my-medium my-small)
+ 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)
+ ENDFOREACH()
++ENDIF()
+
+ IF(UNIX)
+ SET(prefix ${CMAKE_INSTALL_PREFIX})
++ IF(FALSE)
+ FOREACH(script mysqld_multi.server mysql-log-rotate binary-configure)
+ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${script}.sh
+ ${CMAKE_CURRENT_BINARY_DIR}/${script} @ONLY )
+@@ -67,8 +70,10 @@
+ INSTALL(FILES magic DESTINATION ${inst_location} COMPONENT SupportFiles)
+ INSTALL(DIRECTORY RHEL4-SElinux/ DESTINATION ${inst_location}/SELinux/RHEL4 COMPONENT SupportFiles)
+ ENDIF()
++ ENDIF()
+
+ INSTALL(FILES mysql.m4 DESTINATION ${INSTALL_SHAREDIR}/aclocal COMPONENT Development)
++ IF(FALSE)
+ CONFIGURE_FILE(MySQL-shared-compat.spec.sh ${CMAKE_CURRENT_BINARY_DIR}/MySQL-shared-compat.spec @ONLY)
+ CONFIGURE_FILE(mysql.spec.sh ${CMAKE_CURRENT_BINARY_DIR}/mysql.spec @ONLY)
+
+@@ -92,6 +97,7 @@
+ DESTINATION ${inst_location} COMPONENT SupportFiles
+ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ
+ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
++
+
+ IF (INSTALL_SYSCONFDIR)
+ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mysql-log-rotate DESTINATION ${INSTALL_SYSCONFDIR}/logrotate.d
+@@ -101,6 +107,7 @@
+ RENAME mysql COMPONENT SupportFiles
+ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ
+ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
++ ENDIF()
+
+ INSTALL(FILES rpm/my.cnf DESTINATION ${INSTALL_SYSCONFDIR}
+ COMPONENT Common)
diff --git a/databases/mariadb100-client/files/pkg-message.in b/databases/mariadb100-client/files/pkg-message.in
new file mode 100644
index 000000000000..8bea32f83491
--- /dev/null
+++ b/databases/mariadb100-client/files/pkg-message.in
@@ -0,0 +1,7 @@
+************************************************************************
+
+MariaDB respects hier(7) and doesn't check /etc and /etc/mysql for
+my.cnf. Please move existing my.cnf files from those paths to
+%%PREFIX%%/etc and %%PREFIX%%/etc/mysql.
+
+************************************************************************
diff --git a/databases/mariadb100-client/pkg-plist b/databases/mariadb100-client/pkg-plist
new file mode 100644
index 000000000000..f098dab1aea5
--- /dev/null
+++ b/databases/mariadb100-client/pkg-plist
@@ -0,0 +1,104 @@
+bin/msql2mysql
+bin/mysql
+bin/mysql_config
+bin/mysql_find_rows
+bin/mysql_waitpid
+bin/mysqlaccess
+bin/mysqladmin
+bin/mysqlbinlog
+bin/mysqlcheck
+bin/mysqldump
+bin/mysqlimport
+bin/mysqlshow
+bin/mysqlslap
+include/mysql/auth_dialog_client.h
+include/mysql/big_endian.h
+include/mysql/byte_order_generic.h
+include/mysql/byte_order_generic_x86.h
+include/mysql/byte_order_generic_x86_64.h
+include/mysql/client_plugin.h
+include/mysql/decimal.h
+include/mysql/errmsg.h
+include/mysql/handler_ername.h
+include/mysql/handler_state.h
+include/mysql/keycache.h
+include/mysql/little_endian.h
+include/mysql/m_ctype.h
+include/mysql/m_string.h
+include/mysql/ma_dyncol.h
+include/mysql/my_alloc.h
+include/mysql/my_attribute.h
+include/mysql/my_byteorder.h
+include/mysql/my_compiler.h
+include/mysql/my_config.h
+include/mysql/my_dbug.h
+include/mysql/my_decimal_limits.h
+include/mysql/my_dir.h
+include/mysql/my_getopt.h
+include/mysql/my_global.h
+include/mysql/my_list.h
+include/mysql/my_net.h
+include/mysql/my_pthread.h
+include/mysql/my_sys.h
+include/mysql/my_valgrind.h
+include/mysql/my_xml.h
+include/mysql/mysql.h
+include/mysql/mysql_com.h
+include/mysql/mysql_com_server.h
+include/mysql/mysql_embed.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_auth.h
+include/mysql/plugin_auth_common.h
+include/mysql/plugin_ftparser.h
+include/mysql/psi/mysql_file.h
+include/mysql/psi/mysql_idle.h
+include/mysql/psi/mysql_socket.h
+include/mysql/psi/mysql_stage.h
+include/mysql/psi/mysql_statement.h
+include/mysql/psi/mysql_table.h
+include/mysql/psi/mysql_thread.h
+include/mysql/psi/psi.h
+include/mysql/service_debug_sync.h
+include/mysql/service_kill_statement.h
+include/mysql/service_logger.h
+include/mysql/service_my_plugin_log.h
+include/mysql/service_my_snprintf.h
+include/mysql/service_progress_report.h
+include/mysql/service_sha1.h
+include/mysql/service_thd_alloc.h
+include/mysql/service_thd_autoinc.h
+include/mysql/service_thd_error_context.h
+include/mysql/service_thd_timezone.h
+include/mysql/service_thd_wait.h
+include/mysql/services.h
+include/mysql/sql_common.h
+include/mysql/sql_state.h
+include/mysql/sslopt-case.h
+include/mysql/sslopt-longopts.h
+include/mysql/sslopt-vars.h
+include/mysql/typelib.h
+lib/mysql/libmysqlclient.a
+lib/mysql/libmysqlclient.so
+lib/mysql/libmysqlclient.so.18
+lib/mysql/libmysqlclient_r.a
+lib/mysql/libmysqlclient_r.so
+lib/mysql/libmysqlclient_r.so.18
+man/man1/msql2mysql.1.gz
+man/man1/mysql.1.gz
+man/man1/mysql_config.1.gz
+man/man1/mysql_find_rows.1.gz
+man/man1/mysql_plugin.1.gz
+man/man1/mysql_waitpid.1.gz
+man/man1/mysqlaccess.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