From 33e001b3320930daf907f706d44ac91ef27ad408 Mon Sep 17 00:00:00 2001 From: ormorph Date: Thu, 18 Nov 2021 13:38:20 +0300 Subject: Added mysql and mariadb build selection, solution to issue #205 Signed-off-by: ormorph --- trinity-apps/amarok/amarok-14.0.11.ebuild | 24 +++++++++++++++++++----- trinity-apps/amarok/amarok-9999.ebuild | 24 +++++++++++++++++++----- trinity-apps/amarok/metadata.xml | 1 + 3 files changed, 39 insertions(+), 10 deletions(-) (limited to 'trinity-apps/amarok') diff --git a/trinity-apps/amarok/amarok-14.0.11.ebuild b/trinity-apps/amarok/amarok-14.0.11.ebuild index a1116ecd..517d2f6f 100644 --- a/trinity-apps/amarok/amarok-14.0.11.ebuild +++ b/trinity-apps/amarok/amarok-14.0.11.ebuild @@ -24,7 +24,7 @@ HOMEPAGE="https://trinitydesktop.org/" LICENSE="|| ( GPL-2 GPL-3 )" SLOT="14" if [[ ${PV} != *9999* ]] ; then - KEYWORDS="~amd64 ~x86" + KEYWORDS="~amd64 ~x86" fi # Notes about the ebuild: @@ -39,10 +39,10 @@ fi # # - 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" -REQUIRED_USE="|| ( xine akode )" +REQUIRED_USE="|| ( xine akode ) mysql? ( !mariadb )" DEPEND=" dev-db/sqlite @@ -53,7 +53,8 @@ DEPEND=" ipod? ( media-libs/libgpod ) mp4? ( media-libs/libmp4v2 ) mtp? ( media-libs/libmtp ) - mysql? ( virtual/mysql ) + mysql? ( dev-db/mysql-connector-c ) + mariadb? ( dev-db/mariadb-connector-c ) njb? ( media-libs/libnjb ) opengl? ( virtual/opengl ) postgres? ( dev-db/postgresql:= ) @@ -65,6 +66,15 @@ 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() { TRINITY_EXTRAGEAR_PACKAGING="yes" local mycmakeargs=( @@ -80,13 +90,17 @@ src_configure() { -DWITH_KONQSIDEBAR="$(usex konqsidebar)" -DWITH_MP4V2="$(usex mp4)" -DWITH_MTP="$(usex mtp)" - -DWITH_MYSQL="$(usex mysql)" -DWITH_NJB="$(usex njb)" -DWITH_OPENGL="$(usex opengl)" -DWITH_POSTGRESQL="$(usex postgres)" -DWITH_LIBVISUAL="$(usex visualization)" -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 } diff --git a/trinity-apps/amarok/amarok-9999.ebuild b/trinity-apps/amarok/amarok-9999.ebuild index e5485a1e..cd59470a 100644 --- a/trinity-apps/amarok/amarok-9999.ebuild +++ b/trinity-apps/amarok/amarok-9999.ebuild @@ -22,7 +22,7 @@ HOMEPAGE="https://trinitydesktop.org/" LICENSE="|| ( GPL-2 GPL-3 )" SLOT="14" if [[ ${PV} != *9999* ]] ; then - KEYWORDS="~amd64 ~x86" + KEYWORDS="~amd64 ~x86" fi # Notes about the ebuild: @@ -37,10 +37,10 @@ fi # # - 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" -REQUIRED_USE="|| ( xine akode )" +REQUIRED_USE="|| ( xine akode ) mysql? ( !mariadb )" DEPEND=" dev-db/sqlite @@ -51,7 +51,8 @@ DEPEND=" ipod? ( media-libs/libgpod ) mp4? ( media-libs/libmp4v2 ) mtp? ( media-libs/libmtp ) - mysql? ( virtual/mysql ) + mysql? ( dev-db/mysql-connector-c ) + mariadb? ( dev-db/mariadb-connector-c ) njb? ( media-libs/libnjb ) opengl? ( virtual/opengl ) postgres? ( dev-db/postgresql:= ) @@ -63,6 +64,15 @@ 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() { local mycmakeargs=( -DWITH_SYSTEM_SQLITE=ON @@ -77,13 +87,17 @@ src_configure() { -DWITH_KONQSIDEBAR="$(usex konqsidebar)" -DWITH_MP4V2="$(usex mp4)" -DWITH_MTP="$(usex mtp)" - -DWITH_MYSQL="$(usex mysql)" -DWITH_NJB="$(usex njb)" -DWITH_OPENGL="$(usex opengl)" -DWITH_POSTGRESQL="$(usex postgres)" -DWITH_LIBVISUAL="$(usex visualization)" -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 } diff --git a/trinity-apps/amarok/metadata.xml b/trinity-apps/amarok/metadata.xml index 6910d56a..8f4f5a86 100644 --- a/trinity-apps/amarok/metadata.xml +++ b/trinity-apps/amarok/metadata.xml @@ -5,6 +5,7 @@ Enable support for common audio formats via media-libs/akode Enable support for downloading covers from amazon.com + Build with support for dev-db/mariadb-connector-c Enable support for iRiver devices access through media-libs/libifp Enable konqueror sidebar plugin Enable support for NJB (Creative) devices access through media-libs/libnjb -- cgit v1.2.1