From 7c2e024a99c74f9abaf9f564f63fa8b5f440f2b8 Mon Sep 17 00:00:00 2001 From: orchidman Date: Thu, 27 Oct 2011 10:17:22 +0200 Subject: kdelibs 4.7.2-2 correction port --- extra/kdelibs/.md5sum.i686 | 2 + extra/kdelibs/.md5sum.x86_64 | 2 + extra/kdelibs/Pkgfile | 10 ++++- extra/kdelibs/kde-applications-menu.patch | 22 ++++++++++ extra/kdelibs/kdelibs-nepomuk-unicode.diff | 65 ++++++++++++++++++++++++++++++ 5 files changed, 99 insertions(+), 2 deletions(-) create mode 100644 extra/kdelibs/kde-applications-menu.patch create mode 100644 extra/kdelibs/kdelibs-nepomuk-unicode.diff (limited to 'extra') diff --git a/extra/kdelibs/.md5sum.i686 b/extra/kdelibs/.md5sum.i686 index 7b744ff8b..a63764b50 100644 --- a/extra/kdelibs/.md5sum.i686 +++ b/extra/kdelibs/.md5sum.i686 @@ -1 +1,3 @@ +2b30cc3e382e99333e7ff388943473e9 kde-applications-menu.patch abe4c8f848366bcab16c57bbaeb86f1f kdelibs-4.7.2.tar.bz2 +7941368d5a65e92bc0058f6d513dce39 kdelibs-nepomuk-unicode.diff diff --git a/extra/kdelibs/.md5sum.x86_64 b/extra/kdelibs/.md5sum.x86_64 index 7b744ff8b..a63764b50 100644 --- a/extra/kdelibs/.md5sum.x86_64 +++ b/extra/kdelibs/.md5sum.x86_64 @@ -1 +1,3 @@ +2b30cc3e382e99333e7ff388943473e9 kde-applications-menu.patch abe4c8f848366bcab16c57bbaeb86f1f kdelibs-4.7.2.tar.bz2 +7941368d5a65e92bc0058f6d513dce39 kdelibs-nepomuk-unicode.diff diff --git a/extra/kdelibs/Pkgfile b/extra/kdelibs/Pkgfile index d4f2aa490..0711789aa 100755 --- a/extra/kdelibs/Pkgfile +++ b/extra/kdelibs/Pkgfile @@ -8,11 +8,17 @@ name=kdelibs version=4.7.2 -release=1 -source=(ftp://ftp.kde.org/pub/kde/stable/$version/src/$name-$version.tar.bz2) +release=2 +source=(ftp://ftp.kde.org/pub/kde/stable/$version/src/$name-$version.tar.bz2 + kde-applications-menu.patch + kdelibs-nepomuk-unicode.diff) build() { cd $name-$version + + patch -p1 -i ../kde-applications-menu.patch + patch -p1 -i ../kdelibs-nepomuk-unicode.diff + sed -i "s/THEME \"default\"/THEME \"Pakxe\"/" plasma/theme.cpp mkdir build cd build diff --git a/extra/kdelibs/kde-applications-menu.patch b/extra/kdelibs/kde-applications-menu.patch new file mode 100644 index 000000000..4b513298a --- /dev/null +++ b/extra/kdelibs/kde-applications-menu.patch @@ -0,0 +1,22 @@ +--- kdelibs-4.3.98/kded/CMakeLists.txt 2009-10-02 14:55:17.000000000 +0000 ++++ kdelibs-4.3.98/kded/CMakeLists.txt 2010-01-31 22:16:13.946933892 +0000 +@@ -69,7 +69,7 @@ + if (WIN32) + install( FILES applications.menu DESTINATION ${SHARE_INSTALL_PREFIX}/xdg/menus ) + else (WIN32) +-install( FILES applications.menu DESTINATION ${SYSCONF_INSTALL_DIR}/xdg/menus ) ++install( FILES applications.menu DESTINATION ${SYSCONF_INSTALL_DIR}/xdg/menus RENAME kde-applications.menu ) + endif (WIN32) + install( FILES kdedmodule.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR} ) + install( FILES kded.upd DESTINATION ${DATA_INSTALL_DIR}/kconf_update ) +--- kdelibs-4.3.98/kded/kbuildsycoca.cpp 2009-12-04 23:10:18.000000000 +0000 ++++ kdelibs-4.3.98/kded/kbuildsycoca.cpp 2010-01-31 22:16:13.962766572 +0000 +@@ -302,7 +302,7 @@ + if (!m_trackId.isEmpty()) + g_vfolder->setTrackId(m_trackId); + +- VFolderMenu::SubMenu *kdeMenu = g_vfolder->parseMenu("applications.menu", true); ++ VFolderMenu::SubMenu *kdeMenu = g_vfolder->parseMenu("kde-applications.menu", true); + + KServiceGroup::Ptr entry = g_bsgf->addNew("/", kdeMenu->directoryFile, KServiceGroup::Ptr(), false); + entry->setLayoutInfo(kdeMenu->layoutList); diff --git a/extra/kdelibs/kdelibs-nepomuk-unicode.diff b/extra/kdelibs/kdelibs-nepomuk-unicode.diff new file mode 100644 index 000000000..6a276447d --- /dev/null +++ b/extra/kdelibs/kdelibs-nepomuk-unicode.diff @@ -0,0 +1,65 @@ +diff --git a/nepomuk/query/querybuilderdata_p.h b/nepomuk/query/querybuilderdata_p.h +index 055482e..3880e13 100644 +--- a/nepomuk/query/querybuilderdata_p.h ++++ b/nepomuk/query/querybuilderdata_p.h +@@ -32,6 +32,28 @@ + #include "query_p.h" + #include "groupterm_p.h" + ++namespace { ++/// A hack to avoid passing extended chars to the bif:search_excerpts method which cannot handle ++/// utf8 chars which use more than one char, ie. wide chars. ++/// Thus, we simply truncate each term at the first wide char. ++QStringList stripExtendedCharsHack(const QStringList& terms) { ++ QStringList newTerms; ++ foreach(const QString& term, terms) { ++ int i = 0; ++ while(i < term.length()) { ++ if(term[i].unicode() > 0x7f) { ++ break; ++ } ++ ++i; ++ } ++ if(i > 0) { ++ newTerms.append(term.left(i)); ++ } ++ } ++ return newTerms; ++} ++} ++ + namespace Nepomuk { + namespace Query { + class QueryBuilderData +@@ -246,16 +268,23 @@ namespace Nepomuk { + for( QHash::const_iterator it = m_fullTextSearchTerms.constBegin(); + it != m_fullTextSearchTerms.constEnd(); ++it ) { + const QString& varName = it.key(); +- const QStringList& terms = it.value(); +- // bif:search_excerpt wants a vector of all search terms +- excerptParts +- << QString::fromLatin1("bif:search_excerpt(bif:vector(bif:charset_recode('%1', '_WIDE_', 'UTF-8')), %2)") +- .arg( terms.join(QLatin1String("','")), +- varName ); ++ const QStringList terms = stripExtendedCharsHack(it.value()); ++ if(terms.count()) { ++ // bif:search_excerpt wants a vector of all search terms ++ excerptParts ++ << QString::fromLatin1("bif:search_excerpt(bif:vector('%1'), %2)") ++ .arg( terms.join(QLatin1String("','")), ++ varName ); ++ } + } + +- return QString::fromLatin1("(bif:concat(%1)) as ?_n_f_t_m_ex_") +- .arg(excerptParts.join(QLatin1String(","))); ++ if(excerptParts.count()) { ++ return QString::fromLatin1("(bif:concat(%1)) as ?_n_f_t_m_ex_") ++ .arg(excerptParts.join(QLatin1String(","))); ++ } ++ else { ++ return QString(); ++ } + } + else { + return QString(); -- cgit v1.2.3-70-g09d2