From 568e6085251526ae1a73d9e2b87102f569355052 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Thu, 19 Nov 2015 00:42:34 +0100 Subject: kdesdk-kioslaves: patched to compile against svn >= 1.9. --- kde/patch/kdesdk-kioslaves.patch | 3 ++ kde/patch/kdesdk-kioslaves/svn19.patch | 87 ++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 kde/patch/kdesdk-kioslaves.patch create mode 100644 kde/patch/kdesdk-kioslaves/svn19.patch diff --git a/kde/patch/kdesdk-kioslaves.patch b/kde/patch/kdesdk-kioslaves.patch new file mode 100644 index 0000000..dd4f9e2 --- /dev/null +++ b/kde/patch/kdesdk-kioslaves.patch @@ -0,0 +1,3 @@ +# Fix compilation against svn > 1.8. +cat $CWD/patch/kdesdk-kioslaves/svn19.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; } + diff --git a/kde/patch/kdesdk-kioslaves/svn19.patch b/kde/patch/kdesdk-kioslaves/svn19.patch new file mode 100644 index 0000000..dbd057d --- /dev/null +++ b/kde/patch/kdesdk-kioslaves/svn19.patch @@ -0,0 +1,87 @@ +Subversion 1.9 and more recent versions have removed some interfaces, which +the Subversion developers consider to serve only svn-internal purposes, from +the header files installed by the package. + +The following patch (orignally from pkgsrc) provides an own sort mechanism +to replace the no longer available svn_sort__hash functionality. + +--- kdesdk-kioslaves-15.08.3/svn/svn.cpp.orig 2015-09-20 17:51:35.000000000 +0000 ++++ kdesdk-kioslaves-15.08.3/svn/svn.cpp +@@ -54,6 +54,8 @@ + #include "svn.h" + #include + ++#include ++ + using namespace KIO; + + typedef struct +@@ -107,11 +109,6 @@ static svn_error_t *write_to_string(void + return SVN_NO_ERROR; + } + +-static int +-compare_items_as_paths (const svn_sort__item_t*a, const svn_sort__item_t*b) { +- return svn_path_compare_paths ((const char *)a->key, (const char *)b->key); +-} +- + kio_svnProtocol::kio_svnProtocol(const QByteArray &pool_socket, const QByteArray &app_socket) + : SlaveBase("kio_svn", pool_socket, app_socket) { + kDebug(7128) << "kio_svnProtocol::kio_svnProtocol()"; +@@ -515,6 +512,11 @@ void kio_svnProtocol::stat(const KUrl & + svn_pool_destroy( subpool ); + } + ++static bool ++sort_by_path(const std::pair &a, const std::pair &b) { ++ return svn_path_compare_paths(a.first, b.first) < 0; ++} ++ + void kio_svnProtocol::listDir(const KUrl& url) { + kDebug(7128) << "kio_svn::listDir(const KUrl& url) : " << url.url(); + +@@ -547,23 +549,23 @@ void kio_svnProtocol::listDir(const KUrl + return; + } + +- apr_array_header_t *array; +- int i; +- +- array = svn_sort__hash (dirents, compare_items_as_paths, subpool); ++ std::vector > array; ++ for (apr_hash_index_t *hi = apr_hash_first(subpool, dirents); hi; hi = apr_hash_next(hi)) { ++ const void *key; ++ void *data; ++ apr_hash_this(hi, &key, NULL, &data); ++ array.push_back(std::make_pair(reinterpret_cast(key), reinterpret_cast(data))); ++ } ++ std::sort(array.begin(), array.end(), sort_by_path); + +- UDSEntry entry; +- for (i = 0; i < array->nelts; ++i) { ++ UDSEntry entry; ++ for (size_t i = 0; i < array.size(); ++i) { + entry.clear(); + const char *utf8_entryname, *native_entryname; + svn_dirent_t *dirent; +- svn_sort__item_t *item; + +- item = &APR_ARRAY_IDX (array, i, svn_sort__item_t); +- +- utf8_entryname = (const char*)item->key; +- +- dirent = (svn_dirent_t*)apr_hash_get (dirents, utf8_entryname, item->klen); ++ utf8_entryname = array[i].first; ++ dirent = array[i].second; + + svn_utf_cstring_from_utf8 (&native_entryname, utf8_entryname, subpool); + const char *native_author = NULL; +@@ -577,7 +579,7 @@ void kio_svnProtocol::listDir(const KUrl + if ( createUDSEntry(QString( native_entryname ), QString( native_author ), dirent->size, + dirent->kind==svn_node_dir ? true : false, mtime, entry) ) + listEntry( entry, false ); +- } ++ } + listEntry( entry, true ); + + finished(); -- cgit v1.2.3