]> Pileus Git - ~andy/sunrise/blob - sci-electronics/gspiceui/gspiceui-0.9.98.ebuild
sci-electronics/gspiceui: Version bump, plus conversion to EAPI 2 and more improvemen...
[~andy/sunrise] / sci-electronics / gspiceui / gspiceui-0.9.98.ebuild
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="2"
6
7 WX_GTK_VER="2.8"
8 inherit wxwidgets
9
10 MY_P="${PN}-v${PV}"
11
12 DESCRIPTION="GUI frontend for Ngspice and Gnucap"
13 HOMEPAGE="http://www.geda.seul.org/tools/gspiceui/"
14 SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
15
16 LICENSE="GPL-2"
17 SLOT="0"
18 KEYWORDS="~amd64 ~x86"
19 IUSE="examples schematics waveform"
20
21 DEPEND="x11-libs/wxGTK:2.8[X]
22         sci-electronics/electronics-menu"
23 RDEPEND="${DEPEND}
24         || ( sci-electronics/ng-spice-rework sci-electronics/gnucap )
25         waveform? ( sci-electronics/gwave )
26         schematics? ( sci-electronics/geda )"
27
28 S="${WORKDIR}/${MY_P}"
29
30 src_prepare() {
31         # Removing pre-configured CXXFLAGS from Makefile. The Makefile then only appends 
32         # the flags required for wxwidgets to the Gentoo preset.
33         sed -i \
34                 -e "s:CXXFLAGS = -O -pipe:CXXFLAGS += :" \
35                 src/Makefile || die "Patching src/Makefile failed"
36
37         # Adjusting the doc path at src/main/HelpTasks.cpp
38         sed -i \
39                 -e "s:/share/gspiceui/html/gSpiceUI.html:/share/doc/${P}/html/gSpiceUI.html:" \
40                 src/main/HelpTasks.cpp \
41                 || die "Patching src/main/HelpTasks.cpp failed"
42 }
43
44 src_install() {
45         dobin bin/gspiceui || die
46         dodoc ChangeLog || die
47         doman gspiceui.1 || die
48         newicon src/icons/gspiceui-48x48.xpm gspiceui.xpm || die
49
50         dohtml html/*.html html/*.jpeg || die
51
52         # installing examples
53         if use examples ; then
54                 insinto /usr/share/doc/${P}/sch
55                 doins -r sch/* || die
56         fi
57
58         make_desktop_entry gspiceui "GNU Spice GUI" gspiceui.xpm "Electronics"
59 }
60
61 pkg_postinst() {
62         if use examples ; then
63                 elog "If you want to use the examples, copy then from"
64                 elog "/usr/share/doc/${P}/sch to your home to be able"
65                 elog "to generate the netlists as an normal user."
66         fi
67 }