summaryrefslogtreecommitdiff
blob: 005b6e1b874e5b8972f3b3fe53011cb596636aef (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
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-gfx/skencil/skencil-0.6.18_pre20080519-r1.ebuild,v 1.1 2008/11/21 12:32:58 hanno Exp $

EAPI=2

inherit python multilib eutils

IUSE="nls"
S=${WORKDIR}/${PN}-0.6
DESCRIPTION="Interactive X11 vector drawing program"
SRC_URI="mirror://gentoo/${P}.tar.bz2"
HOMEPAGE="http://www.skencil.org/"
DEPEND="dev-lang/python[tk]
	>=dev-python/imaging-1.1.2-r1
	dev-python/reportlab
	dev-lang/tk
	nls? ( sys-devel/gettext )"
RDEPEND="!elibc_glibc? ( nls? ( sys-devel/gettext ) )
	dev-python/pyxml"
SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"

src_unpack() {
	unpack ${A}
	cd "${S}"
	epatch "${FILESDIR}/skencil-configure-without-nls.diff"
	epatch "${FILESDIR}/skencil-0.6.17-setup.py.patch"

	# Fix hardcoded libdir
	sed -i -e "s:lib/:$(get_libdir)/:" \
		-e "s:lib':$(get_libdir)':" \
		"${S}"/{Pax,Filter,Sketch/Modules}/Makefile.pre.in \
		"${S}"/Plugins/Objects/Lib/multilinetext/{TextEditor,styletext}.py \
		"${S}"/setup.py || die "sed failed"
}

src_compile() {
	./setup.py configure `use_with nls` || die
	BLDSHARED='gcc -shared' ./setup.py build || die
}

src_install () {
	./setup.py install --prefix=/usr --dest-dir="${D}"
	assert "setup.py install failed"

	newdoc Pax/README README.pax
	newdoc Filter/README README.filter
	dodoc Examples Doc Misc
	dodoc README INSTALL BUGS CREDITS TODO PROJECTS FAQ NEWS
}