summaryrefslogtreecommitdiff
path: root/dev-util
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2015-06-29 08:00:15 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2015-06-29 08:00:15 +0300
commit1cbcbc8695ca457a09bb3153681dfd7e7a2e30b4 (patch)
treedda383cb7a3b3962d7eaa4bad9d9a07c9a298260 /dev-util
parent5fd8b3d4940f544f405e586f68b48ea7e569984f (diff)
boost from gentoo (version bump)
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/boost-build/boost-build-1.58.0.ebuild139
-rw-r--r--dev-util/boost-build/files/boost-build-1.48.0-disable_python_rpath.patch11
-rw-r--r--dev-util/boost-build/files/boost-build-1.48.0-support_dots_in_python-buildid.patch19
-rw-r--r--dev-util/boost-build/files/boost-build-1.49.0-darwin-gentoo-toolchain.patch26
-rw-r--r--dev-util/boost-build/files/boost-build-1.50.0-fix-test.patch11
-rw-r--r--dev-util/boost-build/files/boost-build-1.50.0-respect-c_ld-flags.patch53
-rw-r--r--dev-util/boost-build/files/boost-build-1.52.0-darwin-no-python-framework.patch17
-rw-r--r--dev-util/boost-build/files/boost-build-1.54.0-fix-test.patch11
-rw-r--r--dev-util/boost-build/files/boost-build-1.54.0-support_dots_in_python-buildid.patch19
-rw-r--r--dev-util/boost-build/files/boost-build-1.55.0-ppc-aix.patch13
-rw-r--r--dev-util/boost-build/files/site-config.jam11
l---------dev-util/subversion/files1
-rw-r--r--dev-util/subversion/subversion-9999.ebuild420
13 files changed, 330 insertions, 421 deletions
diff --git a/dev-util/boost-build/boost-build-1.58.0.ebuild b/dev-util/boost-build/boost-build-1.58.0.ebuild
new file mode 100644
index 0000000..37ee3a9
--- /dev/null
+++ b/dev-util/boost-build/boost-build-1.58.0.ebuild
@@ -0,0 +1,139 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/boost-build/boost-build-1.57.0.ebuild,v 1.3 2015/03/10 21:01:36 vapier Exp $
+
+EAPI="5"
+
+RESTRICT="test"
+
+PYTHON_COMPAT=( python2_7 )
+inherit eutils flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV="$(replace_all_version_separators _)"
+
+DESCRIPTION="A system for large project software construction, which is simple to use and powerful"
+HOMEPAGE="http://www.boost.org/doc/tools/build/index.html"
+SRC_URI="mirror://sourceforge/boost/boost_${MY_PV}.tar.bz2"
+
+LICENSE="Boost-1.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="examples python test"
+
+RDEPEND="python? ( ${PYTHON_DEPS} )
+ !<dev-libs/boost-1.34.0
+ !<=dev-util/boost-build-1.35.0-r1"
+DEPEND="${RDEPEND}
+ test? ( sys-apps/diffutils
+ ${PYTHON_DEPS} )"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )
+ test? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/boost_${MY_PV}/tools/build/src"
+
+pkg_setup() {
+ if use python || use test; then
+ python-single-r1_pkg_setup
+ fi
+}
+
+src_unpack() {
+ tar xjpf "${DISTDIR}/${A}" boost_${MY_PV}/tools/build || die "unpacking tar failed"
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${PN}-1.48.0-disable_python_rpath.patch" \
+ "${FILESDIR}/${PN}-1.50.0-respect-c_ld-flags.patch" \
+ "${FILESDIR}/${PN}-1.49.0-darwin-gentoo-toolchain.patch" \
+ "${FILESDIR}/${PN}-1.52.0-darwin-no-python-framework.patch" \
+ "${FILESDIR}/${PN}-1.54.0-support_dots_in_python-buildid.patch" \
+ "${FILESDIR}/${PN}-1.55.0-ppc-aix.patch"
+
+ pushd ../ &>/dev/null || die
+ epatch "${FILESDIR}/${PN}-1.54.0-fix-test.patch"
+ popd &>/dev/null || die
+
+ # Remove stripping option
+ # Fix python components build on multilib systems, bug #496446
+ cd "${S}/engine" || die
+ sed -i \
+ -e 's|-s\b||' \
+ -e "/libpython/s/lib ]/$(get_libdir) ]/" \
+ build.jam || die "sed failed"
+
+ # Force regeneration
+ rm jambase.c || die
+
+ # This patch allows us to fully control optimization
+ # and stripping flags when bjam is used as build-system
+ # We simply extend the optimization and debug-symbols feature
+ # with empty dummies called 'none'
+ cd "${S}" || die
+ sed -i \
+ -e 's/\(off speed space\)/\1 none/' \
+ -e 's/\(debug-symbols : on off\)/\1 none/' \
+ tools/builtin.jam || die "sed failed"
+
+ epatch_user
+}
+
+src_configure() {
+ if use python; then
+ # replace versions by user-selected one (TODO: fix this when slot-op
+ # deps are available to always match the best version available)
+ sed -i \
+ -e "s|2.7 2.6 2.5 2.4 2.3 2.2|${EPYTHON#python}|" \
+ engine/build.jam || die "sed failed"
+ fi
+}
+
+src_compile() {
+ cd engine || die
+
+ local toolset
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ toolset=darwin
+ else
+ # Using boost's generic toolset here, which respects CC and CFLAGS
+ toolset=cc
+ fi
+
+ CC=$(tc-getCC) ./build.sh ${toolset} -d+2 $(use_with python python "${EROOT}"/usr) || die "building bjam failed"
+}
+
+src_install() {
+ dobin engine/bin.*/{bjam,b2}
+
+ insinto /usr/share/boost-build
+ doins -r "${FILESDIR}/site-config.jam" \
+ ../boost-build.jam bootstrap.jam build-system.jam ../example/user-config.jam *.py \
+ build kernel options tools util
+
+ rm "${ED}/usr/share/boost-build/build/project.ann.py" || die "removing faulty python file failed"
+ if ! use python; then
+ find "${ED}/usr/share/boost-build" -iname "*.py" -delete || die "removing experimental python files failed"
+ fi
+
+ dodoc ../notes/{changes,hacking,release_procedure,build_dir_option,relative_source_paths}.txt
+
+ if use examples; then
+ dodoc -r ../example
+ docompress -x "/usr/share/doc/${PF}/example"
+ fi
+}
+
+src_test() {
+ cd ../test || die
+
+ export TMP="${T}"
+
+ DO_DIFF="${PREFIX}/usr/bin/diff" ${PYTHON} test_all.py
+
+ if [[ -s test_results.txt ]]; then
+ eerror "At least one test failed: $(<test_results.txt)"
+ die "tests failed"
+ fi
+}
diff --git a/dev-util/boost-build/files/boost-build-1.48.0-disable_python_rpath.patch b/dev-util/boost-build/files/boost-build-1.48.0-disable_python_rpath.patch
new file mode 100644
index 0000000..8b88b43
--- /dev/null
+++ b/dev-util/boost-build/files/boost-build-1.48.0-disable_python_rpath.patch
@@ -0,0 +1,11 @@
+--- tools/python.jam
++++ tools/python.jam
+@@ -961,7 +961,7 @@
+ # linux).
+ : $(usage-requirements)
+ <testing.launcher>$(set-PYTHONPATH)
+- <library-path>$(libraries) <dll-path>$(dll-path) <library>python.lib
++ <library-path>$(libraries) <library>python.lib
+ ;
+ }
+
diff --git a/dev-util/boost-build/files/boost-build-1.48.0-support_dots_in_python-buildid.patch b/dev-util/boost-build/files/boost-build-1.48.0-support_dots_in_python-buildid.patch
new file mode 100644
index 0000000..b3bee03
--- /dev/null
+++ b/dev-util/boost-build/files/boost-build-1.48.0-support_dots_in_python-buildid.patch
@@ -0,0 +1,19 @@
+--- tools/common.jam
++++ tools/common.jam
+@@ -759,7 +759,15 @@
+ switch $(f:G)
+ {
+ case <base> :
+- result += $(name:B) ;
++ local matched = [ MATCH "^(boost.*python)-.*" : $(name) ] ;
++ if $(matched) = boost_python || $(matched) = boost_mpi_python
++ {
++ result += $(name) ;
++ }
++ else
++ {
++ result += $(name:B) ;
++ }
+
+ case <toolset> :
+ result += [ join-tag $(f:G=) : [ toolset-tag $(name) : $(type) :
diff --git a/dev-util/boost-build/files/boost-build-1.49.0-darwin-gentoo-toolchain.patch b/dev-util/boost-build/files/boost-build-1.49.0-darwin-gentoo-toolchain.patch
new file mode 100644
index 0000000..f5d6188
--- /dev/null
+++ b/dev-util/boost-build/files/boost-build-1.49.0-darwin-gentoo-toolchain.patch
@@ -0,0 +1,26 @@
+Avoid adding all kinds of things to the toolchain's flags that within
+Gentoo (Prefix) we really shouldn't, such as sysroot, deployment target,
+arch, etc.
+
+--- tools/darwin.jam
++++ tools/darwin.jam
+@@ -227,6 +227,9 @@
+ }
+ }
+
++ # leave compiler flags etc. up to the toolchain
++ return $(version-feature) ;
++
+ if $(version-feature)
+ {
+ if $(.debug-configuration)
+@@ -387,7 +390,8 @@
+ support-ppc64 = ;
+ }
+ }
+- switch $(arch)
++ # Gentoo Prefix toolchain doesn't do multi-arch, so don't try either
++ switch $(donotaddarchpleaseXXXarch)
+ {
+ case combined :
+ {
diff --git a/dev-util/boost-build/files/boost-build-1.50.0-fix-test.patch b/dev-util/boost-build/files/boost-build-1.50.0-fix-test.patch
new file mode 100644
index 0000000..31f8db2
--- /dev/null
+++ b/dev-util/boost-build/files/boost-build-1.50.0-fix-test.patch
@@ -0,0 +1,11 @@
+--- test/startup_v2.py.orig 2012-08-19 11:48:12.020600368 +0200
++++ test/startup_v2.py 2012-08-19 11:48:28.564516623 +0200
+@@ -14,7 +14,7 @@
+ return re.match(expected,actual,re.DOTALL) != None
+
+ # Test the v1 startup behavior.
+-t = BoostBuild.Tester(match=match_re, boost_build_path='', pass_toolset=0)
++t = BoostBuild.Tester(match=match_re, boost_build_path='/invalid/location', pass_toolset=0)
+
+ t.set_tree('startup')
+
diff --git a/dev-util/boost-build/files/boost-build-1.50.0-respect-c_ld-flags.patch b/dev-util/boost-build/files/boost-build-1.50.0-respect-c_ld-flags.patch
new file mode 100644
index 0000000..f0a1561
--- /dev/null
+++ b/dev-util/boost-build/files/boost-build-1.50.0-respect-c_ld-flags.patch
@@ -0,0 +1,53 @@
+--- engine/build.jam.orig 2012-08-19 09:47:23.916383518 +0200
++++ engine/build.jam 2012-08-19 09:53:38.011554690 +0200
+@@ -3,7 +3,7 @@
+ #~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+ # Clean env vars of any "extra" empty values.
+-for local v in ARGV CC CFLAGS LIBS
++for local v in ARGV CC CFLAGS LDFLAGS LIBS
+ {
+ local values ;
+ for local x in $($(v))
+@@ -179,10 +179,10 @@
+ if ! $(CC) { CC = cc ; }
+ toolset cc $(CC) : "-o " : -D
+ : $(CFLAGS)
+- [ opt --release : -s -O ]
++ [ opt --release : ]
+ [ opt --debug : -g ]
+ -I$(--python-include) -I$(--extra-include)
+- : $(LIBS) -L$(--python-lib[1]) -l$(--python-lib[2]) ;
++ : $(LDFLAGS) $(LIBS) -L$(--python-lib[1]) -l$(--python-lib[2]) ;
+ ## Comeau C/C++ 4.x
+ toolset como como : "-o " : -D
+ : --c
+@@ -201,11 +201,11 @@
+ ## MacOSX Darwin, using GCC 2.9.x, 3.x
+ toolset darwin cc : "-o " : -D
+ :
+- [ opt --release : -Wl,-x -O3 -finline-functions ]
++ [ opt --release : -Wl,-x -finline-functions ]
+ [ opt --debug : -g -O0 -fno-inline -pg ]
+ [ opt --profile : -Wl,-x -O3 -finline-functions -g -pg ]
+ -I$(--python-include) -I$(--extra-include)
+- : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
++ : $(LDFLAGS) -L$(--python-lib[1]) -l$(--python-lib[2]) ;
+ ## GCC 2.x, 3.x, 4.x
+ toolset gcc gcc : "-o " : -D
+ : -pedantic -fno-strict-aliasing
+--- engine/build.sh.orig 2012-08-19 12:09:56.400780866 +0200
++++ engine/build.sh 2012-08-19 12:10:49.728499203 +0200
+@@ -224,9 +224,9 @@
+ cc)
+ if test -z "$CC" ; then CC=cc ; fi
+ BOOST_JAM_CC=$CC
+- BOOST_JAM_OPT_JAM="$BOOST_JAM_OPT_JAM $CFLAGS $LIBS"
+- BOOST_JAM_OPT_MKJAMBASE="$BOOST_JAM_OPT_MKJAMBASE $CFLAGS $LIBS"
+- BOOST_JAM_OPT_YYACC="$BOOST_JAM_OPT_YYACC $CFLAGS $LIBS"
++ BOOST_JAM_OPT_JAM="$BOOST_JAM_OPT_JAM $CFLAGS $LDFLAGS $LIBS"
++ BOOST_JAM_OPT_MKJAMBASE="$BOOST_JAM_OPT_MKJAMBASE $CFLAGS $LDFLAGS $LIBS"
++ BOOST_JAM_OPT_YYACC="$BOOST_JAM_OPT_YYACC $CFLAGS $LDFLAGS $LIBS"
+ ;;
+
+ qcc)
diff --git a/dev-util/boost-build/files/boost-build-1.52.0-darwin-no-python-framework.patch b/dev-util/boost-build/files/boost-build-1.52.0-darwin-no-python-framework.patch
new file mode 100644
index 0000000..08b40f3
--- /dev/null
+++ b/dev-util/boost-build/files/boost-build-1.52.0-darwin-no-python-framework.patch
@@ -0,0 +1,17 @@
+Don't look for the framework path, we build Python the UNIX way for
+Gentoo Prefix
+
+--- engine/build.jam
++++ engine/build.jam
+@@ -82,11 +82,6 @@
+ }
+ --python-lib = $(--python-lib[1]) ;
+ }
+- else if $(OS) = MACOSX
+- {
+- --python-include = [ .path $(python-location) Headers ] ;
+- --python-lib = $(python-location) Python ;
+- }
+ else
+ {
+ --python-include = ;
diff --git a/dev-util/boost-build/files/boost-build-1.54.0-fix-test.patch b/dev-util/boost-build/files/boost-build-1.54.0-fix-test.patch
new file mode 100644
index 0000000..a44afb9
--- /dev/null
+++ b/dev-util/boost-build/files/boost-build-1.54.0-fix-test.patch
@@ -0,0 +1,11 @@
+--- test/startup_v2.py.orig 2013-08-27 12:23:10.520185408 +0400
++++ test/startup_v2.py 2013-08-27 12:23:27.155186209 +0400
+@@ -50,7 +50,7 @@
+ return re.match(expected, actual, re.DOTALL) != None
+
+
+-t = BoostBuild.Tester(match=match_re, boost_build_path="", pass_toolset=0)
++t = BoostBuild.Tester(match=match_re, boost_build_path="/invalid/location", pass_toolset=0)
+ t.set_tree("startup")
+ check_for_existing_boost_build_jam(t)
+
diff --git a/dev-util/boost-build/files/boost-build-1.54.0-support_dots_in_python-buildid.patch b/dev-util/boost-build/files/boost-build-1.54.0-support_dots_in_python-buildid.patch
new file mode 100644
index 0000000..bddcdac
--- /dev/null
+++ b/dev-util/boost-build/files/boost-build-1.54.0-support_dots_in_python-buildid.patch
@@ -0,0 +1,19 @@
+--- tools/common.jam.orig 2013-08-27 12:13:56.865158748 +0400
++++ tools/common.jam 2013-08-27 12:15:08.760162210 +0400
+@@ -763,7 +763,15 @@
+ switch $(f:G)
+ {
+ case <base> :
+- result += $(name:B) ;
++ local matched = [ MATCH "^(boost.*python)-.*" : $(name) ] ;
++ if $(matched) = boost_python || $(matched) = boost_mpi_python
++ {
++ result += $(name) ;
++ }
++ else
++ {
++ result += $(name:B) ;
++ }
+
+ case <toolset> :
+ result += [ join-tag $(f:G=) : [ toolset-tag $(name) : $(type) :
diff --git a/dev-util/boost-build/files/boost-build-1.55.0-ppc-aix.patch b/dev-util/boost-build/files/boost-build-1.55.0-ppc-aix.patch
new file mode 100644
index 0000000..a521309
--- /dev/null
+++ b/dev-util/boost-build/files/boost-build-1.55.0-ppc-aix.patch
@@ -0,0 +1,13 @@
+https://svn.boost.org/trac/boost/ticket/10122
+
+--- engine/mem.h
++++ engine/mem.h
+@@ -8,6 +8,8 @@
+ #ifndef BJAM_MEM_H
+ #define BJAM_MEM_H
+
++#include "jam.h"
++
+ #ifdef OPT_BOEHM_GC
+
+ /* Use Boehm GC memory allocator. */
diff --git a/dev-util/boost-build/files/site-config.jam b/dev-util/boost-build/files/site-config.jam
new file mode 100644
index 0000000..6afe526
--- /dev/null
+++ b/dev-util/boost-build/files/site-config.jam
@@ -0,0 +1,11 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+# Define two new variants to be used when building boost (or separate boost-libs)
+# on Gentoo. The two variants make use of Gentoo-specific optimization and debug-symbols
+# values "none" which are not part of the official boost distribution.
+# DO NOT RELY ON THE FOLLOWING VARIANTS TO BE PRESENT ON OTHER OS!
+variant gentoorelease : release : <optimization>none <debug-symbols>none <runtime-link>shared ;
+variant gentoodebug : debug : <optimization>none <debug-symbols>on <runtime-link>shared ;
+
diff --git a/dev-util/subversion/files b/dev-util/subversion/files
deleted file mode 120000
index 930420e..0000000
--- a/dev-util/subversion/files
+++ /dev/null
@@ -1 +0,0 @@
-/usr/portage/dev-util/subversion/files \ No newline at end of file
diff --git a/dev-util/subversion/subversion-9999.ebuild b/dev-util/subversion/subversion-9999.ebuild
deleted file mode 100644
index decd885..0000000
--- a/dev-util/subversion/subversion-9999.ebuild
+++ /dev/null
@@ -1,420 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/subversion/subversion-1.5.4.ebuild,v 1.10 2008/11/25 14:25:32 armin76 Exp $
-
-EAPI="1"
-WANT_AUTOMAKE="none"
-
-inherit autotools bash-completion confutils depend.apache elisp-common eutils flag-o-matic java-pkg-opt-2 libtool multilib perl-module python subversion
-
-DESCRIPTION="Advanced version control system"
-HOMEPAGE="http://subversion.tigris.org/"
-SRC_URI=""
-
-ESVN_REPO_URI="http://svn.collab.net/repos/svn/trunk/"
-ESVN_STORE_DIR="${DISTDIR}/svn-src"
-ESVN_PROJECT="${PN/-svn}"
-ESVN_BOOTSTRAP="./autogen.sh"
-
-S="${WORKDIR}/${P/_/}"
-
-LICENSE="Subversion"
-SLOT=""
-KEYWORDS=""
-IUSE="apache2 berkdb debug doc +dso emacs extras java nls perl python ruby sasl vim-syntax +webdav-neon webdav-serf"
-RESTRICT="test"
-
-CDEPEND=">=dev-libs/apr-1.2.8
- >=dev-libs/apr-util-1.2.8
- dev-libs/expat
- sys-libs/zlib
- berkdb? ( =sys-libs/db-4* )
- emacs? ( virtual/emacs )
- ruby? ( >=dev-lang/ruby-1.8.2 )
- sasl? ( dev-libs/cyrus-sasl )
- webdav-neon? ( >=net-misc/neon-0.28 )
- webdav-serf? ( net-libs/serf )"
-
-RDEPEND="${CDEPEND}
- java? ( >=virtual/jre-1.5 )
- nls? ( virtual/libintl )
- perl? ( dev-perl/URI )"
-
-DEPEND="${CDEPEND}
- doc? ( app-doc/doxygen )
- java? ( >=virtual/jdk-1.5 )
- nls? ( sys-devel/gettext )
- dev-lang/swig"
-
-want_apache
-
-S="${WORKDIR}"/${P/_/-}
-
-# Allow for custom repository locations.
-# This can't be in pkg_setup because the variable needs to be available to
-# pkg_config.
-: ${SVN_REPOS_LOC:=/var/svn}
-
-pkg_setup() {
- confutils_use_depend_built_with_all berkdb dev-libs/apr-util berkdb
- java-pkg-opt-2_pkg_setup
-
- if ! use webdav-neon && ! use webdav-serf; then
- ewarn
- ewarn "WebDAV support is disabled. You need WebDAV to"
- ewarn "access repositories through the HTTP protocol."
- ewarn
- ewarn "WebDAV support needs one of the following USE flags enabled:"
- ewarn " webdav-neon webdav-serf"
- ewarn
- ewarn "You can do this by enabling one of these flags in /etc/portage/package.use:"
- ewarn " =${CATEGORY}/${PF} webdav-neon webdav-serf"
- ewarn
- ebeep
- fi
-}
-
-src_unpack() {
- subversion_src_unpack
- cd "${S}"
-
-# epatch "${FILESDIR}"/1.5.0/disable-unneeded-linking.patch
-
- sed -i \
- -e "s/\(BUILD_RULES=.*\) bdb-test\(.*\)/\1\2/g" \
- -e "s/\(BUILD_RULES=.*\) test\(.*\)/\1\2/g" configure.ac
-
- sed -e 's:@bindir@/svn-contrib:@libdir@/subversion/bin:' \
- -e 's:@bindir@/svn-tools:@libdir@/subversion/bin:' \
- -i Makefile.in
-
-# eautoconf
-# elibtoolize
-}
-
-src_compile() {
- local myconf
-
- if use python || use perl || use ruby; then
- myconf="${myconf} --with-swig"
- else
- myconf="${myconf} --without-swig"
- fi
-
- if use debug; then
- append-cppflags -DSVN_DEBUG -DAP_DEBUG
- fi
-
- append-flags -fno-strict-aliasing
-
- econf ${myconf} \
- $(use_with apache2 apxs "${APXS}") \
- $(use_with berkdb berkeley-db) \
- $(use_enable dso runtime-module-search) \
- $(use_enable java javahl) \
- $(use_with java jdk "${JAVA_HOME}") \
- $(use_enable nls) \
- $(use_with sasl) \
- $(use_with webdav-neon neon /usr) \
- $(use_with webdav-serf serf /usr) \
- --with-apr=/usr/bin/apr-1-config \
- --with-apr-util=/usr/bin/apu-1-config \
- --disable-experimental-libtool \
- --without-jikes \
- --without-junit \
- --disable-mod-activation
-
- emake local-all || die "Building of core Subversion failed"
-
- if use python; then
- emake swig-py || die "Building of Subversion Python bindings failed"
- fi
-
- if use perl; then
- emake -j1 swig-pl || die "Building of Subversion Perl bindings failed"
- fi
-
- if use ruby; then
- emake swig-rb || die "Building of Subversion Ruby bindings failed"
- fi
-
- if use java; then
- make JAVAC_FLAGS="$(java-pkg_javac-args) -encoding iso8859-1" javahl \
- || die "Building of Subversion JavaHL library failed"
- fi
-
- if use emacs; then
- 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
-
- if use extras; then
- emake contrib || die "Building of contrib failed"
- emake tools || die "Building of tools failed"
- fi
-
- if use doc; then
- doxygen doc/doxygen.conf || die "Building of Subversion HTML documentation failed"
-
- if use java; then
- emake doc-javahl || die "Building of Subversion JavaHL library HTML documentation failed"
- fi
- fi
-}
-
-src_install() {
- python_version
- PYTHON_DIR=/usr/$(get_libdir)/python${PYVER}
-
- emake -j1 DESTDIR="${D}" local-install || die "Installation of core of Subversion failed"
-
- if use python; then
- emake -j1 DESTDIR="${D}" DISTUTIL_PARAM="--prefix=${D}" LD_LIBRARY_PATH="-L${D}/usr/$(get_libdir)" install-swig-py \
- || die "Installation of Subversion Python bindings failed"
-
- # Move Python bindings.
- dodir "${PYTHON_DIR}/site-packages"
- mv "${D}"/usr/$(get_libdir)/svn-python/svn "${D}${PYTHON_DIR}/site-packages"
- mv "${D}"/usr/$(get_libdir)/svn-python/libsvn "${D}${PYTHON_DIR}/site-packages"
- rm -Rf "${D}"/usr/$(get_libdir)/svn-python
- fi
-
- if use perl; then
- emake -j1 DESTDIR="${D}" INSTALLDIRS="vendor" install-swig-pl || die "Installation of Subversion Perl bindings failed"
- fixlocalpod
- fi
-
- if use ruby; then
- emake -j1 DESTDIR="${D}" install-swig-rb || die "Installation of Subversion Ruby bindings failed"
- fi
-
- if use java; then
- emake -j1 DESTDIR="${D}" install-javahl || die "Installation of Subversion JavaHL library failed"
- java-pkg_regso "${D}"/usr/$(get_libdir)/libsvnjavahl*.so
- java-pkg_dojar "${D}"/usr/$(get_libdir)/svn-javahl/svn-javahl.jar
- rm -Rf "${D}"/usr/$(get_libdir)/svn-javahl/*.jar
- fi
-
- # Install Apache module configuration.
- if use apache2; then
- dodir "${APACHE_MODULES_CONFDIR}"
- 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>
-LoadModule authz_svn_module modules/mod_authz_svn.so
-</IfDefine>
-
-# Example configuration:
-#<Location /svn/repos>
-# DAV svn
-# SVNPath ${SVN_REPOS_LOC}/repos
-# AuthType Basic
-# AuthName "Subversion repository"
-# AuthUserFile ${SVN_REPOS_LOC}/conf/svnusers
-# Require valid-user
-#</Location>
-</IfDefine>
-EOF
- fi
-
- # Install Bash Completion, bug 43179.
- dobashcompletion tools/client-side/bash_completion subversion
- rm -f tools/client-side/bash_completion
-
- # Install hot backup script, bug 54304.
- newbin tools/backup/hot-backup.py svn-hot-backup
- rm -fr tools/backup
-
- # Install svn_load_dirs.pl.
- if use perl; then
- newbin contrib/client-side/svn_load_dirs/svn_load_dirs.pl svn-load-dirs
- fi
- rm -f contrib/client-side/svn_load_dirs/svn_load_dirs.pl
-
- # Install svnserve init-script and xinet.d snippet, bug 43245.
- newinitd "${FILESDIR}"/svnserve.initd svnserve
- if use apache2; then
- newconfd "${FILESDIR}"/svnserve.confd svnserve
- else
- newconfd "${FILESDIR}"/svnserve.confd2 svnserve
- fi
- insinto /etc/xinetd.d
- newins "${FILESDIR}"/svnserve.xinetd svnserve
-
- # Install documentation.
- dodoc CHANGES COMMITTERS README
- dohtml www/hacking.html
- dodoc tools/xslt/svnindex.{css,xsl}
- rm -fr tools/xslt
-
- # Install Vim syntax files.
- if use vim-syntax; then
- insinto /usr/share/vim/vimfiles/syntax
- doins contrib/client-side/vim/svn.vim
- fi
- rm -f contrib/client-side/vim/svn.vim
-
- # Install Emacs Lisps.
- if use emacs; then
- 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"
- fi
- rm -fr contrib/client-side/emacs
-
- # Install extra files.
- if use extras; then
- 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"
-
- find contrib tools '(' -name "*.bat" -o -name "*.in" -o -name ".libs" ')' -print0 | xargs -0 rm -fr
- rm -fr contrib/client-side/{svn-push,svnmucc}
- rm -fr tools/server-side/{svn-populate-node-origins-index,svnauthz-validate}*
- rm -fr tools/{buildbot,dev,diff,po}
-
- insinto /usr/share/${PN}
- doins -r contrib tools
- fi
-
- if use doc; then
- dohtml doc/doxygen/html/*
-
- insinto /usr/share/doc/${PF}
- doins -r notes
- ecompressdir /usr/share/doc/${PF}/notes
-
- if use java; then
- java-pkg_dojavadoc doc/javadoc
- fi
- fi
-}
-
-pkg_preinst() {
- # Compare versions of Berkeley DB, bug 122877.
- if use berkdb && [[ -f "${ROOT}usr/bin/svn" ]] ; then
- 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
- fi
- fi
-}
-
-pkg_postinst() {
- use emacs && elisp-site-regen
- use perl && perl-module_pkg_postinst
-
- elog "Subversion Server Notes"
- elog "-----------------------"
- elog
- elog "If you intend to run a server, a repository needs to be created using"
- elog "svnadmin (see man svnadmin) or the following command to create it in"
- elog "${SVN_REPOS_LOC}:"
- elog
- elog " emerge --config =${CATEGORY}/${PF}"
- elog
- elog "Subversion has multiple server types, take your pick:"
- elog
- elog " - svnserve daemon: "
- elog " 1. Edit /etc/conf.d/svnserve"
- elog " 2. Fix the repository permissions (see \"Fixing the repository permissions\")"
- elog " 3. Start daemon: /etc/init.d/svnserve start"
- elog " 4. Make persistent: rc-update add svnserve default"
- elog
- elog " - svnserve via xinetd:"
- elog " 1. Edit /etc/xinetd.d/svnserve (remove disable line)"
- elog " 2. Fix the repository permissions (see \"Fixing the repository permissions\")"
- elog " 3. Restart xinetd.d: /etc/init.d/xinetd restart"
- elog
- elog " - svn over ssh:"
- elog " 1. Fix the repository permissions (see \"Fixing the repository permissions\")"
- elog " Additionally run:"
- elog " groupadd svnusers"
- elog " chown -R root:svnusers ${SVN_REPOS_LOC}/repos"
- elog " 2. Create an svnserve wrapper in /usr/local/bin to set the umask you"
- elog " want, for example:"
- elog " #!/bin/bash"
- elog " . /etc/conf.d/svnserve"
- elog " umask 007"
- elog " exec /usr/bin/svnserve \${SVNSERVE_OPTS} \"\$@\""
- elog
-
- if use apache2; then
- elog " - http-based server:"
- elog " 1. Edit /etc/conf.d/apache2 to include both \"-D DAV\" and \"-D SVN\""
- elog " 2. Create an htpasswd file:"
- elog " htpasswd2 -m -c ${SVN_REPOS_LOC}/conf/svnusers USERNAME"
- elog " 3. Fix the repository permissions (see \"Fixing the repository permissions\")"
- elog " 4. Restart Apache: /etc/init.d/apache2 restart"
- elog
- fi
-
- elog " Fixing the repository permissions:"
- elog " chmod -Rf go-rwx ${SVN_REPOS_LOC}/conf"
- elog " chmod -Rf g-w,o-rwx ${SVN_REPOS_LOC}/repos"
- elog " chmod -Rf g+rw ${SVN_REPOS_LOC}/repos/db"
- elog " chmod -Rf g+rw ${SVN_REPOS_LOC}/repos/locks"
- elog
-
- elog "If you intend to use svn-hot-backup, you can specify the number of"
- elog "backups to keep per repository by specifying an environment variable."
- elog "If you want to keep e.g. 2 backups, do the following:"
- elog "echo '# hot-backup: Keep that many repository backups around' > /etc/env.d/80subversion"
- elog "echo 'SVN_HOTBACKUP_BACKUPS_NUMBER=2' >> /etc/env.d/80subversion"
- elog
-
- if [[ -n "${CHANGED_BDB_VERSION}" ]] ; then
- ewarn "You upgraded from an older version of Berkeley DB and may experience"
- ewarn "problems with your repository. Run the following commands as root to fix it:"
- ewarn " db4_recover -h ${SVN_REPOS_LOC}/repos"
- ewarn " chown -Rf apache:apache ${SVN_REPOS_LOC}/repos"
- fi
-}
-
-pkg_postrm() {
- use emacs && elisp-site-regen
- use perl && perl-module_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."
- echo "Delete \"${ROOT}${SVN_REPOS_LOC}/repos\" first if you're sure you want to have a clean version."
- else
- mkdir -p "${ROOT}${SVN_REPOS_LOC}/conf"
-
- einfo ">>> Populating repository directory ..."
- # Create initial repository.
- "${ROOT}usr/bin/svnadmin" create "${ROOT}${SVN_REPOS_LOC}/repos"
-
- einfo ">>> Setting repository permissions ..."
- SVNSERVE_USER="$(. "${ROOT}etc/conf.d/svnserve" ; echo "${SVNSERVE_USER}")"
- SVNSERVE_GROUP="$(. "${ROOT}etc/conf.d/svnserve" ; echo "${SVNSERVE_GROUP}")"
- if use apache2 ; then
- [[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="apache"
- [[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="apache"
- else
- [[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="svn"
- [[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="svnusers"
- enewgroup "${SVNSERVE_GROUP}"
- enewuser "${SVNSERVE_USER}" -1 -1 "${SVN_REPOS_LOC}" "${SVNSERVE_GROUP}"
- fi
- chown -Rf "${SVNSERVE_USER}:${SVNSERVE_GROUP}" "${ROOT}${SVN_REPOS_LOC}/repos"
- chmod -Rf go-rwx "${ROOT}${SVN_REPOS_LOC}/conf"
- chmod -Rf o-rwx "${ROOT}${SVN_REPOS_LOC}/repos"
- fi
-}