-
Notifications
You must be signed in to change notification settings - Fork 310
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add KF6 frameworks, sonnet6 (#10508)
- Loading branch information
Showing
2 changed files
with
151 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
From 13771097640cdc547651e942920871e439b380aa Mon Sep 17 00:00:00 2001 | ||
From: Gerasim Troeglazov <3dEyes@gmail.com> | ||
Date: Sat, 2 Mar 2019 23:57:01 +1000 | ||
Subject: Add hunspell dictionary paths for Haiku | ||
|
||
|
||
diff --git a/src/plugins/hunspell/hunspellclient.cpp b/src/plugins/hunspell/hunspellclient.cpp | ||
index b9359f8..b63bba3 100644 | ||
--- a/src/plugins/hunspell/hunspellclient.cpp | ||
+++ b/src/plugins/hunspell/hunspellclient.cpp | ||
@@ -36,6 +36,9 @@ HunspellClient::HunspellClient(QObject *parent) | ||
}; | ||
#ifdef Q_OS_WIN | ||
maybeAddPath(QStringLiteral(SONNET_INSTALL_PREFIX "/bin/data/hunspell/")); | ||
+#elif defined(Q_OS_HAIKU) | ||
+ maybeAddPath(QStringLiteral("/system/data/hunspell/")); | ||
+ maybeAddPath(QStringLiteral("~/config/non-packaged/data/hunspell/")); | ||
#else | ||
maybeAddPath(QStringLiteral("/System/Library/Spelling")); | ||
maybeAddPath(QStringLiteral("/usr/share/hunspell/")); | ||
-- | ||
2.43.2 | ||
|
||
|
||
From ca6c9701c46391d7394954447893fc947ce91808 Mon Sep 17 00:00:00 2001 | ||
From: Gerasim Troeglazov <3dEyes@gmail.com> | ||
Date: Mon, 14 Dec 2020 16:14:26 +0300 | ||
Subject: Set en_US as default language | ||
|
||
|
||
diff --git a/src/core/settings.cpp b/src/core/settings.cpp | ||
index cb792ab..216427a 100644 | ||
--- a/src/core/settings.cpp | ||
+++ b/src/core/settings.cpp | ||
@@ -324,7 +324,7 @@ bool Settings::defauktSkipRunTogether() | ||
|
||
QString Settings::defaultDefaultLanguage() | ||
{ | ||
- return QLocale::system().name(); | ||
+ return QStringLiteral("en_US"); | ||
} | ||
|
||
QStringList Settings::defaultPreferredLanguages() | ||
-- | ||
2.43.2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
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-2024 KDE Organisation" | ||
LICENSE="GNU LGPL v2" | ||
REVISION="1" | ||
SOURCE_URI="https://download.kde.org/stable/frameworks/${portVersion%.*}/sonnet-${portVersion}.tar.xz" | ||
CHECKSUM_SHA256="84e712ad56bc94ff8efc9bddfab41f6c327121b3ddd69030e940acc9133627ed" | ||
SOURCE_DIR="sonnet-$portVersion" | ||
PATCHES="sonnet-$portVersion.patchset" | ||
|
||
ARCHITECTURES="all !x86_gcc2" | ||
SECONDARY_ARCHITECTURES="x86" | ||
|
||
libVersion="$portVersion" | ||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}" | ||
|
||
PROVIDES=" | ||
sonnet6$secondaryArchSuffix = $portVersion | ||
cmd:gentrigrams$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: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 | ||
" | ||
|
||
BUILD_REQUIRES=" | ||
haiku${secondaryArchSuffix}_devel | ||
extra_cmake_modules$secondaryArchSuffix >= $portVersion | ||
qt6_tools${secondaryArchSuffix}_devel | ||
devel:libaspell$secondaryArchSuffix | ||
devel:libQt6Core$secondaryArchSuffix | ||
devel:libQt6Qml$secondaryArchSuffix | ||
" | ||
BUILD_PREREQUIRES=" | ||
cmd:cmake | ||
cmd:dot | ||
cmd:doxygen >= 1.9 | ||
cmd:g++$secondaryArchSuffix | ||
cmd:make | ||
" | ||
|
||
TEST_REQUIRES=" | ||
qthaikuplugins$secondaryArchSuffix | ||
" | ||
|
||
BUILD() | ||
{ | ||
cmake -Bbuild -S. $cmakeDirArgs \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DKDE_INSTALL_PLUGINDIR=$addOnsDir/Qt6 \ | ||
-DKDE_INSTALL_QMLDIR=$dataDir/Qt6/qml \ | ||
-DKDE_INSTALL_PLUGINDIR=$addOnsDir/Qt6 \ | ||
-DKDE_INSTALL_QTPLUGINDIR=$addOnsDir/Qt6 \ | ||
-DECM_DIR=/system/data/cmake/Modules/ECM/cmake \ | ||
-DBUILD_QCH=ON \ | ||
-DBUILD_TESTING=OFF | ||
make -Cbuild $jobArgs | ||
} | ||
|
||
INSTALL() | ||
{ | ||
make -Cbuild install | ||
|
||
prepareInstalledDevelLibs \ | ||
libKF6SonnetCore \ | ||
libKF6SonnetUi | ||
|
||
packageEntries devel \ | ||
$developDir \ | ||
$dataDir/doc \ | ||
$libDir/cmake | ||
} | ||
|
||
TEST() | ||
{ | ||
# 83% tests passed, 1 tests failed out of 6 | ||
export LIBRARY_PATH="$sourceDir/build/bin${LIBRARY_PATH:+:$LIBRARY_PATH}" | ||
make -Cbuild test | ||
} |