Files
haikuports/kde-frameworks/sonnet/sonnet6-6.25.0.recipe
2026-04-14 06:49:11 +00:00

119 lines
3.1 KiB
Bash

SUMMARY="Multi-language spell checker"
DESCRIPTION="Sonnet is a plugin-based spell checking library for Qt-based \
applications. It supports several different plugins, including HSpell, \
Enchant, ASpell and HUNSPELL.
It also supports automated language detection, based on a combination of \
different algorithms.
The simplest way to use Sonnet in your application is to use the \
SpellCheckDecorator class on your QTextEdit."
HOMEPAGE="https://invent.kde.org/frameworks/sonnet"
COPYRIGHT="2010-2065 KDE Organisation"
LICENSE="GNU LGPL v2"
REVISION="1"
SOURCE_URI="https://download.kde.org/stable/frameworks/${portVersion%.*}/sonnet-${portVersion}.tar.xz"
CHECKSUM_SHA256="510521f1404914943b3141e0b111f2330bbeefdf40405f93c0cf7b84a8c1c589"
SOURCE_DIR="sonnet-$portVersion"
PATCHES="sonnet6-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
sonnet6$secondaryArchSuffix = $portVersion
cmd:parsetrigrams6$secondaryArchSuffix = $portVersion
lib:libKF6SonnetCore$secondaryArchSuffix = $libVersionCompat
lib:libKF6SonnetUi$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
aspell_en
haiku$secondaryArchSuffix
lib:libaspell$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:libhunspell_1.7$secondaryArchSuffix
lib:libQt6Core$secondaryArchSuffix
lib:libQt6Gui$secondaryArchSuffix
lib:libQt6Widgets$secondaryArchSuffix
"
PROVIDES_devel="
sonnet6${secondaryArchSuffix}_devel = $portVersion
devel:libKF6SonnetCore$secondaryArchSuffix = $libVersionCompat
devel:libKF6SonnetUi$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
sonnet6$secondaryArchSuffix == $portVersion base
"
ARCHITECTURES_doc="any"
PROVIDES_doc="
sonnet6_doc = $portVersion
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
extra_cmake_modules$secondaryArchSuffix >= $portVersion
qt6_tools${secondaryArchSuffix}_devel
devel:libaspell$secondaryArchSuffix
devel:libhunspell_1.7$secondaryArchSuffix
devel:libQt6Core$secondaryArchSuffix
devel:libQt6Qml$secondaryArchSuffix
"
BUILD_PREREQUIRES="
kde_qdoc_common
cmd:cmake
cmd:g++$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
TEST_REQUIRES="
qthaikuplugins$secondaryArchSuffix
"
BUILD()
{
export KDE_DOCS="`finddir B_SYSTEM_DATA_DIRECTORY`"/kde-qdoc-common
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release \
$cmakeDirArgs \
-DCMAKE_SKIP_RPATH=YES \
-DBUILD_TESTING=OFF \
-Wno-dev
make -C build $jobArgs
cmake --build build --target prepare_docs
cmake --build build --target generate_docs
cmake --build build --target generate_qch
}
INSTALL()
{
make -C build install
# cmake --build build --target install_html_docs
cmake --build build --target install_qch_docs
prepareInstalledDevelLibs \
libKF6SonnetCore \
libKF6SonnetUi
packageEntries devel \
$developDir \
$libDir/cmake
packageEntries doc \
$documentationDir
}
TEST()
{
# 83% tests passed, 1 tests failed out of 6
export LIBRARY_PATH="$sourceDir/build/bin${LIBRARY_PATH:+:$LIBRARY_PATH}"
ctest --test-dir build --output-on-failure
}