1 |
commit: 4870b62d7f7c028c371f29d095407ef0bd946926 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jul 6 13:29:16 2017 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jul 6 13:29:29 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4870b62d |
7 |
|
8 |
dev-vcs/subversion: Bump to version 1.9.6 |
9 |
|
10 |
Package-Manager: Portage-2.3.6, Repoman-2.3.2 |
11 |
|
12 |
dev-vcs/subversion/Manifest | 1 + |
13 |
dev-vcs/subversion/subversion-1.9.6.ebuild | 510 +++++++++++++++++++++++++++++ |
14 |
2 files changed, 511 insertions(+) |
15 |
|
16 |
diff --git a/dev-vcs/subversion/Manifest b/dev-vcs/subversion/Manifest |
17 |
index 39600b1036a..915904a6d36 100644 |
18 |
--- a/dev-vcs/subversion/Manifest |
19 |
+++ b/dev-vcs/subversion/Manifest |
20 |
@@ -1,2 +1,3 @@ |
21 |
DIST subversion-1.8.17.tar.bz2 6924354 SHA256 de119538d29a5f2c028984cb54a55a4af3e9c32fa9316331bcbe5719e474a090 SHA512 49de24703bc40ccfd5a5df15215fd037f81c20f3047be5d3321bb2ce53dc7664505460791408a8989ede4a1357a0bdb49fb90a3db6ea2e2893c14a13a15b3ae7 WHIRLPOOL 6b420eb23fbf01ba418d759c275d1f0778c3904c76b78e88d4e82ed948fb44f578f6b171f927e4a4d96cf59eb49b528c9204909951d2cb41ad62804979098f1e |
22 |
DIST subversion-1.9.5.tar.bz2 7904861 SHA256 8a4fc68aff1d18dcb4dd9e460648d24d9e98657fbed496c582929c6b3ce555e5 SHA512 ff7241ffae2506e97f40011242b5d5c6fa665f5463743f9acc52136b59ad84b6db00b60e70c44a9060579db49b818db06da1d1352aaee78e5bfe6ce56f32a2cf WHIRLPOOL 37a124dc2f99bb465b47083de168530f8178305e3208972d56c2c29a93bbf73ded816f742808cf9e7a5d3f13690e48cdd9f800abd85452ad1da4c13d603454f3 |
23 |
+DIST subversion-1.9.6.tar.bz2 7882084 SHA256 dbcbc51fb634082f009121f2cb64350ce32146612787ffb0f7ced351aacaae19 SHA512 bdca362ff45a7f028e2123efbc9bfd41a07e6ebdfcf62627ce24f413e0304b45011bbac1f142ceb1c031a07622c06786982f86cd9109065cae5e26fd689fc11e WHIRLPOOL 27f3701273806c8968aed62eca9f5c13a086785362173b351d0e06fdf5d96ebdf4a461a019016cf7f2ae5b74f4f01c9fabd4706a7ac764d6e23543d87a5aaaa5 |
24 |
|
25 |
diff --git a/dev-vcs/subversion/subversion-1.9.6.ebuild b/dev-vcs/subversion/subversion-1.9.6.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..f14aa4e7d8a |
28 |
--- /dev/null |
29 |
+++ b/dev-vcs/subversion/subversion-1.9.6.ebuild |
30 |
@@ -0,0 +1,510 @@ |
31 |
+# Copyright 1999-2017 Gentoo Foundation |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=6 |
35 |
+PYTHON_COMPAT=( python2_7 ) |
36 |
+USE_RUBY="ruby23 ruby22 ruby21" |
37 |
+DISTUTILS_OPTIONAL=1 |
38 |
+WANT_AUTOMAKE="none" |
39 |
+GENTOO_DEPEND_ON_PERL="no" |
40 |
+ |
41 |
+inherit autotools bash-completion-r1 db-use depend.apache distutils-r1 elisp-common eutils flag-o-matic java-pkg-opt-2 libtool multilib perl-module ruby-single |
42 |
+ |
43 |
+MY_P="${P/_/-}" |
44 |
+DESCRIPTION="Advanced version control system" |
45 |
+HOMEPAGE="http://subversion.apache.org/" |
46 |
+SRC_URI="mirror://apache/${PN}/${MY_P}.tar.bz2" |
47 |
+S="${WORKDIR}/${MY_P}" |
48 |
+ |
49 |
+LICENSE="Subversion GPL-2" |
50 |
+SLOT="0" |
51 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
52 |
+IUSE="apache2 berkdb ctypes-python debug doc +dso extras gnome-keyring +http java kwallet nls perl python ruby sasl test vim-syntax" |
53 |
+ |
54 |
+COMMON_DEPEND=" |
55 |
+ app-arch/bzip2 |
56 |
+ >=dev-db/sqlite-3.7.12 |
57 |
+ >=dev-libs/apr-1.3:1 |
58 |
+ >=dev-libs/apr-util-1.3:1 |
59 |
+ dev-libs/expat |
60 |
+ sys-apps/file |
61 |
+ sys-libs/zlib |
62 |
+ berkdb? ( >=sys-libs/db-4.0.14:= ) |
63 |
+ ctypes-python? ( ${PYTHON_DEPS} ) |
64 |
+ gnome-keyring? ( dev-libs/glib:2 sys-apps/dbus gnome-base/libgnome-keyring ) |
65 |
+ http? ( >=net-libs/serf-1.3.4 ) |
66 |
+ kwallet? ( sys-apps/dbus dev-qt/qtcore:4 dev-qt/qtdbus:4 dev-qt/qtgui:4 kde-frameworks/kdelibs:4 ) |
67 |
+ perl? ( dev-lang/perl:= ) |
68 |
+ python? ( ${PYTHON_DEPS} ) |
69 |
+ ruby? ( ${RUBY_DEPS} ) |
70 |
+ sasl? ( dev-libs/cyrus-sasl )" |
71 |
+RDEPEND="${COMMON_DEPEND} |
72 |
+ apache2? ( www-servers/apache[apache2_modules_dav] ) |
73 |
+ java? ( >=virtual/jre-1.5 ) |
74 |
+ kwallet? ( || ( |
75 |
+ ( >=kde-frameworks/kwallet-5.34.0-r1 ) |
76 |
+ ( kde-apps/kwalletd:4 ) |
77 |
+ ) ) |
78 |
+ nls? ( virtual/libintl ) |
79 |
+ perl? ( dev-perl/URI )" |
80 |
+# Note: ctypesgen doesn't need PYTHON_USEDEP, it's used once |
81 |
+DEPEND="${COMMON_DEPEND} |
82 |
+ !!<sys-apps/sandbox-1.6 |
83 |
+ ctypes-python? ( dev-python/ctypesgen ) |
84 |
+ doc? ( app-doc/doxygen ) |
85 |
+ gnome-keyring? ( virtual/pkgconfig ) |
86 |
+ http? ( virtual/pkgconfig ) |
87 |
+ java? ( >=virtual/jdk-1.5 ) |
88 |
+ kwallet? ( virtual/pkgconfig ) |
89 |
+ nls? ( sys-devel/gettext ) |
90 |
+ test? ( ${PYTHON_DEPS} )" |
91 |
+ |
92 |
+REQUIRED_USE=" |
93 |
+ ctypes-python? ( ${PYTHON_REQUIRED_USE} ) |
94 |
+ python? ( ${PYTHON_REQUIRED_USE} ) |
95 |
+ test? ( |
96 |
+ ${PYTHON_REQUIRED_USE} |
97 |
+ !dso |
98 |
+ )" |
99 |
+ |
100 |
+PATCHES=( |
101 |
+ "${FILESDIR}"/${PN}-1.5.4-interix.patch |
102 |
+ "${FILESDIR}"/${PN}-1.5.6-aix-dso.patch |
103 |
+ "${FILESDIR}"/${PN}-1.8.0-hpux-dso.patch |
104 |
+ "${FILESDIR}"/${PN}-fix-parallel-build-support-for-perl-bindings.patch |
105 |
+ "${FILESDIR}"/${PN}-1.8.1-revert_bdb6check.patch |
106 |
+ "${FILESDIR}"/${PN}-1.8.16-javadoc-nolint.patch |
107 |
+) |
108 |
+ |
109 |
+want_apache |
110 |
+ |
111 |
+pkg_setup() { |
112 |
+ if use berkdb ; then |
113 |
+ local apu_bdb_version="$(${EPREFIX}/usr/bin/apu-1-config --includes \ |
114 |
+ | grep -Eoe '-I${EPREFIX}/usr/include/db[[:digit:]]\.[[:digit:]]' \ |
115 |
+ | sed 's:.*b::')" |
116 |
+ einfo |
117 |
+ if [[ -z "${SVN_BDB_VERSION}" ]] ; then |
118 |
+ if [[ -n "${apu_bdb_version}" ]] ; then |
119 |
+ SVN_BDB_VERSION="${apu_bdb_version}" |
120 |
+ einfo "Matching db version to apr-util" |
121 |
+ else |
122 |
+ SVN_BDB_VERSION="$(db_ver_to_slot "$(db_findver sys-libs/db 2>/dev/null)")" |
123 |
+ einfo "SVN_BDB_VERSION variable isn't set. You can set it to enforce using of specific version of Berkeley DB." |
124 |
+ fi |
125 |
+ fi |
126 |
+ einfo "Using: Berkeley DB ${SVN_BDB_VERSION}" |
127 |
+ einfo |
128 |
+ |
129 |
+ if [[ -n "${apu_bdb_version}" && "${SVN_BDB_VERSION}" != "${apu_bdb_version}" ]]; then |
130 |
+ eerror "APR-Util is linked against Berkeley DB ${apu_bdb_version}, but you are trying" |
131 |
+ eerror "to build Subversion with support for Berkeley DB ${SVN_BDB_VERSION}." |
132 |
+ eerror "Rebuild dev-libs/apr-util or set SVN_BDB_VERSION=\"${apu_bdb_version}\"." |
133 |
+ eerror "Aborting to avoid possible run-time crashes." |
134 |
+ die "Berkeley DB version mismatch" |
135 |
+ fi |
136 |
+ fi |
137 |
+ |
138 |
+ depend.apache_pkg_setup |
139 |
+ |
140 |
+ java-pkg-opt-2_pkg_setup |
141 |
+ |
142 |
+ if ! use http ; then |
143 |
+ ewarn "WebDAV support is disabled. You need WebDAV to" |
144 |
+ ewarn "access repositories through the HTTP protocol." |
145 |
+ ewarn "Consider enabling \"http\" USE flag" |
146 |
+ echo -ne "\a" |
147 |
+ fi |
148 |
+ |
149 |
+ if use debug ; then |
150 |
+ append-cppflags -DSVN_DEBUG -DAP_DEBUG |
151 |
+ fi |
152 |
+ |
153 |
+ # http://mail-archives.apache.org/mod_mbox/subversion-dev/201306.mbox/%3C51C42014.3060700@××××××××.com%3E |
154 |
+ [[ ${CHOST} == *-solaris2* ]] && append-cppflags -D__EXTENSIONS__ |
155 |
+ |
156 |
+ # Allow for custom repository locations. |
157 |
+ SVN_REPOS_LOC="${SVN_REPOS_LOC:-${EPREFIX}/var/svn}" |
158 |
+ |
159 |
+ if use ruby ; then |
160 |
+ local rbslot |
161 |
+ RB_VER="" |
162 |
+ for rbslot in $(sed 's@\([[:digit:]]\+\)\([[:digit:]]\)@\1.\2@g' <<< ${USE_RUBY//ruby}) ; do |
163 |
+ if has_version dev-lang/ruby:${rbslot} ; then |
164 |
+ RB_VER="${rbslot/.}" |
165 |
+ break |
166 |
+ fi |
167 |
+ done |
168 |
+ [[ -z "${RB_VER}" ]] && die "No useable ruby version found" |
169 |
+ fi |
170 |
+} |
171 |
+ |
172 |
+src_prepare() { |
173 |
+ default |
174 |
+ |
175 |
+ fperms +x build/transform_libtool_scripts.sh |
176 |
+ |
177 |
+ sed -i \ |
178 |
+ -e "s/\(BUILD_RULES=.*\) bdb-test\(.*\)/\1\2/g" \ |
179 |
+ -e "s/\(BUILD_RULES=.*\) test\(.*\)/\1\2/g" configure.ac |
180 |
+ |
181 |
+ # this bites us in particular on Solaris |
182 |
+ sed -i -e '1c\#!/usr/bin/env sh' build/transform_libtool_scripts.sh || \ |
183 |
+ die "/bin/sh is not POSIX shell!" |
184 |
+ |
185 |
+ eautoconf |
186 |
+ elibtoolize |
187 |
+ |
188 |
+ sed -e 's/\(libsvn_swig_py\)-\(1\.la\)/\1-$(EPYTHON)-\2/g' \ |
189 |
+ -i build-outputs.mk || die "sed failed" |
190 |
+ |
191 |
+ if use python ; then |
192 |
+ # XXX: make python_copy_sources accept path |
193 |
+ S=${S}/subversion/bindings/swig/python python_copy_sources |
194 |
+ rm -r "${S}"/subversion/bindings/swig/python || die |
195 |
+ fi |
196 |
+} |
197 |
+ |
198 |
+src_configure() { |
199 |
+ local myconf=( |
200 |
+ --libdir="${EPREFIX%/}/usr/$(get_libdir)" |
201 |
+ $(use_with apache2 apache-libexecdir) |
202 |
+ $(use_with apache2 apxs "${APXS}") |
203 |
+ $(use_with berkdb berkeley-db "db.h:${EPREFIX%/}/usr/include/db${SVN_BDB_VERSION}::db-${SVN_BDB_VERSION}") |
204 |
+ $(use_with ctypes-python ctypesgen "${EPREFIX%/}/usr") |
205 |
+ $(use_enable dso runtime-module-search) |
206 |
+ $(use_with gnome-keyring) |
207 |
+ $(use_enable java javahl) |
208 |
+ $(use_with java jdk "${JAVA_HOME}") |
209 |
+ $(use_with kwallet) |
210 |
+ $(use_enable nls) |
211 |
+ $(use_with sasl) |
212 |
+ $(use_with http serf) |
213 |
+ --with-apr="${EPREFIX%/}/usr/bin/apr-1-config" |
214 |
+ --with-apr-util="${EPREFIX%/}/usr/bin/apu-1-config" |
215 |
+ --disable-experimental-libtool |
216 |
+ --without-jikes |
217 |
+ --disable-mod-activation |
218 |
+ --disable-static |
219 |
+ ) |
220 |
+ |
221 |
+ if use python || use perl || use ruby; then |
222 |
+ myconf+=( --with-swig ) |
223 |
+ else |
224 |
+ myconf+=( --without-swig ) |
225 |
+ fi |
226 |
+ |
227 |
+ if use java ; then |
228 |
+ myconf+=( --without-junit ) |
229 |
+ fi |
230 |
+ |
231 |
+ case ${CHOST} in |
232 |
+ *-aix*) |
233 |
+ # avoid recording immediate path to sharedlibs into executables |
234 |
+ append-ldflags -Wl,-bnoipath |
235 |
+ ;; |
236 |
+ *-cygwin*) |
237 |
+ # no LD_PRELOAD support, no undefined symbols |
238 |
+ myconf+=( --disable-local-library-preloading LT_LDFLAGS=-no-undefined ) |
239 |
+ ;; |
240 |
+ *-interix*) |
241 |
+ # loader crashes on the LD_PRELOADs... |
242 |
+ myconf+=( --disable-local-library-preloading ) |
243 |
+ ;; |
244 |
+ *-solaris*) |
245 |
+ # need -lintl to link |
246 |
+ use nls && append-libs intl |
247 |
+ # this breaks installation, on x64 echo replacement is 32-bits |
248 |
+ myconf+=( --disable-local-library-preloading ) |
249 |
+ ;; |
250 |
+ *-mint*) |
251 |
+ myconf+=( --enable-all-static --disable-local-library-preloading ) |
252 |
+ ;; |
253 |
+ *) |
254 |
+ # inject LD_PRELOAD entries for easy in-tree development |
255 |
+ myconf+=( --enable-local-library-preloading ) |
256 |
+ ;; |
257 |
+ esac |
258 |
+ |
259 |
+ #version 1.7.7 again tries to link against the older installed version and fails, when trying to |
260 |
+ #compile for x86 on amd64, so workaround this issue again |
261 |
+ #check newer versions, if this is still/again needed |
262 |
+ myconf+=( --disable-disallowing-of-undefined-references ) |
263 |
+ |
264 |
+ # for build-time scripts |
265 |
+ if use ctypes-python || use python || use test; then |
266 |
+ python_setup |
267 |
+ fi |
268 |
+ |
269 |
+ if use python && [[ ${CHOST} == *-darwin* ]] ; then |
270 |
+ export ac_cv_python_link="$(tc-getCC) "'$(PYTHON_CFLAGS) -bundle -undefined dynamic_lookup $(PYTHON_LIBS)' |
271 |
+ export ac_cv_python_libs='$(PYTHON_CFLAGS) -bundle -undefined dynamic_lookup $(PYTHON_LIBS)' |
272 |
+ export ac_cv_python_compile="$(tc-getCC)" |
273 |
+ fi |
274 |
+ |
275 |
+ # allow overriding Python include directory |
276 |
+ ac_cv_path_RUBY=$(usex ruby "${EPREFIX%/}/usr/bin/ruby${RB_VER}" "none") \ |
277 |
+ ac_cv_path_RDOC=$(usex ruby "${EPREFIX%/}/usr/bin/rdoc${RB_VER}" "none") \ |
278 |
+ ac_cv_python_includes='-I$(PYTHON_INCLUDEDIR)' \ |
279 |
+ econf "${myconf[@]}" |
280 |
+} |
281 |
+ |
282 |
+src_compile() { |
283 |
+ emake local-all |
284 |
+ |
285 |
+ if use ctypes-python ; then |
286 |
+ # pre-generate .py files |
287 |
+ use ctypes-python && emake ctypes-python |
288 |
+ |
289 |
+ pushd subversion/bindings/ctypes-python >/dev/null || die |
290 |
+ distutils-r1_src_compile |
291 |
+ popd >/dev/null || die |
292 |
+ fi |
293 |
+ |
294 |
+ if use python ; then |
295 |
+ swig_py_compile() { |
296 |
+ local p=subversion/bindings/swig/python |
297 |
+ rm -f ${p} || die |
298 |
+ ln -s "${BUILD_DIR}" ${p} || die |
299 |
+ |
300 |
+ python_export PYTHON_INCLUDEDIR |
301 |
+ emake swig-py \ |
302 |
+ swig_pydir="$(python_get_sitedir)/libsvn" \ |
303 |
+ swig_pydir_extra="$(python_get_sitedir)/svn" |
304 |
+ } |
305 |
+ |
306 |
+ # this will give us proper BUILD_DIR for symlinking |
307 |
+ BUILD_DIR=python \ |
308 |
+ python_foreach_impl swig_py_compile |
309 |
+ fi |
310 |
+ |
311 |
+ if use perl ; then |
312 |
+ emake swig-pl |
313 |
+ fi |
314 |
+ |
315 |
+ if use ruby ; then |
316 |
+ emake swig-rb |
317 |
+ fi |
318 |
+ |
319 |
+ if use java ; then |
320 |
+ emake -j1 JAVAC_FLAGS="$(java-pkg_javac-args) -encoding iso8859-1" javahl |
321 |
+ fi |
322 |
+ |
323 |
+ if use extras ; then |
324 |
+ emake tools |
325 |
+ fi |
326 |
+ |
327 |
+ if use doc ; then |
328 |
+ doxygen doc/doxygen.conf || die "Building of Subversion HTML documentation failed" |
329 |
+ |
330 |
+ if use java; then |
331 |
+ emake doc-javahl |
332 |
+ fi |
333 |
+ fi |
334 |
+} |
335 |
+ |
336 |
+src_test() { |
337 |
+ if has_version ~${CATEGORY}/${P} ; then |
338 |
+ default |
339 |
+ |
340 |
+ if use ctypes-python ; then |
341 |
+ python_test() { |
342 |
+ "${PYTHON}" subversion/bindings/ctypes-python/test/run_all.py \ |
343 |
+ || die "ctypes-python tests fail with ${EPYTHON}" |
344 |
+ } |
345 |
+ |
346 |
+ distutils-r1_src_test |
347 |
+ fi |
348 |
+ |
349 |
+ if use python ; then |
350 |
+ swig_py_test() { |
351 |
+ pushd "${BUILD_DIR}" >/dev/null || die |
352 |
+ "${PYTHON}" tests/run_all.py || die "swig-py tests fail with ${EPYTHON}" |
353 |
+ popd >/dev/null || die |
354 |
+ } |
355 |
+ |
356 |
+ BUILD_DIR=subversion/bindings/swig/python \ |
357 |
+ python_foreach_impl swig_py_test |
358 |
+ fi |
359 |
+ else |
360 |
+ ewarn "The test suite shows errors when there is an older version of" |
361 |
+ ewarn "${CATEGORY}/${PN} installed. Please install =${CATEGORY}/${P}*" |
362 |
+ ewarn "before running the test suite." |
363 |
+ ewarn "Test suite skipped." |
364 |
+ fi |
365 |
+} |
366 |
+ |
367 |
+src_install() { |
368 |
+ emake -j1 DESTDIR="${D}" local-install |
369 |
+ |
370 |
+ if use ctypes-python ; then |
371 |
+ pushd subversion/bindings/ctypes-python >/dev/null || die |
372 |
+ distutils-r1_src_install |
373 |
+ popd >/dev/null || die |
374 |
+ fi |
375 |
+ |
376 |
+ if use python ; then |
377 |
+ swig_py_install() { |
378 |
+ local p=subversion/bindings/swig/python |
379 |
+ rm -f ${p} || die |
380 |
+ ln -s "${BUILD_DIR}" ${p} || die |
381 |
+ |
382 |
+ emake \ |
383 |
+ DESTDIR="${D}" \ |
384 |
+ swig_pydir="$(python_get_sitedir)/libsvn" \ |
385 |
+ swig_pydir_extra="$(python_get_sitedir)/svn" \ |
386 |
+ install-swig-py |
387 |
+ } |
388 |
+ |
389 |
+ BUILD_DIR=python \ |
390 |
+ python_foreach_impl swig_py_install |
391 |
+ fi |
392 |
+ |
393 |
+ if use perl ; then |
394 |
+ emake DESTDIR="${D}" INSTALLDIRS="vendor" install-swig-pl |
395 |
+ perl_delete_localpod |
396 |
+ find "${ED}" "(" -name .packlist -o -name "*.bs" ")" -delete |
397 |
+ fi |
398 |
+ |
399 |
+ if use ruby ; then |
400 |
+ emake DESTDIR="${D}" install-swig-rb |
401 |
+ fi |
402 |
+ |
403 |
+ if use java ; then |
404 |
+ emake DESTDIR="${D}" install-javahl |
405 |
+ java-pkg_regso "${ED%/}"/usr/$(get_libdir)/libsvnjavahl*$(get_libname) |
406 |
+ java-pkg_dojar "${ED%/}"/usr/$(get_libdir)/svn-javahl/svn-javahl.jar |
407 |
+ rm -fr "${ED%/}"/usr/$(get_libdir)/svn-javahl/*.jar |
408 |
+ fi |
409 |
+ |
410 |
+ # Install Apache module configuration. |
411 |
+ if use apache2 ; then |
412 |
+ keepdir "${APACHE_MODULES_CONFDIR}" |
413 |
+ insinto "${APACHE_MODULES_CONFDIR}" |
414 |
+ doins "${FILESDIR}/47_mod_dav_svn.conf" |
415 |
+ fi |
416 |
+ |
417 |
+ # Install Bash Completion, bug 43179. |
418 |
+ newbashcomp tools/client-side/bash_completion svn |
419 |
+ bashcomp_alias svn svn{admin,dumpfilter,look,sync,version} |
420 |
+ rm -f tools/client-side/bash_completion |
421 |
+ |
422 |
+ # Install hot backup script, bug 54304. |
423 |
+ newbin tools/backup/hot-backup.py svn-hot-backup |
424 |
+ rm -fr tools/backup |
425 |
+ |
426 |
+ # Install svnserve init-script and xinet.d snippet, bug 43245. |
427 |
+ newinitd "${FILESDIR}"/svnserve.initd3 svnserve |
428 |
+ newconfd "${FILESDIR}"/svnserve.confd svnserve |
429 |
+ insinto /etc/xinetd.d |
430 |
+ newins "${FILESDIR}"/svnserve.xinetd svnserve |
431 |
+ |
432 |
+ #adjust default user and group with disabled apache2 USE flag, bug 381385 |
433 |
+ use apache2 || sed -e "s\USER:-apache\USER:-svn\g" \ |
434 |
+ -e "s\GROUP:-apache\GROUP:-svnusers\g" \ |
435 |
+ -i "${ED%/}"/etc/init.d/svnserve || die |
436 |
+ use apache2 || sed -e "0,/apache/s//svn/" \ |
437 |
+ -e "s:apache:svnusers:" \ |
438 |
+ -i "${ED%/}"/etc/xinetd.d/svnserve || die |
439 |
+ |
440 |
+ # Install documentation. |
441 |
+ dodoc CHANGES COMMITTERS README |
442 |
+ dodoc tools/xslt/svnindex.{css,xsl} |
443 |
+ rm -fr tools/xslt |
444 |
+ |
445 |
+ # Install extra files. |
446 |
+ if use extras ; then |
447 |
+ cat <<- EOF > 80subversion-extras |
448 |
+ PATH="${EPREFIX}/usr/$(get_libdir)/subversion/bin" |
449 |
+ ROOTPATH="${EPREFIX}/usr/$(get_libdir)/subversion/bin" |
450 |
+ EOF |
451 |
+ doenvd 80subversion-extras |
452 |
+ |
453 |
+ emake DESTDIR="${D}" toolsdir="/usr/$(get_libdir)/subversion/bin" install-tools |
454 |
+ |
455 |
+ find tools "(" -name "*.bat" -o -name "*.in" -o -name ".libs" ")" -print0 | xargs -0 rm -fr |
456 |
+ rm -fr tools/client-side/svnmucc |
457 |
+ rm -fr tools/server-side/{svn-populate-node-origins-index,svnauthz-validate}* |
458 |
+ rm -fr tools/{buildbot,dev,diff,po} |
459 |
+ |
460 |
+ insinto /usr/share/${PN} |
461 |
+ find tools -name '*.py' -exec sed -i -e '1s:python:&2:' {} + || die |
462 |
+ doins -r tools |
463 |
+ fi |
464 |
+ |
465 |
+ if use doc ; then |
466 |
+ docinto html |
467 |
+ dodoc -r doc/doxygen/html/* |
468 |
+ |
469 |
+ if use java ; then |
470 |
+ java-pkg_dojavadoc doc/javadoc |
471 |
+ fi |
472 |
+ fi |
473 |
+ |
474 |
+ prune_libtool_files --all |
475 |
+ |
476 |
+ cd "${ED%/}"/usr/share/locale |
477 |
+ for i in * ; do |
478 |
+ [[ ${i} == *$LINGUAS* ]] || { rm -r ${i} || die ; } |
479 |
+ done |
480 |
+} |
481 |
+ |
482 |
+pkg_preinst() { |
483 |
+ # Compare versions of Berkeley DB, bug 122877. |
484 |
+ if use berkdb && [[ -f "${EROOT%/}/usr/bin/svn" ]] ; then |
485 |
+ OLD_BDB_VERSION="$(scanelf -nq "${EROOT%/}/usr/$(get_libdir)/libsvn_subr-1$(get_libname 0)" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")" |
486 |
+ NEW_BDB_VERSION="$(scanelf -nq "${ED%/}/usr/$(get_libdir)/libsvn_subr-1$(get_libname 0)" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")" |
487 |
+ if [[ "${OLD_BDB_VERSION}" != "${NEW_BDB_VERSION}" ]] ; then |
488 |
+ CHANGED_BDB_VERSION="1" |
489 |
+ fi |
490 |
+ fi |
491 |
+} |
492 |
+ |
493 |
+pkg_postinst() { |
494 |
+ if [[ -n "${CHANGED_BDB_VERSION}" ]] ; then |
495 |
+ ewarn "You upgraded from an older version of Berkeley DB and may experience" |
496 |
+ ewarn "problems with your repository. Run the following commands as root to fix it:" |
497 |
+ ewarn " db4_recover -h ${SVN_REPOS_LOC}/repos" |
498 |
+ ewarn " chown -Rf apache:apache ${SVN_REPOS_LOC}/repos" |
499 |
+ fi |
500 |
+ |
501 |
+ ewarn "If you run subversion as a daemon, you will need to restart it to avoid module mismatches." |
502 |
+} |
503 |
+ |
504 |
+pkg_postrm() { |
505 |
+ : |
506 |
+} |
507 |
+ |
508 |
+pkg_config() { |
509 |
+ # Remember: Don't use ${EROOT}${SVN_REPOS_LOC} since ${SVN_REPOS_LOC} |
510 |
+ # already has EPREFIX in it |
511 |
+ einfo "Initializing the database in ${SVN_REPOS_LOC}..." |
512 |
+ if [[ -e "${SVN_REPOS_LOC}/repos" ]] ; then |
513 |
+ echo "A Subversion repository already exists and I will not overwrite it." |
514 |
+ echo "Delete \"${SVN_REPOS_LOC}/repos\" first if you're sure you want to have a clean version." |
515 |
+ else |
516 |
+ mkdir -p "${SVN_REPOS_LOC}/conf" |
517 |
+ |
518 |
+ einfo "Populating repository directory..." |
519 |
+ # Create initial repository. |
520 |
+ "${EROOT}usr/bin/svnadmin" create "${SVN_REPOS_LOC}/repos" |
521 |
+ |
522 |
+ einfo "Setting repository permissions..." |
523 |
+ SVNSERVE_USER="$(. "${EROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_USER}")" |
524 |
+ SVNSERVE_GROUP="$(. "${EROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_GROUP}")" |
525 |
+ if use apache2 ; then |
526 |
+ [[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="apache" |
527 |
+ [[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="apache" |
528 |
+ else |
529 |
+ [[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="svn" |
530 |
+ [[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="svnusers" |
531 |
+ fi |
532 |
+ chmod -Rf go-rwx "${SVN_REPOS_LOC}/conf" |
533 |
+ chmod -Rf o-rwx "${SVN_REPOS_LOC}/repos" |
534 |
+ echo "Please create \"${SVNSERVE_GROUP}\" group if it does not exist yet." |
535 |
+ echo "Afterwards please create \"${SVNSERVE_USER}\" user with homedir \"${SVN_REPOS_LOC}\"" |
536 |
+ echo "and as part of the \"${SVNSERVE_GROUP}\" group if it does not exist yet." |
537 |
+ echo "Finally, execute \"chown -Rf ${SVNSERVE_USER}:${SVNSERVE_GROUP} ${SVN_REPOS_LOC}/repos\"" |
538 |
+ echo "to finish the configuration." |
539 |
+ fi |
540 |
+} |