summaryrefslogtreecommitdiff
blob: 42e0493dfbc0b9f60d0adb99e3acf1738d9436a5 (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-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/pyside-tools/pyside-tools-0.2.13.ebuild,v 1.2 2011/12/21 17:59:43 floppym Exp $

EAPI=3

PYTHON_DEPEND="2:2.5"

inherit python cmake-utils virtualx

DESCRIPTION="PySide development tools"
HOMEPAGE="http://www.pyside.org/"
SRC_URI="http://www.pyside.org/files/${P}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="debug test"

RDEPEND=">=dev-python/pyside-1.0.6
	>=x11-libs/qt-core-4.7.0
	>=x11-libs/qt-gui-4.7.0"
DEPEND="${DEPEND}
	test? ( >=x11-libs/qt-test-4.7.0 )"

DOCS=( AUTHORS ChangeLog )

pkg_setup() {
	python_set_active_version 2
}

src_prepare() {
	sed -e 's#pyside-rcc4#PATH=$PATH:${WORKDIR}/${P}_build/pyrcc pyside-rcc#' \
		-i tests/rcc/run_test.sh \
		|| die "sed failed"

	python_convert_shebangs -r 2 pyside-uic
}

src_configure() {
	local mycmakeargs=(
		$(cmake-utils_use_build test TESTS)
	)
	cmake-utils_src_configure
}

src_test() {
	VIRTUALX_COMMAND="cmake-utils_src_test"
	virtualmake
}

pkg_postinst() {
	python_mod_optimize pysideuic
}

pkg_postrm() {
	python_mod_cleanup pysideuic
}