summaryrefslogtreecommitdiff
blob: ef954e12faeb80a676c401be26ec8cf4d20be926 (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
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sci-electronics/irsim/irsim-9.7.79.ebuild,v 1.2 2013/02/02 01:18:32 mr_bones_ Exp $

EAPI=4

inherit eutils multilib

DESCRIPTION="IRSIM is a \"switch-level\" simulator"
HOMEPAGE="http://opencircuitdesign.com/irsim/"
SRC_URI="http://opencircuitdesign.com/irsim/archive/${P}.tgz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

RDEPEND="dev-lang/tcl
	dev-lang/tk"
DEPEND="${RDEPEND}
	app-shells/tcsh"

src_prepare() {
	epatch "${FILESDIR}"/${PN}-9.7.72-ldflags.patch
	epatch "${FILESDIR}"/${PN}-9.7.79-datadir.patch
	sed -e "s:/usr/bin/:${EPREFIX}/usr/bin/:" \
		-e "s:/usr/local/lib/:${EPREFIX}/usr/$(get_libdir)/:" \
		-i tcltk/irsim.sh \
		-i tcltk/irsim.tcl || die
}

src_configure() {
	# Short-circuit top-level configure script to retain CFLAGS
	cd scripts
	#tc-export CPP
	econf
}

src_install() {
	emake DESTDIR="${D}" DOCDIR=/usr/share/doc/${PF} install
	dodoc README
}

pkg_postinst() {
	einfo
	einfo "You will probably need to add to your ~/.Xdefaults"
	einfo "the following line:"
	einfo "irsim.background: black"
	einfo
	einfo "This is needed because Gentoo from default sets a"
	einfo "grey background which makes impossible to see the"
	einfo "simulation (white line on light gray background)."
	einfo
}