summaryrefslogtreecommitdiff
blob: d20f817e5d83abb4b1c18f1469c9c90cea244dbb (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
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sci-electronics/linsmith/linsmith-0.99.12.ebuild,v 1.1 2010/09/08 17:50:27 tomjbe Exp $

EAPI="2"

inherit eutils autotools

DESCRIPTION="Smith charting program, mainly designed for educational use."
HOMEPAGE="http://www.jcoppens.com/soft/linsmith/index.en.php"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"

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

RDEPEND="x11-libs/gtk+:2
	dev-libs/libxml2
	dev-libs/glib:2
	dev-libs/atk
	gnome-base/libgnome
	gnome-base/libgnomecanvas
	gnome-base/libgnomeprint
	gnome-base/libgnomeui"
DEPEND="${RDEPEND}
	dev-util/pkgconfig"

src_prepare() {
	# 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 \
		"${FILESDIR}"/${PV}-configure.in.patch

	einfo "Regenerating autotools files..."
	eautoreconf
}

src_install() {
	# Delete this file, otherwise it is installed with the pixmaps.
	rm pixmaps/Makefile.am~

	emake DESTDIR="${D}" install || die "emake install failed"

	insinto "/usr/share/${PN}"
	doins datafiles/conv0809 || die

	dodoc AUTHORS ChangeLog NEWS NOTES README THANKS TODO || die
	doman doc/linsmith.1 || die

	domenu linsmith.desktop || die
	doicon linsmith_icon.xpm || die

	if use doc; then
		insinto "/usr/share/doc/${PF}"
		doins doc/manual.pdf || die
	fi

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