Gentoo Archives: gentoo-commits

From: "Andreas K. Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-electronics/gnucap/
Date: Thu, 17 Jan 2019 22:31:21
Message-Id: 1547764266.d3f7717cea9bd0f240d8fa1a086652bb02c486d7.dilfridge@gentoo
1 commit: d3f7717cea9bd0f240d8fa1a086652bb02c486d7
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jan 17 22:30:43 2019 +0000
4 Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Thu Jan 17 22:31:06 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d3f7717c
7
8 sci-electronics/gnucap: EAPI bump
9
10 Package-Manager: Portage-2.3.56, Repoman-2.3.12
11 Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
12
13 .../gnucap/gnucap-0.35.20091207-r1.ebuild | 82 ++++++++++++++++++++++
14 1 file changed, 82 insertions(+)
15
16 diff --git a/sci-electronics/gnucap/gnucap-0.35.20091207-r1.ebuild b/sci-electronics/gnucap/gnucap-0.35.20091207-r1.ebuild
17 new file mode 100644
18 index 00000000000..e3064c93b3f
19 --- /dev/null
20 +++ b/sci-electronics/gnucap/gnucap-0.35.20091207-r1.ebuild
21 @@ -0,0 +1,82 @@
22 +# Copyright 1999-2019 Gentoo Authors
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=7
26 +
27 +inherit multilib toolchain-funcs flag-o-matic
28 +
29 +SNAPSHOTDATE="${P##*.}"
30 +MY_PV="${PN}-${SNAPSHOTDATE:0:4}-${SNAPSHOTDATE:4:2}-${SNAPSHOTDATE:6:2}"
31 +
32 +DESCRIPTION="GNUCap is the GNU Circuit Analysis Package"
33 +SRC_URI="http://www.gnucap.org/devel/${MY_PV}.tar.gz
34 + http://www.gnucap.org/devel/${MY_PV}-models-bsim.tar.gz
35 + http://www.gnucap.org/devel/${MY_PV}-models-jspice3-2.5.tar.gz
36 + http://www.gnucap.org/devel/${MY_PV}-models-ngspice17.tar.gz
37 + http://www.gnucap.org/devel/${MY_PV}-models-spice3f5.tar.gz"
38 +HOMEPAGE="http://www.gnucap.org/"
39 +
40 +IUSE="examples"
41 +SLOT="0"
42 +LICENSE="GPL-2"
43 +KEYWORDS="~amd64 ~ppc ~x86"
44 +
45 +DEPEND=""
46 +RDEPEND=""
47 +
48 +S="${WORKDIR}/${MY_PV}"
49 +
50 +src_prepare() {
51 + # No need to install COPYING and INSTALL
52 + sed -i \
53 + -e 's: COPYING INSTALL::' \
54 + -e 's:COPYING history INSTALL:history:' \
55 + doc/Makefile.in || die
56 +
57 + if ! use examples ; then
58 + sed -i \
59 + -e 's:examples modelgen:modelgen:' \
60 + Makefile.in || die
61 + fi
62 +
63 + sed -i -e 's:CFLAGS = -O2 -g:CPPFLAGS +=:' \
64 + -e '/CCFLAGS =/i\CFLAGS += $(CPPFLAGS)' \
65 + -e 's:CCFLAGS = $(CFLAGS):CXXFLAGS += $(CPPFLAGS):' \
66 + -e 's:LDFLAGS = :LDFLAGS += :' \
67 + -e 's:CCFLAGS:CXXFLAGS:' \
68 + -e "s:../Gnucap:${S}/src:" \
69 + models-*/Make2 || die
70 +
71 + sed -i -e "s:strchr(str2, '|'):const_cast<char*>(strchr(str2, '|')):" \
72 + {src,modelgen}/ap_match.cc || die
73 +
74 + tc-export CC CXX
75 + append-cxxflags -std=gnu++98
76 +
77 + default
78 +}
79 +
80 +src_compile () {
81 + emake
82 + for PLUGIN_DIR in models-* ; do
83 + cd "${S}/${PLUGIN_DIR}"
84 + emake CC=$(tc-getCC) CCC=$(tc-getCXX)
85 + done
86 +}
87 +
88 +src_install () {
89 + emake DESTDIR="${D}" install
90 + insopts -m0755
91 + for PLUGIN_DIR in models-* ; do
92 + insinto /usr/$(get_libdir)/gnucap/${PLUGIN_DIR}
93 + cd "${S}/${PLUGIN_DIR}"
94 + for PLUGIN in */*.so ; do
95 + newins ${PLUGIN} ${PLUGIN##*/}
96 + done
97 + done
98 +}
99 +
100 +pkg_postinst() {
101 + elog "Documentation for development releases is now available at :"
102 + elog " http://wiki.gnucap.org/dokuwiki/doku.php?id=gnucap:manual"
103 +}