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 JavaDocs"
9 HOMEPAGE="http://netbeans.org/"
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 LICENSE="|| ( CDDL GPL-2-with-linking-exception )"
20 DEPEND="virtual/jdk:1.7
24 ~dev-java/netbeans-apisupport-${PV}
25 ~dev-java/netbeans-cnd-${PV}
26 ~dev-java/netbeans-dlight-${PV}
27 ~dev-java/netbeans-enterprise-${PV}
28 ~dev-java/netbeans-ergonomics-${PV}
29 ~dev-java/netbeans-extide-${PV}
30 ~dev-java/netbeans-groovy-${PV}
31 ~dev-java/netbeans-harness-${PV}
32 ~dev-java/netbeans-ide-${PV}
33 ~dev-java/netbeans-java-${PV}
34 ~dev-java/netbeans-javacard-${PV}
35 ~dev-java/netbeans-mobility-${PV}
36 ~dev-java/netbeans-nb-${PV}
37 ~dev-java/netbeans-php-${PV}
38 ~dev-java/netbeans-platform-${PV}
39 ~dev-java/netbeans-profiler-${PV}
40 ~dev-java/netbeans-websvccommon-${PV}"
46 unpack $(basename ${SOURCE_URL})
48 einfo "Deleting bundled jars..."
49 find -name "*.jar" -type f -delete
51 unpack netbeans-8.0.2-build.xml.patch.bz2
53 pushd "${S}" >/dev/null || die
54 ln -s "${DISTDIR}"/22CB933E3A1450B092C45785C187837E97523F5C-ant-libs-1.9.4.zip o.apache.tools.ant.module/external/ant-libs-1.9.4.zip || die
55 popd >/dev/null || die
59 einfo "Deleting bundled class files..."
60 find -name "*.class" -type f | xargs rm -vf
62 epatch netbeans-8.0.2-build.xml.patch
64 # Support for custom patches
65 if [ -n "${NETBEANS80_PATCHES_DIR}" -a -d "${NETBEANS80_PATCHES_DIR}" ] ; then
66 local files=`find "${NETBEANS80_PATCHES_DIR}" -type f`
68 if [ -n "${files}" ] ; then
69 einfo "Applying custom patches:"
71 for file in ${files} ; do
77 einfo "Symlinking external libraries..."
78 java-pkg_jar-from --build-only --into javahelp/external javahelp jhall.jar jhall-2.0_05.jar
79 java-pkg_jar-from --build-only --into libs.junit4/external junit-4 junit.jar junit-4.10.jar
81 einfo "Linking in other clusters..."
82 mkdir "${S}"/nbbuild/netbeans || die
83 pushd "${S}"/nbbuild/netbeans >/dev/null || die
85 ln -s /usr/share/netbeans-apisupport-${SLOT} apisupport || die
86 cat /usr/share/netbeans-apisupport-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
87 touch nb.cluster.apisupport.built
89 ln -s /usr/share/netbeans-cnd-${SLOT} cnd || die
90 cat /usr/share/netbeans-cnd-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
91 touch nb.cluster.cnd.built
93 ln -s /usr/share/netbeans-dlight-${SLOT} dlight || die
94 cat /usr/share/netbeans-dlight-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
95 touch nb.cluster.dlight.built
97 ln -s /usr/share/netbeans-enterprise-${SLOT} enterprise || die
98 cat /usr/share/netbeans-enterprise-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
99 touch nb.cluster.enterprise.built
101 ln -s /usr/share/netbeans-ergonomics-${SLOT} ergonomics || die
102 cat /usr/share/netbeans-ergonomics-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
103 touch nb.cluster.ergonomics.built
105 ln -s /usr/share/netbeans-extide-${SLOT} extide || die
106 cat /usr/share/netbeans-extide-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
107 touch nb.cluster.extide.built
109 ln -s /usr/share/netbeans-groovy-${SLOT} groovy || die
110 cat /usr/share/netbeans-groovy-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
111 touch nb.cluster.groovy.built
113 ln -s /usr/share/netbeans-harness-${SLOT} harness || die
114 cat /usr/share/netbeans-harness-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
115 touch nb.cluster.harness.built
117 ln -s /usr/share/netbeans-ide-${SLOT} ide || die
118 cat /usr/share/netbeans-ide-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
119 touch nb.cluster.ide.built
121 ln -s /usr/share/netbeans-java-${SLOT} java || die
122 cat /usr/share/netbeans-java-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
123 touch nb.cluster.java.built
125 ln -s /usr/share/netbeans-javacard-${SLOT} javacard || die
126 cat /usr/share/netbeans-javacard-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
127 touch nb.cluster.javacard.built
129 ln -s /usr/share/netbeans-mobility-${SLOT} mobility || die
130 cat /usr/share/netbeans-mobility-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
131 touch nb.cluster.mobility.built
133 ln -s /usr/share/netbeans-nb-${SLOT}/nb nb || die
134 cat /usr/share/netbeans-nb-${SLOT}/nb/moduleCluster.properties >> moduleCluster.properties || die
135 touch nb.cluster.nb.built
137 ln -s /usr/share/netbeans-php-${SLOT} php || die
138 cat /usr/share/netbeans-php-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
139 touch nb.cluster.php.built
141 ln -s /usr/share/netbeans-platform-${SLOT} platform || die
142 cat /usr/share/netbeans-platform-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
143 touch nb.cluster.platform.built
145 ln -s /usr/share/netbeans-profiler-${SLOT} profiler || die
146 cat /usr/share/netbeans-profiler-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
147 touch nb.cluster.profiler.built
149 ln -s /usr/share/netbeans-websvccommon-${SLOT} websvccommon || die
150 cat /usr/share/netbeans-websvccommon-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
151 touch nb.cluster.websvccommon.built
153 java-pkg-2_src_prepare
157 eant -f nbbuild/build.xml bootstrap || die
158 ANT_OPTS="-Xmx1536m" eant -f nbbuild/javadoctools/build.xml build-javadoc
162 rm nbbuild/build/javadoc/*.zip
163 java-pkg_dojavadoc nbbuild/build/javadoc