[eclipse-cdt] Add /usr/bin/cdtdebug binary

Jeff Johnston jjohnstn at fedoraproject.org
Fri Jun 13 22:22:42 UTC 2014


commit 48ea26ace5442e8ebadf20cb94dc2882c77cd41b
Author: Jeff Johnston <jjohnstn at redhat.com>
Date:   Fri Jun 13 18:22:21 2014 -0400

    Add /usr/bin/cdtdebug binary
    
    - Fix cdtdebug config.ini to have full paths to dropins plugins
    - Remove org.eclipse.cdt.core.tests from being shipped in base package
    - Add Requires for eclipse-remote

 eclipse-cdt-add-ISO-8859-1.patch  |   11 ++++
 eclipse-cdt-cdtdebug-readme.patch |   50 ++++++++++++++++
 eclipse-cdt-cdtdebug.patch        |   35 +++++++++++
 eclipse-cdt-config-ini.patch      |   12 ++++
 eclipse-cdt.spec                  |  115 ++++++++++++++++++++++++++++++++++---
 5 files changed, 214 insertions(+), 9 deletions(-)
---
diff --git a/eclipse-cdt-add-ISO-8859-1.patch b/eclipse-cdt-add-ISO-8859-1.patch
new file mode 100644
index 0000000..f68a537
--- /dev/null
+++ b/eclipse-cdt-add-ISO-8859-1.patch
@@ -0,0 +1,11 @@
+diff -up ./pom.xml.fix ./pom.xml
+--- ./pom.xml.fix	2014-05-21 18:48:25.169545378 -0400
++++ ./pom.xml	2014-05-21 18:49:11.929338484 -0400
+@@ -17,6 +17,7 @@
+ 	<properties>
+ 		<tycho-version>0.20.0</tycho-version>
+ 		<tycho-extras-version>0.20.0</tycho-extras-version>
++		<project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>
+ 		<download-site>http://download.eclipse.org</download-site>
+ 		<platform-site>${download-site}/eclipse/updates/${platform-version}</platform-site>
+ 		<orbit-site>${download-site}/tools/orbit/downloads/drops/${orbit-version}/repository</orbit-site>
diff --git a/eclipse-cdt-cdtdebug-readme.patch b/eclipse-cdt-cdtdebug-readme.patch
new file mode 100644
index 0000000..4fd945e
--- /dev/null
+++ b/eclipse-cdt-cdtdebug-readme.patch
@@ -0,0 +1,50 @@
+diff -up ./debug/org.eclipse.cdt.debug.application/scripts/README.fix ./debug/org.eclipse.cdt.debug.application/scripts/README
+--- ./debug/org.eclipse.cdt.debug.application/scripts/README.fix	2014-06-09 16:54:24.072430881 -0400
++++ ./debug/org.eclipse.cdt.debug.application/scripts/README	2014-06-09 17:05:38.052725022 -0400
+@@ -3,23 +3,16 @@ is needed of the CDT plug-ins to debug a
+ Editing is allowed, but you will need to rebuild outside the Stand-alone Debugger for
+ those changes to manifest in your debugging session.
+ 
+-To install the Stand-alone debugger locally in your $HOME directory, run the install.sh
+-script directly from the scripts sub-directory of the plugins directory in your
+-Eclipse installation:
+-
+-  sh ./install.sh
+-
+-The script uses relative directories so you cannot run the script from any other working directory.
+-
+-The install script will create a cdtdebugger directory in your $HOME directory.  This
+-directory will contain a config.ini file, a dev.properties file, and a cdtdebug.sh script.
+-The cdtdebug.sh script will start the debugger from the command-line.  It does not
+-have relative directories so you can move it around as you like.
++To run the Stand-alone debugger, use the /usr/bin/cdtdebug script.  The first time
++the script is run, it will create a cdtdebugger sub-directory in your $HOME directory.  This
++directory will contain a config.ini file and a dev.properties file.
++
++The /usr/bin/cdtdebug script will start the debugger from the command-line.
+ 
+ The script takes a few options which are mentioned below:
+ 
+ -data : workspace to use for your Eclipse session if you do not want the default
+-        $HOME/workspace-gdbstandalone
++        $HOME/workspace-cdtdebug
+         
+ -consoleLog : if you want error messages reported directly to the command console
+ 
+@@ -42,12 +35,12 @@ If no -a or -e option is specified, the
+ debugging.  Otherwise, if this is the first time, a dialog will be presented to enter
+ an executable, build log, and program arguments.
+ 
+-  e.g. sh ~/cdtdebugger/cdtdebug.sh -b ~/build.log ~/myproject/bin/a.out arg1 arg2
++  e.g. cdtdebug -b ~/build.log ~/myproject/bin/a.out arg1 arg2
+ 
+-The cdtdebug.sh script that is found in the plug-in can also be run directly, but only
++The cdtdebug script that is found in this plug-in can also be run directly, but only
+ in this scripts directory as it uses relative directories to find the Eclipse instance and
+ the plugins directory.
+ 
+   e.g. sh ./cdtdebug.sh -b ~/build.log ~/myproject/bin/a.out arg1 arg2
+ 
+-                     
+\ No newline at end of file
++
diff --git a/eclipse-cdt-cdtdebug.patch b/eclipse-cdt-cdtdebug.patch
new file mode 100644
index 0000000..1bfffae
--- /dev/null
+++ b/eclipse-cdt-cdtdebug.patch
@@ -0,0 +1,35 @@
+diff -up ./debug/org.eclipse.cdt.debug.application/scripts/cdtdebug.sh.fix ./debug/org.eclipse.cdt.debug.application/scripts/cdtdebug.sh
+--- ./debug/org.eclipse.cdt.debug.application/scripts/cdtdebug.sh.fix	2014-06-03 15:04:05.484431542 -0400
++++ ./debug/org.eclipse.cdt.debug.application/scripts/cdtdebug.sh	2014-06-03 15:15:02.415172277 -0400
+@@ -9,23 +9,26 @@
+ # Contributors:
+ #    Red Hat Inc. - initial API and implementation
+ ###############################################################################
++ECLIPSE_HOME=@ECLIPSE_HOME@
+ if [ ! -d $HOME/cdtdebugger ]; then
+ mkdir -p $HOME/cdtdebugger
+ cp config.ini $HOME/cdtdebugger
+ cp dev.properties $HOME/cdtdebugger
+ fi
+-pushd ../.. >/dev/null
++pushd $ECLIPSE_HOME/plugins >/dev/null
+ OSGI_JAR=`ls org.eclipse.osgi_*.jar`
+-SWT_JAR=`ls org.eclipse.swt.*.jar`
++SWT_JAR=`ls -d org.eclipse.swt.*`
+ SWT_PLUGIN=`echo $SWT_JAR | sed -e "s/_[0-9]*\..*.jar//"`
+-FS_JAR=`ls org.eclipse.core.filesystem.*.jar`
++FS_JAR=`ls org.eclipse.core.filesystem.*.jar | grep -v java7`
+ FS_PLUGIN=`echo $FS_JAR | sed -e "s/_[0-9]*\..*.jar//"`
++popd >/dev/null
++pushd @CDT_DROPINS@ >/dev/null
+ LINUX_JAR=`ls org.eclipse.cdt.core.linux.*.jar`
+ LINUX_PLUGIN=`echo $LINUX_JAR | sed -e "s/_[0-9]*\..*.jar//"`
+-cd ..; ECLIPSE_HOME=`pwd`
+ popd >/dev/null
+ $ECLIPSE_HOME/eclipse -clean -product org.eclipse.cdt.debug.application.product \
+--data $HOME/workspace-gdbstandlone -configuration file\:$HOME/cdtdebugger \
++-application org.eclipse.cdt.debug.application.app \
++-data $HOME/workspace-cdtdebug -configuration file\:$HOME/cdtdebugger \
+ -dev file\:$HOME/cdtdebugger/dev.properties $@ \
+ -vmargs -Dosgi.jar=$OSGI_JAR -Dswt.plugin=$SWT_PLUGIN -Dfs.plugin=$FS_PLUGIN \
+ -Dlinux.plugin=$LINUX_PLUGIN -Declipse.home=$ECLIPSE_HOME
diff --git a/eclipse-cdt-config-ini.patch b/eclipse-cdt-config-ini.patch
new file mode 100644
index 0000000..bdc61e6
--- /dev/null
+++ b/eclipse-cdt-config-ini.patch
@@ -0,0 +1,12 @@
+diff -up ./debug/org.eclipse.cdt.debug.application/scripts/config.ini.fix ./debug/org.eclipse.cdt.debug.application/scripts/config.ini
+--- ./debug/org.eclipse.cdt.debug.application/scripts/config.ini.fix	2014-06-02 19:17:41.090486098 -0400
++++ ./debug/org.eclipse.cdt.debug.application/scripts/config.ini	2014-06-02 19:31:52.343540981 -0400
+@@ -2,6 +2,6 @@
+ #Fri Dec 20 17:38:27 EST 2013
+ osgi.install.area=file\:$eclipse.home$
+ osgi.framework=file\:$eclipse.home$/plugins/$osgi.jar$
+-osgi.bundles=org.eclipse.cdt.core.linux,org.eclipse.e4.core.di.extensions,org.eclipse.cdt.debug.ui.memory.floatingpoint,org.eclipse.ui.editors,org.eclipse.equinox.ds at 1\:start,org.eclipse.search,org.eclipse.text,org.eclipse.jface.databinding,org.eclipse.cdt.debug.ui.memory.search,org.eclipse.debug.core,org.apache.batik.util,org.eclipse.cdt.debug.ui.memory.memorybrowser,org.eclipse.e4.ui.widgets,org.eclipse.cdt.debug.core,org.eclipse.ui,org.eclipse.cdt.make.core,javax.annotation,org.eclipse.equinox.registry,org.eclipse.cdt.dsf.ui,org.eclipse.cdt.debug.ui.memory.traditional,org.eclipse.cdt.ui,org.eclipse.ui.ide,org.w3c.dom.svg,org.eclipse.jface,org.eclipse.core.runtime.compatibility.auth,org.eclipse.ltk.ui.refactoring,org.w3c.dom.smil,org.eclipse.e4.ui.model.workbench,org.eclipse.equinox.bidi,org.eclipse.e4.ui.workbench,org.eclipse.e4.ui.di,org.eclipse.debug.ui,org.eclipse.e4.ui.bindings,org.eclipse.core.contenttype,org.eclipse.e4.ui.workbench.swt,org.eclipse.ui.views,org.ecli
 pse.emf.ecore.change,org.eclipse.equinox.app,org.eclipse.e4.ui.services,org.eclipse.ant.core,org.eclipse.equinox.p2.core,org.eclipse.cdt.core,org.eclipse.cdt.debug.application,org.eclipse.cdt.debug.application.doc,org.eclipse.core.resources,org.eclipse.team.ui,org.eclipse.equinox.common at 2\:start,org.eclipse.equinox.p2.engine,org.eclipse.cdt.debug.ui,org.eclipse.ui.views.properties.tabbed,org.eclipse.help,org.eclipse.help.ui,org.eclipse.help.base,org.eclipse.help.webapp,org.eclipse.equinox.jsp.jasper,org.eclipse.equinox.jsp.jasper.registry,org.apache.jasper.glassfish,org.apache.lucene.core,org.apache.lucene.analysis,org.eclipse.equinox.http.jetty,org.eclipse.equinox.http.registry,org.eclipse.jetty.http,org.eclipse.equinox.http.servlet,org.eclipse.jetty.io,org.eclipse.jetty.server,org.eclipse.jetty.servlet,org.eclipse.jetty.util,org.eclipse.jetty.continuation,org.eclipse.jetty.security,javax.servlet.jsp,javax.el,org.eclipse.core.filesystem,org.eclipse.equinox.event,org.eclipse
 .cdt.dsf.gdb.ui,org.eclipse.ltk.core.refactoring,org.eclipse.cdt.debug.mi.ui,com.ibm.icu,org.eclipse.swt,org.eclipse.core.filebuffers,org.eclipse.e4.ui.workbench.addons.swt,javax.inject,$swt.plugin$,org.eclipse.core.databinding.observable,org.eclipse.core.jobs,org.eclipse.ui.forms,org.eclipse.e4.core.contexts,javax.xml,org.eclipse.core.variables,org.eclipse.ui.navigator,org.eclipse.e4.core.commands,org.eclipse.core.databinding,org.eclipse.core.commands,org.eclipse.ui.workbench,org.eclipse.equinox.util,org.eclipse.cdt.launch,org.w3c.css.sac,org.eclipse.e4.ui.workbench.renderers.swt,org.eclipse.cdt.managedbuilder.core,org.eclipse.jface.text,org.eclipse.cdt.managedbuilder.gnu.ui,org.eclipse.equinox.p2.metadata,org.eclipse.emf.ecore.xmi,org.eclipse.emf.common,org.eclipse.cdt.gdb,org.eclipse.compare.core,$linux.plugin$,org.eclipse.ui.console,org.eclipse.cdt.dsf.gdb,javax.servlet,org.eclipse.equinox.p2.repository,org.eclipse.linuxtools.cdt.libhover.glibc,org.eclipse.equinox.securi
 ty,org.eclipse.compare,org.eclipse.core.runtime at start,org.eclipse.cdt.dsf,org.eclipse.osgi.services,org.eclipse.e4.ui.workbench3,org.eclipse.equinox.preferences,org.w3c.dom.events,org.eclipse.linuxtools.cdt.libhover,org.eclipse.cdt.debug.mi.core,org.eclipse.ui.navigator.resources,org.eclipse.e4.ui.css.core,org.eclipse.ui.workbench.texteditor,org.eclipse.core.expressions,org.eclipse.e4.ui.css.swt.theme,org.eclipse.core.databinding.property,org.eclipse.emf.ecore,org.eclipse.e4.core.services,org.eclipse.cdt.gdb.ui,org.eclipse.core.runtime.compatibility.registry,org.apache.batik.util.gui,org.eclipse.e4.core.di,$fs.plugin$,org.eclipse.team.core,org.eclipse.cdt.debug.ui.memory.transport,org.eclipse.equinox.p2.metadata.repository,org.eclipse.e4.ui.css.swt,org.apache.batik.css
