summaryrefslogtreecommitdiff
blob: 8ec1abf19f358c6f4778d98464df5a643c064d7d (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
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/PyQt/PyQt-3.8.1.ebuild,v 1.13 2005/02/08 05:46:02 eradicator Exp $

inherit distutils eutils

S="${WORKDIR}/PyQt-x11-gpl-${PV}"

DESCRIPTION="set of Python bindings for the QT 3.x Toolkit"
HOMEPAGE="http://www.riverbankcomputing.co.uk/pyqt/"
SRC_URI="mirror://gentoo/PyQt-x11-gpl-${PV}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86 ppc sparc alpha"
IUSE=""

PV_MAJOR=${PV/.*/}
PV_MINOR=${PV#${PV_MAJOR}.}
PV_MINOR=${PV_MINOR/.*}

RDEPEND="virtual/libc
	x11-libs/qt
	dev-lang/python
	=dev-python/sip-${PV_MAJOR}.${PV_MINOR}*
	>=dev-python/qscintilla-1.53"

DEPEND="${RDEPEND}
	sys-devel/libtool"

src_unpack() {
	unpack PyQt-x11-gpl-${PV}.tar.gz
	cd ${S}
	epatch $FILESDIR/license-${PV}.diff
}

src_compile() {
	distutils_python_version

	# fix qt-3.3 compile problem
	if has_version '=x11-libs/qt-3.3*' ; then
		epatch "${FILESDIR}/${P}-qt-3.3.patch"
	fi

	# standard qt sandbox problem workaround
	[ -d "$QTDIR/etc/settings" ] && addwrite "$QTDIR/etc/settings"
	dodir /usr/lib/python${PYVER}/site-packages
	dodir /usr/include/python${PYVER}
	python build.py \
		-d ${D}/usr/lib/python${PYVER}/site-packages \
		-e /usr/include/python${PYVER} \
		-b ${D}/usr/bin \
		-l qt-mt -c
}

src_install() {
	make || die
	distutils_python_version
	dodir /usr/lib/python${PYVER}/site-packages
	make DESTDIR=${D} install || die
	dodoc README.Linux NEWS LICENSE README ChangeLog THANKS
	dodir /usr/share/doc/${P}/
	# I found out this location from the redhat rpm
	insinto /usr/share/sip/qt
	doins ${S}/sip/*
}