commit:     1a3ce8bf5c322e7df2e542f0a6a8fc962c6923a1
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun Nov  9 10:41:41 2025 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Nov  9 12:49:27 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a3ce8bf

dev-db/qt5-sqlcipher: add 1.1.0

Despite the package's name, the upstream package supports only Qt6.

Bug: https://bugs.gentoo.org/955180
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 dev-db/qt5-sqlcipher/Manifest                      |  1 +
 .../files/qt5-sqlcipher-1.1.0-install-path.patch   | 15 +++++++
 dev-db/qt5-sqlcipher/qt5-sqlcipher-1.1.0.ebuild    | 46 ++++++++++++++++++++++
 3 files changed, 62 insertions(+)

diff --git a/dev-db/qt5-sqlcipher/Manifest b/dev-db/qt5-sqlcipher/Manifest
index 32e7b35ba9ae..dde31f4e6855 100644
--- a/dev-db/qt5-sqlcipher/Manifest
+++ b/dev-db/qt5-sqlcipher/Manifest
@@ -1 +1,2 @@
 DIST qt5-sqlcipher-1.0.11.tar.gz 267993 BLAKE2B 
e938f7de368af90cb3304eeb79afcc86354bcecd55e57b7fb73c979e5e40dbf1b0936db37c16b8e9cc3ca4646aac5cd773917eff14735f2eaf91ac67d9432d66
 SHA512 
6ed4bd6fa7155438266cae2ecaeaea648e9b55df23f7fb811daa7d90fda0ab36e489c28b3739a4cc1103fc5f550e16f9a58f9df4e001e72ac10937bc2115bad9
+DIST qt5-sqlcipher-1.1.0.tar.gz 683201 BLAKE2B 
c49536398bcf196401fa5889a6a35daa656eb6f63faeef223ded3f15dd64fcaa9d87a69c2ea1f0c1f6a9503a810e23cad5bc86ebcacc2ce1b65a222ec46d9be5
 SHA512 
6f86a51f71515d4863f17808d794f0162a70043a5cca09fcb0f76cb7a8be84f231fe9866663829cfbd610da7584a0c9a0f4f830356ac56467d1d5e68ede9400f

diff --git a/dev-db/qt5-sqlcipher/files/qt5-sqlcipher-1.1.0-install-path.patch 
b/dev-db/qt5-sqlcipher/files/qt5-sqlcipher-1.1.0-install-path.patch
new file mode 100644
index 000000000000..9317d4a713e0
--- /dev/null
+++ b/dev-db/qt5-sqlcipher/files/qt5-sqlcipher-1.1.0-install-path.patch
@@ -0,0 +1,15 @@
+--- qt5-sqlcipher-1.1.0/CMakeLists.txt
++++ qt5-sqlcipher-1.1.0/CMakeLists.txt
+@@ -193,11 +193,7 @@
+                       INSTALL(TARGETS qsqlcipher-test DESTINATION bin)
+               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@/qt6/plugins/sqldrivers)
+       endif()
+ else()
+       INSTALL(TARGETS qsqlcipher DESTINATION sqldrivers)

diff --git a/dev-db/qt5-sqlcipher/qt5-sqlcipher-1.1.0.ebuild 
b/dev-db/qt5-sqlcipher/qt5-sqlcipher-1.1.0.ebuild
new file mode 100644
index 000000000000..9e805823115a
--- /dev/null
+++ b/dev-db/qt5-sqlcipher/qt5-sqlcipher-1.1.0.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="Qt SQL driver plugin for SQLCipher"
+HOMEPAGE="https://github.com/blizzard4591/qt5-sqlcipher";
+SRC_URI="https://github.com/blizzard4591/${PN}/archive/refs/tags/${PV}.tar.gz 
-> ${P}.tar.gz"
+
+LICENSE="LGPL-2.1" # version 2.1 only
+SLOT="6"
+KEYWORDS="~amd64"
+
+RDEPEND=">=dev-db/sqlcipher-4.6.1
+       >=dev-qt/qtbase-6.9.3:6=[sql,sqlite] <dev-qt/qtbase-6.11:6=[sql,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/qtbase:6)
+       v=$(ver_cut 1-3 ${v#*/qtbase-})
+       [[ -n ${v} ]] || die "could not determine qtbase version"
+       if ! [[ -d qt-file-cache/${v} ]]; then
+               local vc
+               case $(ver_cut 1-2 ${v}) in
+                       6.9) vc=6.9.3 ;;
+                       6.10) vc=6.10.0 ;;
+                       *) die "qtbase-${v} not supported" ;;
+               esac
+               elog "qtbase-${v} not in cache, using ${vc} instead"
+               cp -R qt-file-cache/${vc} qt-file-cache/${v} || die
+       fi
+
+       cmake_src_prepare
+}
+
+src_test() {
+       cd "${BUILD_DIR}" || die
+       ./qsqlcipher-test || die
+}

Reply via email to