summaryrefslogtreecommitdiff
blob: d9a4b1405f9943b0b119f415c4b5b736d7a5b099 (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
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils python

DESCRIPTION="Object-oriented python bindings for subversion"
HOMEPAGE="http://pysvn.tigris.org/"
SRC_URI="http://pysvn.tigris.org/files/documents/1233/34994/${P}.tar.gz"

LICENSE="Apache-1.1"
SLOT="0"
KEYWORDS="~x86 ~ppc ~amd64"
IUSE="doc"

DEPEND=">=dev-util/subversion-1.2.0"
RDEPEND="${DEPEND}"

S="${WORKDIR}/${P}/Source"

src_unpack() {
	unpack ${A}
	cd "${S}"

	# no kerberos linkage
	epatch "${FILESDIR}/${P}-nokrb.patch"
	
	python setup.py configure

	# we want our CFLAGS as well and don't need krb linkage
	sed -e 's:^\(CCFLAGS=\)\(.*\):\1$(CFLAGS) \2:g' \
		-e 's:^\(CCCFLAGS=\)\(.*\):\1$(CXXFLAGS) \2:g' \
		-i ${S}/Source/Makefile
}

src_install() {
	python_version

	cd pysvn
	exeinto /usr/lib/python${PYVER}/site-packages/pysvn
	doexe _pysvn.so
	insinto /usr/lib/python${PYVER}/site-packages/pysvn
	doins __init__.py

	if use doc ; then
		cd "${S}/../Docs"
		dohtml *.html *.js
	fi

}

pkg_postinst() {
	python_mod_compile ${ROOT}usr/lib/python${PYVER}/site-packages
}

pkg_postrm() {
	python_mod_cleanup
}