blob: 5b3542c3c6966e83794b5e5d52e4f42050fb8b14 (
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-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-util/visualvm/visualvm-1.3.3-r2.ebuild,v 1.1 2012/05/01 09:01:07 sera Exp $
EAPI="4"
inherit eutils autotools
VISUALVM_PKG="visualvm_harness-1.3"
VISUALVM_TARBALL="visualvm_133-src.tar.gz"
NETBEANS_PROFILER_TARBALL="netbeans-profiler-visualvm_release701.tar.gz"
DESCRIPTION="Integrates commandline JDK tools and profiling capabilites."
HOMEPAGE="http://icedtea.classpath.org"
SRC_URI="
http://icedtea.classpath.org/download/visualvm/${VISUALVM_PKG}.tar.gz
http://icedtea.classpath.org/download/visualvm/${VISUALVM_TARBALL}
http://icedtea.classpath.org/download/visualvm/${NETBEANS_PROFILER_TARBALL}"
LICENSE="GPL-2-with-linking-exception"
SLOT="6"
KEYWORDS="~amd64"
IUSE=""
COMMON_DEP="
dev-java/icedtea:${SLOT}
dev-java/netbeans-harness:7.1
dev-java/netbeans-platform:7.1"
RDEPEND="${COMMON_DEP}"
DEPEND="${COMMON_DEP}
dev-java/ant-core
dev-java/ant-nodeps"
S="${WORKDIR}/${VISUALVM_PKG}"
src_unpack() {
unpack ${VISUALVM_PKG}.tar.gz
}
src_prepare() {
epatch "${FILESDIR}"/netbeans-platform-version.patch
eautoreconf
unset JAVA_HOME JDK_HOME CLASSPATH JAVAC JAVACFLAGS
export ANT_RESPECT_JAVA_HOME=TRUE
export ANT_TASKS=ant-nodeps
}
src_configure() {
local vmhome
vmhome=$(get_vmhome) || die
econf NB_PLATFORM=platform \
--bindir="${vmhome}"/bin \
--libdir="${vmhome}"/lib \
--sysconfdir="${vmhome}"/lib/visualvm/etc \
--with-netbeans-profiler-zip="${DISTDIR}"/${NETBEANS_PROFILER_TARBALL} \
--with-visualvm-zip="${DISTDIR}"/${VISUALVM_TARBALL} \
--with-visualvm-version=${PV} \
--with-netbeans-home="${EPREFIX}"/usr/share/netbeans-nb-7.1 \
--with-jdk-home="${vmhome}"
}
src_install() {
emake DESTDIR="${D}" install
# Don't install default .desktop, file collision.
local vmhome
vmhome=$(get_vmhome) || die
rm -r "${ED}"/usr/share || die
make_desktop_entry "${vmhome}/bin/jvisualvm" "OpenJDK ${SLOT} VisualVM" "java" "Development;Java;"
}
get_vmhome() {
local vmhandle=icedtea-${SLOT}
has_version "<=dev-java/icedtea-6.1.10.4:6" && vmhandle=icedtea6
local vmhome
vmhome="$(GENTOO_VM=${vmhandle} java-config -O)" || return 1
echo "${vmhome}"
}
|