Gentoo Archives: gentoo-commits

From: Pacho Ramos <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-vcs/rapidsvn/files/, dev-vcs/rapidsvn/
Date: Sat, 24 Oct 2015 09:22:37
Message-Id: 1445678545.0f3f5afb945bb13bd02ec8865a8793ec5d9ac8f0.pacho@gentoo
1 commit: 0f3f5afb945bb13bd02ec8865a8793ec5d9ac8f0
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 24 09:21:59 2015 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 24 09:22:25 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f3f5afb
7
8 dev-vcs/rapidsvn: Support wxGTK:3.0 (#563348)
9
10 Package-Manager: portage-2.2.23
11
12 dev-vcs/rapidsvn/files/rapidsvn-0.12.1-wx3.0.patch | 192 +++++++++++++++++++++
13 dev-vcs/rapidsvn/rapidsvn-0.12.1-r2.ebuild | 126 ++++++++++++++
14 2 files changed, 318 insertions(+)
15
16 diff --git a/dev-vcs/rapidsvn/files/rapidsvn-0.12.1-wx3.0.patch b/dev-vcs/rapidsvn/files/rapidsvn-0.12.1-wx3.0.patch
17 new file mode 100644
18 index 0000000..2862e30
19 --- /dev/null
20 +++ b/dev-vcs/rapidsvn/files/rapidsvn-0.12.1-wx3.0.patch
21 @@ -0,0 +1,192 @@
22 +Description: Update for wx 3.0.0
23 + Update configure to recognise that wx 3.0.0 >= 2.4.2.
24 + Fix code for wx API changes.
25 +Author: Olly Betts <olly@××××××.com>
26 +Origin: debian
27 +Forwarded: no
28 +Last-Update: 2014-04-10
29 +
30 +--- a/configure.ac
31 ++++ b/configure.ac
32 +@@ -171,6 +171,8 @@
33 + ;;
34 + [2.[5-9].*])
35 + ;;
36 ++ 3.*)
37 ++ ;;
38 + *)
39 + AC_MSG_ERROR([wxWidgets >= 2.4.2 required, found version $WX_VERSION])
40 + AC_MSG_ERROR([Try --with-wx-config.])
41 +--- a/src/filelist_ctrl.cpp
42 ++++ b/src/filelist_ctrl.cpp
43 +@@ -1029,7 +1029,7 @@
44 +
45 + // Workaround for issue 324 (only local+non-flat+update):
46 + // we chdir to the requested dir and pass "." to svn
47 +- if (!pathUtf8.isUrl() && m->WithUpdate && !m->FlatMode)
48 ++ if (!pathUtf8.isUrl() && m->WithUpdate && !m->FlatMode && !m->Path.empty())
49 + {
50 + m->IsRelative = true;
51 + ::wxSetWorkingDirectory(m->Path);
52 +@@ -1606,7 +1606,7 @@
53 + }
54 + }
55 +
56 +-inline void
57 ++bool
58 + FileListCtrl::SetColumnWidth(const int col, const int width)
59 + {
60 + m->ColumnWidth[col] = width;
61 +@@ -1614,8 +1614,9 @@
62 + int index = m->ColumnIndex[col];
63 + if (index != -1)
64 + {
65 +- wxListCtrl::SetColumnWidth(index, width);
66 ++ return wxListCtrl::SetColumnWidth(index, width);
67 + }
68 ++ return false;
69 + }
70 +
71 + int
72 +--- a/src/filelist_ctrl.hpp
73 ++++ b/src/filelist_ctrl.hpp
74 +@@ -118,7 +118,7 @@
75 + * @param col column number
76 + * @param width
77 + */
78 +- void
79 ++ bool
80 + SetColumnWidth(const int col, const int width);
81 +
82 + /**
83 +--- a/src/hist_val.cpp
84 ++++ b/src/hist_val.cpp
85 +@@ -113,7 +113,7 @@
86 + }
87 +
88 + // if we have an entry, select it
89 +- if (!comboBox->IsEmpty())
90 ++ if (!comboBox->IsListEmpty())
91 + comboBox->SetSelection(0, 0);
92 + }
93 +
94 +--- a/src/listener.cpp
95 ++++ b/src/listener.cpp
96 +@@ -167,7 +167,7 @@
97 + wxMutexLocker lock(mutex);
98 + wxString localCertFile = wxFileSelector(
99 + _("Select Certificate File"), wxT(""), wxT(""), wxT(""),
100 +- wxT("*.*"), wxOPEN | wxFILE_MUST_EXIST, parent);
101 ++ wxT("*.*"), wxFD_OPEN | wxFD_FILE_MUST_EXIST, parent);
102 + LocalToUtf8(localCertFile, certFile);
103 +
104 + dataReceived = !localCertFile.empty();
105 +--- a/src/log_dlg.cpp
106 ++++ b/src/log_dlg.cpp
107 +@@ -211,7 +211,7 @@
108 +
109 + for (size_t idx = 0; idx < str.Length(); idx++)
110 + {
111 +- switch (str[idx])
112 ++ switch ((wchar_t)str[idx])
113 + {
114 + case wxT('\r'):
115 + case wxT('\n'):
116 +--- a/src/preferences_dlg.cpp
117 ++++ b/src/preferences_dlg.cpp
118 +@@ -126,7 +126,7 @@
119 + PreferencesDlg::SelectExecutable(const wxString & title, wxTextCtrl * textCtrl)
120 + {
121 + wxFileDialog dlg(this, title, wxEmptyString, wxEmptyString,
122 +- EXECUTABLE_WILDCARD, wxOPEN);
123 ++ EXECUTABLE_WILDCARD, wxFD_OPEN);
124 + dlg.SetPath(textCtrl->GetValue());
125 +
126 + if (dlg.ShowModal() != wxID_OK)
127 +--- a/src/verblist.cpp
128 ++++ b/src/verblist.cpp
129 +@@ -71,7 +71,7 @@
130 + const wxString &
131 + VerbList::GetName(size_t /*index*/) const
132 + {
133 +- return wxT("");
134 ++ return wxEmptyString;
135 + }
136 +
137 +
138 +--- a/src/checkout_action.cpp
139 ++++ b/src/checkout_action.cpp
140 +@@ -120,7 +120,8 @@
141 + pegRevision = svn::Revision(revnum);
142 + }
143 +
144 +- wxSetWorkingDirectory(m_data.DestFolder);
145 ++ if (!m_data.DestFolder.empty())
146 ++ wxSetWorkingDirectory(m_data.DestFolder);
147 +
148 + svn::Path repUrlUtf8(PathUtf8(m_data.RepUrl));
149 + svn::Path destFolderUtf8(PathUtf8(dest_folder));
150 +--- a/src/action.cpp
151 ++++ b/src/action.cpp
152 +@@ -218,7 +218,9 @@
153 + bool
154 + Action::Prepare()
155 + {
156 +- wxSetWorkingDirectory(Utf8ToLocal(m->path.c_str()));
157 ++ const wxString & dir = Utf8ToLocal(m->path.c_str());
158 ++ if (!dir.empty())
159 ++ wxSetWorkingDirectory(dir);
160 +
161 + return true;
162 + }
163 +--- a/src/cleanup_action.cpp
164 ++++ b/src/cleanup_action.cpp
165 +@@ -52,7 +52,9 @@
166 + svn::Client client(GetContext());
167 + const svn::Path & path = GetPath();
168 +
169 +- wxSetWorkingDirectory(Utf8ToLocal(path.c_str()));
170 ++ const wxString & dir = Utf8ToLocal(path.c_str());
171 ++ if (!dir.empty())
172 ++ wxSetWorkingDirectory(dir);
173 + client.cleanup(path.c_str());
174 +
175 + return true;
176 +--- a/src/export_action.cpp
177 ++++ b/src/export_action.cpp
178 +@@ -111,7 +111,8 @@
179 + pegRevision = svn::Revision(revnum);
180 + }
181 +
182 +- wxSetWorkingDirectory(m_data.DestPath);
183 ++ if (!m_data.DestPath.empty())
184 ++ wxSetWorkingDirectory(m_data.DestPath);
185 +
186 + svn::Path srcPathUtf8(PathUtf8(m_data.SrcPath));
187 + svn::Path destPathUtf8(PathUtf8(m_data.DestPath));
188 +--- a/src/get_action.cpp
189 ++++ b/src/get_action.cpp
190 +@@ -56,7 +56,9 @@
191 + m_data.revision.revnum());
192 + Trace(msg);
193 +
194 +- wxSetWorkingDirectory(Utf8ToLocal(GetPath().c_str()));
195 ++ const wxString & dir = Utf8ToLocal(GetPath().c_str());
196 ++ if (!dir.empty())
197 ++ wxSetWorkingDirectory(dir);
198 + client.update(svn::Path(LocalToUtf8(m_data.path)),
199 + m_data.revision,
200 + true, false);
201 +--- a/src/update_action.cpp
202 ++++ b/src/update_action.cpp
203 +@@ -75,7 +75,9 @@
204 + }
205 + }
206 +
207 +- wxSetWorkingDirectory(Utf8ToLocal(GetPath().c_str()));
208 ++ const wxString & dir = Utf8ToLocal(GetPath().c_str());
209 ++ if (!dir.empty())
210 ++ wxSetWorkingDirectory(dir);
211 + svn::Client client(GetContext());
212 +
213 + client.update(GetTargets(), revision, m_data.recursive,
214
215 diff --git a/dev-vcs/rapidsvn/rapidsvn-0.12.1-r2.ebuild b/dev-vcs/rapidsvn/rapidsvn-0.12.1-r2.ebuild
216 new file mode 100644
217 index 0000000..61172ba
218 --- /dev/null
219 +++ b/dev-vcs/rapidsvn/rapidsvn-0.12.1-r2.ebuild
220 @@ -0,0 +1,126 @@
221 +# Copyright 1999-2015 Gentoo Foundation
222 +# Distributed under the terms of the GNU General Public License v2
223 +# $Id$
224 +
225 +EAPI=5
226 +
227 +PYTHON_COMPAT=( python2_7 )
228 +
229 +WX_GTK_VER=3.0
230 +
231 +AUTOTOOLS_AUTORECONF=true
232 +
233 +inherit autotools-utils fdo-mime flag-o-matic python-single-r1 versionator wxwidgets
234 +
235 +MY_PV=$(get_version_component_range 1-2)
236 +MY_REL="1"
237 +
238 +DESCRIPTION="Cross-platform GUI front-end for the Subversion revision system"
239 +HOMEPAGE="http://rapidsvn.tigris.org/"
240 +SRC_URI="
241 + http://www.rapidsvn.org/download/release/${PV}/${P}.tar.gz
242 + doc? ( https://dev.gentoo.org/~jlec/distfiles/svncpp.dox.xz )"
243 +
244 +LICENSE="GPL-2 LGPL-2.1 FDL-1.2"
245 +SLOT="0"
246 +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
247 +IUSE="doc static-libs"
248 +
249 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
250 +
251 +COMMON_DEP="
252 + ${PYTHON_DEPS}
253 + dev-libs/apr
254 + dev-libs/apr-util
255 + dev-vcs/subversion
256 + x11-libs/wxGTK:${WX_GTK_VER}[X]"
257 +DEPEND="${COMMON_DEP}
258 + doc? (
259 + dev-libs/libxslt
260 + app-text/docbook-sgml-utils
261 + app-doc/doxygen
262 + app-text/docbook-xsl-stylesheets
263 + media-gfx/graphviz
264 +)"
265 +RDEPEND="${COMMON_DEP}"
266 +
267 +PATCHES=(
268 + "${FILESDIR}/${P}-svncpp_link.patch"
269 + "${FILESDIR}/${P}-locale.patch"
270 + "${FILESDIR}/${P}-wx3.0.patch" )
271 +
272 +AUTOTOOLS_IN_SOURCE_BUILD=1
273 +
274 +DOCS=( HACKING.txt TRANSLATIONS )
275 +
276 +src_prepare() {
277 + need-wxwidgets unicode
278 + if use doc; then
279 + mv "${WORKDIR}"/svncpp.dox doc/svncpp/ || die
280 + fi
281 + strip-linguas $(grep ^RAPIDSVN_LANGUAGES src/locale/Makefile.am | sed 's:RAPIDSVN_LANGUAGES=::g')
282 + sed \
283 + -e "/^RAPIDSVN_LANGUAGES/s:=.*:=${LINGUAS}:g" \
284 + -i src/locale/Makefile.am || die
285 +
286 + mv configure.in configure.ac || die
287 +
288 + autotools-utils_src_prepare
289 +}
290 +
291 +src_configure() {
292 + local myeconfargs=( --with-wx-config=${WX_CONFIG} )
293 +
294 + if use doc; then
295 + myeconfargs+=( --with-manpage=yes )
296 + else
297 + myeconfargs+=(
298 + --without-xsltproc
299 + --with-manpage=no
300 + --without-doxygen
301 + --without-dot )
302 + fi
303 +
304 + append-cppflags $( apr-1-config --cppflags )
305 +
306 + myeconfargs+=(
307 + --with-svn-lib="${EPREFIX}"/usr/$(get_libdir)
308 + --with-svn-include="${EPREFIX}"/usr/include
309 + --with-apr-config="${EPREFIX}/usr/bin/apr-1-config"
310 + --with-apu-config="${EPREFIX}/usr/bin/apu-1-config"
311 + )
312 + autotools-utils_src_configure
313 +}
314 +
315 +src_compile() {
316 + autotools-utils_src_compile
317 + use doc && autotools-utils_src_compile -C doc/manpage manpage
318 +}
319 +
320 +src_install() {
321 + autotools-utils_src_install
322 +
323 + doicon src/res/rapidsvn.ico src/res/bitmaps/${PN}*.png
324 + make_desktop_entry rapidsvn "RapidSVN ${PV}" \
325 + "${EPREFIX}/usr/share/pixmaps/rapidsvn_32x32.png" \
326 + "RevisionControl;Development"
327 +
328 + if use doc ; then
329 + doman doc/manpage/${PN}.1
330 + dohtml "${S}"/doc/svncpp/html/*
331 + fi
332 +}
333 +
334 +src_test() {
335 + pushd "${BUILD_DIR}"/src/tests/svncpp > /dev/null || die
336 + emake
337 + ./svncpptest | grep OK || die
338 +}
339 +
340 +pkg_postinst() {
341 + fdo-mime_desktop_database_update
342 +}
343 +
344 +pkg_postrm() {
345 + fdo-mime_desktop_database_update
346 +}