[dev-vcs/subversion*] split subversion-java

Add subversion-java and modified subversion ebuild.
The purpose:
* we want netbeans-ide that depends on subversion[java],
* we don't want subversion compiled with Java support (extra dependency
not needed by most users).
The solution:
split Java bindings from subversion and make separate ebuild for that.
This commit is contained in:
Sławomir Nizio
2011-04-10 00:09:49 +02:00
parent 0fb4f4e554
commit 7608b071d1
21 changed files with 4391 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
AUX 70svn-gentoo.el 443 RMD160 300189eea80dfefa0f2a8479f67d255b39fd2adb SHA1 245b5ed611755276016bc76de2eabdc117e2c511 SHA256 23aa9effa5aea7ae73d14ae4df1a9269135137a5e483b4ff2a501dc130d7d1be
AUX subversion-1.6.0-disable_linking_against_unneeded_libraries.patch 1769 RMD160 89d165463a2e8a7e2ae5855bc4e4e290f20416ae SHA1 3fc9a49e80992b13b016d1c56babae43957f1b91 SHA256 a54a4dd37e197d030b9d56b2954e4cd38f8a7f1b191cfe59f863b75a164d5f96
AUX subversion-1.6.2-local_library_preloading.patch 6412 RMD160 3b072c5f9d3c1f43e3be20959a24632db0c9f82c SHA1 85a3d394861a53e3919ef6fc243542af7df17b46 SHA256 50b83dd31eaf5ed577b7656dcd06e314d3acd31814089f4e3eba014a1efa442d
AUX subversion-1.6.3-kwallet_window.patch 10012 RMD160 d469e0fc8d9fd2ef8c857e5e303eeb24309e7f0d SHA1 9c99b63bc5abf54f642e447af1aa2f814cecb8ab SHA256 5304f39189bed6f83a8342593f23819cf2e12c2288c9daba23dcd78913fd79de
AUX svnserve.confd 322 RMD160 e291d91f05da848a3517aa76611c1f05527c11e4 SHA1 c07020ea270b787ddf0dbb738391e20d3c8347af SHA256 45f2dc1a718aed885559e71d98112e670c92bd6b4f19c5cf593eced6cd2bbd97
AUX svnserve.initd 818 RMD160 6a24ac0599ef46b2d1ef0ae9cde70bdc8124db68 SHA1 f3ef120b584d81124171ccaf5bafec709222d04e SHA256 4f9d38d5b32d4436dcb302f7e3c7284e67d6339b25b0f057a306b978f4a06142
AUX svnserve.xinetd 332 RMD160 c2fc4eb02da7e7405756fce650b8897f0a9da7f7 SHA1 d7d478fc257a40626888f9b12ee218df55dac570 SHA256 267f30c78ef6428aeeb97d3c64c06b9acfba4bc624766fc3c6a6d2c4133799a2
DIST subversion-1.6.16.tar.bz2 5509729 RMD160 f12d7eb31372486290e08143ec1afda029767d34 SHA1 c1a050bd8ad2444eb6729b8a7f451960711af2df SHA256 dce4897d62d0dc29ab03834ed1d66ede95c07702e32a0042f96c24c6f1213386
EBUILD subversion-java-1.6.16.ebuild 4320 RMD160 6881edfc7be1111137776e3f6bdec1f92a1787dc SHA1 f9367d41c9b2b30750594b16fa14c6e3e531d29d SHA256 d8749c52070f7c34f0ff9318728ab43b950d83faf8cece94cf8ba6a90f95c17e
MISC metadata.xml 558 RMD160 7c6fecb710b66051ab3a61a5aa50ae51da74e658 SHA1 5722fe19c5fbd79e9579b50e8ba71f952ddd3ea0 SHA256 89cee02e2d381bace416b51fdb26af91061fa0b0a62e9f20512b252461b534a0
@@ -0,0 +1,13 @@
;;; subversion site-lisp configuration
(add-to-list 'load-path "@SITELISP@")
(and (< emacs-major-version 22)
(add-to-list 'load-path "@SITELISP@/compat"))
(add-to-list 'vc-handled-backends 'SVN)
(defalias 'svn-examine 'svn-status)
(autoload 'svn-status "dsvn" "Run `svn status'." t)
(autoload 'svn-update "dsvn" "Run `svn update'." t)
(autoload 'svn-status "psvn"
"Examine the status of Subversion working copy in directory DIR." t)
@@ -0,0 +1,56 @@
--- Makefile.in
+++ Makefile.in
@@ -47,6 +47,7 @@
SVN_SASL_LIBS = @SVN_SASL_LIBS@
SVN_SERF_LIBS = @SVN_SERF_LIBS@
SVN_SQLITE_LIBS = @SVN_SQLITE_LIBS@
+SVN_XML_LIBS = -lexpat
SVN_ZLIB_LIBS = @SVN_ZLIB_LIBS@
LIBS = @LIBS@
--- build/ac-macros/aprutil.m4
+++ build/ac-macros/aprutil.m4
@@ -77,16 +77,14 @@
AC_MSG_ERROR([apu-config --prefix failed])
fi
- dnl When APR stores the dependent libs in the .la file, we don't need
- dnl --libs.
- SVN_APRUTIL_LIBS="`$apu_config --link-libtool --libs`"
+ SVN_APRUTIL_LIBS="`$apu_config --link-libtool`"
if test $? -ne 0; then
- AC_MSG_ERROR([apu-config --link-libtool --libs failed])
+ AC_MSG_ERROR([apu-config --link-libtool failed])
fi
- SVN_APRUTIL_EXPORT_LIBS="`$apu_config --link-ld --libs`"
+ SVN_APRUTIL_EXPORT_LIBS="`$apu_config --link-ld`"
if test $? -ne 0; then
- AC_MSG_ERROR([apu-config --link-ld --libs failed])
+ AC_MSG_ERROR([apu-config --link-ld failed])
fi
AC_SUBST(SVN_APRUTIL_INCLUDES)
--- build/ac-macros/apr.m4
+++ build/ac-macros/apr.m4
@@ -74,16 +74,14 @@
AC_MSG_ERROR([apr-config --prefix failed])
fi
- dnl When APR stores the dependent libs in the .la file, we don't need
- dnl --libs.
- SVN_APR_LIBS="`$apr_config --link-libtool --libs`"
+ SVN_APR_LIBS="`$apr_config --link-libtool`"
if test $? -ne 0; then
- AC_MSG_ERROR([apr-config --link-libtool --libs failed])
+ AC_MSG_ERROR([apr-config --link-libtool failed])
fi
- SVN_APR_EXPORT_LIBS="`$apr_config --link-ld --libs`"
+ SVN_APR_EXPORT_LIBS="`$apr_config --link-ld`"
if test $? -ne 0; then
- AC_MSG_ERROR([apr-config --link-ld --libs failed])
+ AC_MSG_ERROR([apr-config --link-ld failed])
fi
SVN_APR_SHLIB_PATH_VAR="`$apr_config --shlib-path-var`"
@@ -0,0 +1,165 @@
--- 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,121 @@
+#!/bin/sh
+#
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#
+
+# 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 -mindepth 2 -maxdepth 2 -name '*-test' ! -path '*/.libs/*' | sort)"
+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"
+ libtool_script_libraries=""
+ 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
@@ -0,0 +1,298 @@
https://svn.collab.net/viewvc/svn?view=revision&revision=38004
https://svn.collab.net/viewvc/svn?view=revision&revision=38014
https://svn.collab.net/viewvc/svn?view=revision&revision=38028
https://svn.collab.net/viewvc/svn?view=revision&revision=38122
--- subversion/libsvn_auth_kwallet/kwallet.cpp
+++ subversion/libsvn_auth_kwallet/kwallet.cpp
@@ -22,6 +22,7 @@
/*** Includes. ***/
+#include <stdlib.h>
#include <string.h>
#include <unistd.h>
@@ -30,6 +31,9 @@
#include "svn_auth.h"
#include "svn_config.h"
#include "svn_error.h"
+#include "svn_io.h"
+#include "svn_pools.h"
+#include "svn_string.h"
#include "svn_version.h"
#include "private/svn_auth_private.h"
@@ -38,13 +42,20 @@
#include <dbus/dbus.h>
#include <QtCore/QCoreApplication>
+#include <QtCore/QList>
+#include <QtCore/QMap>
#include <QtCore/QString>
+#include <QtGui/QApplication>
+#include <QtGui/QX11Info>
#include <kaboutdata.h>
#include <kcmdlineargs.h>
#include <kcomponentdata.h>
#include <klocalizedstring.h>
#include <kwallet.h>
+#include <kwindowsystem.h>
+#include <netwm.h>
+#include <netwm_def.h>
/*-----------------------------------------------------------------------*/
@@ -52,6 +63,28 @@
/*-----------------------------------------------------------------------*/
+#define INITIALIZE_APPLICATION \
+ if (apr_hash_get(parameters, \
+ "svn:auth:qapplication-safe", \
+ APR_HASH_KEY_STRING)) \
+ { \
+ QApplication *app; \
+ if (! qApp) \
+ { \
+ int argc = 1; \
+ app = new QApplication(argc, (char *[1]) {(char *) "svn"}); \
+ } \
+ } \
+ else \
+ { \
+ QCoreApplication *app; \
+ if (! qApp) \
+ { \
+ int argc = 1; \
+ app = new QCoreApplication(argc, (char *[1]) {(char *) "svn"}); \
+ } \
+ }
+
static const char *
get_application_name(apr_hash_t *parameters,
apr_pool_t *pool)
@@ -69,8 +102,7 @@
const char *svn_application_name;
if (svn_application_name_with_pid)
{
- long pid = getpid();
- svn_application_name = apr_psprintf(pool, "Subversion [%ld]", pid);
+ svn_application_name = apr_psprintf(pool, "Subversion [%ld]", long(getpid()));
}
else
{
@@ -102,9 +134,108 @@
}
}
+static pid_t
+get_parent_pid(pid_t pid,
+ apr_pool_t *pool)
+{
+ pid_t parent_pid = 0;
+
+#ifdef __linux__
+ svn_stream_t *stat_file_stream;
+ svn_string_t *stat_file_string;
+ const char *preceeding_space, *following_space, *parent_pid_string;
+
+ const char *path = apr_psprintf(pool, "/proc/%ld/stat", long(pid));
+ svn_error_t *err = svn_stream_open_readonly(&stat_file_stream, path, pool, pool);
+ if (err == SVN_NO_ERROR)
+ {
+ err = svn_string_from_stream(&stat_file_string, stat_file_stream, pool, pool);
+ if (err == SVN_NO_ERROR)
+ {
+ if ((preceeding_space = strchr(stat_file_string->data, ' ')))
+ {
+ if ((preceeding_space = strchr(preceeding_space + 1, ' ')))
+ {
+ if ((preceeding_space = strchr(preceeding_space + 1, ' ')))
+ {
+ if ((following_space = strchr(preceeding_space + 1, ' ')))
+ {
+ parent_pid_string = apr_pstrndup(pool,
+ preceeding_space + 1,
+ following_space - preceeding_space);
+ parent_pid = atol(parent_pid_string);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (err)
+ {
+ svn_error_clear(err);
+ }
+#endif
+
+ return parent_pid;
+}
+
+static WId
+get_wid(apr_hash_t *parameters,
+ apr_pool_t *pool)
+{
+ WId wid = 1;
+
+ if (apr_hash_get(parameters,
+ "svn:auth:qapplication-safe",
+ APR_HASH_KEY_STRING))
+ {
+ QMap<pid_t, WId> process_info_list;
+ QList<WId> windows(KWindowSystem::windows());
+ QList<WId>::const_iterator i;
+ for (i = windows.begin(); i != windows.end(); i++)
+ {
+ process_info_list[NETWinInfo(QX11Info::display(),
+ *i,
+ QX11Info::appRootWindow(),
+ NET::WMPid).pid()] = *i;
+ }
+
+ apr_pool_t *iterpool = svn_pool_create(pool);
+ pid_t pid = getpid();
+ while (pid != 0)
+ {
+ svn_pool_clear(iterpool);
+ if (process_info_list.contains(pid))
+ {
+ wid = process_info_list[pid];
+ break;
+ }
+ pid = get_parent_pid(pid, iterpool);
+ }
+ svn_pool_destroy(iterpool);
+ }
+
+ if (wid == 1)
+ {
+ const char *wid_env_string = getenv("WINDOWID");
+ if (wid_env_string)
+ {
+ long wid_env = atol(wid_env_string);
+ if (wid_env != 0)
+ {
+ wid = wid_env;
+ }
+ }
+ }
+
+ return wid;
+}
+
static KWallet::Wallet *
get_wallet(QString wallet_name,
- apr_hash_t *parameters)
+ apr_hash_t *parameters,
+ apr_pool_t *pool)
{
KWallet::Wallet *wallet =
static_cast<KWallet::Wallet *> (apr_hash_get(parameters,
@@ -115,7 +246,7 @@
APR_HASH_KEY_STRING))
{
wallet = KWallet::Wallet::openWallet(wallet_name,
- -1,
+ pool ? get_wid(parameters, pool) : 1,
KWallet::Wallet::Synchronous);
}
if (wallet)
@@ -141,7 +272,7 @@
apr_hash_t *parameters = static_cast<apr_hash_t *> (data);
if (apr_hash_get(parameters, "kwallet-initialized", APR_HASH_KEY_STRING))
{
- KWallet::Wallet *wallet = get_wallet(NULL, parameters);
+ KWallet::Wallet *wallet = get_wallet(NULL, parameters, NULL);
delete wallet;
apr_hash_set(parameters,
"kwallet-initialized",
@@ -172,12 +303,7 @@
return FALSE;
}
- QCoreApplication *app;
- if (! qApp)
- {
- int argc = 1;
- app = new QCoreApplication(argc, (char *[1]) {(char *) "svn"});
- }
+ INITIALIZE_APPLICATION
KCmdLineArgs::init(1,
(char *[1]) {(char *) "svn"},
@@ -195,7 +321,7 @@
QString::fromUtf8(username) + "@" + QString::fromUtf8(realmstring);
if (! KWallet::Wallet::keyDoesNotExist(wallet_name, folder, key))
{
- KWallet::Wallet *wallet = get_wallet(wallet_name, parameters);
+ KWallet::Wallet *wallet = get_wallet(wallet_name, parameters, pool);
if (wallet)
{
apr_hash_set(parameters,
@@ -242,12 +368,7 @@
return FALSE;
}
- QCoreApplication *app;
- if (! qApp)
- {
- int argc = 1;
- app = new QCoreApplication(argc, (char *[1]) {(char *) "svn"});
- }
+ INITIALIZE_APPLICATION
KCmdLineArgs::init(1,
(char *[1]) {(char *) "svn"},
@@ -262,7 +383,7 @@
QString q_password = QString::fromUtf8(password);
QString wallet_name = get_wallet_name(parameters);
QString folder = QString::fromUtf8("Subversion");
- KWallet::Wallet *wallet = get_wallet(wallet_name, parameters);
+ KWallet::Wallet *wallet = get_wallet(wallet_name, parameters, pool);
if (wallet)
{
apr_hash_set(parameters,
--- subversion/svn/main.c
+++ subversion/svn/main.c
@@ -2067,6 +2067,9 @@
pool)))
svn_handle_error2(err, stderr, TRUE, "svn: ");
+ /* svn can safely create instance of QApplication class. */
+ svn_auth_set_parameter(ab, "svn:auth:qapplication-safe", "1");
+
ctx->auth_baton = ab;
/* Set up conflict resolution callback. */
--- subversion/svnsync/main.c
+++ subversion/svnsync/main.c
@@ -1,6 +1,6 @@
/*
* ====================================================================
- * Copyright (c) 2005-2008 CollabNet. All rights reserved.
+ * Copyright (c) 2005-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
@@ -2362,7 +2362,15 @@
check_cancel, NULL,
pool);
if (! err)
- err = (*subcommand->cmd_func)(os, &opt_baton, pool);
+ {
+ /* svnsync can safely create instance of QApplication class. */
+ svn_auth_set_parameter(opt_baton.source_auth_baton,
+ "svn:auth:qapplication-safe", "1");
+ svn_auth_set_parameter(opt_baton.sync_auth_baton,
+ "svn:auth:qapplication-safe", "1");
+
+ err = (*subcommand->cmd_func)(os, &opt_baton, pool);
+ }
if (err)
{
/* For argument-related problems, suggest using the 'help'
@@ -0,0 +1,10 @@
# The commented variables in this file are the defaults that are used
# in the init-script. You don't need to uncomment them except to
# customize them to different values.
# Options for svnserve
#SVNSERVE_OPTS="--root=/var/svn"
# User and group as which to run svnserve
#SVNSERVE_USER="svn"
#SVNSERVE_GROUP="svnusers"
@@ -0,0 +1,26 @@
#!/sbin/runscript
# Copyright 2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /var/cvsroot/gentoo-x86/dev-vcs/subversion/files/svnserve.initd,v 1.1 2010/06/22 18:17:21 arfrever Exp $
depend() {
need net
}
start() {
ebegin "Starting svnserve"
# Ensure that we run from a readable working dir, and that we do not
# lock filesystems when being run from such a location.
cd /
start-stop-daemon --start --quiet --background --make-pidfile \
--pidfile /var/run/svnserve.pid --exec /usr/bin/svnserve \
--chuid ${SVNSERVE_USER:-apache}:${SVNSERVE_GROUP:-apache} -- \
--foreground --daemon ${SVNSERVE_OPTS:---root=/var/svn}
eend $?
}
stop() {
ebegin "Stopping svnserve"
start-stop-daemon --stop --quiet --pidfile /var/run/svnserve.pid
eend $?
}
@@ -0,0 +1,14 @@
service svn
{
socket_type = stream
wait = no
user = apache
group = apache
umask = 002
protocol = tcp
log_on_failure += USERID HOST
port = 3690
server = /usr/bin/svnserve
server_args = -i
disable = yes
}
+14
View File
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>no-herd</herd>
<maintainer>
<email>arfrever@gentoo.org</email>
<name>Arfrever Frehtes Taifersar Arahesis</name>
<description>Gentoo Subversion maintainer and Subversion upstream representative</description>
</maintainer>
<maintainer>
<email>poczta-sn@gazeta.pl</email>
<description>Maintainer for split subversion-java ebuild. Please send bugs about this one only here.</description>
</maintainer>
</pkgmetadata>
@@ -0,0 +1,183 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
WANT_AUTOMAKE="none"
# note: java-pkg-2, not java-pkt-opt-2
inherit autotools eutils flag-o-matic java-pkg-2 libtool multilib
DESCRIPTION="Java bindings for Subversion"
HOMEPAGE="http://subversion.apache.org/"
MY_SVN_PN="subversion"
MY_SVN_P="${MY_SVN_PN}-${PV}"
MY_SVN_PF="${MY_SVN_PN}-${PVR}"
MY_SVN_CATEGORY="${CATEGORY}"
SRC_URI="http://subversion.tigris.org/downloads/${MY_SVN_P}.tar.bz2"
LICENSE="Subversion"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE="debug doc nls test"
RDEPEND=">=virtual/jre-1.5"
DEPEND=">=virtual/jdk-1.5
test? ( dev-java/junit:4 )
~dev-vcs/subversion-${PV}"
S="${WORKDIR}/${MY_SVN_P/_/-}"
print() {
local blue color green normal red
if [[ "${NOCOLOR:-false}" =~ ^(false|no)$ ]]; then
red=$'\e[1;31m'
green=$'\e[1;32m'
blue=$'\e[1;34m'
normal=$'\e[0m'
fi
while (($#)); do
case "$1" in
--red)
color="${red}"
;;
--green)
color="${green}"
;;
--blue)
color="${blue}"
;;
--)
shift
break
;;
-*)
die "${FUNCNAME}(): Unrecognized option '$1'"
;;
*)
break
;;
esac
shift
done
echo " ${green}*${normal} ${color}$@${normal}"
}
pkg_setup() {
java-pkg-2_pkg_setup
if use debug; then
append-cppflags -DSVN_DEBUG -DAP_DEBUG
fi
if use test; then
if ! has_version "=${CATEGORY}/${PF}" || \
! has_version "~${MY_SVN_CATEGORY}/${MY_SVN_P}"; then
die "${CATEGORY}/${PF} and ${MY_SVN_CATEGORY}/${MY_SVN_P} must be installed"
fi
fi
}
src_prepare() {
epatch "${FILESDIR}/${MY_SVN_PN}-1.6.0-disable_linking_against_unneeded_libraries.patch"
epatch "${FILESDIR}/${MY_SVN_PN}-1.6.2-local_library_preloading.patch"
epatch "${FILESDIR}/${MY_SVN_PN}-1.6.3-kwallet_window.patch"
chmod +x build/transform_libtool_scripts.sh || die "chmod failed"
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
sed -e "/SWIG_PY_INCLUDES=/s/\$ac_cv_python_includes/\\\\\$(PYTHON_INCLUDES)/" -i build/ac-macros/swig.m4 || die "sed failed"
eautoconf
elibtoolize
sed -e "s/libsvn_swig_py-1\.la/libsvn_swig_py-\$(PYTHON_VERSION)-1.la/" -i build-outputs.mk || die "sed failed"
}
src_configure() {
local myconf
if use test; then
myconf+=" --with-junit=${EPREFIX}/usr/share/junit-4/lib/junit.jar"
else
myconf+=" --without-junit"
fi
econf --libdir="${EPREFIX}/usr/$(get_libdir)" \
--without-apxs \
--without-berkeley-db \
--without-ctypesgen \
--disable-runtime-module-search \
--without-gnome-keyring \
--enable-javahl \
--with-jdk="${JAVA_HOME}" \
--without-kwallet \
$(use_enable nls) \
--without-sasl \
--without-neon \
--without-serf \
${myconf} \
--with-apr="${EPREFIX}/usr/bin/apr-1-config" \
--with-apr-util="${EPREFIX}/usr/bin/apu-1-config" \
--disable-experimental-libtool \
--without-jikes \
--enable-local-library-preloading \
--disable-mod-activation \
--disable-neon-version-check \
--with-sqlite="${EPREFIX}/usr"
}
src_compile() {
print
print "Building of Subversion JavaHL library"
print
emake -j1 JAVAC_FLAGS="$(java-pkg_javac-args) -encoding iso8859-1" javahl || die "Building of Subversion JavaHL library failed"
if use doc; then
print
print "Building of Subversion JavaHL library HTML documentation"
print
emake doc-javahl || die "Building of Subversion JavaHL library HTML documentation failed"
fi
}
src_test() {
local test_failed
print
print --blue "Testing of Subversion JavaHL library"
print
time emake check-javahl || test_failed="1"
if [[ -n "${test_failed}" ]]; then
ewarn
ewarn "\e[1;31mTest failed\e[0m"
ewarn
fi
}
src_install() {
print
print "Installation of Subversion JavaHL library"
print
emake -j1 DESTDIR="${D}" install-javahl || die "Installation of Subversion JavaHL library failed"
java-pkg_regso "${ED}"usr/$(get_libdir)/libsvnjavahl*.so
java-pkg_dojar "${ED}"usr/$(get_libdir)/svn-javahl/svn-javahl.jar
rm -fr "${ED}"usr/$(get_libdir)/svn-javahl/*.jar
rm -fr "${ED}usr/share/${MY_SVN_PN}" # to be sure mv command below executes properly
mv "${ED}usr/share/${PN}" "${ED}usr/share/${MY_SVN_PN}"
if use doc; then
java-pkg_dojavadoc doc/javadoc
fi
}