From owner-svn-ports-head@freebsd.org Sat May 5 20:05:11 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3302FB8B3A; Sat, 5 May 2018 20:05:10 +0000 (UTC) (envelope-from tcberner@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7018778143; Sat, 5 May 2018 20:05:09 +0000 (UTC) (envelope-from tcberner@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AAB2422443; Sat, 5 May 2018 20:05:09 +0000 (UTC) (envelope-from tcberner@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w45K597v044599; Sat, 5 May 2018 20:05:09 GMT (envelope-from tcberner@FreeBSD.org) Received: (from tcberner@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w45K595d044595; Sat, 5 May 2018 20:05:09 GMT (envelope-from tcberner@FreeBSD.org) Message-Id: <201805052005.w45K595d044595@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tcberner set sender to tcberner@FreeBSD.org using -f From: "Tobias C. Berner" Date: Sat, 5 May 2018 20:05:09 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r469165 - in head/databases: qt4-mysql-plugin qt4-mysql-plugin/files qt5-sqldrivers-mysql qt5-sqldrivers-mysql/files X-SVN-Group: ports-head X-SVN-Commit-Author: tcberner X-SVN-Commit-Paths: in head/databases: qt4-mysql-plugin qt4-mysql-plugin/files qt5-sqldrivers-mysql qt5-sqldrivers-mysql/files X-SVN-Commit-Revision: 469165 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 May 2018 20:05:11 -0000 Author: tcberner Date: Sat May 5 20:05:08 2018 New Revision: 469165 URL: https://svnweb.freebsd.org/changeset/ports/469165 Log: databases/qt4-mysql-plugin & databases/qt5-sqldrivers-mysql: fix build against mysql >= 8.0.1. From the mysql release notes [1]: Incompatible Change: The my_bool type is no longer used in MySQL source code. Any third-party code that used this type to represent C boolean variables should use the bool or int C type instead. Note The change from my_bool to bool means that the mysql.h header file now requires a C++ or C99 compiler to compile. (Bug #25597667) -- [1] https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-1.html PR: 227813 Reported by: mikhail.rokhin@gmail.com Added: head/databases/qt4-mysql-plugin/files/ head/databases/qt4-mysql-plugin/files/patch-src_sql_drivers_mysql_qsql__mysql.cpp (contents, props changed) head/databases/qt5-sqldrivers-mysql/files/ head/databases/qt5-sqldrivers-mysql/files/patch-src_plugins_sqldrivers_mysql_qsql__mysql.cpp (contents, props changed) Modified: head/databases/qt4-mysql-plugin/Makefile head/databases/qt5-sqldrivers-mysql/Makefile Modified: head/databases/qt4-mysql-plugin/Makefile ============================================================================== --- head/databases/qt4-mysql-plugin/Makefile Sat May 5 19:51:58 2018 (r469164) +++ head/databases/qt4-mysql-plugin/Makefile Sat May 5 20:05:08 2018 (r469165) @@ -1,7 +1,7 @@ # Created by: Kay Lehmann # $FreeBSD$ -PORTREVISION= 3 +PORTREVISION= 4 COMMENT= Qt MySQL database plugin DB= mysql Added: head/databases/qt4-mysql-plugin/files/patch-src_sql_drivers_mysql_qsql__mysql.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/qt4-mysql-plugin/files/patch-src_sql_drivers_mysql_qsql__mysql.cpp Sat May 5 20:05:08 2018 (r469165) @@ -0,0 +1,74 @@ +https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-1.html + +Incompatible Change: The my_bool type is no longer used in MySQL +source code. Any third-party code that used this type to represent +C boolean variables should use the bool or int C type instead. + +Note +The change from my_bool to bool means that the mysql.h header file +now requires a C++ or C99 compiler to compile. + +(Bug #25597667) + +--- src/sql/drivers/mysql/qsql_mysql.cpp.orig 2015-05-07 14:14:48 UTC ++++ src/sql/drivers/mysql/qsql_mysql.cpp +@@ -74,6 +74,14 @@ Q_DECLARE_METATYPE(MYSQL_STMT*) + # define Q_CLIENT_MULTI_STATEMENTS 0 + #endif + ++// MYSQL 8.0.1 no longer uses the my_bool type: ++// https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-1.html ++#if MYSQL_VERSION_ID >= 80001 ++typedef bool mysql_bool; ++#else ++typedef my_bool mysql_bool; ++#endif ++ + QT_BEGIN_NAMESPACE + + class QMYSQLDriverPrivate +@@ -194,7 +202,7 @@ class QMYSQLResultPrivate : public QObject (public) + myField(0), type(QVariant::Invalid) + {} + char *outField; +- my_bool nullIndicator; ++ mysql_bool nullIndicator; + ulong bufLength; + MYSQL_FIELD *myField; + QVariant::Type type; +@@ -930,7 +938,7 @@ bool QMYSQLResult::exec() + MYSQL_BIND* currBind; + QVector timeVector; + QVector stringVector; +- QVector nullVector; ++ QVector nullVector; + + const QVector values = boundValues(); + +@@ -951,7 +959,7 @@ bool QMYSQLResult::exec() + + currBind = &d->outBinds[i]; + +- nullVector[i] = static_cast(val.isNull()); ++ nullVector[i] = static_cast(val.isNull()); + currBind->is_null = &nullVector[i]; + currBind->length = 0; + currBind->is_unsigned = 0; +@@ -1048,7 +1056,7 @@ bool QMYSQLResult::exec() + d->rowsAffected = mysql_stmt_affected_rows(d->stmt); + + if (isSelect()) { +- my_bool update_max_length = true; ++ mysql_bool update_max_length = true; + + r = mysql_stmt_bind_result(d->stmt, d->inBinds); + if (r != 0) { +@@ -1245,7 +1253,7 @@ bool QMYSQLDriver::open(const QString& db, + const QStringList opts(connOpts.split(QLatin1Char(';'), QString::SkipEmptyParts)); + QString unixSocket; + #if MYSQL_VERSION_ID >= 50000 +- my_bool reconnect=false; ++ mysql_bool reconnect=false; + #endif + + // extract the real options from the string Modified: head/databases/qt5-sqldrivers-mysql/Makefile ============================================================================== --- head/databases/qt5-sqldrivers-mysql/Makefile Sat May 5 19:51:58 2018 (r469164) +++ head/databases/qt5-sqldrivers-mysql/Makefile Sat May 5 20:05:08 2018 (r469165) @@ -1,4 +1,5 @@ # $FreeBSD$ +PORTREVISION= 1 DB= MYSQL DB_DESC= MySQL Added: head/databases/qt5-sqldrivers-mysql/files/patch-src_plugins_sqldrivers_mysql_qsql__mysql.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/qt5-sqldrivers-mysql/files/patch-src_plugins_sqldrivers_mysql_qsql__mysql.cpp Sat May 5 20:05:08 2018 (r469165) @@ -0,0 +1,74 @@ +https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-1.html + +Incompatible Change: The my_bool type is no longer used in MySQL +source code. Any third-party code that used this type to represent +C boolean variables should use the bool or int C type instead. + +Note +The change from my_bool to bool means that the mysql.h header file +now requires a C++ or C99 compiler to compile. + +(Bug #25597667) + +--- src/plugins/sqldrivers/mysql/qsql_mysql.cpp.orig 2018-04-29 07:25:09 UTC ++++ src/plugins/sqldrivers/mysql/qsql_mysql.cpp +@@ -74,6 +74,14 @@ Q_DECLARE_METATYPE(MYSQL_STMT*) + # define Q_CLIENT_MULTI_STATEMENTS 0 + #endif + ++// MYSQL 8.0.1 no longer uses the my_bool type: ++// https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-1.html ++#if MYSQL_VERSION_ID >= 80001 ++typedef bool mysql_bool; ++#else ++typedef my_bool mysql_bool; ++#endif ++ + QT_BEGIN_NAMESPACE + + class QMYSQLDriverPrivate : public QSqlDriverPrivate +@@ -232,7 +240,7 @@ class QMYSQLResultPrivate: public QSqlResultPrivate (p + myField(0), type(QVariant::Invalid) + {} + char *outField; +- my_bool nullIndicator; ++ mysql_bool nullIndicator; + ulong bufLength; + MYSQL_FIELD *myField; + QVariant::Type type; +@@ -983,7 +991,7 @@ bool QMYSQLResult::exec() + MYSQL_BIND* currBind; + QVector timeVector; + QVector stringVector; +- QVector nullVector; ++ QVector nullVector; + + const QVector values = boundValues(); + +@@ -1004,7 +1012,7 @@ bool QMYSQLResult::exec() + + currBind = &d->outBinds[i]; + +- nullVector[i] = static_cast(val.isNull()); ++ nullVector[i] = static_cast(val.isNull()); + currBind->is_null = &nullVector[i]; + currBind->length = 0; + currBind->is_unsigned = 0; +@@ -1101,7 +1109,7 @@ bool QMYSQLResult::exec() + d->rowsAffected = mysql_stmt_affected_rows(d->stmt); + + if (isSelect()) { +- my_bool update_max_length = true; ++ mysql_bool update_max_length = true; + + r = mysql_stmt_bind_result(d->stmt, d->inBinds); + if (r != 0) { +@@ -1312,7 +1320,7 @@ bool QMYSQLDriver::open(const QString& db, + QString sslCAPath; + QString sslCipher; + #if MYSQL_VERSION_ID >= 50000 +- my_bool reconnect=false; ++ mysql_bool reconnect=false; + uint connectTimeout = 0; + uint readTimeout = 0; + uint writeTimeout = 0;