netbeans-dlight-8.2.ebuild 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="6"
  4. inherit eutils java-pkg-2 java-ant-2
  5. DESCRIPTION="Netbeans D-Light Cluster"
  6. HOMEPAGE="http://netbeans.org/"
  7. SLOT="8.2"
  8. SOURCE_URL="http://download.netbeans.org/netbeans/8.2/final/zip/netbeans-8.2-201609300101-src.zip"
  9. SRC_URI="${SOURCE_URL}
  10. http://dev.gentoo.org/~fordfrog/distfiles/netbeans-8.2-build.xml.patch.bz2
  11. http://hg.netbeans.org/binaries/18E39A0D10357B72EDB76F2070E27019317792F1-fs_server-1.0.zip"
  12. LICENSE="|| ( CDDL GPL-2-with-linking-exception )"
  13. KEYWORDS="amd64 ~x86"
  14. IUSE=""
  15. S="${WORKDIR}"
  16. CDEPEND="virtual/jdk:1.8
  17. ~dev-java/netbeans-ide-${PV}
  18. ~dev-java/netbeans-platform-${PV}"
  19. DEPEND="${CDEPEND}
  20. app-arch/unzip
  21. dev-java/javahelp:0"
  22. RDEPEND="${CDEPEND}"
  23. INSTALL_DIR="/usr/share/${PN}-${SLOT}"
  24. EANT_BUILD_XML="nbbuild/build.xml"
  25. EANT_BUILD_TARGET="rebuild-cluster"
  26. EANT_EXTRA_ARGS="-Drebuild.cluster.name=nb.cluster.dlight -Dext.binaries.downloaded=true -Dpermit.jdk8.builds=true"
  27. EANT_FILTER_COMPILER="ecj-3.3 ecj-3.4 ecj-3.5 ecj-3.6 ecj-3.7"
  28. JAVA_PKG_BSFIX="off"
  29. src_unpack() {
  30. unpack $(basename ${SOURCE_URL})
  31. einfo "Deleting bundled jars..."
  32. find -name "*.jar" -type f -delete
  33. unpack netbeans-8.2-build.xml.patch.bz2
  34. pushd "${S}" >/dev/null || die
  35. ln -s "${DISTDIR}"/18E39A0D10357B72EDB76F2070E27019317792F1-fs_server-1.0.zip dlight.remote.impl/external/fs_server-1.0.zip || die
  36. popd >/dev/null || die
  37. }
  38. src_prepare() {
  39. einfo "Deleting bundled class files..."
  40. find -name "*.class" -type f | xargs rm -vf
  41. epatch netbeans-8.2-build.xml.patch
  42. einfo "Symlinking external libraries..."
  43. java-pkg_jar-from --build-only --into javahelp/external javahelp jhall.jar jhall-2.0_05.jar
  44. einfo "Linking in other clusters..."
  45. mkdir "${S}"/nbbuild/netbeans || die
  46. pushd "${S}"/nbbuild/netbeans >/dev/null || die
  47. ln -s /usr/share/netbeans-ide-${SLOT} ide || die
  48. cat /usr/share/netbeans-ide-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
  49. touch nb.cluster.ide.built
  50. ln -s /usr/share/netbeans-platform-${SLOT} platform || die
  51. cat /usr/share/netbeans-platform-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
  52. touch nb.cluster.platform.built
  53. popd >/dev/null || die
  54. java-pkg-2_src_prepare
  55. default
  56. }
  57. src_install() {
  58. pushd nbbuild/netbeans/dlight >/dev/null || die
  59. insinto ${INSTALL_DIR}
  60. grep -E "/dlight$" ../moduleCluster.properties > "${D}"/${INSTALL_DIR}/moduleCluster.properties || die
  61. doins -r *
  62. popd >/dev/null || die
  63. dosym ${INSTALL_DIR} /usr/share/netbeans-nb-${SLOT}/dlight
  64. }