1 # Copyright 1999-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
8 ECM_HANDBOOK
="optional"
12 inherit ecm gear.kde.org
14 DESCRIPTION
="KDE calculator"
15 HOMEPAGE
="https://apps.kde.org/amarok/"
17 LICENSE
="GPL-2" # TODO: CHECK
19 KEYWORDS
="~amd64 ~arm64 ~ppc64 ~riscv ~x86"
20 IUSE
="ipod lastfm mtp +mariadb wikipedia qt5 qt6 podcast"
24 REQUIRED_USE
="^^ ( qt5 qt6 )"
26 SRC_URI
="https://invent.kde.org/multimedia/${PN}/-/archive/v${PV}/${PN}-v${PV}.tar.bz2"
31 media-libs/taglib-extras
33 media-libs/phonon[qt5?,qt6?]
38 >=dev-qt/qtbase-${QTMIN}:6[gui,widgets,xml]
39 dev-qt/qtdeclarative:6
40 >=kde-frameworks/karchive-${KFMIN}:6
41 >=kde-frameworks/kcodecs-${KFMIN}:6
42 >=kde-frameworks/kconfig-${KFMIN}:6
43 >=kde-frameworks/kconfigwidgets-${KFMIN}:6
44 >=kde-frameworks/kcoreaddons-${KFMIN}:6
45 >=kde-frameworks/kcrash-${KFMIN}:6
46 >=kde-frameworks/kdbusaddons-${KFMIN}:6
47 >=kde-frameworks/kdeclarative-${KFMIN}:6
48 >=kde-frameworks/kdnssd-${KFMIN}:6
49 >=kde-frameworks/kdoctools-${KFMIN}:6
50 >=kde-frameworks/kglobalaccel-${KFMIN}:6
51 >=kde-frameworks/kguiaddons-${KFMIN}:6
52 >=kde-frameworks/ki18n-${KFMIN}:6
53 >=kde-frameworks/kiconthemes-${KFMIN}:6
54 >=kde-frameworks/kcmutils-${KFMIN}:6
55 >=kde-frameworks/kio-${KFMIN}:6
56 >=kde-frameworks/knotifications-${KFMIN}:6
57 >=kde-frameworks/kpackage-${KFMIN}:6
58 >=kde-frameworks/solid-${KFMIN}:6
59 >=kde-frameworks/ktexteditor-${KFMIN}:6
60 >=kde-frameworks/threadweaver-${KFMIN}:6
61 >=kde-frameworks/kwidgetsaddons-${KFMIN}:6
62 >=kde-frameworks/kwindowsystem-${KFMIN}:6
64 kde-frameworks/kcolorscheme:6
65 kde-frameworks/kirigami:6
66 kde-frameworks/kstatusnotifieritem:6
73 dev-qt/qtdeclarative:5
79 kde-frameworks/karchive:5
80 kde-frameworks/kcodecs:5
81 kde-frameworks/kconfig:5
82 kde-frameworks/kconfigwidgets:5
83 kde-frameworks/kcoreaddons:5
84 kde-frameworks/kcrash:5
85 kde-frameworks/kdbusaddons:5
86 kde-frameworks/kdeclarative:5
87 kde-frameworks/kdnssd:5
88 kde-frameworks/kdoctools:5
89 kde-frameworks/kglobalaccel:5
90 kde-frameworks/kguiaddons:5
91 kde-frameworks/ki18n:5
92 kde-frameworks/kiconthemes:5
93 kde-frameworks/kcmutils:5
95 kde-frameworks/knotifications:5
96 kde-frameworks/kpackage:5
97 kde-frameworks/solid:5
98 kde-frameworks/ktexteditor:5
99 kde-frameworks/threadweaver:5
100 kde-frameworks/kwidgetsaddons:5
101 kde-frameworks/kwindowsystem:5
103 kde-frameworks/kirigami:5
105 ipod? ( media-libs/libmygpo-qt )
115 S
="${WORKDIR}/${PN}-v${PV}"
119 -DBUILD_WITH_QT6=$
(usex qt6
)
123 -DCMAKE_DISABLE_FIND_PACKAGE_Googlemock=ON
124 -DCMAKE_DISABLE_FIND_PACKAGE_LibOFA=ON
125 -DCMAKE_DISABLE_FIND_PACKAGE_MySQLe=ON
126 -DWITH_IPOD=$
(usex ipod
)
128 $
(cmake_use_find_package lastfm LibLastFm
)
129 # $(cmake_use_find_package !mariadb MySQL)
130 $
(cmake_use_find_package mtp Mtp
)
131 $
(cmake_use_find_package wikipedia Qt6WebEngineWidgets
)
133 use ipod
&& mycmakeargs
+=( DWITH_GDKPixBuf
=ON
)
134 use qt5
&& use podcast
&& mycmakeargs
+=( $
(cmake_use_find_package podcast Mygpo-qt5
) )
143 echo "${1} ($(has_version ${1} || echo "not
")installed)"
147 use mariadb
&& echo "MariaDB" ||
echo "MySQL"
150 optfeature
"Audio CD support" "kde-apps/audiocd-kio:6"
152 if [[ -z ${REPLACING_VERSIONS} ]]; then
153 elog
"You must configure ${PN} to use an external database server."
154 elog
" 1. Make sure either MySQL or MariaDB is installed and configured"
155 elog
" Checking local system:"
156 elog
" $(pkg_is_installed dev-db/mariadb)"
157 elog
" $(pkg_is_installed dev-db/mysql)"
158 elog
" For preliminary configuration of $(db_name) Server refer to"
159 elog
" https://wiki.gentoo.org/wiki/$(db_name)#Configuration"
160 elog
" 2. Ensure 'mysql' service is started and run:"
161 elog
" # emerge --config amarok"
162 elog
" 3. Run ${PN} and go to 'Configure Amarok - Database' menu page"
163 elog
" Check 'Use external MySQL database' and press OK"
165 elog
"For more information please read:"
166 elog
" https://community.kde.org/Amarok/Community/MySQL"
171 # Create external mysql database with amarok default user/password
172 local AMAROK_DB_NAME
="amarokdb"
173 local AMAROK_DB_USER_NAME
="amarokuser"
174 local AMAROK_DB_USER_PWD
="password"
176 einfo
"Initializing ${PN} MySQL database 'amarokdb':"
177 einfo
"If prompted for a password, please enter your MySQL root password."
180 if [[ -e "${EROOT}"/usr
/bin
/mysql
]]; then
181 "${EROOT}"/usr/bin/mysql -u root -p -e "CREATE DATABASE IF NOT EXISTS ${AMAROK_DB_NAME}; GRANT ALL PRIVILEGES ON ${AMAROK_DB_NAME}.* TO '${AMAROK_DB_USER_NAME}' IDENTIFIED BY '${AMAROK_DB_USER_PWD}'; FLUSH PRIVILEGES;"
183 einfo
"${PN} MySQL database 'amarokdb' successfully initialized!"