diff options
Diffstat (limited to 'dev-java/tijmp')
-rw-r--r-- | dev-java/tijmp/ChangeLog | 11 | ||||
-rw-r--r-- | dev-java/tijmp/files/tijmp-jni.h.patch | 34 | ||||
-rw-r--r-- | dev-java/tijmp/metadata.xml | 12 | ||||
-rw-r--r-- | dev-java/tijmp/tijmp-0.8.ebuild | 50 |
4 files changed, 107 insertions, 0 deletions
diff --git a/dev-java/tijmp/ChangeLog b/dev-java/tijmp/ChangeLog new file mode 100644 index 000000000000..ae193b263abe --- /dev/null +++ b/dev-java/tijmp/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for dev-java/tijmp +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-java/tijmp/ChangeLog,v 1.1 2010/04/05 12:09:09 caster Exp $ + +*tijmp-0.8 (05 Apr 2010) + + 05 Apr 2010; Vlastimil Babka <caster@gentoo.org> +tijmp-0.8.ebuild, + +files/tijmp-jni.h.patch, +metadata.xml: + New package based on dev-java/jmp but for the new JDK 1.6 API. Bug + #233548. + 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..02ab5b4213aa --- /dev/null +++ b/dev-java/tijmp/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>java</herd> + +<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..11af6832c8e1 --- /dev/null +++ b/dev-java/tijmp/tijmp-0.8.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-java/tijmp/tijmp-0.8.ebuild,v 1.1 2010/04/05 12:09:09 caster Exp $ + +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" + 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." +}
\ No newline at end of file |