| 1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/dev-java/netbeans-mobility/netbeans-mobility-7.1.1.ebuild,v 1.2 2012/05/06 12:09:50 ago Exp $
|
| 4 |
|
| 5 |
EAPI="4"
|
| 6 |
WANT_ANT_TASKS="ant-nodeps"
|
| 7 |
inherit eutils java-pkg-2 java-ant-2
|
| 8 |
|
| 9 |
DESCRIPTION="Netbeans Mobility Cluster"
|
| 10 |
HOMEPAGE="http://netbeans.org/features/platform/"
|
| 11 |
SLOT="7.1"
|
| 12 |
SOURCE_URL="http://dlc.sun.com.edgesuite.net/netbeans/7.1.1/final/zip/netbeans-7.1.1-201203012225-src.zip"
|
| 13 |
SRC_URI="${SOURCE_URL}
|
| 14 |
http://dev.gentoo.org/~fordfrog/distfiles/netbeans-9999-r1-build.xml.patch.bz2
|
| 15 |
http://hg.netbeans.org/binaries/CEF99941E945D543DF0711F2C6AEF765B50F8501-jakarta-slide-ant-webdav-2.1.jar
|
| 16 |
http://hg.netbeans.org/binaries/D1B5BA3BFE8DCFAF08A0468F8879EF1D0E998038-jakarta-slide-webdavlib-2.1.jar
|
| 17 |
http://hg.netbeans.org/binaries/2FB485DD8C5EFC7972037781BFFF0CE31316FCE6-jmunit-1.2.1-api.zip
|
| 18 |
http://hg.netbeans.org/binaries/BD84F1A4C0789070CC62A8D2DBA75121A57C069C-jmunit4cldc10-1.2.1.jar
|
| 19 |
http://hg.netbeans.org/binaries/D76B8334DCBDBE93297AA5C02B17D9A856E72246-jmunit4cldc11-1.2.1.jar
|
| 20 |
http://hg.netbeans.org/binaries/D63B2CB355170F1BC8E126E43021047F94243B70-perseus-nb-1.0.1.jar"
|
| 21 |
LICENSE="|| ( CDDL GPL-2-with-linking-exception )"
|
| 22 |
KEYWORDS="amd64 x86"
|
| 23 |
IUSE=""
|
| 24 |
S="${WORKDIR}"
|
| 25 |
|
| 26 |
CDEPEND="~dev-java/netbeans-apisupport-${PV}
|
| 27 |
~dev-java/netbeans-enterprise-${PV}
|
| 28 |
~dev-java/netbeans-ide-${PV}
|
| 29 |
~dev-java/netbeans-java-${PV}
|
| 30 |
~dev-java/netbeans-platform-${PV}
|
| 31 |
~dev-java/netbeans-websvccommon-${PV}
|
| 32 |
dev-java/ant-contrib:0
|
| 33 |
dev-java/commons-httpclient:3
|
| 34 |
dev-java/jdom:1.0"
|
| 35 |
DEPEND="virtual/jdk:1.6
|
| 36 |
app-arch/unzip
|
| 37 |
${CDEPEND}
|
| 38 |
dev-java/javahelp:0"
|
| 39 |
RDEPEND=">=virtual/jdk-1.6
|
| 40 |
${CDEPEND}"
|
| 41 |
|
| 42 |
INSTALL_DIR="/usr/share/${PN}-${SLOT}"
|
| 43 |
|
| 44 |
EANT_BUILD_XML="nbbuild/build.xml"
|
| 45 |
EANT_BUILD_TARGET="rebuild-cluster"
|
| 46 |
EANT_EXTRA_ARGS="-Drebuild.cluster.name=nb.cluster.mobility -Dext.binaries.downloaded=true"
|
| 47 |
EANT_FILTER_COMPILER="ecj-3.3 ecj-3.4 ecj-3.5 ecj-3.6 ecj-3.7"
|
| 48 |
JAVA_PKG_BSFIX="off"
|
| 49 |
|
| 50 |
src_unpack() {
|
| 51 |
unpack $(basename ${SOURCE_URL})
|
| 52 |
|
| 53 |
einfo "Deleting bundled jars..."
|
| 54 |
find -name "*.jar" -type f | grep -vE "mobility.databindingme/lib/netbeans_databindingme.*\.jar" \
|
| 55 |
| grep -v "vmd.components.midp/netbeans_midp_components_basic/dist/netbeans_midp_components_basic.jar" \
|
| 56 |
| grep -v "vmd.components.midp.pda/netbeans_midp_components_pda/dist/netbeans_midp_components_pda.jar" \
|
| 57 |
| grep -v "vmd.components.midp.wma/netbeans_midp_components_wma/dist/netbeans_midp_components_wma.jar" \
|
| 58 |
| grep -v "vmd.components.svg/nb_svg_midp_components/dist/nb_svg_midp_components.jar" | xargs rm
|
| 59 |
|
| 60 |
unpack netbeans-9999-r1-build.xml.patch.bz2
|
| 61 |
|
| 62 |
pushd "${S}" >/dev/null || die
|
| 63 |
ln -s "${DISTDIR}"/CEF99941E945D543DF0711F2C6AEF765B50F8501-jakarta-slide-ant-webdav-2.1.jar mobility.deployment.webdav/external/jakarta-slide-ant-webdav-2.1.jar || die
|
| 64 |
ln -s "${DISTDIR}"/D1B5BA3BFE8DCFAF08A0468F8879EF1D0E998038-jakarta-slide-webdavlib-2.1.jar mobility.deployment.webdav/external/jakarta-slide-webdavlib-2.1.jar || die
|
| 65 |
ln -s "${DISTDIR}"/2FB485DD8C5EFC7972037781BFFF0CE31316FCE6-jmunit-1.2.1-api.zip mobility.j2meunit/external/jmunit-1.2.1-api.zip || die
|
| 66 |
ln -s "${DISTDIR}"/BD84F1A4C0789070CC62A8D2DBA75121A57C069C-jmunit4cldc10-1.2.1.jar mobility.j2meunit/external/jmunit4cldc10-1.2.1.jar || die
|
| 67 |
ln -s "${DISTDIR}"/D76B8334DCBDBE93297AA5C02B17D9A856E72246-jmunit4cldc11-1.2.1.jar mobility.j2meunit/external/jmunit4cldc11-1.2.1.jar || die
|
| 68 |
ln -s "${DISTDIR}"/D63B2CB355170F1BC8E126E43021047F94243B70-perseus-nb-1.0.1.jar svg.perseus/external/perseus-nb-1.0.1.jar || die
|
| 69 |
popd >/dev/null || die
|
| 70 |
}
|
| 71 |
|
| 72 |
src_prepare() {
|
| 73 |
einfo "Deleting bundled class files..."
|
| 74 |
find -name "*.class" -type f | xargs rm -vf
|
| 75 |
|
| 76 |
epatch netbeans-9999-r1-build.xml.patch
|
| 77 |
|
| 78 |
# Support for custom patches
|
| 79 |
if [ -n "${NETBEANS9999_PATCHES_DIR}" -a -d "${NETBEANS9999_PATCHES_DIR}" ] ; then
|
| 80 |
local files=`find "${NETBEANS9999_PATCHES_DIR}" -type f`
|
| 81 |
|
| 82 |
if [ -n "${files}" ] ; then
|
| 83 |
einfo "Applying custom patches:"
|
| 84 |
|
| 85 |
for file in ${files} ; do
|
| 86 |
epatch "${file}"
|
| 87 |
done
|
| 88 |
fi
|
| 89 |
fi
|
| 90 |
|
| 91 |
einfo "Symlinking external libraries..."
|
| 92 |
java-pkg_jar-from --build-only --into javahelp/external javahelp jhall.jar jhall-2.0_05.jar
|
| 93 |
java-pkg_jar-from --into mobility.antext/external ant-contrib ant-contrib.jar ant-contrib-1.0b3.jar
|
| 94 |
java-pkg_jar-from --into mobility.deployment.webdav/external commons-httpclient-3 commons-httpclient.jar commons-httpclient-3.0.1.jar
|
| 95 |
java-pkg_jar-from --into mobility.deployment.webdav/external jdom-1.0 jdom.jar jdom-1.0.jar
|
| 96 |
|
| 97 |
einfo "Linking in other clusters..."
|
| 98 |
mkdir "${S}"/nbbuild/netbeans || die
|
| 99 |
pushd "${S}"/nbbuild/netbeans >/dev/null || die
|
| 100 |
|
| 101 |
ln -s /usr/share/netbeans-apisupport-${SLOT} apisupport || die
|
| 102 |
cat /usr/share/netbeans-apisupport-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
|
| 103 |
touch nb.cluster.apisupport.built
|
| 104 |
|
| 105 |
ln -s /usr/share/netbeans-enterprise-${SLOT} enterprise || die
|
| 106 |
cat /usr/share/netbeans-enterprise-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
|
| 107 |
touch nb.cluster.enterprise.built
|
| 108 |
|
| 109 |
ln -s /usr/share/netbeans-ide-${SLOT} ide || die
|
| 110 |
cat /usr/share/netbeans-ide-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
|
| 111 |
touch nb.cluster.ide.built
|
| 112 |
|
| 113 |
ln -s /usr/share/netbeans-java-${SLOT} java || die
|
| 114 |
cat /usr/share/netbeans-java-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
|
| 115 |
touch nb.cluster.java.built
|
| 116 |
|
| 117 |
ln -s /usr/share/netbeans-platform-${SLOT} platform || die
|
| 118 |
cat /usr/share/netbeans-platform-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
|
| 119 |
touch nb.cluster.platform.built
|
| 120 |
|
| 121 |
ln -s /usr/share/netbeans-websvccommon-${SLOT} websvccommon || die
|
| 122 |
cat /usr/share/netbeans-websvccommon-${SLOT}/moduleCluster.properties >> moduleCluster.properties || die
|
| 123 |
touch nb.cluster.websvccommon.built
|
| 124 |
|
| 125 |
popd >/dev/null || die
|
| 126 |
|
| 127 |
java-pkg-2_src_prepare
|
| 128 |
}
|
| 129 |
|
| 130 |
src_install() {
|
| 131 |
pushd nbbuild/netbeans/mobility >/dev/null || die
|
| 132 |
|
| 133 |
insinto ${INSTALL_DIR}
|
| 134 |
|
| 135 |
grep -E "/mobility$" ../moduleCluster.properties > "${D}"/${INSTALL_DIR}/moduleCluster.properties || die
|
| 136 |
|
| 137 |
doins -r *
|
| 138 |
rm -rf "${D}"/${INSTALL_DIR}/modules/lib || die
|
| 139 |
|
| 140 |
popd >/dev/null || die
|
| 141 |
|
| 142 |
local instdir=${INSTALL_DIR}/modules/ext
|
| 143 |
pushd "${D}"/${instdir} >/dev/null || die
|
| 144 |
rm ant-contrib-1.0b3.jar && dosym /usr/share/ant-contrib/lib/ant-contrib.jar ${instdir}/ant-contrib-1.0b3.jar || die
|
| 145 |
# cdc-agui-swing-layout.jar
|
| 146 |
# cdc-pp-awt-layout.jar
|
| 147 |
rm commons-httpclient-3.0.1.jar && dosym /usr/share/commons-httpclient-3/lib/commons-httpclient.jar ${instdir}/commons-httpclient-3.0.1.jar || die
|
| 148 |
# jakarta-slide-ant-webdav-2.1.jar
|
| 149 |
# jakarta-slide-webdavlib-2.1.jar
|
| 150 |
rm jdom-1.0.jar && dosym /usr/share/jdom-1.0/lib/jdom.jar ${instdir}/jdom-1.0.jar || die
|
| 151 |
# jmunit4cldc10-1.2.1.jar
|
| 152 |
# jmunit4cldc11-1.2.1.jar
|
| 153 |
# nbactivesync-5.0.jar
|
| 154 |
# nb_svg_midp_components.jar
|
| 155 |
# netbeans_databindingme.jar
|
| 156 |
# netbeans_databindingme_pim.jar
|
| 157 |
# netbeans_databindingme_svg.jar
|
| 158 |
# netbeans_midp_components_basic.jar
|
| 159 |
# netbeans_midp_components_pda.jar
|
| 160 |
# netbeans_midp_components_wma.jar
|
| 161 |
# org-netbeans-modules-deployment-deviceanywhere.jar
|
| 162 |
# org-netbeans-modules-j2me-cdc-platform-nsicom-probe.jar
|
| 163 |
# org-netbeans-modules-j2me-cdc-project.jar
|
| 164 |
# org-netbeans-modules-j2me-cdc-project-nokiaS80.jar
|
| 165 |
# org-netbeans-modules-j2me-cdc-project-ojec.jar
|
| 166 |
# org-netbeans-modules-j2me-cdc-project-ricoh.jar
|
| 167 |
# org-netbeans-modules-j2me-cdc-project-savaje.jar
|
| 168 |
# org-netbeans-modules-j2me-cdc-project-semc.jar
|
| 169 |
# org-netbeans-modules-j2me-cdc-project-sjmc.jar
|
| 170 |
# perseus-nb-1.0.1.jar
|
| 171 |
# RicohAntTasks-2.0.jar
|
| 172 |
popd >/dev/null || die
|
| 173 |
|
| 174 |
dosym ${INSTALL_DIR} /usr/share/netbeans-nb-${SLOT}/mobility
|
| 175 |
}
|