summaryrefslogtreecommitdiff
blob: 1a21713fed0075f9bf0a5518973cf964599062b3 (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
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/java-gnome/java-gnome-0.7.1.ebuild,v 1.14 2003/09/06 22:26:46 msterret Exp $

IUSE="gnome"

S=${WORKDIR}/${P}
DESCRIPTION="Java bindings for GNOME and GTK libraries that allow GNOME and GTK applications to be written in Java"
SRC_URI="mirror://sourceforge/java-gnome/java-gnome-0.7.1.tar.gz"
HOMEPAGE="http://java-gnome.sourceforge.net/"
DEPEND="virtual/glibc
	gnome? ( >=gnome-base/gnome-libs-1.4 )
	virtual/jdk
	>=dev-java/jikes-1.0
	=dev-java/java-gtk-0.7.1"
RDEPEND="$DEPEND"
SLOT="0.7"
LICENSE="LGPL-2.1"
KEYWORDS="x86 ~ppc ~sparc"

src_compile() {
	local myconf

	#JAVAC="`which jikes` -classpath $CLASSPATH:." \
		./configure \
		--host=${CHOST} \
		--prefix=/usr \
		--infodir=/usr/share/info \
		--mandir=/usr/share/man \
		--with-java-prefix=$JAVA_HOME \
		$myconf || die "./configure failed"

	myclasspath=`java-config --full-classpath=java-gtk | sed "s/\:/\\\\\:/g"`

	cp src/Makefile src/Makefile.orig
	sed -e "s|CLASSPATH = tools\:.|CLASSPATH = ${myclasspath}\:tools\:.|" \
		< src/Makefile.orig > src/Makefile

	cp src/tools/Makefile src/tools/Makefile.orig
	sed -e "s|CLASSPATH = .|CLASSPATH = ${myclasspath}\:.|" \
		< src/tools/Makefile.orig > src/tools/Makefile

	cp test/Makefile test/Makefile.orig
	sed -e "s|CLASSPATH = ../lib/gtk.jar\:../lib/gnome.jar|CLASSPATH = ${myclasspath}\:.\:../lib/gtk.jar\:../lib/gnome.jar|" \
		< test/Makefile.orig > test/Makefile

	cp src/other/{Base*.java,GStringArray.java,GListString.java} src/gnu/gdk/

	make || die
}

src_install () {
	make prefix=${D}/usr install || die

	mv ${D}/usr/doc ${D}/usr/share/

	rm ${D}/usr/share/java-gtk/gtk.jar
	rm ${D}/usr/share/java-gtk/gnome.jar

	rm ${D}/usr/lib/libGTKJava.so*

	rm ${D}/usr/lib/libGNOMEJava.so
	dosym /usr/lib/libGNOMEJava.so.${PV} /usr/lib/libGNOMEJava.so

	rm ${D}/usr/share/java-gnome/gtk*.jar

	echo "/usr/share/java-gnome/gnome-${PV}.jar:" \
		> ${D}/usr/share/java-gnome/classpath.env

}