net-misc/httpie: x86 stable wrt bug #721524
[gentoo.git] / dev-qt / qtsql / qtsql-5.13.2.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 QT5_MODULE="qtbase"
6 inherit qt5-build
7
8 DESCRIPTION="SQL abstraction library for the Qt5 framework"
9 SLOT=5/$(ver_cut 1-3) # bug 639140
10
11 if [[ ${QT5_BUILD_TYPE} == release ]]; then
12         KEYWORDS="arm"
13 fi
14
15 IUSE="freetds mysql oci8 odbc postgres +sqlite"
16
17 REQUIRED_USE="
18         || ( freetds mysql oci8 odbc postgres sqlite )
19 "
20
21 DEPEND="
22         ~dev-qt/qtcore-${PV}
23         freetds? ( dev-db/freetds )
24         mysql? ( dev-db/mysql-connector-c:= )
25         oci8? ( dev-db/oracle-instantclient:=[sdk] )
26         odbc? ( dev-db/unixODBC )
27         postgres? ( dev-db/postgresql:* )
28         sqlite? ( dev-db/sqlite:3 )
29 "
30 RDEPEND="${DEPEND}"
31
32 QT5_TARGET_SUBDIRS=(
33         src/sql
34         src/plugins/sqldrivers
35 )
36
37 QT5_GENTOO_PRIVATE_CONFIG=(
38         :sql
39 )
40
41 PATCHES+=(
42         # Backport from 5.14 branch, bug #696870
43         "${FILESDIR}/${PN}-5.13.1-postgresql-12.patch"
44 )
45
46 src_configure() {
47         local myconf=(
48                 $(qt_use freetds  sql-tds    plugin)
49                 $(qt_use mysql    sql-mysql  plugin)
50                 $(qt_use oci8     sql-oci    plugin)
51                 $(qt_use odbc     sql-odbc   plugin)
52                 $(qt_use postgres sql-psql   plugin)
53                 $(qt_use sqlite   sql-sqlite plugin)
54                 $(usex sqlite -system-sqlite '')
55         )
56
57         use oci8 && myconf+=("-I${ORACLE_HOME}/include" "-L${ORACLE_HOME}/$(get_libdir)")
58
59         qt5-build_src_configure
60 }