-default_build &&
+ if [[ $MARIADB_ENGINES == none ]] || [[ $MARIADB_ENGINES == all ]]; then
+ OPTS="-DWITH_${MARIADB_ENGINES^^} $OPTS"
+ else
+ for engine in $MARIADB_ENGINES; do
+ OPTS="-DWITH_${engine^^}_STORAGE_ENGINE=ON $OPTS"
+ done
+ fi &&
-config_query_option MADB_OPTS "Install client only?" n \
- "--without-server" \
- "--with-server" &&
+# backporting legacy options
+if [[ -n "$MADB_OPTS" ]]; then
+ persistent_add MARIADB_OPTS &&
+ MARIADB_OPTS="$MADB_OPTS" &&
+ persistent_remove MADB_OPTS
+fi &&
+
+if [[ $MARIADB_BRANCH == 5.5 ]]; then
+ if list_find "$MARIADB_OPTS" "--with-embedded-server"; then
+ list_remove "MARIADB_OPTS" "--with-embedded-server" &&
+ list_add "MARIADB_OPTS" "-DWITH_EMBEDDED_SERVER=ON"
+ elif list_find "$MARIADB_OPTS" "--without-embedded-server"; then
+ list_remove "MARIADB_OPTS" "--without-embedded-server" &&
+ list_add "MARIADB_OPTS" "-DWITH_EMBEDDED_SERVER=OFF"
+ elif list_find "$MARIADB_OPTS" "--with-server"; then
+ list_remove "MARIADB_OPTS" "--with-server" &&
+ list_add "MARIADB_OPTS" "-DWITHOUT_SERVER=OFF"
+ elif list_find "$MARIADB_OPTS" "--without-server"; then
+ list_remove "MARIADB_OPTS" "--without-server" &&
+ list_add "MARIADB_OPTS" "-DWITHOUT_SERVER=ON"
+ fi &&
+
+ config_query_option MARIADB_OPTS "Build the embedded server (libmysqld)?"
n \
+ "-DWITH_EMBEDDED_SERVER=ON" \
+ "-DWITH_EMBEDDED_SERVER=OFF" &&
+
+ config_query_option MARIADB_OPTS "Install client only?" n \
+ "-DWITHOUT_SERVER=ON" \
+ "-DWITHOUT_SERVER=OFF"
+else
+ config_query_option MARIADB_OPTS "Install client only?" n \
+ "--without-server" \
+ "--with-server" &&
+
+ config_query_option MARIADB_OPTS "Build the embedded server (libmysqld)?"
n \
+ "--with-embedded-server" \
+ "--without-embedded-server" &&
-config_query_option MADB_OPTS "Build the embedded server (libmysqld)?" n \
- "--with-embedded-server" \
- "--without-embedded-server" &&
+ if list_find "$MARIADB_OPTS" "--with-server"; then
+ config_query_option MARIADB_OPTS "Use libevent and have connection
pooling?" n \
+ "--with-libevent=yes" \
+ "--with-libevent=no"
+ fi
+fi &&
-if list_find "$MADB_OPTS" "--with-server"; then
- config_query_option MADB_OPTS "Use libevent and have connection pooling?"
n \
- "--with-libevent=yes" \
- "--with-libevent=no"
+# backporting legacy options
+if [[ -n "$MADB_CHARSET" ]]; then
+ persistent_add MARIADB_CHARSET &&
+ MARIADB_CHARSET="$MADB_CHARSET" &&
+ persistent_remove MADB_CHARSET
fi &&
-if list_find "$MADB_ENGINES" "all"; then
- MADB_ENGINES="all"
-elif list_find "$MADB_ENGINES" "none"; then
- MADB_ENGINES="none"
+if list_find "$MARIADB_ENGINES" "all"; then
+ MARIADB_ENGINES="all"
+elif list_find "$MARIADB_ENGINES" "none"; then
+ MARIADB_ENGINES="none"
fi
diff --git a/database/mariadb/DEPENDS b/database/mariadb/DEPENDS
index ed9f6ec..8f8e628 100755
--- a/database/mariadb/DEPENDS
+++ b/database/mariadb/DEPENDS
@@ -1,34 +1,72 @@
depends perl &&
depends procps &&
depends -sub CXX gcc &&
+depends bison &&
-optional_depends zlib \
- "--with-zlib-dir=$INSTALL_ROOT/" \
- "--with-zlib-dir=bundled" \
- "to use system zlib instead of bundled" &&
-
-# temporarily broken cause of mismatching API
-#optional_depends readline \
-# "--without-readline" "" \
-# "to use system readline instead of bundled" &&
-
-optional_depends libedit \
- "--without-libedit" "" \
- "to use system libedit instead of bundled" &&
-
-optional_depends openssl \
- "--with-ssl" \
- "--without-ssl" \
- "for OpenSSL support" &&
-
-optional_depends valgrind \
- "--with-valgrind" \
- "--without-valgrind" \
- "for Valgrind instrumentation" &&
-
-if list_find "$MADB_OPTS" "--with-libevent=yes"; then
- optional_depends libevent \
- "--with-libevent=$INSTALL_ROOT/usr" \
- "--with-libevent=bundled" \
- "to use system libevent instead of bundled"
+if [[ $MARIADB_BRANCH == 5.5 ]]; then
+ depends cmake &&
+
+ optional_depends readline \
+ "-DWITH_READLINE=OFF" \
+ "-DWITH_READLINE=ON" \
+ "to use system readline instead of bundled" &&
+
+ optional_depends zlib \
+ "-DWITH_ZLIB=system" \
+ "-DWITH_ZLIB=bundled" \
+ "to use system zlib instead of bundled" &&
+
+ optional_depends openssl \
+ "-DWITH_SSL=system" \
+ "-DWITH_SSL=bundled" \
+ "to use system SSL instead of bundled" &&
+
+ optional_depends tcp_wrappers \
+ "-DWITH_LIBWRAP=ON" \
+ "-DWITH_LIBWRAP=OFF" \
+ "for tcp wrappers support" &&
+
+ optional_depends valgrind \
+ "-DWITH_VALGRIND=ON" \
+ "-DWITH_VALGRIND=OFF" \
+ "for Valgrind instrumentation" &&
+
+ if list_find "$MARIADB_OPTS" "-DWITHOUT_SERVER=OFF"; then
+ optional_depends libevent "" "" "to use libevent and have connection
pooling"
+ fi &&
+
+ if list_find "$MARIADB_ENGINES" "xtradb"; then
+ depends libaio
+ fi &&
+
+ if list_find "$MARIADB_ENGINES" "oqgraph"; then
+ depends boost
+ fi
+else
+ optional_depends zlib \
+ "--with-zlib-dir=$INSTALL_ROOT/" \
+ "--with-zlib-dir=bundled" \
+ "to use system zlib instead of bundled" &&
+
+ optional_depends libedit \
+ "--without-libedit" \
+ "" \
+ "to use system libedit instead of bundled" &&
+
+ optional_depends openssl \
+ "--with-ssl" \
+ "--without-ssl" \
+ "for OpenSSL support" &&
+
+ optional_depends valgrind \
+ "--with-valgrind" \
+ "--without-valgrind" \
+ "for Valgrind instrumentation" &&
+
+ if list_find "$MARIADB_OPTS" "--with-libevent=yes"; then
+ optional_depends libevent \
+ "--with-libevent=$INSTALL_ROOT/usr" \
+ "--with-libevent=bundled" \
+ "to use system libevent instead of bundled"
+ fi
fi
diff --git a/database/mariadb/DETAILS b/database/mariadb/DETAILS
index 7111b30..51b0f2a 100755
--- a/database/mariadb/DETAILS
+++ b/database/mariadb/DETAILS
@@ -2,6 +2,9 @@
if [[ $MARIADB_BRANCH == 5.3 ]]; then
VERSION=5.3.12
SOURCE_HASH=sha512:d53ea48745dad5693fd6a1fd5cf502852f12f8236b8a1fb7f81ad647301d2fd08d4f2944c74de580d0a4136d6c8b49f257124fa1b234ba8f2338f2047435ef94
+elif [[ $MARIADB_BRANCH == 5.5 ]]; then
+ VERSION=5.5.36
+
SOURCE_HASH=sha512:b7de14f4d4a08f51aae339779c59798f3ed110aa3d65038c39514161ee73b6cc95f95fe1b15434daf33de689b0d7351cbf7a1c90ca980f0f020b085ef23aa016
else
VERSION=5.2.14
SECURITY_PATCH=3
diff --git a/database/mariadb/FINAL b/database/mariadb/FINAL
index daee887..9a9db7d 100755
--- a/database/mariadb/FINAL
+++ b/database/mariadb/FINAL
@@ -1,4 +1,5 @@
-if list_find "$MADB_OPTS" "--with-server" ]]; then
+if list_find "$MARIADB_OPTS" "--with-server" || \
+ list_find "$MARIADB_OPTS" "-DWITHOUT_SERVER=OFF"; then
message "${MESSAGE_COLOR}After initial install of MariaDB run"
message "\"mysql_install_db --user=mariadb\" to create directory"
message "structure and initial tables. See MariaDB documentation"
diff --git a/database/mariadb/HISTORY b/database/mariadb/HISTORY
index 70c5fbd..4bea901 100644
--- a/database/mariadb/HISTORY
+++ b/database/mariadb/HISTORY
@@ -1,3 +1,17 @@
+2014-04-07 Vlad Glagolev <stealth AT sourcemage.org>
+ * DETAILS, PREPARE: added 5.5 branch
+ * CONFIGURE: renamed lists MADB_* -> MARIADB_*; added missing
charsets;
+ split engines list for different branches
+ * DEPENDS: added bison dependency; added cmake (optional) and libaio,
+ boost for 5.5 branch
+ * BUILD: cmake build for 5.5 branch; use MARIADB_OPTS
+ * INSTALL: added target for 5.5 branch
+ * PRE_BUILD: added check for 5.5 branch; renamed mysqld user mysql ->
+ mariadb
+ * FINAL: fixed syntax error; added check for 5.5 branch
+ * {PRE_,}SUB_DEPENDS: rewritten; echo -> message
+ * REPAIR^all^PRE_SUB_DEPENDS: added
+
2013-02-10 Vlad Glagolev <stealth AT sourcemage.org>
* DETAILS: added 5.3 branch; PATCHLEVEL=1 for 5.2 branch to set
MARIADB_BRANCH in tablet for further usage; updated website
diff --git a/database/mariadb/INSTALL b/database/mariadb/INSTALL
index 9c90b69..1db0634 100755
--- a/database/mariadb/INSTALL
+++ b/database/mariadb/INSTALL
@@ -1,13 +1,17 @@
-make benchdir_root="${TRACK_ROOT}/usr/share/mysql" \
- testroot="${TRACK_ROOT}/usr/share/mysql" \
- install &&
+if [[ $MARIADB_BRANCH == 5.5 ]]; then
+ default_install
+else
+ make benchdir_root="${TRACK_ROOT}/usr/share/mysql" \
+ testroot="${TRACK_ROOT}/usr/share/mysql" \
+ install &&
-if [[ $MARIA_TESTS == n ]]; then
+ if [[ $MARIA_TESTS == n ]]; then
rm -rf "${INSTALL_ROOT}/usr/share/mysql/mysql-test"
-fi &&
+ fi &&
-if [[ $MARIA_BENCH == n ]]; then
- rm -fr "${INSTALL_ROOT}/usr/share/mysql/sql-bench"
+ if [[ $MARIA_BENCH == n ]]; then
+ rm -rf "${INSTALL_ROOT}/usr/share/mysql/sql-bench"
+ fi
fi &&
if [[ $INIT_INSTALLED ]]; then
diff --git a/database/mariadb/PREPARE b/database/mariadb/PREPARE
index cb0d439..708765d 100755
--- a/database/mariadb/PREPARE
+++ b/database/mariadb/PREPARE
@@ -7,12 +7,12 @@
#
persistent_read $SPELL MARIADB_BRANCH MARIADB_BRANCH || true &&
-if [[ -z "$MARIADB_BRANCH" ]]; then
+if spell_ok $SPELL && [[ -z "$MARIADB_BRANCH" ]]; then
persistent_add MARIADB_BRANCH &&
local MARIADB_BRANCH="5.2"
fi &&