Added mysql and mariadb build selection, solution to issue #205

Signed-off-by: ormorph <roma251078@mail.ru>
pull/236/head
ormorph 3 years ago
parent aa038a0823
commit 33e001b332

@ -22,8 +22,11 @@ HOMEPAGE="https://trinitydesktop.org/"
LICENSE="|| ( GPL-2 GPL-3 )" LICENSE="|| ( GPL-2 GPL-3 )"
SLOT="3.5" SLOT="3.5"
IUSE="cups debug doc examples firebird fontconfig glib +hiddenvisibility imext ipv6 IUSE="cups debug doc examples firebird fontconfig glib +hiddenvisibility imext ipv6
mng mysql nas nis +opengl postgres sqlite styles tablet +xinerama +xrandr" mariadb mng mysql nas nis +opengl postgres sqlite styles tablet +xinerama +xrandr"
REQUIRED_USE="mysql? ( !mariadb )"
# Don't use Gentoo mirrors # Don't use Gentoo mirrors
RESTRICT="mirror" RESTRICT="mirror"
@ -48,7 +51,8 @@ RDEPEND="
fontconfig? ( media-libs/fontconfig ) fontconfig? ( media-libs/fontconfig )
glib? ( dev-libs/glib ) glib? ( dev-libs/glib )
mng? ( media-libs/libmng ) mng? ( media-libs/libmng )
mysql? ( virtual/mysql ) mysql? ( dev-db/mysql-connector-c )
mariadb? ( dev-db/mariadb-connector-c )
nas? ( media-libs/nas ) nas? ( media-libs/nas )
nis? ( net-libs/libnsl ) nis? ( net-libs/libnsl )
opengl? ( virtual/opengl virtual/glu ) opengl? ( virtual/opengl virtual/glu )
@ -156,6 +160,14 @@ src_prepare() {
# Remove docs from install if we don't need them # Remove docs from install if we don't need them
use doc || sed -i -e '/INSTALLS.*=.*htmldocs/d' \ use doc || sed -i -e '/INSTALLS.*=.*htmldocs/d' \
"src/qt_install.pri" || die "src/qt_install.pri" || die
# Ensuring tqt build with mariadb flag
if use mariadb ; then
sed -i 's/-lmysqlclient/-lmariadb/' "${S}/configure" || die
sed -i 's/-lmysqlclient/-lmariadb/' "${S}/config.tests/unix/checkavail" || dei
sed -i 's/-lmysqlclient/-lmariadb/' "${S}/src/sql/qt_sql.pri" || die
sed -i 's/-lmysqlclient/-lmariadb/' "${S}/plugins/src/sqldrivers/mysql/mysql.pro" || die
fi
} }
src_configure() { src_configure() {
@ -190,6 +202,7 @@ src_configure() {
use debug && myconf+=" -debug" || myconf+=" -release -no-g++-exceptions -no-exceptions" use debug && myconf+=" -debug" || myconf+=" -release -no-g++-exceptions -no-exceptions"
use mysql && myconf+=" -plugin-sql-mysql -I/usr/include/mysql -L/usr/$(get_libdir)/mysql" || myconf+=" -no-sql-mysql" use mysql && myconf+=" -plugin-sql-mysql -I/usr/include/mysql -L/usr/$(get_libdir)/mysql" || myconf+=" -no-sql-mysql"
use mariadb && myconf+=" -plugin-sql-mysql -I/usr/include/mariadb -L/usr/$(get_libdir)/mariadb" || myconf+=" -no-sql-mysql"
use postgres && myconf+=" -plugin-sql-psql -I/usr/include/postgresql/server -I/usr/include/postgresql/pgsql -I/usr/include/postgresql/pgsql/server" || myconf+=" -no-sql-psql" use postgres && myconf+=" -plugin-sql-psql -I/usr/include/postgresql/server -I/usr/include/postgresql/pgsql -I/usr/include/postgresql/pgsql/server" || myconf+=" -no-sql-psql"
use firebird && myconf+=" -plugin-sql-ibase -I/opt/firebird/include" || myconf+=" -no-sql-ibase" use firebird && myconf+=" -plugin-sql-ibase -I/opt/firebird/include" || myconf+=" -no-sql-ibase"
use sqlite && myconf+=" -plugin-sql-sqlite -plugin-sql-sqlite3" || myconf+=" -no-sql-sqlite -no-sql-sqlite3" use sqlite && myconf+=" -plugin-sql-sqlite -plugin-sql-sqlite3" || myconf+=" -no-sql-sqlite -no-sql-sqlite3"

@ -23,7 +23,9 @@ HOMEPAGE="https://trinitydesktop.org/"
LICENSE="|| ( GPL-2 GPL-3 )" LICENSE="|| ( GPL-2 GPL-3 )"
SLOT="3.5" SLOT="3.5"
IUSE="cups debug doc examples firebird fontconfig glib +hiddenvisibility imext ipv6 IUSE="cups debug doc examples firebird fontconfig glib +hiddenvisibility imext ipv6
mng mysql nas nis +opengl postgres sqlite styles tablet +xinerama +xrandr" mariadb mng mysql nas nis +opengl postgres sqlite styles tablet +xinerama +xrandr"
REQUIRED_USE="mysql? ( !mariadb )"
# Don't use Gentoo mirrors # Don't use Gentoo mirrors
RESTRICT="mirror" RESTRICT="mirror"
@ -48,7 +50,8 @@ RDEPEND="
fontconfig? ( media-libs/fontconfig ) fontconfig? ( media-libs/fontconfig )
glib? ( dev-libs/glib ) glib? ( dev-libs/glib )
mng? ( media-libs/libmng ) mng? ( media-libs/libmng )
mysql? ( virtual/mysql ) mysql? ( dev-db/mysql-connector-c )
mariadb? ( dev-db/mariadb-connector-c )
nas? ( media-libs/nas ) nas? ( media-libs/nas )
nis? ( net-libs/libnsl ) nis? ( net-libs/libnsl )
opengl? ( virtual/opengl virtual/glu ) opengl? ( virtual/opengl virtual/glu )
@ -156,6 +159,14 @@ src_prepare() {
# Remove docs from install if we don't need them # Remove docs from install if we don't need them
use doc || sed -i -e '/INSTALLS.*=.*htmldocs/d' \ use doc || sed -i -e '/INSTALLS.*=.*htmldocs/d' \
"src/qt_install.pri" || die "src/qt_install.pri" || die
# Ensuring tqt build with mariadb flag
if use mariadb ; then
sed -i 's/-lmysqlclient/-lmariadb/' "${S}/configure" || die
sed -i 's/-lmysqlclient/-lmariadb/' "${S}/config.tests/unix/checkavail" || die
sed -i 's/-lmysqlclient/-lmariadb/' "${S}/src/sql/qt_sql.pri" || die
sed -i 's/-lmysqlclient/-lmariadb/' "${S}/plugins/src/sqldrivers/mysql/mysql.pro" || die
fi
} }
src_configure() { src_configure() {
@ -190,6 +201,7 @@ src_configure() {
use debug && myconf+=" -debug" || myconf+=" -release -no-g++-exceptions -no-exceptions" use debug && myconf+=" -debug" || myconf+=" -release -no-g++-exceptions -no-exceptions"
use mysql && myconf+=" -plugin-sql-mysql -I/usr/include/mysql -L/usr/$(get_libdir)/mysql" || myconf+=" -no-sql-mysql" use mysql && myconf+=" -plugin-sql-mysql -I/usr/include/mysql -L/usr/$(get_libdir)/mysql" || myconf+=" -no-sql-mysql"
use mariadb && myconf+=" -plugin-sql-mysql -I/usr/include/mariadb -L/usr/$(get_libdir)/mariadb" || myconf+=" -no-sql-mysql"
use postgres && myconf+=" -plugin-sql-psql -I/usr/include/postgresql/server -I/usr/include/postgresql/pgsql -I/usr/include/postgresql/pgsql/server" || myconf+=" -no-sql-psql" use postgres && myconf+=" -plugin-sql-psql -I/usr/include/postgresql/server -I/usr/include/postgresql/pgsql -I/usr/include/postgresql/pgsql/server" || myconf+=" -no-sql-psql"
use firebird && myconf+=" -plugin-sql-ibase -I/opt/firebird/include" || myconf+=" -no-sql-ibase" use firebird && myconf+=" -plugin-sql-ibase -I/opt/firebird/include" || myconf+=" -no-sql-ibase"
use sqlite && myconf+=" -plugin-sql-sqlite -plugin-sql-sqlite3" || myconf+=" -no-sql-sqlite -no-sql-sqlite3" use sqlite && myconf+=" -plugin-sql-sqlite -plugin-sql-sqlite3" || myconf+=" -no-sql-sqlite -no-sql-sqlite3"

@ -24,7 +24,7 @@ HOMEPAGE="https://trinitydesktop.org/"
LICENSE="|| ( GPL-2 GPL-3 )" LICENSE="|| ( GPL-2 GPL-3 )"
SLOT="14" SLOT="14"
if [[ ${PV} != *9999* ]] ; then if [[ ${PV} != *9999* ]] ; then
KEYWORDS="~amd64 ~x86" KEYWORDS="~amd64 ~x86"
fi fi
# Notes about the ebuild: # Notes about the ebuild:
@ -39,10 +39,10 @@ fi
# #
# - Otherwise the ebuild should offer all what can be done with CMake at the moment. # - Otherwise the ebuild should offer all what can be done with CMake at the moment.
IUSE="akode amazon ifp inotify ipod konqsidebar mp4 mtp mysql njb IUSE="akode amazon ifp inotify ipod konqsidebar mariadb mp4 mtp mysql njb
opengl postgres visualization +xine" opengl postgres visualization +xine"
REQUIRED_USE="|| ( xine akode )" REQUIRED_USE="|| ( xine akode ) mysql? ( !mariadb )"
DEPEND=" DEPEND="
dev-db/sqlite dev-db/sqlite
@ -53,7 +53,8 @@ DEPEND="
ipod? ( media-libs/libgpod ) ipod? ( media-libs/libgpod )
mp4? ( media-libs/libmp4v2 ) mp4? ( media-libs/libmp4v2 )
mtp? ( media-libs/libmtp ) mtp? ( media-libs/libmtp )
mysql? ( virtual/mysql ) mysql? ( dev-db/mysql-connector-c )
mariadb? ( dev-db/mariadb-connector-c )
njb? ( media-libs/libnjb ) njb? ( media-libs/libnjb )
opengl? ( virtual/opengl ) opengl? ( virtual/opengl )
postgres? ( dev-db/postgresql:= ) postgres? ( dev-db/postgresql:= )
@ -65,6 +66,15 @@ DEPEND="
" "
RDEPEND="${DEPEND}" RDEPEND="${DEPEND}"
src_prepare() {
if use mysql ; then
sed -i 's/mariadb_config mysql_config/mysql_config/' "${S}/ConfigureChecks.cmake"
elif use mariadb ; then
sed -i 's/mariadb_config mysql_config/mariadb_config/' "${S}/ConfigureChecks.cmake"
fi
trinity-base-2_src_prepare
}
src_configure() { src_configure() {
TRINITY_EXTRAGEAR_PACKAGING="yes" TRINITY_EXTRAGEAR_PACKAGING="yes"
local mycmakeargs=( local mycmakeargs=(
@ -80,13 +90,17 @@ src_configure() {
-DWITH_KONQSIDEBAR="$(usex konqsidebar)" -DWITH_KONQSIDEBAR="$(usex konqsidebar)"
-DWITH_MP4V2="$(usex mp4)" -DWITH_MP4V2="$(usex mp4)"
-DWITH_MTP="$(usex mtp)" -DWITH_MTP="$(usex mtp)"
-DWITH_MYSQL="$(usex mysql)"
-DWITH_NJB="$(usex njb)" -DWITH_NJB="$(usex njb)"
-DWITH_OPENGL="$(usex opengl)" -DWITH_OPENGL="$(usex opengl)"
-DWITH_POSTGRESQL="$(usex postgres)" -DWITH_POSTGRESQL="$(usex postgres)"
-DWITH_LIBVISUAL="$(usex visualization)" -DWITH_LIBVISUAL="$(usex visualization)"
-DWITH_XINE="$(usex xine)" -DWITH_XINE="$(usex xine)"
) )
if use mysql ; then
mycmakeargs+=( -DWITH_MYSQL=ON )
elif use mariadb ; then
mycmakeargs+=( -DWITH_MYSQL=ON )
fi
trinity-base-2_src_configure trinity-base-2_src_configure
} }

@ -22,7 +22,7 @@ HOMEPAGE="https://trinitydesktop.org/"
LICENSE="|| ( GPL-2 GPL-3 )" LICENSE="|| ( GPL-2 GPL-3 )"
SLOT="14" SLOT="14"
if [[ ${PV} != *9999* ]] ; then if [[ ${PV} != *9999* ]] ; then
KEYWORDS="~amd64 ~x86" KEYWORDS="~amd64 ~x86"
fi fi
# Notes about the ebuild: # Notes about the ebuild:
@ -37,10 +37,10 @@ fi
# #
# - Otherwise the ebuild should offer all what can be done with CMake at the moment. # - Otherwise the ebuild should offer all what can be done with CMake at the moment.
IUSE="akode amazon ifp inotify ipod konqsidebar mp4 mtp mysql njb IUSE="akode amazon ifp inotify ipod konqsidebar mariadb mp4 mtp mysql njb
opengl postgres visualization +xine" opengl postgres visualization +xine"
REQUIRED_USE="|| ( xine akode )" REQUIRED_USE="|| ( xine akode ) mysql? ( !mariadb )"
DEPEND=" DEPEND="
dev-db/sqlite dev-db/sqlite
@ -51,7 +51,8 @@ DEPEND="
ipod? ( media-libs/libgpod ) ipod? ( media-libs/libgpod )
mp4? ( media-libs/libmp4v2 ) mp4? ( media-libs/libmp4v2 )
mtp? ( media-libs/libmtp ) mtp? ( media-libs/libmtp )
mysql? ( virtual/mysql ) mysql? ( dev-db/mysql-connector-c )
mariadb? ( dev-db/mariadb-connector-c )
njb? ( media-libs/libnjb ) njb? ( media-libs/libnjb )
opengl? ( virtual/opengl ) opengl? ( virtual/opengl )
postgres? ( dev-db/postgresql:= ) postgres? ( dev-db/postgresql:= )
@ -63,6 +64,15 @@ DEPEND="
" "
RDEPEND="${DEPEND}" RDEPEND="${DEPEND}"
src_prepare() {
if use mysql ; then
sed -i 's/mariadb_config mysql_config/mysql_config/' "${S}/ConfigureChecks.cmake"
elif use mariadb ; then
sed -i 's/mariadb_config mysql_config/mariadb_config/' "${S}/ConfigureChecks.cmake"
fi
trinity-base-2_src_prepare
}
src_configure() { src_configure() {
local mycmakeargs=( local mycmakeargs=(
-DWITH_SYSTEM_SQLITE=ON -DWITH_SYSTEM_SQLITE=ON
@ -77,13 +87,17 @@ src_configure() {
-DWITH_KONQSIDEBAR="$(usex konqsidebar)" -DWITH_KONQSIDEBAR="$(usex konqsidebar)"
-DWITH_MP4V2="$(usex mp4)" -DWITH_MP4V2="$(usex mp4)"
-DWITH_MTP="$(usex mtp)" -DWITH_MTP="$(usex mtp)"
-DWITH_MYSQL="$(usex mysql)"
-DWITH_NJB="$(usex njb)" -DWITH_NJB="$(usex njb)"
-DWITH_OPENGL="$(usex opengl)" -DWITH_OPENGL="$(usex opengl)"
-DWITH_POSTGRESQL="$(usex postgres)" -DWITH_POSTGRESQL="$(usex postgres)"
-DWITH_LIBVISUAL="$(usex visualization)" -DWITH_LIBVISUAL="$(usex visualization)"
-DWITH_XINE="$(usex xine)" -DWITH_XINE="$(usex xine)"
) )
if use mysql ; then
mycmakeargs+=( -DWITH_MYSQL=ON )
elif use mariadb ; then
mycmakeargs+=( -DWITH_MYSQL=ON )
fi
trinity-base-2_src_configure trinity-base-2_src_configure
} }

@ -5,6 +5,7 @@
<use> <use>
<flag name="akode">Enable support for common audio formats via <pkg>media-libs/akode</pkg></flag> <flag name="akode">Enable support for common audio formats via <pkg>media-libs/akode</pkg></flag>
<flag name="amazon">Enable support for downloading covers from amazon.com</flag> <flag name="amazon">Enable support for downloading covers from amazon.com</flag>
<flag name="mariadb">Build with support for <pkg>dev-db/mariadb-connector-c</pkg></flag>
<flag name="ifp">Enable support for iRiver devices access through <pkg>media-libs/libifp</pkg></flag> <flag name="ifp">Enable support for iRiver devices access through <pkg>media-libs/libifp</pkg></flag>
<flag name="konqsidebar">Enable konqueror sidebar plugin</flag> <flag name="konqsidebar">Enable konqueror sidebar plugin</flag>
<flag name="njb">Enable support for NJB (Creative) devices access through <pkg>media-libs/libnjb</pkg></flag> <flag name="njb">Enable support for NJB (Creative) devices access through <pkg>media-libs/libnjb</pkg></flag>

Loading…
Cancel
Save