# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit java-utils DESCRIPTION="NetBeans ${PV} IDE for Java" IUSE="kde gnome" HOMEPAGE="http://www.netbeans.org" SRC_URI="netbeans-4_0-src-ide_sources.tar.bz2" FETCH_LOCATION="http://www.netbeans.info/downloads/download.php?p=1&a=bd&os=2&lang=1&rv=${PV}&b_bt=2" RESTRICT="fetch" SLOT="0" #We need to add many licenses in here. LICENSE="GPL-2 Apache-1.1 sun-bcla-j2ee JPython SPL" KEYWORDS="~x86" DEPEND=">=virtual/jdk-1.4.2 >=dev-java/ant-1.5.3" RDEPEND=">=virtual/jre-1.4.2" S=${WORKDIR}/netbeans-src BUILDDESTINATION=${S}/nbbuild/netbeans pkg_nofetch() { einfo "Please download ${A} from" einfo "${FETCH_LOCATION}" einfo "Select the ${PV} source package and move it to ${DISTDIR}" } src_compile() { # The build will attempt to display graphical # dialogs for the licence agreements if this is set. unset DISPLAY # Move into the folder where the build.xml file lives. cd ${S}/nbbuild # Specify the build-nozip target otherwise it will build # a zip file of the netbeans folder, which will copy directly. yes yes | ant -buildfile build.xml build-nozip } src_install() { # Remove non-x86 Linux binaries find $S -name "*.exe" -o -name "*.bat" -o -name "*.cmd" | xargs rm -f dodir /opt/${P} cd ${BUILDDESTINATION} dodoc build_info dohtml CREDITS.html README.html netbeans.css cp -Rdp bin etc ide4 \ nb4.0 platform4 build_info \ moduleCluster.properties module_tracking.xml \ ${D}/opt/${P} dodir /usr/bin dosym /opt/${P}/bin/netbeans /usr/bin/netbeans # If either Gnome or KDE are installed, then install the icons. if use gnome || use kde; then echo "Adding icons and shorcuts...." doicon ${BUILDDESTINATION}/nb4.0/netbeans.png make_desktop_entry netbeans Netbeans netbeans.png Development fi }