summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Willy Sudiarto Raharjo <willysr@slackbuilds.org>2019-01-22 21:48:40 +0700
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2019-10-14 23:10:46 +0700
commit34647e5fb0d758ef81db53c8ac17d749af14fc52 (patch)
tree9fdf608db9e759ffa2633db3ef8f5f4e0a38a33a
parentd66a0530d964c06cc3a20ccad1c8071297dedf4b (diff)
downloadslackbuilds-mysql-workbench-wip.tar.gz
slackbuilds-mysql-workbench-wip.tar.xz
development/mysql-workbench: Updated for version 8.0.18.mysql-workbench-wip
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--development/mysql-workbench/README6
-rw-r--r--development/mysql-workbench/add-option-to-hide-nonstandard-server-warning.patch36
-rw-r--r--development/mysql-workbench/copytable.patch17
-rw-r--r--development/mysql-workbench/disable-unsupported-operating-system-warning.patch29
-rw-r--r--development/mysql-workbench/fix-build-for-i686.patch51
-rw-r--r--development/mysql-workbench/gdal-2.2.0.patch63
-rw-r--r--development/mysql-workbench/mysql-workbench-gnome-keyring.patch17
-rw-r--r--development/mysql-workbench/mysql-workbench-no-json.patch49
-rw-r--r--development/mysql-workbench/mysql-workbench-no-set-gtid-purged.patch29
-rw-r--r--development/mysql-workbench/mysql-workbench.SlackBuild229
-rw-r--r--development/mysql-workbench/mysql-workbench.info20
-rw-r--r--development/mysql-workbench/slackware_linux_profile.xml4
12 files changed, 178 insertions, 372 deletions
diff --git a/development/mysql-workbench/README b/development/mysql-workbench/README
index 8a3181ae40..6547acfd77 100644
--- a/development/mysql-workbench/README
+++ b/development/mysql-workbench/README
@@ -13,5 +13,7 @@ You need to allow MySQL to accept incoming connections from outside:
Remove or comment this line: SKIP="--skip-networking" and then do:
/etc/rc.d/rc.mysqld restart
-Note: MySQL Workbench will be built against Python 2.7 even when Python 3.x
-is installed on your system
+NOTE:
+You may need to run mysql_upgrade if mysql-workbench could not fetch your metadata.
+You may need to add this into /etc/ld.so.conf:
+/usr/lib{64}/mysql-workbench
diff --git a/development/mysql-workbench/add-option-to-hide-nonstandard-server-warning.patch b/development/mysql-workbench/add-option-to-hide-nonstandard-server-warning.patch
deleted file mode 100644
index 31471fa9c6..0000000000
--- a/development/mysql-workbench/add-option-to-hide-nonstandard-server-warning.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From cca769c75b9421f8ef5090848cea6162ccd85ba7 Mon Sep 17 00:00:00 2001
-From: Christian Hesse <mail@eworm.de>
-Date: Wed, 8 Feb 2017 09:42:29 +0100
-Subject: [PATCH 1/1] add option to hide nonstandard server warning
-
-Signed-off-by: Christian Hesse <mail@eworm.de>
----
- backend/wbprivate/workbench/wb_context.cpp | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/backend/wbprivate/workbench/wb_context.cpp b/backend/wbprivate/workbench/wb_context.cpp
-index f06ff99..f89006b 100644
---- a/backend/wbprivate/workbench/wb_context.cpp
-+++ b/backend/wbprivate/workbench/wb_context.cpp
-@@ -3038,7 +3038,7 @@ std::shared_ptr<SqlEditorForm> WBContext::add_new_query_window(const db_mgmt_Con
- logError("Unsupported server version: %s %s\n", form->connection_details()["dbmsProductName"].c_str(),
- form->connection_details()["dbmsProductVersion"].c_str());
-
-- if (mforms::Utilities::show_warning(
-+ if (mforms::Utilities::show_message_and_remember(
- base::strfmt("Connection Warning (%s)", targetConnection->name().c_str()),
- base::strfmt(
- "Incompatible/nonstandard server version or connection protocol detected (%s).\n\n"
-@@ -3046,7 +3046,8 @@ std::shared_ptr<SqlEditorForm> WBContext::add_new_query_window(const db_mgmt_Con
- "properly since the database is not fully compatible with the supported versions of MySQL.\n\n"
- "MySQL Workbench is developed and tested for MySQL Server versions 5.1, 5.5, 5.6 and 5.7",
- bec::sanitize_server_version_number(form->connection_details()["dbmsProductVersion"]).c_str()),
-- "Continue Anyway", "Cancel") != mforms::ResultOk) {
-+ "Continue Anyway", "Cancel", "", "wb.supported_server_check.suppress_warning",
-+ "Don't show this message again") != mforms::ResultOk) {
- _frontendCallbacks->show_status_text(_("Unsupported server"));
- return SqlEditorForm::Ref();
- }
---
-2.11.1
-
diff --git a/development/mysql-workbench/copytable.patch b/development/mysql-workbench/copytable.patch
deleted file mode 100644
index 3a061cd6d0..0000000000
--- a/development/mysql-workbench/copytable.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- mysql-workbench-community-6.3.9-src/plugins/migration/copytable/copytable.cpp.orig 2017-02-08 22:15:34.084153506 +0700
-+++ mysql-workbench-community-6.3.9-src/plugins/migration/copytable/copytable.cpp 2017-02-08 22:23:01.194114625 +0700
-@@ -2611,14 +2606,7 @@
- // This is needed because the escaping depends on the character set in use by the server
- unsigned long ret_length = 0;
-
--#if MYSQL_CHECK_VERSION(5, 7, 6)
-- if (_target->is_mysql_version_at_least(5, 7, 6))
-- ret_length += mysql_real_escape_string_quote(_mysql, buffer + length, data, (unsigned long)dlength, '"');
-- else
-- ret_length += mysql_real_escape_string(_mysql, buffer + length, data, (unsigned long)dlength);
--#else
- ret_length += mysql_real_escape_string(_mysql, buffer + length, data, (unsigned long)dlength);
--#endif
-
- if (ret_length != (unsigned long)-1)
- length += ret_length;
diff --git a/development/mysql-workbench/disable-unsupported-operating-system-warning.patch b/development/mysql-workbench/disable-unsupported-operating-system-warning.patch
deleted file mode 100644
index 56aef14132..0000000000
--- a/development/mysql-workbench/disable-unsupported-operating-system-warning.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 784599e99ee97574798512f6daf987cab8fd4cdf Mon Sep 17 00:00:00 2001
-From: Christian Hesse <mail@eworm.de>
-Date: Wed, 8 Feb 2017 09:12:24 +0100
-Subject: [PATCH 1/1] disable unsupported operating system warning
-
-Signed-off-by: Christian Hesse <mail@eworm.de>
----
- backend/wbprivate/workbench/wb_context.cpp | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/backend/wbprivate/workbench/wb_context.cpp b/backend/wbprivate/workbench/wb_context.cpp
-index 82c0fa6..f06ff99 100644
---- a/backend/wbprivate/workbench/wb_context.cpp
-+++ b/backend/wbprivate/workbench/wb_context.cpp
-@@ -1009,9 +1009,11 @@ void WBContext::init_finish_(WBOptions *options) {
-
- _frontendCallbacks->show_status_text(_("Ready."));
-
-+#if 0
- if (options->open_at_startup_type !=
- "run-script") // <--- so that our runtime tests don't lock up when a modal warning dialog is displayed
- warnIfRunningOnUnsupportedOS();
-+#endif
-
- try {
- // execute action requested from command line
---
-2.11.1
-
diff --git a/development/mysql-workbench/fix-build-for-i686.patch b/development/mysql-workbench/fix-build-for-i686.patch
deleted file mode 100644
index e25411cbc5..0000000000
--- a/development/mysql-workbench/fix-build-for-i686.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From af2bff95077b376a21ba815505589f4ad6b62140 Mon Sep 17 00:00:00 2001
-From: Christian Hesse <mail@eworm.de>
-Date: Tue, 7 Feb 2017 23:10:23 +0100
-Subject: [PATCH 1/1] fix build for i686
-
-Signed-off-by: Christian Hesse <mail@eworm.de>
----
- library/base/jsonparser.cpp | 6 ++++--
- library/forms/jsonview.cpp | 12 ++++++++++++
- 2 files changed, 16 insertions(+), 2 deletions(-)
-
-diff --git a/library/base/jsonparser.cpp b/library/base/jsonparser.cpp
-index 6ed4b3f..fb4e055 100644
---- a/library/base/jsonparser.cpp
-+++ b/library/base/jsonparser.cpp
-@@ -343,7 +343,7 @@ namespace JsonParser {
- */
- JsonValue &JsonArray::at(SizeType pos) {
- if (pos > _data.size())
-- throw std::out_of_range(base::strfmt("Index '%lu' is out of range.", pos));
-+ throw std::out_of_range(base::strfmt("Index '%zu' is out of range.", pos));
- return _data.at(pos);
- }
-
-@@ -358,7 +358,7 @@ namespace JsonParser {
- */
- const JsonValue &JsonArray::at(SizeType pos) const {
- if (pos > _data.size())
-- throw std::out_of_range(base::strfmt("Index '%lu' is out of range.", pos));
-+ throw std::out_of_range(base::strfmt("Index '%zu' is out of range.", pos));
- return _data.at(pos);
- }
-
-@@ -1668,12 +1668,14 @@ namespace JsonParser {
- case VDouble:
- _output += std::to_string((double)value);
- break;
-+#ifdef DEFINE_UINT64_T_FUNCTIONS
- case VInt64:
- _output += std::to_string((int64_t)value);
- break;
- case VUint64:
- _output += std::to_string((uint64_t)value);
- break;
-+#endif
- case VObject:
- write((JsonObject)value);
- break;
---
-2.11.1
-
diff --git a/development/mysql-workbench/gdal-2.2.0.patch b/development/mysql-workbench/gdal-2.2.0.patch
deleted file mode 100644
index 666184753c..0000000000
--- a/development/mysql-workbench/gdal-2.2.0.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From 97d26e5edfccead3fe3a10b732de51caa427eb60 Mon Sep 17 00:00:00 2001
-From: Christian Hesse <mail@eworm.de>
-Date: Tue, 16 May 2017 09:31:39 +0200
-Subject: [PATCH 1/1] gdal: use CPLFree()
-
-OGRFree() is deprecated as of gdal 2.2.0, so use CPLFree() instead.
-
-Signed-off-by: Christian Hesse <mail@eworm.de>
----
- backend/wbpublic/grt/spatial_handler.cpp | 4 ++--
- backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp | 6 +++---
- 2 files changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/backend/wbpublic/grt/spatial_handler.cpp b/backend/wbpublic/grt/spatial_handler.cpp
-index 9b357603..ee36fa03 100644
---- a/backend/wbpublic/grt/spatial_handler.cpp
-+++ b/backend/wbpublic/grt/spatial_handler.cpp
-@@ -443,7 +443,7 @@ spatial::Importer::Importer() : _geometry(NULL), _interrupt(false), _srid(0) {
-
- spatial::Importer::~Importer() {
- if (_geometry != NULL)
-- OGRFree(_geometry);
-+ CPLFree(_geometry);
- }
-
- OGRGeometry *spatial::Importer::steal_data() {
-@@ -495,7 +495,7 @@ std::string spatial::Importer::as_wkt() {
- logError("Error exporting data to WKT (%i)\n", err);
- } else {
- std::string tmp(data);
-- OGRFree(data);
-+ CPLFree(data);
- return tmp;
- }
- }
-diff --git a/backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp b/backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp
-index d2eb8495..7a7948bf 100644
---- a/backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp
-+++ b/backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp
-@@ -47,7 +47,7 @@ static grt::StringRef getGeoRepresentation(grt::StringRef data, bool outputAsJso
- OGRGeometryFactory::createFromWkb((unsigned char *)const_cast<char *>(&(*((*data).begin() + 4))), NULL, &geometry);
- if (ret_val != OGRERR_NONE) {
- if (geometry)
-- OGRFree(geometry);
-+ CPLFree(geometry);
- throw std::exception();
- }
-
-@@ -61,8 +61,8 @@ static grt::StringRef getGeoRepresentation(grt::StringRef data, bool outputAsJso
-
- if (err == OGRERR_NONE && data != NULL) {
- grt::StringRef tmp(data);
-- OGRFree(data);
-- OGRFree(geometry);
-+ CPLFree(data);
-+ CPLFree(geometry);
- return tmp;
- } else
- throw std::runtime_error("Conversion of OGR geometry data failed");
---
-2.13.0
-
-
diff --git a/development/mysql-workbench/mysql-workbench-gnome-keyring.patch b/development/mysql-workbench/mysql-workbench-gnome-keyring.patch
deleted file mode 100644
index 006cfec504..0000000000
--- a/development/mysql-workbench/mysql-workbench-gnome-keyring.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff --git a/frontend/linux/workbench/mysql-workbench.in b/frontend/linux/workbench/mysql-workbench.in
-index 02a8061..f8176f6 100755
---- a/frontend/linux/workbench/mysql-workbench.in
-+++ b/frontend/linux/workbench/mysql-workbench.in
-@@ -4,6 +4,12 @@
- # This will cause passwords to be stored only temporarily for the session.
- #WB_NO_GNOME_KEYRING=1
-
-+# Looks like WB expects gnome-keyring to be present as soon as XDG_RUNTIME_DIR
-+# environment variable is set. Do an extra check here...
-+if ! type gnome-keyring-daemon >/dev/null 2>/dev/null; then
-+ export WB_NO_GNOME_KEYRING=1
-+fi
-+
- # force disable the Mac style single menu hack in Ubuntu Unity
- export UBUNTU_MENUPROXY=0
-
diff --git a/development/mysql-workbench/mysql-workbench-no-json.patch b/development/mysql-workbench/mysql-workbench-no-json.patch
deleted file mode 100644
index 100b27a48e..0000000000
--- a/development/mysql-workbench/mysql-workbench-no-json.patch
+++ /dev/null
@@ -1,49 +0,0 @@
---- mysql-workbench-community-6.3.9-src/backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp.orig 2017-02-08 22:24:43.203746527 +0700
-+++ mysql-workbench-community-6.3.9-src/backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp 2017-02-08 22:25:07.878416096 +0700
-@@ -314,9 +314,6 @@
- case sql::DataType::SET:
- type = "string";
- break;
-- case sql::DataType::JSON:
-- type = "json";
-- break;
- case sql::DataType::SQLNULL:
- type = "null";
- break;
---- mysql-workbench-community-6.3.9-src/plugins/migration/copytable/copytable.cpp.orig 2017-02-08 22:15:34.084153506 +0700
-+++ mysql-workbench-community-6.3.9-src/plugins/migration/copytable/copytable.cpp 2017-02-08 22:23:01.194114625 +0700
-@@ -109,8 +109,6 @@
- return "MYSQL_TYPE_STRING";
- case MYSQL_TYPE_GEOMETRY:
- return "MYSQL_TYPE_GEOMETRY";
-- case MYSQL_TYPE_JSON:
-- return "MYSQL_TYPE_JSON";
- default:
- return "UNKNOWN";
- }
-@@ -295,7 +293,6 @@
- case MYSQL_TYPE_STRING:
- case MYSQL_TYPE_VAR_STRING:
- case MYSQL_TYPE_BIT:
-- case MYSQL_TYPE_JSON:
- if (!col->is_long_data)
- bind.buffer_length = (unsigned)col->source_length + 1;
-
-@@ -1391,8 +1388,7 @@
- if (rowbuffer[index].buffer_type == MYSQL_TYPE_TINY_BLOB ||
- rowbuffer[index].buffer_type == MYSQL_TYPE_MEDIUM_BLOB ||
- rowbuffer[index].buffer_type == MYSQL_TYPE_LONG_BLOB || rowbuffer[index].buffer_type == MYSQL_TYPE_BLOB ||
-- rowbuffer[index].buffer_type == MYSQL_TYPE_STRING ||
-- rowbuffer[index].buffer_type == MYSQL_TYPE_GEOMETRY || rowbuffer[index].buffer_type == MYSQL_TYPE_JSON) {
-+ rowbuffer[index].buffer_type == MYSQL_TYPE_STRING) {
- if (rowbuffer[index].buffer_length)
- free(rowbuffer[index].buffer);
-
-@@ -2162,7 +2158,6 @@
- case MYSQL_TYPE_STRING:
- case MYSQL_TYPE_ENUM:
- case MYSQL_TYPE_SET:
-- case MYSQL_TYPE_JSON:
- _bulk_insert_record.append("'", 1);
- ret_val = _bulk_insert_record.append_escaped((char *)(*_row_buffer)[col_index].buffer,
- *(*_row_buffer)[col_index].length);
diff --git a/development/mysql-workbench/mysql-workbench-no-set-gtid-purged.patch b/development/mysql-workbench/mysql-workbench-no-set-gtid-purged.patch
deleted file mode 100644
index 69242c507b..0000000000
--- a/development/mysql-workbench/mysql-workbench-no-set-gtid-purged.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-diff --git a/plugins/wb.admin/frontend/wb_admin_export.py b/plugins/wb.admin/frontend/wb_admin_export.py
-index 40f5167..ebf6c3d 100644
---- a/plugins/wb.admin/frontend/wb_admin_export.py
-+++ b/plugins/wb.admin/frontend/wb_admin_export.py
-@@ -1858,8 +1858,6 @@ class WbAdminExportTab(WbAdminSchemaListTab):
- args.append("--ssl-cipher=%s" % conn["sslCipher"])
-
- # Sets the compatibility parameters if needed
-- if self._compatibility_params:
-- args.append("--set-gtid-purged=OFF")
- if conn.get("OPT_ENABLE_CLEARTEXT_PLUGIN", ""):
- args.append("--enable-cleartext-plugin")
-
-diff --git a/plugins/wb.admin/frontend/wb_admin_export_options.py b/plugins/wb.admin/frontend/wb_admin_export_options.py
-index e9ec2e7..653f531 100644
---- a/plugins/wb.admin/frontend/wb_admin_export_options.py
-+++ b/plugins/wb.admin/frontend/wb_admin_export_options.py
-@@ -53,9 +53,9 @@ export_options = {
- "order-by-primary":["Dump each table's rows sorted by its primary key, or by its first unique index.","FALSE"],
- "dump-date":["Include dump date as \"Dump completed on\" comment if --comments is given.","TRUE"],
- "$internal$show-internal-schemas":["Show internal MySQL schemas (mysql, information_schema, performance_schema) in the export schema list.","FALSE"],
-- "tz-utc":["Add SET TIME_ZONE='+00:00' to the dump file.","TRUE"],
-+ "tz-utc":["Add SET TIME_ZONE='+00:00' to the dump file.","TRUE"]
- # "xml":["Produce XML output.","FALSE"]
-- "set-gtid-purged":["Add 'SET @@GLOBAL.GTID_PURGED' to the output.","AUTO","STR",("5.6.9", None)]
-+# "set-gtid-purged":["Add 'SET @@GLOBAL.GTID_PURGED' to the output.","AUTO","STR",("5.6.9", None)]
- }
-
- }
diff --git a/development/mysql-workbench/mysql-workbench.SlackBuild b/development/mysql-workbench/mysql-workbench.SlackBuild
index b2344f4ef3..c05c1f6bb2 100644
--- a/development/mysql-workbench/mysql-workbench.SlackBuild
+++ b/development/mysql-workbench/mysql-workbench.SlackBuild
@@ -3,7 +3,7 @@
# Slackware build script for mysql-workbench
# Originally written by Andre Geraldo Vieira <andre.geraldo@gmail.com>
-# Copyright 2013-2017 Willy Sudiarto Raharjo <willysr@slackbuilds.org>
+# Copyright 2013-2019 Willy Sudiarto Raharjo <willysr@slackbuilds.org>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,9 +24,15 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=mysql-workbench
-PRGNAM2=antlr
-VERSION=${VERSION:-6.3.10}
-ANTLRVER=3.4
+PRGNAM2=mysql
+VERSION=${VERSION:-8.0.18}
+VERSION_MYSQL=8.0.18
+PRGNAM3=boost
+VERSION_BOOST=1_70_0
+PRGNAM4=mysql-connector-c++
+VERSION_MYSQL_CONNECTOR=8.0.18
+PRGNAM5=gdal
+VERSION_GDAL=2.4.1
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -61,12 +67,18 @@ fi
set -e
-rm -rf $PKG
+rm -rf $PKG $TMP/install-bundle
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-community-$SRCVERSION
-tar xvf $CWD/$PRGNAM-community-$SRCVERSION.tar.gz
-cd $PRGNAM-community-$SRCVERSION
+
+# Extract Boost
+rm -rf ${PRGNAM3}_${VERSION_BOOST}
+tar xvf $CWD/${PRGNAM3}_${VERSION_BOOST}.tar.bz2
+
+# Building MySQL
+rm -rf $PRGNAM2-${VERSION_MYSQL}
+tar xvf $CWD/$PRGNAM2-${VERSION_MYSQL}.tar.gz
+cd $PRGNAM2-${VERSION_MYSQL}
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -74,91 +86,166 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# Patch from Ponce
-patch -p1 < $CWD/config_and_ifconfig_paths.patch
+mkdir -p build
+cd build
+cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DWITHOUT_SERVER=ON \
+ -DBUILD_CONFIG=mysql_release \
+ -DINSTALL_LIBDIR="lib${LIBDIRSUFFIX}" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DSYSCONFDIR=/etc/mysql \
+ -DMYSQL_DATADIR=/var/lib/mysql \
+ -DWITH_BOOST=$TMP/${PRGNAM3}_${VERSION_BOOST} \
+ -DCMAKE_BUILD_TYPE=Release ..
-# Patch to fix gdal include path
-sed -i '/#include/s|gdal/||' \
- backend/wbpublic/grtui/geom_draw_box.h \
- backend/wbpublic/grt/spatial_handler.h \
- backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp
+make
+make install DESTDIR=$TMP/install-bundle
-# mysqldump from mariadb does not support --set-gtid-purged
-patch -p1 < $CWD/mysql-workbench-no-set-gtid-purged.patch
+cd ../..
-# fix gnome-keyring
-# this is reserved for future gnome-keyring releases, but harmless for
-# gnome-keyring package in stable release as well
-patch -p1 < $CWD/mysql-workbench-gnome-keyring.patch
+# Building mysql-connector-c++
+rm -rf $PRGNAM4-$VERSION-src
+tar xvf $CWD/${PRGNAM4}-${VERSION_MYSQL_CONNECTOR}-src.tar.gz
+cd $PRGNAM4-${VERSION_MYSQL_CONNECTOR}-src
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# Patch to remove JSON support
-# MariaDB support for JSON started at 10.2
-patch -p1 < $CWD/mysql-workbench-no-json.patch
+mkdir -p build
+cd build
+cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -Wno-dev \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DWITH_JDBC=ON \
+ -DCMAKE_INSTALL_LIBDIR=/usr/lib${LIBDIRSUFFIX} \
+ -DINSTALL_LIB_DIR=lib${LIBDIRSUFFIX} \
+ -DMYSQL_DIR="$TMP/install-bundle/" \
+ -DMYSQL_CONFIG_EXECUTABLE="$TMP/install-bundle/usr/bin/mysql_config" \
+ -DCMAKE_BUILD_TYPE=Release ..
-# Self-made patch
-# Used to avoid differences between MariaDB and MySQL 5.7
-# mysql_real_escape_string_quote is available in MySQL 5.7.6 and above
-# https://dev.mysql.com/doc/refman/5.7/en/mysql-real-escape-string-quote.html
-patch -p1 < $CWD/copytable.patch
+make
+make install DESTDIR=$TMP/install-bundle
-# Patch to disable warning on Slackware and fix for x86
-# Taken from ARCH Linux
-patch -p1 < $CWD/disable-unsupported-operating-system-warning.patch
-patch -p1 < $CWD/add-option-to-hide-nonstandard-server-warning.patch
-patch -p1 < $CWD/fix-build-for-i686.patch
+cd ../..
-install -D $CWD/$PRGNAM2-$ANTLRVER-complete.jar $TMP/linux-res/bin/$PRGNAM2-$ANTLRVER-complete.jar
+# Building gdal
+rm -rf ${PRGNAM5}-${VERSION_GDAL}
+tar xvf $CWD/${PRGNAM5}-${VERSION_GDAL}.tar.xz
+cd ${PRGNAM5}-${VERSION_GDAL}
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# make cmake happy with mariadb
-sed -i '/^find_package(MySQL /c find_package(MySQL REQUIRED)' CMakeLists.txt
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS -fpermissive" \
+CPPFLAGS="-I/usr/include/mysql/server" \
+./configure \
+ --prefix=/usr \
+ --includedir=/usr/include/gdal \
+ --with-sqlite3 \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --with-mysql="$TMP/install-bundle/usr/bin/mysql_config" \
+ --with-curl \
+ --without-jasper
-# save this for GCC 7.0
-#sed -i "s|std=c++11|std=c++11 -Wno-error=implicit-fallthrough -Wno-error=strict-aliasing -Wno-error=format-overflow|" CMakeLists.txt
+make LD_LIBRARY_PATH="$TMP/install-bundle/usr/lib${LIBDIRSUFFIX}/"
+make LD_LIBRARY_PATH="$TMP/install-bundle/usr/lib${LIBDIRSUFFIX}/" DESTDIR="$TMP/install-bundle/" install
-# patch for gdal 2.2.0
-patch -p1 < $CWD/gdal-2.2.0.patch
+cd ../
-mkdir -p wb-build
-cd wb-build
-cmake \
- -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DLIB_INSTALL_DIR=/usr/lib$LIBDIRSUFFIX \
- -DPYTHON_INCLUDE_DIR:PATH=/usr/include/python2.7 \
- -DPYTHON_LIBRARY:FILEPATH=/usr/lib$LIBDIRSUFFIX/libpython2.7.so \
- -DGDAL_INCLUDE_DIR=/usr/include \
- -DCMAKE_CXX_FLAGS="-std=c++11" \
- -DCMAKE_BUILD_TYPE=Release ..
+# Building mysql-workbench
+rm -rf $PRGNAM-community-$SRCVERSION
+tar xvf $CWD/$PRGNAM-community-$SRCVERSION.tar.gz
+cd $PRGNAM-community-$SRCVERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-make
+# Patch from Ponce
+patch -p1 < $CWD/config_and_ifconfig_paths.patch
+
+# Big thanks to ARCH Linux for all these work.
+# GCC 7.x introduced some new warnings, remove '-Werror' for the build to complete
+sed -i '/^set/s|-Werror -Wall|-Wall|' CMakeLists.txt
+
+# GCC 7.x complains about unsupported flag
+sed -i 's|-Wno-deprecated-register||' ext/scintilla/gtk/CMakeLists.txt
+
+# disable stringop-truncation for GCC 8.x
+sed -i '/^set/s|-Wall|-Wall -Wno-stringop-truncation|' CMakeLists.txt
+
+# make sure to link against bundled libraries
+sed -i "/target_link_libraries/s|\\$|-L$TMP/install-bundle/usr/lib${LIBDIRSUFFIX}/ \\$|" backend/wbpublic/CMakeLists.txt
-# we will remove it later after installation
-# without these document, it will fail to build
-touch $TMP/$PRGNAM-community-$SRCVERSION/LICENSE.mysql
+# Install antlr Java JAR
+cp $CWD/antlr-4.7.1-complete.jar $TMP/install-bundle/antlr-4.7.1-complete.jar # https://www.antlr.org/download/antlr-4.7.1-complete.jar
+mkdir -p wb-build
+cd wb-build
+cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -Wno-dev \
+ -DCMAKE_INSTALL_PREFIX:PATH=/usr \
+ -DCMAKE_CXX_FLAGS="-std=c++14" \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DLIB_INSTALL_DIR=/usr/lib${LIBDIRSUFFIX} \
+ -DMySQL_CONFIG_PATH="$TMP/install-bundle/usr/bin/mysql_config" \
+ -DMySQLCppConn_LIBRARY="$TMP/install-bundle/usr/lib${LIBDIRSUFFIX}/libmysqlcppconn.so" \
+ -DMySQLCppConn_INCLUDE_DIR="$TMP/install-bundle/usr/include/jdbc" \
+ -DGDAL_INCLUDE_DIR="$TMP/install-bundle/usr/include" \
+ -DGDAL_LIBRARY="$TMP/install-bundle/usr/lib${LIBDIRSUFFIX}/libgdal.so" \
+ -DWITH_ANTLR_JAR="$TMP/install-bundle/antlr-4.7.1-complete.jar" \
+ -DUSE_BUNDLED_MYSQLDUMP=1 \
+ ..
+
+make -j1
make install DESTDIR=$PKG
-# Add Slackware Linux
-install -m0644 $CWD/slackware_linux_profile.xml $PKG/usr/share/mysql-workbench/mysql.profiles/Slackware_Linux_14.1_\(MariaDB_5.5_Package\).xml
+cd ..
+
+# Add Slackware Linux Profile
+install -m0644 $CWD/slackware_linux_profile.xml $PKG/usr/share/mysql-workbench/mysql.profiles/Slackware_Linux_15.0_\(MySQL_5.6_Package\).xml
+
+# install bundled mysql and mysqldump
+install -m0755 "$TMP/install-bundle/usr/bin/mysql"{,dump} $PKG/usr/lib${LIBDIRSUFFIX}/mysql-workbench/
+
+# icons
+for SIZE in 16 24 32 48 64 96 128; do
+# set modify/create for reproducible builds
+ convert -scale ${SIZE} +set date:create +set date:modify \
+ "images/icons/MySQLWorkbench-128.png" \
+ "mysql-workbench.png"
+ install -D -m0644 "mysql-workbench.png" "$PKG/usr/share/icons/hicolor/${SIZE}x${SIZE}/apps/mysql-workbench.png"
+done
+
+# install bundled libraries
+for LIBRARY in $(find "$TMP/install-bundle/usr/lib${LIBDIRSUFFIX}/" -type f -regex '.*/lib\(gdal\|mysql\(client\|cppconn\)\)\.so\..*'); do
+ BASENAME="$(basename "${LIBRARY}")"
+ SONAME="$(readelf -d "${LIBRARY}" | grep -Po '(?<=(Library soname: \[)).*(?=\])')"
+ install -D -m0755 "${LIBRARY}" "$PKG"/usr/lib${LIBDIRSUFFIX}/mysql-workbench/"${BASENAME}"
+ ln -s "${BASENAME}" "$PKG"/usr/lib${LIBDIRSUFFIX}/mysql-workbench/"${SONAME}"
+done
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-cd ..
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS COPYING* ChangeLog README INSTALL $PKG/usr/doc/$PRGNAM-$VERSION
+mv AUTHORS *.txt $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-# remove unnecessary empty document
-rm -f $TMP/$PRGNAM-$SRCVERSION/LICENSE.mysql
-
-# Fix missing shared library libwbbase
-(
- cd $PKG/usr/lib${LIBDIRSUFFIX}
- rm -f libwbbase.so*
- ln -s mysql-workbench/libwbbase.so .
- ln -s libwbbase.so libwbbase.so.${VERSION}
-)
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
diff --git a/development/mysql-workbench/mysql-workbench.info b/development/mysql-workbench/mysql-workbench.info
index 667f8bd5ea..61346b7e19 100644
--- a/development/mysql-workbench/mysql-workbench.info
+++ b/development/mysql-workbench/mysql-workbench.info
@@ -1,12 +1,20 @@
PRGNAM="mysql-workbench"
-VERSION="6.3.10"
+VERSION="8.0.17"
HOMEPAGE="https://www.mysql.com/downloads/workbench/"
-DOWNLOAD="http://www.mirrorservice.org/sites/ftp.mysql.com/Downloads/MySQLGUITools/mysql-workbench-community-6.3.10-src.tar.gz \
- http://www.antlr3.org/download/antlr-3.4-complete.jar"
-MD5SUM="565e52097c58a663d3498bb740eaefe5 \
- 1b91dea1c7d480b3223f7c8a9aa0e172"
+DOWNLOAD="https://cdn.mysql.com//Downloads/MySQLGUITools/mysql-workbench-community-8.0.18-src.tar.gz \
+ https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-8.0.18.tar.gz \
+ https://sourceforge.net/projects/boost/files/boost/1.70.0/boost_1_70_0.tar.bz2 \
+ https://cdn.mysql.com/Downloads/Connector-C++/mysql-connector-c++-8.0.18-src.tar.gz \
+ http://download.osgeo.org/gdal/2.4.1/gdal-2.4.1.tar.xz \
+ https://www.antlr.org/download/antlr-4.7.1-complete.jar"
+MD5SUM="3840df6f30e9c2417ec4f897ff5c2f03 \
+ 81a164ee0039bdff716ec1f157f036a5 \
+ 242ecc63507711d6706b9b0c0d0c7d4f \
+ 4409d426f1d72d4aa3fb04a8df4b3d6b \
+ ff98500aab063da563acade884518dfa \
+ 8084572679b2b2a1c126aa6e62e48ce5"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="tinyxml mysql-connector-c++ vsqlite++ ctemplate paramiko pexpect lua wxPython gdal libantlr3c jdk unixODBC"
+REQUIRES="antlr4 ctemplate proj paramiko vsqlite++ jdk unixODBC rapidjson"
MAINTAINER="Willy Sudiarto Raharjo"
EMAIL="willysr@slackbuilds.org"
diff --git a/development/mysql-workbench/slackware_linux_profile.xml b/development/mysql-workbench/slackware_linux_profile.xml
index 4b81576509..9dd5dbef07 100644
--- a/development/mysql-workbench/slackware_linux_profile.xml
+++ b/development/mysql-workbench/slackware_linux_profile.xml
@@ -2,7 +2,7 @@
<data>
<value type="dict">
- <value type="string" key="sys.config.path">/etc/my.cnf</value>
+ <value type="string" key="sys.config.path">/etc/my.cnf.d/server.cnf</value>
<value type="string" key="sys.config.section">mysqld</value>
<value type="string" key="sys.mysqld.start">/etc/rc.d/rc.mysqld start</value>
@@ -11,6 +11,6 @@
<value type="int" key="sys.usesudo">0</value>
<value type="string" key="sys.system">Linux</value>
- <value type="string" key="serverVersion">10.0</value>
+ <value type="string" key="serverVersion">10.1</value>
</value>
</data>