# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/dev-java/swt/swt-3.0.ebuild,v 1.5 2005/02/19 19:11:46 luckyduck Exp $ inherit eutils java-pkg IUSE="gnome mozilla" DESCRIPTION="SWT library" HOMEPAGE="http://www.eclipse.org/" SRC_URI="http://download.eclipse.org/downloads/drops/R-3.0-200406251208/swt-3.0-linux-gtk.zip" LICENSE="CPL-1.0 LGPL-2.1 MPL-1.1" SLOT="0" KEYWORDS="~x86 ~ppc ~amd64" RDEPEND=">=x11-libs/gtk+-2.2.4 mozilla? ( >=net-www/mozilla-1.5 ) gnome? ( =gnome-base/gnome-vfs-2* =gnome-base/libgnomeui-2* )" DEPEND="${RDEPEND} >=virtual/jdk-1.4 dev-java/ant app-arch/unzip" src_unpack() { mkdir ${S} && cd ${S} unpack ${A} # remove some files rm -f *.so *.jar use mozilla || rm -f swt-mozillasrc.zip for i in *.zip do einfo "Unpacking ${i} to ${S}" unzip ${i} &> /dev/null done use mozilla && mv library/xpcom.cpp ${S} mkdir src && mv org src/ cp ${FILESDIR}/build-${PV}.xml ${S}/build.xml sed 's/ Makefile make make_swt || die "Failed to build platform-independent SWT support" make make_atk || die "Failed to build atk support" if use gnome ; then einfo "Building GNOME VFS support" make make_gnome || die "Failed to build GNOME VFS support" fi if use mozilla ; then einfo "Building Mozilla component" make make_mozilla || die "Failed to build Mozilla support" fi einfo "Building java source" ant jar } src_install() { java-pkg_dojar swt.jar || die "Installation of swt.jar failed" exeinto /usr/lib doexe *.so ${D}/usr/lib || die "Install of .so-files failed" dohtml about.html }