Files
haikuports/kde-apps/klettres/klettres-25.12.0.recipe
2025-12-22 11:33:32 +01:00

137 lines
4.3 KiB
Bash

SUMMARY="Learn the alphabet"
DESCRIPTION="KLettres is an application specially designed to help the user to learn an alphabet \
in a new language and then to learn to read simple syllables. The user can be a young child aged \
from two and a half or an adult that wants to learn the basics of a foreign language. There are \
currently 25 languages available: Arabian, Brazilian Portuguese, Czech, Danish, Dutch, British \
English, US English, Phonics English, French, German, Hebrew, Hungarian, Italian, Kannada, \
Low Saxon, Malayalam, Norwegian Bokmål, Punjabi, Luganda, Romanized Hindi, Russian, Spanish, \
Slovak, Telugu and Ukrainian.
KLettres provides a special user interface and themes for younger users."
HOMEPAGE="https://apps.kde.org/klettres/"
COPYRIGHT="2001-2011 Anne-Marie Mahfouf
2010-2025 KDE Organisation"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="https://download.kde.org/stable/release-service/$portVersion/src/klettres-$portVersion.tar.xz"
CHECKSUM_SHA256="3118dcd5fbe434581510a44c15a8d5e3d9f6efe819581ec35e7a178225044e97"
ADDITIONAL_FILES="klettres.rdef.in"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
klettres$secondaryArchSuffix = $portVersion
app:Klettres = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:libopenal$secondaryArchSuffix
lib:libphonon4qt6$secondaryArchSuffix
# KF6
lib:libKF6Attica$secondaryArchSuffix
lib:libKF6ColorScheme$secondaryArchSuffix
lib:libKF6ConfigCore$secondaryArchSuffix
lib:libKF6ConfigGui$secondaryArchSuffix
lib:libKF6ConfigWidgets$secondaryArchSuffix
lib:libKF6CoreAddons$secondaryArchSuffix
lib:libKF6Crash$secondaryArchSuffix
lib:libKF6GuiAddons$secondaryArchSuffix
lib:libKF6I18n$secondaryArchSuffix
lib:libKF6NewStuffCore$secondaryArchSuffix
lib:libKF6WidgetsAddons$secondaryArchSuffix
lib:libKF6XmlGui$secondaryArchSuffix
# Qt6
lib:libQt6Core$secondaryArchSuffix
lib:libQt6Gui$secondaryArchSuffix
lib:libQt6Multimedia$secondaryArchSuffix
lib:libQt6Network$secondaryArchSuffix
lib:libQt6Svg$secondaryArchSuffix
lib:libQt6Widgets$secondaryArchSuffix
lib:libQt6Xml$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libphonon4qt6$secondaryArchSuffix
# KF6
extra_cmake_modules$secondaryArchSuffix
devel:libKF6Attica$secondaryArchSuffix
devel:libKF6ColorScheme$secondaryArchSuffix
devel:libKF6ConfigCore$secondaryArchSuffix
devel:libKF6ConfigWidgets$secondaryArchSuffix
devel:libKF6CoreAddons$secondaryArchSuffix
devel:libKF6Crash$secondaryArchSuffix
devel:libKF6GuiAddons$secondaryArchSuffix
devel:libKF6I18n$secondaryArchSuffix
devel:libKF6NewStuffCore$secondaryArchSuffix
devel:libKF6WidgetsAddons$secondaryArchSuffix
devel:libKF6XmlGui$secondaryArchSuffix
# Qt6
devel:libQt6Core$secondaryArchSuffix
devel:libQt6Multimedia$secondaryArchSuffix
devel:libQt6Qml$secondaryArchSuffix
devel:libQt6Svg$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:g++$secondaryArchSuffix
cmd:make
cmd:msgfmt$secondaryArchSuffix
cmd:msgmerge$secondaryArchSuffix
cmd:pkg_config$secondaryArchSuffix
"
PATCH()
{
# disable docs generation
sed -e 's|DocTools||' -i CMakeLists.txt
sed -e '/ecm_optional_add_subdirectory( doc )/ s/^#*/#/' -i CMakeLists.txt
sed -e '/kdoctools_install(po)/ s/^#*/#/' -i CMakeLists.txt
}
BUILD()
{
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release \
$cmakeDirArgs \
-DCMAKE_INSTALL_BINDIR=$appsDir \
-DCMAKE_SKIP_RPATH=YES \
-DBUILD_TESTING=OFF \
-Wno-dev
make -C build $jobArgs
}
INSTALL()
{
make -C build install
# cleanup
rm -rf $dataDir/{applications,config.icons,kcfg,metainfo,knsrcfiles,qlogging-categories6}
mv $appsDir/klettres $appsDir/Klettres
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
local MINOR="`echo "$portVersion" | cut -d. -f3`"
local APP_NAME="Klettres"
local LONG_INFO="$SUMMARY"
local APP_SIGNATURE="application/x-vnd.kde-klettres"
sed \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
-e "s|@MINOR@|$MINOR|" \
-e "s|@LONG_INFO@|$LONG_INFO|" \
-e "s|@APP_NAME@|$APP_NAME|" \
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
$portDir/additional-files/klettres.rdef.in > klettres.rdef
addResourcesToBinaries klettres.rdef $appsDir/Klettres
addAppDeskbarSymlink $appsDir/Klettres
}
TEST()
{
ctest --test-dir build --output-on-failure
}