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 Web Services Cluster"
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/20317762D93542637CD2C6123B836C8DA267DE9D-cdnjs.zip
15 http://hg.netbeans.org/binaries/59631804B5A7FF3CEAA3F0E113584AF7E1BB6E9B-dd-plist.jar
16 http://hg.netbeans.org/binaries/81483881778F37D0495C07323E445361084CA1DB-ios-sim
17 http://hg.netbeans.org/binaries/9D29F2A9722C91A403F32971E97DD0E49E97B02E-libiDeviceNativeBinding.dylib
18 http://hg.netbeans.org/binaries/9F0D0D95F57E73C0110FA023813A4F9756D543B1-libimobiledevice.4.dylib
19 http://hg.netbeans.org/binaries/480C9E376169E21EA3BDA5D5841425BD7CC054D7-libplist.1.dylib
20 http://hg.netbeans.org/binaries/08FE518AB60FFA2E5440B75B4D9F8502E0791B3C-libs.jstestdriver-ext.jar
21 http://hg.netbeans.org/binaries/D05B7274396C8EED185207399B6D0400DE347DB7-libusbmuxd.2.dylib"
22 LICENSE="|| ( CDDL GPL-2-with-linking-exception )"
27 CDEPEND="~dev-java/netbeans-platform-${PV}
28 ~dev-java/netbeans-extide-${PV}
29 ~dev-java/netbeans-ide-${PV}"
30 DEPEND="virtual/jdk:1.7
34 RDEPEND=">=virtual/jdk-1.7
37 INSTALL_DIR="/usr/share/${PN}-${SLOT}"
39 EANT_BUILD_XML="nbbuild/build.xml"
40 EANT_BUILD_TARGET="rebuild-cluster"
41 EANT_EXTRA_ARGS="-Drebuild.cluster.name=nb.cluster.webcommon -Dext.binaries.downloaded=true"
42 EANT_FILTER_COMPILER="ecj-3.3 ecj-3.4 ecj-3.5 ecj-3.6 ecj-3.7"
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}"/20317762D93542637CD2C6123B836C8DA267DE9D-cdnjs.zip web.clientproject.api/external/cdnjs.zip || die
55 ln -s "${DISTDIR}"/59631804B5A7FF3CEAA3F0E113584AF7E1BB6E9B-dd-plist.jar libs.plist/external/dd-plist.jar || die
56 ln -s "${DISTDIR}"/81483881778F37D0495C07323E445361084CA1DB-ios-sim cordova.platforms.ios/external/ios-sim || die
57 ln -s "${DISTDIR}"/9D29F2A9722C91A403F32971E97DD0E49E97B02E-libiDeviceNativeBinding.dylib cordova.platforms.ios/external/libiDeviceNativeBinding.dylib || die
58 ln -s "${DISTDIR}"/9F0D0D95F57E73C0110FA023813A4F9756D543B1-libimobiledevice.4.dylib cordova.platforms.ios/external/libimobiledevice.4.dylib || die
59 ln -s "${DISTDIR}"/480C9E376169E21EA3BDA5D5841425BD7CC054D7-libplist.1.dylib cordova.platforms.ios/external/libplist.1.dylib || die
60 ln -s "${DISTDIR}"/08FE518AB60FFA2E5440B75B4D9F8502E0791B3C-libs.jstestdriver-ext.jar libs.jstestdriver/external/libs.jstestdriver-ext.jar || die
61 ln -s "${DISTDIR}"/D05B7274396C8EED185207399B6D0400DE347DB7-libusbmuxd.2.dylib cordova.platforms.ios/external/libusbmuxd.2.dylib || die
62 popd >/dev/null || die
66 einfo "Deleting bundled class files..."
67 find -name "*.class" -type f | xargs rm -vf
69 epatch netbeans-8.0.2-build.xml.patch
71 # Support for custom patches
72 if [ -n "${NETBEANS80_PATCHES_DIR}" -a -d "${NETBEANS80_PATCHES_DIR}" ] ; then
73 local files=`find "${NETBEANS80_PATCHES_DIR}" -type f`
75 if [ -n "${files}" ] ; then
76 einfo "Applying custom patches:"
78 for file in ${files} ; do
84 einfo "Symlinking external libraries..."
85 java-pkg_jar-from --build-only --into javahelp/external javahelp jhall.jar jhall-2.0_05.jar
87 einfo "Linking in other clusters..."
88 mkdir "${S}"/nbbuild/netbeans || die
89 pushd "${S}"/nbbuild/netbeans >/dev/null || die
91 ln -s /usr/share/netbeans-platform-${SLOT} platform || die
92 cat /usr/share/netbeans-platform-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
93 touch nb.cluster.platform.built
95 ln -s /usr/share/netbeans-extide-${SLOT} extide || die
96 cat /usr/share/netbeans-extide-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
97 touch nb.cluster.extide.built
99 ln -s /usr/share/netbeans-ide-${SLOT} ide || die
100 cat /usr/share/netbeans-ide-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
101 touch nb.cluster.ide.built
103 popd >/dev/null || die
105 java-pkg-2_src_prepare
109 pushd nbbuild/netbeans/webcommon >/dev/null || die
111 insinto ${INSTALL_DIR}
112 grep -E "/webcommon$" ../moduleCluster.properties > "${D}"/${INSTALL_DIR}/moduleCluster.properties || die
115 popd >/dev/null || die
117 dosym ${INSTALL_DIR} /usr/share/netbeans-nb-${SLOT}/webcommon