summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2019-11-01 12:58:56 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2019-11-01 13:00:56 +0100
commit2592a62f5b30a672e915879ac9134f68f20c5e38 (patch)
treec1fc25eafacb679fb6a12b556496ddb804e25a06 /dev-qt/qtsql
parentmedia-sound/jack2-1.9.13: bump (diff)
downloadgentoo-2592a62f5b30a672e915879ac9134f68f20c5e38.tar.gz
gentoo-2592a62f5b30a672e915879ac9134f68f20c5e38.tar.bz2
gentoo-2592a62f5b30a672e915879ac9134f68f20c5e38.zip
dev-qt: Add Qt 5.13.2
Closes: https://bugs.gentoo.org/689016 Package-Manager: Portage-2.3.78, Repoman-2.3.17 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'dev-qt/qtsql')
-rw-r--r--dev-qt/qtsql/Manifest1
-rw-r--r--dev-qt/qtsql/files/qtsql-5.13.1-postgresql-12.patch97
-rw-r--r--dev-qt/qtsql/qtsql-5.13.2.ebuild60
3 files changed, 158 insertions, 0 deletions
diff --git a/dev-qt/qtsql/Manifest b/dev-qt/qtsql/Manifest
index 1e1de0c37b5b..33abd24b25c7 100644
--- a/dev-qt/qtsql/Manifest
+++ b/dev-qt/qtsql/Manifest
@@ -1,2 +1,3 @@
DIST qtbase-everywhere-src-5.12.3.tar.xz 48382148 BLAKE2B 779c43a75403e0f21357a90228bbcc3f216495613f4f17a2f442c7aa93f277a79cc7addf5ae44e22964069580f4932cfd14ba4773aa0ab30405d5587577a545c SHA512 1dab927573eb22b1ae772de3a418f7d3999ea78d6e667a7f2494390dd1f0981ea93f4f892cb6e124ac18812c780ee71da3021b485c61eaf1ef2234a5c12b7fe2
DIST qtbase-everywhere-src-5.12.5.tar.xz 48463288 BLAKE2B db394becd1c0c2be9f86658f58dbadb5e3b81af82edf2e8b69652a8587a2aa30f481774fa20d55ce7e8b9cc158dedd343dc3964e4ff0bcf111e8c4feceb27e0a SHA512 9a95060318cadfcd6dace6b28353fa868a8dcfe9def0bd884edf7d9f72606bae625de0269323a94b81d594a6c398106c266304106329b79c7dae4e5b88269660
+DIST qtbase-everywhere-src-5.13.2.tar.xz 48735704 BLAKE2B 50b8d69212602427b76dce6efefb9195e91e4bf5a09b732e564b66a4e27cfaf193fd860139b2c4cc774b0b1132af1426b79e381fb42eafd506239096bd87837e SHA512 b00ad017cc95876698615fd6e41c6ade366146c1f7057e1925bc1b72918f091aa39aa6bf0ea450fc6cd4d8f9810b228770d981dcb6cbe8ad30abb2c42804a204
diff --git a/dev-qt/qtsql/files/qtsql-5.13.1-postgresql-12.patch b/dev-qt/qtsql/files/qtsql-5.13.1-postgresql-12.patch
new file mode 100644
index 000000000000..f41755adff95
--- /dev/null
+++ b/dev-qt/qtsql/files/qtsql-5.13.1-postgresql-12.patch
@@ -0,0 +1,97 @@
+From 14b61d48e8bad6223a08843cf363ef48f09c479b Mon Sep 17 00:00:00 2001
+From: Christian Ehrlicher <ch.ehrlicher@gmx.de>
+Date: Fri, 11 Oct 2019 20:53:49 +0200
+Subject: [PATCH] QPSQL: Add support for PostgreSQL 12
+
+Add proper version check and replace long deprecated and now removed
+access to pg_attrdef.adsrc.
+
+[ChangeLog][QtSql][QPSQL] added support for PostgreSQL 12
+
+Fixes: QTBUG-79033
+Fixes: QTBUG-79064
+Change-Id: Iec1b13945c34ea017139ad1c5539ab5b7f1e03aa
+Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
+---
+ src/plugins/sqldrivers/psql/qsql_psql.cpp | 43 +++++++++++++++++--------------
+ src/plugins/sqldrivers/psql/qsql_psql_p.h | 1 +
+ 2 files changed, 25 insertions(+), 19 deletions(-)
+
+diff --git a/src/plugins/sqldrivers/psql/qsql_psql.cpp b/src/plugins/sqldrivers/psql/qsql_psql.cpp
+index 3803f05b9f9..760685f64b4 100644
+--- a/src/plugins/sqldrivers/psql/qsql_psql.cpp
++++ b/src/plugins/sqldrivers/psql/qsql_psql.cpp
+@@ -1078,8 +1078,10 @@ static QPSQLDriver::Protocol qMakePSQLVersion(int vMaj, int vMin)
+ return QPSQLDriver::Version10;
+ case 11:
+ return QPSQLDriver::Version11;
++ case 12:
++ return QPSQLDriver::Version12;
+ default:
+- if (vMaj > 11)
++ if (vMaj > 12)
+ return QPSQLDriver::UnknownLaterVersion;
+ break;
+ }
+@@ -1439,26 +1441,29 @@ QSqlRecord QPSQLDriver::record(const QString &tablename) const
+ schema = stripDelimiters(schema, QSqlDriver::TableName);
+ tbl = stripDelimiters(tbl, QSqlDriver::TableName);
+
+- QString stmt = QStringLiteral("SELECT pg_attribute.attname, pg_attribute.atttypid::int, "
+- "pg_attribute.attnotnull, pg_attribute.attlen, pg_attribute.atttypmod, "
+- "pg_attrdef.adsrc "
+- "FROM pg_class, pg_attribute "
+- "LEFT JOIN pg_attrdef ON (pg_attrdef.adrelid = "
+- "pg_attribute.attrelid AND pg_attrdef.adnum = pg_attribute.attnum) "
+- "WHERE %1 "
+- "AND pg_class.relname = '%2' "
+- "AND pg_attribute.attnum > 0 "
+- "AND pg_attribute.attrelid = pg_class.oid "
+- "AND pg_attribute.attisdropped = false "
+- "ORDER BY pg_attribute.attnum");
+- if (schema.isEmpty())
+- stmt = stmt.arg(QStringLiteral("pg_table_is_visible(pg_class.oid)"));
+- else
+- stmt = stmt.arg(QStringLiteral("pg_class.relnamespace = (SELECT oid FROM "
+- "pg_namespace WHERE pg_namespace.nspname = '%1')").arg(schema));
++ const QString adsrc = protocol() < Version8
++ ? QStringLiteral("pg_attrdef.adsrc")
++ : QStringLiteral("pg_get_expr(pg_attrdef.adbin, pg_attrdef.adrelid)");
++ const QString nspname = schema.isEmpty()
++ ? QStringLiteral("pg_table_is_visible(pg_class.oid)")
++ : QStringLiteral("pg_class.relnamespace = (SELECT oid FROM "
++ "pg_namespace WHERE pg_namespace.nspname = '%1')").arg(schema);
++ const QString stmt =
++ QStringLiteral("SELECT pg_attribute.attname, pg_attribute.atttypid::int, "
++ "pg_attribute.attnotnull, pg_attribute.attlen, pg_attribute.atttypmod, "
++ "%1 "
++ "FROM pg_class, pg_attribute "
++ "LEFT JOIN pg_attrdef ON (pg_attrdef.adrelid = "
++ "pg_attribute.attrelid AND pg_attrdef.adnum = pg_attribute.attnum) "
++ "WHERE %2 "
++ "AND pg_class.relname = '%3' "
++ "AND pg_attribute.attnum > 0 "
++ "AND pg_attribute.attrelid = pg_class.oid "
++ "AND pg_attribute.attisdropped = false "
++ "ORDER BY pg_attribute.attnum").arg(adsrc, nspname, tbl);
+
+ QSqlQuery query(createResult());
+- query.exec(stmt.arg(tbl));
++ query.exec(stmt);
+ while (query.next()) {
+ int len = query.value(3).toInt();
+ int precision = query.value(4).toInt();
+diff --git a/src/plugins/sqldrivers/psql/qsql_psql_p.h b/src/plugins/sqldrivers/psql/qsql_psql_p.h
+index 99e0b5f60f5..9ac1fb50d79 100644
+--- a/src/plugins/sqldrivers/psql/qsql_psql_p.h
++++ b/src/plugins/sqldrivers/psql/qsql_psql_p.h
+@@ -93,6 +93,7 @@ public:
+ Version9_6 = 22,
+ Version10 = 23,
+ Version11 = 24,
++ Version12 = 25,
+ UnknownLaterVersion = 100000
+ };
+
+--
+2.16.3
diff --git a/dev-qt/qtsql/qtsql-5.13.2.ebuild b/dev-qt/qtsql/qtsql-5.13.2.ebuild
new file mode 100644
index 000000000000..256a4b3099e8
--- /dev/null
+++ b/dev-qt/qtsql/qtsql-5.13.2.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="SQL abstraction library for the Qt5 framework"
+SLOT=5/$(ver_cut 1-3) # bug 639140
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+fi
+
+IUSE="freetds mysql oci8 odbc postgres +sqlite"
+
+REQUIRED_USE="
+ || ( freetds mysql oci8 odbc postgres sqlite )
+"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}
+ freetds? ( dev-db/freetds )
+ mysql? ( dev-db/mysql-connector-c:= )
+ oci8? ( dev-db/oracle-instantclient:=[sdk] )
+ odbc? ( dev-db/unixODBC )
+ postgres? ( dev-db/postgresql:* )
+ sqlite? ( dev-db/sqlite:3 )
+"
+RDEPEND="${DEPEND}"
+
+QT5_TARGET_SUBDIRS=(
+ src/sql
+ src/plugins/sqldrivers
+)
+
+QT5_GENTOO_PRIVATE_CONFIG=(
+ :sql
+)
+
+PATCHES+=(
+ # Backport from 5.14 branch, bug #696870
+ "${FILESDIR}/${PN}-5.13.1-postgresql-12.patch"
+)
+
+src_configure() {
+ local myconf=(
+ $(qt_use freetds sql-tds plugin)
+ $(qt_use mysql sql-mysql plugin)
+ $(qt_use oci8 sql-oci plugin)
+ $(qt_use odbc sql-odbc plugin)
+ $(qt_use postgres sql-psql plugin)
+ $(qt_use sqlite sql-sqlite plugin)
+ $(usex sqlite -system-sqlite '')
+ )
+
+ use oci8 && myconf+=("-I${ORACLE_HOME}/include" "-L${ORACLE_HOME}/$(get_libdir)")
+
+ qt5-build_src_configure
+}