aboutsummaryrefslogtreecommitdiff
blob: d4ccb5b7c6b1d013e777f6e281fd8a9ddb75073a (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
67
68
69
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils

DESCRIPTION="linSmith is a Smith Charting program, mainly designed for
educational use."
HOMEPAGE="http://jcoppens.com/soft/linsmith/index.en.php"

SRC_URI="mirror://sourceforge/linsmith/${P}.tar.gz"

LICENSE="GPL-2 LGPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE="doc"

DEPEND=">=gnome-base/libgnomeprint-2.10.3
		>=dev-libs/libxml2-2.6.20-r2
		>=gnome-base/libgnomeui-2.10.1"
RDEPEND=""

src_unpack() {
	unpack ${A}

	cd ${S}
	
	# This patch is to prevent make install copying
	# the examples in /usr/share/linsmith
	# Now they are cp to the correct location.
	epatch ${FILESDIR}/${PN}-datafiles.patch
	
	einfo "Regenerating autotools files..."
	WANT_AUTOMAKE=1.8 automake || die "automake failed"
}

src_compile() {
	econf || die "econf failed"
	emake || die "emake failed"
}

src_install() {
	cd ${S}
	
	# Delete this file, otherwise it is installed with the pixmaps.
	rm pixmaps/Makefile.am~
	
	make DESTDIR=${D} install || die "make install failed"
	
	insinto "/usr/share/${PN}/"
	doins datafiles/conv0809
	
	dodoc AUTHORS NEWS README ChangeLog TODO
	doman doc/linsmith.1
	
	insinto "/usr/share/applications/"
	doins linsmith.desktop
	insinto "/usr/share/pixmaps/${PN}/"
	doins linsmith_icon.xpm

	if use doc; then
		insinto "/usr/share/doc/${PF}/"
		doins doc/manual.pdf 
	fi
	
	insinto "/usr/share/doc/${PF}/examples"
	doins datafiles/*.circ datafiles/*.load 
	
}