# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils java-pkg SLOT="4.1" LICENCE="Apache-1.1 Apache-2.0 SPL W3C sun-bcla-j2eeeditor sun-bcla-javac sun-javac as-is docbook sun-resolver" KEYWORDS="~x86 ~amd64" DESCRIPTION="Netbeans 4.1 Scrambled Source" IUSE="debug doc" DOWNLOADDIR="http://www.netbeans.org/download/4_1/fcs/200505031930/66083d474e5fdfc80a1443fb851bd9d5/" SRC_URI="${DOWNLOADDIR}netbeans-${PV/./_}-src-ide_sources.tar.bz2 doc? ${DOWNLOADDIR}netbeans-${PV/./_}-docs-javadoc.tar.bz2" HOMEPAGE="http://www.netbeans.org/" RDEPEND=">=virtual/jre-1.4.2" DEPEND=">=virtual/jdk-1.4.2 >=dev-java/ant-1.6.1" S=${WORKDIR}/netbeans-src src_unpack() { unpack netbeans-${PV/./_}-src-ide_sources.tar.bz2 if use doc; then mkdir javadoc && cd javadoc unpack netbeans-${PV/./_}-docs-javadoc.tar.bz2 rm -rf *.zip fi } src_compile() { if use debug; then antflags="${antflags} -Dbuild.compiler.debug=true" antflags="${antflags} -Dbuild.compiler.deprecation=true" else antflags="${antflags} -Dbuild.compiler.deprecation=false" fi unset DISPLAY export ANTOPTS=" -Djava.awt.headless=true" cd ${S}/nbbuild yes yes 2> /dev/null | ant ${ANTOPTS} build-nozip || die "Failed." find ${S}/nbbuild/netbeans -type f -name "*.exe" -o -name "*.dll" -o -name "*.cmd" -o -name "*.bat" | xargs rm -f } src_install() { local DESTINATION="/usr/share/netbeans-${SLOT}" insinto ${DESTINATION} einfo "Installing Netbeans:" cd ${S}/nbbuild/netbeans doins -r * fperms 755 ${DESTINATION}/bin/netbeans ${DESTINATION}/platform5/lib/nbexec dosym ${DESTINATION}/bin/netbeans /bin/netbeans-${SLOT} einfo "Installing docs:" cd ${D}/${DESTINATION} use doc && java-pkg_dohtml -r ${WORKDIR}/javadoc/* dodoc build_info dohtml CREDITS.html README.html netbeans.css rm -f build_info CREDITS.html README.html netbeans.css # Icons and shortcuts einfo "Installing icons..." dodir ${DESTINATION}/icons insinto ${DESTINATION}/icons doins ${S}/core/ide/release/bin/icons/*png for res in "16x16" "24x24" "32x32" "48x48" "128x128" ; do dodir /usr/share/icons/hicolor/${res}/apps dosym ${DESTINATION}/icons/nb${res}.png /usr/share/icons/hicolor/${res}/apps/netbeans.png done make_desktop_entry netbeans-${SLOT} Netbeans netbeans Development }