|
|
# Copyright 1999-2005 Gentoo Foundation | # Copyright 1999-2005 Gentoo Foundation |
# Distributed under the terms of the GNU General Public License v2 | # Distributed under the terms of the GNU General Public License v2 |
# $Header: /var/cvsroot/gentoo-x86/dev-java/gnu-classpath/gnu-classpath-0.15-r1.ebuild,v 1.4 2005/05/22 14:18:30 compnerd Exp $ |
# $Header: $ |
| |
DESCRIPTION="Free core class libraries for use with virtual machines and compilers for the Java programming language" | DESCRIPTION="Free core class libraries for use with virtual machines and compilers for the Java programming language" |
SRC_URI="ftp://ftp.gnu.org/gnu/classpath/classpath-${PV}.tar.gz" | SRC_URI="ftp://ftp.gnu.org/gnu/classpath/classpath-${PV}.tar.gz" |
|
|
LICENSE="GPL-2-with-linking-exception" | LICENSE="GPL-2-with-linking-exception" |
SLOT="0" | SLOT="0" |
KEYWORDS="~x86 ~sparc ~ppc ~amd64" | KEYWORDS="~x86 ~sparc ~ppc ~amd64" |
IUSE="cairo gtk xml2" |
IUSE="cairo gcj gtk2 xml2" |
| |
DEPEND="app-arch/zip |
|
dev-java/jikes" |
|
RDEPEND="cairo? ( >=x11-libs/cairo-0.5.0 ) | RDEPEND="cairo? ( >=x11-libs/cairo-0.5.0 ) |
gtk? ( >=x11-libs/gtk+-2.4 media-libs/gdk-pixbuf ) |
gtk2? ( >=x11-libs/gtk+-2.4 ) |
xml2? ( >=dev-libs/libxml2-2.6.8 >=dev-libs/libxslt-1.1.11 )" | xml2? ( >=dev-libs/libxml2-2.6.8 >=dev-libs/libxslt-1.1.11 )" |
DEPEND="${RDEPEND} |
app-arch/zip |
gcj? ( >=sys-devel/gcc-4.0.1 ) |
!gcj? ( dev-java/jikes )" |
| |
S=${WORKDIR}/classpath-${PV} | S=${WORKDIR}/classpath-${PV} |
| |
|
|
# corresponding GCC) which cannot compile GNU Classpath correctly. | # corresponding GCC) which cannot compile GNU Classpath correctly. |
# Another possibility would be ECJ (from Eclipse) which is not yet in | # Another possibility would be ECJ (from Eclipse) which is not yet in |
# portage. | # portage. |
local compiler="--with-jikes" |
declare compiler |
|
use gcj && compiler="--with-gcj" || compiler="--with-jikes" |
| |
econf ${compiler} \ | econf ${compiler} \ |
$(use_enable cairo gtk-cairo) \ | $(use_enable cairo gtk-cairo) \ |
$(use_enable gtk gtk-peer) \ |
$(use_enable gtk2 gtk-peer) \ |
$(use_enable xml2 xmlj) \ | $(use_enable xml2 xmlj) \ |
--enable-jni \ | --enable-jni \ |
|| die "configure failed" | || die "configure failed" |
|
|
emake || die "make failed" | emake || die "make failed" |
} | } |
| |
src_install () { |
src_install() { |
einstall || die "make install failed" | einstall || die "make install failed" |
| |
if use cairo; then | if use cairo; then |
|
|
einfo "To use that functionality set the system property" | einfo "To use that functionality set the system property" |
einfo "gnu.java.awt.peer.gtk.Graphics to Graphics2D at runtime." | einfo "gnu.java.awt.peer.gtk.Graphics to Graphics2D at runtime." |
fi | fi |
|
cd ${D} |
declare files |
for x in usr/share/classpath/*.zip; do |
files="${files}/${x}:" |
done |
|
# drop tailing ':' |
files="${files%:}" |
|
# generate package.env for java-config |
sed -e "s:@DESCRIPTION@:${DESCRIPTION}:" \ |
-e "s:@FILE@:${files}:" \ |
< ${FILESDIR}/package.env \ |
> ${D}usr/share/classpath/package.env |
|| die "package.env generation failed!" |
} | } |
|
|
DESCRIPTION=@DESCRIPTION@ |
CLASSPATH=@FILE@ |