dev-ros/tf2_bullet: Bump to 0.6.5.
[gentoo.git] / dev-util / visualvm / visualvm-1.4.1.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 NBV=90
7 NBT=24042018
8 NBZ=nb${NBV}_${PN}_${NBT}.zip
9
10 inherit java-pkg-2 java-ant-2
11
12 DESCRIPTION="Integrates commandline JDK tools and profiling capabilities"
13 HOMEPAGE="https://visualvm.github.io"
14
15 # Netbeans plattform is already included in the main archive this time
16 #    SRC_URI="https://github.com/oracle/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
17 #       https://github.com/oracle/${PN}/releases/download/${PV}/${NBZ}"
18 SRC_URI="https://github.com/oracle/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
19
20 LICENSE="GPL-2-with-linking-exception"
21 SLOT="7"
22 KEYWORDS="~amd64"
23
24 RDEPEND="
25         >=virtual/jre-1.7"
26
27 DEPEND="
28         >=virtual/jdk-1.7"
29
30 S="${WORKDIR}/${P}/${PN}"
31
32 EANT_BUILD_TARGET=build
33 INSTALL_DIR=/usr/share/${PN}
34
35 src_unpack() {
36         unpack ${P}.tar.gz
37         cd "${S}" || die
38         # unpack ${NBZ}
39         unpack "${S}"/"${NBZ}"  # archive is included in the main archive
40 }
41
42 src_prepare() {
43         default
44
45         # Remove unneeded binaries
46         rm -rv netbeans/platform/lib/*.{dll,exe} \
47                 netbeans/platform/modules/lib/{amd64/*.dll,i386,x86} || die
48         find netbeans/profiler/lib/deployed/jdk1? -mindepth 1 \
49                 -maxdepth 1 ! -name linux-amd64 -exec rm -rv {} + || die
50 }
51
52 src_install() {
53         # this is the visualvm cluster
54         insinto ${INSTALL_DIR}
55         doins -r build/cluster netbeans/{platform,profiler}
56
57         # configuration file that can be used to tweak visualvm startup parameters
58         insinto /etc/${PN}
59         newins "${FILESDIR}"/${PN}-r1.conf ${PN}.conf
60
61         # visualvm runtime script
62         newbin "${FILESDIR}"/${PN}-r1.sh ${PN}
63
64         # makes visualvm entry
65         make_desktop_entry ${PN} VisualVM java "Development;Java;"
66 }