app-misc/golly: Drop old
[gentoo.git] / dev-vcs / rapidsvn / rapidsvn-0.12.1-r1.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 PYTHON_COMPAT=( python2_7 )
8
9 WX_GTK_VER=2.8
10
11 AUTOTOOLS_AUTORECONF=true
12
13 inherit autotools-utils fdo-mime flag-o-matic multilib python-single-r1 versionator wxwidgets
14
15 MY_PV=$(get_version_component_range 1-2)
16 MY_REL="1"
17
18 DESCRIPTION="Cross-platform GUI front-end for the Subversion revision system"
19 HOMEPAGE="http://rapidsvn.tigris.org/"
20 SRC_URI="
21         http://www.rapidsvn.org/download/release/${PV}/${P}.tar.gz
22         doc? ( https://dev.gentoo.org/~jlec/distfiles/svncpp.dox.xz )"
23
24 LICENSE="GPL-2 LGPL-2.1 FDL-1.2"
25 SLOT="0"
26 KEYWORDS="amd64 arm ppc ppc64 x86 ~amd64-linux ~x86-linux"
27 IUSE="doc static-libs"
28
29 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
30
31 COMMON_DEP="
32         ${PYTHON_DEPS}
33         dev-libs/apr
34         dev-libs/apr-util
35         dev-vcs/subversion
36         x11-libs/wxGTK:${WX_GTK_VER}[X]"
37 DEPEND="${COMMON_DEP}
38         doc? (
39                 dev-libs/libxslt
40                 app-text/docbook-sgml-utils
41                 app-doc/doxygen
42                 app-text/docbook-xsl-stylesheets
43                 media-gfx/graphviz
44 )"
45 RDEPEND="${COMMON_DEP}"
46
47 PATCHES=(
48         "${FILESDIR}/${P}-svncpp_link.patch"
49         "${FILESDIR}/${P}-locale.patch" )
50
51 AUTOTOOLS_IN_SOURCE_BUILD=1
52
53 DOCS=( HACKING.txt TRANSLATIONS )
54
55 src_prepare() {
56         if use doc; then
57                 mv "${WORKDIR}"/svncpp.dox doc/svncpp/ || die
58         fi
59         strip-linguas $(grep ^RAPIDSVN_LANGUAGES src/locale/Makefile.am | sed 's:RAPIDSVN_LANGUAGES=::g')
60         sed \
61                 -e "/^RAPIDSVN_LANGUAGES/s:=.*:=${LINGUAS}:g" \
62                 -i src/locale/Makefile.am || die
63         autotools-utils_src_prepare
64 }
65
66 src_configure() {
67         local myeconfargs=( --with-wx-config=${WX_CONFIG} )
68
69         if use doc; then
70                 myeconfargs+=( --with-manpage=yes )
71         else
72                 myeconfargs+=(
73                                 --without-xsltproc
74                                 --with-manpage=no
75                                 --without-doxygen
76                                 --without-dot )
77         fi
78
79         append-cppflags $( apr-1-config --cppflags )
80
81         myeconfargs+=(
82                 --with-svn-lib="${EPREFIX}"/usr/$(get_libdir)
83                 --with-svn-include="${EPREFIX}"/usr/include
84                 --with-apr-config="${EPREFIX}/usr/bin/apr-1-config"
85                 --with-apu-config="${EPREFIX}/usr/bin/apu-1-config"
86                 )
87         autotools-utils_src_configure
88 }
89
90 src_compile() {
91         autotools-utils_src_compile
92         use doc && autotools-utils_src_compile -C doc/manpage manpage
93 }
94
95 src_install() {
96         autotools-utils_src_install
97
98         doicon src/res/rapidsvn.ico src/res/bitmaps/${PN}*.png
99         make_desktop_entry rapidsvn "RapidSVN ${PV}" \
100                 "${EPREFIX}/usr/share/pixmaps/rapidsvn_32x32.png" \
101                 "RevisionControl;Development"
102
103         if use doc ; then
104                 doman doc/manpage/${PN}.1
105                 dohtml "${S}"/doc/svncpp/html/*
106         fi
107 }
108
109 src_test() {
110         pushd "${BUILD_DIR}"/src/tests/svncpp > /dev/null || die
111         emake
112         ./svncpptest | grep OK || die
113 }
114
115 pkg_postinst() {
116         fdo-mime_desktop_database_update
117 }
118
119 pkg_postrm() {
120         fdo-mime_desktop_database_update
121 }