summaryrefslogtreecommitdiff
blob: 447eac54c4a977b14c349cf41bdd18b29beb7dae (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
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-accessibility/java-access-bridge/java-access-bridge-1.4.2.ebuild,v 1.1 2004/05/18 22:34:28 leonardop Exp $

inherit java-pkg gnome2

DESCRIPTION="Gnome Java Accessibility Bridge"
HOMEPAGE="http://www.gnome.org/"
LICENSE="LGPL-2"
SLOT="0"
KEYWORDS="~x86 ~sparc ~amd64"
IUSE=""
RDEPEND=">=gnome-base/libbonobo-2
	>=gnome-extra/at-spi-1.3.9
	>=virtual/jdk-1.4"

DEPEND="${RDEPEND}
	dev-util/pkgconfig"

DOCS="AUTHORS ChangeLog COPYING NEWS README"

src_compile() {
	if [ -z "${JDK_HOME}" ] || [ ! -d "${JDK_HOME}" ]
	then
		eerror "In order to compile java sources you have to set the"
		eerror "\$JDK_HOME environment properly."
		eerror ""
		eerror "You can achieve this by using the java-config tool:"
		eerror "  emerge java-config"
		die "Couldn't find a valid JDK home"
	fi

	G2CONF="${G2CONF} --with-java-home=${JDK_HOME}"
	gnome2_src_compile
}

src_install() {
	gnome2_src_install

	java-pkg_dojar ${D}/usr/share/jar/*.jar

	insinto /usr/share/${PN}
	doins ${D}/usr/share/jar/*.properties

	rm -rf ${D}/usr/share/jar

	einfo "Installing symbolic links into ${JDK_HOME}/jre/lib"

	dodir ${JDK_HOME}/jre/lib/ext
	dosym \
		${ROOT}/usr/share/${PN}/accessibility.properties \
		${JDK_HOME}/jre/lib/accessibility.properties

	local jarfile
	for jar in ${D}/usr/share/${PN}/lib/*.jar
	do
		jarfile=$(basename $jar)
		dosym \
			${ROOT}/usr/share/${PN}/lib/$jarfile \
			${JDK_HOME}/jre/lib/ext/$jarfile
	done
}

pkg_postinst() {
	einfo ""
	einfo "The Java Accessibility Bridge for GNOME has been installed."
	einfo ""
	einfo "For this to work with your regular java desktop applications,"
	einfo "make sure too add the following line to your ~/.orbitrc file:"
	einfo ""
	einfo "  ORBIIOPIPv4=1"
	einfo ""
	einfo "And then either:"
	einfo "  a) Restart your session, or"
	einfo "  b) Manually kill your bonobo-activation-server and"
	einfo "     at-spi-registryd processes."
	einfo ""
}