commit:     4256c550991105e8ad7d9d6f1782706118c14327
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue May  4 14:59:17 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue May  4 15:56:19 2021 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=4256c550

kde-plasma/plasma-workspace: Rename IUSE=qalculate -> calculator

As discussed on https://bugs.kde.org/show_bug.cgi?id=433730 rather
than having bad floating point precision, we should build calculator
runner conditionally on qalculate.

Based on work by Zoltan Puskas but solved without using patch that is
not yet filed upstream.

Package-Manager: Portage-3.0.18, Repoman-3.0.3
Thanks-to: Zoltan Puskas <zoltan <AT> sinustrom.info>
Closes: https://github.com/gentoo/kde/pull/901
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 kde-plasma/plasma-workspace/metadata.xml            |  2 +-
 .../plasma-workspace-5.21.49.9999.ebuild            | 15 +++++++++------
 .../plasma-workspace/plasma-workspace-9999.ebuild   | 21 ++++++++++++---------
 3 files changed, 22 insertions(+), 16 deletions(-)

diff --git a/kde-plasma/plasma-workspace/metadata.xml 
b/kde-plasma/plasma-workspace/metadata.xml
index 599877f90b..2bd7fc185c 100644
--- a/kde-plasma/plasma-workspace/metadata.xml
+++ b/kde-plasma/plasma-workspace/metadata.xml
@@ -7,8 +7,8 @@
        </maintainer>
        <use>
                <flag name="appstream">Enable AppStream software metadata 
support</flag>
+               <flag name="calculator">Enable calculator runner using 
<pkg>sci-libs/libqalculate</pkg></flag>
                <flag name="geolocation">Enables dataengine providing location 
information</flag>
-               <flag name="qalculate">Enable Qalculate runner using 
<pkg>sci-libs/libqalculate</pkg></flag>
                <flag name="screencast">Enable screencast portal using 
<pkg>media-video/pipewire</pkg></flag>
                <flag name="telemetry">Enable User Feedback control module for 
<pkg>kde-plasma/systemsettings</pkg></flag>
        </use>

diff --git a/kde-plasma/plasma-workspace/plasma-workspace-5.21.49.9999.ebuild 
b/kde-plasma/plasma-workspace/plasma-workspace-5.21.49.9999.ebuild
index 03cc7cf68a..2c81fd4458 100644
--- a/kde-plasma/plasma-workspace/plasma-workspace-5.21.49.9999.ebuild
+++ b/kde-plasma/plasma-workspace/plasma-workspace-5.21.49.9999.ebuild
@@ -16,12 +16,12 @@ DESCRIPTION="KDE Plasma workspace"
 LICENSE="GPL-2" # TODO: CHECK
 SLOT="5"
 KEYWORDS=""
-IUSE="appstream +calendar +fontconfig geolocation gps qalculate screencast 
+semantic-desktop systemd telemetry"
+IUSE="appstream +calculator +calendar +fontconfig geolocation gps screencast
++semantic-desktop systemd telemetry"
 
 REQUIRED_USE="gps? ( geolocation )"
 RESTRICT+=" test"
 
-BDEPEND="virtual/pkgconfig"
 COMMON_DEPEND="
        >=dev-libs/wayland-1.15
        >=dev-qt/qtdbus-${QTMIN}:5
@@ -93,6 +93,7 @@ COMMON_DEPEND="
        x11-libs/xcb-util
        x11-libs/xcb-util-image
        appstream? ( dev-libs/appstream[qt5] )
+       calculator? ( sci-libs/libqalculate:= )
        calendar? ( >=kde-frameworks/kholidays-${KFMIN}:5 )
        fontconfig? (
                media-libs/fontconfig
@@ -102,7 +103,6 @@ COMMON_DEPEND="
        )
        geolocation? ( >=kde-frameworks/networkmanager-qt-${KFMIN}:5 )
        gps? ( sci-geosciences/gpsd )
