summaryrefslogtreecommitdiff
blob: 15b8d61960e8b45512dfd7de455959f28dc9ac67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-vcs/rapidsvn/rapidsvn-0.12.0.ebuild,v 1.5 2012/01/31 16:20:08 jlec Exp $

EAPI=4

WANT_AUTOCONF="2.5"
WX_GTK_VER=2.8

AUTOTOOLS_AUTORECONF=true

inherit autotools-utils fdo-mime flag-o-matic libtool versionator wxwidgets

MY_PV=$(get_version_component_range 1-2)
MY_REL="1"

DESCRIPTION="Cross-platform GUI front-end for the Subversion revision system"
HOMEPAGE="http://rapidsvn.tigris.org/"
SRC_URI="http://www.rapidsvn.org/download/release/${MY_PV}/${P}-${MY_REL}.tar.gz"

LICENSE="GPL-2 LGPL-2.1 FDL-1.2"
SLOT="0"
KEYWORDS="amd64 ppc ppc64 ~sparc x86 ~amd64-linux ~x86-linux"
IUSE="doc static-libs"

COMMON_DEP="
	dev-libs/apr
	dev-libs/apr-util
	|| (
		dev-vcs/subversion[webdav-neon]
		dev-vcs/subversion[webdav-serf] )
	x11-libs/wxGTK:2.8[X]"
DEPEND="${COMMON_DEP}
	doc? (
		dev-libs/libxslt
		app-text/docbook-sgml-utils
		app-doc/doxygen
		app-text/docbook-xsl-stylesheets )"
RDEPEND="${COMMON_DEP}"

S="${WORKDIR}/${P}-${MY_REL}"

PATCHES=( "${FILESDIR}/${PN}-svncpp_link.patch" )
AUTOTOOLS_IN_SOURCE_BUILD=1
DOCS=( HACKING.txt TRANSLATIONS )

pkg_setup() {
	wxwidgets_pkg_setup
}

src_configure() {
	local myeconfargs=( --with-wx-config=${WX_CONFIG} )

	if use doc; then
		myeconfargs+=( --with-manpage=yes )
	else
		myeconfargs+=(
				--without-xsltproc
				--with-manpage=no
				--without-doxygen
				--without-dot )
	fi

	append-flags $( "${EPREFIX}"/usr/bin/apr-1-config --cppflags )

	myeconfargs+=(
		--with-svn-lib="${EPREFIX}"/usr/$(get_libdir)
		--with-svn-include="${EPREFIX}"/usr/include
		--with-apr-config="${EPREFIX}/usr/bin/apr-1-config"
		--with-apu-config="${EPREFIX}/usr/bin/apu-1-config"
		)
	autotools-utils_src_configure
}

src_install() {
	autotools-utils_src_install

	doicon src/res/rapidsvn.ico
	make_desktop_entry rapidsvn "RapidSVN ${PV}" \
		"${EPREFIX}/usr/share/pixmaps/rapidsvn.ico" \
		"RevisionControl;Development"

	if use doc ; then
		dohtml "${S}"/doc/svncpp/html/*
	fi
}

pkg_postinst() {
	fdo-mime_desktop_database_update
}

pkg_postrm() {
	fdo-mime_desktop_database_update
}