+-osgi.configuration.cascaded=false
++osgi.bundles=org.eclipse.cdt.core.linux,org.eclipse.e4.core.di.extensions,org.eclipse.cdt.debug.ui.memory.floatingpoint,org.eclipse.ui.editors,org.eclipse.equinox.ds at 1\:start,org.eclipse.search,org.eclipse.text,org.eclipse.jface.databinding,org.eclipse.cdt.debug.ui.memory.search,org.eclipse.debug.core,org.apache.batik.util,org.eclipse.cdt.debug.ui.memory.memorybrowser,org.eclipse.e4.ui.widgets,org.eclipse.cdt.debug.core,org.eclipse.ui,org.eclipse.cdt.make.core,org.apache.geronimo.specs.geronimo-annotation_1.1_spec,org.eclipse.equinox.registry,org.eclipse.cdt.dsf.ui,org.eclipse.cdt.debug.ui.memory.traditional,org.eclipse.cdt.ui,org.eclipse.ui.ide,org.w3c.dom.svg,org.eclipse.jface,org.eclipse.ltk.ui.refactoring,org.eclipse.e4.ui.model.workbench,org.eclipse.equinox.bidi,org.eclipse.e4.ui.workbench,org.eclipse.e4.ui.di,org.eclipse.debug.ui,org.eclipse.e4.ui.bindings,org.eclipse.core.contenttype,org.eclipse.e4.ui.workbench.swt,org.eclipse.ui.views,org.eclipse.emf.ecore.change,or
 g.eclipse.equinox.app,org.eclipse.e4.ui.services,org.eclipse.ant.core,org.eclipse.equinox.p2.core,org.eclipse.cdt.core,org.eclipse.cdt.debug.application,org.eclipse.cdt.debug.application.doc,org.eclipse.core.resources,org.eclipse.team.ui,org.eclipse.equinox.common at 2\:start,org.eclipse.equinox.p2.engine,org.eclipse.cdt.debug.ui,org.eclipse.ui.views.properties.tabbed,org.eclipse.help,org.eclipse.help.ui,org.eclipse.help.base,org.eclipse.help.webapp,org.eclipse.equinox.jsp.jasper,org.eclipse.equinox.jsp.jasper.registry,org.glassfish.web.javax.servlet.jsp,org.apache.lucene.core,org.apache.lucene.analysis,org.eclipse.equinox.http.jetty,org.eclipse.equinox.http.registry,org.eclipse.jetty.http,org.eclipse.equinox.http.servlet,org.eclipse.jetty.io,org.eclipse.jetty.server,org.eclipse.jetty.servlet,org.eclipse.jetty.util,org.eclipse.jetty.continuation,org.eclipse.jetty.security,javax.servlet.jsp,javax.el,org.eclipse.core.filesystem,org.eclipse.equinox.event,org.eclipse.cdt.dsf.gdb.ui
 ,org.eclipse.ltk.core.refactoring,org.eclipse.cdt.debug.mi.ui,com.ibm.icu,org.eclipse.swt,org.eclipse.core.filebuffers,org.eclipse.e4.ui.workbench.addons.swt,javax.inject,$swt.plugin$,org.eclipse.core.databinding.observable,org.eclipse.core.jobs,org.eclipse.ui.forms,org.eclipse.e4.core.contexts,javax.xml,org.eclipse.core.variables,org.eclipse.ui.navigator,org.eclipse.e4.core.commands,org.eclipse.core.databinding,org.eclipse.core.commands,org.eclipse.ui.workbench,org.eclipse.equinox.util,org.eclipse.cdt.launch,org.w3c.css.sac,org.eclipse.e4.ui.workbench.renderers.swt,org.eclipse.cdt.managedbuilder.core,org.eclipse.jface.text,org.eclipse.cdt.managedbuilder.gnu.ui,org.eclipse.equinox.p2.metadata,org.eclipse.emf.ecore.xmi,org.eclipse.emf.common,org.eclipse.cdt.gdb,org.eclipse.compare.core,$linux.plugin$,org.eclipse.ui.console,org.eclipse.cdt.dsf.gdb,javax.servlet,org.eclipse.equinox.p2.repository,org.eclipse.equinox.security,org.eclipse.compare,org.eclipse.core.runtime at start,org
 .eclipse.cdt.dsf,org.eclipse.osgi.services,org.eclipse.e4.ui.workbench3,org.eclipse.equinox.preferences,org.eclipse.cdt.debug.mi.core,org.eclipse.ui.navigator.resources,org.eclipse.e4.ui.css.core,org.eclipse.ui.workbench.texteditor,org.eclipse.core.expressions,org.eclipse.e4.ui.css.swt.theme,org.eclipse.core.databinding.property,org.eclipse.emf.ecore,org.eclipse.e4.core.services,org.eclipse.cdt.gdb.ui,org.eclipse.core.runtime.compatibility.registry,org.apache.batik.util.gui,org.eclipse.e4.core.di,$fs.plugin$,org.eclipse.team.core,org.eclipse.cdt.debug.ui.memory.transport,org.eclipse.equinox.p2.metadata.repository,org.eclipse.e4.ui.css.swt,org.apache.batik.css,org.eclipse.core.net,org.eclipse.jdt.core.compiler.batch
