summaryrefslogtreecommitdiff
blob: 5a418dd32ea14f47482e62c6a446f582248f7dd0 (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
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/www-apps/lxr/lxr-0.3.1.ebuild,v 1.4 2006/02/13 15:16:11 mcummings Exp $

inherit webapp

S=${WORKDIR}/${P%.?}

DESCRIPTION="A general purpose source code indexer and cross-referencer that provides web-based browsing of source code with links to the definition and usage of any identifier."
HOMEPAGE="http://sourceforge.net/projects/lxr"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"

LICENSE="GPL-2"
KEYWORDS="~x86 ppc"

RESTRICT="nomirror"
IUSE=""

# Glimpse is actually optional, but since there is no USE flag, require it
RDEPEND="app-misc/glimpse
	     dev-lang/perl
		 >=virtual/perl-DB_File-1.807"
DEPEND=${RDEPEND}

src_compile() {
	einfo "Nothing to compile"
}

src_install() {
	# prepare ${D} for our arrival
	webapp_src_preinst

	# Install documentation
	dodoc COPYING INSTALL README

	# Makefile macros
	PERLBIN=`which perl`
	INSTALLPREFIX=${D}/usr

	# Install
	#
	# first we do it LXR's way ...
	make install INSTALLPREFIX=${INSTALLPREFIX} PERLBIN=${PERLBIN}

	# and now we do it our way
	cp -R ${INSTALLPREFIX}/http/* ${D}${MY_HTDOCSDIR}
	rm -rf ${INSTALLPREFIX}/http
	rm -rf ${INSTALLPREFIX}/source

	# Identify the configuration files that this app uses
	webapp_configfile ${MY_HTDOCSDIR}/lxr.conf

	# Identify any script files that need #! headers adding to run under
	# a CGI script (such as PHP/CGI)
	for x in find ident search diff source; do
		webapp_runbycgibin perl ${MY_HTDOCSDIR}/$x
	done

	# Add the post-installation instructions
	webapp_postinst_txt en INSTALL

	# Fix perms on genxref
	fperms o+rx /usr/bin/genxref

	# Let webapp.eclass do the rest
	webapp_src_install
}