summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Šulc <fordfrog@gentoo.org>2021-04-09 15:04:07 +0200
committerMiroslav Šulc <fordfrog@gentoo.org>2021-04-09 15:04:28 +0200
commitcedf8a87298eee7855d92940ae00e171e5dc6a86 (patch)
tree765fd7edfbacbe1fd49d2ca79269875f99ad278c /dev-util/visualvm
parentmedia-video/mplayer: fix build with ffmpeg 4.4 (diff)
downloadgentoo-cedf8a87298eee7855d92940ae00e171e5dc6a86.tar.gz
gentoo-cedf8a87298eee7855d92940ae00e171e5dc6a86.tar.bz2
gentoo-cedf8a87298eee7855d92940ae00e171e5dc6a86.zip
dev-util/visualvm: bump to 2.0.6
Closes: https://bugs.gentoo.org/669576 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'dev-util/visualvm')
-rw-r--r--dev-util/visualvm/Manifest1
-rw-r--r--dev-util/visualvm/files/visualvm-r2.conf9
-rw-r--r--dev-util/visualvm/files/visualvm-r2.sh13
-rw-r--r--dev-util/visualvm/visualvm-2.0.6.ebuild72
4 files changed, 95 insertions, 0 deletions
diff --git a/dev-util/visualvm/Manifest b/dev-util/visualvm/Manifest
index 4d0f5918aca5..b31818acb312 100644
--- a/dev-util/visualvm/Manifest
+++ b/dev-util/visualvm/Manifest
@@ -1 +1,2 @@
DIST visualvm-1.4.1.tar.gz 56752632 BLAKE2B cd171a48a0a9af440c27f2968ce27c5f89af3769046258629ba384ebbfc1c2ecb9847678af9d69bea5847fe1098e9039f35d350fb6f5d112e9236a6510c52bc7 SHA512 de8cf37e619e15c3a30c5116d49becddc09b54062aa22709e412892cf78e3048777116a8388dc6f63609d11bfb6fe37176fe48f5e3263a4dbce8439df676ef15
+DIST visualvm-2.0.6.tar.gz 39086223 BLAKE2B f5657d4ccc0063281226b4d70c35820c78333db5574bae5acadc321938cfe42a3e0e4c1752badcc3e01b5694f6081213f5da898f5a13587d44e36d18fbd5c2c7 SHA512 03ad628f753e31f26217366d8f5f184f4657ba55badd55f1466dbf00cda61e9c320cc8ddb82b228863b9c6416aec3e94a01c5429e2b2f4664c9daaccd02f5d7b
diff --git a/dev-util/visualvm/files/visualvm-r2.conf b/dev-util/visualvm/files/visualvm-r2.conf
new file mode 100644
index 000000000000..214cb55b8674
--- /dev/null
+++ b/dev-util/visualvm/files/visualvm-r2.conf
@@ -0,0 +1,9 @@
+# Default user directory
+visualvm_default_userdir="${HOME}/.visualvm"
+visualvm_default_cachedir="${HOME}/.cache/visualvm"
+
+# Default runtime options
+visualvm_default_options="-J-client -J-Xms24m -J-Xmx768m -J-Dnetbeans.accept_license_class=org.graalvm.visualvm.modules.startup.AcceptLicense -J-Dnetbeans.importclass=org.graalvm.visualvm.modules.startup.ImportSettings -J-Dsun.jvmstat.perdata.syncWaitMs=10000 -J-Dsun.java2d.noddraw=true -J-Dsun.java2d.d3d=false -J-Dorg.netbeans.core.TimeableEventQueue.quantum=360000 -J-Dpolyglot.js.nashorn-compat=true -J-Dsun.misc.URLClassPath.disableJarChecking=true -J--add-exports=java.desktop/sun.awt=ALL-UNNAMED -J--add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor.event=ALL-UNNAMED -J--add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED -J--add-exports=java.desktop/sun.swing=ALL-UNNAMED -J--add-exports=jdk.attach/sun.tools.attach=ALL-UNNAMED -J--add-opens=java.base/java.net=ALL-UNNAMED -J--add-opens=java.base/java.lang.ref=ALL-UNNAMED -J--add-opens=java.base/java.lang=ALL-UNNAMED -J--add-opens=java.desktop/javax.swing=ALL-UNNAMED -J--add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED -J-XX:+IgnoreUnrecognizedVMOptions"
+
+# JDK home
+visualvm_jdkhome="$(java-config -O)"
diff --git a/dev-util/visualvm/files/visualvm-r2.sh b/dev-util/visualvm/files/visualvm-r2.sh
new file mode 100644
index 000000000000..d5ab8737c7f1
--- /dev/null
+++ b/dev-util/visualvm/files/visualvm-r2.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# source the configuration file
+. /etc/visualvm/visualvm.conf
+
+# launch visualvm
+exec sh /usr/share/visualvm/platform/lib/nbexec \
+ --branding visualvm \
+ --jdkhome "${visualvm_jdkhome}" \
+ --userdir "${visualvm_default_userdir}" \
+ --cachedir "${visualvm_default_cachedir}" \
+ --clusters /usr/share/visualvm/cluster:/usr/share/visualvm/harness:/usr/share/visualvm/platform \
+ ${visualvm_default_options} "${@}"
diff --git a/dev-util/visualvm/visualvm-2.0.6.ebuild b/dev-util/visualvm/visualvm-2.0.6.ebuild
new file mode 100644
index 000000000000..e132e704c5ce
--- /dev/null
+++ b/dev-util/visualvm/visualvm-2.0.6.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+NBV=113
+NBT=27102020
+NBZ=nb${NBV}_platform_${NBT}.zip
+
+inherit java-pkg-2 java-ant-2 desktop
+
+DESCRIPTION="Integrates commandline JDK tools and profiling capabilities"
+HOMEPAGE="https://visualvm.github.io"
+
+# Netbeans plattform is already included in the main archive this time
+# SRC_URI="https://github.com/oracle/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
+# https://github.com/oracle/${PN}/releases/download/${PV}/${NBZ}"
+SRC_URI="https://github.com/oracle/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2-with-linking-exception"
+SLOT="7"
+KEYWORDS="~amd64"
+
+RDEPEND="
+ >=virtual/jre-1.8"
+
+# it does not compile with java 11
+DEPEND="
+ virtual/jdk:1.8"
+
+S="${WORKDIR}/${P}/${PN}"
+
+QA_PREBUILT="
+ /usr/share/visualvm/platform/modules/lib/amd64/linux/libjnidispatch-nb.so
+ /usr/share/visualvm/cluster/lib/deployed/jdk1[56]/linux-amd64/libprofilerinterface.so
+"
+
+EANT_BUILD_TARGET=build
+INSTALL_DIR=/usr/share/${PN}
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ cd "${S}" || die
+ # unpack ${NBZ}
+ unpack "${S}"/"${NBZ}" # archive is included in the main archive
+}
+
+src_prepare() {
+ default
+
+ # Remove unneeded binaries
+ rm -rv netbeans/platform/lib/*.{dll,exe} \
+ netbeans/platform/modules/lib/{amd64/*.dll,i386,x86} || die
+ find libs.profiler/lib.profiler/release/lib/deployed/jdk1? -mindepth 1 \
+ -maxdepth 1 ! -name linux-amd64 -exec rm -rv {} + || die
+}
+
+src_install() {
+ # this is the visualvm cluster
+ insinto ${INSTALL_DIR}
+ doins -r build/cluster netbeans/{harness,platform}
+
+ # configuration file that can be used to tweak visualvm startup parameters
+ insinto /etc/${PN}
+ newins "${FILESDIR}"/${PN}-r2.conf ${PN}.conf
+
+ # visualvm runtime script
+ newbin "${FILESDIR}"/${PN}-r2.sh ${PN}
+
+ # makes visualvm entry
+ make_desktop_entry ${PN} VisualVM java "Development;Java;"
+}