sci-electronics/gspiceui: Port to EAPI 7

Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: David Seifert <soap@gentoo.org>
This commit is contained in:
David Seifert
2021-04-04 23:10:56 +02:00
parent c399e67229
commit 95f69fd4ee
2 changed files with 32 additions and 22 deletions

View File

@@ -1,5 +1,5 @@
--- src/Makefile.old 2015-07-03 18:06:15.000000000 +0200
+++ src/Makefile 2015-07-03 18:08:50.000000000 +0200
--- a/src/Makefile
+++ b/src/Makefile
@@ -69,13 +69,7 @@
# -Ofast Optimize till it hurts : "-O3" + enable opts not valid for all standard-compliants
# -Os Optimize for size

View File

@@ -1,34 +1,42 @@
# Copyright 1999-2015 Gentoo Foundation
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
EAPI=7
WX_GTK_VER="3.0"
inherit eutils flag-o-matic toolchain-funcs wxwidgets
inherit desktop flag-o-matic toolchain-funcs wxwidgets
MY_P="${PN}-v${PV}0"
DESCRIPTION="GUI frontend for Ngspice and Gnucap"
HOMEPAGE="https://sourceforge.net/projects/gspiceui/"
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
S="${WORKDIR}/${MY_P}"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="examples schematics waveform"
DEPEND="x11-libs/wxGTK:3.0[X]
DEPEND="
x11-libs/wxGTK:${WX_GTK_VER}[X]
sci-electronics/electronics-menu"
RDEPEND="${DEPEND}
|| ( sci-electronics/ngspice sci-electronics/gnucap )
RDEPEND="
${DEPEND}
|| (
sci-electronics/ngspice
sci-electronics/gnucap
)
waveform? ( sci-electronics/gwave )
schematics? ( sci-electronics/geda )"
S="${WORKDIR}/${MY_P}"
PATCHES=(
# Use Gentoo LDFLAGS and CXXFLAGS
"${FILESDIR}"/${P}-flags.patch
)
src_prepare() {
# Use Gentoo LDFLAGS and CXXFLAGS
epatch "${FILESDIR}/${P}-flags.patch"
default
# Adjusting the doc path at src/main/HelpTasks.cpp
sed -i -e \
@@ -37,38 +45,40 @@ src_prepare() {
# Adjusting call to gwave program
sed -i -e "s/gwave2/gwave/g" src/TypeDefs.hpp || die
}
src_configure() {
setup-wxwidgets
# bug 553968
replace-flags -O? -O1
default
}
src_compile() {
emake CXX=$(tc-getCXX)
emake CXX="$(tc-getCXX)"
}
src_install() {
dobin bin/gspiceui
HTML_DOCS=( html/*.html html/*.jpg html/*.png )
einstalldocs
dodoc ChangeLog ReadMe ToDo release-notes-v1.1.00.txt
doman gspiceui.1
newicon src/icons/gspiceui-48x48.xpm gspiceui.xpm
dohtml html/*.html html/*.jpg html/*.png
# installing examples and according model and symbol files
if use examples ; then
insinto /usr/share/doc/${PF}/sch
doins -r sch/*
insinto /usr/share/doc/${PF}/lib
doins -r lib/*
fi
use examples && dodoc -r lib sch
newicon src/icons/gspiceui-48x48.xpm gspiceui.xpm
make_desktop_entry gspiceui "GNU Spice GUI" gspiceui "Electronics"
}
pkg_postinst() {
if use examples ; then
elog "If you want to use the examples, copy and extract from"
elog "/usr/share/doc/${PF} the sch and lib directory"
elog "${EROOT}/usr/share/doc/${PF} the sch and lib directory"
elog "side by side to your home directory to be able"
elog "to generate the netlists as normal user."
fi