++osgi.configuration.cascaded=true
+ osgi.bundles.defaultStartLevel=4
diff --git a/eclipse-cdt.spec b/eclipse-cdt.spec
index fdc7a27..aa87d93 100644
--- a/eclipse-cdt.spec
+++ b/eclipse-cdt.spec
@@ -31,7 +31,7 @@ Epoch: 1
 Summary:        Eclipse C/C++ Development Tools (CDT) plugin
 Name:           %{?scl_prefix}eclipse-cdt
 Version:        %{majmin}.%{micro}
-Release:        0.4.git20140506%{?dist}
+Release:        0.5.git20140506%{?dist}
 License:        EPL and CPL
 Group:          Development/Tools
 URL:            http://www.eclipse.org/cdt
@@ -75,6 +75,18 @@ Patch8: %{name}-disable-jacoco.patch
 # Following fixes problem with junit OSGI bundle version
 Patch9: %{name}-linuxtools-libhover-tests.patch
 
+# Following fixes javadoc errors due to source encoding
+Patch10: %{pkg_name}-add-ISO-8859-1.patch
+
+# Following fixes cdtdebug.sh script to get proper platform filesystem plugin
+Patch11: %{pkg_name}-cdtdebug.patch
+
+# Following fixes Standalone Debugger config.ini file to use bundle symbolic names
+Patch12: %{pkg_name}-config-ini.patch
+
+# Following fixes Standalone Debugger README file to refer to /usr/bin/cdtdebug
+Patch13: %{pkg_name}-cdtdebug-readme.patch
+
 BuildRequires: tycho
 BuildRequires: tycho-extras
 BuildRequires: %{?scl_prefix}eclipse-pde >= 1:4.3.0
