summaryrefslogtreecommitdiff
blob: 00a4d3c3ed6c62cfd495ef993b12815e1985c30f (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
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/kde-base/krossjava/krossjava-4.3.3.ebuild,v 1.3 2009/12/10 16:33:08 fauli Exp $

EAPI="2"

KMNAME="kdebindings"
KMMODULE="java/krossjava"
inherit java-pkg-2 java-ant-2 kde4-meta eutils

DESCRIPTION="Java plugin for the kdelibs/kross scripting framework."
KEYWORDS="amd64 x86"
IUSE="debug"

DEPEND="
	>=virtual/jdk-1.5
"
RDEPEND="
	>=virtual/jre-1.5
"

RESTRICT="test"

PATCHES=( "${FILESDIR}/${PN}-4.2.3_includes.patch" )

src_prepare() {
	find "${S}" -iname '*.jar' | xargs rm -v
	kde4-meta_src_prepare
	java-pkg-2_src_prepare
}

src_configure() {
	export mycmakeargs="-DENABLE_KROSSJAVA=ON"
	kde4-meta_src_configure
	java-ant-2_src_configure
}

src_compile() {
	kde4-meta_src_compile
	cd "${S}/java/${PN}/${PN}/java/" || die
	eant makejar
}

src_install() {
	kde4-meta_src_install
	java-pkg_dojar "${D}/${KDEDIR}/$(get_libdir)/kde4/kross/kross.jar"

	cd "${D}${KDEDIR}/$(get_libdir)/kde4/kross/" || die
	local path_prefix="../../../../"

	if [[ "${KDEDIR}" != "/usr" ]]; then
		path_prefix="${path_prefix}../"
	fi

	dosym "${path_prefix}usr/share/${PN}-${SLOT}/lib/kross.jar" \
		"${KDEDIR}/$(get_libdir)/kde4/kross/kross.jar"
	java-pkg_regso "${D}/${KDEDIR}/$(get_libdir)/kde4/libkrossjava.so"
}