summaryrefslogtreecommitdiff
path: root/dev-db/kdb/kdb-3.2.0-r2.ebuild
blob: f62284ddcc1daef877cb2649b177192c82d0cd28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

ECM_QTHELP="true"
ECM_TEST="true"
PYTHON_COMPAT=( python3_{9..12} )
KFMIN=5.82.0
QTMIN=5.15.2
inherit ecm kde.org python-any-r1

DESCRIPTION="Database connectivity and creation framework for various vendors"
HOMEPAGE="https://community.kde.org/KDb"

if [[ ${KDE_BUILD_TYPE} = release ]]; then
	SRC_URI="mirror://kde/stable/${PN}/src/${P}.tar.xz
	https://dev.gentoo.org/~asturm/distfiles/${P}-patches.tar.xz"
	KEYWORDS="amd64 x86"
fi

LICENSE="LGPL-2+"
SLOT="5/4"
IUSE="debug mysql postgres sqlite"

DEPEND="
	dev-libs/icu:=
	>=dev-qt/qtgui-${QTMIN}:5
	>=dev-qt/qtnetwork-${QTMIN}:5
	>=dev-qt/qtwidgets-${QTMIN}:5
	>=dev-qt/qtxml-${QTMIN}:5
	>=kde-frameworks/kcoreaddons-${KFMIN}:5
	mysql? ( dev-db/mysql-connector-c:= )
	postgres? (
		dev-db/postgresql:*
		>=dev-qt/qtnetwork-${QTMIN}:5
	)
	sqlite? ( dev-db/sqlite:3 )
"
RDEPEND="${DEPEND}"
BDEPEND="${PYTHON_DEPS}
	dev-qt/linguist-tools:5
"

PATCHES=(
	# 3.2 branch
	"${WORKDIR}"/${P}-patches/${P}-build-w-pg12.patch
	"${WORKDIR}"/${P}-patches/${P}-qt-5.15.patch
	"${WORKDIR}"/${P}-patches/${P}-cmake-pg15.patch
	"${WORKDIR}"/${P}-patches/${P}-Q_REQUIRED_RESULT-placing.patch
	"${WORKDIR}"/${P}-patches/${P}-gcc12.patch
	# master
	"${WORKDIR}"/${P}-patches/${P}-KDEInstallDirs.patch
	"${FILESDIR}"/${P}-postgresql-gcc12.patch # bug 869368
)

pkg_setup() {
	python-any-r1_pkg_setup
	ecm_pkg_setup
}

src_configure() {
	local mycmakeargs=(
		-DCMAKE_CXX_STANDARD=17
		-DKDB_DEBUG_GUI=$(usex debug)
		$(cmake_use_find_package mysql MySQL)
		$(cmake_use_find_package postgres PostgreSQL)
		$(cmake_use_find_package sqlite Sqlite)
	)

	ecm_src_configure
}