summaryrefslogtreecommitdiff
path: root/dev-java/tijmp
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-java/tijmp
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-java/tijmp')
-rw-r--r--dev-java/tijmp/Manifest5
-rw-r--r--dev-java/tijmp/files/tijmp-0.8-respect-javacflags.patch11
-rw-r--r--dev-java/tijmp/files/tijmp-jni.h.patch34
-rw-r--r--dev-java/tijmp/metadata.xml15
-rw-r--r--dev-java/tijmp/tijmp-0.8.ebuild50
5 files changed, 115 insertions, 0 deletions
diff --git a/dev-java/tijmp/Manifest b/dev-java/tijmp/Manifest
new file mode 100644
index 000000000000..90ef26b15e2b
--- /dev/null
+++ b/dev-java/tijmp/Manifest
@@ -0,0 +1,5 @@
+AUX tijmp-0.8-respect-javacflags.patch 433 BLAKE2B 22999d08accccc8a00bb27e4db93b47faad83481083ecfef8b33c43e670093d15c6f483f5f15f1e02069e14d7dfa9df2d67846e2455ff73a01a5a209a8ac702e SHA512 01de85f6dd0609a85faecf398de83862dc99741d7447127ae8fbd57a16ead7b1493cee0479700e1027c45c4ee5a9561352868c2a45293f29a6e2fe8ee501f972
+AUX tijmp-jni.h.patch 1121 BLAKE2B 0eec0e65ceafe1f9a60b8f5482947f61a4434d9d6c4b2ec449741dc04e3ccbb5122f15dfdab5a30e8e1d3a4bb0c328781cf52f69f7d55655d060cee89670cbdb SHA512 3733c220c23a5c252ca088f9cc8c37780193bbbc1efe12c0f21ce5c5c9a875a43c3a4947c8bd52cb4c3ede4549ba9fdc4107d1a3207a0563813fc5b351c6e2a3
+DIST tijmp-0.8.tar.gz 347809 BLAKE2B d18fd0ba9145fb9277404a24fa26a65e4cbba34e62dfa0b080bc380d61a3dd11aab23e2c7fb982a97cb40fa216b1b3347c949cee52f7462f0113c3adef993c8d SHA512 911efd93c1548db45fcf8fd924675329aa82c6853ffe93074768646d08f80f4b076f336dba0da293d1acb084a12eb62c68803fa9408e2b64b2b82ab62db1de25
+EBUILD tijmp-0.8.ebuild 1129 BLAKE2B 0b58ddba5d1ad18f8b5da4094fe4ad03131c2d44dd2997425d75e73761fc683118c5d54c57542de65c34dc8c34b44c9e1679b71e15b71e74312ed34a56d106ea SHA512 ecfc77ee4f96f66b6dd32c7f613646d51e037cfc534d34a9de117a10fad57399d9a352618fcef66033f2e76c1898b6a58e088ef3a96b469786c1c648c2722727
+MISC metadata.xml 481 BLAKE2B 6b151d4c0ca3047811c3902cbe5dafd42cdbc05cb6d44a35e116be42276fabc8dd9ef90a8e4b05c58f3ed228dfa0df37ac1c8b5eeb4859373abf9e7624a093dc SHA512 52940eb0d565ae1419ea5b10d90997551cf1a9accf3ae2369b37a7afbd7e5cf0a11e0fa0afa84baeeac34d516a734b779a40ffd74f06767549ae0ad82010661e
diff --git a/dev-java/tijmp/files/tijmp-0.8-respect-javacflags.patch b/dev-java/tijmp/files/tijmp-0.8-respect-javacflags.patch
new file mode 100644
index 000000000000..96902aedf4ec
--- /dev/null
+++ b/dev-java/tijmp/files/tijmp-0.8-respect-javacflags.patch
@@ -0,0 +1,11 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -18,7 +18,7 @@
+ java_files := $(foreach dir,$(dirs),$(find_files))
+ class_files := $(patsubst $(jdir)/%.java,%.class,$(java_files))
+
+-JCFLAGS := -source 1.6 -encoding ISO-8859-1 -Xlint:unchecked -deprecation
++JCFLAGS := $(JAVACFLAGS) -encoding ISO-8859-1 -Xlint:unchecked -deprecation
+
+ # standard java compilation..
+ JAVACOMPILE := $(JAVAC) $(JCFLAGS) -sourcepath $(jdir) -d $(top_builddir)
diff --git a/dev-java/tijmp/files/tijmp-jni.h.patch b/dev-java/tijmp/files/tijmp-jni.h.patch
new file mode 100644
index 000000000000..e9f18cc4ee68
--- /dev/null
+++ b/dev-java/tijmp/files/tijmp-jni.h.patch
@@ -0,0 +1,34 @@
+# Patch by Vlastimil Babka <caster@gentoo.org>
+# Some JDK's such as ibm-jdk-bin don't have jni_md.h, so make the test more robust
+--- configure.ac.orig 2009-01-10 00:29:01.000000000 +0100
++++ configure.ac 2010-04-05 12:17:35.000000000 +0200
+@@ -24,22 +24,16 @@
+ JAVA_HOME=/usr/local/jdk
+ fi
+
+-jni_md=no
+-AC_CHECK_HEADERS($JAVA_HOME/include/$java_os/jni_md.h,
+- jni_md=found)
++dnl ok, maybe we dont always need include/$java_os but we use an -I for it anyway...
++CPPFLAGS="$CPPFLAGS -I$JAVA_HOME/include -I$JAVA_HOME/include/$java_os"
+
+-if test $jni_md = no
+-then
+-AC_CHECK_HEADERS($JAVA_HOME/include/jni_md.h,
+- jni_md=found)
+-fi
++jni_h=no
++AC_CHECK_HEADERS($JAVA_HOME/include/jni.h,
++ jni_h=found)
+
+-if test $jni_md = no
++if test $jni_h = no
+ then
+- AC_MSG_ERROR(Does JAVA_HOME point to the java SDK directory?)
+-else
+-dnl ok, maybe we dont need include/$java_os but we use an -I for it anyway...
+- CPPFLAGS="$CPPFLAGS -I$JAVA_HOME/include -I$JAVA_HOME/include/$java_os"
++ AC_MSG_ERROR(Could not find jni.h. Does JAVA_HOME point to the java SDK directory?)
+ fi
+
+ AC_CHECK_HEADER($JAVA_HOME/include/jvmti.h,
diff --git a/dev-java/tijmp/metadata.xml b/dev-java/tijmp/metadata.xml
new file mode 100644
index 000000000000..517a7a99e840
--- /dev/null
+++ b/dev-java/tijmp/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>java@gentoo.org</email>
+ <name>Java</name>
+</maintainer>
+
+<longdescription>
+JMP is a profiler for java that can be used to trace objects usage and
+method timings. JMP uses the JVMPI interface to gather statistics
+and interact with the JVM. JMP uses a GTK+ interface to show the status.
+</longdescription>
+
+</pkgmetadata>
diff --git a/dev-java/tijmp/tijmp-0.8.ebuild b/dev-java/tijmp/tijmp-0.8.ebuild
new file mode 100644
index 000000000000..9fea8db45ca0
--- /dev/null
+++ b/dev-java/tijmp/tijmp-0.8.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=2
+
+inherit autotools java-pkg-2
+
+DESCRIPTION="Java Memory Profiler for java 1.6+"
+HOMEPAGE="http://www.khelekore.org/jmp/tijmp/"
+SRC_URI="http://www.khelekore.org/jmp/tijmp/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+IUSE=""
+
+RDEPEND=">=virtual/jre-1.6"
+DEPEND=">=virtual/jdk-1.6"
+
+java_prepare() {
+ epatch "${FILESDIR}/${PN}-jni.h.patch"
+ epatch "${FILESDIR}/${P}-respect-javacflags.patch"
+ eautoreconf
+}
+
+src_configure() {
+ econf --docdir="/usr/share/doc/${PF}"
+}
+
+src_compile() {
+ emake || die "make failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" jardir="/usr/share/${PN}/lib/" install || die
+ java-pkg_regjar "${D}/usr/share/${PN}/lib/${PN}.jar"
+ java-pkg_regso "${D}/usr/$(get_libdir)/lib${PN}.so"
+
+ cat > "${T}/tijmp" <<-"EOF"
+ #!/bin/sh
+ java -Dtijmp.jar="$(java-config -p tijmp)" -agentlib:tijmp "${@}"
+EOF
+ dobin "${T}/tijmp"
+}
+
+pkg_postinst() {
+ einfo "For your convenience, ${PN} wrapper can be used to run java"
+ einfo "with profiling. Just use it in place of the 'java' command."
+}