dev-java/tomcat-servlet-api: removed obsolete 8.5.53
[gentoo.git] / dev-java / tijmp / tijmp-0.8-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit autotools java-pkg-2
7
8 DESCRIPTION="Java Memory Profiler"
9 HOMEPAGE="http://www.khelekore.org/jmp/tijmp/"
10 SRC_URI="http://www.khelekore.org/jmp/tijmp/${P}.tar.gz"
11
12 LICENSE="GPL-3"
13 SLOT="0"
14 KEYWORDS="amd64 x86"
15
16 RDEPEND="
17         >=virtual/jre-1.6"
18
19 DEPEND="
20         >=virtual/jdk-1.6"
21
22 PATCHES=(
23         "${FILESDIR}/${PN}-jni.h.patch"
24         "${FILESDIR}/${P}-respect-javacflags.patch"
25 )
26
27 src_prepare() {
28         default
29         eautoreconf
30 }
31
32 src_install() {
33         emake DESTDIR="${D}" jardir="/usr/share/${PN}/lib/" install
34         java-pkg_regjar "${D}/usr/share/${PN}/lib/${PN}.jar"
35         java-pkg_regso "${D}/usr/$(get_libdir)/lib${PN}.so"
36
37         cat > "${T}/${PN}" <<- "EOF" || die
38 #!/usr/bin/env bash
39 java -Dtijmp.jar="$(java-config -p tijmp)" -agentlib:tijmp "${@}"
40 EOF
41         dobin "${T}/${PN}"
42 }
43
44 pkg_postinst() {
45         einfo "For your convenience, ${PN} wrapper can be used to run java"
46         einfo "with profiling. Just use it in place of the 'java' command."
47 }