dev-qt: version bump 5.9.3
[gentoo.git] / dev-qt / qtsql / qtsql-5.9.3.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 QT5_MODULE="qtbase"
6 inherit qt5-build
7
8 DESCRIPTION="SQL abstraction library for the Qt5 tooolkit"
9
10 if [[ ${QT5_BUILD_TYPE} == release ]]; then
11         KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86"
12 fi
13
14 IUSE="freetds mysql oci8 odbc postgres +sqlite"
15
16 REQUIRED_USE="
17         || ( freetds mysql oci8 odbc postgres sqlite )
18 "
19
20 DEPEND="
21         ~dev-qt/qtcore-${PV}
22         freetds? ( dev-db/freetds )
23         mysql? ( virtual/libmysqlclient:= )
24         oci8? ( dev-db/oracle-instantclient-basic )
25         odbc? ( || ( dev-db/unixODBC dev-db/libiodbc ) )
26         postgres? ( dev-db/postgresql:* )
27         sqlite? ( >=dev-db/sqlite-3.8.10.2:3 )
28 "
29 RDEPEND="${DEPEND}"
30
31 QT5_TARGET_SUBDIRS=(
32         src/sql
33         src/plugins/sqldrivers
34 )
35
36 src_configure() {
37         local myconf=(
38                 $(qt_use freetds  sql-tds    plugin)
39                 $(qt_use mysql    sql-mysql  plugin)
40                 $(qt_use oci8     sql-oci    plugin)
41                 $(qt_use odbc     sql-odbc   plugin)
42                 $(qt_use postgres sql-psql   plugin)
43                 $(qt_use sqlite   sql-sqlite plugin)
44                 $(usex sqlite -system-sqlite '')
45         )
46
47         use mysql && myconf+=("-I${EPREFIX}/usr/include/mysql" "-L${EPREFIX}/usr/$(get_libdir)/mysql")
48         use oci8 && myconf+=("-I${ORACLE_HOME}/include" "-L${ORACLE_HOME}/$(get_libdir)")
49         use odbc && myconf+=("-I${EPREFIX}/usr/include/iodbc")
50         use postgres && myconf+=("-I${EPREFIX}/usr/include/postgresql/pgsql")
51
52         qt5-build_src_configure
53 }