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