@@ -83,7 +95,7 @@ BuildRequires: %{?scl_prefix}eclipse-remote
 BuildRequires: eclipse-license
 BuildRequires: maven-local
 BuildRequires: java-devel >= 1:1.7.0
-BuildRequires: lpg-java-compat
+BuildRequires: %{?scl_prefix}lpg-java-compat
 BuildRequires: %{?scl_prefix}eclipse-platform >= 1:4.3.0
 BuildRequires: %{?scl_prefix}eclipse-tests >= 1:4.3.0
 BuildRequires: nekohtml >= 1.9.14
@@ -92,6 +104,7 @@ BuildRequires: exec-maven-plugin
 Requires:       gdb make gcc-c++ autoconf automake libtool
 Requires:       %{?scl_prefix}eclipse-platform >= 1:4.3.0
 Requires:	%{?scl_prefix}eclipse-rse >= 3.4
+Requires:	%{?scl_prefix}eclipse-remote
 Requires: 	nekohtml >= 1.9.14
 
 %if 0%{?rhel} >= 6
@@ -149,6 +162,10 @@ pushd %{cdt_snapshot}
 %patch4 -p1
 %patch6 -p1
 %patch8 -p1
+%patch10 -p1
+%patch11 -p1
+%patch12 -p1
+%patch13 -p1
 sed -i -e 's/<arch>x86<\/arch>/<arch>%{eclipse_arch}<\/arch>/g' pom.xml
 # Add secondary arch support if we are building there
 %ifarch %{arm} s390 s390x
