1 |
arfrever 09/05/12 16:23:32 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: subversion-1.6.2.ebuild |
5 |
Removed: subversion-1.6.0-r1.ebuild |
6 |
Log: |
7 |
Version bump. |
8 |
(Portage version: 13622-svn/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.376 dev-util/subversion/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/ChangeLog?rev=1.376&view=markup |
14 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/ChangeLog?rev=1.376&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/ChangeLog?r1=1.375&r2=1.376 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/dev-util/subversion/ChangeLog,v |
20 |
retrieving revision 1.375 |
21 |
retrieving revision 1.376 |
22 |
diff -u -r1.375 -r1.376 |
23 |
--- ChangeLog 3 May 2009 18:40:05 -0000 1.375 |
24 |
+++ ChangeLog 12 May 2009 16:23:32 -0000 1.376 |
25 |
@@ -1,6 +1,15 @@ |
26 |
# ChangeLog for dev-util/subversion |
27 |
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/dev-util/subversion/ChangeLog,v 1.375 2009/05/03 18:40:05 maekke Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/dev-util/subversion/ChangeLog,v 1.376 2009/05/12 16:23:32 arfrever Exp $ |
30 |
+ |
31 |
+*subversion-1.6.2 (12 May 2009) |
32 |
+ |
33 |
+ 12 May 2009; Arfrever Frehtes Taifersar Arahesis <arfrever@g.o> |
34 |
+ -subversion-1.6.0-r1.ebuild, -files/subversion-1.6.0-various_fixes.patch, |
35 |
+ +subversion-1.6.2.ebuild, |
36 |
+ +files/subversion-1.6.2-fix_undefined_references.patch, |
37 |
+ +files/subversion-1.6.2-local_library_preloading.patch: |
38 |
+ Version bump. |
39 |
|
40 |
03 May 2009; Markus Meier <maekke@g.o> subversion-1.5.6.ebuild: |
41 |
amd64 stable, bug #267270 |
42 |
|
43 |
|
44 |
|
45 |
1.1 dev-util/subversion/subversion-1.6.2.ebuild |
46 |
|
47 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/subversion-1.6.2.ebuild?rev=1.1&view=markup |
48 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/subversion-1.6.2.ebuild?rev=1.1&content-type=text/plain |
49 |
|
50 |
Index: subversion-1.6.2.ebuild |
51 |
=================================================================== |
52 |
# Copyright 1999-2009 Gentoo Foundation |
53 |
# Distributed under the terms of the GNU General Public License v2 |
54 |
# $Header: /var/cvsroot/gentoo-x86/dev-util/subversion/subversion-1.6.2.ebuild,v 1.1 2009/05/12 16:23:32 arfrever Exp $ |
55 |
|
56 |
EAPI="2" |
57 |
|
58 |
WANT_AUTOMAKE="none" |
59 |
|
60 |
inherit autotools bash-completion db-use depend.apache elisp-common eutils flag-o-matic java-pkg-opt-2 libtool multilib perl-module python |
61 |
|
62 |
DESCRIPTION="Advanced version control system" |
63 |
HOMEPAGE="http://subversion.tigris.org/" |
64 |
SRC_URI="http://subversion.tigris.org/downloads/${P/_/-}.tar.bz2" |
65 |
|
66 |
LICENSE="Subversion" |
67 |
SLOT="0" |
68 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~x86" |
69 |
IUSE="apache2 berkdb ctypes-python debug doc +dso emacs extras gnome-keyring java kde nls perl python ruby sasl test vim-syntax +webdav-neon webdav-serf" |
70 |
|
71 |
CDEPEND=">=dev-db/sqlite-3.4[threadsafe] |
72 |
>=dev-libs/apr-1.3:1 |
73 |
>=dev-libs/apr-util-1.3:1 |
74 |
dev-libs/expat |
75 |
sys-libs/zlib |
76 |
berkdb? ( =sys-libs/db-4* ) |
77 |
emacs? ( virtual/emacs ) |
78 |
gnome-keyring? ( dev-libs/glib:2 sys-apps/dbus gnome-base/gnome-keyring ) |
79 |
kde? ( sys-apps/dbus x11-libs/qt-core x11-libs/qt-dbus x11-libs/qt-gui >=kde-base/kdelibs-4 ) |
80 |
ruby? ( >=dev-lang/ruby-1.8.2 ) |
81 |
sasl? ( dev-libs/cyrus-sasl ) |
82 |
webdav-neon? ( >=net-misc/neon-0.28 ) |
83 |
webdav-serf? ( >=net-libs/serf-0.3.0 )" |
84 |
|
85 |
RDEPEND="${CDEPEND} |
86 |
apache2? ( www-servers/apache[apache2_modules_dav] ) |
87 |
java? ( >=virtual/jre-1.5 ) |
88 |
kde? ( kde-base/kwalletd ) |
89 |
nls? ( virtual/libintl ) |
90 |
perl? ( dev-perl/URI )" |
91 |
|
92 |
DEPEND="${CDEPEND} |
93 |
ctypes-python? ( dev-python/ctypesgen ) |
94 |
doc? ( app-doc/doxygen ) |
95 |
gnome-keyring? ( dev-util/pkgconfig ) |
96 |
java? ( >=virtual/jdk-1.5 ) |
97 |
kde? ( dev-util/pkgconfig ) |
98 |
nls? ( sys-devel/gettext ) |
99 |
webdav-neon? ( dev-util/pkgconfig )" |
100 |
|
101 |
want_apache |
102 |
|
103 |
S="${WORKDIR}/${P/_/-}" |
104 |
|
105 |
# Allow for custom repository locations. |
106 |
# This can't be in pkg_setup() because the variable needs to be available to pkg_config(). |
107 |
: ${SVN_REPOS_LOC:=/var/svn} |
108 |
|
109 |
pkg_setup() { |
110 |
if use kde && ! use nls; then |
111 |
eerror "Support for KWallet (KDE) requires Native Language Support (NLS)." |
112 |
die "Enable \"nls\" USE flag" |
113 |
fi |
114 |
|
115 |
if use berkdb; then |
116 |
einfo |
117 |
if [[ -z "${SVN_BDB_VERSION}" ]]; then |
118 |
SVN_BDB_VERSION="$(db_ver_to_slot "$(db_findver sys-libs/db 2>/dev/null)")" |
119 |
einfo "SVN_BDB_VERSION variable isn't set. You can set it to enforce using of specific version of Berkeley DB." |
120 |
fi |
121 |
einfo "Using: Berkeley DB ${SVN_BDB_VERSION}" |
122 |
einfo |
123 |
|
124 |
local apu_bdb_version="$(scanelf -nq "${ROOT}usr/$(get_libdir)/libaprutil-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")" |
125 |
if [[ -n "${apu_bdb_version}" && "${SVN_BDB_VERSION}" != "${apu_bdb_version}" ]]; then |
126 |
eerror "APR-Util is linked against Berkeley DB ${apu_bdb_version}, but you are trying" |
127 |
eerror "to build Subversion with support for Berkeley DB ${SVN_BDB_VERSION}." |
128 |
eerror "Rebuild dev-libs/apr-util or set SVN_BDB_VERSION=\"${apu_bdb_version}\"." |
129 |
eerror "Aborting to avoid possible run-time crashes." |
130 |
die "Berkeley DB version mismatch" |
131 |
fi |
132 |
fi |
133 |
|
134 |
java-pkg-opt-2_pkg_setup |
135 |
|
136 |
if ! use webdav-neon && ! use webdav-serf; then |
137 |
ewarn |
138 |
ewarn "WebDAV support is disabled. You need WebDAV to" |
139 |
ewarn "access repositories through the HTTP protocol." |
140 |
ewarn |
141 |
ewarn "WebDAV support needs one of the following USE flags enabled:" |
142 |
ewarn " webdav-neon webdav-serf" |
143 |
ewarn |
144 |
ewarn "You can do this by enabling one of these flags in /etc/portage/package.use:" |
145 |
ewarn " ${CATEGORY}/${PN} webdav-neon webdav-serf" |
146 |
ewarn |
147 |
ebeep |
148 |
fi |
149 |
|
150 |
if use test; then |
151 |
elog |
152 |
elog "You can set the following variables to enable testing of some features:" |
153 |
if use webdav-neon || use webdav-serf; then |
154 |
elog " SVN_TEST_APACHE=1 - Enable testing of mod_dav_svn, mod_authz_svn and libsvn_ra_neon / libsvn_ra_serf" |
155 |
elog " (See \"Testing of mod_dav_svn, mod_authz_svn and libsvn_ra_neon / libsvn_ra_serf\")" |
156 |
fi |
157 |
elog " SVN_TEST_FSFS_MEMCACHED=1 - Enable using of Memcached for FSFS repositories" |
158 |
elog " SVN_TEST_FSFS_MEMCACHED_PORT=integer - Set Memcached port number (Default value: 11211)" |
159 |
elog " SVN_TEST_FSFS_SHARDING=integer - Enable sharding of FSFS repositories and set default shard size for FSFS repositories" |
160 |
elog " SVN_TEST_FSFS_PACKING=1 - Enable packing of FSFS repositories" |
161 |
elog " (SVN_TEST_FSFS_PACKING requires SVN_TEST_FSFS_SHARDING)" |
162 |
# if use sasl; then |
163 |
# elog " SVN_TEST_SASL=1 - Enable SASL authentication" |
164 |
# fi |
165 |
if use ctypes-python || use java || use perl || use python || use ruby; then |
166 |
elog " SVN_TEST_BINDINGS=1 - Enable testing of bindings" |
167 |
fi |
168 |
if use java || use perl || use python || use ruby; then |
169 |
elog " (Testing of bindings requires ${CATEGORY}/${PF})" |
170 |
fi |
171 |
if use java; then |
172 |
elog " (Testing of JavaHL library requires dev-java/junit:4)" |
173 |
fi |
174 |
elog |
175 |
|
176 |
if { use webdav-neon || use webdav-serf; } && [[ -n "${SVN_TEST_APACHE}" ]] && ! has_version "${CATEGORY}/${PN}[apache2]"; then |
177 |
die "${CATEGORY}/${PN} must be installed with USE=\"apache2\"" |
178 |
fi |
179 |
|
180 |
if [[ -n "${SVN_TEST_FSFS_MEMCACHED}" ]] && ! has_version net-misc/memcached; then |
181 |
die "net-misc/memcached must be installed" |
182 |
fi |
183 |
if [[ -n "${SVN_TEST_FSFS_MEMCACHED_PORT}" ]] && ! ([[ "$((${SVN_TEST_FSFS_MEMCACHED_PORT}))" == "${SVN_TEST_FSFS_MEMCACHED_PORT}" ]]) &>/dev/null; then |
184 |
die "Value of SVN_TEST_FSFS_MEMCACHED_PORT must be an integer" |
185 |
fi |
186 |
if [[ -n "${SVN_TEST_FSFS_SHARDING}" ]] && ! ([[ "$((${SVN_TEST_FSFS_SHARDING}))" == "${SVN_TEST_FSFS_SHARDING}" ]]) &>/dev/null; then |
187 |
die "Value of SVN_TEST_FSFS_SHARDING must be an integer" |
188 |
fi |
189 |
if [[ -n "${SVN_TEST_FSFS_PACKING}" && -z "${SVN_TEST_FSFS_SHARDING}" ]]; then |
190 |
die "SVN_TEST_FSFS_PACKING requires SVN_TEST_FSFS_SHARDING" |
191 |
fi |
192 |
|
193 |
if [[ -n "${SVN_TEST_BINDINGS}" ]]; then |
194 |
if { use java || use perl || use python || use ruby; } && ! has_version "=${CATEGORY}/${PF}"; then |
195 |
die "${CATEGORY}/${PF} must be installed" |
196 |
fi |
197 |
if use java && ! has_version dev-java/junit:4; then |
198 |
die "dev-java/junit:4 must be installed" |
199 |
fi |
200 |
fi |
201 |
fi |
202 |
|
203 |
append-flags -fno-strict-aliasing |
204 |
|
205 |
if use debug; then |
206 |
append-cppflags -DSVN_DEBUG -DAP_DEBUG |
207 |
fi |
208 |
} |
209 |
|
210 |
src_unpack() { |
211 |
if use test && { use webdav-neon || use webdav-serf; }; then |
212 |
create_apache_tests_configuration |
213 |
|
214 |
elog |
215 |
elog "Testing of mod_dav_svn, mod_authz_svn and libsvn_ra_neon / libsvn_ra_serf:" |
216 |
elog " If you want to test mod_dav_svn, mod_authz_svn and libsvn_ra_neon / libsvn_ra_serf," |
217 |
elog " ensure that ${CATEGORY}/${PN} is installed with USE=\"apache2\"," |
218 |
elog " copy \"${T}/99_subversion_tests.conf\" to /etc/apache2/modules.d directory," |
219 |
elog " define DAV, SVN, SVN_AUTHZ and SVN_TESTS in APACHE2_OPTS variable in /etc/conf.d/apache2," |
220 |
elog " (re)start Apache and run \`SVN_TEST_APACHE=1 emerge ${CATEGORY}/${PN}\`." |
221 |
elog |
222 |
|
223 |
if [[ -z "${SVN_TEST_APACHE}" ]]; then |
224 |
ebeep 24 |
225 |
else |
226 |
if [[ ! -f "/etc/apache2/modules.d/99_subversion_tests.conf" ]]; then |
227 |
die "/etc/apache2/modules.d/99_subversion_tests.conf doesn't exist" |
228 |
fi |
229 |
if ! cmp -s "${T}/99_subversion_tests.conf" "/etc/apache2/modules.d/99_subversion_tests.conf"; then |
230 |
die "/etc/apache2/modules.d/99_subversion_tests.conf mismatch" |
231 |
fi |
232 |
fi |
233 |
fi |
234 |
|
235 |
unpack ${A} |
236 |
} |
237 |
|
238 |
src_prepare() { |
239 |
epatch "${FILESDIR}/${PN}-1.6.0-disable_linking_against_unneeded_libraries.patch" |
240 |
epatch "${FILESDIR}/${P}-fix_undefined_references.patch" |
241 |
epatch "${FILESDIR}/${P}-local_library_preloading.patch" |
242 |
chmod +x build/transform_libtool_scripts.sh || die "chmod failed" |
243 |
|
244 |
if ! use test; then |
245 |
sed -i \ |
246 |
-e "s/\(BUILD_RULES=.*\) bdb-test\(.*\)/\1\2/g" \ |
247 |
-e "s/\(BUILD_RULES=.*\) test\(.*\)/\1\2/g" configure.ac |
248 |
fi |
249 |
|
250 |
eautoconf |
251 |
elibtoolize |
252 |
} |
253 |
|
254 |
src_configure() { |
255 |
local myconf |
256 |
|
257 |
if use python || use perl || use ruby; then |
258 |
myconf+=" --with-swig" |
259 |
else |
260 |
myconf+=" --without-swig" |
261 |
fi |
262 |
|
263 |
if use java; then |
264 |
if use test && [[ -n "${SVN_TEST_BINDINGS}" ]]; then |
265 |
myconf+=" --with-junit=/usr/share/junit-4/lib/junit.jar" |
266 |
else |
267 |
myconf+=" --without-junit" |
268 |
fi |
269 |
fi |
270 |
|
271 |
econf --libdir="/usr/$(get_libdir)" \ |
272 |
$(use_with apache2 apxs "${APXS}") \ |
273 |
$(use_with berkdb berkeley-db "db.h:/usr/include/db${SVN_BDB_VERSION}::db-${SVN_BDB_VERSION}") \ |
274 |
$(use_with ctypes-python ctypesgen /usr) \ |
275 |
$(use_enable dso runtime-module-search) \ |
276 |
$(use_with gnome-keyring) \ |
277 |
$(use_enable java javahl) \ |
278 |
$(use_with java jdk "${JAVA_HOME}") \ |
279 |
$(use_with kde kwallet) \ |
280 |
$(use_enable nls) \ |
281 |
$(use_with sasl) \ |
282 |
$(use_with webdav-neon neon) \ |
283 |
$(use_with webdav-serf serf /usr) \ |
284 |
${myconf} \ |
285 |
--with-apr=/usr/bin/apr-1-config \ |
286 |
--with-apr-util=/usr/bin/apu-1-config \ |
287 |
--disable-experimental-libtool \ |
288 |
--without-jikes \ |
289 |
--enable-local-library-preloading \ |
290 |
--disable-mod-activation \ |
291 |
--disable-neon-version-check \ |
292 |
--with-sqlite=/usr |
293 |
} |
294 |
|
295 |
src_compile() { |
296 |
einfo |
297 |
einfo "Building of core of Subversion" |
298 |
einfo |
299 |
emake local-all || die "Building of core of Subversion failed" |
300 |
|
301 |
if use ctypes-python; then |
302 |
einfo |
303 |
einfo "Building of Subversion Ctypes Python bindings" |
304 |
einfo |
305 |
emake ctypes-python || die "Building of Subversion Ctypes Python bindings failed" |
306 |
fi |
307 |
|
308 |
if use python; then |
309 |
einfo |
310 |
einfo "Building of Subversion SWIG Python bindings" |
311 |
einfo |
312 |
emake swig_pydir="$(python_get_sitedir)/libsvn" swig_pydir_extra="$(python_get_sitedir)/svn" swig-py \ |
313 |
|| die "Building of Subversion SWIG Python bindings failed" |
314 |
fi |
315 |
|
316 |
if use perl; then |
317 |
einfo |
318 |
einfo "Building of Subversion SWIG Perl bindings" |
319 |
einfo |
320 |
emake -j1 swig-pl || die "Building of Subversion SWIG Perl bindings failed" |
321 |
fi |
322 |
|
323 |
if use ruby; then |
324 |
einfo |
325 |
einfo "Building of Subversion SWIG Ruby bindings" |
326 |
einfo |
327 |
emake swig-rb || die "Building of Subversion SWIG Ruby bindings failed" |
328 |
fi |
329 |
|
330 |
if use java; then |
331 |
einfo |
332 |
einfo "Building of Subversion JavaHL library" |
333 |
einfo |
334 |
emake -j1 JAVAC_FLAGS="$(java-pkg_javac-args) -encoding iso8859-1" javahl \ |
335 |
|| die "Building of Subversion JavaHL library failed" |
336 |
fi |
337 |
|
338 |
if use emacs; then |
339 |
einfo |
340 |
einfo "Compilation of Emacs modules" |
341 |
einfo |
342 |
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" |
343 |
fi |
344 |
|
345 |
if use extras; then |
346 |
einfo |
347 |
einfo "Building of contrib and tools" |
348 |
einfo |
349 |
emake contrib || die "Building of contrib failed" |
350 |
emake tools || die "Building of tools failed" |
351 |
fi |
352 |
|
353 |
if use doc; then |
354 |
einfo |
355 |
einfo "Building of Subversion HTML documentation" |
356 |
einfo |
357 |
doxygen doc/doxygen.conf || die "Building of Subversion HTML documentation failed" |
358 |
|
359 |
if use java; then |
360 |
einfo |
361 |
einfo "Building of Subversion JavaHL library HTML documentation" |
362 |
einfo |
363 |
emake doc-javahl || die "Building of Subversion JavaHL library HTML documentation failed" |
364 |
fi |
365 |
fi |
366 |
} |
367 |
|
368 |
create_apache_tests_configuration() { |
369 |
cat << EOF > "${T}/99_subversion_tests.conf" |
370 |
<IfDefine SVN_TESTS> |
371 |
User $(id -un) |
372 |
Group $(id -gn) |
373 |
|
374 |
<Location /svn-test-work/repositories> |
375 |
DAV svn |
376 |
SVNParentPath "${S}/subversion/tests/cmdline/svn-test-work/repositories" |
377 |
AuthzSVNAccessFile "${S}/subversion/tests/cmdline/svn-test-work/authz" |
378 |
AuthType Basic |
379 |
AuthName "Subversion Repository" |
380 |
AuthUserFile "${T}/apache-users" |
381 |
Require valid-user |
382 |
</Location> |
383 |
|
384 |
<Location /svn-test-work/local_tmp/repos> |
385 |
DAV svn |
386 |
SVNPath "${S}/subversion/tests/cmdline/svn-test-work/local_tmp/repos" |
387 |
AuthzSVNAccessFile "${S}/subversion/tests/cmdline/svn-test-work/authz" |
388 |
AuthType Basic |
389 |
AuthName "Subversion Repository" |
390 |
AuthUserFile "${T}/apache-users" |
391 |
Require valid-user |
392 |
</Location> |
393 |
</IfDefine> |
394 |
EOF |
395 |
|
396 |
cat << EOF > "${T}/apache-users" |
397 |
jrandom:xCGl35kV9oWCY |
398 |
jconstant:xCGl35kV9oWCY |
399 |
EOF |
400 |
} |
401 |
|
402 |
initialize_tests_environment() { |
403 |
[[ "$1" == "local" ]] && base_url="file://${S}/subversion/tests/cmdline" |
404 |
[[ "$1" == "svn" ]] && base_url="svn://127.0.0.1" |
405 |
[[ "$1" == "neon" ]] && base_url="http://localhost" http_library="neon" |
406 |
[[ "$1" == "serf" ]] && base_url="http://localhost" http_library="serf" |
407 |
|
408 |
[[ "$1" == "svn" ]] && LC_ALL="C" subversion/svnserve/svnserve -dr "subversion/tests/cmdline" --pid-file "${T}/svnserve.pid" |
409 |
[[ -n "${SVN_TEST_FSFS_MEMCACHED}" ]] && memcached -dp "${SVN_TEST_FSFS_MEMCACHED_PORT}" -P "${T}/memcached.pid" |
410 |
} |
411 |
|
412 |
terminate_tests_environment() { |
413 |
[[ "$1" == "svn" ]] && kill "$(<"${T}/svnserve.pid")" |
414 |
[[ -n "${SVN_TEST_FSFS_MEMCACHED}" ]] && kill "$(<"${T}/memcached.pid")" |
415 |
} |
416 |
|
417 |
src_test() { |
418 |
local fs_type fs_types ra_type ra_types options failed_tests |
419 |
|
420 |
fs_types="fsfs" |
421 |
use berkdb && fs_types+=" bdb" |
422 |
|
423 |
ra_types="local svn" |
424 |
if [[ -n "${SVN_TEST_APACHE}" ]]; then |
425 |
use webdav-neon && ra_types+=" neon" |
426 |
use webdav-serf && ra_types+=" serf" |
427 |
fi |
428 |
|
429 |
if [[ -n "${SVN_TEST_FSFS_MEMCACHED}" ]]; then |
430 |
[[ -z "${SVN_TEST_FSFS_MEMCACHED_PORT}" ]] && SVN_TEST_FSFS_MEMCACHED_PORT="11211" |
431 |
sed -e "/\[memcached-servers\]/akey = 127.0.0.1:${SVN_TEST_FSFS_MEMCACHED_PORT}" -i subversion/tests/tests.conf |
432 |
fi |
433 |
if [[ -n "${SVN_TEST_FSFS_SHARDING}" ]]; then |
434 |
options+=" FSFS_SHARDING=${SVN_TEST_FSFS_SHARDING}" |
435 |
fi |
436 |
if [[ -n "${SVN_TEST_FSFS_PACKING}" ]]; then |
437 |
options+=" FSFS_PACKING=1" |
438 |
fi |
439 |
# if [[ -n "${SVN_TEST_SASL}" ]]; then |
440 |
# options+=" ENABLE_SASL=1" |
441 |
# fi |
442 |
|
443 |
for ra_type in ${ra_types}; do |
444 |
for fs_type in ${fs_types}; do |
445 |
[[ "${ra_type}" == "local" && "${fs_type}" == "bdb" ]] && continue |
446 |
einfo |
447 |
einfo "\e[1;34mTesting of ra_${ra_type} + $(echo ${fs_type} | tr '[:lower:]' '[:upper:]')\e[0m" |
448 |
einfo |
449 |
initialize_tests_environment ${ra_type} |
450 |
emake check FS_TYPE="${fs_type}" BASE_URL="${base_url}" HTTP_LIBRARY="${http_library}" CLEANUP="true" ${options} || failed_tests="1" |
451 |
terminate_tests_environment ${ra_type} |
452 |
mv tests.log tests-ra_${ra_type}-${fs_type}.log |
453 |
done |
454 |
done |
455 |
unset base_url http_library |
456 |
|
457 |
if [[ -n "${SVN_TEST_BINDINGS}" ]]; then |
458 |
local swig_lingua swig_linguas |
459 |
local -A linguas |
460 |
if use ctypes-python; then |
461 |
einfo |
462 |
einfo "\e[1;34mTesting of Subversion Ctypes Python bindings\e[0m" |
463 |
einfo |
464 |
emake check-ctypes-python || failed_tests="1" |
465 |
fi |
466 |
|
467 |
use perl && swig_linguas+=" pl" |
468 |
use python && swig_linguas+=" py" |
469 |
use ruby && swig_linguas+=" rb" |
470 |
|
471 |
linguas[pl]="Perl" |
472 |
linguas[py]="Python" |
473 |
linguas[rb]="Ruby" |
474 |
|
475 |
for swig_lingua in ${swig_linguas}; do |
476 |
einfo |
477 |
einfo "\e[1;34mTesting of Subversion SWIG ${linguas[${swig_lingua}]} bindings\e[0m" |
478 |
einfo |
479 |
emake check-swig-${swig_lingua} || failed_tests="1" |
480 |
done |
481 |
|
482 |
if use java; then |
483 |
einfo |
484 |
einfo "\e[1;34mTesting of Subversion JavaHL library\e[0m" |
485 |
einfo |
486 |
emake check-javahl || failed_tests="1" |
487 |
fi |
488 |
fi |
489 |
|
490 |
if [[ -n "${failed_tests}" ]]; then |
491 |
ewarn |
492 |
ewarn "\e[1;31mSome tests failed\e[0m" |
493 |
ewarn |
494 |
ebeep 12 |
495 |
fi |
496 |
} |
497 |
|
498 |
src_install() { |
499 |
einfo |
500 |
einfo "Installation of core of Subversion" |
501 |
einfo |
502 |
emake -j1 DESTDIR="${D}" local-install || die "Installation of core of Subversion failed" |
503 |
|
504 |
if use ctypes-python; then |
505 |
einfo |
506 |
einfo "Installation of Subversion Ctypes Python bindings" |
507 |
einfo |
508 |
emake DESTDIR="${D}" install-ctypes-python || die "Installation of Subversion Ctypes Python bindings failed" |
509 |
fi |
510 |
|
511 |
if use python; then |
512 |
einfo |
513 |
einfo "Installation of Subversion SWIG Python bindings" |
514 |
einfo |
515 |
emake -j1 DESTDIR="${D}" swig_pydir="$(python_get_sitedir)/libsvn" swig_pydir_extra="$(python_get_sitedir)/svn" install-swig-py \ |
516 |
|| die "Installation of Subversion SWIG Python bindings failed" |
517 |
fi |
518 |
|
519 |
if use perl; then |
520 |
einfo |
521 |
einfo "Installation of Subversion SWIG Perl bindings" |
522 |
einfo |
523 |
emake -j1 DESTDIR="${D}" INSTALLDIRS="vendor" install-swig-pl || die "Installation of Subversion SWIG Perl bindings failed" |
524 |
fixlocalpod |
525 |
find "${D}" "(" -name .packlist -o -name "*.bs" ")" -print0 | xargs -0 rm -fr |
526 |
fi |
527 |
|
528 |
if use ruby; then |
529 |
einfo |
530 |
einfo "Installation of Subversion SWIG Ruby bindings" |
531 |
einfo |
532 |
emake -j1 DESTDIR="${D}" install-swig-rb || die "Installation of Subversion SWIG Ruby bindings failed" |
533 |
fi |
534 |
|
535 |
if use java; then |
536 |
einfo |
537 |
einfo "Installation of Subversion JavaHL library" |
538 |
einfo |
539 |
emake -j1 DESTDIR="${D}" install-javahl || die "Installation of Subversion JavaHL library failed" |
540 |
java-pkg_regso "${D}"usr/$(get_libdir)/libsvnjavahl*.so |
541 |
java-pkg_dojar "${D}"usr/$(get_libdir)/svn-javahl/svn-javahl.jar |
542 |
rm -fr "${D}"usr/$(get_libdir)/svn-javahl/*.jar |
543 |
fi |
544 |
|
545 |
# Install Apache module configuration. |
546 |
if use apache2; then |
547 |
dodir "${APACHE_MODULES_CONFDIR}" |
548 |
cat << EOF > "${D}${APACHE_MODULES_CONFDIR}"/47_mod_dav_svn.conf |
549 |
<IfDefine SVN> |
550 |
LoadModule dav_svn_module modules/mod_dav_svn.so |
551 |
<IfDefine SVN_AUTHZ> |
552 |
LoadModule authz_svn_module modules/mod_authz_svn.so |
553 |
</IfDefine> |
554 |
|
555 |
# Example configuration: |
556 |
#<Location /svn/repos> |
557 |
# DAV svn |
558 |
# SVNPath ${SVN_REPOS_LOC}/repos |
559 |
# AuthType Basic |
560 |
# AuthName "Subversion repository" |
561 |
# AuthUserFile ${SVN_REPOS_LOC}/conf/svnusers |
562 |
# Require valid-user |
563 |
#</Location> |
564 |
</IfDefine> |
565 |
EOF |
566 |
fi |
567 |
|
568 |
# Install Bash Completion, bug 43179. |
569 |
dobashcompletion tools/client-side/bash_completion subversion |
570 |
rm -f tools/client-side/bash_completion |
571 |
|
572 |
# Install hot backup script, bug 54304. |
573 |
newbin tools/backup/hot-backup.py svn-hot-backup |
574 |
rm -fr tools/backup |
575 |
|
576 |
# Install svn_load_dirs.pl. |
577 |
if use perl; then |
578 |
dobin contrib/client-side/svn_load_dirs/svn_load_dirs.pl |
579 |
fi |
580 |
rm -f contrib/client-side/svn_load_dirs/svn_load_dirs.pl |
581 |
|
582 |
# Install svnserve init-script and xinet.d snippet, bug 43245. |
583 |
newinitd "${FILESDIR}"/svnserve.initd svnserve |
584 |
if use apache2; then |
585 |
newconfd "${FILESDIR}"/svnserve.confd svnserve |
586 |
else |
587 |
newconfd "${FILESDIR}"/svnserve.confd2 svnserve |
588 |
fi |
589 |
insinto /etc/xinetd.d |
590 |
newins "${FILESDIR}"/svnserve.xinetd svnserve |
591 |
|
592 |
# Install documentation. |
593 |
dodoc CHANGES COMMITTERS README |
594 |
dohtml www/hacking.html |
595 |
dodoc tools/xslt/svnindex.{css,xsl} |
596 |
rm -fr tools/xslt |
597 |
|
598 |
# Install Vim syntax files. |
599 |
if use vim-syntax; then |
600 |
insinto /usr/share/vim/vimfiles/syntax |
601 |
doins contrib/client-side/vim/svn.vim |
602 |
fi |
603 |
rm -f contrib/client-side/vim/svn.vim |
604 |
|
605 |
# Install Emacs Lisps. |
606 |
if use emacs; then |
607 |
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" |
608 |
elisp-install ${PN}/compat contrib/client-side/emacs/vc-svn.{el,elc} || die "Installation of Emacs modules failed" |
609 |
touch "${D}${SITELISP}/${PN}/compat/.nosearch" |
610 |
elisp-site-file-install "${FILESDIR}/70svn-gentoo.el" || die "Installation of Emacs site-init file failed" |
611 |
fi |
612 |
rm -fr contrib/client-side/emacs |
613 |
|
614 |
# Install extra files. |
615 |
if use extras; then |
616 |
einfo |
617 |
einfo "Installation of contrib and tools" |
618 |
einfo |
619 |
doenvd "${FILESDIR}/1.5.0/80subversion-extras" |
620 |
emake DESTDIR="${D}" contribdir="/usr/$(get_libdir)/subversion/bin" install-contrib || die "Installation of contrib failed" |
621 |
emake DESTDIR="${D}" toolsdir="/usr/$(get_libdir)/subversion/bin" install-tools || die "Installation of tools failed" |
622 |
|
623 |
find contrib tools "(" -name "*.bat" -o -name "*.in" -o -name ".libs" ")" -print0 | xargs -0 rm -fr |
624 |
rm -fr contrib/client-side/svn-push |
625 |
rm -fr contrib/server-side/svnstsw |
626 |
rm -fr tools/client-side/svnmucc |
627 |
rm -fr tools/server-side/{svn-populate-node-origins-index,svnauthz-validate}* |
628 |
rm -fr tools/{buildbot,dev,diff,po} |
629 |
|
630 |
insinto /usr/share/${PN} |
631 |
doins -r contrib tools |
632 |
fi |
633 |
|
634 |
if use doc; then |
635 |
einfo |
636 |
einfo "Installation of Subversion HTML documentation" |
637 |
einfo |
638 |
dohtml doc/doxygen/html/* || die "Installation of Subversion HTML documentation failed" |
639 |
|
640 |
insinto /usr/share/doc/${PF} |
641 |
doins -r notes |
642 |
ecompressdir /usr/share/doc/${PF}/notes |
643 |
|
644 |
# if use ruby; then |
645 |
# emake DESTDIR="${D}" install-swig-rb-doc |
646 |
# fi |
647 |
|
648 |
if use java; then |
649 |
java-pkg_dojavadoc doc/javadoc |
650 |
fi |
651 |
fi |
652 |
} |
653 |
|
654 |
pkg_preinst() { |
655 |
# Compare versions of Berkeley DB, bug 122877. |
656 |
if use berkdb && [[ -f "${ROOT}usr/bin/svn" ]]; then |
657 |
OLD_BDB_VERSION="$(scanelf -nq "${ROOT}usr/$(get_libdir)/libsvn_subr-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")" |
658 |
NEW_BDB_VERSION="$(scanelf -nq "${D}usr/$(get_libdir)/libsvn_subr-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")" |
659 |
if [[ "${OLD_BDB_VERSION}" != "${NEW_BDB_VERSION}" ]]; then |
660 |
CHANGED_BDB_VERSION="1" |
661 |
fi |
662 |
fi |
663 |
} |
664 |
|
665 |
pkg_postinst() { |
666 |
use emacs && elisp-site-regen |
667 |
use perl && perl-module_pkg_postinst |
668 |
|
669 |
if use ctypes-python; then |
670 |
python_mod_compile "$(python_get_sitedir)/csvn/"{.,core,ext}/*.py |
671 |
fi |
672 |
|
673 |
elog "Subversion Server Notes" |
674 |
elog "-----------------------" |
675 |
elog |
676 |
elog "If you intend to run a server, a repository needs to be created using" |
677 |
elog "svnadmin (see man svnadmin) or the following command to create it in" |
678 |
elog "${SVN_REPOS_LOC}:" |
679 |
elog |
680 |
elog " emerge --config =${CATEGORY}/${PF}" |
681 |
elog |
682 |
elog "Subversion has multiple server types, take your pick:" |
683 |
elog |
684 |
elog " - svnserve daemon: " |
685 |
elog " 1. Edit /etc/conf.d/svnserve" |
686 |
elog " 2. Fix the repository permissions (see \"Fixing the repository permissions\")" |
687 |
elog " 3. Start daemon: /etc/init.d/svnserve start" |
688 |
elog " 4. Make persistent: rc-update add svnserve default" |
689 |
elog |
690 |
elog " - svnserve via xinetd:" |
691 |
elog " 1. Edit /etc/xinetd.d/svnserve (remove disable line)" |
692 |
elog " 2. Fix the repository permissions (see \"Fixing the repository permissions\")" |
693 |
elog " 3. Restart xinetd.d: /etc/init.d/xinetd restart" |
694 |
elog |
695 |
elog " - svn over ssh:" |
696 |
elog " 1. Fix the repository permissions (see \"Fixing the repository permissions\")" |
697 |
elog " Additionally run:" |
698 |
elog " groupadd svnusers" |
699 |
elog " chown -R root:svnusers ${SVN_REPOS_LOC}/repos" |
700 |
elog " 2. Create an svnserve wrapper in /usr/local/bin to set the umask you" |
701 |
elog " want, for example:" |
702 |
elog " #!/bin/bash" |
703 |
elog " . /etc/conf.d/svnserve" |
704 |
elog " umask 007" |
705 |
elog " exec /usr/bin/svnserve \${SVNSERVE_OPTS} \"\$@\"" |
706 |
elog |
707 |
|
708 |
if use apache2; then |
709 |
elog " - http-based server:" |
710 |
elog " 1. Edit /etc/conf.d/apache2 to include both \"-D DAV\" and \"-D SVN\"" |
711 |
elog " 2. Create an htpasswd file:" |
712 |
elog " htpasswd2 -m -c ${SVN_REPOS_LOC}/conf/svnusers USERNAME" |
713 |
elog " 3. Fix the repository permissions (see \"Fixing the repository permissions\")" |
714 |
elog " 4. Restart Apache: /etc/init.d/apache2 restart" |
715 |
elog |
716 |
fi |
717 |
|
718 |
elog " Fixing the repository permissions:" |
719 |
elog " chmod -Rf go-rwx ${SVN_REPOS_LOC}/conf" |
720 |
elog " chmod -Rf g-w,o-rwx ${SVN_REPOS_LOC}/repos" |
721 |
elog " chmod -Rf g+rw ${SVN_REPOS_LOC}/repos/db" |
722 |
elog " chmod -Rf g+rw ${SVN_REPOS_LOC}/repos/locks" |
723 |
elog |
724 |
|
725 |
elog "If you intend to use svn-hot-backup, you can specify the number of" |
726 |
elog "backups to keep per repository by specifying an environment variable." |
727 |
elog "If you want to keep e.g. 2 backups, do the following:" |
728 |
elog "echo '# hot-backup: Keep that many repository backups around' > /etc/env.d/80subversion" |
729 |
elog "echo 'SVN_HOTBACKUP_BACKUPS_NUMBER=2' >> /etc/env.d/80subversion" |
730 |
elog |
731 |
|
732 |
elog "Subversion contains support for the use of Memcached" |
733 |
elog "to cache data of FSFS repositories." |
734 |
elog "You should install \"net-misc/memcached\", start memcached" |
735 |
elog "and configure your FSFS repositories, if you want to use this feature." |
736 |
elog "See the documentation for details." |
737 |
elog |
738 |
epause 6 |
739 |
|
740 |
if [[ -n "${CHANGED_BDB_VERSION}" ]]; then |
741 |
ewarn "You upgraded from an older version of Berkeley DB and may experience" |
742 |
ewarn "problems with your repository. Run the following commands as root to fix it:" |
743 |
ewarn " db4_recover -h ${SVN_REPOS_LOC}/repos" |
744 |
ewarn " chown -Rf apache:apache ${SVN_REPOS_LOC}/repos" |
745 |
fi |
746 |
} |
747 |
|
748 |
pkg_postrm() { |
749 |
use emacs && elisp-site-regen |
750 |
use perl && perl-module_pkg_postrm |
751 |
|
752 |
if use ctypes-python; then |
753 |
python_mod_cleanup |
754 |
fi |
755 |
} |
756 |
|
757 |
pkg_config() { |
758 |
einfo ">>> Initializing the database in ${ROOT}${SVN_REPOS_LOC} ..." |
759 |
if [[ -e "${ROOT}${SVN_REPOS_LOC}/repos" ]]; then |
760 |
echo "A Subversion repository already exists and I will not overwrite it." |
761 |
echo "Delete \"${ROOT}${SVN_REPOS_LOC}/repos\" first if you're sure you want to have a clean version." |
762 |
else |
763 |
mkdir -p "${ROOT}${SVN_REPOS_LOC}/conf" |
764 |
|
765 |
einfo ">>> Populating repository directory ..." |
766 |
# Create initial repository. |
767 |
"${ROOT}usr/bin/svnadmin" create "${ROOT}${SVN_REPOS_LOC}/repos" |
768 |
|
769 |
einfo ">>> Setting repository permissions ..." |
770 |
SVNSERVE_USER="$(. "${ROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_USER}")" |
771 |
SVNSERVE_GROUP="$(. "${ROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_GROUP}")" |
772 |
if use apache2; then |
773 |
[[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="apache" |
774 |
[[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="apache" |
775 |
else |
776 |
[[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="svn" |
777 |
[[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="svnusers" |
778 |
enewgroup "${SVNSERVE_GROUP}" |
779 |
enewuser "${SVNSERVE_USER}" -1 -1 "${SVN_REPOS_LOC}" "${SVNSERVE_GROUP}" |
780 |
fi |
781 |
chown -Rf "${SVNSERVE_USER}:${SVNSERVE_GROUP}" "${ROOT}${SVN_REPOS_LOC}/repos" |
782 |
chmod -Rf go-rwx "${ROOT}${SVN_REPOS_LOC}/conf" |
783 |
chmod -Rf o-rwx "${ROOT}${SVN_REPOS_LOC}/repos" |
784 |
fi |
785 |
} |