1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit eutils java-pkg-2 java-ant-2
8 DESCRIPTION="Netbeans ExtIDE Cluster"
9 HOMEPAGE="http://netbeans.org/projects/ide"
11 SOURCE_URL="http://download.netbeans.org/netbeans/8.0.2/final/zip/netbeans-8.0.2-201411181905-src.zip"
12 SRC_URI="${SOURCE_URL}
13 https://dev.gentoo.org/~fordfrog/distfiles/netbeans-8.0.2-build.xml.patch.bz2
14 http://hg.netbeans.org/binaries/22CB933E3A1450B092C45785C187837E97523F5C-ant-libs-1.9.4.zip
15 http://hg.netbeans.org/binaries/95CCE237B1E9390FBED0440B601822813DB220E6-ant-misc-1.9.4.zip"
16 LICENSE="|| ( CDDL GPL-2-with-linking-exception )"
21 CDEPEND="~dev-java/netbeans-ide-${PV}
22 ~dev-java/netbeans-platform-${PV}"
23 DEPEND="virtual/jdk:1.7
27 RDEPEND=">=virtual/jdk-1.7
30 INSTALL_DIR="/usr/share/${PN}-${SLOT}"
32 EANT_BUILD_XML="nbbuild/build.xml"
33 EANT_BUILD_TARGET="rebuild-cluster"
34 EANT_EXTRA_ARGS="-Drebuild.cluster.name=nb.cluster.extide -Dext.binaries.downloaded=true -Djava.awt.headless=true"
35 EANT_FILTER_COMPILER="ecj-3.3 ecj-3.4 ecj-3.5 ecj-3.6 ecj-3.7"
39 unpack $(basename ${SOURCE_URL})
41 einfo "Deleting bundled jars..."
42 find -name "*.jar" -type f -delete
44 unpack netbeans-8.0.2-build.xml.patch.bz2
46 pushd "${S}" >/dev/null || die
47 ln -s "${DISTDIR}"/22CB933E3A1450B092C45785C187837E97523F5C-ant-libs-1.9.4.zip o.apache.tools.ant.module/external/ant-libs-1.9.4.zip || die
48 ln -s "${DISTDIR}"/95CCE237B1E9390FBED0440B601822813DB220E6-ant-misc-1.9.4.zip o.apache.tools.ant.module/external/ant-misc-1.9.4.zip || die
49 popd >/dev/null || die
53 einfo "Deleting bundled class files..."
54 find -name "*.class" -type f | xargs rm -vf
56 epatch netbeans-8.0.2-build.xml.patch
58 # Support for custom patches
59 if [ -n "${NETBEANS80_PATCHES_DIR}" -a -d "${NETBEANS80_PATCHES_DIR}" ] ; then
60 local files=`find "${NETBEANS80_PATCHES_DIR}" -type f`
62 if [ -n "${files}" ] ; then
63 einfo "Applying custom patches:"
65 for file in ${files} ; do
71 einfo "Symlinking external libraries..."
72 java-pkg_jar-from --build-only --into javahelp/external javahelp jhall.jar jhall-2.0_05.jar
74 einfo "Linking in other clusters..."
75 mkdir "${S}"/nbbuild/netbeans || die
76 pushd "${S}"/nbbuild/netbeans >/dev/null || die
78 ln -s /usr/share/netbeans-ide-${SLOT} ide || die
79 cat /usr/share/netbeans-ide-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
80 touch nb.cluster.ide.built
82 ln -s /usr/share/netbeans-platform-${SLOT} platform || die
83 cat /usr/share/netbeans-platform-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
84 touch nb.cluster.platform.built
86 popd >/dev/null || die
88 java-pkg-2_src_prepare
93 eant -f ${EANT_BUILD_XML} ${EANT_EXTRA_ARGS} ${EANT_BUILD_TARGET} || die "Compilation failed"
97 pushd nbbuild/netbeans/extide >/dev/null || die
99 insinto ${INSTALL_DIR}
101 grep -E "/extide$" ../moduleCluster.properties > "${D}"/${INSTALL_DIR}/moduleCluster.properties || die
105 popd >/dev/null || die
107 dosym ${INSTALL_DIR} /usr/share/netbeans-nb-${SLOT}/extide