diff options
author | William Thomson <wltjr@gentoo.org> | 2006-11-04 10:01:54 +0000 |
---|---|---|
committer | William Thomson <wltjr@gentoo.org> | 2006-11-04 10:01:54 +0000 |
commit | 7d8eb0d79f2444a7e20c7e53c32c563dec1e2fa8 (patch) | |
tree | 0f06104044773ed88b232866ba5a974578308fd8 /dev-util/netbeans | |
parent | Added missing dep of app-arch/unzip (diff) | |
download | gentoo-2-7d8eb0d79f2444a7e20c7e53c32c563dec1e2fa8.tar.gz gentoo-2-7d8eb0d79f2444a7e20c7e53c32c563dec1e2fa8.tar.bz2 gentoo-2-7d8eb0d79f2444a7e20c7e53c32c563dec1e2fa8.zip |
Initial ebuild for Netbeans 5.5. Contributions from ali_bush & fordfrog on runtime issues & making packages for deps. Still uses some bundled stuff, but uses as much of the system resources as feasible.
(Portage version: 2.1.2_rc1-r1)
Diffstat (limited to 'dev-util/netbeans')
-rw-r--r-- | dev-util/netbeans/ChangeLog | 14 | ||||
-rw-r--r-- | dev-util/netbeans/files/5.5/deps-txt.patch | 11 | ||||
-rw-r--r-- | dev-util/netbeans/files/5.5/mdr_extras_jdbcstorage_build.xml.patch | 34 | ||||
-rw-r--r-- | dev-util/netbeans/files/5.5/mdr_extras_mdrant_build.xml.patch | 34 | ||||
-rw-r--r-- | dev-util/netbeans/files/5.5/modules-txt.patch | 10 | ||||
-rw-r--r-- | dev-util/netbeans/files/5.5/public-packages-txt.patch | 25 | ||||
-rw-r--r-- | dev-util/netbeans/files/5.5/startscript.sh | 21 | ||||
-rw-r--r-- | dev-util/netbeans/files/digest-netbeans-5.5 | 9 | ||||
-rw-r--r-- | dev-util/netbeans/metadata.xml | 16 | ||||
-rw-r--r-- | dev-util/netbeans/netbeans-5.5.ebuild | 409 |
10 files changed, 578 insertions, 5 deletions
diff --git a/dev-util/netbeans/ChangeLog b/dev-util/netbeans/ChangeLog index 99e900bf903d..317c158a107d 100644 --- a/dev-util/netbeans/ChangeLog +++ b/dev-util/netbeans/ChangeLog @@ -1,6 +1,18 @@ # ChangeLog for dev-util/netbeans # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/netbeans/ChangeLog,v 1.39 2006/10/05 18:52:54 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/netbeans/ChangeLog,v 1.40 2006/11/04 10:01:54 wltjr Exp $ + +*netbeans-5.5 (04 Nov 2006) + + 04 Nov 2006; William L. Thomson Jr. <wltjr@gentoo.org> + +files/5.5/deps-txt.patch, +files/5.5/files-layout-txt.patch, + +files/5.5/mdr_extras_jdbcstorage_build.xml.patch, + +files/5.5/mdr_extras_mdrant_build.xml.patch, + +files/5.5/modules-txt.patch, +files/5.5/public-packages-txt.patch, + +files/5.5/startscript.sh, +netbeans-5.5.ebuild: + Initial ebuild for Netbeans 5.5. Contributions from ali_bush & fordfrog on + runtime issues & making packages for deps. Still uses some bundled stuff, + but uses as much of the system resources as feasible. 05 Oct 2006; Aron Griffis <agriffis@gentoo.org> netbeans-3.6-r1.ebuild: Mark 3.6-r1 stable on ia64 diff --git a/dev-util/netbeans/files/5.5/deps-txt.patch b/dev-util/netbeans/files/5.5/deps-txt.patch new file mode 100644 index 000000000000..0307ecf40c60 --- /dev/null +++ b/dev-util/netbeans/files/5.5/deps-txt.patch @@ -0,0 +1,11 @@ +--- ide/golden/deps.txt 2006-10-03 02:31:07.000000000 +0200 ++++ deps.txt 2006-10-08 22:57:14.000000000 +0200 +@@ -2145,8 +2145,6 @@ + REQUIRES org.openide.text (platform) + REQUIRES org.openide.util (platform) + REQUIRES org.openide.windows (platform) +-MODULE org.netbeans.modules.tomcat5.bundled/1 (j2ee) +- REQUIRES org.netbeans.modules.tomcat5/1 (j2ee) + MODULE org.netbeans.modules.updatecenters/1 (nb) + REQUIRES org.netbeans.modules.autoupdate/1 (platform) + REQUIRES org.openide.modules.ModuleFormat1 diff --git a/dev-util/netbeans/files/5.5/mdr_extras_jdbcstorage_build.xml.patch b/dev-util/netbeans/files/5.5/mdr_extras_jdbcstorage_build.xml.patch new file mode 100644 index 000000000000..29de4607eeba --- /dev/null +++ b/dev-util/netbeans/files/5.5/mdr_extras_jdbcstorage_build.xml.patch @@ -0,0 +1,34 @@ +--- netbeans-src/mdr/extras/jdbcstorage/build.xml 2006-10-05 16:58:43.000000000 +1300 ++++ netbeans-src/mdr/extras/jdbcstorage/build-new.xml 2006-10-05 17:09:48.000000000 +1300 +@@ -1,20 +1,20 @@ + <?xml version="1.0" encoding="UTF-8"?> + + <!-- The contents of this file are subject to the terms of the Common Development +-<!-- and Distribution License (the License). You may not use this file except in +-<!-- compliance with the License. ++ and Distribution License (the License). You may not use this file except in ++ compliance with the License. + +-<!-- You can obtain a copy of the License at http://www.netbeans.org/cddl.html +-<!-- or http://www.netbeans.org/cddl.txt. +-<!-- +-<!-- When distributing Covered Code, include this CDDL Header Notice in each file +-<!-- and include the License file at http://www.netbeans.org/cddl.txt. +-<!-- If applicable, add the following below the CDDL Header, with the fields +-<!-- enclosed by brackets [] replaced by your own identifying information: +-<!-- "Portions Copyrighted [year] [name of copyright owner]" ++ You can obtain a copy of the License at http://www.netbeans.org/cddl.html ++ or http://www.netbeans.org/cddl.txt. ++ ++ When distributing Covered Code, include this CDDL Header Notice in each file ++ and include the License file at http://www.netbeans.org/cddl.txt. ++ If applicable, add the following below the CDDL Header, with the fields ++ enclosed by brackets [] replaced by your own identifying information: ++ "Portions Copyrighted [year] [name of copyright owner]" + + The Original Software is NetBeans. The Initial Developer of the Original +-<!-- Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun ++ Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun + Microsystems, Inc. All Rights Reserved. + --> + diff --git a/dev-util/netbeans/files/5.5/mdr_extras_mdrant_build.xml.patch b/dev-util/netbeans/files/5.5/mdr_extras_mdrant_build.xml.patch new file mode 100644 index 000000000000..53c2e76ab3bc --- /dev/null +++ b/dev-util/netbeans/files/5.5/mdr_extras_mdrant_build.xml.patch @@ -0,0 +1,34 @@ +--- build.ns-src/mdr/extras/mdrant/build.xml 2006-10-05 17:19:25.000000000 +1300 ++++ netbeans-src/mdr/extras/mdrant/build-new.xml 2006-10-05 17:43:31.000000000 +1300 +@@ -1,20 +1,20 @@ + <?xml version="1.0" encoding="UTF-8"?> + + <!-- The contents of this file are subject to the terms of the Common Development +-<!-- and Distribution License (the License). You may not use this file except in +-<!-- compliance with the License. ++ and Distribution License (the License). You may not use this file except in ++ compliance with the License. + +-<!-- You can obtain a copy of the License at http://www.netbeans.org/cddl.html +-<!-- or http://www.netbeans.org/cddl.txt. +-<!-- +-<!-- When distributing Covered Code, include this CDDL Header Notice in each file +-<!-- and include the License file at http://www.netbeans.org/cddl.txt. +-<!-- If applicable, add the following below the CDDL Header, with the fields +-<!-- enclosed by brackets [] replaced by your own identifying information: +-<!-- "Portions Copyrighted [year] [name of copyright owner]" ++ You can obtain a copy of the License at http://www.netbeans.org/cddl.html ++ or http://www.netbeans.org/cddl.txt. ++ ++ When distributing Covered Code, include this CDDL Header Notice in each file ++ and include the License file at http://www.netbeans.org/cddl.txt. ++ If applicable, add the following below the CDDL Header, with the fields ++ enclosed by brackets [] replaced by your own identifying information: ++ "Portions Copyrighted [year] [name of copyright owner]" + + The Original Software is NetBeans. The Initial Developer of the Original +-<!-- Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun ++ Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun + Microsystems, Inc. All Rights Reserved. + --> + diff --git a/dev-util/netbeans/files/5.5/modules-txt.patch b/dev-util/netbeans/files/5.5/modules-txt.patch new file mode 100644 index 000000000000..198e8155e369 --- /dev/null +++ b/dev-util/netbeans/files/5.5/modules-txt.patch @@ -0,0 +1,10 @@ +--- ide/golden/modules.txt 2006-10-03 02:31:07.000000000 +0200 ++++ modules.txt 2006-10-08 22:35:13.000000000 +0200 +@@ -148,7 +148,6 @@ + MODULE org.netbeans.modules.tasklist.core/2 (ide) + MODULE org.netbeans.modules.tasklist.docscan/2 (ide) + MODULE org.netbeans.modules.tomcat5/1 (j2ee) +-MODULE org.netbeans.modules.tomcat5.bundled/1 (j2ee) + MODULE org.netbeans.modules.updatecenters/1 (nb) + MODULE org.netbeans.modules.usersguide/1 (ide) + MODULE org.netbeans.modules.utilities/1 (ide) diff --git a/dev-util/netbeans/files/5.5/public-packages-txt.patch b/dev-util/netbeans/files/5.5/public-packages-txt.patch new file mode 100644 index 000000000000..b7e68f80ed09 --- /dev/null +++ b/dev-util/netbeans/files/5.5/public-packages-txt.patch @@ -0,0 +1,25 @@ +--- ide/golden/public-packages.txt 2006-05-09 04:48:57.000000000 -0400 ++++ netbeans-src/nbbuild/build/generated/public-packages.txt 2006-09-21 01:43:29.000000000 -0400 +@@ -77,6 +77,7 @@ + org.apache.xml.resolver.readers + org.apache.xml.resolver.tools + org.apache.xml.serialize ++org.apache.xmlcommons + org.jdesktop.layout + org.netbeans.api.db.explorer + org.netbeans.api.db.explorer.support +@@ -274,5 +275,14 @@ + org.openide.windows + org.openide.xml + org.openidex.search ++org.w3c.dom ++org.w3c.dom.css ++org.w3c.dom.events + org.w3c.dom.html + org.w3c.dom.ranges ++org.w3c.dom.stylesheets ++org.w3c.dom.traversal ++org.w3c.dom.views ++org.xml.sax ++org.xml.sax.ext ++org.xml.sax.helpers diff --git a/dev-util/netbeans/files/5.5/startscript.sh b/dev-util/netbeans/files/5.5/startscript.sh new file mode 100644 index 000000000000..91d573a7c9d3 --- /dev/null +++ b/dev-util/netbeans/files/5.5/startscript.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +check_symlinks() { + for file in `find ${1} -type l` ; do + + if ! test -e ${file} ; then + echo "Broken symlink:" + echo "${file}" + fi + + done +} + +NBDIR="/usr/share/netbeans-5.5" + +check_symlinks ${NBDIR}/ide7/modules/ext +check_symlinks ${NBDIR}/ide7/modules/autoload/ext +check_symlinks ${NBDIR}/enterprise3/config/TagLibraries/JSTL11 +check_symlinks ${NBDIR}/platform6/modules/ext + +${NBDIR}/bin/netbeans "$@" diff --git a/dev-util/netbeans/files/digest-netbeans-5.5 b/dev-util/netbeans/files/digest-netbeans-5.5 new file mode 100644 index 000000000000..3851987fb154 --- /dev/null +++ b/dev-util/netbeans/files/digest-netbeans-5.5 @@ -0,0 +1,9 @@ +MD5 72c8b1462df3a642285e2b4c9b197e82 netbeans-5.5-files-layout-txt.patch.bz2 2543 +RMD160 7650d3ede210872779164d78c0624468e29da9e8 netbeans-5.5-files-layout-txt.patch.bz2 2543 +SHA256 311b21d53b5f27b9c12d9139157179d908ae3c1a57a6f2adb46cbd1f4ddfc81a netbeans-5.5-files-layout-txt.patch.bz2 2543 +MD5 de16a300f772af6b7d29a9d8ddf5a043 netbeans-5_5-ide_sources.tar.bz2 109745446 +RMD160 075f33dbbc666ee00dc8b25281a43dcf49d84247 netbeans-5_5-ide_sources.tar.bz2 109745446 +SHA256 ee521fa4a4807cc41b567ff6bff6d927a61415a4246fd4e6cc24f511b5827999 netbeans-5_5-ide_sources.tar.bz2 109745446 +MD5 4adaf6574008cc05bc04585bdbcc887e netbeans-5_5-javadoc.tar.bz2 11345846 +RMD160 745641defdb56f0e860e3c46f0275f3b44efe808 netbeans-5_5-javadoc.tar.bz2 11345846 +SHA256 50851849d0121e5ffa36cd5e3b9c366d40f9e2cdce4b58f030bb6716e3438c33 netbeans-5_5-javadoc.tar.bz2 11345846 diff --git a/dev-util/netbeans/metadata.xml b/dev-util/netbeans/metadata.xml index 7369d35cdd37..e78f15d30351 100644 --- a/dev-util/netbeans/metadata.xml +++ b/dev-util/netbeans/metadata.xml @@ -1,9 +1,16 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> -<herd>dev-tools</herd> -<herd>java</herd> -<longdescription> + + <herd>dev-tools</herd> + <herd>java</herd> + + <maintainer> + <email>wltjr@gentoo.org</email> + <name>William L. Thomson Jr.</name> + </maintainer> + + <longdescription> NetBeans is dedicated to providing rock solid software development products (NetBeans IDE, NetBeans Platform) that address the needs of developers, users and the businesses who rely on NetBeans as a basis for their products. NetBeans is also a vibrant community where people from just about any country you can think of, have the ability ask questions, give advice, make a wide variety of @@ -13,5 +20,6 @@ companies and individuals looking to sharpen their skills. In June of 2000 NetBeans was made Open Source by Sun Microsystems who remains the project sponsor. Today two products exist: the NetBeans IDE and NetBeans Platform. Both products are free for commercial and noncommercial use. The source code to both are available to anyone, to reuse as they see fit, under the terms of use. -</longdescription> + </longdescription> + </pkgmetadata> diff --git a/dev-util/netbeans/netbeans-5.5.ebuild b/dev-util/netbeans/netbeans-5.5.ebuild new file mode 100644 index 000000000000..2bf89d07fe97 --- /dev/null +++ b/dev-util/netbeans/netbeans-5.5.ebuild @@ -0,0 +1,409 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/netbeans/netbeans-5.5.ebuild,v 1.1 2006/11/04 10:01:54 wltjr Exp $ + +inherit eutils java-pkg-2 java-ant-2 + +DESCRIPTION="NetBeans IDE for Java" +HOMEPAGE="http://www.netbeans.org" + +# ant-mis is stuff we never use put instead of pactching we let the build process use this file +# so adding the license just to be sure +# The list of files in here is not complete but just some I listed. +# Apache-1.1: webserver.jar +# Apache-2.0: ant-misc-1.6.2.zip +# as-is: docbook-xsl-1.65.1.zip, pmd-netbeans35-bin-0.91.zip + +# There are many other scrambled files in Netbeans but the +# default module configuration doesn't use all of them. +# +# Check the experimental tree for useful stuff. +# https://gentooexperimental.org/svn/java/gentoo-java-experimental/dev-util/netbeans/files +# +# This command should be run after ebuild <pkg> unpack in the source root +# 'ebuild netbeans-${PVR}.ebuild compile | grep Unscrambling | grep "\.jar"' +# Check which jars are actually being used to compile Netbeans +# +# This command should be run after ebuild <pkg> install in the image root +# 'find . -name "*.jar" -type f | less' +# Check the list to see that no packed jars get copied to the image +# +# Remove the unset DISPLAY line from src_compile to get graphical license dialogs and pause before +# unscramble + +MY_PV=${PV/_/-} +MY_PV=${MY_PV/./_} + +BASELOCATION="http://us1.mirror.netbeans.org/download/${MY_PV/-//}/fcs/200610171010" +MAINTARBALL="netbeans-${MY_PV}-ide_sources.tar.bz2" +JAVADOCTARBALL="netbeans-${MY_PV}-javadoc.tar.bz2" +FILELAYOUTPATCH="netbeans-5.5-files-layout-txt.patch.bz2" + +SRC_URI="${BASELOCATION}/${MAINTARBALL} + mirror://gentoo/${FILELAYOUTPATCH} + doc? ( ${BASELOCATION}/${JAVADOCTARBALL} )" + +#LICENSE="Apache-1.1 Apache-2.0 SPL W3C sun-bcla-j2eeeditor sun-bcla-javac sun-javac as-is docbook sun-resolver" +LICENSE="CDDL" +SLOT="5.5" +KEYWORDS="~amd64 ~x86" +IUSE="debug doc" + +# dev-java/xml-commons-resolver for future versions +# dev-java/saxpath +# =dev-java/jakarta-regexp-1.3* +# dev-java/javamake-bin +# =dev-java/jaxen-1.1* +# dev-java/jtidy + +# NB 5.5 requires javahelp 2.0_03 not yet released :( +RDEPEND="=virtual/jre-1.5* + >=dev-java/commons-logging-1.0 + dev-java/commons-el + dev-java/sun-jmx + =dev-java/junit-3.8* + =dev-java/servletapi-2.2* + =dev-java/servletapi-2.3* + =dev-java/servletapi-2.4* + dev-java/sac + dev-java/flute + >=dev-java/jmi-interface-1.0-r1 + >=dev-java/javahelp-bin-2.0.02-r1 + =www-servers/tomcat-5.5* + dev-java/sun-j2ee-deployment-bin + dev-java/xml-commons + dev-java/jakarta-jstl + >=dev-java/xerces-2.8.0 + =dev-java/swing-layout-1* + " +DEPEND="${RDEPEND} + =virtual/jdk-1.5* + >=dev-java/ant-1.6.2 + dev-util/pmd + dev-libs/libxslt + =dev-java/xalan-2* +" + +TOMCATSLOT="5.5" + +# Replacement JARs for Netbeans +COMMONS_LOGGING="commons-logging commons-logging.jar commons-logging-1.0.4.jar" +#JASPERCOMPILER="tomcat-${TOMCATSLOT} jasper-compiler.jar jasper-compiler-5.5.9.jar" +#JASPERRUNTIME="tomcat-${TOMCATSLOT} jasper-runtime.jar jasper-runtime-5.5.9.jar" +JH="javahelp-bin jh.jar jh-2.0_02.jar" +JHALL="javahelp-bin jhall.jar jhall-2.0_02.jar" +JMI="jmi-interface jmi.jar jmi.jar" +JSPAPI="servletapi-2.4 jsp-api.jar jsp-api-2.0.jar" +JSR="sun-j2ee-deployment-bin-1.1 sun-j2ee-deployment-bin.jar jsr88javax.jar" +JSTL="jakarta-jstl jstl.jar jstl-1.1.2.jar" +JUNIT="junit junit.jar junit-3.8.1.jar" +MOF="jmi-interface mof.jar mof.jar" +PMD="pmd pmd.jar pmd-1.3.jar" +SERVLET22="servletapi-2.2 servlet.jar servlet-2.2.jar" +SERVLET23="servletapi-2.3 servlet.jar servlet-2.3.jar" +SERVLET24="servletapi-2.4 servlet-api.jar servlet-api-2.4.jar" +STANDARD="jakarta-jstl standard.jar standard-1.1.2.jar" +XERCES="xerces-2 xercesImpl.jar xerces-2.8.0.jar" +XMLCOMMONS="xml-commons xml-apis.jar xml-commons-dom-ranges-1.0.b2.jar" +SWINGLAYOUT="swing-layout-1 swing-layout.jar swing-layout-1.0.jar" +#REGEXP="jakarta-regexp-1.3 jakarta-regexp.jar regexp-1.2.jar" + +S=${WORKDIR}/netbeans-src +BUILDDESTINATION="${S}/nbbuild/netbeans" +ENTERPRISE="3" +IDE_VERSION="7" +PLATFORM="6" +MY_FDIR="${FILESDIR}/${SLOT}" +DESTINATION="${ROOT}usr/share/netbeans-${SLOT}" + +antflags="" + +set_env() { + + antflags="" + + if use debug; then + antflags="${antflags} -Dbuild.compiler.debug=true" + antflags="${antflags} -Dbuild.compiler.deprecation=true" + else + antflags="${antflags} -Dbuild.compiler.deprecation=false" + fi + + antflags="${antflags} -Dstop.when.broken.modules=true" + + # The build will attempt to display graphical + # dialogs for the licence agreements if this is set. + unset DISPLAY + + # -Xmx1g: Increase Java maximum heap size, otherwise ant will die with + # an OutOfMemoryError while building. + # -Djava.awt.headless=true: Sun JDK doesnt like that very much, so + # lets pleasure them too ;-) + # + # We use the ANT_OPTS environment variable because other ways seem to + # fail. + # + export ANT_OPTS="${ANT_OPTS} -Xmx1g -Djava.awt.headless=true" + +} + +src_unpack () { + unpack ${MAINTARBALL} + + if use doc; then + mkdir javadoc && cd javadoc + unpack ${JAVADOCTARBALL} || die "Unable to extract javadoc" + rm -f *.zip + fi + + cd ${S} + unpack ${FILELAYOUTPATCH} + + epatch netbeans-5.5-files-layout-txt.patch + epatch ${FILESDIR}/${SLOT}/modules-txt.patch + epatch ${FILESDIR}/${SLOT}/deps-txt.patch + epatch ${FILESDIR}/${SLOT}/public-packages-txt.patch + epatch ${FILESDIR}/${SLOT}/mdr_extras_jdbcstorage_build.xml.patch + epatch ${FILESDIR}/${SLOT}/mdr_extras_mdrant_build.xml.patch + + cd ${S}/nbbuild + # Disable the bundled Tomcat in favor of Portage installed version + sed -i -e "s%tomcatint/tomcat5/bundled,%%g" *.properties + + set_env + place_symlinks +} + +src_compile() { + + set_env + + # The location of the main build.xml file + cd ${S}/nbbuild + + # Specify the build-nozip target otherwise it will build + # a zip file of the netbeans folder, which will copy directly. + eant ${antflags} + + # Remove non-x86 Linux binaries + find ${BUILDDESTINATION} -type f \ + -name "*.exe" -o \ + -name "*.cmd" -o \ + -name "*.bat" -o \ + -name "*.dll" \ + | xargs rm -f + + # Removing external stuff. They are api docs from external libs. + cd ${BUILDDESTINATION}/ide${IDE_VERSION}/docs + rm -f *.zip + + # The next directory seems to be empty + if ! rmdir doc 2> /dev/null; then + use doc || rm -fr ./doc + fi + + # Use the system ant + cd ${BUILDDESTINATION}/ide${IDE_VERSION}/ant + + rm -fr ./lib + rm -fr ./bin + + # Set a initial default jdk + echo "netbeans_jdkhome=\"\$(java-config -O)\"" >> ${BUILDDESTINATION}/etc/netbeans.conf +} + +src_install() { + insinto $DESTINATION + + einfo "Installing the program..." + cd ${BUILDDESTINATION} + doins -r * + + symlink_extjars ${D}/${DESTINATION} + + fperms 755 \ + ${DESTINATION}/bin/netbeans \ + ${DESTINATION}/platform${PLATFORM}/lib/nbexec + + # The wrapper wrapper :) + newbin ${MY_FDIR}/startscript.sh netbeans-${SLOT} + + # Ant installation + local ANTDIR="${DESTINATION}/ide${IDE_VERSION}/ant" + cd ${D}/${ANTDIR} + + dodir /usr/share/ant-core/lib + dosym /usr/share/ant-core/lib ${ANTDIR}/lib + + dodir /usr/share/ant-core/bin + dosym /usr/share/ant-core/bin ${ANTDIR}/bin + + # Documentation + einfo "Installing Documentation..." + + cd ${D}/${DESTINATION} + + use doc && java-pkg_dohtml -r ${WORKDIR}/javadoc/* + + dodoc build_info + dohtml CREDITS.html README.html netbeans.css + + rm -f build_info CREDITS.html README.html netbeans.css + + # Icons and shortcuts + einfo "Installing icons..." + + dodir ${DESTINATION}/icons + insinto ${DESTINATION}/icons + doins ${S}/ide/branding/release/*png + + for res in "16x16" "24x24" "32x32" "48x48" "128x128" ; do + dodir /usr/share/icons/hicolor/${res}/apps + dosym ${DESTINATION}/icons/netbeans.png /usr/share/icons/hicolor/${res}/apps/netbeans.png + done + + make_desktop_entry netbeans-${SLOT} "Netbeans ${SLOT}" netbeans Development +} + +pkg_postinst () { + einfo "Your tomcat directory might not have the right permissions." + einfo "Please make sure that normal users can read the directory: " + einfo "${ROOT}usr/share/tomcat-${TOMCATSLOT} " + einfo " " + einfo "The integrated Tomcat is not installed, but you can easily " + einfo "use the system Tomcat. See Netbeans documentation if you " + einfo "don't know how to do that. The relevant settings are in the" + einfo "runtime window. " +} + +pkg_postrm() { +# einfo "Removing symlinks to jars from" +# einfo "${DESTINATION}" +# find ${DESTINATION} -type l | xargs rm -fr + + if ! test -e /usr/bin/netbeans-${SLOT}; then + einfo "Because of the way Portage works at the moment" + einfo "symlinks to the system jars are left to:" + einfo "${DESTINATION}" + einfo "If you are uninstalling Netbeans you can safely" + einfo "remove everything in this directory" + fi +} + +# Supporting functions for this ebuild + +function fix_manifest() { + sed -i "s%ext/${1}%$(java-pkg_getjar ${2} ${3})%" ${4} +} + +function place_symlinks() { + einfo "Symlinking scrambled jars to system jars" + +# Commented out till 2.0_03 is released +# cd ${S}/core/external +# hide jh*.jar || die +# java-pkg_jar-from ${JHALL} + + cd ${S}/mdr/external/ + hide jmi.jar mof.jar || die + java-pkg_jar-from ${JMI} || die + java-pkg_jar-from ${MOF} || die + +# Commented out till 2.0_03 is released +# cd ${S}/nbbuild/external +# hide jhall*.jar || die +# java-pkg_jar-from ${JHALL} || die + + cd ${S}/libs/external/ + hide xerces*.jar commons-logging*.jar xml-commons*.jar pmd*.jar || die + java-pkg_jar-from ${XERCES} || die + java-pkg_jar-from ${COMMONS_LOGGING} || die + java-pkg_jar-from ${XMLCOMMONS} || die + java-pkg_jar-from ${PMD} || die + java-pkg_jar-from ${SWINGLAYOUT} || die + + cd ${S}/httpserver/external/ + hide servlet*.jar || die + java-pkg_jar-from ${SERVLET22} || die + + cd ${S}/j2eeserver/external + hide jsr*.jar || die + java-pkg_jar-from ${JSR} || die + + cd ${S}/junit/external/ + hide junit*.jar || die + java-pkg_jar-from ${JUNIT} || die + + cd ${S}/web/external +# hide servlet-*.jar jasper*.jar jsp*.jar jstl*.jar standard*.jar commons-el*.jar || die + hide servlet-*.jar jstl*.jar standard*.jar commons-el*.jar || die + java-pkg_jar-from ${SERVLET23} || die + java-pkg_jar-from ${SERVLET24} || die +# java-pkg_jar-from ${JASPERCOMPILER} || die +# java-pkg_jar-from ${JASPERRUNTIME} || die + java-pkg_jar-from ${JSPAPI} || die + java-pkg_jar-from ${JSTL} || die + java-pkg_jar-from ${STANDARD} || die + java-pkg_jar-from commons-el || die + + cd ${S}/xml/external/ + hide flute*.jar sac*.jar || die + java-pkg_jar-from sac || die + java-pkg_jar-from flute || die +} + +function symlink_extjars() { + einfo "Added symlinks to system jars inside" + einfo "${DESTINATION}" + + cd ${1}/ide${IDE_VERSION}/modules/ext + java-pkg_jar-from ${COMMONS_LOGGING} + java-pkg_jar-from flute + java-pkg_jar-from sac + java-pkg_jar-from ${JMI} + java-pkg_jar-from ${MOF} + java-pkg_jar-from ${JUNIT} + + cd ${1}/ide${IDE_VERSION}/modules/ext + java-pkg_jar-from ${SERVLET22} + java-pkg_jar-from ${XERCES} + java-pkg_jar-from ${XMLCOMMONS} + + cd ${1}/enterprise${ENTERPRISE}/modules/ext + java-pkg_jar-from commons-el + java-pkg_jar-from ${SERVLET23} + java-pkg_jar-from ${SERVLET24} + java-pkg_jar-from ${JSR} +# java-pkg_jar-from ${JASPERCOMPILER} +# java-pkg_jar-from ${JASPERRUNTIME} + java-pkg_jar-from ${JSPAPI} + java-pkg_jar-from jakarta-jstl jstl.jar + java-pkg_jar-from jakarta-jstl standard.jar + +# Commented out JHALL till 2.0_03 is released + cd ${1}/platform${PLATFORM}/modules/ext + java-pkg_jar-from ${SWINGLAYOUT} +# java-pkg_jar-from ${JHALL} +} + +function hide() { + for x in $@ ; do + mv $x _$x + done +} + +function unscramble_and_empty() { + echo $(pwd) + yes yes 2> /dev/null | ant ${antflags} unscramble > /dev/null || die "Failed to unscramble" + remove_unscrambling +} + +function remove_unscrambling() { + local file=${1} + + [ -z ${file} ] && file="build.xml" + + xsltproc -o ${T}/out.xml ${FILESDIR}/emptyunscramble.xsl ${file} \ + || die "Failed to remove unscrambling from one of the build.xml files" + mv ${T}/out.xml ${file} +} |