kweathercore, add KF5/KF6 recipe (#10646)

This commit is contained in:
Schrijvers Luc
2024-06-29 10:20:17 +02:00
committed by GitHub
parent 13b492c797
commit 1665fab05c
2 changed files with 185 additions and 0 deletions

View File

@@ -0,0 +1,93 @@
SUMMARY="Retrieve weather information including forecasts and alerts"
DESCRIPTION="Get weather forecast and alerts anywhere on the earth easy.
KWeatherCore provides you a highly abstracted library for things related to weather.
Features:
* Get local weather forecast.
* Get weather of a location by name or coordinate.
* Weather alerts of a country (ToDo)."
HOMEPAGE="https://invent.kde.org/libraries/kweathercore"
COPYRIGHT="2010-2023 KDE Organisation"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="$HOMEPAGE/-/archive/v$portVersion/kweathercore-v$portVersion.tar.bz2"
CHECKSUM_SHA256="38ad4d9a3bbac5f4ea51c63d00f5f37c20a537bcad42c7ce7e793286f86c6a66"
SOURCE_DIR="kweathercore-v$portVersion"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
libVersion="0.7.0"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
kweathercore$secondaryArchSuffix = $portVersion
lib:libKF5KWeatherCore$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
# KF5
lib:libKF5Holidays$secondaryArchSuffix
lib:libKF5I18n$secondaryArchSuffix
# Qt5
lib:libQt5Core$secondaryArchSuffix
lib:libQt5Network$secondaryArchSuffix
lib:libQt5Positioning$secondaryArchSuffix
"
PROVIDES_devel="
kweathercore${secondaryArchSuffix}_devel = $portVersion
devel:libKF5KWeatherCore$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
kweathercore$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
# KF5
extra_cmake_modules$secondaryArchSuffix >= 6.0.0
devel:libKF5Holidays$secondaryArchSuffix
devel:libKF5I18n$secondaryArchSuffix
# Qt5
devel:libQt5Core$secondaryArchSuffix
devel:libQt5Network$secondaryArchSuffix
devel:libQt5Positioning$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:g++$secondaryArchSuffix
cmd:make
cmd:msgfmt
cmd:msgmerge
cmd:pkg_config$secondaryArchSuffix
cmd:qdbuscpp2xml$secondaryArchSuffix >= 5
"
BUILD()
{
cmake -Bbuild -S. $cmakeDirArgs \
-DCMAKE_BUILD_TYPE=Release \
-DECM_MKSPECS_INSTALL_DIR=$dataDir/Qt5/mkspecs \
-DECM_DIR=/system/data/cmake/Modules/ECM/cmake
make -C build $jobArgs
}
INSTALL()
{
make -C build install
prepareInstalledDevelLib \
libKF5KWeatherCore
packageEntries devel \
$libDir/cmake \
$dataDir/Qt5 \
$developDir
}
TEST()
{
# 88% tests passed, 1 tests failed out of 8
export LIBRARY_PATH="$sourceDir/build/bin${LIBRARY_PATH:+:$LIBRARY_PATH}"
ctest --test-dir build --output-on-failure
}

View File

@@ -0,0 +1,92 @@
SUMMARY="Retrieve weather information including forecasts and alerts"
DESCRIPTION="Get weather forecast and alerts anywhere on the earth easy.
KWeatherCore provides you a highly abstracted library for things related to weather.
Features:
* Get local weather forecast.
* Get weather of a location by name or coordinate.
* Weather alerts of a country (ToDo)."
HOMEPAGE="https://invent.kde.org/libraries/kweathercore"
COPYRIGHT="2010-2024 KDE Organisation"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="$HOMEPAGE/-/archive/v$portVersion/kweathercore-v$portVersion.tar.bz2"
CHECKSUM_SHA256="db2b26b104c6bf7296802f8db27af9264d541f8fea3760266cb400d84aeb2ea0"
SOURCE_DIR="kweathercore-v$portVersion"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
kweathercore_kf6$secondaryArchSuffix = $portVersion
lib:libKWeatherCore$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
# KF6
lib:libKF6Holidays$secondaryArchSuffix
lib:libKF6I18n$secondaryArchSuffix
# Qt6
lib:libQt6Core$secondaryArchSuffix
lib:libQt6Network$secondaryArchSuffix
lib:libQt6Positioning$secondaryArchSuffix
"
PROVIDES_devel="
kweathercore_kf6${secondaryArchSuffix}_devel = $portVersion
devel:libKWeatherCore$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
kweathercore_kf6$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
# KF6
extra_cmake_modules$secondaryArchSuffix >= 6.0.0
devel:libKF6Holidays$secondaryArchSuffix
devel:libKF6I18n$secondaryArchSuffix
# Qt6
devel:libQt6Core$secondaryArchSuffix
devel:libQt6Network$secondaryArchSuffix
devel:libQt6Positioning$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:g++$secondaryArchSuffix
cmd:make
cmd:msgfmt
cmd:msgmerge
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
cmake -Bbuild -S. $cmakeDirArgs \
-DCMAKE_BUILD_TYPE=Release \
-DECM_MKSPECS_INSTALL_DIR=$dataDir/Qt6/mkspecs \
-DECM_DIR=/system/data/cmake/Modules/ECM/cmake -Wno-dev
make -C build $jobArgs
}
INSTALL()
{
make -C build install
prepareInstalledDevelLib \
libKWeatherCore
packageEntries devel \
$developDir \
$dataDir/Qt6 \
$libDir/cmake
}
TEST()
{
# 88% tests passed, 1 tests failed out of 8
export LIBRARY_PATH="$sourceDir/build/bin${LIBRARY_PATH:+:$LIBRARY_PATH}"
make -C build test
}