From 7bbf7414f1cdac397215014ad601802e6201132179a1c5b4f5c26dd841ed235a Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan Date: Sat, 7 Mar 2015 18:12:19 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/sonnet?expand=0&rev=44 --- dictionary-locations.patch | 29 +++++++++++++++++++++++++++++ sonnet.changes | 4 ++++ sonnet.spec | 5 ++++- 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 dictionary-locations.patch diff --git a/dictionary-locations.patch b/dictionary-locations.patch new file mode 100644 index 0000000..b31e52a --- /dev/null +++ b/dictionary-locations.patch @@ -0,0 +1,29 @@ +diff --git a/src/plugins/hunspell/hunspellclient.cpp b/src/plugins/hunspell/hunspellclient.cpp +index 9e3aa67..bf2ca71 100644 +--- a/src/plugins/hunspell/hunspellclient.cpp ++++ b/src/plugins/hunspell/hunspellclient.cpp +@@ -46,7 +46,7 @@ SpellerPlugin *HunspellClient::createSpeller(const QString &language) + QStringList HunspellClient::languages() const + { + QStringList lst; +- QDir dir(QStringLiteral("/usr/share/myspell/dicts/")); ++ QDir dir(QStringLiteral("/usr/share/hunspell/")); + if (dir.exists()) { + QStringList lstDic = dir.entryList(QStringList(QStringLiteral("*.dic")), QDir::Files); + foreach (const QString &tmp, lstDic) { +diff --git a/src/plugins/hunspell/hunspelldict.cpp b/src/plugins/hunspell/hunspelldict.cpp +index 621113d..5baa65f 100644 +--- a/src/plugins/hunspell/hunspelldict.cpp ++++ b/src/plugins/hunspell/hunspelldict.cpp +@@ -30,9 +30,9 @@ HunspellDict::HunspellDict(const QString &lang) + : SpellerPlugin(lang), m_speller(0) + { + qDebug() << " HunspellDict::HunspellDict( const QString& lang ):" << lang; +- QString dic = QStringLiteral("/usr/share/myspell/dicts/%1.dic").arg(lang); ++ QString dic = QStringLiteral("/usr/share/hunspell/%1.dic").arg(lang); + if (QFileInfo(dic).exists()) { +- m_speller = new Hunspell(QStringLiteral("/usr/share/myspell/dicts/%1.aff").arg(lang).toUtf8().constData(), dic.toUtf8().constData()); ++ m_speller = new Hunspell(QStringLiteral("/usr/share/hunspell/%1.aff").arg(lang).toUtf8().constData(), dic.toUtf8().constData()); + } else { + m_speller = 0; + } diff --git a/sonnet.changes b/sonnet.changes index 5be2ef4..b0816cf 100644 --- a/sonnet.changes +++ b/sonnet.changes @@ -4,6 +4,10 @@ Sat Mar 7 16:58:57 UTC 2015 - hrvoje.senjan@gmail.com - Update to 5.8.0 * For more details please see: https://www.kde.org/announcements/kde-frameworks-5.8.0.php +- Comment out aspell-devel BuildRequires, myspell/hunspell plugin + is prefered +- Added dictionary-locations.patch: find dictionaries in openSUSE + locations ------------------------------------------------------------------- Sun Feb 8 18:15:34 UTC 2015 - hrvoje.senjan@gmail.com diff --git a/sonnet.spec b/sonnet.spec index 1541ab9..4f5fa98 100644 --- a/sonnet.spec +++ b/sonnet.spec @@ -21,7 +21,7 @@ Name: sonnet Version: %{_tar_path}.0 Release: 0 -BuildRequires: aspell-devel +#BuildRequires: aspell-devel BuildRequires: cmake >= 2.8.12 # Enchant plugin is currently disabled upstream #BuildRequires: enchant-devel @@ -39,6 +39,8 @@ Group: System/GUI/KDE Url: http://www.kde.org Source: http://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-%{version}.tar.xz Source1: baselibs.conf +# PATCH-FIX-OPENSUSE dictionary-locations.patch -- find dictionaries in openSUSE locations +Patch0: dictionary-locations.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -86,6 +88,7 @@ HSpell, Enchant, ASpell and HUNSPELL. Development files. %lang_package -n libKF5SonnetCore%sonum %prep %setup -q +%patch0 -p1 %build %cmake_kf5 -d build -- -Dlconvert_executable=%{_kf5_libdir}/qt5/bin/lconvert