summaryrefslogtreecommitdiff
blob: 02b331f3b80d40f41e44ddad172eb1dcc83def3a (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
76
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-util/sourcenav/sourcenav-5.2_beta2.ebuild,v 1.7 2006/05/07 20:23:08 nerdboy Exp $

inherit eutils toolchain-funcs

IUSE="debug"

MY_P="5.2b2"
S=${WORKDIR}/sourcenav-${MY_P}
SB=${WORKDIR}/snbuild
SN="/opt/sourcenav"

DESCRIPTION="Source-Navigator is a source code analysis and software development tool"
SRC_URI="mirror://sourceforge/sourcenav/sourcenav-${MY_P}.tar.gz"
HOMEPAGE="http://sourcenav.sourceforge.net"

SLOT="0"
LICENSE="GPL-2 LGPL-2"
KEYWORDS="~x86 ~sparc ~ppc ~amd64"

RDEPEND="|| (
	    ( x11-libs/libXmu
	    x11-libs/libXext
	    x11-libs/libXp
	    x11-libs/libX11
	    x11-libs/libXt
	    x11-libs/libSM
	    x11-libs/libICE
	    x11-libs/libXpm
	    x11-libs/libXaw )
	virtual/x11
	)"
DEPEND="${RDEPEND}
	|| (
	    ( x11-proto/xproto x11-proto/xextproto )
	        virtual/x11
	)"

src_unpack() {
	unpack ${A}
#	mkdir ${SB} || die "mkdir build failed"
	cd ${S}
	epatch ${FILESDIR}/sourcenav_destdir.patch || die "epatch failed"
	sed -i -e "s/relid'/relid/" tcl/unix/configure
	sed -i -e "s/relid'/relid/" tk/unix/configure
	# Bug 131412
	if [ $(gcc-major-version) -ge 4 ]; then
	    epatch ${FILESDIR}/${P}-gcc4.patch || die "gcc4 patch failed"
	fi
}

src_compile() {
	cd ${S}
	./configure ${MY_CONF} \
		--host=${CHOST} \
		--prefix=${SN} \
		--bindir=${SN}/bin \
		--sbindir=${SN}/sbin \
		--exec-prefix=${SN} \
		--mandir=${SN}/share/man \
		--infodir=${SN}/share/info \
		--datadir=${SN}/share \
		$(use_enable debug symbols) || die "configure failed"

	make all || die "make failed"
}

src_install() {
	cd ${SB}
	make DESTDIR=${D} install || die "install failed"

	chmod -Rf 755 ${D}/${SN}/share/doc/${P}/demos
	dodir /etc/env.d
	echo "PATH=${SN}/bin" > ${D}/etc/env.d/10snavigator
}