Files
haikuports/kde-apps/libkgapi/libkgapi_kf6-25.08.3.recipe
2025-12-21 07:59:41 +01:00

171 lines
5.2 KiB
Bash

SUMMARY="A KDE-based library for accessing various Google services via their public API"
DESCRIPTION="LibKGAPI (previously called LibKGoogle) is a C++ library that implements APIs for \
various Google services.
Currently supported APIs:
* Calendar API v3 (https://developers.google.com/google-apps/calendar)
* Contacts API v3 (https://developers.google.com/google-apps/contacts/v3/)
* Tasks API v1 (https://developers.google.com/google-apps/tasks)
* Static Google Maps API v2 (https://developers.google.com/maps/documentation/staticmaps/)
* Drive API v2 (https://developers.google.com/drive/v2/reference)
* Blogger API v3 (https://developers.google.com/blogger/docs/3.0/reference/)
Deprecated APIs:
* Latitude API v1 (https://developers.google.com/latitude/v1/)."
HOMEPAGE="https://community.kde.org/KDE_PIM"
COPYRIGHT="2010-2025 KDE Organisation"
LICENSE="GNU LGPL v2.1"
REVISION="1"
SOURCE_URI="https://download.kde.org/stable/release-service/$portVersion/src/libkgapi-$portVersion.tar.xz"
CHECKSUM_SHA256="5a6590da04cf4a0c3b53f2a0c7d7c97cdf57f63854a0a4978c0859243bfbd15e"
SOURCE_DIR="libkgapi-$portVersion"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
libVersion="6.5.3"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
libkgapi_kf6$secondaryArchSuffix = $portVersion
lib:libKPim6GAPIBlogger$secondaryArchSuffix = $libVersionCompat
lib:libKPim6GAPICalendar$secondaryArchSuffix = $libVersionCompat
lib:libKPim6GAPICore$secondaryArchSuffix = $libVersionCompat
lib:libKPim6GAPIDrive$secondaryArchSuffix = $libVersionCompat
lib:libKPim6GAPILatitude$secondaryArchSuffix = $libVersionCompat
lib:libKPim6GAPIMaps$secondaryArchSuffix = $libVersionCompat
lib:libKPim6GAPIPeople$secondaryArchSuffix = $libVersionCompat
lib:libKPim6GAPITasks$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:libsasl2$secondaryArchSuffix
# KF6
lib:libKF6CalendarCore$secondaryArchSuffix
lib:libKF6Codecs$secondaryArchSuffix
lib:libKF6ConfigCore$secondaryArchSuffix
lib:libKF6Contacts$secondaryArchSuffix
lib:libKF6CoreAddons$secondaryArchSuffix
lib:libKF6Wallet$secondaryArchSuffix
# Qt6
lib:libQt6Core$secondaryArchSuffix
lib:libQt6DBus$secondaryArchSuffix
lib:libQt6Gui$secondaryArchSuffix
lib:libQt6Network$secondaryArchSuffix
lib:libQt6Widgets$secondaryArchSuffix
lib:libQt6Xml$secondaryArchSuffix
"
CONFLICTS="
libkgapi24$secondaryArchSuffix
"
PROVIDES_devel="
libkgapi_kf6${secondaryArchSuffix}_devel = $portVersion
devel:libKPim6GAPIBlogger$secondaryArchSuffix = $libVersionCompat
devel:libKPim6GAPICalendar$secondaryArchSuffix = $libVersionCompat
devel:libKPim6GAPICore$secondaryArchSuffix = $libVersionCompat
devel:libKPim6GAPIDrive$secondaryArchSuffix = $libVersionCompat
devel:libKPim6GAPILatitude$secondaryArchSuffix = $libVersionCompat
devel:libKPim6GAPIMaps$secondaryArchSuffix = $libVersionCompat
devel:libKPim6GAPIPeople$secondaryArchSuffix = $libVersionCompat
devel:libKPim6GAPITasks$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
libkgapi_kf6$secondaryArchSuffix == $portVersion base
"
PROVIDES_doc="
libkgapi_kf6_doc = $portVersion
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libsasl2$secondaryArchSuffix
# KF6
extra_cmake_modules$secondaryArchSuffix
devel:libKF6AuthCore$secondaryArchSuffix
devel:libKF6CalendarCore$secondaryArchSuffix
devel:libKF6Codecs$secondaryArchSuffix
devel:libKF6ConfigCore$secondaryArchSuffix
devel:libKF6ConfigWidgets$secondaryArchSuffix
devel:libKF6Contacts$secondaryArchSuffix
devel:libKF6CoreAddons$secondaryArchSuffix
devel:libKF6I18n$secondaryArchSuffix
devel:libKF6IconThemes$secondaryArchSuffix
devel:libKF6SonnetCore$secondaryArchSuffix
devel:libKF6TextWidgets$secondaryArchSuffix
devel:libKF6Wallet$secondaryArchSuffix
devel:libKF6WidgetsAddons$secondaryArchSuffix
# Qt6
devel:libQt6Core$secondaryArchSuffix
devel:libQt6DBus$secondaryArchSuffix
devel:libQt6Gui$secondaryArchSuffix
devel:libQt6Network$secondaryArchSuffix
devel:libQt6Qml$secondaryArchSuffix
devel:libQt6UiTools$secondaryArchSuffix
devel:libQt6Widgets$secondaryArchSuffix
devel:libQt6Xml$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:dot
cmd:doxygen
cmd:g++$secondaryArchSuffix
cmd:ninja
cmd:msgfmt$secondaryArchSuffix
cmd:msgmerge$secondaryArchSuffix
cmd:pkg_config$secondaryArchSuffix
"
TEST_REQUIRES="
qthaikuplugins$secondaryArchSuffix
"
PATCH()
{
sed -e 's|6.8.0|6.7.2|' -i CMakeLists.txt
}
BUILD()
{
export LDFLAGS="-lnetwork"
cmake -B build -S . -G Ninja -DCMAKE_BUILD_TYPE=Release \
$cmakeDirArgs \
-DCMAKE_SKIP_RPATH=YES \
-DBUILD_QCH=ON \
-DBUILD_TESTING=OFF \
-Wno-dev
ninja -v -C build $jobArgs
}
INSTALL()
{
ninja -C build install
prepareInstalledDevelLibs \
libKPim6GAPIBlogger \
libKPim6GAPICalendar \
libKPim6GAPICore \
libKPim6GAPIDrive \
libKPim6GAPILatitude \
libKPim6GAPIMaps \
libKPim6GAPIPeople \
libKPim6GAPITasks
packageEntries devel \
$developDir \
$libDir/cmake
packageEntries doc \
$documentationDir
}
TEST()
{
# 94% tests passed, 3 tests failed out of 49
export LIBRARY_PATH="$sourceDir/build/bin${LIBRARY_PATH:+:$LIBRARY_PATH}"
ctest --test-dir build --output-on-failure
}