netbeans-extide-8.1.ebuild 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="4"
  4. inherit eutils java-pkg-2 java-ant-2
  5. DESCRIPTION="Netbeans ExtIDE Cluster"
  6. HOMEPAGE="http://netbeans.org/projects/ide"
  7. SLOT="8.1"
  8. SOURCE_URL="http://download.netbeans.org/netbeans/8.1/final/zip/netbeans-8.1-201510222201-src.zip"
  9. SRC_URI="${SOURCE_URL}
  10. http://dev.gentoo.org/~fordfrog/distfiles/netbeans-8.1-build.xml.patch.bz2
  11. http://hg.netbeans.org/binaries/22CB933E3A1450B092C45785C187837E97523F5C-ant-libs-1.9.4.zip
  12. http://hg.netbeans.org/binaries/95CCE237B1E9390FBED0440B601822813DB220E6-ant-misc-1.9.4.zip"
  13. LICENSE="|| ( CDDL GPL-2-with-classpath-exception )"
  14. KEYWORDS="~amd64 ~x86"
  15. IUSE=""
  16. S="${WORKDIR}"
  17. CDEPEND="~dev-java/netbeans-ide-${PV}
  18. ~dev-java/netbeans-platform-${PV}"
  19. DEPEND=">=virtual/jdk-1.7
  20. app-arch/unzip
  21. dev-java/javahelp:0
  22. ${CDEPEND}"
  23. RDEPEND=">=virtual/jdk-1.7
  24. ${CDEPEND}"
  25. INSTALL_DIR="/usr/share/${PN}-${SLOT}"
  26. EANT_BUILD_XML="nbbuild/build.xml"
  27. EANT_BUILD_TARGET="rebuild-cluster"
  28. EANT_EXTRA_ARGS="-Drebuild.cluster.name=nb.cluster.extide -Dext.binaries.downloaded=true -Djava.awt.headless=true -Dpermit.jdk8.builds=true"
  29. EANT_FILTER_COMPILER="ecj-3.3 ecj-3.4 ecj-3.5 ecj-3.6 ecj-3.7"
  30. JAVA_PKG_BSFIX="off"
  31. src_unpack() {
  32. unpack $(basename ${SOURCE_URL})
  33. einfo "Deleting bundled jars..."
  34. find -name "*.jar" -type f -delete
  35. unpack netbeans-8.1-build.xml.patch.bz2
  36. pushd "${S}" >/dev/null || die
  37. ln -s "${DISTDIR}"/22CB933E3A1450B092C45785C187837E97523F5C-ant-libs-1.9.4.zip o.apache.tools.ant.module/external/ant-libs-1.9.4.zip || die
  38. ln -s "${DISTDIR}"/95CCE237B1E9390FBED0440B601822813DB220E6-ant-misc-1.9.4.zip o.apache.tools.ant.module/external/ant-misc-1.9.4.zip || die
  39. popd >/dev/null || die
  40. }
  41. src_prepare() {
  42. einfo "Deleting bundled class files..."
  43. find -name "*.class" -type f | xargs rm -vf
  44. epatch netbeans-8.1-build.xml.patch
  45. # Support for custom patches
  46. if [ -n "${NETBEANS9999_PATCHES_DIR}" -a -d "${NETBEANS9999_PATCHES_DIR}" ] ; then
  47. local files=`find "${NETBEANS9999_PATCHES_DIR}" -type f`
  48. if [ -n "${files}" ] ; then
  49. einfo "Applying custom patches:"
  50. for file in ${files} ; do
  51. epatch "${file}"
  52. done
  53. fi
  54. fi
  55. einfo "Symlinking external libraries..."
  56. java-pkg_jar-from --build-only --into javahelp/external javahelp jhall.jar jhall-2.0_05.jar
  57. einfo "Linking in other clusters..."
  58. mkdir "${S}"/nbbuild/netbeans || die
  59. pushd "${S}"/nbbuild/netbeans >/dev/null || die
  60. ln -s /usr/share/netbeans-ide-${SLOT} ide || die
  61. cat /usr/share/netbeans-ide-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
  62. touch nb.cluster.ide.built
  63. ln -s /usr/share/netbeans-platform-${SLOT} platform || die
  64. cat /usr/share/netbeans-platform-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
  65. touch nb.cluster.platform.built
  66. popd >/dev/null || die
  67. java-pkg-2_src_prepare
  68. }
  69. src_compile() {
  70. unset DISPLAY
  71. eant -f ${EANT_BUILD_XML} ${EANT_EXTRA_ARGS} ${EANT_BUILD_TARGET} || die "Compilation failed"
  72. }
  73. src_install() {
  74. pushd nbbuild/netbeans/extide >/dev/null || die
  75. insinto ${INSTALL_DIR}
  76. grep -E "/extide$" ../moduleCluster.properties > "${D}"/${INSTALL_DIR}/moduleCluster.properties || die
  77. doins -r *
  78. popd >/dev/null || die
  79. dosym ${INSTALL_DIR} /usr/share/netbeans-nb-${SLOT}/extide
  80. }