@@ -200,9 +217,12 @@ pushd %{linuxtools_snapshot}
 %pom_disable_module systemtap
 %pom_disable_module perf
 %pom_disable_module rpm
-mkdir -p .m2/p2/repo-sdk/features/
-cp -r %{_javadir}/eclipse-license/eclipse/features/* .m2/p2/repo-sdk/features/
+pushd libhover
+%pom_disable_module org.eclipse.linuxtools.cdt.libhover.tests
+popd
+
 popd
+
 pushd %{linuxtools_snapshot}/libhover
 # newlib libhover is an optional feature...remove it from CDT base
 rm -rf org.eclipse.linuxtools.cdt.libhover.newlib
@@ -242,16 +262,20 @@ pushd core/org.eclipse.cdt.core.linux/library
 make JAVA_HOME="%{java_home}" ARCH=%{eclipse_arch} CC='gcc -D_GNU_SOURCE'
 popd
 
-xmvn -o -Dtycho.local.keepTarget -Dmaven.test.skip=true install
+%{?scl:scl enable %{scl} - <<"EOF"}
+xmvn -o -Dtycho.local.keepTarget -Dmaven.test.skip=true -Dmaven.repo.local=`pwd`/.m2 install
+%{?scl:EOF}
 
 ## Libhover has dependencies on CDT so we must add these to the SDK directory
 unzip -o releng/org.eclipse.cdt.repo/target/org.eclipse.cdt.repo.zip -d $SDK
-xmvn -o -Dmaven.test.skip=true verify -f ../%{linuxtools_snapshot}/pom.xml
 popd
 
 ## Libhover build
 pushd %{linuxtools_snapshot}
 
+%{?scl:scl enable %{scl} - <<"EOF"}
+xmvn -o -Dmaven.test.skip=true -Dmaven.repo.local=../%{cdt_snapshot}/.m2 -fae clean install
+%{?scl:EOF}
 
 pushd releng/org.eclipse.linuxtools.releng-site/target/repository/features
 for f in `ls -1 . | grep jar$`; do
@@ -272,11 +296,13 @@ testInstallDir=${RPM_BUILD_ROOT}/%{_javadir}/eclipse-cdt-tests/plugins
 parsersInstallDir=${installDir}-parsers
 llvmInstallDir=${installDir}-llvm
 sdkInstallDir=${installDir}-sdk
+binInstallDir=${RPM_BUILD_ROOT}/%{_bindir}
 install -d -m755 $installDir
 install -d -m755 $parsersInstallDir
 install -d -m755 $llvmInstallDir
 install -d -m755 $sdkInstallDir
 install -d -m755 $testInstallDir
+install -d -m755 $binInstallDir
 
 # Unzip contents of the cdt repo, removing all but plugins and features
 unzip -q -o %{cdt_snapshot}/releng/org.eclipse.cdt.repo/target/org.eclipse.cdt.repo.zip \
@@ -296,13 +322,77 @@ done
 set -e
 popd
 
-# Add CDT core tests plugin to main package even though this isn't done upstream
-cp %{cdt_snapshot}/core/org.eclipse.cdt.core.tests/target/org.eclipse.cdt.core.tests-*-SNAPSHOT.jar $installDir/eclipse/plugins
-
 # Libhover install
 unzip -q -o %{linuxtools_snapshot}/releng/org.eclipse.linuxtools.releng-site/target/org.eclipse.linuxtools.releng-site.zip \
 -d $installDir/eclipse
 
+# Unzip CDT Standalone Debug plugin which contains installation scripts for the end-user to use
+pushd ${installDir}/eclipse/plugins
+DEBUGAPPLICATIONVERSION=$(ls . | grep org.eclipse.cdt.debug.application_ | sed 's/org.eclipse.cdt.debug.application_//' |sed 's/.jar//')
+unzip org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION.jar -d ./org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION
+# Copy the jar file inside the folder to work around issue where standalone application cannot be found without a jar file
+mv org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION.jar org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/org.eclipse.cdt.debug.application.jar
+# Fix the cdtdebug.sh script to hard-code ECLIPSE_HOME and cdt dropins directory
+sed -i -e "s, at ECLIPSE_HOME@,%{eclipse_base}," org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/scripts/cdtdebug.sh
+sed -i -e "s, at CDT_DROPINS@,%{eclipse_base}/dropins/cdt/eclipse/plugins," org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/scripts/cdtdebug.sh
+# Fix the dropin bundles to have full paths to their respective jar files as Eclipse start-up won't find them otherwise
+PLUGIN=$(ls . | grep org.eclipse.cdt.core.linux_)
+sed -i -e "s,org.eclipse.cdt.core.linux\,,file\\\\:%{eclipse_base}/dropins/cdt/eclipse/plugins/$PLUGIN\,," org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/scripts/config.ini
+PLUGIN=$(ls . | grep org.eclipse.cdt.core_)
+sed -i -e "s,org.eclipse.cdt.core\,,file\\\\:%{eclipse_base}/dropins/cdt/eclipse/plugins/$PLUGIN\,," org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/scripts/config.ini
+PLUGIN=$(ls . | grep org.eclipse.cdt.debug.ui.memory.floatingpoint_)
+sed -i -e "s,org.eclipse.cdt.debug.ui.memory.floatingpoint\,,file\\\\:%{eclipse_base}/dropins/cdt/eclipse/plugins/$PLUGIN\,," org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/scripts/config.ini
+PLUGIN=$(ls . | grep org.eclipse.cdt.make.core_)
+sed -i -e "s,org.eclipse.cdt.make.core\,,file\\\\:%{eclipse_base}/dropins/cdt/eclipse/plugins/$PLUGIN\,," org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/scripts/config.ini
+PLUGIN=$(ls . | grep org.eclipse.cdt.dsf.ui_)
+sed -i -e "s,org.eclipse.cdt.dsf.ui\,,file\\\\:%{eclipse_base}/dropins/cdt/eclipse/plugins/$PLUGIN\,," org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/scripts/config.ini
+PLUGIN=$(ls . | grep org.eclipse.cdt.debug.ui.memory.traditional_)
+sed -i -e "s,org.eclipse.cdt.debug.ui.memory.traditional\,,file\\\\:%{eclipse_base}/dropins/cdt/eclipse/plugins/$PLUGIN\,," org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/scripts/config.ini
+PLUGIN=$(ls . | grep org.eclipse.cdt.ui_)
+sed -i -e "s,org.eclipse.cdt.ui\,,file\\\\:%{eclipse_base}/dropins/cdt/eclipse/plugins/$PLUGIN\,," org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/scripts/config.ini
+PLUGIN=$(ls . | grep org.eclipse.cdt.core_)
+sed -i -e "s,org.eclipse.cdt.core\,,file\\\\:%{eclipse_base}/dropins/cdt/eclipse/plugins/$PLUGIN\,," org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/scripts/config.ini
+PLUGIN=$(ls . | grep org.eclipse.cdt.debug.application_)
+sed -i -e "s,org.eclipse.cdt.debug.application\,,file\\\\:%{eclipse_base}/dropins/cdt/eclipse/plugins/$PLUGIN/org.eclipse.cdt.debug.application.jar\,," org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/scripts/config.ini
+PLUGIN=$(ls . | grep org.eclipse.cdt.debug.application.doc_)
+sed -i -e "s,org.eclipse.cdt.debug.application.doc\,,file\\\\:%{eclipse_base}/dropins/cdt/eclipse/plugins/$PLUGIN\,," org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/scripts/config.ini
+PLUGIN=$(ls . | grep org.eclipse.cdt.dsf.gdb.ui_)
+sed -i -e "s,org.eclipse.cdt.dsf.gdb.ui\,,file\\\\:%{eclipse_base}/dropins/cdt/eclipse/plugins/$PLUGIN\,," org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/scripts/config.ini
+PLUGIN=$(ls . | grep org.eclipse.cdt.debug.mi.ui_)
+sed -i -e "s,org.eclipse.cdt.debug.mi.ui\,,file\\\\:%{eclipse_base}/dropins/cdt/eclipse/plugins/$PLUGIN\,," org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/scripts/config.ini
+PLUGIN=$(ls . | grep org.eclipse.cdt.launch_)
+sed -i -e "s,org.eclipse.cdt.launch\,,file\\\\:%{eclipse_base}/dropins/cdt/eclipse/plugins/$PLUGIN\,," org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/scripts/config.ini
+PLUGIN=$(ls . | grep org.eclipse.cdt.managedbuilder.core_)
+sed -i -e "s,org.eclipse.cdt.managedbuilder.core\,,file\\\\:%{eclipse_base}/dropins/cdt/eclipse/plugins/$PLUGIN\,," org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/scripts/config.ini
+PLUGIN=$(ls . | grep org.eclipse.cdt.managedbuilder.gnu.ui_)
+sed -i -e "s,org.eclipse.cdt.managedbuilder.gnu.ui\,,file\\\\:%{eclipse_base}/dropins/cdt/eclipse/plugins/$PLUGIN\,," org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/scripts/config.ini
+PLUGIN=$(ls . | grep org.eclipse.cdt.gdb_)
+sed -i -e "s,org.eclipse.cdt.gdb\,,file\\\\:%{eclipse_base}/dropins/cdt/eclipse/plugins/$PLUGIN\,," org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/scripts/config.ini
+PLUGIN=$(ls . | grep org.eclipse.cdt.dsf.gdb_)
+sed -i -e "s,org.eclipse.cdt.dsf.gdb\,,file\\\\:%{eclipse_base}/dropins/cdt/eclipse/plugins/$PLUGIN\,," org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/scripts/config.ini
+PLUGIN=$(ls . | grep org.eclipse.cdt.dsf_)
+sed -i -e "s,org.eclipse.cdt.dsf\,,file\\\\:%{eclipse_base}/dropins/cdt/eclipse/plugins/$PLUGIN\,," org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/scripts/config.ini
+PLUGIN=$(ls . | grep org.eclipse.cdt.debug.mi.core_)
+sed -i -e "s,org.eclipse.cdt.debug.mi.core\,,file\\\\:%{eclipse_base}/dropins/cdt/eclipse/plugins/$PLUGIN\,," org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/scripts/config.ini
+PLUGIN=$(ls . | grep org.eclipse.cdt.gdb.ui_)
+sed -i -e "s,org.eclipse.cdt.gdb.ui\,,file\\\\:%{eclipse_base}/dropins/cdt/eclipse/plugins/$PLUGIN\,," org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/scripts/config.ini
+PLUGIN=$(ls . | grep org.eclipse.cdt.debug.ui.memory.transport_)
+sed -i -e "s,org.eclipse.cdt.debug.ui.memory.transport\,,file\\\\:%{eclipse_base}/dropins/cdt/eclipse/plugins/$PLUGIN\,," org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/scripts/config.ini
+PLUGIN=$(ls . | grep org.eclipse.cdt.debug.ui.memory.search_)
+sed -i -e "s,org.eclipse.cdt.debug.ui.memory.search\,,file\\\\:%{eclipse_base}/dropins/cdt/eclipse/plugins/$PLUGIN\,," org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/scripts/config.ini
+PLUGIN=$(ls . | grep org.eclipse.cdt.debug.ui.memory.memorybrowser_)
+sed -i -e "s,org.eclipse.cdt.debug.ui.memory.memorybrowser\,,file\\\\:%{eclipse_base}/dropins/cdt/eclipse/plugins/$PLUGIN\,," org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/scripts/config.ini
+PLUGIN=$(ls . | grep org.eclipse.cdt.debug.ui_)
+sed -i -e "s,org.eclipse.cdt.debug.ui\,,file\\\\:%{eclipse_base}/dropins/cdt/eclipse/plugins/$PLUGIN\,," org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/scripts/config.ini
+PLUGIN=$(ls . | grep org.eclipse.cdt.debug.core_)
+sed -i -e "s,org.eclipse.cdt.debug.core\,,file\\\\:%{eclipse_base}/dropins/cdt/eclipse/plugins/$PLUGIN\,," org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/scripts/config.ini
+PLUGIN=$(ls . | grep 'org.eclipse.cdt.core.linux\..*.jar' | grep -v source)
+sed -i -e "s,\$linux.plugin\$\,,file\\\\:%{eclipse_base}/dropins/cdt/eclipse/plugins/$PLUGIN\,," org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/scripts/config.ini
+sed -i -e "s,cp config.ini,cp %{eclipse_base}/dropins/cdt/eclipse/plugins/org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/scripts/config.ini," org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/scripts/cdtdebug.sh
+sed -i -e "s,cp dev.properties,cp %{eclipse_base}/dropins/cdt/eclipse/plugins/org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/scripts/dev.properties," org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/scripts/cdtdebug.sh
+cp org.eclipse.cdt.debug.application_$DEBUGAPPLICATIONVERSION/scripts/cdtdebug.sh $binInstallDir/cdtdebug
+popd
+
 # Unpack all existing feature jars
 for x in $installDir/eclipse/features/*.jar; do
   dirname=`echo $x | sed -e 's:\\(.*\\)\\.jar:\\1:g'`
@@ -358,6 +448,7 @@ rm -rf $installDir/eclipse/binary
 
 %files
 %{eclipse_base}/dropins/cdt
+%{_bindir}/cdtdebug
 %doc %{cdt_snapshot}/releng/org.eclipse.cdt.releng/epl-v10.html
 %doc %{cdt_snapshot}/releng/org.eclipse.cdt.releng/notice.html
 
@@ -382,6 +473,12 @@ rm -rf $installDir/eclipse/binary
 %doc %{cdt_snapshot}/releng/org.eclipse.cdt.releng/notice.html
 
 %changelog
+* Fri Jun 13 2014 Jeff Johnston <jjohnstn at redhat.com>  1:8.4.0-0.5.git20140506
+- Add /usr/bin/cdtdebug binary
+- Fix cdtdebug config.ini to have full paths to dropins plugins
+- Remove org.eclipse.cdt.core.tests from being shipped in base package
+- Add Requires for eclipse-remote
+
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1:8.4.0-0.4.git20140506
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 


More information about the scm-commits mailing list