summaryrefslogtreecommitdiffstats
path: root/trinity-apps/kexi/kexi-14.0.11.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'trinity-apps/kexi/kexi-14.0.11.ebuild')
-rw-r--r--trinity-apps/kexi/kexi-14.0.11.ebuild24
1 files changed, 21 insertions, 3 deletions
diff --git a/trinity-apps/kexi/kexi-14.0.11.ebuild b/trinity-apps/kexi/kexi-14.0.11.ebuild
index e4905255..0beec69f 100644
--- a/trinity-apps/kexi/kexi-14.0.11.ebuild
+++ b/trinity-apps/kexi/kexi-14.0.11.ebuild
@@ -19,12 +19,15 @@ SLOT="14"
if [[ ${PV} != *9999* ]] ; then
KEYWORDS="~amd64 ~x86"
fi
-IUSE="mysql postgres"
+IUSE="mariadb mysql postgres"
+
+REQUIRED_USE="mysql? ( !mariadb )"
DEPEND="~trinity-base/tdelibs-${PV}
~trinity-apps/koffice-libs-${PV}
sys-libs/readline
- mysql? ( virtual/mysql )
+ mysql? ( dev-db/mysql-connector-c:= )
+ mariadb? ( dev-db/mariadb-connector-c:= )
postgres? ( dev-libs/libpqxx )"
RDEPEND="$DEPEND"
@@ -70,6 +73,15 @@ src_prepare() {
sed -i "${S}/kexi/migration/keximigratetest.cpp" \
-e "/TDEApplication/ s|\");|\", true, true, true);|"
+ if use mariadb ; then
+ sed -i 's/-lmysqlclient/-lmariadb/' "${S}/kexi/migration/mysql/Makefile.am" || die
+ sed -i 's/-lmysqlclient/-lmariadb/' "${S}/kexi/kexidb/drivers/mySQL/Makefile.am" || die
+ sed -i 's/mysql_version.h/mariadb_version.h/' "${S}/kexi/migration/mysql/mysqlmigrate.cpp" || die
+ sed -i 's/mysql_version.h/mariadb_version.h/' "${S}/kexi/kexidb/drivers/mySQL/mysqlconnection_p.h" || die
+ sed -i 's/mysql_version.h/mariadb_version.h/' "${S}/kexi/kexidb/drivers/mySQL/mysqldriver.cpp" || die
+ sed -i 's/mysql_config/mariadb_config/' "${S}/kexi/kexidb/drivers/configure.in.in" || die
+ fi
+
trinity-meta-2_src_prepare
echo 'all:' > ${S}/Makefile.am
@@ -80,8 +92,14 @@ src_prepare() {
src_configure() {
append-cxxflags "-std=c++11"
local myconf=(
- $(use_enable mysql)
$(use_enable postgres pgsql)
)
+ if use mysql ; then
+ myconf+=' --enable-mysql '
+ elif use mariadb ; then
+ myconf+=' --enable-mysql '
+ else
+ myconf+=' --disable-mysql '
+ fi
trinity-econf ${myconf[@]}
}