summaryrefslogtreecommitdiff
blob: 923075218d9ab7f5041435e85b3d3c5dc5d5073f (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
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /var/cvsroot/gentoo-x86/app-sci/magic/magic-7.1.ebuild,v 1.4 2002/07/11 06:30:18 drobbins Exp $

S=${WORKDIR}/${P}
DESCRIPTION="The VLSI design CAD tool"
SRC_URI="http://vlsi.cornell.edu/magic/magic-current.tar.gz"
HOMEPAGE="http://vlsi.cornell.edu/magic/"
LICENSE="as-is"
DEPEND=">=app-shells/tcsh-6.10-r3"
RDEPEND="readline? ( >=sys-libs/readline-4.1-r4 )"
SLOT="7"

src_unpack() {
	unpack ${DISTFILES}/magic-current.tar.gz

	# Patch to use FHS paths
	patch -p1 < ${FILESDIR}/magic-7.1-fhs.patch 

	# Insert our idea of configuration file
	cp ${FILESDIR}/defs.mak-7.1 ${S}/defs.mak
}

src_compile() {
	if [ -n "`use readline`" ] ; then
		export READLINE_LIBS="-lreadline -lcurses"
		export READLINE_DEFS="-DUSE_READLINE -DHAVE_READLINE"
	fi

	emake || die

	[ -n "$READLINE_LIBS" ] && unset READLINE_LIBS
	[ -n "$READLINE_DEFS" ] && unset READLINE_DEFS
}

src_install () {
	make DESTDIR=${D} install || die

	insinto /etc/env.d
	doins ${FILESDIR}/10magic
}