Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-vcs/subversion/
Date: Tue, 15 Dec 2015 12:40:31
Message-Id: 1450183210.34f7c4f4cd884371c2ba18c2196b7ff90636eaf7.polynomial-c@gentoo
1 commit: 34f7c4f4cd884371c2ba18c2196b7ff90636eaf7
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 15 12:35:37 2015 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 15 12:40:10 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34f7c4f4
7
8 dev-vcs/subversion: Bump to versions 1.8.15 and 1.9.3
9
10 Package-Manager: portage-2.2.26
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 dev-vcs/subversion/Manifest | 2 +
14 dev-vcs/subversion/subversion-1.8.15.ebuild | 504 ++++++++++++++++++++++++++++
15 dev-vcs/subversion/subversion-1.9.3.ebuild | 497 +++++++++++++++++++++++++++
16 3 files changed, 1003 insertions(+)
17
18 diff --git a/dev-vcs/subversion/Manifest b/dev-vcs/subversion/Manifest
19 index 51bdf6b..584ca02 100644
20 --- a/dev-vcs/subversion/Manifest
21 +++ b/dev-vcs/subversion/Manifest
22 @@ -1,4 +1,6 @@
23 DIST subversion-1.7.21.tar.bz2 5996788 SHA256 efeb349c5ba6d529ff8e9730a2abd9cb70f276b249238a6b7f27ba7da1190620 SHA512 d0ba3f0771c523b44efd2f12c1d101d720b7d834bc6bef12b8e47789a2fb76a2d399c041c1cdcd0e04411c29abfb9b2974ca9df6f2389f8a01d82e7738881975 WHIRLPOOL 0d12286ab0e5043f28622529ff5d2af5a1c8a61ef65227cc069cf93de35479bf79433fa201417456499fa16f11b03474127b66547b9c2e2a8c0d209fa2108e59
24 DIST subversion-1.8.14.tar.bz2 6850562 SHA256 7f3883cdfcad4174e06dd94d6e3e8ec91856823268eebe60c924be76f5229a1f SHA512 95e1501494f5355f0c331fbe81422ca8f0b4d69e6d303125f4a5aac5f6fe946e958ca76fc96fe6b096cc0a530634ca103bf35622c12af90489ae17d0b9a9d987 WHIRLPOOL 0323746d40830109e081e002f499f1c73c15fe77acd4f1c9b790ae12440b3361d189f1d5212d49ba6f6c449297aec3513761375f748800686892607705310a56
25 +DIST subversion-1.8.15.tar.bz2 6917489 SHA256 cf98a1f7686cfd6a15cbcde8379f15730fd5e00a3573cdb035a6491dbcccc82c SHA512 f5a33b0b2c87eae48a3c21c41164786e92aa061e774e9cc951bc93c1936db58a5d901904ad9dc28e85926f38c7d75645f39bb7e8543333943d3883ee9718aeb0 WHIRLPOOL 101c00a059e350d4999c37977059a439c5253d7ef185664ff8133b152bccdf386a8556f6d47390246ac742a4b4b77c89abd06e5cce76b6e276db6cc55f205374
26 DIST subversion-1.9.1.tar.bz2 7747098 SHA256 91548f9fce38bdb2958848f54fd8007e357c22db09b7ef4763fc85cbcbc2c913 SHA512 57b8f913aefb06bbeac065ae6bb8113853018bdaefdb80c74a337479b9f3cf89834e8656591dbe8ab66b2cadf5f99f1036ff826a886ed6a9f643d6e5adb6a972 WHIRLPOOL 58bd1e41a7643befe6e9800ce0a270379b980746b14eda2c2230f96ea9e07b17ab115959e5b61f324f51055697c898526ac3b4be9b883147b1156f7c20b1f010
27 DIST subversion-1.9.2.tar.bz2 7910994 SHA256 023da881139b4514647b6f8a830a244071034efcaad8c8e98c6b92393122b4eb SHA512 debe1be153a7abd89d1c0c8d665725a9003e280a7fcde666c21818627bef0c47c30b27560aaa5a9a75251ba0d9c1490613cc79237704f4777a3cad0def52f08a WHIRLPOOL 3a5ff8067079d7e81f9414e3858afb98839cbdcb989b086d1696b4f0eac46ae2ed7c9933d3fa232431ad32578bf2fab986052a05dac7c528415bb5057fa5d213
28 +DIST subversion-1.9.3.tar.bz2 7909193 SHA256 8bbf6bb125003d88ee1c22935a36b7b1ab7d957e0c8b5fbfe5cb6310b6e86ae0 SHA512 2197c5076e688ac09e63c345e45f2a5ee2999426edb76a91c6b92d229fa8c87772d76e99003a4438035771b4c11c502de399d44f4f42c0d759dcbd01b628a4cb WHIRLPOOL d0b515c53384da558d0838a78f3be75e3bac643f5d95e536e65e0034e1814c91e0d2c218dd41bb5ee76447d47a0484105a25da1abef7851e7461a2a84c320a79
29
30 diff --git a/dev-vcs/subversion/subversion-1.8.15.ebuild b/dev-vcs/subversion/subversion-1.8.15.ebuild
31 new file mode 100644
32 index 0000000..ffe2396
33 --- /dev/null
34 +++ b/dev-vcs/subversion/subversion-1.8.15.ebuild
35 @@ -0,0 +1,504 @@
36 +# Copyright 1999-2015 Gentoo Foundation
37 +# Distributed under the terms of the GNU General Public License v2
38 +# $Id$
39 +
40 +EAPI=5
41 +PYTHON_COMPAT=( python2_7 )
42 +USE_RUBY="ruby22 ruby21 ruby20 ruby19"
43 +DISTUTILS_OPTIONAL=1
44 +WANT_AUTOMAKE="none"
45 +GENTOO_DEPEND_ON_PERL="no"
46 +
47 +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
48 +
49 +MY_P="${P/_/-}"
50 +DESCRIPTION="Advanced version control system"
51 +HOMEPAGE="http://subversion.apache.org/"
52 +SRC_URI="mirror://apache/${PN}/${MY_P}.tar.bz2"
53 +S="${WORKDIR}/${MY_P}"
54 +
55 +LICENSE="Subversion GPL-2"
56 +SLOT="0"
57 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
58 +IUSE="apache2 berkdb ctypes-python debug doc +dso extras gnome-keyring +http java kde nls perl python ruby sasl test vim-syntax"
59 +
60 +COMMON_DEPEND=">=dev-db/sqlite-3.7.12
61 + >=dev-libs/apr-1.3:1
62 + >=dev-libs/apr-util-1.3:1
63 + dev-libs/expat
64 + sys-apps/file
65 + sys-libs/zlib
66 + app-arch/bzip2
67 + berkdb? ( >=sys-libs/db-4.0.14:= )
68 + ctypes-python? ( ${PYTHON_DEPS} )
69 + gnome-keyring? ( dev-libs/glib:2 sys-apps/dbus gnome-base/libgnome-keyring )
70 + kde? ( sys-apps/dbus dev-qt/qtcore:4 dev-qt/qtdbus:4 dev-qt/qtgui:4 >=kde-base/kdelibs-4:4 )
71 + perl? ( dev-lang/perl:= )
72 + python? ( ${PYTHON_DEPS} )
73 + ruby? ( ${RUBY_DEPS} )
74 + sasl? ( dev-libs/cyrus-sasl )
75 + http? ( >=net-libs/serf-1.2.1 )"
76 +RDEPEND="${COMMON_DEPEND}
77 + apache2? ( www-servers/apache[apache2_modules_dav] )
78 + java? ( >=virtual/jre-1.5 )
79 + kde? ( kde-apps/kwalletd:4 )
80 + nls? ( virtual/libintl )
81 + perl? ( dev-perl/URI )"
82 +# Note: ctypesgen doesn't need PYTHON_USEDEP, it's used once
83 +DEPEND="${COMMON_DEPEND}
84 + !!<sys-apps/sandbox-1.6
85 + ctypes-python? ( dev-python/ctypesgen )
86 + doc? ( app-doc/doxygen )
87 + gnome-keyring? ( virtual/pkgconfig )
88 + http? ( virtual/pkgconfig )
89 + java? ( >=virtual/jdk-1.5 )
90 + kde? ( virtual/pkgconfig )
91 + nls? ( sys-devel/gettext )
92 + test? ( ${PYTHON_DEPS} )"
93 +
94 +REQUIRED_USE="
95 + ctypes-python? ( ${PYTHON_REQUIRED_USE} )
96 + python? ( ${PYTHON_REQUIRED_USE} )
97 + test? (
98 + ${PYTHON_REQUIRED_USE}
99 + !dso
100 + )"
101 +
102 +want_apache
103 +
104 +pkg_setup() {
105 + if use berkdb ; then
106 + local apu_bdb_version="$(${EPREFIX}/usr/bin/apu-1-config --includes \
107 + | grep -Eoe '-I${EPREFIX}/usr/include/db[[:digit:]]\.[[:digit:]]' \
108 + | sed 's:.*b::')"
109 + einfo
110 + if [[ -z "${SVN_BDB_VERSION}" ]] ; then
111 + if [[ -n "${apu_bdb_version}" ]] ; then
112 + SVN_BDB_VERSION="${apu_bdb_version}"
113 + einfo "Matching db version to apr-util"
114 + else
115 + SVN_BDB_VERSION="$(db_ver_to_slot "$(db_findver sys-libs/db 2>/dev/null)")"
116 + einfo "SVN_BDB_VERSION variable isn't set. You can set it to enforce using of specific version of Berkeley DB."
117 + fi
118 + fi
119 + einfo "Using: Berkeley DB ${SVN_BDB_VERSION}"
120 + einfo
121 +
122 + if [[ -n "${apu_bdb_version}" && "${SVN_BDB_VERSION}" != "${apu_bdb_version}" ]]; then
123 + eerror "APR-Util is linked against Berkeley DB ${apu_bdb_version}, but you are trying"
124 + eerror "to build Subversion with support for Berkeley DB ${SVN_BDB_VERSION}."
125 + eerror "Rebuild dev-libs/apr-util or set SVN_BDB_VERSION=\"${apu_bdb_version}\"."
126 + eerror "Aborting to avoid possible run-time crashes."
127 + die "Berkeley DB version mismatch"
128 + fi
129 + fi
130 +
131 + depend.apache_pkg_setup
132 +
133 + java-pkg-opt-2_pkg_setup
134 +
135 + if ! use http ; then
136 + ewarn "WebDAV support is disabled. You need WebDAV to"
137 + ewarn "access repositories through the HTTP protocol."
138 + ewarn "Consider enabling \"http\" USE flag"
139 + echo -ne "\a"
140 + fi
141 +
142 + if use debug ; then
143 + append-cppflags -DSVN_DEBUG -DAP_DEBUG
144 + fi
145 +
146 + # http://mail-archives.apache.org/mod_mbox/subversion-dev/201306.mbox/%3C51C42014.3060700@××××××××.com%3E
147 + [[ ${CHOST} == *-solaris2* ]] && append-cppflags -D__EXTENSIONS__
148 +
149 + # Allow for custom repository locations.
150 + SVN_REPOS_LOC="${SVN_REPOS_LOC:-${EPREFIX}/var/svn}"
151 +
152 + if use ruby ; then
153 + local rbslot
154 + RB_VER=""
155 + for rbslot in $(sed 's@\([[:digit:]]\+\)\([[:digit:]]\)@\1.\2@' <<< ${USE_RUBY/ruby}) ; do
156 + if has_version dev-lang/ruby:${rbslot} ; then
157 + RB_VER="${rbslot/.}"
158 + break
159 + fi
160 + done
161 + [[ -z "${RB_VER}" ]] && die "No useable ruby version found"
162 + fi
163 +}
164 +
165 +src_prepare() {
166 + epatch "${FILESDIR}"/${PN}-1.5.4-interix.patch \
167 + "${FILESDIR}"/${PN}-1.5.6-aix-dso.patch \
168 + "${FILESDIR}"/${PN}-1.8.0-hpux-dso.patch \
169 + "${FILESDIR}"/${PN}-fix-parallel-build-support-for-perl-bindings.patch \
170 + "${FILESDIR}"/${PN}-1.8.1-revert_bdb6check.patch
171 + epatch_user
172 +
173 + fperms +x build/transform_libtool_scripts.sh
174 +
175 + sed -i \
176 + -e "s/\(BUILD_RULES=.*\) bdb-test\(.*\)/\1\2/g" \
177 + -e "s/\(BUILD_RULES=.*\) test\(.*\)/\1\2/g" configure.ac
178 +
179 + # this bites us in particular on Solaris
180 + sed -i -e '1c\#!/usr/bin/env sh' build/transform_libtool_scripts.sh || \
181 + die "/bin/sh is not POSIX shell!"
182 +
183 + eautoconf
184 + elibtoolize
185 +
186 + sed -e 's/\(libsvn_swig_py\)-\(1\.la\)/\1-$(EPYTHON)-\2/g' \
187 + -i build-outputs.mk || die "sed failed"
188 +
189 + if use python ; then
190 + if [[ ${CHOST} == *-darwin* ]] ; then
191 + # http://mail-archives.apache.org/mod_mbox/subversion-dev/201306.mbox/%3C20130614113003.GA19257@××××××.local2%3E
192 + # in short, we don't have gnome-keyring stuff here, patch
193 + # borrowed from MacPorts
194 + epatch "${FILESDIR}"/${PN}-1.8.5-swig-python-no-gnome-keyring.patch
195 + fi
196 +
197 + # XXX: make python_copy_sources accept path
198 + S=${S}/subversion/bindings/swig/python python_copy_sources
199 + rm -r "${S}"/subversion/bindings/swig/python || die
200 + fi
201 +}
202 +
203 +src_configure() {
204 + local myconf
205 +
206 + if use python || use perl || use ruby; then
207 + myconf+=" --with-swig"
208 + else
209 + myconf+=" --without-swig"
210 + fi
211 +
212 + if use java ; then
213 + myconf+=" --without-junit"
214 + fi
215 +
216 + case ${CHOST} in
217 + *-aix*)
218 + # avoid recording immediate path to sharedlibs into executables
219 + append-ldflags -Wl,-bnoipath
220 + ;;
221 + *-interix*)
222 + # loader crashes on the LD_PRELOADs...
223 + myconf+=" --disable-local-library-preloading"
224 + ;;
225 + *-solaris*)
226 + # need -lintl to link
227 + use nls && append-libs intl
228 + # this breaks installation, on x64 echo replacement is 32-bits
229 + myconf+=" --disable-local-library-preloading"
230 + ;;
231 + *-mint*)
232 + myconf+=" --enable-all-static --disable-local-library-preloading"
233 + ;;
234 + *)
235 + # inject LD_PRELOAD entries for easy in-tree development
236 + myconf+=" --enable-local-library-preloading"
237 + ;;
238 + esac
239 +
240 + #version 1.7.7 again tries to link against the older installed version and fails, when trying to
241 + #compile for x86 on amd64, so workaround this issue again
242 + #check newer versions, if this is still/again needed
243 + myconf+=" --disable-disallowing-of-undefined-references"
244 +
245 + # for build-time scripts
246 + if use ctypes-python || use python || use test; then
247 + python_setup
248 + fi
249 +
250 + if use python && [[ ${CHOST} == *-darwin* ]] ; then
251 + export ac_cv_python_link="$(tc-getCC) "'$(PYTHON_CFLAGS) -bundle -undefined dynamic_lookup $(PYTHON_LIBS)'
252 + export ac_cv_python_libs='$(PYTHON_CFLAGS) -bundle -undefined dynamic_lookup $(PYTHON_LIBS)'
253 + export ac_cv_python_compile="$(tc-getCC)"
254 + fi
255 +
256 + # allow overriding Python include directory
257 + ac_cv_path_RUBY=$(usex ruby "${EPREFIX}/usr/bin/ruby${RB_VER}" "none") \
258 + ac_cv_path_RDOC=$(usex ruby "${EPREFIX}/usr/bin/rdoc${RB_VER}" "none") \
259 + ac_cv_python_includes='-I$(PYTHON_INCLUDEDIR)' \
260 + econf --libdir="${EPREFIX}/usr/$(get_libdir)" \
261 + $(use_with apache2 apache-libexecdir) \
262 + $(use_with apache2 apxs "${APXS}") \
263 + $(use_with berkdb berkeley-db "db.h:${EPREFIX}/usr/include/db${SVN_BDB_VERSION}::db-${SVN_BDB_VERSION}") \
264 + $(use_with ctypes-python ctypesgen "${EPREFIX}/usr") \
265 + $(use_enable dso runtime-module-search) \
266 + $(use_with gnome-keyring) \
267 + $(use_enable java javahl) \
268 + $(use_with java jdk "${JAVA_HOME}") \
269 + $(use_with kde kwallet) \
270 + $(use_enable nls) \
271 + $(use_with sasl) \
272 + $(use_with http serf) \
273 + ${myconf} \
274 + --with-apr="${EPREFIX}/usr/bin/apr-1-config" \
275 + --with-apr-util="${EPREFIX}/usr/bin/apu-1-config" \
276 + --disable-experimental-libtool \
277 + --without-jikes \
278 + --disable-mod-activation \
279 + --disable-static
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 + dohtml -r doc/doxygen/html/*
467 +
468 + if use java ; then
469 + java-pkg_dojavadoc doc/javadoc
470 + fi
471 + fi
472 +
473 + prune_libtool_files --all
474 +
475 + cd "${ED}"usr/share/locale
476 + for i in * ; do
477 + [[ $i == *$LINGUAS* ]] || { rm -r $i || die ; }
478 + done
479 +}
480 +
481 +pkg_preinst() {
482 + # Compare versions of Berkeley DB, bug 122877.
483 + if use berkdb && [[ -f "${EROOT}usr/bin/svn" ]] ; then
484 + 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/")"
485 + 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/")"
486 + if [[ "${OLD_BDB_VERSION}" != "${NEW_BDB_VERSION}" ]] ; then
487 + CHANGED_BDB_VERSION="1"
488 + fi
489 + fi
490 +}
491 +
492 +pkg_postinst() {
493 + if [[ -n "${CHANGED_BDB_VERSION}" ]] ; then
494 + ewarn "You upgraded from an older version of Berkeley DB and may experience"
495 + ewarn "problems with your repository. Run the following commands as root to fix it:"
496 + ewarn " db4_recover -h ${SVN_REPOS_LOC}/repos"
497 + ewarn " chown -Rf apache:apache ${SVN_REPOS_LOC}/repos"
498 + fi
499 +
500 + ewarn "If you run subversion as a daemon, you will need to restart it to avoid module mismatches."
501 +}
502 +
503 +pkg_postrm() {
504 + :
505 +}
506 +
507 +pkg_config() {
508 + # Remember: Don't use ${EROOT}${SVN_REPOS_LOC} since ${SVN_REPOS_LOC}
509 + # already has EPREFIX in it
510 + einfo "Initializing the database in ${SVN_REPOS_LOC}..."
511 + if [[ -e "${SVN_REPOS_LOC}/repos" ]] ; then
512 + echo "A Subversion repository already exists and I will not overwrite it."
513 + echo "Delete \"${SVN_REPOS_LOC}/repos\" first if you're sure you want to have a clean version."
514 + else
515 + mkdir -p "${SVN_REPOS_LOC}/conf"
516 +
517 + einfo "Populating repository directory..."
518 + # Create initial repository.
519 + "${EROOT}usr/bin/svnadmin" create "${SVN_REPOS_LOC}/repos"
520 +
521 + einfo "Setting repository permissions..."
522 + SVNSERVE_USER="$(. "${EROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_USER}")"
523 + SVNSERVE_GROUP="$(. "${EROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_GROUP}")"
524 + if use apache2 ; then
525 + [[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="apache"
526 + [[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="apache"
527 + else
528 + [[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="svn"
529 + [[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="svnusers"
530 + fi
531 + chmod -Rf go-rwx "${SVN_REPOS_LOC}/conf"
532 + chmod -Rf o-rwx "${SVN_REPOS_LOC}/repos"
533 + echo "Please create \"${SVNSERVE_GROUP}\" group if it does not exist yet."
534 + echo "Afterwards please create \"${SVNSERVE_USER}\" user with homedir \"${SVN_REPOS_LOC}\""
535 + echo "and as part of the \"${SVNSERVE_GROUP}\" group if it does not exist yet."
536 + echo "Finally, execute \"chown -Rf ${SVNSERVE_USER}:${SVNSERVE_GROUP} ${SVN_REPOS_LOC}/repos\""
537 + echo "to finish the configuration."
538 + fi
539 +}
540
541 diff --git a/dev-vcs/subversion/subversion-1.9.3.ebuild b/dev-vcs/subversion/subversion-1.9.3.ebuild
542 new file mode 100644
543 index 0000000..b25ce1e
544 --- /dev/null
545 +++ b/dev-vcs/subversion/subversion-1.9.3.ebuild
546 @@ -0,0 +1,497 @@
547 +# Copyright 1999-2015 Gentoo Foundation
548 +# Distributed under the terms of the GNU General Public License v2
549 +# $Id$
550 +
551 +EAPI=5
552 +PYTHON_COMPAT=( python2_7 )
553 +USE_RUBY="ruby22 ruby21 ruby20 ruby19"
554 +DISTUTILS_OPTIONAL=1
555 +WANT_AUTOMAKE="none"
556 +GENTOO_DEPEND_ON_PERL="no"
557 +
558 +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
559 +
560 +MY_P="${P/_/-}"
561 +DESCRIPTION="Advanced version control system"
562 +HOMEPAGE="http://subversion.apache.org/"
563 +SRC_URI="mirror://apache/${PN}/${MY_P}.tar.bz2"
564 +S="${WORKDIR}/${MY_P}"
565 +
566 +LICENSE="Subversion GPL-2"
567 +SLOT="0"
568 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
569 +IUSE="apache2 berkdb ctypes-python debug doc +dso extras gnome-keyring +http java kde nls perl python ruby sasl test vim-syntax"
570 +
571 +COMMON_DEPEND=">=dev-db/sqlite-3.7.12
572 + >=dev-libs/apr-1.3:1
573 + >=dev-libs/apr-util-1.3:1
574 + dev-libs/expat
575 + sys-apps/file
576 + sys-libs/zlib
577 + app-arch/bzip2
578 + berkdb? ( >=sys-libs/db-4.0.14:= )
579 + ctypes-python? ( ${PYTHON_DEPS} )
580 + gnome-keyring? ( dev-libs/glib:2 sys-apps/dbus gnome-base/libgnome-keyring )
581 + kde? ( sys-apps/dbus dev-qt/qtcore:4 dev-qt/qtdbus:4 dev-qt/qtgui:4 >=kde-base/kdelibs-4:4 )
582 + perl? ( dev-lang/perl:= )
583 + python? ( ${PYTHON_DEPS} )
584 + ruby? ( ${RUBY_DEPS} )
585 + sasl? ( dev-libs/cyrus-sasl )
586 + http? ( >=net-libs/serf-1.2.1 )"
587 +RDEPEND="${COMMON_DEPEND}
588 + apache2? ( www-servers/apache[apache2_modules_dav] )
589 + java? ( >=virtual/jre-1.5 )
590 + kde? ( kde-apps/kwalletd:4 )
591 + nls? ( virtual/libintl )
592 + perl? ( dev-perl/URI )"
593 +# Note: ctypesgen doesn't need PYTHON_USEDEP, it's used once
594 +DEPEND="${COMMON_DEPEND}
595 + !!<sys-apps/sandbox-1.6
596 + ctypes-python? ( dev-python/ctypesgen )
597 + doc? ( app-doc/doxygen )
598 + gnome-keyring? ( virtual/pkgconfig )
599 + http? ( virtual/pkgconfig )
600 + java? ( >=virtual/jdk-1.5 )
601 + kde? ( virtual/pkgconfig )
602 + nls? ( sys-devel/gettext )
603 + test? ( ${PYTHON_DEPS} )"
604 +
605 +REQUIRED_USE="
606 + ctypes-python? ( ${PYTHON_REQUIRED_USE} )
607 + python? ( ${PYTHON_REQUIRED_USE} )
608 + test? (
609 + ${PYTHON_REQUIRED_USE}
610 + !dso
611 + )"
612 +
613 +want_apache
614 +
615 +pkg_setup() {
616 + if use berkdb ; then
617 + local apu_bdb_version="$(${EPREFIX}/usr/bin/apu-1-config --includes \
618 + | grep -Eoe '-I${EPREFIX}/usr/include/db[[:digit:]]\.[[:digit:]]' \
619 + | sed 's:.*b::')"
620 + einfo
621 + if [[ -z "${SVN_BDB_VERSION}" ]] ; then
622 + if [[ -n "${apu_bdb_version}" ]] ; then
623 + SVN_BDB_VERSION="${apu_bdb_version}"
624 + einfo "Matching db version to apr-util"
625 + else
626 + SVN_BDB_VERSION="$(db_ver_to_slot "$(db_findver sys-libs/db 2>/dev/null)")"
627 + einfo "SVN_BDB_VERSION variable isn't set. You can set it to enforce using of specific version of Berkeley DB."
628 + fi
629 + fi
630 + einfo "Using: Berkeley DB ${SVN_BDB_VERSION}"
631 + einfo
632 +
633 + if [[ -n "${apu_bdb_version}" && "${SVN_BDB_VERSION}" != "${apu_bdb_version}" ]]; then
634 + eerror "APR-Util is linked against Berkeley DB ${apu_bdb_version}, but you are trying"
635 + eerror "to build Subversion with support for Berkeley DB ${SVN_BDB_VERSION}."
636 + eerror "Rebuild dev-libs/apr-util or set SVN_BDB_VERSION=\"${apu_bdb_version}\"."
637 + eerror "Aborting to avoid possible run-time crashes."
638 + die "Berkeley DB version mismatch"
639 + fi
640 + fi
641 +
642 + depend.apache_pkg_setup
643 +
644 + java-pkg-opt-2_pkg_setup
645 +
646 + if ! use http ; then
647 + ewarn "WebDAV support is disabled. You need WebDAV to"
648 + ewarn "access repositories through the HTTP protocol."
649 + ewarn "Consider enabling \"http\" USE flag"
650 + echo -ne "\a"
651 + fi
652 +
653 + if use debug ; then
654 + append-cppflags -DSVN_DEBUG -DAP_DEBUG
655 + fi
656 +
657 + # http://mail-archives.apache.org/mod_mbox/subversion-dev/201306.mbox/%3C51C42014.3060700@××××××××.com%3E
658 + [[ ${CHOST} == *-solaris2* ]] && append-cppflags -D__EXTENSIONS__
659 +
660 + # Allow for custom repository locations.
661 + SVN_REPOS_LOC="${SVN_REPOS_LOC:-${EPREFIX}/var/svn}"
662 +
663 + if use ruby ; then
664 + local rbslot
665 + RB_VER=""
666 + for rbslot in $(sed 's@\([[:digit:]]\+\)\([[:digit:]]\)@\1.\2@' <<< ${USE_RUBY/ruby}) ; do
667 + if has_version dev-lang/ruby:${rbslot} ; then
668 + RB_VER="${rbslot/.}"
669 + break
670 + fi
671 + done
672 + [[ -z "${RB_VER}" ]] && die "No useable ruby version found"
673 + fi
674 +}
675 +
676 +src_prepare() {
677 + epatch "${FILESDIR}"/${PN}-1.5.4-interix.patch \
678 + "${FILESDIR}"/${PN}-1.5.6-aix-dso.patch \
679 + "${FILESDIR}"/${PN}-1.8.0-hpux-dso.patch \
680 + "${FILESDIR}"/${PN}-fix-parallel-build-support-for-perl-bindings.patch \
681 + "${FILESDIR}"/${PN}-1.8.1-revert_bdb6check.patch
682 + epatch_user
683 +
684 + fperms +x build/transform_libtool_scripts.sh
685 +
686 + sed -i \
687 + -e "s/\(BUILD_RULES=.*\) bdb-test\(.*\)/\1\2/g" \
688 + -e "s/\(BUILD_RULES=.*\) test\(.*\)/\1\2/g" configure.ac
689 +
690 + # this bites us in particular on Solaris
691 + sed -i -e '1c\#!/usr/bin/env sh' build/transform_libtool_scripts.sh || \
692 + die "/bin/sh is not POSIX shell!"
693 +
694 + eautoconf
695 + elibtoolize
696 +
697 + sed -e 's/\(libsvn_swig_py\)-\(1\.la\)/\1-$(EPYTHON)-\2/g' \
698 + -i build-outputs.mk || die "sed failed"
699 +
700 + if use python ; then
701 + # XXX: make python_copy_sources accept path
702 + S=${S}/subversion/bindings/swig/python python_copy_sources
703 + rm -r "${S}"/subversion/bindings/swig/python || die
704 + fi
705 +}
706 +
707 +src_configure() {
708 + local myconf
709 +
710 + if use python || use perl || use ruby; then
711 + myconf+=" --with-swig"
712 + else
713 + myconf+=" --without-swig"
714 + fi
715 +
716 + if use java ; then
717 + myconf+=" --without-junit"
718 + fi
719 +
720 + case ${CHOST} in
721 + *-aix*)
722 + # avoid recording immediate path to sharedlibs into executables
723 + append-ldflags -Wl,-bnoipath
724 + ;;
725 + *-interix*)
726 + # loader crashes on the LD_PRELOADs...
727 + myconf+=" --disable-local-library-preloading"
728 + ;;
729 + *-solaris*)
730 + # need -lintl to link
731 + use nls && append-libs intl
732 + # this breaks installation, on x64 echo replacement is 32-bits
733 + myconf+=" --disable-local-library-preloading"
734 + ;;
735 + *-mint*)
736 + myconf+=" --enable-all-static --disable-local-library-preloading"
737 + ;;
738 + *)
739 + # inject LD_PRELOAD entries for easy in-tree development
740 + myconf+=" --enable-local-library-preloading"
741 + ;;
742 + esac
743 +
744 + #version 1.7.7 again tries to link against the older installed version and fails, when trying to
745 + #compile for x86 on amd64, so workaround this issue again
746 + #check newer versions, if this is still/again needed
747 + myconf+=" --disable-disallowing-of-undefined-references"
748 +
749 + # for build-time scripts
750 + if use ctypes-python || use python || use test; then
751 + python_setup
752 + fi
753 +
754 + if use python && [[ ${CHOST} == *-darwin* ]] ; then
755 + export ac_cv_python_link="$(tc-getCC) "'$(PYTHON_CFLAGS) -bundle -undefined dynamic_lookup $(PYTHON_LIBS)'
756 + export ac_cv_python_libs='$(PYTHON_CFLAGS) -bundle -undefined dynamic_lookup $(PYTHON_LIBS)'
757 + export ac_cv_python_compile="$(tc-getCC)"
758 + fi
759 +
760 + # allow overriding Python include directory
761 + ac_cv_path_RUBY=$(usex ruby "${EPREFIX}/usr/bin/ruby${RB_VER}" "none") \
762 + ac_cv_path_RDOC=$(usex ruby "${EPREFIX}/usr/bin/rdoc${RB_VER}" "none") \
763 + ac_cv_python_includes='-I$(PYTHON_INCLUDEDIR)' \
764 + econf --libdir="${EPREFIX}/usr/$(get_libdir)" \
765 + $(use_with apache2 apache-libexecdir) \
766 + $(use_with apache2 apxs "${APXS}") \
767 + $(use_with berkdb berkeley-db "db.h:${EPREFIX}/usr/include/db${SVN_BDB_VERSION}::db-${SVN_BDB_VERSION}") \
768 + $(use_with ctypes-python ctypesgen "${EPREFIX}/usr") \
769 + $(use_enable dso runtime-module-search) \
770 + $(use_with gnome-keyring) \
771 + $(use_enable java javahl) \
772 + $(use_with java jdk "${JAVA_HOME}") \
773 + $(use_with kde kwallet) \
774 + $(use_enable nls) \
775 + $(use_with sasl) \
776 + $(use_with http serf) \
777 + ${myconf} \
778 + --with-apr="${EPREFIX}/usr/bin/apr-1-config" \
779 + --with-apr-util="${EPREFIX}/usr/bin/apu-1-config" \
780 + --disable-experimental-libtool \
781 + --without-jikes \
782 + --disable-mod-activation \
783 + --disable-static
784 +}
785 +
786 +src_compile() {
787 + emake local-all
788 +
789 + if use ctypes-python ; then
790 + # pre-generate .py files
791 + use ctypes-python && emake ctypes-python
792 +
793 + pushd subversion/bindings/ctypes-python >/dev/null || die
794 + distutils-r1_src_compile
795 + popd >/dev/null || die
796 + fi
797 +
798 + if use python ; then
799 + swig_py_compile() {
800 + local p=subversion/bindings/swig/python
801 + rm -f ${p} || die
802 + ln -s "${BUILD_DIR}" ${p} || die
803 +
804 + python_export PYTHON_INCLUDEDIR
805 + emake swig-py \
806 + swig_pydir="$(python_get_sitedir)/libsvn" \
807 + swig_pydir_extra="$(python_get_sitedir)/svn"
808 + }
809 +
810 + # this will give us proper BUILD_DIR for symlinking
811 + BUILD_DIR=python \
812 + python_foreach_impl swig_py_compile
813 + fi
814 +
815 + if use perl ; then
816 + emake swig-pl
817 + fi
818 +
819 + if use ruby ; then
820 + emake swig-rb
821 + fi
822 +
823 + if use java ; then
824 + emake -j1 JAVAC_FLAGS="$(java-pkg_javac-args) -encoding iso8859-1" javahl
825 + fi
826 +
827 + if use extras ; then
828 + emake tools
829 + fi
830 +
831 + if use doc ; then
832 + doxygen doc/doxygen.conf || die "Building of Subversion HTML documentation failed"
833 +
834 + if use java; then
835 + emake doc-javahl
836 + fi
837 + fi
838 +}
839 +
840 +src_test() {
841 + if has_version ~${CATEGORY}/${P} ; then
842 + default
843 +
844 + if use ctypes-python ; then
845 + python_test() {
846 + "${PYTHON}" subversion/bindings/ctypes-python/test/run_all.py \
847 + || die "ctypes-python tests fail with ${EPYTHON}"
848 + }
849 +
850 + distutils-r1_src_test
851 + fi
852 +
853 + if use python ; then
854 + swig_py_test() {
855 + pushd "${BUILD_DIR}" >/dev/null || die
856 + "${PYTHON}" tests/run_all.py || die "swig-py tests fail with ${EPYTHON}"
857 + popd >/dev/null || die
858 + }
859 +
860 + BUILD_DIR=subversion/bindings/swig/python \
861 + python_foreach_impl swig_py_test
862 + fi
863 + else
864 + ewarn "The test suite shows errors when there is an older version of"
865 + ewarn "${CATEGORY}/${PN} installed. Please install =${CATEGORY}/${P}*"
866 + ewarn "before running the test suite."
867 + ewarn "Test suite skipped."
868 + fi
869 +}
870 +
871 +src_install() {
872 + emake -j1 DESTDIR="${D}" local-install
873 +
874 + if use ctypes-python ; then
875 + pushd subversion/bindings/ctypes-python >/dev/null || die
876 + distutils-r1_src_install
877 + popd >/dev/null || die
878 + fi
879 +
880 + if use python ; then
881 + swig_py_install() {
882 + local p=subversion/bindings/swig/python
883 + rm -f ${p} || die
884 + ln -s "${BUILD_DIR}" ${p} || die
885 +
886 + emake \
887 + DESTDIR="${D}" \
888 + swig_pydir="$(python_get_sitedir)/libsvn" \
889 + swig_pydir_extra="$(python_get_sitedir)/svn" \
890 + install-swig-py
891 + }
892 +
893 + BUILD_DIR=python \
894 + python_foreach_impl swig_py_install
895 + fi
896 +
897 + if use perl ; then
898 + emake DESTDIR="${D}" INSTALLDIRS="vendor" install-swig-pl
899 + perl_delete_localpod
900 + find "${ED}" "(" -name .packlist -o -name "*.bs" ")" -delete
901 + fi
902 +
903 + if use ruby ; then
904 + emake DESTDIR="${D}" install-swig-rb
905 + fi
906 +
907 + if use java ; then
908 + emake DESTDIR="${D}" install-javahl
909 + java-pkg_regso "${ED}"usr/$(get_libdir)/libsvnjavahl*$(get_libname)
910 + java-pkg_dojar "${ED}"usr/$(get_libdir)/svn-javahl/svn-javahl.jar
911 + rm -fr "${ED}"usr/$(get_libdir)/svn-javahl/*.jar
912 + fi
913 +
914 + # Install Apache module configuration.
915 + if use apache2 ; then
916 + keepdir "${APACHE_MODULES_CONFDIR}"
917 + insinto "${APACHE_MODULES_CONFDIR}"
918 + doins "${FILESDIR}/47_mod_dav_svn.conf"
919 + fi
920 +
921 + # Install Bash Completion, bug 43179.
922 + newbashcomp tools/client-side/bash_completion svn
923 + bashcomp_alias svn svn{admin,dumpfilter,look,sync,version}
924 + rm -f tools/client-side/bash_completion
925 +
926 + # Install hot backup script, bug 54304.
927 + newbin tools/backup/hot-backup.py svn-hot-backup
928 + rm -fr tools/backup
929 +
930 + # Install svnserve init-script and xinet.d snippet, bug 43245.
931 + newinitd "${FILESDIR}"/svnserve.initd3 svnserve
932 + newconfd "${FILESDIR}"/svnserve.confd svnserve
933 + insinto /etc/xinetd.d
934 + newins "${FILESDIR}"/svnserve.xinetd svnserve
935 +
936 + #adjust default user and group with disabled apache2 USE flag, bug 381385
937 + use apache2 || sed -e "s\USER:-apache\USER:-svn\g" \
938 + -e "s\GROUP:-apache\GROUP:-svnusers\g" \
939 + -i "${ED}"etc/init.d/svnserve || die
940 + use apache2 || sed -e "0,/apache/s//svn/" \
941 + -e "s:apache:svnusers:" \
942 + -i "${ED}"etc/xinetd.d/svnserve || die
943 +
944 + # Install documentation.
945 + dodoc CHANGES COMMITTERS README
946 + dodoc tools/xslt/svnindex.{css,xsl}
947 + rm -fr tools/xslt
948 +
949 + # Install extra files.
950 + if use extras ; then
951 + cat << EOF > 80subversion-extras
952 +PATH="${EPREFIX}/usr/$(get_libdir)/subversion/bin"
953 +ROOTPATH="${EPREFIX}/usr/$(get_libdir)/subversion/bin"
954 +EOF
955 + doenvd 80subversion-extras
956 +
957 + emake DESTDIR="${D}" toolsdir="/usr/$(get_libdir)/subversion/bin" install-tools
958 +
959 + find tools "(" -name "*.bat" -o -name "*.in" -o -name ".libs" ")" -print0 | xargs -0 rm -fr
960 + rm -fr tools/client-side/svnmucc
961 + rm -fr tools/server-side/{svn-populate-node-origins-index,svnauthz-validate}*
962 + rm -fr tools/{buildbot,dev,diff,po}
963 +
964 + insinto /usr/share/${PN}
965 + find tools -name '*.py' -exec sed -i -e '1s:python:&2:' {} + || die
966 + doins -r tools
967 + fi
968 +
969 + if use doc ; then
970 + dohtml -r doc/doxygen/html/*
971 +
972 + if use java ; then
973 + java-pkg_dojavadoc doc/javadoc
974 + fi
975 + fi
976 +
977 + prune_libtool_files --all
978 +
979 + cd "${ED}"usr/share/locale
980 + for i in * ; do
981 + [[ $i == *$LINGUAS* ]] || { rm -r $i || die ; }
982 + done
983 +}
984 +
985 +pkg_preinst() {
986 + # Compare versions of Berkeley DB, bug 122877.
987 + if use berkdb && [[ -f "${EROOT}usr/bin/svn" ]] ; then
988 + 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/")"
989 + 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/")"
990 + if [[ "${OLD_BDB_VERSION}" != "${NEW_BDB_VERSION}" ]] ; then
991 + CHANGED_BDB_VERSION="1"
992 + fi
993 + fi
994 +}
995 +
996 +pkg_postinst() {
997 + if [[ -n "${CHANGED_BDB_VERSION}" ]] ; then
998 + ewarn "You upgraded from an older version of Berkeley DB and may experience"
999 + ewarn "problems with your repository. Run the following commands as root to fix it:"
1000 + ewarn " db4_recover -h ${SVN_REPOS_LOC}/repos"
1001 + ewarn " chown -Rf apache:apache ${SVN_REPOS_LOC}/repos"
1002 + fi
1003 +
1004 + ewarn "If you run subversion as a daemon, you will need to restart it to avoid module mismatches."
1005 +}
1006 +
1007 +pkg_postrm() {
1008 + :
1009 +}
1010 +
1011 +pkg_config() {
1012 + # Remember: Don't use ${EROOT}${SVN_REPOS_LOC} since ${SVN_REPOS_LOC}
1013 + # already has EPREFIX in it
1014 + einfo "Initializing the database in ${SVN_REPOS_LOC}..."
1015 + if [[ -e "${SVN_REPOS_LOC}/repos" ]] ; then
1016 + echo "A Subversion repository already exists and I will not overwrite it."
1017 + echo "Delete \"${SVN_REPOS_LOC}/repos\" first if you're sure you want to have a clean version."
1018 + else
1019 + mkdir -p "${SVN_REPOS_LOC}/conf"
1020 +
1021 + einfo "Populating repository directory..."
1022 + # Create initial repository.
1023 + "${EROOT}usr/bin/svnadmin" create "${SVN_REPOS_LOC}/repos"
1024 +
1025 + einfo "Setting repository permissions..."
1026 + SVNSERVE_USER="$(. "${EROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_USER}")"
1027 + SVNSERVE_GROUP="$(. "${EROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_GROUP}")"
1028 + if use apache2 ; then
1029 + [[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="apache"
1030 + [[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="apache"
1031 + else
1032 + [[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="svn"
1033 + [[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="svnusers"
1034 + fi
1035 + chmod -Rf go-rwx "${SVN_REPOS_LOC}/conf"
1036 + chmod -Rf o-rwx "${SVN_REPOS_LOC}/repos"
1037 + echo "Please create \"${SVNSERVE_GROUP}\" group if it does not exist yet."
1038 + echo "Afterwards please create \"${SVNSERVE_USER}\" user with homedir \"${SVN_REPOS_LOC}\""
1039 + echo "and as part of the \"${SVNSERVE_GROUP}\" group if it does not exist yet."
1040 + echo "Finally, execute \"chown -Rf ${SVNSERVE_USER}:${SVNSERVE_GROUP} ${SVN_REPOS_LOC}/repos\""
1041 + echo "to finish the configuration."
1042 + fi
1043 +}