-       qalculate? ( sci-libs/libqalculate:= )
        screencast? (
                >=media-video/pipewire-0.3:=
                x11-libs/libdrm
@@ -138,6 +138,7 @@ RDEPEND="${COMMON_DEPEND}
        !systemd? ( sys-apps/dbus )
        !<kde-plasma/plasma-desktop-5.19.80:5
 "
+BDEPEND="virtual/pkgconfig"
 PDEPEND="
        >=kde-plasma/kde-cli-tools-${PVCUT}:5
 "
@@ -155,9 +156,12 @@ src_prepare() {
 
        # TODO: try to get a build switch upstreamed
        if ! use screencast; then
-               sed -e "s/^pkg_check_modules.*PipeWire/#&/" \
-                       -i CMakeLists.txt || die
+               sed -e "s/^pkg_check_modules.*PipeWire/#&/" -i CMakeLists.txt 
|| die
        fi
+
+       # KDE-bug: 433730
+       use calculator ||
+               cmake_run_in runners cmake_comment_add_subdirectory calculator
 }
 
 src_configure() {
@@ -167,7 +171,6 @@ src_configure() {
                $(cmake_use_find_package calendar KF5Holidays)
                $(cmake_use_find_package fontconfig Fontconfig)
                $(cmake_use_find_package geolocation KF5NetworkManagerQt)
-               $(cmake_use_find_package qalculate Qalculate)
                $(cmake_use_find_package semantic-desktop KF5Baloo)
                $(cmake_use_find_package telemetry KUserFeedback)
        )

diff --git a/kde-plasma/plasma-workspace/plasma-workspace-9999.ebuild 
b/kde-plasma/plasma-workspace/plasma-workspace-9999.ebuild
index e7dd9eca29..688b19a65a 100644
--- a/kde-plasma/plasma-workspace/plasma-workspace-9999.ebuild
+++ b/kde-plasma/plasma-workspace/plasma-workspace-9999.ebuild
@@ -16,15 +16,12 @@ DESCRIPTION="KDE Plasma workspace"
 LICENSE="GPL-2" # TODO: CHECK
 SLOT="5"
 KEYWORDS=""
-IUSE="appstream +calendar +fontconfig geolocation gps qalculate screencast 
+semantic-desktop systemd telemetry"
+IUSE="appstream +calculator +calendar +fontconfig geolocation gps screencast
++semantic-desktop systemd telemetry"
 
 REQUIRED_USE="gps? ( geolocation )"
 RESTRICT+=" test"
 
-BDEPEND="
-       >=dev-util/cmake-3.14
-       virtual/pkgconfig
-"
 COMMON_DEPEND="
        >=dev-libs/wayland-1.15
        >=dev-qt/qtdbus-${QTMIN}:5
@@ -99,6 +96,7 @@ COMMON_DEPEND="
        x11-libs/xcb-util
        x11-libs/xcb-util-image
        appstream? ( dev-libs/appstream[qt5] )
+       calculator? ( sci-libs/libqalculate:= )
        calendar? ( >=kde-frameworks/kholidays-${KFMIN}:5 )
        fontconfig? (
                >=dev-qt/qtprintsupport-${QTMIN}:5
@@ -108,7 +106,6 @@ COMMON_DEPEND="
        )
        geolocation? ( >=kde-frameworks/networkmanager-qt-${KFMIN}:5 )
        gps? ( sci-geosciences/gpsd )
-       qalculate? ( sci-libs/libqalculate:= )
        screencast? (
                >=media-video/pipewire-0.3:=
                x11-libs/libdrm
@@ -144,6 +141,10 @@ RDEPEND="${COMMON_DEPEND}
        !systemd? ( sys-apps/dbus )
        !<kde-plasma/plasma-desktop-5.19.80:5
 "
+BDEPEND="
+       >=dev-util/cmake-3.14
+       virtual/pkgconfig
+"
 PDEPEND="
        >=kde-plasma/kde-cli-tools-${PVCUT}:5
 "
@@ -161,9 +162,12 @@ src_prepare() {
 
        # TODO: try to get a build switch upstreamed
        if ! use screencast; then
-               sed -e "s/^pkg_check_modules.*PipeWire/#&/" \
-                       -i CMakeLists.txt || die
+               sed -e "s/^pkg_check_modules.*PipeWire/#&/" -i CMakeLists.txt 
|| die
        fi
+
+       # KDE-bug: 433730
+       use calculator ||
+               cmake_run_in runners cmake_comment_add_subdirectory calculator
 }
 
 src_configure() {
@@ -173,7 +177,6 @@ src_configure() {
                $(cmake_use_find_package calendar KF5Holidays)
                $(cmake_use_find_package fontconfig Fontconfig)
                $(cmake_use_find_package geolocation KF5NetworkManagerQt)
-               $(cmake_use_find_package qalculate Qalculate)
                $(cmake_use_find_package semantic-desktop KF5Baloo)
                $(cmake_use_find_package telemetry KUserFeedback)
        )

Reply via email to