fix myspell dictionary path lookup (fedora uses /usr/share/myspell, not /usr/share/myspell/dicts)

epel9
Rex Dieter 10 years ago
parent aa18013c9b
commit b5eee1f5e7

@ -2,7 +2,7 @@
Name: kf5-%{framework} Name: kf5-%{framework}
Version: 5.10.0 Version: 5.10.0
Release: 2%{?dist} Release: 3%{?dist}
Summary: KDE Frameworks 5 Tier 1 solution for spell checking Summary: KDE Frameworks 5 Tier 1 solution for spell checking
License: LGPLv2+ License: LGPLv2+
@ -17,6 +17,10 @@ URL: http://www.kde.org
%endif %endif
Source0: http://download.kde.org/%{stable}/frameworks/%{versiondir}/%{framework}-%{version}.tar.xz Source0: http://download.kde.org/%{stable}/frameworks/%{versiondir}/%{framework}-%{version}.tar.xz
## downstream patches
# adjust hard-coded mysql dict paths to what fedora uses
Patch1: sonnet-5.10.0-myspell_path.patch
BuildRequires: libupnp-devel BuildRequires: libupnp-devel
BuildRequires: systemd-devel BuildRequires: systemd-devel
BuildRequires: hunspell-devel BuildRequires: hunspell-devel
@ -62,6 +66,8 @@ GUI part of the Sonnet framework provides widgets with spell checking support.
%prep %prep
%setup -q -n %{framework}-%{version} %setup -q -n %{framework}-%{version}
%patch1 -p1 -b .myspell_path
%build %build
mkdir %{_target_platform} mkdir %{_target_platform}
@ -109,6 +115,9 @@ make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
%changelog %changelog
* Wed Jun 03 2015 Rex Dieter <rdieter@fedoraproject.org> 5.10.0-3
- fix myspell dictionary path lookup (fedora uses /usr/share/myspell, not /usr/share/myspell/dicts)
* Wed Jun 03 2015 Rex Dieter <rdieter@fedoraproject.org> 5.10.0-2 * Wed Jun 03 2015 Rex Dieter <rdieter@fedoraproject.org> 5.10.0-2
- .spec cosmetics, excplicitly own dirs, use %%find_lang_kf5 - .spec cosmetics, excplicitly own dirs, use %%find_lang_kf5

@ -0,0 +1,27 @@
diff -up sonnet-5.10.0/src/plugins/hunspell/hunspellclient.cpp.myspell_path sonnet-5.10.0/src/plugins/hunspell/hunspellclient.cpp
--- sonnet-5.10.0/src/plugins/hunspell/hunspellclient.cpp.myspell_path 2015-05-03 10:28:45.000000000 -0500
+++ sonnet-5.10.0/src/plugins/hunspell/hunspellclient.cpp 2015-06-03 11:30:16.509324330 -0500
@@ -47,7 +47,7 @@ SpellerPlugin *HunspellClient::createSpe
QStringList HunspellClient::languages() const
{
QStringList lst;
- QDir dir(QStringLiteral("/usr/share/myspell/dicts/"));
+ QDir dir(QStringLiteral("/usr/share/myspell/"));
if (dir.exists()) {
QStringList lstDic = dir.entryList(QStringList(QStringLiteral("*.dic")), QDir::Files);
foreach (const QString &tmp, lstDic) {
diff -up sonnet-5.10.0/src/plugins/hunspell/hunspelldict.cpp.myspell_path sonnet-5.10.0/src/plugins/hunspell/hunspelldict.cpp
--- sonnet-5.10.0/src/plugins/hunspell/hunspelldict.cpp.myspell_path 2015-06-03 11:26:37.874222011 -0500
+++ sonnet-5.10.0/src/plugins/hunspell/hunspelldict.cpp 2015-06-03 11:30:36.993427926 -0500
@@ -31,9 +31,9 @@ HunspellDict::HunspellDict(const QString
: SpellerPlugin(lang), m_speller(0)
{
qCDebug(SONNET_HUNSPELL) << " HunspellDict::HunspellDict( const QString& lang ):" << lang;
- QString dic = QStringLiteral("/usr/share/myspell/dicts/%1.dic").arg(lang);
+ QString dic = QStringLiteral("/usr/share/myspell/%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/myspell/%1.aff").arg(lang).toUtf8().constData(), dic.toUtf8().constData());
} else {
m_speller = 0;
}
Loading…
Cancel
Save