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