diff options
author | joerg <joerg> | 2015-09-23 11:45:54 +0000 |
---|---|---|
committer | joerg <joerg> | 2015-09-23 11:45:54 +0000 |
commit | 4787ab490e536ba87cd7fd500774f413cf212c67 (patch) | |
tree | be84864d15a42bc8319b44027c886c0055d25f09 | |
parent | a354b55d2884498ea9fc18a76eae66140614a3e4 (diff) | |
download | pkgsrc-4787ab490e536ba87cd7fd500774f413cf212c67.tar.gz |
Try to get subversion support to at least build again.
-rw-r--r-- | devel/kdesdk-kioslaves/distinfo | 3 | ||||
-rw-r--r-- | devel/kdesdk-kioslaves/patches/patch-svn_svn.cpp | 82 |
2 files changed, 84 insertions, 1 deletions
diff --git a/devel/kdesdk-kioslaves/distinfo b/devel/kdesdk-kioslaves/distinfo index fa06c5aceda..fd76913ddaa 100644 --- a/devel/kdesdk-kioslaves/distinfo +++ b/devel/kdesdk-kioslaves/distinfo @@ -1,5 +1,6 @@ -$NetBSD: distinfo,v 1.3 2014/11/14 08:03:30 markd Exp $ +$NetBSD: distinfo,v 1.4 2015/09/23 11:45:54 joerg Exp $ SHA1 (kdesdk-kioslaves-4.14.3.tar.xz) = d59a70a36974fc969629271cbcb4bd65f8336080 RMD160 (kdesdk-kioslaves-4.14.3.tar.xz) = 72d3a3023e035327d6a47ba2446ab08b0fcb5eb7 Size (kdesdk-kioslaves-4.14.3.tar.xz) = 361228 bytes +SHA1 (patch-svn_svn.cpp) = 8982758293383b7aad18bfa5b2cdff76e52c3d29 diff --git a/devel/kdesdk-kioslaves/patches/patch-svn_svn.cpp b/devel/kdesdk-kioslaves/patches/patch-svn_svn.cpp new file mode 100644 index 00000000000..ef021aae81c --- /dev/null +++ b/devel/kdesdk-kioslaves/patches/patch-svn_svn.cpp @@ -0,0 +1,82 @@ +$NetBSD: patch-svn_svn.cpp,v 1.1 2015/09/23 11:45:54 joerg Exp $ + +--- svn/svn.cpp.orig 2015-09-20 17:51:35.000000000 +0000 ++++ svn/svn.cpp +@@ -54,6 +54,8 @@ + #include "svn.h" + #include <apr_portable.h> + ++#include <algorithm> ++ + 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<const char *, svn_dirent_t *> &a, const std::pair<const char *, svn_dirent_t *> &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<std::pair<const char *, svn_dirent_t *> > 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<const char *>(key), reinterpret_cast<svn_dirent_t *>(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(); |