4a5ca21
#!/bin/sh -x
Andrew Overholt 152ea0c
901bfb7
CDTTAG=cdt_7_0_1
4a5ca21
#ECLIPSEBASE=$(rpm --eval %{_libdir})/eclipse
4a5ca21
4a5ca21
if test x`uname -i` = 'xi386'; then export plat=""; else export plat=-`uname -i`; fi
4a5ca21
4a5ca21
# eclipse -nosplash -consolelog -application org.eclipse.equinox.p2.director -repository http://download.eclipse.org/technology/subversive/0.7/pde-update-site/ -installIU org.eclipse.team.svn.pde.build.feature.group
Andrew Overholt 152ea0c
Andrew Overholt 152ea0c
mkdir -p temp && cd temp
4a5ca21
TEMPDIR=$(pwd)
Andrew Overholt 152ea0c
mkdir -p home
b254d6e
mkdir -p ws
4a5ca21
# we need to use a special svn pde extension to fetch some parts for the cdt build so we unzip a fresh 3.6 SDK and add the
4a5ca21
# special plug-in via the p2 director
Jeff Johnston f52ba03
rm -rf sdk
4a5ca21
mkdir -p sdk
4a5ca21
pushd sdk
901bfb7
wget http://download.eclipse.org/eclipse/downloads/drops/R-3.6-201006080911/eclipse-SDK-3.6-linux-gtk${plat}.tar.gz
901bfb7
tar -xzvf eclipse-SDK-3.6-linux-gtk${plat}.tar.gz
4a5ca21
ECLIPSEBASE=$TEMPDIR/sdk/eclipse
Jeff Johnston f52ba03
# pushd eclipse
Jeff Johnston f52ba03
# ./eclipse -nosplash -consolelog -application org.eclipse.equinox.p2.director -repository http://download.eclipse.org/technology/subversive/0.7/pde-update-site/ -installIU org.eclipse.team.svn.pde.build.feature.group
Jeff Johnston f52ba03
# popd
Jeff Johnston f52ba03
pushd eclipse/plugins
901bfb7
wget http://download.eclipse.org/technology/subversive/0.7/pde-update-site/plugins/org.eclipse.team.svn.pde.build_0.7.8.I20090525-1500.jar
4a5ca21
popd
4a5ca21
popd
4a5ca21
Andrew Overholt 152ea0c
rm -rf org.eclipse.cdt-releng
Andrew Overholt 152ea0c
cvs -d:pserver:anonymous@dev.eclipse.org:/cvsroot/tools export -r $CDTTAG org.eclipse.cdt-releng/org.eclipse.cdt.releng
4a5ca21
Andrew Overholt 152ea0c
cd org.eclipse.cdt-releng/org.eclipse.cdt.releng/
Andrew Overholt 152ea0c
Andrew Overholt 152ea0c
# The build.xml doesn't fetch master or testing features so we must add this ourselves.
4a5ca21
sed --in-place -e'94,94i\\t\t<ant antfile="build.xml" dir="${pde.build.scripts}" target="fetch">\n\t\t\t<property name="builder" value="${basedir}/master"/>\n\t\t</ant>' build.xml
4a5ca21
sed --in-place -e'94,94i\\t\t<ant antfile="build.xml" dir="${pde.build.scripts}" target="fetch">\n\t\t\t<property name="builder" value="${basedir}/testing"/>\n\t\t</ant>' build.xml
23365bc
sed --in-place -e'71,71i\\t\t<ant antfile="build.xml" dir="${pde.build.scripts}" target="preBuild">\n\t\t\t<property name="builder" value="${basedir}/master"/>\n\t\t</ant>' build.xml
23365bc
sed --in-place -e'71,71i\\t\t<ant antfile="build.xml" dir="${pde.build.scripts}" target="preBuild">\n\t\t\t<property name="builder" value="${basedir}/testing"/>\n\t\t</ant>' build.xml
4a5ca21
sed --in-place -e'71,71i\\t\t<ant antfile="build.xml" dir="${pde.build.scripts}" target="preBuild">\n\t\t\t<property name="builder" value="${basedir}/codan"/>\n\t\t</ant>' build.xml
Andrew Overholt 152ea0c
Andrew Overholt 152ea0c
# Remove copying of binary jar in build.xml.  We remove this jar so this operation will fail.
9933826
sed --in-place -e "/copy file=\"\${buildDirectory}.*net\.sourceforge\.lpg/,/\/>/"d build.xml 
Andrew Overholt 152ea0c
4a5ca21
pushd codan
4a5ca21
# the feature id does not match what is found in the customTargets.xml which causes pdebuild to stop so make it the same
4a5ca21
sed --in-place -e "s,value=\"org.eclipse.cdt.codan\",value=\"org.eclipse.cdt.codan.feature\",g" customTargets.xml
4a5ca21
popd
4a5ca21
4d3d8c3
pushd maps
4a5ca21
# fix the CVS locations to use pserver rather than expecting to be on the actual eclipse.org build machine
4a5ca21
sed --in-place -e "s,/cvsroot/tools,:pserver:anonymous@dev.eclipse.org/cvsroot/tools,g" cdt.map
4a5ca21
sed --in-place -e "s,/cvsroot/eclipse,:pserver:anonymous@dev.eclipse.org/cvsroot/eclipse,g" cdt.map
4a5ca21
# never use HEAD...specify a tag
4a5ca21
sed --in-place -e "s,HEAD,R3_6,g" cdt.map
4d3d8c3
popd
4d3d8c3
4a5ca21
PDEBUILDVERSION=$(ls $ECLIPSEBASE/plugins | grep org.eclipse.pde.build_ | sed 's/org.eclipse.pde.build_//')
4a5ca21
$ECLIPSEBASE/eclipse -nosplash \
b254d6e
     -Duser.home=../../home \
4a5ca21
      -Dorg.eclipse.equinox.p2.reconciler.dropins.directory=$TEMPDIR/dropins \
b254d6e
-XX:CompileCommand="exclude,org/eclipse/core/internal/dtree/DataTreeNode,forwardDeltaWith" \
b254d6e
-XX:CompileCommand="exclude,org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding,<init>" \
b254d6e
-XX:CompileCommand="exclude,org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPTemplates,instantiateTemplate" \
b254d6e
-XX:CompileCommand="exclude,org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage,addBinding" \
b254d6e
     org.eclipse.core.launcher.Main             \
4a5ca21
  -Dpde.build.scripts=$ECLIPSEBASE/plugins/org.eclipse.pde.build_$PDEBUILDVERSION/scripts \
Andrew Overholt 152ea0c
  -application org.eclipse.ant.core.antRunner \
Andrew Overholt 152ea0c
  -buildfile build.xml -DbaseLocation=$ECLIPSEBASE \
4a5ca21
  -Dpde.build.scripts=$ECLIPSEBASE/plugins/org.eclipse.pde.build_$PDEBUILDVERSION/scripts \
4a5ca21
  -Dorg.eclipse.equinox.p2.reconciler.dropins.directory=$TEMPDIR/dropins \
Andrew Overholt 152ea0c
  -DcdtTag=$CDTTAG \
Andrew Overholt 152ea0c
  -DdontUnzip=true fetch
Andrew Overholt 152ea0c
Andrew Overholt 152ea0c
find . -name net.*.jar -exec rm {} \;
Andrew Overholt 152ea0c
Andrew Overholt 152ea0c
cd .. && tar jcf eclipse-cdt-fetched-src-$CDTTAG.tar.bz2 org.eclipse.cdt.releng