summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-05-12 16:23:32 +0000
committerArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-05-12 16:23:32 +0000
commit6d4e6e6bd0a07269d3467d8d4a2154c9c2a135cc (patch)
tree59c25933ced2320ad1d61478439c51b0386b8d50 /dev-util
parentFix automagic ladcca dep wrt #242652, thanks to Mikael Magnusson. (diff)
downloadgentoo-2-6d4e6e6bd0a07269d3467d8d4a2154c9c2a135cc.tar.gz
gentoo-2-6d4e6e6bd0a07269d3467d8d4a2154c9c2a135cc.tar.bz2
gentoo-2-6d4e6e6bd0a07269d3467d8d4a2154c9c2a135cc.zip
Version bump.
(Portage version: 13622-svn/cvs/Linux x86_64)
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/subversion/ChangeLog11
-rw-r--r--dev-util/subversion/files/subversion-1.6.0-various_fixes.patch195
-rw-r--r--dev-util/subversion/files/subversion-1.6.2-fix_undefined_references.patch33
-rw-r--r--dev-util/subversion/files/subversion-1.6.2-local_library_preloading.patch144
-rw-r--r--dev-util/subversion/subversion-1.6.2.ebuild (renamed from dev-util/subversion/subversion-1.6.0-r1.ebuild)288
5 files changed, 434 insertions, 237 deletions
diff --git a/dev-util/subversion/ChangeLog b/dev-util/subversion/ChangeLog
index 0cddfbacd5e7..d2141df6990c 100644
--- a/dev-util/subversion/ChangeLog
+++ b/dev-util/subversion/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for dev-util/subversion
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/subversion/ChangeLog,v 1.375 2009/05/03 18:40:05 maekke Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/subversion/ChangeLog,v 1.376 2009/05/12 16:23:32 arfrever Exp $
+
+*subversion-1.6.2 (12 May 2009)
+
+ 12 May 2009; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
+ -subversion-1.6.0-r1.ebuild, -files/subversion-1.6.0-various_fixes.patch,
+ +subversion-1.6.2.ebuild,
+ +files/subversion-1.6.2-fix_undefined_references.patch,
+ +files/subversion-1.6.2-local_library_preloading.patch:
+ Version bump.
03 May 2009; Markus Meier <maekke@gentoo.org> subversion-1.5.6.ebuild:
amd64 stable, bug #267270
diff --git a/dev-util/subversion/files/subversion-1.6.0-various_fixes.patch b/dev-util/subversion/files/subversion-1.6.0-various_fixes.patch
deleted file mode 100644
index 76d63ca624b3..000000000000
--- a/dev-util/subversion/files/subversion-1.6.0-various_fixes.patch
+++ /dev/null
@@ -1,195 +0,0 @@
-https://svn.collab.net/viewvc/svn?view=revision&revision=36252
-https://svn.collab.net/viewvc/svn?view=revision&revision=36253
-https://svn.collab.net/viewvc/svn?view=revision&revision=36302
-https://svn.collab.net/viewvc/svn?view=revision&revision=36686
-https://svn.collab.net/viewvc/svn?view=revision&revision=36751
-https://svn.collab.net/viewvc/svn?view=revision&revision=36823
-
---- build.conf
-+++ build.conf
-@@ -3,7 +3,7 @@
- #
- ######################################################################
- #
--# Copyright (c) 2000-2008 CollabNet. All rights reserved.
-+# Copyright (c) 2000-2009 CollabNet. All rights reserved.
- #
- # This software is licensed as described in the file COPYING, which
- # you should have received as part of this distribution. The terms
-@@ -256,7 +256,7 @@
- type = lib
- path = subversion/libsvn_fs
- install = ramod-lib
--libs = libsvn_subr fs-libs apr
-+libs = libsvn_fs_util libsvn_subr fs-libs apr
- # conditionally add more dependencies
- add-deps = $(SVN_FS_LIB_DEPS)
- add-install-deps = $(SVN_FS_LIB_INSTALL_DEPS)
---- subversion/include/private/svn_fs_util.h
-+++ subversion/include/private/svn_fs_util.h
-@@ -3,7 +3,7 @@
- * consumed by only fs_* libs.
- *
- * ====================================================================
-- * Copyright (c) 2007 CollabNet. All rights reserved.
-+ * Copyright (c) 2007, 2009 CollabNet. All rights reserved.
- *
- * This software is licensed as described in the file COPYING, which
- * you should have received as part of this distribution. The terms
-@@ -169,6 +169,17 @@
- const char *path,
- apr_pool_t *pool);
-
-+/* Allocate an svn_fs_path_change2_t structure in POOL, initialize and
-+ return it.
-+
-+ Set the node_rev_id field of the created struct to NODE_REV_ID, and
-+ change_kind to CHANGE_KIND. Set all other fields to their _unknown,
-+ NULL or invalid value, respectively. */
-+svn_fs_path_change2_t *
-+svn_fs__path_change2_create(const svn_fs_id_t *node_rev_id,
-+ svn_fs_path_change_kind_t change_kind,
-+ apr_pool_t *pool);
-+
- #ifdef __cplusplus
- }
- #endif /* __cplusplus */
---- subversion/libsvn_client/merge.c
-+++ subversion/libsvn_client/merge.c
-@@ -7948,7 +7948,7 @@
- svn_opt_revision_t working_rev;
- svn_ra_session_t *ra_session;
- apr_pool_t *sesspool;
-- svn_boolean_t use_sleep;
-+ svn_boolean_t use_sleep = FALSE;
- svn_error_t *err;
- svn_boolean_t same_repos;
-
---- subversion/libsvn_fs/fs-loader.c
-+++ subversion/libsvn_fs/fs-loader.c
-@@ -2,7 +2,7 @@
- * fs_loader.c: Front-end to the various FS back ends
- *
- * ====================================================================
-- * Copyright (c) 2000-2008 CollabNet. All rights reserved.
-+ * Copyright (c) 2000-2009 CollabNet. All rights reserved.
- *
- * This software is licensed as described in the file COPYING, which
- * you should have received as part of this distribution. The terms
-@@ -34,6 +34,7 @@
- #include "svn_string.h"
- #include "svn_private_config.h"
-
-+#include "private/svn_fs_util.h"
- #include "private/svn_utf_private.h"
-
- #include "fs-loader.h"
-@@ -1320,6 +1321,13 @@
- return SVN_NO_ERROR;
- }
-
-+svn_fs_path_change2_t *
-+svn_fs_path_change2_create(const svn_fs_id_t *node_rev_id,
-+ svn_fs_path_change_kind_t change_kind,
-+ apr_pool_t *pool)
-+{
-+ return svn_fs__path_change2_create(node_rev_id, change_kind, pool);
-+}
-
- /* Return the library version number. */
- const svn_version_t *
---- subversion/libsvn_fs_util/fs-util.c
-+++ subversion/libsvn_fs_util/fs-util.c
-@@ -2,7 +2,7 @@
- * ends.
- *
- * ====================================================================
-- * Copyright (c) 2007 CollabNet. All rights reserved.
-+ * Copyright (c) 2007, 2009 CollabNet. All rights reserved.
- *
- * This software is licensed as described in the file COPYING, which
- * you should have received as part of this distribution. The terms
-@@ -131,9 +131,9 @@
- }
-
- svn_fs_path_change2_t *
--svn_fs_path_change2_create(const svn_fs_id_t *node_rev_id,
-- svn_fs_path_change_kind_t change_kind,
-- apr_pool_t *pool)
-+svn_fs__path_change2_create(const svn_fs_id_t *node_rev_id,
-+ svn_fs_path_change_kind_t change_kind,
-+ apr_pool_t *pool)
- {
- svn_fs_path_change2_t *change;
-
---- subversion/libsvn_wc/crop.c
-+++ subversion/libsvn_wc/crop.c
-@@ -284,8 +284,9 @@
- {
- svn_wc_entry_t *target_entry;
- apr_hash_t *parent_entries;
-+
- SVN_ERR(svn_wc_entries_read(&parent_entries, p_access,
-- FALSE, pool));
-+ TRUE, pool));
-
- target_entry = apr_hash_get(parent_entries,
- svn_path_basename(full_path, pool),
---- subversion/libsvn_wc/log.c
-+++ subversion/libsvn_wc/log.c
-@@ -1472,7 +1472,7 @@
- _("Invalid 'format' attribute"));
-
- /* Remove the .svn/format file, if it exists. */
-- SVN_ERR(svn_io_remove_file(path, loggy->pool));
-+ svn_error_clear(svn_io_remove_file(path, loggy->pool));
-
- /* The nice thing is that, just by setting this flag, the entries file will
- be rewritten in the desired format. */
---- subversion/libsvn_wc/questions.c
-+++ subversion/libsvn_wc/questions.c
-@@ -78,6 +78,10 @@
-
- svn_error_clear(err);
-
-+ /* If the format file does not exist or path not directory, then for
-+ our purposes this is not a working copy, so return 0. */
-+ *wc_format = 0;
-+
- /* Check path itself exists. */
- SVN_ERR(svn_io_check_path(path, &kind, pool));
-
-@@ -88,9 +92,6 @@
- svn_path_local_style(path, pool));
- }
-
-- /* If the format file does not exist or path not directory, then for
-- our purposes this is not a working copy, so return 0. */
-- *wc_format = 0;
- }
- else if (err)
- return err;
---- subversion/libsvn_wc/update_editor.c
-+++ subversion/libsvn_wc/update_editor.c
-@@ -2313,12 +2313,15 @@
-
- A dir added with history is a tree conflict. */
-
-- if (strcmp(entry->uuid, parent_entry->uuid) != 0)
-- return svn_error_createf
-- (SVN_ERR_WC_OBSTRUCTED_UPDATE, NULL,
-- _("UUID mismatch: existing directory '%s' was checked out "
-- "from a different repository"),
-- svn_path_local_style(db->path, pool));
-+ if (entry->uuid && parent_entry->uuid)
-+ {
-+ if (strcmp(entry->uuid, parent_entry->uuid) != 0)
-+ return svn_error_createf(
-+ SVN_ERR_WC_OBSTRUCTED_UPDATE, NULL,
-+ _("UUID mismatch: existing directory '%s' was checked out "
-+ "from a different repository"),
-+ svn_path_local_style(db->path, pool));
-+ }
-
- if (!eb->switch_url
- && strcmp(db->new_URL, entry->url) != 0)
diff --git a/dev-util/subversion/files/subversion-1.6.2-fix_undefined_references.patch b/dev-util/subversion/files/subversion-1.6.2-fix_undefined_references.patch
new file mode 100644
index 000000000000..0ee6c08b0b78
--- /dev/null
+++ b/dev-util/subversion/files/subversion-1.6.2-fix_undefined_references.patch
@@ -0,0 +1,33 @@
+https://svn.collab.net/viewvc/svn?view=revision&revision=37710
+
+--- subversion/libsvn_fs_base/bdb/changes-table.c
++++ subversion/libsvn_fs_base/bdb/changes-table.c
+@@ -33,7 +33,7 @@
+ #include "dbt.h"
+ #include "changes-table.h"
+
+-
++#include "private/svn_fs_util.h"
+ #include "svn_private_config.h"
+
+
+@@ -217,7 +217,7 @@
+ /* This change is new to the hash, so make a new public change
+ structure from the internal one (in the hash's pool), and dup
+ the path into the hash's pool, too. */
+- new_change = svn_fs_path_change2_create(
++ new_change = svn_fs__path_change2_create(
+ svn_fs_base__id_copy(change->noderev_id, pool),
+ change->kind,
+ pool);
+--- subversion/libsvn_fs_fs/fs_fs.c
++++ subversion/libsvn_fs_fs/fs_fs.c
+@@ -4780,7 +4780,7 @@
+ APR_APPEND | APR_WRITE | APR_CREATE
+ | APR_BUFFERED, APR_OS_DEFAULT, pool));
+
+- change = svn_fs_path_change2_create(id, change_kind, pool);
++ change = svn_fs__path_change2_create(id, change_kind, pool);
+ change->text_mod = text_mod;
+ change->prop_mod = prop_mod;
+ change->node_kind = node_kind;
diff --git a/dev-util/subversion/files/subversion-1.6.2-local_library_preloading.patch b/dev-util/subversion/files/subversion-1.6.2-local_library_preloading.patch
new file mode 100644
index 000000000000..8fb4f0841462
--- /dev/null
+++ b/dev-util/subversion/files/subversion-1.6.2-local_library_preloading.patch
@@ -0,0 +1,144 @@
+--- configure.ac
++++ configure.ac
+@@ -198,6 +198,24 @@
+
+ AC_SUBST(LT_LDFLAGS)
+
++AC_ARG_ENABLE(local-library-preloading,
++ AS_HELP_STRING([--disable-local-library-preloading],
++ [Disable preloading of locally built libraries in locally built executables]),
++ [
++ if test "$enableval" != "no"; then
++ TRANSFORM_LIBTOOL_SCRIPTS="transform-libtool-scripts"
++ else
++ TRANSFORM_LIBTOOL_SCRIPTS=""
++ fi
++ ], [
++ if test "`uname`" != "Darwin"; then
++ TRANSFORM_LIBTOOL_SCRIPTS="transform-libtool-scripts"
++ else
++ TRANSFORM_LIBTOOL_SCRIPTS=""
++ fi
++])
++AC_SUBST(TRANSFORM_LIBTOOL_SCRIPTS)
++
+ dnl Check if -no-undefined is needed for the platform.
+ dnl It should always work but with libtool 1.4.3 on OS X it breaks the build.
+ dnl So we only turn it on for platforms where we know we really need it.
+--- Makefile.in
++++ Makefile.in
+@@ -309,7 +309,10 @@
+
+ @INCLUDE_OUTPUTS@
+
+-local-all: @BUILD_RULES@
++local-all: @BUILD_RULES@ @TRANSFORM_LIBTOOL_SCRIPTS@
++
++transform-libtool-scripts: @BUILD_RULES@
++ @$(top_srcdir)/build/transform_libtool_scripts.sh
+
+ locale-gnu-pot:
+ cd $(abs_srcdir) && XGETTEXT="$(XGETTEXT)" MSGMERGE="$(MSGMERGE)" \
+--- build/transform_libtool_scripts.sh
++++ build/transform_libtool_scripts.sh
+@@ -0,0 +1,100 @@
++#!/bin/sh
++
++# Dependencies of libraries
++subr="subr"
++auth_gnome_keyring="auth_gnome_keyring $subr"
++auth_kwallet="auth_kwallet $subr"
++delta="delta $subr"
++diff="diff $subr"
++fs_util="fs_util $subr"
++fs_base="fs_base $delta $fs_util $subr"
++fs_fs="fs_fs $delta $fs_util $subr"
++fs="fs $fs_base $fs_fs $fs_util $subr"
++repos="repos $delta $fs $fs_util $subr"
++ra_local="ra_local $delta $fs $fs_util $repos $subr"
++ra_neon="ra_neon $delta $subr"
++ra_serf="ra_serf $delta $subr"
++ra_svn="ra_svn $delta $subr"
++ra="ra $delta $ra_local $ra_neon $ra_serf $ra_svn $subr"
++wc="wc $delta $diff $subr"
++client="client $delta $diff $ra $subr $wc"
++
++# Variable 'libraries' containing names of variables corresponding to libraries
++libraries="auth_gnome_keyring auth_kwallet client delta diff fs fs_base fs_fs fs_util ra ra_local ra_neon ra_serf ra_svn repos subr wc"
++
++for library in $libraries; do
++ # Delete duplicates in dependencies of libraries
++ library_dependencies="$(echo -n $(for x in $(eval echo "\$$library"); do echo $x; done | sort -u))"
++ eval "$library=\$library_dependencies"
++done
++
++# Dependencies of executables
++svn="$auth_gnome_keyring $auth_kwallet $client $delta $diff $ra $subr $wc"
++svnadmin="$delta $fs $repos $subr"
++svndumpfilter="$delta $fs $repos $subr"
++svnlook="$delta $diff $fs $repos $subr"
++svnserve="$delta $fs $ra_svn $repos $subr"
++svnsync="$auth_gnome_keyring $auth_kwallet $delta $ra $subr"
++svnversion="$subr $wc"
++entries_dump="$subr $wc"
++
++# Variable 'executables' containing names of variables corresponding to executables
++executables="svn svnadmin svndumpfilter svnlook svnserve svnsync svnversion entries_dump"
++
++for executable in $executables; do
++ # Set variables containing paths of executables
++ if [ "$executable" != entries_dump ]; then
++ eval "${executable}_path=subversion/$executable/$executable"
++ else
++ eval "${executable}_path=subversion/tests/cmdline/entries-dump"
++ fi
++ # Delete duplicates in dependencies of executables
++ executable_dependencies="$(echo -n $(for x in $(eval echo "\$$executable"); do echo $x; done | sort -u))"
++ eval "$executable=\$executable_dependencies"
++done
++
++test_paths="$(find subversion/tests -name '*-test' ! -path '*/.libs/*')"
++for test in $test_paths; do
++ test_path="$test"
++ # Dependencies of tests are based on names of directories containing tests
++ test_library="$(echo $test | sed -e 's:^subversion/tests/libsvn_\([^/]*\)/.*:\1:')"
++ test_dependencies="$(eval echo "\$$test_library")"
++ # Set variables corresponding to tests and containing dependencies of tests
++ test="$(echo $test | sed -e 's:^subversion/tests/libsvn_[^/]*/\(.*\):\1:' -e 's/-/_/g')"
++ eval "$test=\$test_dependencies"
++ # Set variables containing paths of tests
++ eval "${test}_path=\$test_path"
++ # Set variable 'tests' containing names of variables corresponding to tests
++ tests="$tests $test"
++done
++
++# auth-test dynamically loads libsvn_auth_gnome_keyring and libsvn_auth_kwallet libraries
++auth_test="auth_gnome_keyring auth_kwallet $auth_test"
++
++# Usage: sed_append LINE_NUMBER TEXT FILE
++sed_append()
++{
++ sed -e "$1a\
++$2" "$3" > "$3.new"
++ mv -f "$3.new" "$3"
++}
++
++current_directory="$(pwd)"
++for libtool_script in $executables $tests; do
++ eval "libtool_script_path=\$${libtool_script}_path"
++ if [ -f "$libtool_script_path" ]; then
++ if { grep LD_LIBRARY_PATH "$libtool_script_path" && ! grep LD_PRELOAD "$libtool_script_path"; } > /dev/null; then
++ echo "Transforming $libtool_script_path"
++ libtool_script_dependencies="$(eval echo "\$$libtool_script")"
++ for libtool_script_dependency in $libtool_script_dependencies; do
++ libtool_script_library="$current_directory/subversion/libsvn_$libtool_script_dependency/.libs/libsvn_$libtool_script_dependency-1.so"
++ [ -f "$libtool_script_library" ] && libtool_script_libraries="$libtool_script_libraries $libtool_script_library"
++ done
++ libtool_script_libraries="${libtool_script_libraries# *}"
++ # Append definitions of LD_PRELOAD to libtool scripts
++ sed_append 4 "LD_PRELOAD=\"$libtool_script_libraries\"" "$libtool_script_path"
++ sed_append 5 "export LD_PRELOAD" "$libtool_script_path"
++ chmod +x "$libtool_script_path"
++ fi
++ fi
++done
diff --git a/dev-util/subversion/subversion-1.6.0-r1.ebuild b/dev-util/subversion/subversion-1.6.2.ebuild
index f5867dc8ab66..53c716ca5e8d 100644
--- a/dev-util/subversion/subversion-1.6.0-r1.ebuild
+++ b/dev-util/subversion/subversion-1.6.2.ebuild
@@ -1,12 +1,12 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/subversion/subversion-1.6.0-r1.ebuild,v 1.8 2009/04/12 11:18:19 klausman Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/subversion/subversion-1.6.2.ebuild,v 1.1 2009/05/12 16:23:32 arfrever Exp $
-EAPI="1"
+EAPI="2"
WANT_AUTOMAKE="none"
-inherit bash-completion db-use depend.apache elisp-common eutils flag-o-matic java-pkg-opt-2 libtool multilib perl-module python
+inherit autotools bash-completion db-use depend.apache elisp-common eutils flag-o-matic java-pkg-opt-2 libtool multilib perl-module python
DESCRIPTION="Advanced version control system"
HOMEPAGE="http://subversion.tigris.org/"
@@ -14,11 +14,10 @@ SRC_URI="http://subversion.tigris.org/downloads/${P/_/-}.tar.bz2"
LICENSE="Subversion"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~s390 ~sh ~x86"
-IUSE="apache2 berkdb ctypes-python debug doc +dso emacs extras gnome-keyring java kde nls perl python ruby sasl vim-syntax +webdav-neon webdav-serf"
-RESTRICT="test"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~x86"
+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"
-CDEPEND=">=dev-db/sqlite-3.4
+CDEPEND=">=dev-db/sqlite-3.4[threadsafe]
>=dev-libs/apr-1.3:1
>=dev-libs/apr-util-1.3:1
dev-libs/expat
@@ -33,6 +32,7 @@ CDEPEND=">=dev-db/sqlite-3.4
webdav-serf? ( >=net-libs/serf-0.3.0 )"
RDEPEND="${CDEPEND}
+ apache2? ( www-servers/apache[apache2_modules_dav] )
java? ( >=virtual/jre-1.5 )
kde? ( kde-base/kwalletd )
nls? ( virtual/libintl )
@@ -96,6 +96,59 @@ pkg_setup() {
ebeep
fi
+ if use test; then
+ elog
+ elog "You can set the following variables to enable testing of some features:"
+ if use webdav-neon || use webdav-serf; then
+ elog " SVN_TEST_APACHE=1 - Enable testing of mod_dav_svn, mod_authz_svn and libsvn_ra_neon / libsvn_ra_serf"
+ elog " (See \"Testing of mod_dav_svn, mod_authz_svn and libsvn_ra_neon / libsvn_ra_serf\")"
+ fi
+ elog " SVN_TEST_FSFS_MEMCACHED=1 - Enable using of Memcached for FSFS repositories"
+ elog " SVN_TEST_FSFS_MEMCACHED_PORT=integer - Set Memcached port number (Default value: 11211)"
+ elog " SVN_TEST_FSFS_SHARDING=integer - Enable sharding of FSFS repositories and set default shard size for FSFS repositories"
+ elog " SVN_TEST_FSFS_PACKING=1 - Enable packing of FSFS repositories"
+ elog " (SVN_TEST_FSFS_PACKING requires SVN_TEST_FSFS_SHARDING)"
+# if use sasl; then
+# elog " SVN_TEST_SASL=1 - Enable SASL authentication"
+# fi
+ if use ctypes-python || use java || use perl || use python || use ruby; then
+ elog " SVN_TEST_BINDINGS=1 - Enable testing of bindings"
+ fi
+ if use java || use perl || use python || use ruby; then
+ elog " (Testing of bindings requires ${CATEGORY}/${PF})"
+ fi
+ if use java; then
+ elog " (Testing of JavaHL library requires dev-java/junit:4)"
+ fi
+ elog
+
+ if { use webdav-neon || use webdav-serf; } && [[ -n "${SVN_TEST_APACHE}" ]] && ! has_version "${CATEGORY}/${PN}[apache2]"; then
+ die "${CATEGORY}/${PN} must be installed with USE=\"apache2\""
+ fi
+
+ if [[ -n "${SVN_TEST_FSFS_MEMCACHED}" ]] && ! has_version net-misc/memcached; then
+ die "net-misc/memcached must be installed"
+ fi
+ if [[ -n "${SVN_TEST_FSFS_MEMCACHED_PORT}" ]] && ! ([[ "$((${SVN_TEST_FSFS_MEMCACHED_PORT}))" == "${SVN_TEST_FSFS_MEMCACHED_PORT}" ]]) &>/dev/null; then
+ die "Value of SVN_TEST_FSFS_MEMCACHED_PORT must be an integer"
+ fi
+ if [[ -n "${SVN_TEST_FSFS_SHARDING}" ]] && ! ([[ "$((${SVN_TEST_FSFS_SHARDING}))" == "${SVN_TEST_FSFS_SHARDING}" ]]) &>/dev/null; then
+ die "Value of SVN_TEST_FSFS_SHARDING must be an integer"
+ fi
+ if [[ -n "${SVN_TEST_FSFS_PACKING}" && -z "${SVN_TEST_FSFS_SHARDING}" ]]; then
+ die "SVN_TEST_FSFS_PACKING requires SVN_TEST_FSFS_SHARDING"
+ fi
+
+ if [[ -n "${SVN_TEST_BINDINGS}" ]]; then
+ if { use java || use perl || use python || use ruby; } && ! has_version "=${CATEGORY}/${PF}"; then
+ die "${CATEGORY}/${PF} must be installed"
+ fi
+ if use java && ! has_version dev-java/junit:4; then
+ die "dev-java/junit:4 must be installed"
+ fi
+ fi
+ fi
+
append-flags -fno-strict-aliasing
if use debug; then
@@ -104,43 +157,67 @@ pkg_setup() {
}
src_unpack() {
- unpack ${A}
- cd "${S}"
-
- epatch "${FILESDIR}/${P}-disable_linking_against_unneeded_libraries.patch"
+ if use test && { use webdav-neon || use webdav-serf; }; then
+ create_apache_tests_configuration
- # Various fixes which will be included in 1.6.1.
- epatch "${FILESDIR}/${P}-various_fixes.patch"
+ elog
+ elog "Testing of mod_dav_svn, mod_authz_svn and libsvn_ra_neon / libsvn_ra_serf:"
+ elog " If you want to test mod_dav_svn, mod_authz_svn and libsvn_ra_neon / libsvn_ra_serf,"
+ elog " ensure that ${CATEGORY}/${PN} is installed with USE=\"apache2\","
+ elog " copy \"${T}/99_subversion_tests.conf\" to /etc/apache2/modules.d directory,"
+ elog " define DAV, SVN, SVN_AUTHZ and SVN_TESTS in APACHE2_OPTS variable in /etc/conf.d/apache2,"
+ elog " (re)start Apache and run \`SVN_TEST_APACHE=1 emerge ${CATEGORY}/${PN}\`."
+ elog
- # Fix 2 messages in Polish translation. They will be fixed in 1.6.1.
- sed -e "7420d;8586d" -i subversion/po/pl.po
+ if [[ -z "${SVN_TEST_APACHE}" ]]; then
+ ebeep 24
+ else
+ if [[ ! -f "/etc/apache2/modules.d/99_subversion_tests.conf" ]]; then
+ die "/etc/apache2/modules.d/99_subversion_tests.conf doesn't exist"
+ fi
+ if ! cmp -s "${T}/99_subversion_tests.conf" "/etc/apache2/modules.d/99_subversion_tests.conf"; then
+ die "/etc/apache2/modules.d/99_subversion_tests.conf mismatch"
+ fi
+ fi
+ fi
- # https://svn.collab.net/viewvc/svn?view=revision&revision=36742
- sed -e 's/$SVN_APRUTIL_INCLUDES $SVN_DB_INCLUDES/$SVN_DB_INCLUDES $SVN_APRUTIL_INCLUDES/' -i build/ac-macros/berkeley-db.m4
+ unpack ${A}
+}
- sed -i \
- -e "s/\(BUILD_RULES=.*\) bdb-test\(.*\)/\1\2/g" \
- -e "s/\(BUILD_RULES=.*\) test\(.*\)/\1\2/g" configure.ac
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-1.6.0-disable_linking_against_unneeded_libraries.patch"
+ epatch "${FILESDIR}/${P}-fix_undefined_references.patch"
+ epatch "${FILESDIR}/${P}-local_library_preloading.patch"
+ chmod +x build/transform_libtool_scripts.sh || die "chmod failed"
- sed -e "s:@bindir@/svn-contrib:@libdir@/subversion/bin:" \
- -e "s:@bindir@/svn-tools:@libdir@/subversion/bin:" \
- -i Makefile.in
+ if ! use test; then
+ sed -i \
+ -e "s/\(BUILD_RULES=.*\) bdb-test\(.*\)/\1\2/g" \
+ -e "s/\(BUILD_RULES=.*\) test\(.*\)/\1\2/g" configure.ac
+ fi
- ./autogen.sh || die "autogen.sh failed"
+ eautoconf
elibtoolize
}
-src_compile() {
+src_configure() {
local myconf
if use python || use perl || use ruby; then
- myconf="${myconf} --with-swig"
+ myconf+=" --with-swig"
else
- myconf="${myconf} --without-swig"
+ myconf+=" --without-swig"
+ fi
+
+ if use java; then
+ if use test && [[ -n "${SVN_TEST_BINDINGS}" ]]; then
+ myconf+=" --with-junit=/usr/share/junit-4/lib/junit.jar"
+ else
+ myconf+=" --without-junit"
+ fi
fi
econf --libdir="/usr/$(get_libdir)" \
- ${myconf} \
$(use_with apache2 apxs "${APXS}") \
$(use_with berkdb berkeley-db "db.h:/usr/include/db${SVN_BDB_VERSION}::db-${SVN_BDB_VERSION}") \
$(use_with ctypes-python ctypesgen /usr) \
@@ -153,15 +230,18 @@ src_compile() {
$(use_with sasl) \
$(use_with webdav-neon neon) \
$(use_with webdav-serf serf /usr) \
+ ${myconf} \
--with-apr=/usr/bin/apr-1-config \
--with-apr-util=/usr/bin/apu-1-config \
--disable-experimental-libtool \
--without-jikes \
- --without-junit \
+ --enable-local-library-preloading \
--disable-mod-activation \
--disable-neon-version-check \
--with-sqlite=/usr
+}
+src_compile() {
einfo
einfo "Building of core of Subversion"
einfo
@@ -200,13 +280,13 @@ src_compile() {
einfo
einfo "Building of Subversion JavaHL library"
einfo
- make JAVAC_FLAGS="$(java-pkg_javac-args) -encoding iso8859-1" javahl \
+ emake -j1 JAVAC_FLAGS="$(java-pkg_javac-args) -encoding iso8859-1" javahl \
|| die "Building of Subversion JavaHL library failed"
fi
if use emacs; then
einfo
- einfo "Compilation of Emacs support"
+ einfo "Compilation of Emacs modules"
einfo
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"
fi
@@ -234,6 +314,136 @@ src_compile() {
fi
}
+create_apache_tests_configuration() {
+cat << EOF > "${T}/99_subversion_tests.conf"
+<IfDefine SVN_TESTS>
+ User $(id -un)
+ Group $(id -gn)
+
+ <Location /svn-test-work/repositories>
+ DAV svn
+ SVNParentPath "${S}/subversion/tests/cmdline/svn-test-work/repositories"
+ AuthzSVNAccessFile "${S}/subversion/tests/cmdline/svn-test-work/authz"
+ AuthType Basic
+ AuthName "Subversion Repository"
+ AuthUserFile "${T}/apache-users"
+ Require valid-user
+ </Location>
+
+ <Location /svn-test-work/local_tmp/repos>
+ DAV svn
+ SVNPath "${S}/subversion/tests/cmdline/svn-test-work/local_tmp/repos"
+ AuthzSVNAccessFile "${S}/subversion/tests/cmdline/svn-test-work/authz"
+ AuthType Basic
+ AuthName "Subversion Repository"
+ AuthUserFile "${T}/apache-users"
+ Require valid-user
+ </Location>
+</IfDefine>
+EOF
+
+cat << EOF > "${T}/apache-users"
+jrandom:xCGl35kV9oWCY
+jconstant:xCGl35kV9oWCY
+EOF
+}
+
+initialize_tests_environment() {
+ [[ "$1" == "local" ]] && base_url="file://${S}/subversion/tests/cmdline"
+ [[ "$1" == "svn" ]] && base_url="svn://127.0.0.1"
+ [[ "$1" == "neon" ]] && base_url="http://localhost" http_library="neon"
+ [[ "$1" == "serf" ]] && base_url="http://localhost" http_library="serf"
+
+ [[ "$1" == "svn" ]] && LC_ALL="C" subversion/svnserve/svnserve -dr "subversion/tests/cmdline" --pid-file "${T}/svnserve.pid"
+ [[ -n "${SVN_TEST_FSFS_MEMCACHED}" ]] && memcached -dp "${SVN_TEST_FSFS_MEMCACHED_PORT}" -P "${T}/memcached.pid"
+}
+
+terminate_tests_environment() {
+ [[ "$1" == "svn" ]] && kill "$(<"${T}/svnserve.pid")"
+ [[ -n "${SVN_TEST_FSFS_MEMCACHED}" ]] && kill "$(<"${T}/memcached.pid")"
+}
+
+src_test() {
+ local fs_type fs_types ra_type ra_types options failed_tests
+
+ fs_types="fsfs"
+ use berkdb && fs_types+=" bdb"
+
+ ra_types="local svn"
+ if [[ -n "${SVN_TEST_APACHE}" ]]; then
+ use webdav-neon && ra_types+=" neon"
+ use webdav-serf && ra_types+=" serf"
+ fi
+
+ if [[ -n "${SVN_TEST_FSFS_MEMCACHED}" ]]; then
+ [[ -z "${SVN_TEST_FSFS_MEMCACHED_PORT}" ]] && SVN_TEST_FSFS_MEMCACHED_PORT="11211"
+ sed -e "/\[memcached-servers\]/akey = 127.0.0.1:${SVN_TEST_FSFS_MEMCACHED_PORT}" -i subversion/tests/tests.conf
+ fi
+ if [[ -n "${SVN_TEST_FSFS_SHARDING}" ]]; then
+ options+=" FSFS_SHARDING=${SVN_TEST_FSFS_SHARDING}"
+ fi
+ if [[ -n "${SVN_TEST_FSFS_PACKING}" ]]; then
+ options+=" FSFS_PACKING=1"
+ fi
+# if [[ -n "${SVN_TEST_SASL}" ]]; then
+# options+=" ENABLE_SASL=1"
+# fi
+
+ for ra_type in ${ra_types}; do
+ for fs_type in ${fs_types}; do
+ [[ "${ra_type}" == "local" && "${fs_type}" == "bdb" ]] && continue
+ einfo
+ einfo "\e[1;34mTesting of ra_${ra_type} + $(echo ${fs_type} | tr '[:lower:]' '[:upper:]')\e[0m"
+ einfo
+ initialize_tests_environment ${ra_type}
+ emake check FS_TYPE="${fs_type}" BASE_URL="${base_url}" HTTP_LIBRARY="${http_library}" CLEANUP="true" ${options} || failed_tests="1"
+ terminate_tests_environment ${ra_type}
+ mv tests.log tests-ra_${ra_type}-${fs_type}.log
+ done
+ done
+ unset base_url http_library
+
+ if [[ -n "${SVN_TEST_BINDINGS}" ]]; then
+ local swig_lingua swig_linguas
+ local -A linguas
+ if use ctypes-python; then
+ einfo
+ einfo "\e[1;34mTesting of Subversion Ctypes Python bindings\e[0m"
+ einfo
+ emake check-ctypes-python || failed_tests="1"
+ fi
+
+ use perl && swig_linguas+=" pl"
+ use python && swig_linguas+=" py"
+ use ruby && swig_linguas+=" rb"
+
+ linguas[pl]="Perl"
+ linguas[py]="Python"
+ linguas[rb]="Ruby"
+
+ for swig_lingua in ${swig_linguas}; do
+ einfo
+ einfo "\e[1;34mTesting of Subversion SWIG ${linguas[${swig_lingua}]} bindings\e[0m"
+ einfo
+ emake check-swig-${swig_lingua} || failed_tests="1"
+ done
+
+ if use java; then
+ einfo
+ einfo "\e[1;34mTesting of Subversion JavaHL library\e[0m"
+ einfo
+ emake check-javahl || failed_tests="1"
+ fi
+ fi
+
+ if [[ -n "${failed_tests}" ]]; then
+ ewarn
+ ewarn "\e[1;31mSome tests failed\e[0m"
+ ewarn
+ ebeep 12
+ fi
+}
+
src_install() {
einfo
einfo "Installation of core of Subversion"
@@ -284,7 +494,7 @@ src_install() {
# Install Apache module configuration.
if use apache2; then
dodir "${APACHE_MODULES_CONFDIR}"
- cat <<EOF >"${D}${APACHE_MODULES_CONFDIR}"/47_mod_dav_svn.conf
+ cat << EOF > "${D}${APACHE_MODULES_CONFDIR}"/47_mod_dav_svn.conf
<IfDefine SVN>
LoadModule dav_svn_module modules/mod_dav_svn.so
<IfDefine SVN_AUTHZ>
@@ -346,7 +556,7 @@ EOF
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"
elisp-install ${PN}/compat contrib/client-side/emacs/vc-svn.{el,elc} || die "Installation of Emacs modules failed"
touch "${D}${SITELISP}/${PN}/compat/.nosearch"
- elisp-site-file-install "${FILESDIR}/1.5.0/70svn-gentoo.el" || die "Installation of Emacs site-init file failed"
+ elisp-site-file-install "${FILESDIR}/70svn-gentoo.el" || die "Installation of Emacs site-init file failed"
fi
rm -fr contrib/client-side/emacs
@@ -356,8 +566,8 @@ EOF
einfo "Installation of contrib and tools"
einfo
doenvd "${FILESDIR}/1.5.0/80subversion-extras"
- emake DESTDIR="${D}" install-contrib || die "Installation of contrib failed"
- emake DESTDIR="${D}" install-tools || die "Installation of tools failed"
+ emake DESTDIR="${D}" contribdir="/usr/$(get_libdir)/subversion/bin" install-contrib || die "Installation of contrib failed"
+ emake DESTDIR="${D}" toolsdir="/usr/$(get_libdir)/subversion/bin" install-tools || die "Installation of tools failed"
find contrib tools "(" -name "*.bat" -o -name "*.in" -o -name ".libs" ")" -print0 | xargs -0 rm -fr
rm -fr contrib/client-side/svn-push
@@ -381,7 +591,7 @@ EOF
ecompressdir /usr/share/doc/${PF}/notes
# if use ruby; then
-# make DESTDIR="${D}" install-swig-rb-doc
+# emake DESTDIR="${D}" install-swig-rb-doc
# fi
if use java; then
@@ -396,7 +606,7 @@ pkg_preinst() {
OLD_BDB_VERSION="$(scanelf -nq "${ROOT}usr/$(get_libdir)/libsvn_subr-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")"
NEW_BDB_VERSION="$(scanelf -nq "${D}usr/$(get_libdir)/libsvn_subr-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")"
if [[ "${OLD_BDB_VERSION}" != "${NEW_BDB_VERSION}" ]]; then
- CHANGED_BDB_VERSION=1
+ CHANGED_BDB_VERSION="1"
fi
fi
}
@@ -494,10 +704,6 @@ pkg_postrm() {
}
pkg_config() {
- if [[ ! -x "${ROOT}usr/bin/svnadmin" ]]; then
- die "You seem to only have built the Subversion client"
- fi
-
einfo ">>> Initializing the database in ${ROOT}${SVN_REPOS_LOC} ..."
if [[ -e "${ROOT}${SVN_REPOS_LOC}/repos" ]]; then
echo "A Subversion repository already exists and I will not overwrite it."