net-analyzer/icinga2: more mysql/maria updates
authorMatthew Thode <prometheanfire@gentoo.org>
Wed, 12 Sep 2018 18:10:15 +0000 (13:10 -0500)
committerMatthew Thode <prometheanfire@gentoo.org>
Wed, 12 Sep 2018 18:10:15 +0000 (13:10 -0500)
Bug: https://bugs.gentoo.org/665944
Package-Manager: Portage-2.3.48, Repoman-2.3.10

net-analyzer/icinga2/icinga2-9999.ebuild
net-analyzer/icinga2/metadata.xml

index 275130c94d6114f20152f6151317b893d8dc00d8..c0f291e4ea22b3260c3547211f0c5cb8cb9d9de6 100644 (file)
@@ -18,7 +18,7 @@ HOMEPAGE="http://icinga.org/icinga2"
 
 LICENSE="GPL-2"
 SLOT="0"
-IUSE="+mysql postgres classicui console libressl lto mail minimal nano-syntax +plugins systemd +vim-syntax"
+IUSE="classicui console libressl lto mail mariadb minimal +mysql nano-syntax +plugins postgres systemd +vim-syntax"
 WX_GTK_VER="3.0"
 
 CDEPEND="
@@ -26,10 +26,8 @@ CDEPEND="
        libressl? ( dev-libs/libressl:0= )
        >=dev-libs/boost-1.58-r1
        console? ( dev-libs/libedit )
-       mysql? ( || (
-               dev-db/mariadb-connector-c
-               dev-db/mysql-connector-c )
-       )
+       mariadb? ( dev-db/mariadb-connector-c:= )
+       mysql? ( dev-db/mysql-connector-c:= )
        postgres? ( dev-db/postgresql:= )
        dev-libs/yajl"
 
@@ -47,7 +45,7 @@ RDEPEND="
        mail? ( virtual/mailx )
        classicui? ( net-analyzer/icinga[web] )"
 
-REQUIRED_USE="!minimal? ( || ( mysql postgres ) )"
+REQUIRED_USE="!minimal? ( || ( mariadb mysql postgres ) )"
 
 want_apache2
 
@@ -118,7 +116,14 @@ src_install() {
                newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/mysql.sql mysql.sql
                docinto schema/upgrade
                dodoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/upgrade/*
-       elif use postgres ; then
+       fi
+       if use mariadb ; then  # same as mysql
+               docinto schema
+               newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/mysql.sql mysql.sql
+               docinto schema/upgrade
+               dodoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/upgrade/*
+       fi
+       if use postgres ; then
                docinto schema
                newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_pgsql/schema/pgsql.sql pgsql.sql
                docinto schema/upgrade
index b03390bc2e50b3b8b87076b3a4a6ef6255424439..73dade688729a282f4673d15307d7c7836a4e957 100644 (file)
@@ -10,6 +10,7 @@
                <flag name="console">Adds support for line-editing in the console</flag>
                <flag name="lto">Adds support for link time optimization</flag>
                <flag name="mail">Allows for mailing of alerts</flag>
+               <flag name="mariadb">Enable support for the mariadb database backend</flag>
                <flag name="studio">Adds support for Icinga-studio</flag>
                <flag name="nano-syntax">Adds support for syntax used in the nano editor</flag>
                <flag name="plugins">Adds support for nagios plugins</flag>