1 |
darkside 11/08/31 18:31:05 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: subversion-1.6.17-r6.ebuild |
5 |
Log: |
6 |
Revision bump to finish Gentoo Prefix support, signed off by maintainer in bug 329505 |
7 |
|
8 |
(Portage version: 2.1.10.3/cvs/Linux i686) |
9 |
|
10 |
Revision Changes Path |
11 |
1.56 dev-vcs/subversion/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/subversion/ChangeLog?rev=1.56&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/subversion/ChangeLog?rev=1.56&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/subversion/ChangeLog?r1=1.55&r2=1.56 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/dev-vcs/subversion/ChangeLog,v |
20 |
retrieving revision 1.55 |
21 |
retrieving revision 1.56 |
22 |
diff -u -r1.55 -r1.56 |
23 |
--- ChangeLog 30 Aug 2011 11:19:41 -0000 1.55 |
24 |
+++ ChangeLog 31 Aug 2011 18:31:04 -0000 1.56 |
25 |
@@ -1,6 +1,14 @@ |
26 |
# ChangeLog for dev-vcs/subversion |
27 |
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/dev-vcs/subversion/ChangeLog,v 1.55 2011/08/30 11:19:41 chainsaw Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/dev-vcs/subversion/ChangeLog,v 1.56 2011/08/31 18:31:04 darkside Exp $ |
30 |
+ |
31 |
+*subversion-1.6.17-r6 (31 Aug 2011) |
32 |
+ |
33 |
+ 31 Aug 2011; Jeremy Olexa <darkside@g.o> |
34 |
+ +files/subversion-1.5.4-interix.patch, +files/subversion-1.5.6-aix-dso.patch, |
35 |
+ +files/subversion-1.6.3-hpux-dso.patch, +subversion-1.6.17-r6.ebuild: |
36 |
+ Revision bump to finish Gentoo Prefix support, signed off by maintainer in |
37 |
+ bug 329505 |
38 |
|
39 |
*subversion-1.6.17-r5 (30 Aug 2011) |
40 |
|
41 |
|
42 |
|
43 |
|
44 |
1.1 dev-vcs/subversion/subversion-1.6.17-r6.ebuild |
45 |
|
46 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/subversion/subversion-1.6.17-r6.ebuild?rev=1.1&view=markup |
47 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/subversion/subversion-1.6.17-r6.ebuild?rev=1.1&content-type=text/plain |
48 |
|
49 |
Index: subversion-1.6.17-r6.ebuild |
50 |
=================================================================== |
51 |
# Copyright 1999-2011 Gentoo Foundation |
52 |
# Distributed under the terms of the GNU General Public License v2 |
53 |
# $Header: /var/cvsroot/gentoo-x86/dev-vcs/subversion/subversion-1.6.17-r6.ebuild,v 1.1 2011/08/31 18:31:04 darkside Exp $ |
54 |
|
55 |
EAPI="3" |
56 |
SUPPORT_PYTHON_ABIS="1" |
57 |
RESTRICT_PYTHON_ABIS="3.* *-jython" |
58 |
WANT_AUTOMAKE="none" |
59 |
MY_P="${P/_/-}" |
60 |
|
61 |
inherit autotools base bash-completion db-use depend.apache elisp-common flag-o-matic java-pkg-opt-2 libtool multilib perl-module python |
62 |
|
63 |
DESCRIPTION="Advanced version control system" |
64 |
HOMEPAGE="http://subversion.apache.org/" |
65 |
SRC_URI="http://subversion.tigris.org/downloads/${MY_P}.tar.bz2" |
66 |
S="${WORKDIR}/${MY_P}" |
67 |
|
68 |
LICENSE="Subversion" |
69 |
SLOT="0" |
70 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x86-fbsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-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 emacs extras gnome-keyring java kde nls perl python ruby sasl vim-syntax +webdav-neon webdav-serf" |
72 |
|
73 |
CDEPEND=">=dev-db/sqlite-3.4 |
74 |
>=dev-libs/apr-1.3:1 |
75 |
>=dev-libs/apr-util-1.3:1 |
76 |
dev-libs/expat |
77 |
sys-libs/zlib |
78 |
berkdb? ( >=sys-libs/db-4.0.14 ) |
79 |
ctypes-python? ( =dev-lang/python-2* ) |
80 |
emacs? ( virtual/emacs ) |
81 |
gnome-keyring? ( dev-libs/glib:2 sys-apps/dbus gnome-base/gnome-keyring ) |
82 |
kde? ( sys-apps/dbus x11-libs/qt-core x11-libs/qt-dbus x11-libs/qt-gui >=kde-base/kdelibs-4 ) |
83 |
perl? ( dev-lang/perl ) |
84 |
python? ( =dev-lang/python-2* ) |
85 |
ruby? ( >=dev-lang/ruby-1.8.2 ) |
86 |
sasl? ( dev-libs/cyrus-sasl ) |
87 |
webdav-neon? ( >=net-libs/neon-0.28 ) |
88 |
webdav-serf? ( >=net-libs/serf-0.3.0 )" |
89 |
RDEPEND="${CDEPEND} |
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 |
DEPEND="${CDEPEND} |
96 |
!!<sys-apps/sandbox-1.6 |
97 |
ctypes-python? ( dev-python/ctypesgen ) |
98 |
doc? ( app-doc/doxygen ) |
99 |
gnome-keyring? ( dev-util/pkgconfig ) |
100 |
java? ( >=virtual/jdk-1.5 ) |
101 |
kde? ( dev-util/pkgconfig ) |
102 |
nls? ( sys-devel/gettext ) |
103 |
webdav-neon? ( dev-util/pkgconfig )" |
104 |
|
105 |
PATCHES=( |
106 |
"${FILESDIR}/${PN}-1.6.0-disable_linking_against_unneeded_libraries.patch" |
107 |
"${FILESDIR}/${PN}-1.6.2-local_library_preloading.patch" |
108 |
"${FILESDIR}/${PN}-1.6.3-kwallet_window.patch" |
109 |
"${FILESDIR}/${PN}-1.5.4-interix.patch" |
110 |
"${FILESDIR}/${PN}-1.5.6-aix-dso.patch" |
111 |
"${FILESDIR}/${PN}-1.6.3-hpux-dso.patch" |
112 |
) |
113 |
|
114 |
want_apache |
115 |
|
116 |
pkg_setup() { |
117 |
if use berkdb; then |
118 |
local apu_bdb_version="$(${EPREFIX}/usr/bin/apu-1-config --includes \ |
119 |
| grep -Eoe '-I${EPREFIX}/usr/include/db[[:digit:]]\.[[:digit:]]' \ |
120 |
| sed 's:.*b::')" |
121 |
einfo |
122 |
if [[ -z "${SVN_BDB_VERSION}" ]]; then |
123 |
if [[ -n "${apu_bdb_version}" ]]; then |
124 |
SVN_BDB_VERSION="${apu_bdb_version}" |
125 |
einfo "Matching db version to apr-util" |
126 |
else |
127 |
SVN_BDB_VERSION="$(db_ver_to_slot "$(db_findver sys-libs/db 2>/dev/null)")" |
128 |
einfo "SVN_BDB_VERSION variable isn't set. You can set it to enforce using of specific version of Berkeley DB." |
129 |
fi |
130 |
fi |
131 |
einfo "Using: Berkeley DB ${SVN_BDB_VERSION}" |
132 |
einfo |
133 |
|
134 |
if [[ -n "${apu_bdb_version}" && "${SVN_BDB_VERSION}" != "${apu_bdb_version}" ]]; then |
135 |
eerror "APR-Util is linked against Berkeley DB ${apu_bdb_version}, but you are trying" |
136 |
eerror "to build Subversion with support for Berkeley DB ${SVN_BDB_VERSION}." |
137 |
eerror "Rebuild dev-libs/apr-util or set SVN_BDB_VERSION=\"${apu_bdb_version}\"." |
138 |
eerror "Aborting to avoid possible run-time crashes." |
139 |
die "Berkeley DB version mismatch" |
140 |
fi |
141 |
fi |
142 |
|
143 |
depend.apache_pkg_setup |
144 |
|
145 |
java-pkg-opt-2_pkg_setup |
146 |
|
147 |
if use ctypes-python || use python; then |
148 |
python_pkg_setup |
149 |
fi |
150 |
|
151 |
if ! use webdav-neon && ! use webdav-serf; then |
152 |
ewarn "WebDAV support is disabled. You need WebDAV to" |
153 |
ewarn "access repositories through the HTTP protocol." |
154 |
ewarn "Consider enabling one of the following USE-flags:" |
155 |
ewarn " webdav-neon webdav-serf" |
156 |
echo -ne "\a" |
157 |
fi |
158 |
|
159 |
if use debug; then |
160 |
append-cppflags -DSVN_DEBUG -DAP_DEBUG |
161 |
fi |
162 |
|
163 |
# Allow for custom repository locations. |
164 |
SVN_REPOS_LOC="${SVN_REPOS_LOC:-${EPREFIX}/var/svn}" |
165 |
} |
166 |
|
167 |
src_prepare() { |
168 |
base_src_prepare |
169 |
fperms +x build/transform_libtool_scripts.sh |
170 |
|
171 |
sed -i \ |
172 |
-e "s/\(BUILD_RULES=.*\) bdb-test\(.*\)/\1\2/g" \ |
173 |
-e "s/\(BUILD_RULES=.*\) test\(.*\)/\1\2/g" configure.ac |
174 |
|
175 |
sed -e "/SWIG_PY_INCLUDES=/s/\$ac_cv_python_includes/\\\\\$(PYTHON_INCLUDES)/" -i build/ac-macros/swig.m4 || die "sed failed" |
176 |
|
177 |
# this bites us in particular on Solaris |
178 |
sed -i -e '1c\#!/usr/bin/env sh' build/transform_libtool_scripts.sh || \ |
179 |
die "/bin/sh is not POSIX shell!" |
180 |
|
181 |
eautoconf |
182 |
elibtoolize |
183 |
|
184 |
sed -e "s/libsvn_swig_py-1\.la/libsvn_swig_py-\$(PYTHON_VERSION)-1.la/" -i build-outputs.mk || die "sed failed" |
185 |
} |
186 |
|
187 |
src_configure() { |
188 |
local myconf |
189 |
|
190 |
if use python || use perl || use ruby; then |
191 |
myconf+=" --with-swig" |
192 |
else |
193 |
myconf+=" --without-swig" |
194 |
fi |
195 |
|
196 |
if use java; then |
197 |
myconf+=" --without-junit" |
198 |
fi |
199 |
|
200 |
if use kde || use nls; then |
201 |
myconf+=" --enable-nls" |
202 |
else |
203 |
myconf+=" --disable-nls" |
204 |
fi |
205 |
|
206 |
case ${CHOST} in |
207 |
*-solaris*) |
208 |
# -lintl isn't added for some reason (makes Neon check fail) |
209 |
use nls && append-libs -lintl |
210 |
;; |
211 |
*-aix*) |
212 |
# avoid recording immediate path to sharedlibs into executables |
213 |
append-ldflags -Wl,-bnoipath |
214 |
;; |
215 |
*-interix*) |
216 |
# loader crashes on the LD_PRELOADs... |
217 |
myconf="${myconf} --disable-local-library-preloading" |
218 |
;; |
219 |
esac |
220 |
|
221 |
econf --libdir="${EPREFIX}/usr/$(get_libdir)" \ |
222 |
$(use_with apache2 apxs "${APXS}") \ |
223 |
$(use_with berkdb berkeley-db "db.h:${EPREFIX}/usr/include/db${SVN_BDB_VERSION}::db-${SVN_BDB_VERSION}") \ |
224 |
$(use_with ctypes-python ctypesgen "${EPREFIX}/usr") \ |
225 |
$(use_enable dso runtime-module-search) \ |
226 |
$(use_with gnome-keyring) \ |
227 |
$(use_enable java javahl) \ |
228 |
$(use_with java jdk "${JAVA_HOME}") \ |
229 |
$(use_with kde kwallet) \ |
230 |
$(use_with sasl) \ |
231 |
$(use_with webdav-neon neon) \ |
232 |
$(use_with webdav-serf serf "${EPREFIX}/usr") \ |
233 |
${myconf} \ |
234 |
--with-apr="${EPREFIX}/usr/bin/apr-1-config" \ |
235 |
--with-apr-util="${EPREFIX}/usr/bin/apu-1-config" \ |
236 |
--disable-experimental-libtool \ |
237 |
--without-jikes \ |
238 |
--enable-local-library-preloading \ |
239 |
--disable-mod-activation \ |
240 |
--disable-neon-version-check \ |
241 |
--disable-static \ |
242 |
--with-sqlite="${EPREFIX}/usr" |
243 |
} |
244 |
|
245 |
src_compile() { |
246 |
emake local-all || die "Building of core of Subversion failed" |
247 |
|
248 |
if use ctypes-python; then |
249 |
python_copy_sources subversion/bindings/ctypes-python |
250 |
rm -fr subversion/bindings/ctypes-python |
251 |
ctypes_python_bindings_building() { |
252 |
rm -f subversion/bindings/ctypes-python |
253 |
ln -s ctypes-python-${PYTHON_ABI} subversion/bindings/ctypes-python |
254 |
emake ctypes-python |
255 |
} |
256 |
python_execute_function \ |
257 |
--action-message 'Building of Subversion Ctypes Python bindings with $(python_get_implementation) $(python_get_version)' \ |
258 |
--failure-message 'Building of Subversion Ctypes Python bindings failed with $(python_get_implementation) $(python_get_version)' \ |
259 |
ctypes_python_bindings_building |
260 |
fi |
261 |
|
262 |
if use python; then |
263 |
python_copy_sources subversion/bindings/swig/python |
264 |
rm -fr subversion/bindings/swig/python |
265 |
swig_python_bindings_building() { |
266 |
rm -f subversion/bindings/swig/python |
267 |
ln -s python-${PYTHON_ABI} subversion/bindings/swig/python |
268 |
emake \ |
269 |
PYTHON_INCLUDES="-I${EPREFIX}$(python_get_includedir)" \ |
270 |
PYTHON_VERSION="$(python_get_version)" \ |
271 |
swig_pydir="${EPREFIX}$(python_get_sitedir)/libsvn" \ |
272 |
swig_pydir_extra="${EPREFIX}$(python_get_sitedir)/svn" \ |
273 |
swig-py |
274 |
} |
275 |
python_execute_function \ |
276 |
--action-message 'Building of Subversion SWIG Python bindings with $(python_get_implementation) $(python_get_version)' \ |
277 |
--failure-message 'Building of Subversion SWIG Python bindings failed with $(python_get_implementation) $(python_get_version)' \ |
278 |
swig_python_bindings_building |
279 |
fi |
280 |
|
281 |
if use perl; then |
282 |
emake swig-pl || die "Building of Subversion SWIG Perl bindings failed" |
283 |
fi |
284 |
|
285 |
if use ruby; then |
286 |
emake swig-rb || die "Building of Subversion SWIG Ruby bindings failed" |
287 |
fi |
288 |
|
289 |
if use java; then |
290 |
emake -j1 JAVAC_FLAGS="$(java-pkg_javac-args) -encoding iso8859-1" javahl || die "Building of Subversion JavaHL library failed" |
291 |
fi |
292 |
|
293 |
if use emacs; then |
294 |
elisp-compile contrib/client-side/emacs/{dsvn,psvn,vc-svn}.el doc/svn-doc.el doc/tools/svnbook.el || die "Compilation of Emacs modules failed" |
295 |
fi |
296 |
|
297 |
if use extras; then |
298 |
emake contrib || die "Building of contrib failed" |
299 |
emake tools || die "Building of tools failed" |
300 |
fi |
301 |
|
302 |
if use doc; then |
303 |
doxygen doc/doxygen.conf || die "Building of Subversion HTML documentation failed" |
304 |
|
305 |
if use java; then |
306 |
emake doc-javahl || die "Building of Subversion JavaHL library HTML documentation failed" |
307 |
fi |
308 |
fi |
309 |
} |
310 |
|
311 |
src_install() { |
312 |
emake -j1 DESTDIR="${D}" local-install || die "Installation of core of Subversion failed" |
313 |
|
314 |
if use ctypes-python; then |
315 |
ctypes_python_bindings_installation() { |
316 |
rm -f subversion/bindings/ctypes-python |
317 |
ln -s ctypes-python-${PYTHON_ABI} subversion/bindings/ctypes-python |
318 |
emake DESTDIR="${D}" install-ctypes-python |
319 |
} |
320 |
python_execute_function \ |
321 |
--action-message 'Installation of Subversion Ctypes Python bindings with $(python_get_implementation) $(python_get_version)' \ |
322 |
--failure-message 'Installation of Subversion Ctypes Python bindings failed with $(python_get_implementation) $(python_get_version)' \ |
323 |
ctypes_python_bindings_installation |
324 |
fi |
325 |
|
326 |
if use python; then |
327 |
swig_python_bindings_installation() { |
328 |
rm -f subversion/bindings/swig/python |
329 |
ln -s python-${PYTHON_ABI} subversion/bindings/swig/python |
330 |
emake \ |
331 |
DESTDIR="${D}" \ |
332 |
PYTHON_VERSION="$(python_get_version)" \ |
333 |
swig_pydir="${EPREFIX}$(python_get_sitedir)/libsvn" \ |
334 |
swig_pydir_extra="${EPREFIX}$(python_get_sitedir)/svn" \ |
335 |
install-swig-py |
336 |
} |
337 |
python_execute_function \ |
338 |
--action-message 'Installation of Subversion SWIG Python bindings with $(python_get_implementation) $(python_get_version)' \ |
339 |
--failure-message 'Installation of Subversion SWIG Python bindings failed with $(python_get_implementation) $(python_get_version)' \ |
340 |
swig_python_bindings_installation |
341 |
fi |
342 |
|
343 |
if use ctypes-python || use python; then |
344 |
python_clean_installation_image -q |
345 |
fi |
346 |
|
347 |
if use perl; then |
348 |
emake DESTDIR="${D}" INSTALLDIRS="vendor" install-swig-pl || die "Installation of Subversion SWIG Perl bindings failed" |
349 |
fixlocalpod |
350 |
find "${ED}" "(" -name .packlist -o -name "*.bs" ")" -print0 | xargs -0 rm -fr |
351 |
fi |
352 |
|
353 |
if use ruby; then |
354 |
emake DESTDIR="${D}" install-swig-rb || die "Installation of Subversion SWIG Ruby bindings failed" |
355 |
fi |
356 |
|
357 |
if use java; then |
358 |
emake DESTDIR="${D}" install-javahl || die "Installation of Subversion JavaHL library failed" |
359 |
java-pkg_regso "${ED}"usr/$(get_libdir)/libsvnjavahl*.so |
360 |
java-pkg_dojar "${ED}"usr/$(get_libdir)/svn-javahl/svn-javahl.jar |
361 |
rm -fr "${ED}"usr/$(get_libdir)/svn-javahl/*.jar |
362 |
fi |
363 |
|
364 |
# Install Apache module configuration. |
365 |
if use apache2; then |
366 |
keepdir "${APACHE_MODULES_CONFDIR}" |
367 |
insinto "${APACHE_MODULES_CONFDIR}" |
368 |
doins "${FILESDIR}/47_mod_dav_svn.conf" |
369 |
fi |
370 |
|
371 |
# Install Bash Completion, bug 43179. |
372 |
dobashcompletion tools/client-side/bash_completion subversion |
373 |
rm -f tools/client-side/bash_completion |
374 |
|
375 |
# Install hot backup script, bug 54304. |
376 |
newbin tools/backup/hot-backup.py svn-hot-backup |
377 |
rm -fr tools/backup |
378 |
|
379 |
# Install svn_load_dirs.pl. |
380 |
if use perl; then |
381 |
dobin contrib/client-side/svn_load_dirs/svn_load_dirs.pl |
382 |
fi |
383 |
rm -f contrib/client-side/svn_load_dirs/svn_load_dirs.pl |
384 |
|
385 |
# Install svnserve init-script and xinet.d snippet, bug 43245. |
386 |
newinitd "${FILESDIR}"/svnserve.initd2 svnserve |
387 |
newconfd "${FILESDIR}"/svnserve.confd svnserve |
388 |
insinto /etc/xinetd.d |
389 |
newins "${FILESDIR}"/svnserve.xinetd svnserve |
390 |
|
391 |
# Install documentation. |
392 |
dodoc CHANGES COMMITTERS README |
393 |
dodoc tools/xslt/svnindex.{css,xsl} |
394 |
rm -fr tools/xslt |
395 |
|
396 |
# Install Vim syntax files. |
397 |
if use vim-syntax; then |
398 |
insinto /usr/share/vim/vimfiles/syntax |
399 |
doins contrib/client-side/vim/svn.vim |
400 |
fi |
401 |
rm -f contrib/client-side/vim/svn.vim |
402 |
|
403 |
# Install Emacs Lisps. |
404 |
if use emacs; then |
405 |
elisp-install ${PN} contrib/client-side/emacs/{dsvn,psvn}.{el,elc} doc/svn-doc.{el,elc} doc/tools/svnbook.{el,elc} || die "Installation of Emacs modules failed" |
406 |
elisp-install ${PN}/compat contrib/client-side/emacs/vc-svn.{el,elc} || die "Installation of Emacs modules failed" |
407 |
touch "${ED}${SITELISP}/${PN}/compat/.nosearch" |
408 |
elisp-site-file-install "${FILESDIR}/70svn-gentoo.el" || die "Installation of Emacs site-init file failed" |
409 |
fi |
410 |
rm -fr contrib/client-side/emacs |
411 |
|
412 |
# Install extra files. |
413 |
if use extras; then |
414 |
cat << EOF > 80subversion-extras |
415 |
PATH="${EPREFIX}/usr/$(get_libdir)/subversion/bin" |
416 |
ROOTPATH="${EPREFIX}/usr/$(get_libdir)/subversion/bin" |
417 |
EOF |
418 |
doenvd 80subversion-extras |
419 |
|
420 |
emake DESTDIR="${D}" contribdir="/usr/$(get_libdir)/subversion/bin" install-contrib || die "Installation of contrib failed" |
421 |
emake DESTDIR="${D}" toolsdir="/usr/$(get_libdir)/subversion/bin" install-tools || die "Installation of tools failed" |
422 |
|
423 |
find contrib tools "(" -name "*.bat" -o -name "*.in" -o -name ".libs" ")" -print0 | xargs -0 rm -fr |
424 |
rm -fr contrib/client-side/svn-push |
425 |
rm -fr contrib/server-side/svnstsw |
426 |
rm -fr tools/client-side/svnmucc |
427 |
rm -fr tools/server-side/{svn-populate-node-origins-index,svnauthz-validate}* |
428 |
rm -fr tools/{buildbot,dev,diff,po} |
429 |
|
430 |
insinto /usr/share/${PN} |
431 |
doins -r contrib tools |
432 |
fi |
433 |
|
434 |
if use doc; then |
435 |
dohtml -r doc/doxygen/html/* || die "Installation of Subversion HTML documentation failed" |
436 |
|
437 |
dodoc -r notes |
438 |
|
439 |
if use java; then |
440 |
java-pkg_dojavadoc doc/javadoc |
441 |
fi |
442 |
fi |
443 |
|
444 |
find "${D}" '(' -name '*.la' ')' -print0 | xargs -0 rm -f |
445 |
} |
446 |
|
447 |
pkg_preinst() { |
448 |
# Compare versions of Berkeley DB, bug 122877. |
449 |
if use berkdb && [[ -f "${EROOT}usr/bin/svn" ]]; then |
450 |
OLD_BDB_VERSION="$(scanelf -nq "${EROOT}usr/$(get_libdir)/libsvn_subr-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")" |
451 |
NEW_BDB_VERSION="$(scanelf -nq "${ED}usr/$(get_libdir)/libsvn_subr-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")" |
452 |
if [[ "${OLD_BDB_VERSION}" != "${NEW_BDB_VERSION}" ]]; then |
453 |
CHANGED_BDB_VERSION="1" |
454 |
fi |
455 |
fi |
456 |
} |
457 |
|
458 |
pkg_postinst() { |
459 |
use emacs && elisp-site-regen |
460 |
use perl && perl-module_pkg_postinst |
461 |
|
462 |
if use ctypes-python; then |
463 |
python_mod_optimize csvn |
464 |
fi |
465 |
|
466 |
if use python; then |
467 |
python_mod_optimize libsvn svn |
468 |
fi |
469 |
|
470 |
if use apache2; then |
471 |
elog " - http-based server:" |
472 |
elog " 1. Edit /etc/conf.d/apache2 to include both \"-D DAV\" and \"-D SVN\"" |
473 |
elog " 2. Create an htpasswd file:" |
474 |
elog " htpasswd2 -m -c ${SVN_REPOS_LOC}/conf/svnusers USERNAME" |
475 |
elog " 3. Fix the repository permissions (see \"Fixing the repository permissions\")" |
476 |
elog " 4. Restart Apache: /etc/init.d/apache2 restart" |
477 |
elog |
478 |
fi |
479 |
|
480 |
if [[ -n "${CHANGED_BDB_VERSION}" ]]; then |
481 |
ewarn "You upgraded from an older version of Berkeley DB and may experience" |
482 |
ewarn "problems with your repository. Run the following commands as root to fix it:" |
483 |
ewarn " db4_recover -h ${SVN_REPOS_LOC}/repos" |
484 |
ewarn " chown -Rf apache:apache ${SVN_REPOS_LOC}/repos" |
485 |
fi |
486 |
|
487 |
ewarn "If you run subversion as a daemon, you will need to restart it to avoid module mismatches." |
488 |
} |
489 |
|
490 |
pkg_postrm() { |
491 |
use emacs && elisp-site-regen |
492 |
use perl && perl-module_pkg_postrm |
493 |
|
494 |
if use ctypes-python; then |
495 |
python_mod_cleanup csvn |
496 |
fi |
497 |
|
498 |
if use python; then |
499 |
python_mod_cleanup libsvn svn |
500 |
fi |
501 |
} |
502 |
|
503 |
pkg_config() { |
504 |
# Remember: Don't use ${EROOT}${SVN_REPOS_LOC} since ${SVN_REPOS_LOC} |
505 |
# already has EPREFIX in it |
506 |
einfo "Initializing the database in ${ROOT}${SVN_REPOS_LOC}..." |
507 |
if [[ -e "${ROOT}${SVN_REPOS_LOC}/repos" ]]; then |
508 |
echo "A Subversion repository already exists and I will not overwrite it." |
509 |
echo "Delete \"${ROOT}${SVN_REPOS_LOC}/repos\" first if you're sure you want to have a clean version." |
510 |
else |
511 |
mkdir -p "${ROOT}${SVN_REPOS_LOC}/conf" |
512 |
|
513 |
einfo "Populating repository directory..." |
514 |
# Create initial repository. |
515 |
"${EROOT}usr/bin/svnadmin" create "${ROOT}${SVN_REPOS_LOC}/repos" |
516 |
|
517 |
einfo "Setting repository permissions..." |
518 |
SVNSERVE_USER="$(. "${EROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_USER}")" |
519 |
SVNSERVE_GROUP="$(. "${EROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_GROUP}")" |
520 |
if use apache2; then |
521 |
[[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="apache" |
522 |
[[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="apache" |
523 |
else |
524 |
[[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="svn" |
525 |
[[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="svnusers" |
526 |
enewgroup "${SVNSERVE_GROUP}" |
527 |
enewuser "${SVNSERVE_USER}" -1 -1 "${SVN_REPOS_LOC}" "${SVNSERVE_GROUP}" |
528 |
fi |
529 |
chown -Rf "${SVNSERVE_USER}:${SVNSERVE_GROUP}" "${ROOT}${SVN_REPOS_LOC}/repos" |
530 |
chmod -Rf go-rwx "${ROOT}${SVN_REPOS_LOC}/conf" |
531 |
chmod -Rf o-rwx "${ROOT}${SVN_REPOS_LOC}/repos" |
532 |
fi |
533 |
} |