summaryrefslogtreecommitdiff
blob: 1a6b542100d57fa037a337eb11b2917848df661d (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
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-util/ecletex/ecletex-0.0.3.ebuild,v 1.2 2004/08/23 00:15:49 mr_bones_ Exp $

DESCRIPTION="LaTeX plugin for Eclipse 3.0 and newer"
HOMEPAGE="http://etex.sf.net"
SRC_URI="mirror://sourceforge/etex/${PN}.${PV}.zip"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~x86 ~ppc"
IUSE=""
DEPEND=">=virtual/jdk-1.4
	=dev-util/eclipse-sdk-3.0*"

src_unpack() {
	mkdir -p ${S}
	cd ${S}
	unpack ${A}

	cd plugins/ish.ecletex_${PV}

	rm ecletex.jar ecletexsrc.zip

	ln -s /usr/lib/eclipse-3/plugins ext
	echo "temp.folder=dist" > build.properties || die "Failed to create build.propertes"

	cp ${FILESDIR}/build.xml-${PV} build.xml || die "Failed to add build.xml"
}

src_compile() {
	cd plugins/ish.ecletex_${PV}

	ant build.jars || die "Failed to build main plugin"
	ant ecletexsrc.zip || die "Failed to build source .zip"
}

src_install() {
	cd plugins/ish.ecletex_${PV}

	local etexdir="/usr/lib/eclipse-3/plugins/ish.ecletex_${PV}"
	dodir ${etexdir}

	insinto ${etexdir}
	doins ecletexsrc.zip || die "Failed to install source"
	doins ecletex.jar || die "Failed to install main plugin"
	doins plugin.xml || die "Failed to install plugin.xml"

	for x in codeassist dictionary icons templates ; do
		cp -dpR $x ${D}/${etexdir}/ || die "Failed to install directory $x"
	done
}