From 6a99a48c070d09d4bcaa30fe75f1eaaa95b1071b Mon Sep 17 00:00:00 2001
From: j1nx
Date: Thu, 10 Jun 2021 14:45:30 +0200
Subject: [PATCH] Switch skill-weather over to ovos version
---
.../mycroft-skill-weather/0001-PR160.patch | 210 ------------------
.../package/mycroft-skill-weather/Config.in | 4 +-
.../mycroft-skill-weather.mk | 6 +-
3 files changed, 5 insertions(+), 215 deletions(-)
delete mode 100644 buildroot-external/package/mycroft-skill-weather/0001-PR160.patch
diff --git a/buildroot-external/package/mycroft-skill-weather/0001-PR160.patch b/buildroot-external/package/mycroft-skill-weather/0001-PR160.patch
deleted file mode 100644
index 253b2883..00000000
--- a/buildroot-external/package/mycroft-skill-weather/0001-PR160.patch
+++ /dev/null
@@ -1,210 +0,0 @@
-From 4980419c2cbc39c521e171d101a661ad9b21b057 Mon Sep 17 00:00:00 2001
-From: Aditya Mehra
-Date: Fri, 30 Apr 2021 15:47:51 +0530
-Subject: [PATCH 1/3] Fix text resizing issue remove autofit label
-
----
- ui/ForecastDelegate.qml | 13 +++++++++----
- ui/highlow.qml | 8 ++++++--
- ui/weather.qml | 3 ++-
- 3 files changed, 17 insertions(+), 7 deletions(-)
-
-diff --git a/ui/ForecastDelegate.qml b/ui/ForecastDelegate.qml
-index a4db1ce..a989714 100644
---- a/ui/ForecastDelegate.qml
-+++ b/ui/ForecastDelegate.qml
-@@ -30,27 +30,32 @@ WeatherDelegate {
- fillMode: Image.PreserveAspectFit
- running: true
- }
-- Mycroft.AutoFitLabel {
-+ Label {
- font.weight: Font.Bold
-- horizontalAlignment: Text.AlignLeft
-+ horizontalAlignment: Text.AlignHCenter
- Layout.fillWidth: true
- Layout.preferredHeight: proportionalGridUnit * 15
-+ font.pixelSize: parent.height * 0.50
- text: modelData.date
- }
-
-- Mycroft.AutoFitLabel {
-+ Label {
- font.weight: Font.Bold
- Layout.fillWidth: true
- Layout.preferredHeight: proportionalGridUnit * 20
- rightPadding: -font.pixelSize * 0.1
-+ font.pixelSize: parent.height * 0.50
-+ horizontalAlignment: Text.AlignHCenter
- text: modelData.max + "°"
- }
-
-- Mycroft.AutoFitLabel {
-+ Label {
- font.styleName: "Thin"
- Layout.fillWidth: true
- Layout.preferredHeight: proportionalGridUnit * 20
- rightPadding: -font.pixelSize * 0.1
-+ font.pixelSize: parent.height * 0.50
-+ horizontalAlignment: Text.AlignHCenter
- text: modelData.min + "°"
- }
- }
-diff --git a/ui/highlow.qml b/ui/highlow.qml
-index 60d638d..33e2030 100644
---- a/ui/highlow.qml
-+++ b/ui/highlow.qml
-@@ -9,23 +9,27 @@ import org.kde.lottie 1.0
- WeatherDelegate {
- id: root
-
-- Mycroft.AutoFitLabel {
-+ Label {
- id: maxTemp
- font.weight: Font.Bold
- Layout.fillWidth: true
- Layout.preferredHeight: proportionalGridUnit * 40
-+ font.pixelSize: parent.height * 0.50
- //The off-centering to balance the ° should be proportional as well, so we use the computed pixel size
- rightPadding: -font.pixelSize * 0.1
-+ horizontalAlignment: Text.AlignHCenter
- text: sessionData.max + "°"
- }
-
-- Mycroft.AutoFitLabel {
-+ Label {
- id: minTemp
- Layout.fillWidth: true
- Layout.preferredHeight: proportionalGridUnit * 40
-+ font.pixelSize: parent.height * 0.50
- rightPadding: -font.pixelSize * 0.1
- font.weight: Font.Thin
- font.styleName: "Thin"
-+ horizontalAlignment: Text.AlignHCenter
- text: sessionData.min + "°"
- }
- }
-diff --git a/ui/weather.qml b/ui/weather.qml
-index 0bd579a..a280a31 100644
---- a/ui/weather.qml
-+++ b/ui/weather.qml
-@@ -32,11 +32,12 @@ WeatherDelegate {
- }
- }
-
-- Mycroft.AutoFitLabel {
-+ Label {
- id: temperature
- font.weight: Font.Bold
- Layout.fillWidth: true
- Layout.preferredHeight: proportionalGridUnit * 40
-+ font.pixelSize: parent.height * 0.65
- rightPadding: -font.pixelSize * 0.1
- text: sessionData.current + "°"
- }
-
-From aeb638aed01b416b1caa1d7a2639554bb9f8bfb5 Mon Sep 17 00:00:00 2001
-From: Aditya Mehra
-Date: Fri, 30 Apr 2021 17:10:52 +0530
-Subject: [PATCH 2/3] make sure the background is black
-
----
- ui/WeatherDelegate.qml | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/ui/WeatherDelegate.qml b/ui/WeatherDelegate.qml
-index 9b37739..540d8c7 100644
---- a/ui/WeatherDelegate.qml
-+++ b/ui/WeatherDelegate.qml
-@@ -7,6 +7,7 @@ import Mycroft 1.0 as Mycroft
-
- Mycroft.ProportionalDelegate {
- id: root
-+ skillBackgroundColorOverlay: Qt.rgba(0, 0, 0, 1)
-
- function getWeatherImagery(weathercode) {
- switch(weathercode) {
-
-From 96ae297af370e4651ef8ead58b1033bb1a5153ab Mon Sep 17 00:00:00 2001
-From: Aditya Mehra
-Date: Tue, 4 May 2021 01:24:14 +0530
-Subject: [PATCH 3/3] fix scaling for forecast delegate and weather page text
- alignment
-
----
- ui/ForecastDelegate.qml | 19 ++++++++++---------
- ui/weather.qml | 1 +
- 2 files changed, 11 insertions(+), 9 deletions(-)
-
-diff --git a/ui/ForecastDelegate.qml b/ui/ForecastDelegate.qml
-index a989714..c16452f 100644
---- a/ui/ForecastDelegate.qml
-+++ b/ui/ForecastDelegate.qml
-@@ -14,15 +14,16 @@ WeatherDelegate {
- spacing: proportionalGridUnit * 10
- Repeater {
- id: forecastRepeater
-- model: sessionData.forecast.first
- delegate: GridLayout {
- columns: 2
- rowSpacing: proportionalGridUnit * 5
- columnSpacing: proportionalGridUnit * 5
- Layout.fillWidth: true
-+ Layout.fillHeight: true
-+
- LottieAnimation {
- Layout.alignment: Qt.AlignCenter
-- Layout.preferredHeight: proportionalGridUnit * 20
-+ Layout.preferredHeight: proportionalGridUnit * 30
- Layout.preferredWidth: Layout.preferredHeight
-
- source: Qt.resolvedUrl(getWeatherImagery(modelData.weathercode))
-@@ -34,17 +35,17 @@ WeatherDelegate {
- font.weight: Font.Bold
- horizontalAlignment: Text.AlignHCenter
- Layout.fillWidth: true
-- Layout.preferredHeight: proportionalGridUnit * 15
-- font.pixelSize: parent.height * 0.50
-+ Layout.preferredHeight: proportionalGridUnit * 30
-+ font.pixelSize: height * 0.90
- text: modelData.date
- }
-
- Label {
- font.weight: Font.Bold
- Layout.fillWidth: true
-- Layout.preferredHeight: proportionalGridUnit * 20
-+ Layout.preferredHeight: proportionalGridUnit * 30
- rightPadding: -font.pixelSize * 0.1
-- font.pixelSize: parent.height * 0.50
-+ font.pixelSize: height * 0.90
- horizontalAlignment: Text.AlignHCenter
- text: modelData.max + "°"
- }
-@@ -52,11 +53,11 @@ WeatherDelegate {
- Label {
- font.styleName: "Thin"
- Layout.fillWidth: true
-- Layout.preferredHeight: proportionalGridUnit * 20
-+ Layout.preferredHeight: proportionalGridUnit * 30
- rightPadding: -font.pixelSize * 0.1
-- font.pixelSize: parent.height * 0.50
-+ font.pixelSize: height * 0.90
- horizontalAlignment: Text.AlignHCenter
-- text: modelData.min + "°"
-+ text: modelData.min + "°"
- }
- }
- }
-diff --git a/ui/weather.qml b/ui/weather.qml
-index a280a31..1c7ce47 100644
---- a/ui/weather.qml
-+++ b/ui/weather.qml
-@@ -36,6 +36,7 @@ WeatherDelegate {
- id: temperature
- font.weight: Font.Bold
- Layout.fillWidth: true
-+ horizontalAlignment: Text.AlignHCenter
- Layout.preferredHeight: proportionalGridUnit * 40
- font.pixelSize: parent.height * 0.65
- rightPadding: -font.pixelSize * 0.1
diff --git a/buildroot-external/package/mycroft-skill-weather/Config.in b/buildroot-external/package/mycroft-skill-weather/Config.in
index 574f9e34..7fd91d27 100644
--- a/buildroot-external/package/mycroft-skill-weather/Config.in
+++ b/buildroot-external/package/mycroft-skill-weather/Config.in
@@ -1,7 +1,7 @@
config BR2_PACKAGE_MYCROFT_SKILL_WEATHER
bool "mycroft-skill-weather"
help
- Mycroft AI official Weather Skill, providing
+ OpenVoiceOS version of Weather Skill, providing
weather conditions and forecasts.
- https://github.com/MycroftAI/skill-weather
+ https://github.com/OpenVoiceOS/skill-weather
diff --git a/buildroot-external/package/mycroft-skill-weather/mycroft-skill-weather.mk b/buildroot-external/package/mycroft-skill-weather/mycroft-skill-weather.mk
index b9f99256..9fb6a220 100644
--- a/buildroot-external/package/mycroft-skill-weather/mycroft-skill-weather.mk
+++ b/buildroot-external/package/mycroft-skill-weather/mycroft-skill-weather.mk
@@ -4,11 +4,11 @@
#
################################################################################
-MYCROFT_SKILL_WEATHER_VERSION = b0194125e2e03d010949ed6c89a8cf9ce7931141
-MYCROFT_SKILL_WEATHER_SITE = git://github.com/MycroftAI/skill-weather
+MYCROFT_SKILL_WEATHER_VERSION = c0549cb6215d04504040810eb31dcd1198627fd1
+MYCROFT_SKILL_WEATHER_SITE = git://github.com/OpenVoiceOS/skill-weather
MYCROFT_SKILL_WEATHER_SITE_METHOD = git
MYCROFT_SKILL_WEATHER_DIRLOCATION = home/mycroft/.local/share/mycroft/skills
-MYCROFT_SKILL_WEATHER_DIRNAME = skill-weather.mycroftai
+MYCROFT_SKILL_WEATHER_DIRNAME = skill-weather.openvoiceos
define MYCROFT_SKILL_WEATHER_INSTALL_TARGET_CMDS
mkdir -p $(TARGET_DIR)/$(MYCROFT_SKILL_WEATHER_DIRLOCATION)/$(MYCROFT_SKILL_WEATHER_DIRNAME)