summaryrefslogtreecommitdiff
blob: 21965f5f95b090a3d2b38af55ab159e8c7713fdf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/jrockit-jdk-bin/jrockit-jdk-bin-1.5.0.11_p1.ebuild,v 1.1 2007/08/31 13:23:37 caster Exp $

# WARNING: This is the default VM on ia64, so treat this ebuild
# with proper care.

# NOTE: this version is special, future standard releases should use some
# ebuild without _pX as a base. If there's none in the tree, check attic at
# sources.g.o

# The stripping of symbols seems to mess up the BEA code. Not sure why.
RESTRICT="strip mirror"

inherit java-vm-2 versionator

PV_MAJOR="$(get_version_component_range 1-3 ${PV})"
PV_EXTRA="$(get_version_component_range 4 ${PV})"
MY_PV="${PV_MAJOR}_${PV_EXTRA}"

SRC_URI_BASE="ftp://anonymous:dev2dev%40bea%2Ecom@ftpna.bea.com/pub/releases/security/jrockit-jdk${MY_PV}-linux_"
SRC_URI="ia64? ( ${SRC_URI_BASE}ia64.tar.gz )
		amd64? ( ${SRC_URI_BASE}x86_64.tar.gz )
		x86? ( ${SRC_URI_BASE}ia32.tar.gz )"
DESCRIPTION="BEA WebLogic's J2SE Development Kit"

HOMEPAGE="http://commerce.bea.com/products/weblogicjrockit/jrockit_prod_fam.jsp"

LICENSE="jrockit"
SLOT="1.5"
KEYWORDS="-* ~amd64 ~ia64 ~x86"
IUSE="doc examples"

DEPEND="app-arch/unzip"
RDEPEND="doc? ( =dev-java/java-sdk-docs-1.5.0* )"
JAVA_PROVIDE="jdbc-stdext jdbc-rowset"

QA_TEXTRELS_amd64="opt/${P}/mercuryprofiler/lib/sparc-sunos/libprobejni.so
	opt/${P}/mercuryprofiler/lib/x86-linux/libprobejni.so"

# not working for some reason...
# because it probably needs WX_LOAD and not EXECSTACK
QA_EXECSTACK_amd64="opt/${P}/mercuryprofiler/bin/sparc-sunos/systemmetrics
	opt/${P}/mercuryprofiler/lib/sparc-sunos/libprobejni.so"

QA_TEXTRELS_x86="opt/${P}/jre/lib/i386/jrockit/libjvm.so
opt/${P}/jre/lib/i386/motif21/libmawt.so
opt/${P}/jre/lib/i386/libjmapi.so
opt/${P}/mercuryprofiler/lib/x86-linux/libjvmti.so
opt/${P}/mercuryprofiler/lib/x86-linux/libprobejni.so
opt/${P}/mercuryprofiler/lib/sparc-sunos64/libjvmti.so
opt/${P}/mercuryprofiler/lib/sparc-sunos64/libprobejni.so
opt/${P}/mercuryprofiler/lib/sparc-sunos/libjvmti.so
opt/${P}/mercuryprofiler/lib/sparc-sunos/libprobejni.so"

QA_EXECSTACK_x86="opt/${P}/bin/*
opt/${P}/jre/bin/*
opt/${P}/jre/lib/i386/jrockit/libjvm.so
opt/${P}/jre/lib/i386/libnet.so"

QA_WX_LOAD_x86="opt/${P}/mercuryprofiler/bin/sparc-sunos/systemmetrics
opt/${P}/mercuryprofiler/bin/sparc-sunos/reference_sort
opt/${P}/mercuryprofiler/lib/sparc-sunos64/libjvmti.so
opt/${P}/mercuryprofiler/lib/sparc-sunos64/libprobejni.so
opt/${P}/mercuryprofiler/lib/sparc-sunos/libjvmti.so
opt/${P}/mercuryprofiler/lib/sparc-sunos/libprobejni.so"

S="${WORKDIR}/jrockit-jdk${MY_PV}"

src_install() {
	local dirs="bin include jre lib missioncontrol src.zip"

	insinto "/opt/${P}"
	for i in ${dirs} ; do
		doins -r $i || die
	done

	if use examples; then
		doins -r demo || die
		doins -r sample || die
	fi

	newdoc README.txt README || die
	dodoc LICENSE || die

	chmod +x ${D}/opt/${P}/bin/* ${D}/opt/${P}/jre/bin/* || die "Could not chmod"
	set_java_env
}

pkg_postinst () {
	# Set as default VM if none exists
	java-vm-2_pkg_postinst
	elog "Please review the license agreement in /usr/share/doc/${PF}/LICENSE"
	elog "If you do not agree to the terms of this license, please uninstall this package"
}