diff options
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | PKGBUILD | 58 | ||||
-rw-r--r-- | rapidsvn-subversion1.9.patch | 148 | ||||
-rw-r--r-- | rapidsvn-wx3.0.patch | 203 | ||||
-rw-r--r-- | rapidsvn.desktop | 10 |
5 files changed, 440 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..c94e4a1dac02 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = rapidsvn + pkgdesc = A cross-platform GUI front-end for the Subversion revision system written in C++ using the wxWidgets framework. + pkgver = 0.12.1 + pkgrel = 12 + url = http://rapidsvn.tigris.org/ + arch = x86_64 + license = GPL + makedepends = python2 + depends = subversion + depends = wxgtk3 + source = http://www.rapidsvn.org/download/release/0.12.1/rapidsvn-0.12.1.tar.gz + source = rapidsvn.desktop + source = rapidsvn-wx3.0.patch + source = rapidsvn-subversion1.9.patch + md5sums = 8de3ca6da3ef6a27d59f959d1bbcd96b + md5sums = 349e6d9729f88868902611bb1172f134 + md5sums = 44cdc7e987496e9e331f3dd5b5a871d4 + md5sums = 0ffd1fd1fed7ff53578afe92730c80bc + +pkgname = rapidsvn + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..c34757229ece --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,58 @@ +# $Id: PKGBUILD 266875 2017-11-15 14:29:11Z foutrelis $ +# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> +# Maintainer: Angel 'angvp' Velasquez <angvp[at]archlinux.com.ve> +# Contributor: AqD <aquila.deus@gmail.com> +# Contributor: TheMadsen <arch@themadsens.dk> + +pkgname=rapidsvn +pkgver=0.12.1 +pkgrel=12 +pkgdesc="A cross-platform GUI front-end for the Subversion revision system written in C++ using the wxWidgets framework." +url='http://rapidsvn.tigris.org/' +arch=('x86_64') +license=('GPL') +depends=('subversion' 'wxgtk3') +makedepends=('python2') +source=(http://www.rapidsvn.org/download/release/$pkgver/rapidsvn-$pkgver.tar.gz + $pkgname.desktop rapidsvn-wx3.0.patch rapidsvn-subversion1.9.patch) +md5sums=('8de3ca6da3ef6a27d59f959d1bbcd96b' + '349e6d9729f88868902611bb1172f134' + '44cdc7e987496e9e331f3dd5b5a871d4' + '0ffd1fd1fed7ff53578afe92730c80bc') + +prepare() { + cd $pkgname-$pkgver +# Fix build with WxGTK 3 (Debian) + patch -p1 -i ../rapidsvn-wx3.0.patch +# Fix assertion at startup + sed -e '/SetMaxLength(0)/d' -i src/rapidsvn_frame.cpp -i src/report_dlg.cpp +# Fix build with subversion 1.9 (Debian) + patch -p1 -i ../rapidsvn-subversion1.9.patch +} + +build() { + cd "$srcdir"/$pkgname-$pkgver + + autoreconf -vi + + export CPPFLAGS+=' -DNDEBUG' # https://bugs.archlinux.org/task/52696 + sed -i 's#src/tests/svncpp/Makefile##' configure + [ "$NOEXTRACT" == 1 ] || ./configure --prefix=/usr \ + --with-apu-config="`which apu-1-config`" \ + --with-apr-config="`which apr-1-config`" \ + --with-wx-config=/usr/bin/wx-config-gtk3 + + sed -i 's|/usr/bin/env python|/usr/bin/env python2|' tools/*.py + sed -i 's|python|python2|' src/locale/Makefile + + make -k +} + +package() { + cd "$srcdir"/$pkgname-$pkgver + + make DESTDIR="$pkgdir" install + + install -Dm644 src/res/bitmaps/rapidsvn_32x32.xpm "$pkgdir"/usr/share/pixmaps/rapidsvn_32x32.xpm + install -Dm644 ../$pkgname.desktop "$pkgdir"/usr/share/applications/$pkgname.desktop +} diff --git a/rapidsvn-subversion1.9.patch b/rapidsvn-subversion1.9.patch new file mode 100644 index 000000000000..6ab0c8b36e95 --- /dev/null +++ b/rapidsvn-subversion1.9.patch @@ -0,0 +1,148 @@ +Description: Fix FTBFS with newer subversion +Origin: https://github.com/RapidSVN/RapidSVN/issues/6 +Bug-Debian: #796450 +Forwarded: not-needed +Applied-Upstream: https://github.com/jsonn/pkgsrc/commit/9a2dbd9a13f94539cebf27d9de18a8014323c87a +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- rapidsvn-0.12.1/src/svncpp/client_ls.cpp.old 2012-06-28 13:39:33.000000000 +0700 ++++ rapidsvn-0.12.1/src/svncpp/client_ls.cpp 2016-01-05 07:13:33.309097969 +0700 +@@ -29,6 +29,7 @@ + #include "svn_client.h" + #include "svn_path.h" + #include "svn_sorts.h" ++#include "svn_version.h" + //#include "svn_utf.h" + + // svncpp +@@ -37,6 +38,8 @@ + #include "svncpp/exception.hpp" + + ++#if SVN_VER_MAJOR == 1 && SVN_VER_MINOR < 8 ++ + static int + compare_items_as_paths(const svn_sort__item_t *a, const svn_sort__item_t *b) + { +@@ -90,8 +93,75 @@ + } + } + ++#else ++ ++#include <algorithm> ++ ++static svn_error_t* store_entry( ++ void *baton, ++ const char *path, ++ const svn_dirent_t *dirent, ++ const svn_lock_t *, ++ const char *abs_path, ++ const char *, ++ const char *, ++ apr_pool_t *scratch_pool) ++{ ++ svn::DirEntries *entries = reinterpret_cast<svn::DirEntries*>(baton); ++ if (path[0] == '\0') { ++ if (dirent->kind == svn_node_file) { ++ // for compatibility with svn_client_ls behaviour, listing a file ++ // stores that file name ++ entries->push_back(svn::DirEntry(svn_path_basename(abs_path, scratch_pool), dirent)); ++ } ++ } else { ++ entries->push_back(svn::DirEntry(path, dirent)); ++ } ++ return SVN_NO_ERROR; ++} ++ ++static bool sort_by_path(svn::DirEntry const& a, svn::DirEntry const& b) ++{ ++ return svn_path_compare_paths(a.name(), b.name()) < 0; ++} ++ ++namespace svn ++{ ++ DirEntries ++ Client::list(const char * pathOrUrl, ++ svn_opt_revision_t * revision, ++ bool recurse) throw(ClientException) ++ { ++ Pool pool; ++ DirEntries entries; ++ ++ svn_error_t * error = ++ svn_client_list3(pathOrUrl, ++ revision, ++ revision, ++ SVN_DEPTH_INFINITY_OR_IMMEDIATES(recurse), ++ SVN_DIRENT_ALL, ++ FALSE, // fetch locks ++ FALSE, // include externals ++ &store_entry, ++ &entries, ++ *m_context, ++ pool); ++ ++ if (error != SVN_NO_ERROR) ++ throw ClientException(error); ++ ++ std::sort(entries.begin(), entries.end(), &sort_by_path); ++ ++ return entries; ++ } ++} ++ ++#endif ++ + /* ----------------------------------------------------------------- + * local variables: + * eval: (load-file "../../rapidsvn-dev.el") + * end: + */ ++ +50c50 +< Data(const char * _name, svn_dirent_t * dirEntry) +--- +> Data(const char * _name, const svn_dirent_t * dirEntry) +81c81 +< DirEntry::DirEntry(const char * name, svn_dirent_t * DirEntry) +--- +> DirEntry::DirEntry(const char * name, const svn_dirent_t * DirEntry) +153a154 +> +--- rapidsvn-0.12.1/include/svncpp/dirent.hpp.old 2012-06-28 13:39:20.000000000 +0700 ++++ rapidsvn-0.12.1/include/svncpp/dirent.hpp 2016-01-05 07:11:10.337456433 +0700 +@@ -41,7 +41,7 @@ + /** + * constructor for existing @a svn_dirent_t entries + */ +- DirEntry(const char * name, svn_dirent_t * dirEntry); ++ DirEntry(const char * name, const svn_dirent_t * dirEntry); + + /** + * copy constructor +@@ -91,3 +91,4 @@ + * eval: (load-file "../../rapidsvn-dev.el") + * end: + */ ++ +--- rapidsvn-0.12.1/src/svncpp/dirent.cpp.old 2016-01-05 07:22:32.647100607 +0700 ++++ rapidsvn-0.12.1/src/svncpp/dirent.cpp 2016-01-05 07:23:15.778197025 +0700 +@@ -47,7 +47,7 @@ + { + } + +- Data(const char * _name, svn_dirent_t * dirEntry) ++ Data(const char * _name, const svn_dirent_t * dirEntry) + : name(_name), kind(dirEntry->kind), size(dirEntry->size), + hasProps(dirEntry->has_props != 0), + createdRev(dirEntry->created_rev), time(dirEntry->time) +@@ -78,7 +78,7 @@ + { + } + +- DirEntry::DirEntry(const char * name, svn_dirent_t * DirEntry) ++ DirEntry::DirEntry(const char * name, const svn_dirent_t * DirEntry) + : m(new Data(name, DirEntry)) + { + } diff --git a/rapidsvn-wx3.0.patch b/rapidsvn-wx3.0.patch new file mode 100644 index 000000000000..9f0813ea40f2 --- /dev/null +++ b/rapidsvn-wx3.0.patch @@ -0,0 +1,203 @@ +Description: Update for wx 3.0.0 + Update configure to recognise that wx 3.0.0 >= 2.4.2. + Fix code for wx API changes. +Author: Olly Betts <olly@survex.com> +Origin: debian +Forwarded: no +Last-Update: 2014-04-10 + +--- a/configure ++++ b/configure +@@ -15176,6 +15176,8 @@ + ;; + 2.[5-9].*) + ;; ++ 3.*) ++ ;; + *) + as_fn_error $? "wxWidgets >= 2.4.2 required, found version $WX_VERSION" "$LINENO" 5 + as_fn_error $? "Try --with-wx-config." "$LINENO" 5 +--- a/configure.in ++++ b/configure.in +@@ -171,6 +171,8 @@ + ;; + [2.[5-9].*]) + ;; ++ 3.*) ++ ;; + *) + AC_MSG_ERROR([wxWidgets >= 2.4.2 required, found version $WX_VERSION]) + AC_MSG_ERROR([Try --with-wx-config.]) +--- a/src/filelist_ctrl.cpp ++++ b/src/filelist_ctrl.cpp +@@ -1029,7 +1029,7 @@ + + // Workaround for issue 324 (only local+non-flat+update): + // we chdir to the requested dir and pass "." to svn +- if (!pathUtf8.isUrl() && m->WithUpdate && !m->FlatMode) ++ if (!pathUtf8.isUrl() && m->WithUpdate && !m->FlatMode && !m->Path.empty()) + { + m->IsRelative = true; + ::wxSetWorkingDirectory(m->Path); +@@ -1606,7 +1606,7 @@ + } + } + +-inline void ++bool + FileListCtrl::SetColumnWidth(const int col, const int width) + { + m->ColumnWidth[col] = width; +@@ -1614,8 +1614,9 @@ + int index = m->ColumnIndex[col]; + if (index != -1) + { +- wxListCtrl::SetColumnWidth(index, width); ++ return wxListCtrl::SetColumnWidth(index, width); + } ++ return false; + } + + int +--- a/src/filelist_ctrl.hpp ++++ b/src/filelist_ctrl.hpp +@@ -118,7 +118,7 @@ + * @param col column number + * @param width + */ +- void ++ bool + SetColumnWidth(const int col, const int width); + + /** +--- a/src/hist_val.cpp ++++ b/src/hist_val.cpp +@@ -113,7 +113,7 @@ + } + + // if we have an entry, select it +- if (!comboBox->IsEmpty()) ++ if (!comboBox->IsListEmpty()) + comboBox->SetSelection(0, 0); + } + +--- a/src/listener.cpp ++++ b/src/listener.cpp +@@ -167,7 +167,7 @@ + wxMutexLocker lock(mutex); + wxString localCertFile = wxFileSelector( + _("Select Certificate File"), wxT(""), wxT(""), wxT(""), +- wxT("*.*"), wxOPEN | wxFILE_MUST_EXIST, parent); ++ wxT("*.*"), wxFD_OPEN | wxFD_FILE_MUST_EXIST, parent); + LocalToUtf8(localCertFile, certFile); + + dataReceived = !localCertFile.empty(); +--- a/src/log_dlg.cpp ++++ b/src/log_dlg.cpp +@@ -211,7 +211,7 @@ + + for (size_t idx = 0; idx < str.Length(); idx++) + { +- switch (str[idx]) ++ switch ((wchar_t)str[idx]) + { + case wxT('\r'): + case wxT('\n'): +--- a/src/preferences_dlg.cpp ++++ b/src/preferences_dlg.cpp +@@ -126,7 +126,7 @@ + PreferencesDlg::SelectExecutable(const wxString & title, wxTextCtrl * textCtrl) + { + wxFileDialog dlg(this, title, wxEmptyString, wxEmptyString, +- EXECUTABLE_WILDCARD, wxOPEN); ++ EXECUTABLE_WILDCARD, wxFD_OPEN); + dlg.SetPath(textCtrl->GetValue()); + + if (dlg.ShowModal() != wxID_OK) +--- a/src/verblist.cpp ++++ b/src/verblist.cpp +@@ -71,7 +71,7 @@ + const wxString & + VerbList::GetName(size_t /*index*/) const + { +- return wxT(""); ++ return wxEmptyString; + } + + +--- a/src/checkout_action.cpp ++++ b/src/checkout_action.cpp +@@ -120,7 +120,8 @@ + pegRevision = svn::Revision(revnum); + } + +- wxSetWorkingDirectory(m_data.DestFolder); ++ if (!m_data.DestFolder.empty()) ++ wxSetWorkingDirectory(m_data.DestFolder); + + svn::Path repUrlUtf8(PathUtf8(m_data.RepUrl)); + svn::Path destFolderUtf8(PathUtf8(dest_folder)); +--- a/src/action.cpp ++++ b/src/action.cpp +@@ -218,7 +218,9 @@ + bool + Action::Prepare() + { +- wxSetWorkingDirectory(Utf8ToLocal(m->path.c_str())); ++ const wxString & dir = Utf8ToLocal(m->path.c_str()); ++ if (!dir.empty()) ++ wxSetWorkingDirectory(dir); + + return true; + } +--- a/src/cleanup_action.cpp ++++ b/src/cleanup_action.cpp +@@ -52,7 +52,9 @@ + svn::Client client(GetContext()); + const svn::Path & path = GetPath(); + +- wxSetWorkingDirectory(Utf8ToLocal(path.c_str())); ++ const wxString & dir = Utf8ToLocal(path.c_str()); ++ if (!dir.empty()) ++ wxSetWorkingDirectory(dir); + client.cleanup(path.c_str()); + + return true; +--- a/src/export_action.cpp ++++ b/src/export_action.cpp +@@ -111,7 +111,8 @@ + pegRevision = svn::Revision(revnum); + } + +- wxSetWorkingDirectory(m_data.DestPath); ++ if (!m_data.DestPath.empty()) ++ wxSetWorkingDirectory(m_data.DestPath); + + svn::Path srcPathUtf8(PathUtf8(m_data.SrcPath)); + svn::Path destPathUtf8(PathUtf8(m_data.DestPath)); +--- a/src/get_action.cpp ++++ b/src/get_action.cpp +@@ -56,7 +56,9 @@ + m_data.revision.revnum()); + Trace(msg); + +- wxSetWorkingDirectory(Utf8ToLocal(GetPath().c_str())); ++ const wxString & dir = Utf8ToLocal(GetPath().c_str()); ++ if (!dir.empty()) ++ wxSetWorkingDirectory(dir); + client.update(svn::Path(LocalToUtf8(m_data.path)), + m_data.revision, + true, false); +--- a/src/update_action.cpp ++++ b/src/update_action.cpp +@@ -75,7 +75,9 @@ + } + } + +- wxSetWorkingDirectory(Utf8ToLocal(GetPath().c_str())); ++ const wxString & dir = Utf8ToLocal(GetPath().c_str()); ++ if (!dir.empty()) ++ wxSetWorkingDirectory(dir); + svn::Client client(GetContext()); + + client.update(GetTargets(), revision, m_data.recursive, diff --git a/rapidsvn.desktop b/rapidsvn.desktop new file mode 100644 index 000000000000..8adeb20e13c8 --- /dev/null +++ b/rapidsvn.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=RapidSVN +Comment=SVN source viewer +Exec=rapidsvn +Icon=rapidsvn_32x32 +Terminal=false +Type=Application +Categories=GNOME;Application;Development; +StartupNotify=true |