summaryrefslogtreecommitdiff
blob: d5dd029b2c0076e8841ea54df782e1c3ecde0765 (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
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sci-electronics/netgen/netgen-1.3.11.ebuild,v 1.1 2013/05/15 08:19:23 xmw Exp $

EAPI=4

inherit eutils multilib

DESCRIPTION="LVS tool (layout versus schematic comparison)"
HOMEPAGE="http://www.opencircuitdesign.com/netgen/index.html"
SRC_URI="http://www.opencircuitdesign.com/${PN}/archive/${P}.tgz"

LICENSE="GPL-1"
SLOT="0"
KEYWORDS="~amd64"
IUSE="X"

DEPEND="X? (
		dev-lang/tcl
		dev-lang/tk
		x11-libs/libX11 )"
RDEPEND="${DEPEND}"

src_prepare() {
	epatch "${FILESDIR}"/${PN}-1.3.10-tcl-bin-name.patch

	if $(use X) ; then
		cp -r "${S}" "${WORKDIR}"/with-x || die
	fi
}

src_configure() {
	cd scripts
	econf --without-x

	if $(use X) ; then
		cd "${WORKDIR}"/with-x/scripts || die
		econf --with-x
	fi
}

src_compile() {
	emake

	if $(use X) ; then
		cd "${WORKDIR}"/with-x || die
		emake
	fi
}

src_install() {
	dodir /usr/$(get_libdir)/${PN}
	emake DESTDIR="${D}" DOCDIR=/usr/share/doc/${PF} install

	if $(use X) ; then
		cd "${WORKDIR}"/with-x || die
		emake DESTDIR="${D}" DOCDIR=/usr/share/doc/${PF} install
	fi

	dodoc Changes README TO_DO
}