diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-09-20 11:11:53 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-09-20 11:11:53 +0100 |
commit | 2ce67506e52bee4f16032b08b1be9cee9e84e10d (patch) | |
tree | e1d7d7604754a8c356d3e93ed7fabb5221cb3976 /dev-util/visualvm | |
parent | 0bb372e16b84da4809f561d11ffaa30e983ab26d (diff) |
gentoo auto-resync : 20:09:2023 - 11:11:53
Diffstat (limited to 'dev-util/visualvm')
-rw-r--r-- | dev-util/visualvm/Manifest | 3 | ||||
-rw-r--r-- | dev-util/visualvm/visualvm-2.1.7.ebuild | 136 |
2 files changed, 139 insertions, 0 deletions
diff --git a/dev-util/visualvm/Manifest b/dev-util/visualvm/Manifest index eaca1362c5c2..d7baf3a6f359 100644 --- a/dev-util/visualvm/Manifest +++ b/dev-util/visualvm/Manifest @@ -3,6 +3,9 @@ DIST common-8.3.0.jar 438403 BLAKE2B 56d76e8115bd0022afcdd95a62a7419d1ea1f5a1aa4 DIST encoder-1.2.3.jar 37931 BLAKE2B b416d455424b3fd87c94f7f963c819d3a8d76e763c112947718514e2bc1b67b40c6cd9cc051c5cfae6b2aa1cbc92961d1bcc3565ba3dcf3bf58395d543c5aae9 SHA512 ba7887259007272c533228cec1e2c5caebd639ef05b7b8925be6a0b5a7da5859e82489af4d462153e64bf2ce1234a8d6caa606fc6e42675a41cf7a067cfc5f6b DIST flightrecorder-8.3.0.jar 532387 BLAKE2B 9ef286c53427292beea222ab75d7b8b3e36e44fed5e084d3db6a2910627e67abcdcdab18a175a43c57afc30795dcfa8059f7b0189db45371da6c2b5e635c6447 SHA512 98f4ac4799756e560f0ebf2998985ca07ffe826d925651633763358d2ced757780689b3e64d78af54851a93c270a60f226a285372cb783c978fb3543fed898eb DIST nb140_platform_20220908.zip 25886909 BLAKE2B 28cf8180eddd81fcfee513faf19e4a9ec2f3b7c35ad1ee23fe89bf6b5611432c3f41e9376b733ec5504fce1258e7dd27e0c229d291a5fbed3755df7fe0e99421 SHA512 cc2b320caa8fa0b4dbc5469e44453f1a586b6713af3bca799a654c7d1223741eab3a463fe53c955fb5639ec580f73ed93a7cc0ac26ce5dd84d55c418e024523e +DIST nb140_platform_20230511.zip 25886135 BLAKE2B 1b40f39dcb3d89cc91d2e90b5df87d393344606fb97f073630a7d160ab5ed35ba31966c4960ff3c657a75375b518f1667e2fca597626192e8cdc1dabfec1a63d SHA512 9781af27d4492dc84d65b9bc8bbda0ad42c22e32c29e14c6a55c4d94650d20798ee7a7fccf83150c88e7c428b8626c1767b21a1af230bc035496e65512d36442 DIST visualvm-2.1.6.tar.gz 11610216 BLAKE2B 60e87e1219cd1f39bd8d86ec35d07f4298f8378f3c16354570c8f3422cf7e4a3ed42d0a88d8d33290d226a8d92ec9eea3cf85713281c826aafb7610b1e0b42ca SHA512 3257b1890aab185aa28e226679bc78858f154022d49c8a4dd2ee2a5ec04afc4a5ac9633248f1aa1abcb8a457f5e612f223f4a03fdd54e6b8beb329c79dd0574c +DIST visualvm-2.1.7.tar.gz 11617370 BLAKE2B 3a6bdffbbfa63de2290551a285c78f28239367163b71ffa8d8b9660cc149463c2aa85fdad028f35c25da640e8d2374aee56a8a572bdc90116e14bdad95b24e58 SHA512 3164021ecb4f65a0d263f76f9644e0563c97903bc1cb046bd5c9a99ee3b6fc6a0adeb048b65ff7f7599cd13c8744aa927622f3c28cb1db815af22bc99272d22c EBUILD visualvm-2.1.6.ebuild 4721 BLAKE2B ee94c9db901f6e429373d196dfbdec6dd2af060a30af02e6a8331f4073eff18567ca0f17df2fcc44fe0339a68f2fcd01dc2b5ef200117bc1de16817811aaee18 SHA512 e32b9fae1a17669d38c7f75c24ad324b93bb47fa1c05781271ea62364a0c5b5d5a285f2d61e83eb35643938740a4e8a529c2703ff746e3a0a3126e7f17ff0e8e +EBUILD visualvm-2.1.7.ebuild 4711 BLAKE2B 3777bf1555b5520b6f77394888959c14c123f9f4a0eb00bf49f99008f7a58222bd768d1d6aa45a92a9947586074082b5f97a501351ac4b39b776807e7715e214 SHA512 a0b63f2f343e6f015488c7b15f7b345d98bbdcf59aaf9e727bce2ae5050214af1c13b78d603a602638933c7b2359b1c648aa706240bb32f30e0a2c004741a71e MISC metadata.xml 317 BLAKE2B e5f32379a40e3c2180df4f3ac4e7ea03a7dbfe69b1cb6537c1693262cc06e6334959abfb68f888c588fa933f60e85f137355bb57ff769107dfe805595d1a3ad1 SHA512 605d7206793c3d865547b69f9715305d46d433d18096b886b362d2d86adf4eda894c23af1819b6af95423fbe2a37781d1d100a9df9f15a01942f66c73dc2fa2c diff --git a/dev-util/visualvm/visualvm-2.1.7.ebuild b/dev-util/visualvm/visualvm-2.1.7.ebuild new file mode 100644 index 000000000000..0f9395ca0cb7 --- /dev/null +++ b/dev-util/visualvm/visualvm-2.1.7.ebuild @@ -0,0 +1,136 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +NBV=140 +NBT=20230511 +NBZ=nb${NBV}_platform_${NBT}.zip +FLIGHT_RECORDER_VERSION="8.3.0" +FLIGHT_RECORDER_FILE="flightrecorder-${FLIGHT_RECORDER_VERSION}.jar" +COMMON_VERSION="8.3.0" +COMMON_FILE="common-${COMMON_VERSION}.jar" +ENCODER_VERSION="1.2.3" +ENCODER_FILE="encoder-${ENCODER_VERSION}.jar" +LZ4_JAVA_VERSION="1.8.0" +LZ4_JAVA_FILE="lz4-java-${LZ4_JAVA_VERSION}.jar" + +inherit java-pkg-2 java-ant-2 desktop + +DESCRIPTION="Integrates commandline JDK tools and profiling capabilities" +HOMEPAGE="https://visualvm.github.io" + +SRC_URI="https://github.com/oracle/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz + https://github.com/oracle/${PN}/releases/download/${PV}/${NBZ} + https://repo1.maven.org/maven2/org/openjdk/jmc/flightrecorder/${FLIGHT_RECORDER_VERSION}/${FLIGHT_RECORDER_FILE} + https://repo1.maven.org/maven2/org/openjdk/jmc/common/${COMMON_VERSION}/${COMMON_FILE} + https://repo1.maven.org/maven2/org/owasp/encoder/encoder/${ENCODER_VERSION}/${ENCODER_FILE}" + +LICENSE="GPL-2-with-linking-exception" +SLOT="7" +KEYWORDS="~amd64" + +COMMON_DEPEND=" + dev-java/lz4-java:0 +" + +RDEPEND=" + ${COMMON_DEPEND} + dev-java/asm:9 + dev-java/hamcrest-core:1.3 + dev-java/jna:4 + dev-java/junit:4 + dev-java/junit:5 + dev-java/testng:0 + >=virtual/jre-1.8:*" + +# it does not compile with java 11 +DEPEND=" + ${COMMON_DEPEND} + virtual/jdk:1.8" + +BDEPEND="app-arch/unzip" + +S="${WORKDIR}/${P}/${PN}" + +QA_PREBUILT=" + /usr/share/visualvm/cluster/lib/deployed/jdk15/linux-amd64/libprofilerinterface.so + /usr/share/visualvm/cluster/lib/deployed/jdk16/linux-amd64/libprofilerinterface.so + /usr/share/visualvm/platform/modules/lib/aarch64/linux/libjnidispatch-nb.so + /usr/share/visualvm/platform/modules/lib/amd64/linux/libjnidispatch-nb.so + /usr/share/visualvm/platform/modules/lib/riscv64/linux/libjnidispatch-nb.so +" + +EANT_BUILD_TARGET=build +EANT_EXTRA_ARGS="-Dext.binaries.downloaded=true" +INSTALL_DIR=/usr/share/${PN} + +src_unpack() { + unpack ${P}.tar.gz + cd "${S}" || die + unpack ${NBZ} +} + +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 + + # link in downloaded jars + for file in ${FLIGHT_RECORDER_FILE} ${COMMON_FILE} ${ENCODER_FILE}; do + ln -s "${DISTDIR}/${file}" jfr.generic/external/ || die "Failed to link file ${file}" + done + + java-pkg_jar-from --into jfr.generic/external lz4-java lz4-java.jar ${LZ4_JAVA_FILE} \ + || die "Failed to link lz4 java jar" +} + +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 launcher/visualvm.conf ${PN}.conf + sed -i "s%visualvm_default_userdir=.*%visualvm_default_userdir=\"\${HOME}/.visualvm\"%g" "${ED}/etc/${PN}/visualvm.conf" \ + || die "Failed to update userdir" + sed -i "s%visualvm_default_cachedir=.*%visualvm_default_cachedir=\"\${HOME}/.cache/visualvm\"%g" "${ED}/etc/${PN}/visualvm.conf" \ + || die "Failed to update cachedir" + echo -e "\nvisualvm_jdkhome=\"\$(java-config -O)\"" >> "${ED}/etc/${PN}/visualvm.conf" \ + || die "Failed to set jdk detection" + + # replace bundled stuff + pushd "${ED}/${INSTALL_DIR}/platform/core" > /dev/null || die + for name in asm{,-commons,-tree}; do + rm ${name}-9.2.jar && java-pkg_jar-from asm-9 ${name}.jar ${name}-9.2.jar || die + done + popd > /dev/null + + pushd "${ED}/${INSTALL_DIR}/platform/modules/ext" > /dev/null || die + rm hamcrest-core-1.3.jar && java-pkg_jar-from hamcrest-core-1.3 hamcrest-core.jar hamcrest-core-1.3.jar || die + rm jcommander-1.78.jar && java-pkg_jar-from jcommander jcommander.jar jcommander-1.78.jar || die + for name in jna{,-platform}; do + rm ${name}-5.12.1.jar && java-pkg_jar-from jna-4 ${name}.jar ${name}-5.12.1.jar || die + done + rm junit-4.13.2.jar && java-pkg_jar-from junit-4 junit.jar junit-4.13.2.jar || die + for name in junit-jupiter-{api,engine,params}; do + rm ${name}-5.6.0.jar && java-pkg_jar-from junit-5 ${name}.jar ${name}-5.6.0.jar || die + done + rm testng-6.14.3.jar && java-pkg_jar-from testng testng.jar testng-6.14.3.jar || die + popd > /dev/null + + pushd "${ED}/${INSTALL_DIR}/cluster/modules/ext" > /dev/null || die + rm ${LZ4_JAVA_FILE} && java-pkg_jar-from lz4-java lz4-java.jar ${LZ4_JAVA_FILE} || die + popd > /dev/null + + # visualvm runtime script + newbin "${FILESDIR}"/${PN}-r2.sh ${PN} + + # makes visualvm entry + make_desktop_entry ${PN} VisualVM java "Development;Java;" +} |