summaryrefslogtreecommitdiff
blob: 226ee2ad77667ec68388879b3aa28a84e23fe0f7 (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
77
78
79
80
81
82
83
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-util/eclipse-sdk/eclipse-sdk-3.0_rc8.ebuild,v 1.3 2004/04/20 19:00:48 humpback Exp $

inherit eutils

DESCRIPTION="Eclipse Tools Platform"
HOMEPAGE="http://www.eclipse.org/"
SRC_URI="http://download2.eclipse.org/downloads/drops/S-3.0M8-200403261517/eclipse-sourceBuild-srcIncluded-3.0M8.zip"
LICENSE="CPL-1.0"
SLOT="0"
KEYWORDS="~x86"

IUSE="gtk2 motif gnome kde"

DEPEND="${RDEPEND}
	>=virtual/jdk-1.3
	>=dev-java/ant-1.4"

RDEPEND="${DEPEND}
	gtk2? ( >=x11-libs/gtk+-2.2.4-r1 )
	motif? ( >=x11-libs/openmotif-2.1.30-r4 ) "



src_unpack() {
	if [ `use gtk2` ] && [ `use motif` ];
	then
		ewarn ""
		einfo "This package cannot be built with gtk2 and motif in USE"
		einfo "Please use only one"
		einfo "you can type USE=\"-motif gtk2\" emerge ${P}.ebuild"
		ewarn ""
		sleep 5
		die
	elif [ ! `use gtk2` ] && [ ! `use motif` ];
	then
		ewarn ""
		einfo "This package needs either gtk2 or motif in USE vars"
		einfo "But never both"
		ewarn ""
		sleep 5
		die
	else
		mkdir ${S}
		cd ${S}
		unpack ${A}
	fi
}

src_compile() {
	if [ `use gtk2` ];
	then
		./build -os linux -ws gtk -arch x86 -target clean
		./build -os linux -ws gtk -arch x86 -target compile
		./build -os linux -ws gtk -arch x86 -target install
	elif [ `use motif` ];
	then
		./build -os linux -ws motif -arch x86 -target clean
		./build -os linux -ws motif -arch x86 -target compile
		./build -os linux -ws motif -arch x86 -target install
	fi
}

src_install() {
	dodir /opt/${P}
	cp -dpR tmp/eclipse/plugins ${D}/opt/${P}
	cp -dpR tmp/eclipse/features ${D}/opt/${P}
	if [ `use gtk2` ];
	then
		cp -dpR tmp/eclipse/linux.gtk.x86/eclipse/* ${D}/opt/${P}
	elif [ `use motif` ];
	then
		cp -dpR tmp/eclipse/linux.motif.x86/eclipse/* ${D}/opt/${P}
	fi
	if use gnome || use kde;
	then
		make_desktop_entry eclipse "Eclipse IDE" /opt/${P}/icon.xpm Development /opt/${P}
	fi
	dodir /etc/env.d
	#the ${FILESDIR}/20eclipse-3.0m7 can be the same in m8
	sed s/eclipse-sdk-3.0/${P}/ < ${FILESDIR}/20eclipse-3.0m7 > ${D}/etc/env.d/20eclipse-3.0m8
}