blob: 19089636f4c6593ddb759a23a25fb2e70423a71f (
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
66
67
68
69
70
71
72
73
74
75
|
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sci-electronics/gnucap/gnucap-0.35.20070221.ebuild,v 1.4 2008/06/29 08:15:52 tove Exp $
inherit multilib
SNAPSHOTDATE="${P##*.}"
SNAPSHOT_DATE="${SNAPSHOTDATE:0:4}-${SNAPSHOTDATE:4:2}-${SNAPSHOTDATE:6:2}"
DESCRIPTION="GNUCap is the GNU Circuit Analysis Package"
SRC_URI="http://www.gnucap.org/devel/${PN}-${SNAPSHOT_DATE}.tar.gz
http://www.gnucap.org/devel/${PN}-${SNAPSHOT_DATE}-bsim-models.tar.gz
http://www.gnucap.org/devel/${PN}-${SNAPSHOT_DATE}-ngspice17-models.tar.gz
http://www.gnucap.org/devel/${PN}-${SNAPSHOT_DATE}-spice3f5-models.tar.gz"
HOMEPAGE="http://www.gnucap.org/"
IUSE="doc examples"
SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~amd64 ~ppc ~sparc ~x86"
DEPEND="doc? ( virtual/latex-base )"
S="${WORKDIR}/${PN}-${SNAPSHOT_DATE}"
src_unpack() {
unpack ${A} || die "Failed to unpack!"
cd "${S}"
# No need to install COPYING and INSTALL
sed -i \
-e 's: COPYING INSTALL::' \
-e 's:COPYING history INSTALL:history:' \
doc/Makefile.in || die "sed failed"
if ! use doc ; then
sed -i \
-e 's:SUBDIRS = doc examples man:SUBDIRS = doc examples:' \
Makefile.in || die "sed failed"
fi
if ! use examples ; then
sed -i \
-e 's:SUBDIRS = doc examples:SUBDIRS = doc:' \
Makefile.in || die "sed failed"
fi
mv ../plugins .
sed -i -e "s:CFLAGS = -O2 -g:CFLAGS +=:" \
-e "s:CCFLAGS = \$(CFLAGS):CCFLAGS += \$(CFLAGS):" \
plugins/*/Make2
}
src_compile () {
econf --disable-dependency-tracking || die "Configuration failed"
emake || die "Compilation failed"
cd "${S}"/plugins
for PLUGIN_DIR in * ; do
cd "${S}"/plugins/${PLUGIN_DIR}
emake || die "Compilation failed"
done
}
src_install () {
emake DESTDIR="${D}" install || die "Installation failed"
insopts -m0755
cd "${S}"/plugins
for PLUGIN_DIR in * ; do
insinto /usr/$(get_libdir)/gnucap/${PLUGIN_DIR}
cd "${S}"/plugins/${PLUGIN_DIR}
for PLUGIN in */*.so ; do
newins ${PLUGIN} ${PLUGIN##*/}
done
done
}
|