1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
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"
18 KEYWORDS="~amd64 ~x86"
19 IUSE="examples schematics waveform"
21 DEPEND="x11-libs/wxGTK:2.8[X]
22 sci-electronics/electronics-menu"
24 || ( sci-electronics/ng-spice-rework sci-electronics/gnucap )
25 waveform? ( sci-electronics/gwave )
26 schematics? ( sci-electronics/geda )"
28 S="${WORKDIR}/${MY_P}"
31 # Removing pre-configured CXXFLAGS from Makefile. The Makefile then only appends
32 # the flags required for wxwidgets to the Gentoo preset.
34 -e "s:CXXFLAGS = -O -pipe:CXXFLAGS += :" \
35 src/Makefile || die "Patching src/Makefile failed"
37 # Adjusting the doc path at src/main/HelpTasks.cpp
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"
45 dobin bin/gspiceui || die
46 dodoc ChangeLog || die
47 doman gspiceui.1 || die
48 newicon src/icons/gspiceui-48x48.xpm gspiceui.xpm || die
50 dohtml html/*.html html/*.jpeg || die
53 if use examples ; then
54 insinto /usr/share/doc/${P}/sch
58 make_desktop_entry gspiceui "GNU Spice GUI" gspiceui.xpm "Electronics"
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."