1 |
arfrever 09/08/06 20:59:52 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: subversion-1.6.4.ebuild subversion-1.6.4-r10.ebuild |
5 |
Log: |
6 |
Version bump (bug #280494). |
7 |
(Portage version: 13936-svn/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.398 dev-util/subversion/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/ChangeLog?rev=1.398&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/ChangeLog?rev=1.398&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/ChangeLog?r1=1.397&r2=1.398 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/dev-util/subversion/ChangeLog,v |
19 |
retrieving revision 1.397 |
20 |
retrieving revision 1.398 |
21 |
diff -u -r1.397 -r1.398 |
22 |
--- ChangeLog 5 Aug 2009 19:48:53 -0000 1.397 |
23 |
+++ ChangeLog 6 Aug 2009 20:59:51 -0000 1.398 |
24 |
@@ -1,6 +1,13 @@ |
25 |
# ChangeLog for dev-util/subversion |
26 |
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/dev-util/subversion/ChangeLog,v 1.397 2009/08/05 19:48:53 arfrever Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/dev-util/subversion/ChangeLog,v 1.398 2009/08/06 20:59:51 arfrever Exp $ |
29 |
+ |
30 |
+*subversion-1.6.4-r10 (06 Aug 2009) |
31 |
+*subversion-1.6.4 (06 Aug 2009) |
32 |
+ |
33 |
+ 06 Aug 2009; Arfrever Frehtes Taifersar Arahesis <arfrever@g.o> |
34 |
+ +subversion-1.6.4.ebuild, +subversion-1.6.4-r10.ebuild: |
35 |
+ Version bump (bug #280494). |
36 |
|
37 |
05 Aug 2009; Arfrever Frehtes Taifersar Arahesis <arfrever@g.o> |
38 |
-subversion-1.5.5.ebuild, subversion-1.5.6.ebuild, |
39 |
|
40 |
|
41 |
|
42 |
1.1 dev-util/subversion/subversion-1.6.4.ebuild |
43 |
|
44 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/subversion-1.6.4.ebuild?rev=1.1&view=markup |
45 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/subversion-1.6.4.ebuild?rev=1.1&content-type=text/plain |
46 |
|
47 |
Index: subversion-1.6.4.ebuild |
48 |
=================================================================== |
49 |
# Copyright 1999-2009 Gentoo Foundation |
50 |
# Distributed under the terms of the GNU General Public License v2 |
51 |
# $Header: /var/cvsroot/gentoo-x86/dev-util/subversion/subversion-1.6.4.ebuild,v 1.1 2009/08/06 20:59:51 arfrever Exp $ |
52 |
|
53 |
EAPI="2" |
54 |
|
55 |
WANT_AUTOMAKE="none" |
56 |
|
57 |
inherit autotools bash-completion db-use depend.apache elisp-common eutils flag-o-matic java-pkg-opt-2 libtool multilib perl-module python |
58 |
|
59 |
DESCRIPTION="Advanced version control system" |
60 |
HOMEPAGE="http://subversion.tigris.org/" |
61 |
SRC_URI="http://subversion.tigris.org/downloads/${P/_/-}.tar.bz2" |
62 |
|
63 |
LICENSE="Subversion" |
64 |
SLOT="0" |
65 |
KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd" |
66 |
IUSE="apache2 berkdb ctypes-python debug doc +dso emacs extras gnome-keyring java nls perl python ruby sasl test vim-syntax +webdav-neon webdav-serf" |
67 |
|
68 |
CDEPEND=">=dev-db/sqlite-3.4[threadsafe] |
69 |
>=dev-libs/apr-1.3:1 |
70 |
>=dev-libs/apr-util-1.3:1 |
71 |
dev-libs/expat |
72 |
sys-libs/zlib |
73 |
berkdb? ( =sys-libs/db-4* ) |
74 |
emacs? ( virtual/emacs ) |
75 |
gnome-keyring? ( dev-libs/glib:2 sys-apps/dbus gnome-base/gnome-keyring ) |
76 |
ruby? ( >=dev-lang/ruby-1.8.2 ) |
77 |
sasl? ( dev-libs/cyrus-sasl ) |
78 |
webdav-neon? ( >=net-misc/neon-0.28 ) |
79 |
webdav-serf? ( >=net-libs/serf-0.3.0 )" |
80 |
RDEPEND="${CDEPEND} |
81 |
apache2? ( www-servers/apache[apache2_modules_dav] ) |
82 |
java? ( >=virtual/jre-1.5 ) |
83 |
nls? ( virtual/libintl ) |
84 |
perl? ( dev-perl/URI )" |
85 |
APACHE_TEST_DEPEND="|| ( |
86 |
=www-servers/apache-2.4*[apache2_modules_auth_basic,apache2_modules_authn_core,apache2_modules_authn_file,apache2_modules_authz_core,apache2_modules_authz_user,apache2_modules_dav,apache2_modules_log_config,apache2_modules_unixd] |
87 |
=www-servers/apache-2.2*[apache2_modules_auth_basic,apache2_modules_authn_file,apache2_modules_dav,apache2_modules_log_config] |
88 |
)" |
89 |
DEPEND="${CDEPEND} |
90 |
>=sys-apps/sandbox-1.6 |
91 |
ctypes-python? ( dev-python/ctypesgen ) |
92 |
doc? ( app-doc/doxygen ) |
93 |
gnome-keyring? ( dev-util/pkgconfig ) |
94 |
java? ( >=virtual/jdk-1.5 ) |
95 |
nls? ( sys-devel/gettext ) |
96 |
test? ( |
97 |
webdav-neon? ( ${APACHE_TEST_DEPEND} ) |
98 |
webdav-serf? ( ${APACHE_TEST_DEPEND} ) |
99 |
) |
100 |
webdav-neon? ( dev-util/pkgconfig )" |
101 |
|
102 |
want_apache |
103 |
|
104 |
S="${WORKDIR}/${P/_/-}" |
105 |
|
106 |
# Allow for custom repository locations. |
107 |
# This can't be in pkg_setup() because the variable needs to be available to pkg_config(). |
108 |
: ${SVN_REPOS_LOC:=/var/svn} |
109 |
|
110 |
pkg_setup() { |
111 |
if use berkdb; then |
112 |
einfo |
113 |
if [[ -z "${SVN_BDB_VERSION}" ]]; then |
114 |
SVN_BDB_VERSION="$(db_ver_to_slot "$(db_findver sys-libs/db 2>/dev/null)")" |
115 |
einfo "SVN_BDB_VERSION variable isn't set. You can set it to enforce using of specific version of Berkeley DB." |
116 |
fi |
117 |
einfo "Using: Berkeley DB ${SVN_BDB_VERSION}" |
118 |
einfo |
119 |
|
120 |
local apu_bdb_version="$(scanelf -nq "${ROOT}usr/$(get_libdir)/libaprutil-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")" |
121 |
if [[ -n "${apu_bdb_version}" && "${SVN_BDB_VERSION}" != "${apu_bdb_version}" ]]; then |
122 |
eerror "APR-Util is linked against Berkeley DB ${apu_bdb_version}, but you are trying" |
123 |
eerror "to build Subversion with support for Berkeley DB ${SVN_BDB_VERSION}." |
124 |
eerror "Rebuild dev-libs/apr-util or set SVN_BDB_VERSION=\"${apu_bdb_version}\"." |
125 |
eerror "Aborting to avoid possible run-time crashes." |
126 |
die "Berkeley DB version mismatch" |
127 |
fi |
128 |
fi |
129 |
|
130 |
depend.apache_pkg_setup |
131 |
|
132 |
java-pkg-opt-2_pkg_setup |
133 |
|
134 |
if ! use webdav-neon && ! use webdav-serf; then |
135 |
ewarn |
136 |
ewarn "WebDAV support is disabled. You need WebDAV to" |
137 |
ewarn "access repositories through the HTTP protocol." |
138 |
ewarn |
139 |
ewarn "WebDAV support needs one of the following USE flags enabled:" |
140 |
ewarn " webdav-neon webdav-serf" |
141 |
ewarn |
142 |
ewarn "You can do this by enabling one of these flags in /etc/portage/package.use:" |
143 |
ewarn " ${CATEGORY}/${PN} webdav-neon webdav-serf" |
144 |
ewarn |
145 |
ebeep |
146 |
fi |
147 |
|
148 |
if use test; then |
149 |
elog |
150 |
elog "\e[1;31m************************************************************************************************\e[0m" |
151 |
elog |
152 |
elog "NOTES ABOUT TESTS" |
153 |
elog |
154 |
elog "You can set the following variables to enable testing of some features and configure testing:" |
155 |
if use webdav-neon || use webdav-serf; then |
156 |
elog " SVN_TEST_APACHE_PORT=integer - Set Apache port number (Default value: 62208)" |
157 |
fi |
158 |
elog " SVN_TEST_SVNSERVE_PORT=integer - Set svnserve port number (Default value: 62209)" |
159 |
elog " SVN_TEST_FSFS_MEMCACHED=1 - Enable using of Memcached for FSFS repositories" |
160 |
elog " SVN_TEST_FSFS_MEMCACHED_PORT=integer - Set Memcached port number (Default value: 62210)" |
161 |
elog " SVN_TEST_FSFS_SHARDING=integer - Enable sharding of FSFS repositories and set default shard size for FSFS repositories" |
162 |
elog " SVN_TEST_FSFS_PACKING=1 - Enable packing of FSFS repositories" |
163 |
elog " (SVN_TEST_FSFS_PACKING requires SVN_TEST_FSFS_SHARDING)" |
164 |
# if use sasl; then |
165 |
# elog " SVN_TEST_SASL=1 - Enable SASL authentication" |
166 |
# fi |
167 |
if use ctypes-python || use java || use perl || use python || use ruby; then |
168 |
elog " SVN_TEST_BINDINGS=1 - Enable testing of bindings" |
169 |
fi |
170 |
if use java || use perl || use python || use ruby; then |
171 |
elog " (Testing of bindings requires ${CATEGORY}/${PF})" |
172 |
fi |
173 |
if use java; then |
174 |
elog " (Testing of JavaHL library requires dev-java/junit:4)" |
175 |
fi |
176 |
elog |
177 |
elog "\e[1;31m************************************************************************************************\e[0m" |
178 |
elog |
179 |
ebeep |
180 |
epause 24 |
181 |
|
182 |
if ! use apache2 && { use webdav-neon || use webdav-serf; }; then |
183 |
eerror "Testing of libsvn_ra_neon / libsvn_ra_serf requires support for Apache." |
184 |
die "Enable \"apache2\" USE flag." |
185 |
fi |
186 |
|
187 |
if [[ -n "${SVN_TEST_APACHE_PORT}" ]] && ! ([[ "$((${SVN_TEST_APACHE_PORT}))" == "${SVN_TEST_APACHE_PORT}" ]]) &>/dev/null; then |
188 |
die "Value of SVN_TEST_APACHE_PORT must be an integer" |
189 |
fi |
190 |
|
191 |
if [[ -n "${SVN_TEST_SVNSERVE_PORT}" ]] && ! ([[ "$((${SVN_TEST_SVNSERVE_PORT}))" == "${SVN_TEST_SVNSERVE_PORT}" ]]) &>/dev/null; then |
192 |
die "Value of SVN_TEST_SVNSERVE_PORT must be an integer" |
193 |
fi |
194 |
|
195 |
if [[ -n "${SVN_TEST_FSFS_MEMCACHED}" ]] && ! has_version net-misc/memcached; then |
196 |
die "net-misc/memcached must be installed" |
197 |
fi |
198 |
if [[ -n "${SVN_TEST_FSFS_MEMCACHED_PORT}" ]] && ! ([[ "$((${SVN_TEST_FSFS_MEMCACHED_PORT}))" == "${SVN_TEST_FSFS_MEMCACHED_PORT}" ]]) &>/dev/null; then |
199 |
die "Value of SVN_TEST_FSFS_MEMCACHED_PORT must be an integer" |
200 |
fi |
201 |
if [[ -n "${SVN_TEST_FSFS_SHARDING}" ]] && ! ([[ "$((${SVN_TEST_FSFS_SHARDING}))" == "${SVN_TEST_FSFS_SHARDING}" ]]) &>/dev/null; then |
202 |
die "Value of SVN_TEST_FSFS_SHARDING must be an integer" |
203 |
fi |
204 |
if [[ -n "${SVN_TEST_FSFS_PACKING}" && -z "${SVN_TEST_FSFS_SHARDING}" ]]; then |
205 |
die "SVN_TEST_FSFS_PACKING requires SVN_TEST_FSFS_SHARDING" |
206 |
fi |
207 |
|
208 |
if [[ -n "${SVN_TEST_BINDINGS}" ]]; then |
209 |
if { use java || use perl || use python || use ruby; } && ! has_version "=${CATEGORY}/${PF}"; then |
210 |
die "${CATEGORY}/${PF} must be installed" |
211 |
fi |
212 |
if use java && ! has_version dev-java/junit:4; then |
213 |
die "dev-java/junit:4 must be installed" |
214 |
fi |
215 |
fi |
216 |
fi |
217 |
|
218 |
if use debug; then |
219 |
append-cppflags -DSVN_DEBUG -DAP_DEBUG |
220 |
fi |
221 |
} |
222 |
|
223 |
src_prepare() { |
224 |
epatch "${FILESDIR}/${PN}-1.6.0-disable_linking_against_unneeded_libraries.patch" |
225 |
epatch "${FILESDIR}/${PN}-1.6.2-local_library_preloading.patch" |
226 |
epatch "${FILESDIR}/${PN}-1.6.3-apache-2.4.patch" |
227 |
epatch "${FILESDIR}/${PN}-1.6.3-kwallet_window.patch" |
228 |
chmod +x build/transform_libtool_scripts.sh || die "chmod failed" |
229 |
|
230 |
if ! use test; then |
231 |
sed -i \ |
232 |
-e "s/\(BUILD_RULES=.*\) bdb-test\(.*\)/\1\2/g" \ |
233 |
-e "s/\(BUILD_RULES=.*\) test\(.*\)/\1\2/g" configure.ac |
234 |
fi |
235 |
|
236 |
eautoconf |
237 |
elibtoolize |
238 |
} |
239 |
|
240 |
src_configure() { |
241 |
local myconf |
242 |
|
243 |
if use python || use perl || use ruby; then |
244 |
myconf+=" --with-swig" |
245 |
else |
246 |
myconf+=" --without-swig" |
247 |
fi |
248 |
|
249 |
if use java; then |
250 |
if use test && [[ -n "${SVN_TEST_BINDINGS}" ]]; then |
251 |
myconf+=" --with-junit=/usr/share/junit-4/lib/junit.jar" |
252 |
else |
253 |
myconf+=" --without-junit" |
254 |
fi |
255 |
fi |
256 |
|
257 |
econf --libdir="/usr/$(get_libdir)" \ |
258 |
$(use_with apache2 apxs "${APXS}") \ |
259 |
$(use_with berkdb berkeley-db "db.h:/usr/include/db${SVN_BDB_VERSION}::db-${SVN_BDB_VERSION}") \ |
260 |
$(use_with ctypes-python ctypesgen /usr) \ |
261 |
$(use_enable dso runtime-module-search) \ |
262 |
$(use_with gnome-keyring) \ |
263 |
$(use_enable java javahl) \ |
264 |
$(use_with java jdk "${JAVA_HOME}") \ |
265 |
$(use_enable nls) \ |
266 |
$(use_with sasl) \ |
267 |
$(use_with webdav-neon neon) \ |
268 |
$(use_with webdav-serf serf /usr) \ |
269 |
${myconf} \ |
270 |
--with-apr=/usr/bin/apr-1-config \ |
271 |
--with-apr-util=/usr/bin/apu-1-config \ |
272 |
--disable-experimental-libtool \ |
273 |
--without-jikes \ |
274 |
--enable-local-library-preloading \ |
275 |
--disable-mod-activation \ |
276 |
--disable-neon-version-check \ |
277 |
--with-sqlite=/usr |
278 |
} |
279 |
|
280 |
src_compile() { |
281 |
einfo |
282 |
einfo "Building of core of Subversion" |
283 |
einfo |
284 |
emake local-all || die "Building of core of Subversion failed" |
285 |
|
286 |
if use ctypes-python; then |
287 |
einfo |
288 |
einfo "Building of Subversion Ctypes Python bindings" |
289 |
einfo |
290 |
emake ctypes-python || die "Building of Subversion Ctypes Python bindings failed" |
291 |
fi |
292 |
|
293 |
if use python; then |
294 |
einfo |
295 |
einfo "Building of Subversion SWIG Python bindings" |
296 |
einfo |
297 |
emake swig_pydir="$(python_get_sitedir)/libsvn" swig_pydir_extra="$(python_get_sitedir)/svn" swig-py \ |
298 |
|| die "Building of Subversion SWIG Python bindings failed" |
299 |
fi |
300 |
|
301 |
if use perl; then |
302 |
einfo |
303 |
einfo "Building of Subversion SWIG Perl bindings" |
304 |
einfo |
305 |
emake -j1 swig-pl || die "Building of Subversion SWIG Perl bindings failed" |
306 |
fi |
307 |
|
308 |
if use ruby; then |
309 |
einfo |
310 |
einfo "Building of Subversion SWIG Ruby bindings" |
311 |
einfo |
312 |
emake swig-rb || die "Building of Subversion SWIG Ruby bindings failed" |
313 |
fi |
314 |
|
315 |
if use java; then |
316 |
einfo |
317 |
einfo "Building of Subversion JavaHL library" |
318 |
einfo |
319 |
emake -j1 JAVAC_FLAGS="$(java-pkg_javac-args) -encoding iso8859-1" javahl \ |
320 |
|| die "Building of Subversion JavaHL library failed" |
321 |
fi |
322 |
|
323 |
if use emacs; then |
324 |
einfo |
325 |
einfo "Compilation of Emacs modules" |
326 |
einfo |
327 |
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" |
328 |
fi |
329 |
|
330 |
if use extras; then |
331 |
einfo |
332 |
einfo "Building of contrib and tools" |
333 |
einfo |
334 |
emake contrib || die "Building of contrib failed" |
335 |
emake tools || die "Building of tools failed" |
336 |
fi |
337 |
|
338 |
if use doc; then |
339 |
einfo |
340 |
einfo "Building of Subversion HTML documentation" |
341 |
einfo |
342 |
doxygen doc/doxygen.conf || die "Building of Subversion HTML documentation failed" |
343 |
|
344 |
if use java; then |
345 |
einfo |
346 |
einfo "Building of Subversion JavaHL library HTML documentation" |
347 |
einfo |
348 |
emake doc-javahl || die "Building of Subversion JavaHL library HTML documentation failed" |
349 |
fi |
350 |
fi |
351 |
} |
352 |
|
353 |
create_apache_tests_configuration() { |
354 |
get_loadmodule_directive() { |
355 |
if [[ "$("${APACHE_BIN}" -l)" != *"mod_$1.c"* ]]; then |
356 |
echo "LoadModule $1_module \"${APACHE_MODULESDIR}/mod_$1.so\"" |
357 |
fi |
358 |
} |
359 |
get_loadmodule_directives() { |
360 |
if has_version "=www-servers/apache-2.4*"; then |
361 |
get_loadmodule_directive auth_basic |
362 |
get_loadmodule_directive authn_core |
363 |
get_loadmodule_directive authn_file |
364 |
get_loadmodule_directive authz_core |
365 |
get_loadmodule_directive authz_user |
366 |
get_loadmodule_directive dav |
367 |
get_loadmodule_directive log_config |
368 |
get_loadmodule_directive unixd |
369 |
else |
370 |
get_loadmodule_directive auth_basic |
371 |
get_loadmodule_directive authn_file |
372 |
get_loadmodule_directive dav |
373 |
get_loadmodule_directive log_config |
374 |
fi |
375 |
} |
376 |
|
377 |
mkdir -p "${T}/apache" |
378 |
cat << EOF > "${T}/apache/apache.conf" |
379 |
$(get_loadmodule_directives) |
380 |
LoadModule dav_svn_module "${S}/subversion/mod_dav_svn/.libs/mod_dav_svn.so" |
381 |
LoadModule authz_svn_module "${S}/subversion/mod_authz_svn/.libs/mod_authz_svn.so" |
382 |
|
383 |
User $(id -un) |
384 |
Group $(id -gn) |
385 |
Listen localhost:${SVN_TEST_APACHE_PORT} |
386 |
ServerName localhost |
387 |
ServerRoot "${T}" |
388 |
DocumentRoot "${T}" |
389 |
CoreDumpDirectory "${T}" |
390 |
PidFile "${T}/apache.pid" |
391 |
CustomLog "${T}/apache/access_log" "%h %l %u %{%Y-%m-%dT%H:%M:%S}t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" |
392 |
CustomLog "${T}/apache/svn_log" "%{%Y-%m-%dT%H:%M:%S}t %u %{SVN-REPOS-NAME}e %{SVN-ACTION}e" env=SVN-ACTION |
393 |
ErrorLog "${T}/apache/error_log" |
394 |
LogLevel Debug |
395 |
MaxRequestsPerChild 0 |
396 |
|
397 |
<Directory /> |
398 |
AllowOverride None |
399 |
</Directory> |
400 |
|
401 |
<Location /svn-test-work/repositories> |
402 |
DAV svn |
403 |
SVNParentPath "${S}/subversion/tests/cmdline/svn-test-work/repositories" |
404 |
AuthzSVNAccessFile "${S}/subversion/tests/cmdline/svn-test-work/authz" |
405 |
AuthType Basic |
406 |
AuthName "Subversion Repository" |
407 |
AuthUserFile "${T}/apache/users" |
408 |
Require valid-user |
409 |
</Location> |
410 |
|
411 |
<Location /svn-test-work/local_tmp/repos> |
412 |
DAV svn |
413 |
SVNPath "${S}/subversion/tests/cmdline/svn-test-work/local_tmp/repos" |
414 |
AuthzSVNAccessFile "${S}/subversion/tests/cmdline/svn-test-work/authz" |
415 |
AuthType Basic |
416 |
AuthName "Subversion Repository" |
417 |
AuthUserFile "${T}/apache/users" |
418 |
Require valid-user |
419 |
</Location> |
420 |
EOF |
421 |
|
422 |
cat << EOF > "${T}/apache/users" |
423 |
jrandom:xCGl35kV9oWCY |
424 |
jconstant:xCGl35kV9oWCY |
425 |
EOF |
426 |
} |
427 |
|
428 |
set_tests_variables() { |
429 |
if [[ "$1" == "local" ]]; then |
430 |
base_url="file://${S}/subversion/tests/cmdline" |
431 |
http_library="" |
432 |
fi |
433 |
if [[ "$1" == "svn" ]]; then |
434 |
base_url="svn://127.0.0.1:${SVN_TEST_SVNSERVE_PORT}" |
435 |
http_library="" |
436 |
fi |
437 |
if [[ "$1" == "neon" || "$1" == "serf" ]]; then |
438 |
base_url="http://127.0.0.1:${SVN_TEST_APACHE_PORT}" |
439 |
http_library="$1" |
440 |
fi |
441 |
} |
442 |
|
443 |
src_test() { |
444 |
if ! use test; then |
445 |
die "Invalid configuration" |
446 |
fi |
447 |
|
448 |
local fs_type fs_types ra_type ra_types options failed_tests |
449 |
|
450 |
fs_types="fsfs" |
451 |
use berkdb && fs_types+=" bdb" |
452 |
|
453 |
ra_types="local svn" |
454 |
use webdav-neon && ra_types+=" neon" |
455 |
use webdav-serf && ra_types+=" serf" |
456 |
|
457 |
local pid_file |
458 |
for pid_file in svnserve.pid apache.pid memcached.pid; do |
459 |
rm -f "${T}/${pid_file}" |
460 |
done |
461 |
|
462 |
termination() { |
463 |
local die="$1" pid_file |
464 |
if [[ -n "${die}" ]]; then |
465 |
echo -e "\n\e[1;31mKilling of child processes...\e[0m\a" > /dev/tty |
466 |
fi |
467 |
for pid_file in svnserve.pid apache.pid memcached.pid; do |
468 |
if [[ -f "${T}/${pid_file}" ]]; then |
469 |
kill "$(<"${T}/${pid_file}")" |
470 |
fi |
471 |
done |
472 |
if [[ -n "${die}" ]]; then |
473 |
sleep 6 |
474 |
die "Termination" |
475 |
fi |
476 |
} |
477 |
|
478 |
trap 'termination 1 &' SIGINT SIGTERM |
479 |
|
480 |
SVN_TEST_SVNSERVE_PORT="${SVN_TEST_SVNSERVE_PORT:-62209}" |
481 |
LC_ALL="C" subversion/svnserve/svnserve -dr "subversion/tests/cmdline" --listen-port "${SVN_TEST_SVNSERVE_PORT}" --log-file "${T}/svnserve.log" --pid-file "${T}/svnserve.pid" |
482 |
if use webdav-neon || use webdav-serf; then |
483 |
SVN_TEST_APACHE_PORT="${SVN_TEST_APACHE_PORT:-62208}" |
484 |
create_apache_tests_configuration |
485 |
"${APACHE_BIN}" -f "${T}/apache/apache.conf" |
486 |
fi |
487 |
if [[ -n "${SVN_TEST_FSFS_MEMCACHED}" ]]; then |
488 |
SVN_TEST_FSFS_MEMCACHED_PORT="${SVN_TEST_FSFS_MEMCACHED_PORT:-62210}" |
489 |
sed -e "/\[memcached-servers\]/akey = 127.0.0.1:${SVN_TEST_FSFS_MEMCACHED_PORT}" -i subversion/tests/tests.conf |
490 |
memcached -dp "${SVN_TEST_FSFS_MEMCACHED_PORT}" -P "${T}/memcached.pid" |
491 |
fi |
492 |
if [[ -n "${SVN_TEST_FSFS_SHARDING}" ]]; then |
493 |
options+=" FSFS_SHARDING=${SVN_TEST_FSFS_SHARDING}" |
494 |
fi |
495 |
if [[ -n "${SVN_TEST_FSFS_PACKING}" ]]; then |
496 |
options+=" FSFS_PACKING=1" |
497 |
fi |
498 |
# if [[ -n "${SVN_TEST_SASL}" ]]; then |
499 |
# options+=" ENABLE_SASL=1" |
500 |
# fi |
501 |
|
502 |
sleep 6 |
503 |
|
504 |
for ra_type in ${ra_types}; do |
505 |
for fs_type in ${fs_types}; do |
506 |
[[ "${ra_type}" == "local" && "${fs_type}" == "bdb" ]] && continue |
507 |
einfo |
508 |
einfo "\e[1;34mTesting of ra_${ra_type} + $(echo ${fs_type} | tr '[:lower:]' '[:upper:]')\e[0m" |
509 |
einfo |
510 |
set_tests_variables ${ra_type} |
511 |
time emake check FS_TYPE="${fs_type}" BASE_URL="${base_url}" HTTP_LIBRARY="${http_library}" CLEANUP="1" ${options} || failed_tests="1" |
512 |
mv tests.log "${T}/tests-ra_${ra_type}-${fs_type}.log" |
513 |
done |
514 |
done |
515 |
unset base_url http_library |
516 |
termination |
517 |
trap - SIGINT SIGTERM |
518 |
|
519 |
if [[ -n "${SVN_TEST_BINDINGS}" ]]; then |
520 |
local swig_lingua swig_linguas |
521 |
local -A linguas |
522 |
if use ctypes-python; then |
523 |
einfo |
524 |
einfo "\e[1;34mTesting of Subversion Ctypes Python bindings\e[0m" |
525 |
einfo |
526 |
time emake check-ctypes-python || failed_tests="1" |
527 |
fi |
528 |
|
529 |
use perl && swig_linguas+=" pl" |
530 |
use python && swig_linguas+=" py" |
531 |
use ruby && swig_linguas+=" rb" |
532 |
|
533 |
linguas[pl]="Perl" |
534 |
linguas[py]="Python" |
535 |
linguas[rb]="Ruby" |
536 |
|
537 |
for swig_lingua in ${swig_linguas}; do |
538 |
einfo |
539 |
einfo "\e[1;34mTesting of Subversion SWIG ${linguas[${swig_lingua}]} bindings\e[0m" |
540 |
einfo |
541 |
time emake check-swig-${swig_lingua} || failed_tests="1" |
542 |
done |
543 |
|
544 |
if use java; then |
545 |
einfo |
546 |
einfo "\e[1;34mTesting of Subversion JavaHL library\e[0m" |
547 |
einfo |
548 |
time emake check-javahl || failed_tests="1" |
549 |
fi |
550 |
fi |
551 |
|
552 |
if [[ -n "${failed_tests}" ]]; then |
553 |
ewarn |
554 |
ewarn "\e[1;31mSome tests failed\e[0m" |
555 |
ewarn |
556 |
ebeep 12 |
557 |
fi |
558 |
} |
559 |
|
560 |
src_install() { |
561 |
einfo |
562 |
einfo "Installation of core of Subversion" |
563 |
einfo |
564 |
emake -j1 DESTDIR="${D}" local-install || die "Installation of core of Subversion failed" |
565 |
|
566 |
if use ctypes-python; then |
567 |
einfo |
568 |
einfo "Installation of Subversion Ctypes Python bindings" |
569 |
einfo |
570 |
emake DESTDIR="${D}" install-ctypes-python || die "Installation of Subversion Ctypes Python bindings failed" |
571 |
fi |
572 |
|
573 |
if use python; then |
574 |
einfo |
575 |
einfo "Installation of Subversion SWIG Python bindings" |
576 |
einfo |
577 |
emake -j1 DESTDIR="${D}" swig_pydir="$(python_get_sitedir)/libsvn" swig_pydir_extra="$(python_get_sitedir)/svn" install-swig-py \ |
578 |
|| die "Installation of Subversion SWIG Python bindings failed" |
579 |
fi |
580 |
|
581 |
if use perl; then |
582 |
einfo |
583 |
einfo "Installation of Subversion SWIG Perl bindings" |
584 |
einfo |
585 |
emake -j1 DESTDIR="${D}" INSTALLDIRS="vendor" install-swig-pl || die "Installation of Subversion SWIG Perl bindings failed" |
586 |
fixlocalpod |
587 |
find "${D}" "(" -name .packlist -o -name "*.bs" ")" -print0 | xargs -0 rm -fr |
588 |
fi |
589 |
|
590 |
if use ruby; then |
591 |
einfo |
592 |
einfo "Installation of Subversion SWIG Ruby bindings" |
593 |
einfo |
594 |
emake -j1 DESTDIR="${D}" install-swig-rb || die "Installation of Subversion SWIG Ruby bindings failed" |
595 |
fi |
596 |
|
597 |
if use java; then |
598 |
einfo |
599 |
einfo "Installation of Subversion JavaHL library" |
600 |
einfo |
601 |
emake -j1 DESTDIR="${D}" install-javahl || die "Installation of Subversion JavaHL library failed" |
602 |
java-pkg_regso "${D}"usr/$(get_libdir)/libsvnjavahl*.so |
603 |
java-pkg_dojar "${D}"usr/$(get_libdir)/svn-javahl/svn-javahl.jar |
604 |
rm -fr "${D}"usr/$(get_libdir)/svn-javahl/*.jar |
605 |
fi |
606 |
|
607 |
# Install Apache module configuration. |
608 |
if use apache2; then |
609 |
dodir "${APACHE_MODULES_CONFDIR}" |
610 |
cat << EOF > "${D}${APACHE_MODULES_CONFDIR}"/47_mod_dav_svn.conf |
611 |
<IfDefine SVN> |
612 |
LoadModule dav_svn_module modules/mod_dav_svn.so |
613 |
<IfDefine SVN_AUTHZ> |
614 |
LoadModule authz_svn_module modules/mod_authz_svn.so |
615 |
</IfDefine> |
616 |
|
617 |
# Example configuration: |
618 |
#<Location /svn/repos> |
619 |
# DAV svn |
620 |
# SVNPath ${SVN_REPOS_LOC}/repos |
621 |
# AuthType Basic |
622 |
# AuthName "Subversion repository" |
623 |
# AuthUserFile ${SVN_REPOS_LOC}/conf/svnusers |
624 |
# Require valid-user |
625 |
#</Location> |
626 |
</IfDefine> |
627 |
EOF |
628 |
fi |
629 |
|
630 |
# Install Bash Completion, bug 43179. |
631 |
dobashcompletion tools/client-side/bash_completion subversion |
632 |
rm -f tools/client-side/bash_completion |
633 |
|
634 |
# Install hot backup script, bug 54304. |
635 |
newbin tools/backup/hot-backup.py svn-hot-backup |
636 |
rm -fr tools/backup |
637 |
|
638 |
# Install svn_load_dirs.pl. |
639 |
if use perl; then |
640 |
dobin contrib/client-side/svn_load_dirs/svn_load_dirs.pl |
641 |
fi |
642 |
rm -f contrib/client-side/svn_load_dirs/svn_load_dirs.pl |
643 |
|
644 |
# Install svnserve init-script and xinet.d snippet, bug 43245. |
645 |
newinitd "${FILESDIR}"/svnserve.initd svnserve |
646 |
if use apache2; then |
647 |
newconfd "${FILESDIR}"/svnserve.confd svnserve |
648 |
else |
649 |
newconfd "${FILESDIR}"/svnserve.confd2 svnserve |
650 |
fi |
651 |
insinto /etc/xinetd.d |
652 |
newins "${FILESDIR}"/svnserve.xinetd svnserve |
653 |
|
654 |
# Install documentation. |
655 |
dodoc CHANGES COMMITTERS README |
656 |
dohtml www/hacking.html |
657 |
dodoc tools/xslt/svnindex.{css,xsl} |
658 |
rm -fr tools/xslt |
659 |
|
660 |
# Install Vim syntax files. |
661 |
if use vim-syntax; then |
662 |
insinto /usr/share/vim/vimfiles/syntax |
663 |
doins contrib/client-side/vim/svn.vim |
664 |
fi |
665 |
rm -f contrib/client-side/vim/svn.vim |
666 |
|
667 |
# Install Emacs Lisps. |
668 |
if use emacs; then |
669 |
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" |
670 |
elisp-install ${PN}/compat contrib/client-side/emacs/vc-svn.{el,elc} || die "Installation of Emacs modules failed" |
671 |
touch "${D}${SITELISP}/${PN}/compat/.nosearch" |
672 |
elisp-site-file-install "${FILESDIR}/70svn-gentoo.el" || die "Installation of Emacs site-init file failed" |
673 |
fi |
674 |
rm -fr contrib/client-side/emacs |
675 |
|
676 |
# Install extra files. |
677 |
if use extras; then |
678 |
einfo |
679 |
einfo "Installation of contrib and tools" |
680 |
einfo |
681 |
|
682 |
cat << EOF > 80subversion-extras |
683 |
PATH="/usr/$(get_libdir)/subversion/bin" |
684 |
ROOTPATH="/usr/$(get_libdir)/subversion/bin" |
685 |
EOF |
686 |
doenvd 80subversion-extras |
687 |
|
688 |
emake DESTDIR="${D}" contribdir="/usr/$(get_libdir)/subversion/bin" install-contrib || die "Installation of contrib failed" |
689 |
emake DESTDIR="${D}" toolsdir="/usr/$(get_libdir)/subversion/bin" install-tools || die "Installation of tools failed" |
690 |
|
691 |
find contrib tools "(" -name "*.bat" -o -name "*.in" -o -name ".libs" ")" -print0 | xargs -0 rm -fr |
692 |
rm -fr contrib/client-side/svn-push |
693 |
rm -fr contrib/server-side/svnstsw |
694 |
rm -fr tools/client-side/svnmucc |
695 |
rm -fr tools/server-side/{svn-populate-node-origins-index,svnauthz-validate}* |
696 |
rm -fr tools/{buildbot,dev,diff,po} |
697 |
|
698 |
insinto /usr/share/${PN} |
699 |
doins -r contrib tools |
700 |
fi |
701 |
|
702 |
if use doc; then |
703 |
einfo |
704 |
einfo "Installation of Subversion HTML documentation" |
705 |
einfo |
706 |
dohtml doc/doxygen/html/* || die "Installation of Subversion HTML documentation failed" |
707 |
|
708 |
insinto /usr/share/doc/${PF} |
709 |
doins -r notes |
710 |
ecompressdir /usr/share/doc/${PF}/notes |
711 |
|
712 |
# if use ruby; then |
713 |
# emake DESTDIR="${D}" install-swig-rb-doc |
714 |
# fi |
715 |
|
716 |
if use java; then |
717 |
java-pkg_dojavadoc doc/javadoc |
718 |
fi |
719 |
fi |
720 |
} |
721 |
|
722 |
pkg_preinst() { |
723 |
# Compare versions of Berkeley DB, bug 122877. |
724 |
if use berkdb && [[ -f "${ROOT}usr/bin/svn" ]]; then |
725 |
OLD_BDB_VERSION="$(scanelf -nq "${ROOT}usr/$(get_libdir)/libsvn_subr-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")" |
726 |
NEW_BDB_VERSION="$(scanelf -nq "${D}usr/$(get_libdir)/libsvn_subr-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")" |
727 |
if [[ "${OLD_BDB_VERSION}" != "${NEW_BDB_VERSION}" ]]; then |
728 |
CHANGED_BDB_VERSION="1" |
729 |
fi |
730 |
fi |
731 |
} |
732 |
|
733 |
pkg_postinst() { |
734 |
use emacs && elisp-site-regen |
735 |
use perl && perl-module_pkg_postinst |
736 |
|
737 |
if use ctypes-python; then |
738 |
python_mod_compile "$(python_get_sitedir)/csvn/"{.,core,ext}/*.py |
739 |
fi |
740 |
|
741 |
elog "Subversion Server Notes" |
742 |
elog "-----------------------" |
743 |
elog |
744 |
elog "If you intend to run a server, a repository needs to be created using" |
745 |
elog "svnadmin (see man svnadmin) or the following command to create it in" |
746 |
elog "${SVN_REPOS_LOC}:" |
747 |
elog |
748 |
elog " emerge --config =${CATEGORY}/${PF}" |
749 |
elog |
750 |
elog "Subversion has multiple server types, take your pick:" |
751 |
elog |
752 |
elog " - svnserve daemon: " |
753 |
elog " 1. Edit /etc/conf.d/svnserve" |
754 |
elog " 2. Fix the repository permissions (see \"Fixing the repository permissions\")" |
755 |
elog " 3. Start daemon: /etc/init.d/svnserve start" |
756 |
elog " 4. Make persistent: rc-update add svnserve default" |
757 |
elog |
758 |
elog " - svnserve via xinetd:" |
759 |
elog " 1. Edit /etc/xinetd.d/svnserve (remove disable line)" |
760 |
elog " 2. Fix the repository permissions (see \"Fixing the repository permissions\")" |
761 |
elog " 3. Restart xinetd.d: /etc/init.d/xinetd restart" |
762 |
elog |
763 |
elog " - svn over ssh:" |
764 |
elog " 1. Fix the repository permissions (see \"Fixing the repository permissions\")" |
765 |
elog " Additionally run:" |
766 |
elog " groupadd svnusers" |
767 |
elog " chown -R root:svnusers ${SVN_REPOS_LOC}/repos" |
768 |
elog " 2. Create an svnserve wrapper in /usr/local/bin to set the umask you" |
769 |
elog " want, for example:" |
770 |
elog " #!/bin/bash" |
771 |
elog " . /etc/conf.d/svnserve" |
772 |
elog " umask 007" |
773 |
elog " exec /usr/bin/svnserve \${SVNSERVE_OPTS} \"\$@\"" |
774 |
elog |
775 |
|
776 |
if use apache2; then |
777 |
elog " - http-based server:" |
778 |
elog " 1. Edit /etc/conf.d/apache2 to include both \"-D DAV\" and \"-D SVN\"" |
779 |
elog " 2. Create an htpasswd file:" |
780 |
elog " htpasswd2 -m -c ${SVN_REPOS_LOC}/conf/svnusers USERNAME" |
781 |
elog " 3. Fix the repository permissions (see \"Fixing the repository permissions\")" |
782 |
elog " 4. Restart Apache: /etc/init.d/apache2 restart" |
783 |
elog |
784 |
fi |
785 |
|
786 |
elog " Fixing the repository permissions:" |
787 |
elog " chmod -Rf go-rwx ${SVN_REPOS_LOC}/conf" |
788 |
elog " chmod -Rf g-w,o-rwx ${SVN_REPOS_LOC}/repos" |
789 |
elog " chmod -Rf g+rw ${SVN_REPOS_LOC}/repos/db" |
790 |
elog " chmod -Rf g+rw ${SVN_REPOS_LOC}/repos/locks" |
791 |
elog |
792 |
|
793 |
elog "If you intend to use svn-hot-backup, you can specify the number of" |
794 |
elog "backups to keep per repository by specifying an environment variable." |
795 |
elog "If you want to keep e.g. 2 backups, do the following:" |
796 |
elog "echo '# hot-backup: Keep that many repository backups around' > /etc/env.d/80subversion" |
797 |
elog "echo 'SVN_HOTBACKUP_BACKUPS_NUMBER=2' >> /etc/env.d/80subversion" |
798 |
elog |
799 |
|
800 |
elog "Subversion contains support for the use of Memcached" |
801 |
elog "to cache data of FSFS repositories." |
802 |
elog "You should install \"net-misc/memcached\", start memcached" |
803 |
elog "and configure your FSFS repositories, if you want to use this feature." |
804 |
elog "See the documentation for details." |
805 |
elog |
806 |
epause 6 |
807 |
|
808 |
if [[ -n "${CHANGED_BDB_VERSION}" ]]; then |
809 |
ewarn "You upgraded from an older version of Berkeley DB and may experience" |
810 |
ewarn "problems with your repository. Run the following commands as root to fix it:" |
811 |
ewarn " db4_recover -h ${SVN_REPOS_LOC}/repos" |
812 |
ewarn " chown -Rf apache:apache ${SVN_REPOS_LOC}/repos" |
813 |
fi |
814 |
} |
815 |
|
816 |
pkg_postrm() { |
817 |
use emacs && elisp-site-regen |
818 |
use perl && perl-module_pkg_postrm |
819 |
|
820 |
if use ctypes-python; then |
821 |
python_mod_cleanup |
822 |
fi |
823 |
} |
824 |
|
825 |
pkg_config() { |
826 |
einfo ">>> Initializing the database in ${ROOT}${SVN_REPOS_LOC} ..." |
827 |
if [[ -e "${ROOT}${SVN_REPOS_LOC}/repos" ]]; then |
828 |
echo "A Subversion repository already exists and I will not overwrite it." |
829 |
echo "Delete \"${ROOT}${SVN_REPOS_LOC}/repos\" first if you're sure you want to have a clean version." |
830 |
else |
831 |
mkdir -p "${ROOT}${SVN_REPOS_LOC}/conf" |
832 |
|
833 |
einfo ">>> Populating repository directory ..." |
834 |
# Create initial repository. |
835 |
"${ROOT}usr/bin/svnadmin" create "${ROOT}${SVN_REPOS_LOC}/repos" |
836 |
|
837 |
einfo ">>> Setting repository permissions ..." |
838 |
SVNSERVE_USER="$(. "${ROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_USER}")" |
839 |
SVNSERVE_GROUP="$(. "${ROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_GROUP}")" |
840 |
if use apache2; then |
841 |
[[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="apache" |
842 |
[[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="apache" |
843 |
else |
844 |
[[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="svn" |
845 |
[[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="svnusers" |
846 |
enewgroup "${SVNSERVE_GROUP}" |
847 |
enewuser "${SVNSERVE_USER}" -1 -1 "${SVN_REPOS_LOC}" "${SVNSERVE_GROUP}" |
848 |
fi |
849 |
chown -Rf "${SVNSERVE_USER}:${SVNSERVE_GROUP}" "${ROOT}${SVN_REPOS_LOC}/repos" |
850 |
chmod -Rf go-rwx "${ROOT}${SVN_REPOS_LOC}/conf" |
851 |
chmod -Rf o-rwx "${ROOT}${SVN_REPOS_LOC}/repos" |
852 |
fi |
853 |
} |
854 |
|
855 |
|
856 |
|
857 |
1.1 dev-util/subversion/subversion-1.6.4-r10.ebuild |
858 |
|
859 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/subversion-1.6.4-r10.ebuild?rev=1.1&view=markup |
860 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/subversion-1.6.4-r10.ebuild?rev=1.1&content-type=text/plain |
861 |
|
862 |
Index: subversion-1.6.4-r10.ebuild |
863 |
=================================================================== |
864 |
# Copyright 1999-2009 Gentoo Foundation |
865 |
# Distributed under the terms of the GNU General Public License v2 |
866 |
# $Header: /var/cvsroot/gentoo-x86/dev-util/subversion/subversion-1.6.4-r10.ebuild,v 1.1 2009/08/06 20:59:51 arfrever Exp $ |
867 |
|
868 |
EAPI="2" |
869 |
|
870 |
WANT_AUTOMAKE="none" |
871 |
|
872 |
inherit autotools bash-completion db-use depend.apache elisp-common eutils flag-o-matic java-pkg-opt-2 libtool multilib perl-module python |
873 |
|
874 |
DESCRIPTION="Advanced version control system" |
875 |
HOMEPAGE="http://subversion.tigris.org/" |
876 |
SRC_URI="http://subversion.tigris.org/downloads/${P/_/-}.tar.bz2" |
877 |
|
878 |
LICENSE="Subversion" |
879 |
SLOT="0" |
880 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" |
881 |
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" |
882 |
|
883 |
CDEPEND=">=dev-db/sqlite-3.4[threadsafe] |
884 |
>=dev-libs/apr-1.3:1 |
885 |
>=dev-libs/apr-util-1.3:1 |
886 |
dev-libs/expat |
887 |
sys-libs/zlib |
888 |
berkdb? ( =sys-libs/db-4* ) |
889 |
emacs? ( virtual/emacs ) |
890 |
gnome-keyring? ( dev-libs/glib:2 sys-apps/dbus gnome-base/gnome-keyring ) |
891 |
kde? ( sys-apps/dbus x11-libs/qt-core x11-libs/qt-dbus x11-libs/qt-gui >=kde-base/kdelibs-4 ) |
892 |
ruby? ( >=dev-lang/ruby-1.8.2 ) |
893 |
sasl? ( dev-libs/cyrus-sasl ) |
894 |
webdav-neon? ( >=net-misc/neon-0.28 ) |
895 |
webdav-serf? ( >=net-libs/serf-0.3.0 )" |
896 |
RDEPEND="${CDEPEND} |
897 |
apache2? ( www-servers/apache[apache2_modules_dav] ) |
898 |
java? ( >=virtual/jre-1.5 ) |
899 |
kde? ( kde-base/kwalletd ) |
900 |
nls? ( virtual/libintl ) |
901 |
perl? ( dev-perl/URI )" |
902 |
APACHE_TEST_DEPEND="|| ( |
903 |
=www-servers/apache-2.4*[apache2_modules_auth_basic,apache2_modules_authn_core,apache2_modules_authn_file,apache2_modules_authz_core,apache2_modules_authz_user,apache2_modules_dav,apache2_modules_log_config,apache2_modules_unixd] |
904 |
=www-servers/apache-2.2*[apache2_modules_auth_basic,apache2_modules_authn_file,apache2_modules_dav,apache2_modules_log_config] |
905 |
)" |
906 |
DEPEND="${CDEPEND} |
907 |
>=sys-apps/sandbox-1.6 |
908 |
ctypes-python? ( dev-python/ctypesgen ) |
909 |
doc? ( app-doc/doxygen ) |
910 |
gnome-keyring? ( dev-util/pkgconfig ) |
911 |
java? ( >=virtual/jdk-1.5 ) |
912 |
kde? ( dev-util/pkgconfig ) |
913 |
nls? ( sys-devel/gettext ) |
914 |
test? ( |
915 |
webdav-neon? ( ${APACHE_TEST_DEPEND} ) |
916 |
webdav-serf? ( ${APACHE_TEST_DEPEND} ) |
917 |
) |
918 |
webdav-neon? ( dev-util/pkgconfig )" |
919 |
|
920 |
want_apache |
921 |
|
922 |
S="${WORKDIR}/${P/_/-}" |
923 |
|
924 |
# Allow for custom repository locations. |
925 |
# This can't be in pkg_setup() because the variable needs to be available to pkg_config(). |
926 |
: ${SVN_REPOS_LOC:=/var/svn} |
927 |
|
928 |
pkg_setup() { |
929 |
if use kde && ! use nls; then |
930 |
eerror "Support for KWallet (KDE) requires Native Language Support (NLS)." |
931 |
die "Enable \"nls\" USE flag" |
932 |
fi |
933 |
|
934 |
if use berkdb; then |
935 |
einfo |
936 |
if [[ -z "${SVN_BDB_VERSION}" ]]; then |
937 |
SVN_BDB_VERSION="$(db_ver_to_slot "$(db_findver sys-libs/db 2>/dev/null)")" |
938 |
einfo "SVN_BDB_VERSION variable isn't set. You can set it to enforce using of specific version of Berkeley DB." |
939 |
fi |
940 |
einfo "Using: Berkeley DB ${SVN_BDB_VERSION}" |
941 |
einfo |
942 |
|
943 |
local apu_bdb_version="$(scanelf -nq "${ROOT}usr/$(get_libdir)/libaprutil-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")" |
944 |
if [[ -n "${apu_bdb_version}" && "${SVN_BDB_VERSION}" != "${apu_bdb_version}" ]]; then |
945 |
eerror "APR-Util is linked against Berkeley DB ${apu_bdb_version}, but you are trying" |
946 |
eerror "to build Subversion with support for Berkeley DB ${SVN_BDB_VERSION}." |
947 |
eerror "Rebuild dev-libs/apr-util or set SVN_BDB_VERSION=\"${apu_bdb_version}\"." |
948 |
eerror "Aborting to avoid possible run-time crashes." |
949 |
die "Berkeley DB version mismatch" |
950 |
fi |
951 |
fi |
952 |
|
953 |
depend.apache_pkg_setup |
954 |
|
955 |
java-pkg-opt-2_pkg_setup |
956 |
|
957 |
if ! use webdav-neon && ! use webdav-serf; then |
958 |
ewarn |
959 |
ewarn "WebDAV support is disabled. You need WebDAV to" |
960 |
ewarn "access repositories through the HTTP protocol." |
961 |
ewarn |
962 |
ewarn "WebDAV support needs one of the following USE flags enabled:" |
963 |
ewarn " webdav-neon webdav-serf" |
964 |
ewarn |
965 |
ewarn "You can do this by enabling one of these flags in /etc/portage/package.use:" |
966 |
ewarn " ${CATEGORY}/${PN} webdav-neon webdav-serf" |
967 |
ewarn |
968 |
ebeep |
969 |
fi |
970 |
|
971 |
if use test; then |
972 |
elog |
973 |
elog "\e[1;31m************************************************************************************************\e[0m" |
974 |
elog |
975 |
elog "NOTES ABOUT TESTS" |
976 |
elog |
977 |
elog "You can set the following variables to enable testing of some features and configure testing:" |
978 |
if use webdav-neon || use webdav-serf; then |
979 |
elog " SVN_TEST_APACHE_PORT=integer - Set Apache port number (Default value: 62208)" |
980 |
fi |
981 |
elog " SVN_TEST_SVNSERVE_PORT=integer - Set svnserve port number (Default value: 62209)" |
982 |
elog " SVN_TEST_FSFS_MEMCACHED=1 - Enable using of Memcached for FSFS repositories" |
983 |
elog " SVN_TEST_FSFS_MEMCACHED_PORT=integer - Set Memcached port number (Default value: 62210)" |
984 |
elog " SVN_TEST_FSFS_SHARDING=integer - Enable sharding of FSFS repositories and set default shard size for FSFS repositories" |
985 |
elog " SVN_TEST_FSFS_PACKING=1 - Enable packing of FSFS repositories" |
986 |
elog " (SVN_TEST_FSFS_PACKING requires SVN_TEST_FSFS_SHARDING)" |
987 |
# if use sasl; then |
988 |
# elog " SVN_TEST_SASL=1 - Enable SASL authentication" |
989 |
# fi |
990 |
if use ctypes-python || use java || use perl || use python || use ruby; then |
991 |
elog " SVN_TEST_BINDINGS=1 - Enable testing of bindings" |
992 |
fi |
993 |
if use java || use perl || use python || use ruby; then |
994 |
elog " (Testing of bindings requires ${CATEGORY}/${PF})" |
995 |
fi |
996 |
if use java; then |
997 |
elog " (Testing of JavaHL library requires dev-java/junit:4)" |
998 |
fi |
999 |
elog |
1000 |
elog "\e[1;31m************************************************************************************************\e[0m" |
1001 |
elog |
1002 |
ebeep |
1003 |
epause 24 |
1004 |
|
1005 |
if ! use apache2 && { use webdav-neon || use webdav-serf; }; then |
1006 |
eerror "Testing of libsvn_ra_neon / libsvn_ra_serf requires support for Apache." |
1007 |
die "Enable \"apache2\" USE flag." |
1008 |
fi |
1009 |
|
1010 |
if [[ -n "${SVN_TEST_APACHE_PORT}" ]] && ! ([[ "$((${SVN_TEST_APACHE_PORT}))" == "${SVN_TEST_APACHE_PORT}" ]]) &>/dev/null; then |
1011 |
die "Value of SVN_TEST_APACHE_PORT must be an integer" |
1012 |
fi |
1013 |
|
1014 |
if [[ -n "${SVN_TEST_SVNSERVE_PORT}" ]] && ! ([[ "$((${SVN_TEST_SVNSERVE_PORT}))" == "${SVN_TEST_SVNSERVE_PORT}" ]]) &>/dev/null; then |
1015 |
die "Value of SVN_TEST_SVNSERVE_PORT must be an integer" |
1016 |
fi |
1017 |
|
1018 |
if [[ -n "${SVN_TEST_FSFS_MEMCACHED}" ]] && ! has_version net-misc/memcached; then |
1019 |
die "net-misc/memcached must be installed" |
1020 |
fi |
1021 |
if [[ -n "${SVN_TEST_FSFS_MEMCACHED_PORT}" ]] && ! ([[ "$((${SVN_TEST_FSFS_MEMCACHED_PORT}))" == "${SVN_TEST_FSFS_MEMCACHED_PORT}" ]]) &>/dev/null; then |
1022 |
die "Value of SVN_TEST_FSFS_MEMCACHED_PORT must be an integer" |
1023 |
fi |
1024 |
if [[ -n "${SVN_TEST_FSFS_SHARDING}" ]] && ! ([[ "$((${SVN_TEST_FSFS_SHARDING}))" == "${SVN_TEST_FSFS_SHARDING}" ]]) &>/dev/null; then |
1025 |
die "Value of SVN_TEST_FSFS_SHARDING must be an integer" |
1026 |
fi |
1027 |
if [[ -n "${SVN_TEST_FSFS_PACKING}" && -z "${SVN_TEST_FSFS_SHARDING}" ]]; then |
1028 |
die "SVN_TEST_FSFS_PACKING requires SVN_TEST_FSFS_SHARDING" |
1029 |
fi |
1030 |
|
1031 |
if [[ -n "${SVN_TEST_BINDINGS}" ]]; then |
1032 |
if { use java || use perl || use python || use ruby; } && ! has_version "=${CATEGORY}/${PF}"; then |
1033 |
die "${CATEGORY}/${PF} must be installed" |
1034 |
fi |
1035 |
if use java && ! has_version dev-java/junit:4; then |
1036 |
die "dev-java/junit:4 must be installed" |
1037 |
fi |
1038 |
fi |
1039 |
fi |
1040 |
|
1041 |
if use debug; then |
1042 |
append-cppflags -DSVN_DEBUG -DAP_DEBUG |
1043 |
fi |
1044 |
} |
1045 |
|
1046 |
src_prepare() { |
1047 |
epatch "${FILESDIR}/${PN}-1.6.0-disable_linking_against_unneeded_libraries.patch" |
1048 |
epatch "${FILESDIR}/${PN}-1.6.2-local_library_preloading.patch" |
1049 |
epatch "${FILESDIR}/${PN}-1.6.3-apache-2.4.patch" |
1050 |
epatch "${FILESDIR}/${PN}-1.6.3-kwallet_window.patch" |
1051 |
chmod +x build/transform_libtool_scripts.sh || die "chmod failed" |
1052 |
|
1053 |
if ! use test; then |
1054 |
sed -i \ |
1055 |
-e "s/\(BUILD_RULES=.*\) bdb-test\(.*\)/\1\2/g" \ |
1056 |
-e "s/\(BUILD_RULES=.*\) test\(.*\)/\1\2/g" configure.ac |
1057 |
fi |
1058 |
|
1059 |
eautoconf |
1060 |
elibtoolize |
1061 |
} |
1062 |
|
1063 |
src_configure() { |
1064 |
local myconf |
1065 |
|
1066 |
if use python || use perl || use ruby; then |
1067 |
myconf+=" --with-swig" |
1068 |
else |
1069 |
myconf+=" --without-swig" |
1070 |
fi |
1071 |
|
1072 |
if use java; then |
1073 |
if use test && [[ -n "${SVN_TEST_BINDINGS}" ]]; then |
1074 |
myconf+=" --with-junit=/usr/share/junit-4/lib/junit.jar" |
1075 |
else |
1076 |
myconf+=" --without-junit" |
1077 |
fi |
1078 |
fi |
1079 |
|
1080 |
econf --libdir="/usr/$(get_libdir)" \ |
1081 |
$(use_with apache2 apxs "${APXS}") \ |
1082 |
$(use_with berkdb berkeley-db "db.h:/usr/include/db${SVN_BDB_VERSION}::db-${SVN_BDB_VERSION}") \ |
1083 |
$(use_with ctypes-python ctypesgen /usr) \ |
1084 |
$(use_enable dso runtime-module-search) \ |
1085 |
$(use_with gnome-keyring) \ |
1086 |
$(use_enable java javahl) \ |
1087 |
$(use_with java jdk "${JAVA_HOME}") \ |
1088 |
$(use_with kde kwallet) \ |
1089 |
$(use_enable nls) \ |
1090 |
$(use_with sasl) \ |
1091 |
$(use_with webdav-neon neon) \ |
1092 |
$(use_with webdav-serf serf /usr) \ |
1093 |
${myconf} \ |
1094 |
--with-apr=/usr/bin/apr-1-config \ |
1095 |
--with-apr-util=/usr/bin/apu-1-config \ |
1096 |
--disable-experimental-libtool \ |
1097 |
--without-jikes \ |
1098 |
--enable-local-library-preloading \ |
1099 |
--disable-mod-activation \ |
1100 |
--disable-neon-version-check \ |
1101 |
--with-sqlite=/usr |
1102 |
} |
1103 |
|
1104 |
src_compile() { |
1105 |
einfo |
1106 |
einfo "Building of core of Subversion" |
1107 |
einfo |
1108 |
emake local-all || die "Building of core of Subversion failed" |
1109 |
|
1110 |
if use ctypes-python; then |
1111 |
einfo |
1112 |
einfo "Building of Subversion Ctypes Python bindings" |
1113 |
einfo |
1114 |
emake ctypes-python || die "Building of Subversion Ctypes Python bindings failed" |
1115 |
fi |
1116 |
|
1117 |
if use python; then |
1118 |
einfo |
1119 |
einfo "Building of Subversion SWIG Python bindings" |
1120 |
einfo |
1121 |
emake swig_pydir="$(python_get_sitedir)/libsvn" swig_pydir_extra="$(python_get_sitedir)/svn" swig-py \ |
1122 |
|| die "Building of Subversion SWIG Python bindings failed" |
1123 |
fi |
1124 |
|
1125 |
if use perl; then |
1126 |
einfo |
1127 |
einfo "Building of Subversion SWIG Perl bindings" |
1128 |
einfo |
1129 |
emake -j1 swig-pl || die "Building of Subversion SWIG Perl bindings failed" |
1130 |
fi |
1131 |
|
1132 |
if use ruby; then |
1133 |
einfo |
1134 |
einfo "Building of Subversion SWIG Ruby bindings" |
1135 |
einfo |
1136 |
emake swig-rb || die "Building of Subversion SWIG Ruby bindings failed" |
1137 |
fi |
1138 |
|
1139 |
if use java; then |
1140 |
einfo |
1141 |
einfo "Building of Subversion JavaHL library" |
1142 |
einfo |
1143 |
emake -j1 JAVAC_FLAGS="$(java-pkg_javac-args) -encoding iso8859-1" javahl \ |
1144 |
|| die "Building of Subversion JavaHL library failed" |
1145 |
fi |
1146 |
|
1147 |
if use emacs; then |
1148 |
einfo |
1149 |
einfo "Compilation of Emacs modules" |
1150 |
einfo |
1151 |
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" |
1152 |
fi |
1153 |
|
1154 |
if use extras; then |
1155 |
einfo |
1156 |
einfo "Building of contrib and tools" |
1157 |
einfo |
1158 |
emake contrib || die "Building of contrib failed" |
1159 |
emake tools || die "Building of tools failed" |
1160 |
fi |
1161 |
|
1162 |
if use doc; then |
1163 |
einfo |
1164 |
einfo "Building of Subversion HTML documentation" |
1165 |
einfo |
1166 |
doxygen doc/doxygen.conf || die "Building of Subversion HTML documentation failed" |
1167 |
|
1168 |
if use java; then |
1169 |
einfo |
1170 |
einfo "Building of Subversion JavaHL library HTML documentation" |
1171 |
einfo |
1172 |
emake doc-javahl || die "Building of Subversion JavaHL library HTML documentation failed" |
1173 |
fi |
1174 |
fi |
1175 |
} |
1176 |
|
1177 |
create_apache_tests_configuration() { |
1178 |
get_loadmodule_directive() { |
1179 |
if [[ "$("${APACHE_BIN}" -l)" != *"mod_$1.c"* ]]; then |
1180 |
echo "LoadModule $1_module \"${APACHE_MODULESDIR}/mod_$1.so\"" |
1181 |
fi |
1182 |
} |
1183 |
get_loadmodule_directives() { |
1184 |
if has_version "=www-servers/apache-2.4*"; then |
1185 |
get_loadmodule_directive auth_basic |
1186 |
get_loadmodule_directive authn_core |
1187 |
get_loadmodule_directive authn_file |
1188 |
get_loadmodule_directive authz_core |
1189 |
get_loadmodule_directive authz_user |
1190 |
get_loadmodule_directive dav |
1191 |
get_loadmodule_directive log_config |
1192 |
get_loadmodule_directive unixd |
1193 |
else |
1194 |
get_loadmodule_directive auth_basic |
1195 |
get_loadmodule_directive authn_file |
1196 |
get_loadmodule_directive dav |
1197 |
get_loadmodule_directive log_config |
1198 |
fi |
1199 |
} |
1200 |
|
1201 |
mkdir -p "${T}/apache" |
1202 |
cat << EOF > "${T}/apache/apache.conf" |
1203 |
$(get_loadmodule_directives) |
1204 |
LoadModule dav_svn_module "${S}/subversion/mod_dav_svn/.libs/mod_dav_svn.so" |
1205 |
LoadModule authz_svn_module "${S}/subversion/mod_authz_svn/.libs/mod_authz_svn.so" |
1206 |
|
1207 |
User $(id -un) |
1208 |
Group $(id -gn) |
1209 |
Listen localhost:${SVN_TEST_APACHE_PORT} |
1210 |
ServerName localhost |
1211 |
ServerRoot "${T}" |
1212 |
DocumentRoot "${T}" |
1213 |
CoreDumpDirectory "${T}" |
1214 |
PidFile "${T}/apache.pid" |
1215 |
CustomLog "${T}/apache/access_log" "%h %l %u %{%Y-%m-%dT%H:%M:%S}t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" |
1216 |
CustomLog "${T}/apache/svn_log" "%{%Y-%m-%dT%H:%M:%S}t %u %{SVN-REPOS-NAME}e %{SVN-ACTION}e" env=SVN-ACTION |
1217 |
ErrorLog "${T}/apache/error_log" |
1218 |
LogLevel Debug |
1219 |
MaxRequestsPerChild 0 |
1220 |
|
1221 |
<Directory /> |
1222 |
AllowOverride None |
1223 |
</Directory> |
1224 |
|
1225 |
<Location /svn-test-work/repositories> |
1226 |
DAV svn |
1227 |
SVNParentPath "${S}/subversion/tests/cmdline/svn-test-work/repositories" |
1228 |
AuthzSVNAccessFile "${S}/subversion/tests/cmdline/svn-test-work/authz" |
1229 |
AuthType Basic |
1230 |
AuthName "Subversion Repository" |
1231 |
AuthUserFile "${T}/apache/users" |
1232 |
Require valid-user |
1233 |
</Location> |
1234 |
|
1235 |
<Location /svn-test-work/local_tmp/repos> |
1236 |
DAV svn |
1237 |
SVNPath "${S}/subversion/tests/cmdline/svn-test-work/local_tmp/repos" |
1238 |
AuthzSVNAccessFile "${S}/subversion/tests/cmdline/svn-test-work/authz" |
1239 |
AuthType Basic |
1240 |
AuthName "Subversion Repository" |
1241 |
AuthUserFile "${T}/apache/users" |
1242 |
Require valid-user |
1243 |
</Location> |
1244 |
EOF |
1245 |
|
1246 |
cat << EOF > "${T}/apache/users" |
1247 |
jrandom:xCGl35kV9oWCY |
1248 |
jconstant:xCGl35kV9oWCY |
1249 |
EOF |
1250 |
} |
1251 |
|
1252 |
set_tests_variables() { |
1253 |
if [[ "$1" == "local" ]]; then |
1254 |
base_url="file://${S}/subversion/tests/cmdline" |
1255 |
http_library="" |
1256 |
fi |
1257 |
if [[ "$1" == "svn" ]]; then |
1258 |
base_url="svn://127.0.0.1:${SVN_TEST_SVNSERVE_PORT}" |
1259 |
http_library="" |
1260 |
fi |
1261 |
if [[ "$1" == "neon" || "$1" == "serf" ]]; then |
1262 |
base_url="http://127.0.0.1:${SVN_TEST_APACHE_PORT}" |
1263 |
http_library="$1" |
1264 |
fi |
1265 |
} |
1266 |
|
1267 |
src_test() { |
1268 |
if ! use test; then |
1269 |
die "Invalid configuration" |
1270 |
fi |
1271 |
|
1272 |
local fs_type fs_types ra_type ra_types options failed_tests |
1273 |
|
1274 |
fs_types="fsfs" |
1275 |
use berkdb && fs_types+=" bdb" |
1276 |
|
1277 |
ra_types="local svn" |
1278 |
use webdav-neon && ra_types+=" neon" |
1279 |
use webdav-serf && ra_types+=" serf" |
1280 |
|
1281 |
local pid_file |
1282 |
for pid_file in svnserve.pid apache.pid memcached.pid; do |
1283 |
rm -f "${T}/${pid_file}" |
1284 |
done |
1285 |
|
1286 |
termination() { |
1287 |
local die="$1" pid_file |
1288 |
if [[ -n "${die}" ]]; then |
1289 |
echo -e "\n\e[1;31mKilling of child processes...\e[0m\a" > /dev/tty |
1290 |
fi |
1291 |
for pid_file in svnserve.pid apache.pid memcached.pid; do |
1292 |
if [[ -f "${T}/${pid_file}" ]]; then |
1293 |
kill "$(<"${T}/${pid_file}")" |
1294 |
fi |
1295 |
done |
1296 |
if [[ -n "${die}" ]]; then |
1297 |
sleep 6 |
1298 |
die "Termination" |
1299 |
fi |
1300 |
} |
1301 |
|
1302 |
trap 'termination 1 &' SIGINT SIGTERM |
1303 |
|
1304 |
SVN_TEST_SVNSERVE_PORT="${SVN_TEST_SVNSERVE_PORT:-62209}" |
1305 |
LC_ALL="C" subversion/svnserve/svnserve -dr "subversion/tests/cmdline" --listen-port "${SVN_TEST_SVNSERVE_PORT}" --log-file "${T}/svnserve.log" --pid-file "${T}/svnserve.pid" |
1306 |
if use webdav-neon || use webdav-serf; then |
1307 |
SVN_TEST_APACHE_PORT="${SVN_TEST_APACHE_PORT:-62208}" |
1308 |
create_apache_tests_configuration |
1309 |
"${APACHE_BIN}" -f "${T}/apache/apache.conf" |
1310 |
fi |
1311 |
if [[ -n "${SVN_TEST_FSFS_MEMCACHED}" ]]; then |
1312 |
SVN_TEST_FSFS_MEMCACHED_PORT="${SVN_TEST_FSFS_MEMCACHED_PORT:-62210}" |
1313 |
sed -e "/\[memcached-servers\]/akey = 127.0.0.1:${SVN_TEST_FSFS_MEMCACHED_PORT}" -i subversion/tests/tests.conf |
1314 |
memcached -dp "${SVN_TEST_FSFS_MEMCACHED_PORT}" -P "${T}/memcached.pid" |
1315 |
fi |
1316 |
if [[ -n "${SVN_TEST_FSFS_SHARDING}" ]]; then |
1317 |
options+=" FSFS_SHARDING=${SVN_TEST_FSFS_SHARDING}" |
1318 |
fi |
1319 |
if [[ -n "${SVN_TEST_FSFS_PACKING}" ]]; then |
1320 |
options+=" FSFS_PACKING=1" |
1321 |
fi |
1322 |
# if [[ -n "${SVN_TEST_SASL}" ]]; then |
1323 |
# options+=" ENABLE_SASL=1" |
1324 |
# fi |
1325 |
|
1326 |
sleep 6 |
1327 |
|
1328 |
for ra_type in ${ra_types}; do |
1329 |
for fs_type in ${fs_types}; do |
1330 |
[[ "${ra_type}" == "local" && "${fs_type}" == "bdb" ]] && continue |
1331 |
einfo |
1332 |
einfo "\e[1;34mTesting of ra_${ra_type} + $(echo ${fs_type} | tr '[:lower:]' '[:upper:]')\e[0m" |
1333 |
einfo |
1334 |
set_tests_variables ${ra_type} |
1335 |
time emake check FS_TYPE="${fs_type}" BASE_URL="${base_url}" HTTP_LIBRARY="${http_library}" CLEANUP="1" ${options} || failed_tests="1" |
1336 |
mv tests.log "${T}/tests-ra_${ra_type}-${fs_type}.log" |
1337 |
done |
1338 |
done |
1339 |
unset base_url http_library |
1340 |
termination |
1341 |
trap - SIGINT SIGTERM |
1342 |
|
1343 |
if [[ -n "${SVN_TEST_BINDINGS}" ]]; then |
1344 |
local swig_lingua swig_linguas |
1345 |
local -A linguas |
1346 |
if use ctypes-python; then |
1347 |
einfo |
1348 |
einfo "\e[1;34mTesting of Subversion Ctypes Python bindings\e[0m" |
1349 |
einfo |
1350 |
time emake check-ctypes-python || failed_tests="1" |
1351 |
fi |
1352 |
|
1353 |
use perl && swig_linguas+=" pl" |
1354 |
use python && swig_linguas+=" py" |
1355 |
use ruby && swig_linguas+=" rb" |
1356 |
|
1357 |
linguas[pl]="Perl" |
1358 |
linguas[py]="Python" |
1359 |
linguas[rb]="Ruby" |
1360 |
|
1361 |
for swig_lingua in ${swig_linguas}; do |
1362 |
einfo |
1363 |
einfo "\e[1;34mTesting of Subversion SWIG ${linguas[${swig_lingua}]} bindings\e[0m" |
1364 |
einfo |
1365 |
time emake check-swig-${swig_lingua} || failed_tests="1" |
1366 |
done |
1367 |
|
1368 |
if use java; then |
1369 |
einfo |
1370 |
einfo "\e[1;34mTesting of Subversion JavaHL library\e[0m" |
1371 |
einfo |
1372 |
time emake check-javahl || failed_tests="1" |
1373 |
fi |
1374 |
fi |
1375 |
|
1376 |
if [[ -n "${failed_tests}" ]]; then |
1377 |
ewarn |
1378 |
ewarn "\e[1;31mSome tests failed\e[0m" |
1379 |
ewarn |
1380 |
ebeep 12 |
1381 |
fi |
1382 |
} |
1383 |
|
1384 |
src_install() { |
1385 |
einfo |
1386 |
einfo "Installation of core of Subversion" |
1387 |
einfo |
1388 |
emake -j1 DESTDIR="${D}" local-install || die "Installation of core of Subversion failed" |
1389 |
|
1390 |
if use ctypes-python; then |
1391 |
einfo |
1392 |
einfo "Installation of Subversion Ctypes Python bindings" |
1393 |
einfo |
1394 |
emake DESTDIR="${D}" install-ctypes-python || die "Installation of Subversion Ctypes Python bindings failed" |
1395 |
fi |
1396 |
|
1397 |
if use python; then |
1398 |
einfo |
1399 |
einfo "Installation of Subversion SWIG Python bindings" |
1400 |
einfo |
1401 |
emake -j1 DESTDIR="${D}" swig_pydir="$(python_get_sitedir)/libsvn" swig_pydir_extra="$(python_get_sitedir)/svn" install-swig-py \ |
1402 |
|| die "Installation of Subversion SWIG Python bindings failed" |
1403 |
fi |
1404 |
|
1405 |
if use perl; then |
1406 |
einfo |
1407 |
einfo "Installation of Subversion SWIG Perl bindings" |
1408 |
einfo |
1409 |
emake -j1 DESTDIR="${D}" INSTALLDIRS="vendor" install-swig-pl || die "Installation of Subversion SWIG Perl bindings failed" |
1410 |
fixlocalpod |
1411 |
find "${D}" "(" -name .packlist -o -name "*.bs" ")" -print0 | xargs -0 rm -fr |
1412 |
fi |
1413 |
|
1414 |
if use ruby; then |
1415 |
einfo |
1416 |
einfo "Installation of Subversion SWIG Ruby bindings" |
1417 |
einfo |
1418 |
emake -j1 DESTDIR="${D}" install-swig-rb || die "Installation of Subversion SWIG Ruby bindings failed" |
1419 |
fi |
1420 |
|
1421 |
if use java; then |
1422 |
einfo |
1423 |
einfo "Installation of Subversion JavaHL library" |
1424 |
einfo |
1425 |
emake -j1 DESTDIR="${D}" install-javahl || die "Installation of Subversion JavaHL library failed" |
1426 |
java-pkg_regso "${D}"usr/$(get_libdir)/libsvnjavahl*.so |
1427 |
java-pkg_dojar "${D}"usr/$(get_libdir)/svn-javahl/svn-javahl.jar |
1428 |
rm -fr "${D}"usr/$(get_libdir)/svn-javahl/*.jar |
1429 |
fi |
1430 |
|
1431 |
# Install Apache module configuration. |
1432 |
if use apache2; then |
1433 |
dodir "${APACHE_MODULES_CONFDIR}" |
1434 |
cat << EOF > "${D}${APACHE_MODULES_CONFDIR}"/47_mod_dav_svn.conf |
1435 |
<IfDefine SVN> |
1436 |
LoadModule dav_svn_module modules/mod_dav_svn.so |
1437 |
<IfDefine SVN_AUTHZ> |
1438 |
LoadModule authz_svn_module modules/mod_authz_svn.so |
1439 |
</IfDefine> |
1440 |
|
1441 |
# Example configuration: |
1442 |
#<Location /svn/repos> |
1443 |
# DAV svn |
1444 |
# SVNPath ${SVN_REPOS_LOC}/repos |
1445 |
# AuthType Basic |
1446 |
# AuthName "Subversion repository" |
1447 |
# AuthUserFile ${SVN_REPOS_LOC}/conf/svnusers |
1448 |
# Require valid-user |
1449 |
#</Location> |
1450 |
</IfDefine> |
1451 |
EOF |
1452 |
fi |
1453 |
|
1454 |
# Install Bash Completion, bug 43179. |
1455 |
dobashcompletion tools/client-side/bash_completion subversion |
1456 |
rm -f tools/client-side/bash_completion |
1457 |
|
1458 |
# Install hot backup script, bug 54304. |
1459 |
newbin tools/backup/hot-backup.py svn-hot-backup |
1460 |
rm -fr tools/backup |
1461 |
|
1462 |
# Install svn_load_dirs.pl. |
1463 |
if use perl; then |
1464 |
dobin contrib/client-side/svn_load_dirs/svn_load_dirs.pl |
1465 |
fi |
1466 |
rm -f contrib/client-side/svn_load_dirs/svn_load_dirs.pl |
1467 |
|
1468 |
# Install svnserve init-script and xinet.d snippet, bug 43245. |
1469 |
newinitd "${FILESDIR}"/svnserve.initd svnserve |
1470 |
if use apache2; then |
1471 |
newconfd "${FILESDIR}"/svnserve.confd svnserve |
1472 |
else |
1473 |
newconfd "${FILESDIR}"/svnserve.confd2 svnserve |
1474 |
fi |
1475 |
insinto /etc/xinetd.d |
1476 |
newins "${FILESDIR}"/svnserve.xinetd svnserve |
1477 |
|
1478 |
# Install documentation. |
1479 |
dodoc CHANGES COMMITTERS README |
1480 |
dohtml www/hacking.html |
1481 |
dodoc tools/xslt/svnindex.{css,xsl} |
1482 |
rm -fr tools/xslt |
1483 |
|
1484 |
# Install Vim syntax files. |
1485 |
if use vim-syntax; then |
1486 |
insinto /usr/share/vim/vimfiles/syntax |
1487 |
doins contrib/client-side/vim/svn.vim |
1488 |
fi |
1489 |
rm -f contrib/client-side/vim/svn.vim |
1490 |
|
1491 |
# Install Emacs Lisps. |
1492 |
if use emacs; then |
1493 |
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" |
1494 |
elisp-install ${PN}/compat contrib/client-side/emacs/vc-svn.{el,elc} || die "Installation of Emacs modules failed" |
1495 |
touch "${D}${SITELISP}/${PN}/compat/.nosearch" |
1496 |
elisp-site-file-install "${FILESDIR}/70svn-gentoo.el" || die "Installation of Emacs site-init file failed" |
1497 |
fi |
1498 |
rm -fr contrib/client-side/emacs |
1499 |
|
1500 |
# Install extra files. |
1501 |
if use extras; then |
1502 |
einfo |
1503 |
einfo "Installation of contrib and tools" |
1504 |
einfo |
1505 |
|
1506 |
cat << EOF > 80subversion-extras |
1507 |
PATH="/usr/$(get_libdir)/subversion/bin" |
1508 |
ROOTPATH="/usr/$(get_libdir)/subversion/bin" |
1509 |
EOF |
1510 |
doenvd 80subversion-extras |
1511 |
|
1512 |
emake DESTDIR="${D}" contribdir="/usr/$(get_libdir)/subversion/bin" install-contrib || die "Installation of contrib failed" |
1513 |
emake DESTDIR="${D}" toolsdir="/usr/$(get_libdir)/subversion/bin" install-tools || die "Installation of tools failed" |
1514 |
|
1515 |
find contrib tools "(" -name "*.bat" -o -name "*.in" -o -name ".libs" ")" -print0 | xargs -0 rm -fr |
1516 |
rm -fr contrib/client-side/svn-push |
1517 |
rm -fr contrib/server-side/svnstsw |
1518 |
rm -fr tools/client-side/svnmucc |
1519 |
rm -fr tools/server-side/{svn-populate-node-origins-index,svnauthz-validate}* |
1520 |
rm -fr tools/{buildbot,dev,diff,po} |
1521 |
|
1522 |
insinto /usr/share/${PN} |
1523 |
doins -r contrib tools |
1524 |
fi |
1525 |
|
1526 |
if use doc; then |
1527 |
einfo |
1528 |
einfo "Installation of Subversion HTML documentation" |
1529 |
einfo |
1530 |
dohtml doc/doxygen/html/* || die "Installation of Subversion HTML documentation failed" |
1531 |
|
1532 |
insinto /usr/share/doc/${PF} |
1533 |
doins -r notes |
1534 |
ecompressdir /usr/share/doc/${PF}/notes |
1535 |
|
1536 |
# if use ruby; then |
1537 |
# emake DESTDIR="${D}" install-swig-rb-doc |
1538 |
# fi |
1539 |
|
1540 |
if use java; then |
1541 |
java-pkg_dojavadoc doc/javadoc |
1542 |
fi |
1543 |
fi |
1544 |
} |
1545 |
|
1546 |
pkg_preinst() { |
1547 |
# Compare versions of Berkeley DB, bug 122877. |
1548 |
if use berkdb && [[ -f "${ROOT}usr/bin/svn" ]]; then |
1549 |
OLD_BDB_VERSION="$(scanelf -nq "${ROOT}usr/$(get_libdir)/libsvn_subr-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")" |
1550 |
NEW_BDB_VERSION="$(scanelf -nq "${D}usr/$(get_libdir)/libsvn_subr-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")" |
1551 |
if [[ "${OLD_BDB_VERSION}" != "${NEW_BDB_VERSION}" ]]; then |
1552 |
CHANGED_BDB_VERSION="1" |
1553 |
fi |
1554 |
fi |
1555 |
} |
1556 |
|
1557 |
pkg_postinst() { |
1558 |
use emacs && elisp-site-regen |
1559 |
use perl && perl-module_pkg_postinst |
1560 |
|
1561 |
if use ctypes-python; then |
1562 |
python_mod_compile "$(python_get_sitedir)/csvn/"{.,core,ext}/*.py |
1563 |
fi |
1564 |
|
1565 |
elog "Subversion Server Notes" |
1566 |
elog "-----------------------" |
1567 |
elog |
1568 |
elog "If you intend to run a server, a repository needs to be created using" |
1569 |
elog "svnadmin (see man svnadmin) or the following command to create it in" |
1570 |
elog "${SVN_REPOS_LOC}:" |
1571 |
elog |
1572 |
elog " emerge --config =${CATEGORY}/${PF}" |
1573 |
elog |
1574 |
elog "Subversion has multiple server types, take your pick:" |
1575 |
elog |
1576 |
elog " - svnserve daemon: " |
1577 |
elog " 1. Edit /etc/conf.d/svnserve" |
1578 |
elog " 2. Fix the repository permissions (see \"Fixing the repository permissions\")" |
1579 |
elog " 3. Start daemon: /etc/init.d/svnserve start" |
1580 |
elog " 4. Make persistent: rc-update add svnserve default" |
1581 |
elog |
1582 |
elog " - svnserve via xinetd:" |
1583 |
elog " 1. Edit /etc/xinetd.d/svnserve (remove disable line)" |
1584 |
elog " 2. Fix the repository permissions (see \"Fixing the repository permissions\")" |
1585 |
elog " 3. Restart xinetd.d: /etc/init.d/xinetd restart" |
1586 |
elog |
1587 |
elog " - svn over ssh:" |
1588 |
elog " 1. Fix the repository permissions (see \"Fixing the repository permissions\")" |
1589 |
elog " Additionally run:" |
1590 |
elog " groupadd svnusers" |
1591 |
elog " chown -R root:svnusers ${SVN_REPOS_LOC}/repos" |
1592 |
elog " 2. Create an svnserve wrapper in /usr/local/bin to set the umask you" |
1593 |
elog " want, for example:" |
1594 |
elog " #!/bin/bash" |
1595 |
elog " . /etc/conf.d/svnserve" |
1596 |
elog " umask 007" |
1597 |
elog " exec /usr/bin/svnserve \${SVNSERVE_OPTS} \"\$@\"" |
1598 |
elog |
1599 |
|
1600 |
if use apache2; then |
1601 |
elog " - http-based server:" |
1602 |
elog " 1. Edit /etc/conf.d/apache2 to include both \"-D DAV\" and \"-D SVN\"" |
1603 |
elog " 2. Create an htpasswd file:" |
1604 |
elog " htpasswd2 -m -c ${SVN_REPOS_LOC}/conf/svnusers USERNAME" |
1605 |
elog " 3. Fix the repository permissions (see \"Fixing the repository permissions\")" |
1606 |
elog " 4. Restart Apache: /etc/init.d/apache2 restart" |
1607 |
elog |
1608 |
fi |
1609 |
|
1610 |
elog " Fixing the repository permissions:" |
1611 |
elog " chmod -Rf go-rwx ${SVN_REPOS_LOC}/conf" |
1612 |
elog " chmod -Rf g-w,o-rwx ${SVN_REPOS_LOC}/repos" |
1613 |
elog " chmod -Rf g+rw ${SVN_REPOS_LOC}/repos/db" |
1614 |
elog " chmod -Rf g+rw ${SVN_REPOS_LOC}/repos/locks" |
1615 |
elog |
1616 |
|
1617 |
elog "If you intend to use svn-hot-backup, you can specify the number of" |
1618 |
elog "backups to keep per repository by specifying an environment variable." |
1619 |
elog "If you want to keep e.g. 2 backups, do the following:" |
1620 |
elog "echo '# hot-backup: Keep that many repository backups around' > /etc/env.d/80subversion" |
1621 |
elog "echo 'SVN_HOTBACKUP_BACKUPS_NUMBER=2' >> /etc/env.d/80subversion" |
1622 |
elog |
1623 |
|
1624 |
elog "Subversion contains support for the use of Memcached" |
1625 |
elog "to cache data of FSFS repositories." |
1626 |
elog "You should install \"net-misc/memcached\", start memcached" |
1627 |
elog "and configure your FSFS repositories, if you want to use this feature." |
1628 |
elog "See the documentation for details." |
1629 |
elog |
1630 |
epause 6 |
1631 |
|
1632 |
if [[ -n "${CHANGED_BDB_VERSION}" ]]; then |
1633 |
ewarn "You upgraded from an older version of Berkeley DB and may experience" |
1634 |
ewarn "problems with your repository. Run the following commands as root to fix it:" |
1635 |
ewarn " db4_recover -h ${SVN_REPOS_LOC}/repos" |
1636 |
ewarn " chown -Rf apache:apache ${SVN_REPOS_LOC}/repos" |
1637 |
fi |
1638 |
} |
1639 |
|
1640 |
pkg_postrm() { |
1641 |
use emacs && elisp-site-regen |
1642 |
use perl && perl-module_pkg_postrm |
1643 |
|
1644 |
if use ctypes-python; then |
1645 |
python_mod_cleanup |
1646 |
fi |
1647 |
} |
1648 |
|
1649 |
pkg_config() { |
1650 |
einfo ">>> Initializing the database in ${ROOT}${SVN_REPOS_LOC} ..." |
1651 |
if [[ -e "${ROOT}${SVN_REPOS_LOC}/repos" ]]; then |
1652 |
echo "A Subversion repository already exists and I will not overwrite it." |
1653 |
echo "Delete \"${ROOT}${SVN_REPOS_LOC}/repos\" first if you're sure you want to have a clean version." |
1654 |
else |
1655 |
mkdir -p "${ROOT}${SVN_REPOS_LOC}/conf" |
1656 |
|
1657 |
einfo ">>> Populating repository directory ..." |
1658 |
# Create initial repository. |
1659 |
"${ROOT}usr/bin/svnadmin" create "${ROOT}${SVN_REPOS_LOC}/repos" |
1660 |
|
1661 |
einfo ">>> Setting repository permissions ..." |
1662 |
SVNSERVE_USER="$(. "${ROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_USER}")" |
1663 |
SVNSERVE_GROUP="$(. "${ROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_GROUP}")" |
1664 |
if use apache2; then |
1665 |
[[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="apache" |
1666 |
[[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="apache" |
1667 |
else |
1668 |
[[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="svn" |
1669 |
[[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="svnusers" |
1670 |
enewgroup "${SVNSERVE_GROUP}" |
1671 |
enewuser "${SVNSERVE_USER}" -1 -1 "${SVN_REPOS_LOC}" "${SVNSERVE_GROUP}" |
1672 |
fi |
1673 |
chown -Rf "${SVNSERVE_USER}:${SVNSERVE_GROUP}" "${ROOT}${SVN_REPOS_LOC}/repos" |
1674 |
chmod -Rf go-rwx "${ROOT}${SVN_REPOS_LOC}/conf" |
1675 |
chmod -Rf o-rwx "${ROOT}${SVN_REPOS_LOC}/repos" |
1676 |
fi |
1677 |
} |