netbeans-apisupport-8.1.ebuild 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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 API Support Cluster"
  6. HOMEPAGE="http://netbeans.org/projects/apisupport"
  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. LICENSE="|| ( CDDL GPL-2-with-classpath-exception )"
  12. KEYWORDS="~amd64 ~x86"
  13. IUSE=""
  14. S="${WORKDIR}"
  15. CDEPEND="~dev-java/netbeans-extide-${PV}
  16. ~dev-java/netbeans-harness-${PV}
  17. ~dev-java/netbeans-ide-${PV}
  18. ~dev-java/netbeans-java-${PV}
  19. ~dev-java/netbeans-platform-${PV}"
  20. DEPEND=">=virtual/jdk-1.7
  21. app-arch/unzip
  22. ${CDEPEND}
  23. dev-java/javahelp:0"
  24. RDEPEND=">=virtual/jdk-1.7
  25. ${CDEPEND}"
  26. INSTALL_DIR="/usr/share/${PN}-${SLOT}"
  27. EANT_BUILD_XML="nbbuild/build.xml"
  28. EANT_BUILD_TARGET="rebuild-cluster"
  29. EANT_EXTRA_ARGS="-Drebuild.cluster.name=nb.cluster.apisupport -Dext.binaries.downloaded=true -Dpermit.jdk8.builds=true"
  30. EANT_FILTER_COMPILER="ecj-3.3 ecj-3.4 ecj-3.5 ecj-3.6 ecj-3.7"
  31. JAVA_PKG_BSFIX="off"
  32. src_unpack() {
  33. unpack $(basename ${SOURCE_URL})
  34. einfo "Deleting bundled jars..."
  35. find -name "*.jar" -type f -delete
  36. unpack netbeans-8.1-build.xml.patch.bz2
  37. }
  38. src_prepare() {
  39. einfo "Deleting bundled class files..."
  40. find -name "*.class" -type f | xargs rm -vf
  41. epatch netbeans-8.1-build.xml.patch
  42. # Support for custom patches
  43. if [ -n "${NETBEANS9999_PATCHES_DIR}" -a -d "${NETBEANS9999_PATCHES_DIR}" ] ; then
  44. local files=`find "${NETBEANS9999_PATCHES_DIR}" -type f`
  45. if [ -n "${files}" ] ; then
  46. einfo "Applying custom patches:"
  47. for file in ${files} ; do
  48. epatch "${file}"
  49. done
  50. fi
  51. fi
  52. einfo "Symlinking external libraries..."
  53. java-pkg_jar-from --build-only --into javahelp/external javahelp jhall.jar jhall-2.0_05.jar
  54. einfo "Linking in other clusters..."
  55. mkdir "${S}"/nbbuild/netbeans || die
  56. pushd "${S}"/nbbuild/netbeans >/dev/null || die
  57. ln -s /usr/share/netbeans-extide-${SLOT} extide || die
  58. cat /usr/share/netbeans-extide-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
  59. touch nb.cluster.extide.built
  60. ln -s /usr/share/netbeans-harness-${SLOT} harness || die
  61. cat /usr/share/netbeans-harness-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
  62. touch nb.cluster.harness.built
  63. ln -s /usr/share/netbeans-ide-${SLOT} ide || die
  64. cat /usr/share/netbeans-ide-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
  65. touch nb.cluster.ide.built
  66. ln -s /usr/share/netbeans-java-${SLOT} java || die
  67. cat /usr/share/netbeans-java-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
  68. touch nb.cluster.java.built
  69. ln -s /usr/share/netbeans-platform-${SLOT} platform || die
  70. cat /usr/share/netbeans-platform-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
  71. touch nb.cluster.platform.built
  72. popd >/dev/null || die
  73. java-pkg-2_src_prepare
  74. }
  75. src_install() {
  76. pushd nbbuild/netbeans/apisupport >/dev/null || die
  77. insinto ${INSTALL_DIR}
  78. grep -E "/apisupport$" ../moduleCluster.properties > "${D}"/${INSTALL_DIR}/moduleCluster.properties || die
  79. doins -r *
  80. popd >/dev/null || die
  81. dosym ${INSTALL_DIR} /usr/share/netbeans-nb-${SLOT}/apisupport
  82. }