Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/qt5-sqlcipher/
Date: Sun, 27 Feb 2022 10:01:19
Message-Id: 1645956027.9048832d9d744034063b1ff6538f39db8f565c41.ulm@gentoo
1 commit: 9048832d9d744034063b1ff6538f39db8f565c41
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Sun Feb 27 09:57:08 2022 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 27 10:00:27 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9048832d
7
8 dev-db/qt5-sqlcipher: Migrate to cmake.eclass
9
10 Closes: https://bugs.gentoo.org/834119
11 Package-Manager: Portage-3.0.30, Repoman-3.0.3
12 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
13
14 .../qt5-sqlcipher/qt5-sqlcipher-1.0.11-r1.ebuild | 49 ++++++++++++++++++++++
15 1 file changed, 49 insertions(+)
16
17 diff --git a/dev-db/qt5-sqlcipher/qt5-sqlcipher-1.0.11-r1.ebuild b/dev-db/qt5-sqlcipher/qt5-sqlcipher-1.0.11-r1.ebuild
18 new file mode 100644
19 index 000000000000..57ef6aa14443
20 --- /dev/null
21 +++ b/dev-db/qt5-sqlcipher/qt5-sqlcipher-1.0.11-r1.ebuild
22 @@ -0,0 +1,49 @@
23 +# Copyright 1999-2022 Gentoo Authors
24 +# Distributed under the terms of the GNU General Public License v2
25 +
26 +EAPI=8
27 +
28 +inherit cmake
29 +
30 +DESCRIPTION="Qt SQL driver plugin for SQLCipher"
31 +HOMEPAGE="https://github.com/blizzard4591/qt5-sqlcipher"
32 +SRC_URI="https://github.com/blizzard4591/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
33 +
34 +LICENSE="LGPL-2.1" # version 2.1 only
35 +SLOT="0"
36 +KEYWORDS="~amd64"
37 +
38 +RDEPEND=">=dev-db/sqlcipher-3.4.1
39 + >=dev-qt/qtcore-5.12.3:5=
40 + >=dev-qt/qtsql-5.12.3:5=[sqlite] <dev-qt/qtsql-5.16:5=[sqlite]"
41 +DEPEND="${RDEPEND}"
42 +
43 +DOCS=(README.md)
44 +
45 +src_prepare() {
46 + eapply "${FILESDIR}"/${PN}-1.0.10-install-path.patch
47 + sed -i -e "s/@LIBDIR@/$(get_libdir)/" CMakeLists.txt || die
48 +
49 + local v=$(best_version dev-qt/qtsql:5)
50 + v=$(ver_cut 1-3 ${v#*/qtsql-})
51 + [[ -n ${v} ]] || die "could not determine qtsql version"
52 + if ! [[ -d qt-file-cache/${v} ]]; then
53 + local vc
54 + case $(ver_cut 1-2 ${v}) in
55 + 5.12) vc=5.12.5 ;;
56 + 5.13) vc=5.13.2 ;;
57 + 5.14) vc=5.14.2 ;;
58 + 5.15) vc=5.15.0 ;;
59 + *) die "qtsql-${v} not supported" ;;
60 + esac
61 + elog "qtsql-${v} not in cache, using ${vc} instead"
62 + cp -R qt-file-cache/${vc} qt-file-cache/${v} || die
63 + fi
64 +
65 + cmake_src_prepare
66 +}
67 +
68 +src_test() {
69 + cd "${BUILD_DIR}" || die
70 + ./qsqlcipher-test || die
71 +}