public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-db/qt5-sqlcipher/files/, dev-db/qt5-sqlcipher/
@ 2020-04-11 18:53 Ulrich Müller
  0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Müller @ 2020-04-11 18:53 UTC (permalink / raw
  To: gentoo-commits

commit:     b5996000d8825d4ccdf5784494660b193808df88
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 11 16:32:51 2020 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Apr 11 18:47:00 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5996000

dev-db/qt5-sqlcipher: Version bump to 1.0.10.

Reported-by: Nils Freydank <holgersson <AT> posteo.de>
Closes: https://bugs.gentoo.org/717084
Package-Manager: Portage-2.3.98, Repoman-2.3.22
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 dev-db/qt5-sqlcipher/Manifest                      |  1 +
 .../files/qt5-sqlcipher-1.0.10-install-path.patch  | 14 +++++++
 dev-db/qt5-sqlcipher/qt5-sqlcipher-1.0.10.ebuild   | 48 ++++++++++++++++++++++
 3 files changed, 63 insertions(+)

diff --git a/dev-db/qt5-sqlcipher/Manifest b/dev-db/qt5-sqlcipher/Manifest
index 9081c6b40e8..137e99733c4 100644
--- a/dev-db/qt5-sqlcipher/Manifest
+++ b/dev-db/qt5-sqlcipher/Manifest
@@ -1,2 +1,3 @@
 DIST qt5-sqlcipher-1.0.1-qt-5.14.0.tar.xz 8248 BLAKE2B 0cc717deecf2ff1d212a5b510be0c57d5cdac6abf9dc5db8f5d69762adb2a0d79298aa0e2f453417a5aa5b242637094e7ebaf6d7fe777539e0f8896f6adc3709 SHA512 a61231756967f0596b3903db1ca40937f1140a3d06ff9b6b6f6a6195650c170e0d4f42a3d51ac3f3cb35f4e173b78986a8fb31ed7a7e01e125ae78c7dd851246
+DIST qt5-sqlcipher-1.0.10.tar.gz 245054 BLAKE2B edb36a47881e2d5801cf07cc9b6094ea53b9e0e595c0078d3a09b493979222a6ad655b074b015c0a152073e0f39d1e31ecb9e2021f7788dda04a0547cd47eddd SHA512 1a23da7d7c6de020ee0739154abe83f94208a3a6d385fd58eff38d3ea27ce51b37a66994e8ad0ff5102525c3573134f9b9362accf2032b7386ea174b12ea1338
 DIST qt5-sqlcipher-1.0.1_p20191025.tar.gz 200293 BLAKE2B 5a0c6401353bc1c9dc511ac585ebce8556742278c303032b3434116c5a778034df01a5133913f8eaac187863b91ef8432b20184b75882c738ed6d850682ac765 SHA512 9e5294ff4c25dc18ef83ecec6c7ef985fec73744f36b27d21591983eb9976b8a13151ef0a31ce3af9767ee3f6388b8f008404002345d328bf0094d03ca4dd8d0

diff --git a/dev-db/qt5-sqlcipher/files/qt5-sqlcipher-1.0.10-install-path.patch b/dev-db/qt5-sqlcipher/files/qt5-sqlcipher-1.0.10-install-path.patch
new file mode 100644
index 00000000000..5485ae94240
--- /dev/null
+++ b/dev-db/qt5-sqlcipher/files/qt5-sqlcipher-1.0.10-install-path.patch
@@ -0,0 +1,14 @@
+--- qt5-sqlcipher-1.0.10-orig/CMakeLists.txt
++++ qt5-sqlcipher-1.0.10/CMakeLists.txt
+@@ -197,10 +197,7 @@
+ 		endif()
+ 	else()
+ 		message(WARNING "Packaging is not set up for this platform, either submit a ticket or change/add pathes yourself, if packaging is required.")
+-		INSTALL(TARGETS qsqlcipher DESTINATION sqldrivers)
+-		if (QSQLCIPHER_BUILD_TESTS)
+-			INSTALL(TARGETS qsqlcipher-test DESTINATION bin)
+-		endif()
++		INSTALL(TARGETS qsqlcipher DESTINATION @LIBDIR@/qt5/plugins/sqldrivers)
+ 	endif()
+ else()
+ 	INSTALL(TARGETS qsqlcipher DESTINATION sqldrivers)

diff --git a/dev-db/qt5-sqlcipher/qt5-sqlcipher-1.0.10.ebuild b/dev-db/qt5-sqlcipher/qt5-sqlcipher-1.0.10.ebuild
new file mode 100644
index 00000000000..2e1c4834cc6
--- /dev/null
+++ b/dev-db/qt5-sqlcipher/qt5-sqlcipher-1.0.10.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-utils
+
+DESCRIPTION="Qt SQL driver plugin for SQLCipher"
+HOMEPAGE="https://github.com/blizzard4591/qt5-sqlcipher"
+SRC_URI="https://github.com/blizzard4591/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-2.1" # version 2.1 only
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND=">=dev-db/sqlcipher-3.4.1
+	>=dev-qt/qtcore-5.12.3:5=
+	>=dev-qt/qtsql-5.12.3:5=[sqlite] <dev-qt/qtsql-5.15:5=[sqlite]"
+DEPEND="${RDEPEND}"
+
+DOCS=(README.md)
+
+src_prepare() {
+	eapply "${FILESDIR}"/${P}-install-path.patch
+	sed -i -e "s/@LIBDIR@/$(get_libdir)/" CMakeLists.txt || die
+
+	local v=$(best_version dev-qt/qtsql:5)
+	v=$(ver_cut 1-3 ${v#*/qtsql-})
+	[[ -n ${v} ]] || die "could not determine qtsql version"
+	if ! [[ -d qt-file-cache/${v} ]]; then
+		local vc
+		case $(ver_cut 1-2 ${v}) in
+			5.12) vc=5.12.5 ;;
+			5.13) vc=5.13.2 ;;
+			5.14) vc=5.14.1 ;;
+			*) die "qtsql-${v} not supported" ;;
+		esac
+		elog "qtsql-${v} not in cache, using ${vc} instead"
+		cp -R qt-file-cache/${vc} qt-file-cache/${v} || die
+	fi
+
+	cmake-utils_src_prepare
+}
+
+src_test() {
+	cd "${BUILD_DIR}" || die
+	./qsqlcipher-test || die
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/qt5-sqlcipher/files/, dev-db/qt5-sqlcipher/
@ 2025-01-04 18:47 Ulrich Müller
  0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Müller @ 2025-01-04 18:47 UTC (permalink / raw
  To: gentoo-commits

commit:     aa3dc65bd445253a820d7e65bd4c10e395eb4e71
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat Jan  4 18:41:42 2025 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Jan  4 18:47:38 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa3dc65b

dev-db/qt5-sqlcipher: Update for Qt 5.15.16

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 .../files/qt5-sqlcipher-1.0.11-qt-5.15.16.patch    | 92 ++++++++++++++++++++++
 ...11-r1.ebuild => qt5-sqlcipher-1.0.11-r2.ebuild} | 13 ++-
 2 files changed, 98 insertions(+), 7 deletions(-)

diff --git a/dev-db/qt5-sqlcipher/files/qt5-sqlcipher-1.0.11-qt-5.15.16.patch b/dev-db/qt5-sqlcipher/files/qt5-sqlcipher-1.0.11-qt-5.15.16.patch
new file mode 100644
index 000000000000..24277405fdbb
--- /dev/null
+++ b/dev-db/qt5-sqlcipher/files/qt5-sqlcipher-1.0.11-qt-5.15.16.patch
@@ -0,0 +1,92 @@
+--- qt5-sqlcipher-1.0.11/qt-file-cache/5.15.16/qsql_sqlite.cpp
++++ qt5-sqlcipher-1.0.11/qt-file-cache/5.15.16/qsql_sqlite.cpp
+@@ -74,13 +74,18 @@
+ 
+ QT_BEGIN_NAMESPACE
+ 
+-static QString _q_escapeIdentifier(const QString &identifier)
++static QString _q_escapeIdentifier(const QString &identifier, QSqlDriver::IdentifierType type)
+ {
+     QString res = identifier;
++    // If it contains [ and ] then we assume it to be escaped properly already as this indicates
++    // the syntax is exactly how it should be
++    if (identifier.contains(QLatin1Char('[')) && identifier.contains(QLatin1Char(']')))
++        return res;
+     if (!identifier.isEmpty() && !identifier.startsWith(QLatin1Char('"')) && !identifier.endsWith(QLatin1Char('"'))) {
+         res.replace(QLatin1Char('"'), QLatin1String("\"\""));
+         res.prepend(QLatin1Char('"')).append(QLatin1Char('"'));
+-        res.replace(QLatin1Char('.'), QLatin1String("\".\""));
++        if (type == QSqlDriver::TableName)
++            res.replace(QLatin1Char('.'), QLatin1String("\".\""));
+     }
+     return res;
+ }
+@@ -478,7 +483,12 @@
+         for (int i = 0, currentIndex = 0; i < values.size(); ++i) {
+             if (handledIndexes.contains(i))
+                 continue;
+-            const auto placeHolder = QString::fromUtf8(sqlite3_bind_parameter_name(d->stmt, currentIndex + 1));
++            const char *parameterName = sqlite3_bind_parameter_name(d->stmt, currentIndex + 1);
++            if (!parameterName) {
++                paramCountIsValid = false;
++                continue;
++            }
++            const auto placeHolder = QString::fromUtf8(parameterName);
+             const auto &indexes = d->indexes.value(placeHolder);
+             handledIndexes << indexes;
+             prunedValues << values.at(indexes.first());
+@@ -491,7 +501,7 @@
+     if (paramCountIsValid) {
+         for (int i = 0; i < paramCount; ++i) {
+             res = SQLITE_OK;
+-            const QVariant value = values.at(i);
++            const QVariant &value = values.at(i);
+ 
+             if (value.isNull()) {
+                 res = sqlite3_bind_null(d->stmt, i + 1);
+@@ -900,13 +910,24 @@
+ {
+     QString schema;
+     QString table(tableName);
+-    int indexOfSeparator = tableName.indexOf(QLatin1Char('.'));
++    const int indexOfSeparator = tableName.indexOf(QLatin1Char('.'));
+     if (indexOfSeparator > -1) {
+-        schema = tableName.left(indexOfSeparator).append(QLatin1Char('.'));
+-        table = tableName.mid(indexOfSeparator + 1);
++        const int indexOfCloseBracket = tableName.indexOf(QLatin1Char(']'));
++        if (indexOfCloseBracket != tableName.size() - 1) {
++            // Handles a case like databaseName.tableName
++            schema = tableName.left(indexOfSeparator + 1);
++            table = tableName.mid(indexOfSeparator + 1);
++        } else {
++            const int indexOfOpenBracket = tableName.lastIndexOf(QLatin1Char('['), indexOfCloseBracket);
++            if (indexOfOpenBracket > 0) {
++                // Handles a case like databaseName.[tableName]
++                schema = tableName.left(indexOfOpenBracket);
++                table = tableName.mid(indexOfOpenBracket);
++            }
++        }
+     }
+-    q.exec(QLatin1String("PRAGMA ") + schema + QLatin1String("table_info (") + _q_escapeIdentifier(table) + QLatin1Char(')'));
+-
++    q.exec(QLatin1String("PRAGMA ") + schema + QLatin1String("table_info (") +
++           _q_escapeIdentifier(table, QSqlDriver::TableName) + QLatin1Char(')'));
+     QSqlIndex ind;
+     while (q.next()) {
+         bool isPk = q.value(5).toInt();
+@@ -968,8 +989,7 @@
+ 
+ QString QSQLiteDriver::escapeIdentifier(const QString &identifier, IdentifierType type) const
+ {
+-    Q_UNUSED(type);
+-    return _q_escapeIdentifier(identifier);
++    return _q_escapeIdentifier(identifier, type);
+ }
+ 
+ static void handle_sqlite_callback(void *qobj,int aoperation, char const *adbname, char const *atablename,
+@@ -1046,3 +1066,5 @@
+ }
+ 
+ QT_END_NAMESPACE
++
++#include "moc_qsql_sqlite_p.cpp"

diff --git a/dev-db/qt5-sqlcipher/qt5-sqlcipher-1.0.11-r1.ebuild b/dev-db/qt5-sqlcipher/qt5-sqlcipher-1.0.11-r2.ebuild
similarity index 80%
rename from dev-db/qt5-sqlcipher/qt5-sqlcipher-1.0.11-r1.ebuild
rename to dev-db/qt5-sqlcipher/qt5-sqlcipher-1.0.11-r2.ebuild
index 57ef6aa14443..60da9b9a752b 100644
--- a/dev-db/qt5-sqlcipher/qt5-sqlcipher-1.0.11-r1.ebuild
+++ b/dev-db/qt5-sqlcipher/qt5-sqlcipher-1.0.11-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -14,14 +14,16 @@ SLOT="0"
 KEYWORDS="~amd64"
 
 RDEPEND=">=dev-db/sqlcipher-3.4.1
-	>=dev-qt/qtcore-5.12.3:5=
-	>=dev-qt/qtsql-5.12.3:5=[sqlite] <dev-qt/qtsql-5.16:5=[sqlite]"
+	>=dev-qt/qtcore-5.15.16:5=
+	>=dev-qt/qtsql-5.15.16:5=[sqlite] <dev-qt/qtsql-5.16:5=[sqlite]"
 DEPEND="${RDEPEND}"
 
 DOCS=(README.md)
 
 src_prepare() {
 	eapply "${FILESDIR}"/${PN}-1.0.10-install-path.patch
+	cp -a "${S}"/qt-file-cache/5.15.{0,16} || die
+	eapply "${FILESDIR}"/${P}-qt-5.15.16.patch
 	sed -i -e "s/@LIBDIR@/$(get_libdir)/" CMakeLists.txt || die
 
 	local v=$(best_version dev-qt/qtsql:5)
@@ -30,10 +32,7 @@ src_prepare() {
 	if ! [[ -d qt-file-cache/${v} ]]; then
 		local vc
 		case $(ver_cut 1-2 ${v}) in
-			5.12) vc=5.12.5 ;;
-			5.13) vc=5.13.2 ;;
-			5.14) vc=5.14.2 ;;
-			5.15) vc=5.15.0 ;;
+			5.15) vc=5.15.16 ;;
 			*) die "qtsql-${v} not supported" ;;
 		esac
 		elog "qtsql-${v} not in cache, using ${vc} instead"


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-01-04 18:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-11 18:53 [gentoo-commits] repo/gentoo:master commit in: dev-db/qt5-sqlcipher/files/, dev-db/qt5-sqlcipher/ Ulrich Müller
  -- strict thread matches above, loose matches on Subject: below --
2025-01-04 18:47 Ulrich Müller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox