summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--eclipse-phpeclipse-broken-help-links.patch22
-rw-r--r--eclipse-phpeclipse-external-parser.patch17
-rw-r--r--eclipse-phpeclipse-external-preview.patch54
-rw-r--r--eclipse-phpeclipse-fix-build-props.patch12
-rw-r--r--eclipse-phpeclipse-fix-phpmanual-view.patch38
-rw-r--r--eclipse-phpeclipse-httpd-integration.patch361
-rw-r--r--eclipse-phpeclipse-remove-internal-eclipse-ref.patch12
-rw-r--r--eclipse-phpeclipse-rm-win32-help.patch17
-rw-r--r--eclipse-phpeclipse.spec224
10 files changed, 761 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..1e65467
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,4 @@
+SRCDIR := $(shell pwd)
+NAME := $(shell basename $(SRCDIR))
+include ../common/Makefile
+
diff --git a/eclipse-phpeclipse-broken-help-links.patch b/eclipse-phpeclipse-broken-help-links.patch
new file mode 100644
index 0000000..57e3cc8
--- /dev/null
+++ b/eclipse-phpeclipse-broken-help-links.patch
@@ -0,0 +1,22 @@
+Index: ./plugins/net.sourceforge.phpeclipse.phphelp/phphelp.xml
+===================================================================
+--- ./plugins/net.sourceforge.phpeclipse.phphelp/phphelp.xml (revision 1625)
++++ ./plugins/net.sourceforge.phpeclipse.phphelp/phphelp.xml (working copy)
+@@ -1,4 +1,4 @@
+-<toc label="PHPEclipse Help" topic="doc/phpeclipse/index.html">
++<toc label="PHPEclipse Help" topic="doc/index.html">
+ <topic label="PHP Help Table of Contents" href="doc/index.html"/>
+ <topic label="I. Getting Started" href="doc/getting-started.html"/>
+ <topic label="II. Installation and Configuration" href="doc/install.html"/>
+@@ -6,7 +6,7 @@
+ <topic label="IV. Security" href="doc/security.html"/>
+ <topic label="V. Features" href="doc/features.html"/>
+ <topic label="VI. Function Reference" href="doc/funcref.html"/>
+- <topic label="VII. PHP and Zend Engine Internals" href="doc/internals.html"/>
++ <topic label="VII. PHP at the Core: A Hacker's Guide to the Zend Engine" href="doc/book.internals2.html"/>
+ <topic label="VIII. FAQ: Frequently Asked Questions" href="doc/faq.html"/>
+- <topic label="IX. Appendixes" href="doc/appendixes.html"/>
+-</toc>
+\ No newline at end of file
++ <topic label="IX. Appendices" href="doc/appendices.html"/>
++</toc>
diff --git a/eclipse-phpeclipse-external-parser.patch b/eclipse-phpeclipse-external-parser.patch
new file mode 100644
index 0000000..4f10893
--- /dev/null
+++ b/eclipse-phpeclipse-external-parser.patch
@@ -0,0 +1,17 @@
+Index: ./plugins/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/actions/ExternalPHPParser.java
+===================================================================
+--- ./plugins/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/actions/ExternalPHPParser.java (revision 1625)
++++ ./plugins/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/actions/ExternalPHPParser.java (working copy)
+@@ -50,11 +50,9 @@
+ * the file that will be parsed
+ */
+ public void phpExternalParse() {
+- // IFile file = (IFile) resource;
+- // final IPath path = file.getFullPath();
+ final IPreferenceStore store = ExternalToolsPlugin.getDefault()
+ .getPreferenceStore();
+- final String filename = fFileToParse.getFullPath().toString();
++ final String filename = fFileToParse.getLocation().toString();
+
+ final String[] arguments = { filename };
+ final MessageFormat form = new MessageFormat(store
diff --git a/eclipse-phpeclipse-external-preview.patch b/eclipse-phpeclipse-external-preview.patch
new file mode 100644
index 0000000..46ee2ae
--- /dev/null
+++ b/eclipse-phpeclipse-external-preview.patch
@@ -0,0 +1,54 @@
+Index: ./plugins/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/editor/ShowExternalPreviewAction.java
+===================================================================
+--- ./plugins/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/editor/ShowExternalPreviewAction.java (revision 1625)
++++ ./plugins/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/editor/ShowExternalPreviewAction.java (working copy)
+@@ -145,30 +145,26 @@
+ if (store == null) {
+ store = WebUI.getDefault().getPreferenceStore();
+ }
+- // IPath path = file.getFullPath();
+- String localhostURL = file.getFullPath().toString();
+- String lowerCaseFileName = localhostURL.toLowerCase();
+- //removed by ed_mann for RSE fixes testing
+- // String documentRoot =
+- // store.getString(PHPeclipsePlugin.DOCUMENTROOT_PREF);
+- //IPath documentRootPath = ProjectPrefUtil.getDocumentRoot(file
+- // .getProject());
+- IPath documentRootPath = file.getProject().getFullPath();
+- String documentRoot = documentRootPath.toString().toLowerCase();
+- if (lowerCaseFileName.startsWith(documentRoot)) {
+- localhostURL = localhostURL.substring(documentRoot.length());
+- } else {
+- return null;
+- }
+- // return store.getString(PHPeclipsePlugin.LOCALHOST_PREF) +
+- // localhostURL;
+- String projectPath = ProjectPrefUtil.getMiscProjectsPreferenceValue(file
++ IPath path = file.getLocation();
++ if(path == null)
++ path = file.getFullPath();
++
++ String filePath = path.toString();
++ String projectURI = ProjectPrefUtil.getMiscProjectsPreferenceValue(file
+ .getProject(), IPreferenceConstants.PHP_LOCALHOST_PREF);
+- if(projectPath.endsWith("/") && localhostURL.startsWith("/")) {
+- localhostURL = localhostURL.substring(1);
++ String projectDocRoot = ProjectPrefUtil.getMiscProjectsPreferenceValue(file
++ .getProject(), IPreferenceConstants.PHP_DOCUMENTROOT_PREF);
++
++ if (filePath.startsWith(projectDocRoot)) {
++ filePath = filePath.substring(projectDocRoot.length());
+ }
+- return projectPath + localhostURL;
++ if(projectURI.endsWith("/") && filePath.startsWith("/")) {
++ filePath = filePath.substring(1);
++ }
++
++ return projectURI + filePath;
+ }
+- return "http://localhost";
++ return ProjectPrefUtil.getMiscProjectsPreferenceValue(file
++ .getProject(), IPreferenceConstants.PHP_LOCALHOST_PREF);
+ }
+ }
+\ No newline at end of file
diff --git a/eclipse-phpeclipse-fix-build-props.patch b/eclipse-phpeclipse-fix-build-props.patch
new file mode 100644
index 0000000..345f76d
--- /dev/null
+++ b/eclipse-phpeclipse-fix-build-props.patch
@@ -0,0 +1,12 @@
+Index: ./plugins/net.sourceforge.phpeclipse.ui/build.properties
+===================================================================
+--- ./plugins/net.sourceforge.phpeclipse.ui/build.properties (revision 1625)
++++ ./plugins/net.sourceforge.phpeclipse.ui/build.properties (working copy)
+@@ -4,7 +4,6 @@
+ plugin.properties,\
+ templates/,\
+ ui.jar,\
+- .project,\
+ META-INF/
+ source.ui.jar = src/
+ src.includes = src/,\
diff --git a/eclipse-phpeclipse-fix-phpmanual-view.patch b/eclipse-phpeclipse-fix-phpmanual-view.patch
new file mode 100644
index 0000000..3958fc5
--- /dev/null
+++ b/eclipse-phpeclipse-fix-phpmanual-view.patch
@@ -0,0 +1,38 @@
+Index: ./plugins/net.sourceforge.phpeclipse.phpmanual/src/net/sourceforge/phpeclipse/phpmanual/views/PHPManualView.java
+===================================================================
+--- ./plugins/net.sourceforge.phpeclipse.phpmanual/src/net/sourceforge/phpeclipse/phpmanual/views/PHPManualView.java (revision 1643)
++++ ./plugins/net.sourceforge.phpeclipse.phpmanual/src/net/sourceforge/phpeclipse/phpmanual/views/PHPManualView.java (working copy)
+@@ -181,7 +181,8 @@
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ String html = getHtmlSource(funcName);
+- browser.setText(html);
++ if (html != null)
++ browser.setText(html);
+ }
+ });
+ }
+Index: ./plugins/net.sourceforge.phpeclipse.phpmanual/plugin.xml
+===================================================================
+--- ./plugins/net.sourceforge.phpeclipse.phpmanual/plugin.xml (revision 1643)
++++ ./plugins/net.sourceforge.phpeclipse.phpmanual/plugin.xml (working copy)
+@@ -13,16 +13,16 @@
+ icon="icons/phpmanual.png"
+ category="net.sourceforge.phpeclipse.views.category"
+ class="net.sourceforge.phpeclipse.phpmanual.views.PHPManualView"
+- id="net.sourceforge.phpeclipse.phpmanual.views.PHPManualViewz">
++ id="net.sourceforge.phpeclipse.phpmanual.views.PHPManualView">
+ </view>
+ </extension>
+ <extension
+ point="org.eclipse.ui.perspectiveExtensions">
+ <perspectiveExtension
+- targetID="org.eclipse.ui.resourcePerspective">
++ targetID="net.sourceforge.phpeclipse.PHPPerspective">
+ <view
+ ratio="0.5"
+- relative="org.eclipse.ui.views.TaskList"
++ relative="net.sourceforge.phpeclipse.webbrowser.views"
+ relationship="right"
+ id="net.sourceforge.phpeclipse.phpmanual.views.PHPManualView">
+ </view>
diff --git a/eclipse-phpeclipse-httpd-integration.patch b/eclipse-phpeclipse-httpd-integration.patch
new file mode 100644
index 0000000..da54e57
--- /dev/null
+++ b/eclipse-phpeclipse-httpd-integration.patch
@@ -0,0 +1,361 @@
+Index: ./plugins/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java
+===================================================================
+--- ./plugins/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java (revision 1625)
++++ ./plugins/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java (working copy)
+@@ -52,6 +52,7 @@
+ import net.sourceforge.phpeclipse.builder.ExternalStorageDocumentProvider;
+ import net.sourceforge.phpeclipse.builder.FileStorage;
+ import net.sourceforge.phpeclipse.builder.IdentifierIndexManager;
++import net.sourceforge.phpeclipse.externaltools.ExternalToolsPlugin;
+ import net.sourceforge.phpeclipse.phpeditor.CustomBufferFactory;
+ import net.sourceforge.phpeclipse.phpeditor.DocumentAdapter;
+ import net.sourceforge.phpeclipse.phpeditor.ICompilationUnitDocumentProvider;
+@@ -989,6 +990,8 @@
+
+ // RefactoringCore.getUndoManager().shutdown();
+ } finally {
++ if(ExternalToolsPlugin.getDefault() != null)
++ ExternalToolsPlugin.getDefault().stopHttpd();
+ super.stop(context);
+ }
+ }
+Index: ./plugins/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/WebUI.java
+===================================================================
+--- ./plugins/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/WebUI.java (revision 1625)
++++ ./plugins/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/WebUI.java (working copy)
+@@ -15,16 +15,19 @@
+
+ import java.io.IOException;
+ import java.net.URL;
++import java.net.ServerSocket;
+
+ import net.sourceforge.phpeclipse.ui.templates.template.HTMLContextType;
+ import net.sourceforge.phpeclipse.ui.templates.template.JSContextType;
+ import net.sourceforge.phpeclipse.ui.templates.template.SmartyContextType;
+ import net.sourceforge.phpeclipse.ui.templates.template.XMLContextType;
+
++import org.eclipse.core.internal.utils.FileUtil;
+ import org.eclipse.core.resources.IWorkspace;
+ import org.eclipse.core.resources.ResourcesPlugin;
+ import org.eclipse.core.runtime.IStatus;
+ import org.eclipse.core.runtime.Status;
++import org.eclipse.core.runtime.Platform;
+ import org.eclipse.jface.preference.IPreferenceStore;
+ import org.eclipse.jface.resource.ImageDescriptor;
+ import org.eclipse.jface.resource.ImageRegistry;
+@@ -56,6 +59,7 @@
+
+ /** The shared instance. */
+ private static WebUI plugin;
++ private int port = 0;
+
+ public static IWorkbenchPage getActivePage() {
+ return getDefault().internalGetActivePage();
+@@ -165,10 +169,42 @@
+ return fStore;
+ }
+
++ public int getHttpdPort() {
++ if (port == 0) {
++ port = findFreePort();
++ }
++ return port;
++ }
++
++ private int findFreePort() {
++ ServerSocket socket = null;
++ try {
++ socket = new ServerSocket(0);
++ socket.setReuseAddress(true);
++ return socket.getLocalPort();
++ } catch(IOException e) {
++ IStatus status = new Status(IStatus.ERROR, "net.sourceforge.phpeclipse.ui", IStatus.OK, "Error finding free port.", e);
++ plugin.getLog().log(status);
++ } finally {
++ if(socket != null) {
++ try {
++ socket.close();
++ } catch(IOException e) {
++ IStatus status = new Status(IStatus.ERROR, "net.sourceforge.phpeclipse.ui", IStatus.OK, "Error finding free port.", e);
++ plugin.getLog().log(status);
++ }
++ }
++ }
++ return -1;
++ }
++
+ protected void initializeDefaultPreferences(IPreferenceStore store) {
+- store.setDefault(PHP_LOCALHOST_PREF, "http://localhost");
+- store.setDefault(PHP_DOCUMENTROOT_PREF, getWorkspace().getRoot()
+- .getFullPath().toString());
++ if (port == 0) {
++ port = findFreePort();
++ }
++ store.setDefault(PHP_LOCALHOST_PREF, "http://localhost" + ":" + port);
++ store.setDefault(PHP_DOCUMENTROOT_PREF,
++ FileUtil.canonicalPath(Platform.getLocation()).removeTrailingSeparator().toOSString());
+ // store.setDefault(PHP_BOOKMARK_DEFAULT, "");
+
+ store.setDefault(PHP_AUTO_PREVIEW_DEFAULT, "false");
+Index: ./plugins/net.sourceforge.phpeclipse.externaltools/prefs/default_linux.properties
+===================================================================
+--- ./plugins/net.sourceforge.phpeclipse.externaltools/prefs/default_linux.properties (revision 1625)
++++ ./plugins/net.sourceforge.phpeclipse.externaltools/prefs/default_linux.properties (working copy)
+@@ -1,13 +1,13 @@
+-_php_run_pref=/opt/lamp/php/php
+-_external_parser=/opt/lamp/php/php -l -f {0}
+-_mysql_run_pref=/opt/lampp/lampp startmysql
+-_apache_run_pref=/opt/lampp/lampp
+-_xampp_start_pref=/opt/lampp/lampp start
+-_xampp_stop_pref=/opt/lampp/lampp stop
+-__mysql_start=startmysql
+-__apache_start=startapache -c \"DocumentRoot {0}\"
+-__apache_stop=stop
+-__apache_restart=restart
++_php_run_pref=/usr/bin/php
++_external_parser=/usr/bin/php -l -f {0}
++_mysql_run_pref=
++_apache_run_pref=/usr/sbin/httpd
++_xampp_start_pref=
++_xampp_stop_pref=
++__mysql_start=
++__apache_start=-f /usr/share/eclipse/dropins/phpeclipse/eclipse/plugins/net.sourceforge.phpeclipse.externaltools_1.2.3.200910091456PRD/conf/httpd.conf -c "ErrorLog {0}/.metadata/phpeclipse-httpd-error_log" -c "DocumentRoot {0}" -c "PidFile {0}/.metadata/phpeclipse-httpd.pid" -c "Listen {1}"
++__apache_stop=-f /usr/share/eclipse/dropins/phpeclipse/eclipse/plugins/net.sourceforge.phpeclipse.externaltools_1.2.3.200910091456PRD/conf/httpd.conf -c "ErrorLog {0}/.metadata/phpeclipse-httpd-error_log" -c "DocumentRoot {0}" -c "PidFile {0}/.metadata/phpeclipse-httpd.pid" -c "Listen {1}" -k stop
++__apache_restart=-f /usr/share/eclipse/dropins/phpeclipse/eclipse/plugins/net.sourceforge.phpeclipse.externaltools_1.2.3.200910091456PRD/conf/httpd.conf -c "ErrorLog {0}/.metadata/phpeclipse-httpd-error_log" -c "DocumentRoot {0}" -c "PidFile {0}/.metadata/phpeclipse-httpd.pid" -c "Listen {1}" -k restart
+ _mysql_start_background=true
+ _apache_start_background=true
+ _apache_stop_background=true
+Index: ./plugins/net.sourceforge.phpeclipse.externaltools/conf/httpd.conf
+===================================================================
+--- ./plugins/net.sourceforge.phpeclipse.externaltools/conf/httpd.conf (revision 0)
++++ ./plugins/net.sourceforge.phpeclipse.externaltools/conf/httpd.conf (revision 0)
+@@ -0,0 +1,23 @@
++# minimal httpd conf file for use with PHPEclipse
++StartServers 1
++MinSpareServers 1
++MaxSpareServers 1
++MaxClients 3
++
++# modules
++LoadModule mime_module modules/mod_mime.so
++LoadModule dir_module modules/mod_dir.so
++LoadModule autoindex_module modules/mod_autoindex.so
++
++TypesConfig /etc/mime.types
++DirectoryIndex index.html index.php default.html default.php
++DirectorySlash On
++
++IndexOptions FoldersFirst VersionSort IgnoreCase NameWidth=* HTMLTable
++IndexIgnore RECYCLER .??* *~ *# HEADER* README* RCS CVS *,v *,t
++HeaderName HEADER.html
++ReadmeName README.html
++
++# PHP settings
++LoadModule php5_module modules/libphp5.so
++AddHandler php5-script .php
+Index: ./plugins/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/actions/PHPStartApacheAction.java
+===================================================================
+--- ./plugins/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/actions/PHPStartApacheAction.java (revision 1625)
++++ ./plugins/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/actions/PHPStartApacheAction.java (working copy)
+@@ -32,7 +32,7 @@
+
+ // replace backslash with slash in the DocumentRoot under Windows
+ documentRoot = documentRoot.replace('\\', '/');
+- String[] arguments = { documentRoot };
++ String[] arguments = { documentRoot, new Integer(WebUI.getDefault().getHttpdPort()).toString() };
+ MessageFormat form = new MessageFormat(store
+ .getString(ExternalToolsPlugin.APACHE_START_PREF));
+ execute("apache_start", store
+Index: ./plugins/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/actions/PHPRestartApacheAction.java
+===================================================================
+--- ./plugins/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/actions/PHPRestartApacheAction.java (revision 1625)
++++ ./plugins/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/actions/PHPRestartApacheAction.java (working copy)
+@@ -11,20 +11,31 @@
+ **********************************************************************/
+ package net.sourceforge.phpdt.externaltools.actions;
+
++import java.text.MessageFormat;
++
+ import net.sourceforge.phpeclipse.externaltools.ExternalToolsPlugin;
++import net.sourceforge.phpeclipse.ui.WebUI;
+
+ import org.eclipse.jface.action.IAction;
+ import org.eclipse.jface.preference.IPreferenceStore;
+
+ public class PHPRestartApacheAction extends PHPStartApacheAction {
+ public void run(IAction action) {
++ final IPreferenceStore webUIStore = WebUI.getDefault()
++ .getPreferenceStore();
++
++ String documentRoot = webUIStore.getString(WebUI.PHP_DOCUMENTROOT_PREF);
+ final IPreferenceStore store = ExternalToolsPlugin.getDefault()
+ .getPreferenceStore();
+- // execute(store.getString(PHPeclipsePlugin.APACHE_RESTART_PREF),
+- // "Restart Apache: ");
++
++ // replace backslash with slash in the DocumentRoot under Windows
++ documentRoot = documentRoot.replace('\\', '/');
++ String[] arguments = { documentRoot, new Integer(WebUI.getDefault().getHttpdPort()).toString() };
++ MessageFormat form = new MessageFormat(store
++ .getString(ExternalToolsPlugin.APACHE_RESTART_PREF));
+ execute("apache_restart", store
+- .getString(ExternalToolsPlugin.APACHE_RUN_PREF), store
+- .getString(ExternalToolsPlugin.APACHE_RESTART_PREF), store
++ .getString(ExternalToolsPlugin.APACHE_RUN_PREF), form
++ .format(arguments), store
+ .getBoolean(ExternalToolsPlugin.APACHE_RESTART_BACKGROUND));
+ }
+ }
+Index: ./plugins/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/actions/PHPStopApacheAction.java
+===================================================================
+--- ./plugins/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/actions/PHPStopApacheAction.java (revision 1625)
++++ ./plugins/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/actions/PHPStopApacheAction.java (working copy)
+@@ -11,20 +11,31 @@
+ **********************************************************************/
+ package net.sourceforge.phpdt.externaltools.actions;
+
++import java.text.MessageFormat;
++
+ import net.sourceforge.phpeclipse.externaltools.ExternalToolsPlugin;
++import net.sourceforge.phpeclipse.ui.WebUI;
+
+ import org.eclipse.jface.action.IAction;
+ import org.eclipse.jface.preference.IPreferenceStore;
+
+ public class PHPStopApacheAction extends PHPStartApacheAction {
+ public void run(IAction action) {
++ final IPreferenceStore webUIStore = WebUI.getDefault()
++ .getPreferenceStore();
++
++ String documentRoot = webUIStore.getString(WebUI.PHP_DOCUMENTROOT_PREF);
+ final IPreferenceStore store = ExternalToolsPlugin.getDefault()
+ .getPreferenceStore();
+- // execute(store.getString(PHPeclipsePlugin.APACHE_STOP_PREF), "Stop
+- // Apache: ");
++
++ // replace backslash with slash in the DocumentRoot under Windows
++ documentRoot = documentRoot.replace('\\', '/');
++ String[] arguments = { documentRoot, new Integer(WebUI.getDefault().getHttpdPort()).toString() };
++ MessageFormat form = new MessageFormat(store
++ .getString(ExternalToolsPlugin.APACHE_STOP_PREF));
+ execute("apache_stop", store
+- .getString(ExternalToolsPlugin.APACHE_RUN_PREF), store
+- .getString(ExternalToolsPlugin.APACHE_STOP_PREF), store
++ .getString(ExternalToolsPlugin.APACHE_RUN_PREF), form
++ .format(arguments), store
+ .getBoolean(ExternalToolsPlugin.APACHE_STOP_BACKGROUND));
+ }
+ }
+Index: ./plugins/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpeclipse/externaltools/ExternalToolsPlugin.java
+===================================================================
+--- ./plugins/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpeclipse/externaltools/ExternalToolsPlugin.java (revision 1625)
++++ ./plugins/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpeclipse/externaltools/ExternalToolsPlugin.java (working copy)
+@@ -15,6 +15,7 @@
+ import java.util.Enumeration;
+ import java.util.PropertyResourceBundle;
+
++import net.sourceforge.phpdt.externaltools.actions.PHPStopApacheAction;
+ import net.sourceforge.phpdt.externaltools.internal.model.ExternalToolsImages;
+ import net.sourceforge.phpdt.externaltools.internal.model.IPreferenceConstants;
+ import net.sourceforge.phpdt.externaltools.internal.model.VariableContextManager;
+@@ -28,6 +29,7 @@
+ import org.eclipse.core.runtime.Path;
+ import org.eclipse.core.runtime.Platform;
+ import org.eclipse.core.runtime.Status;
++import org.eclipse.jface.action.Action;
+ import org.eclipse.jface.preference.IPreferenceStore;
+ import org.eclipse.jface.preference.PreferenceConverter;
+ import org.eclipse.jface.resource.ImageDescriptor;
+@@ -310,4 +312,17 @@
+ }
+ });
+ }
++
++ /**
++ * @throws Exception
++ * @see org.eclipse.core.runtime.Plugin#stop(BundleContext context)
++ */
++ public void stop(BundleContext context) throws Exception {
++ super.stop(context);
++ }
++
++ public void stopHttpd() {
++ // stop httpd
++ new PHPStopApacheAction().run(new Action(){});
++ }
+ }
+\ No newline at end of file
+Index: ./plugins/net.sourceforge.phpeclipse.externaltools/build.properties
+===================================================================
+--- ./plugins/net.sourceforge.phpeclipse.externaltools/build.properties (revision 1625)
++++ ./plugins/net.sourceforge.phpeclipse.externaltools/build.properties (working copy)
+@@ -5,6 +5,7 @@
+ icons/,\
+ META-INF/,\
+ plugin.properties,\
++ conf/,\
+ prefs/
+ src.includes = src/,\
+ build.properties,\
+@@ -15,4 +16,9 @@
+ .cvsignore,\
+ .project,\
+ META-INF/,\
++ conf/,\
+ prefs/
++bin.excludes = prefs/default_macosx.properties,\
++ prefs/default_win32.properties
++src.excludes = prefs/default_macosx.properties,\
++ prefs/default_win32.properties
+Index: ./plugins/net.sourceforge.phpeclipse.externaltools/plugin.xml
+===================================================================
+--- ./plugins/net.sourceforge.phpeclipse.externaltools/plugin.xml (revision 1643)
++++ ./plugins/net.sourceforge.phpeclipse.externaltools/plugin.xml (working copy)
+@@ -192,11 +192,6 @@
+ </page>
+ <page
+ category="net.sourceforge.phpdt.externaltools.preferences"
+- class="net.sourceforge.phpdt.externaltools.preferences.XamppPrefencePage"
+- id="net.sourceforge.phpeclipse.externaltools.xampp.preferences"
+- name="XAMPP"/>
+- <page
+- category="net.sourceforge.phpdt.externaltools.preferences"
+ class="net.sourceforge.phpdt.externaltools.preferences.MySQLPreferencePage"
+ id="net.sourceforge.phpeclipse.externaltools.mysql.preferences"
+ name="MySQL"/>
+@@ -213,10 +208,6 @@
+ targetID="net.sourceforge.phpeclipse.PHPPerspective">
+ <actionSet id="net.sourceforge.phpeclipse.PHPActionSet"/>
+ </perspectiveExtension>
+- <perspectiveExtension
+- targetID="net.sourceforge.phpeclipse.PHPPerspective">
+- <actionSet id="net.sf.eclipsetidy.ActionSet"/>
+- </perspectiveExtension>
+ </extension>
+
+ <extension
+@@ -268,24 +259,6 @@
+ toolbarPath="Normal"
+ id="net.sourceforge.phpdt.externaltools.actions.PHPStartMySQLAction">
+ </action>
+- <action
+- label="Stop XAMPP"
+- icon="icons/obj16/xampp_stop.gif"
+- tooltip="Stop XAMPP"
+- class="net.sourceforge.phpdt.externaltools.actions.PHPStopXAMPPAction"
+- menubarPath="net.sourceforge.phpeclipse.PHPMenu/phpeclipse"
+- toolbarPath="Normal"
+- id="net.sourceforge.phpdt.externaltools.actions.PHPStopXAMPPAction">
+- </action>
+- <action
+- label="Start XAMPP"
+- icon="icons/obj16/xampp_start.gif"
+- tooltip="Start XAMPP"
+- class="net.sourceforge.phpdt.externaltools.actions.PHPStartXAMPPAction"
+- menubarPath="net.sourceforge.phpeclipse.PHPMenu/phpeclipse"
+- toolbarPath="Normal"
+- id="net.sourceforge.phpdt.externaltools.actions.PHPStartXAMPPAction">
+- </action>
+ </actionSet>
+ </extension>
+
diff --git a/eclipse-phpeclipse-remove-internal-eclipse-ref.patch b/eclipse-phpeclipse-remove-internal-eclipse-ref.patch
new file mode 100644
index 0000000..907ae28
--- /dev/null
+++ b/eclipse-phpeclipse-remove-internal-eclipse-ref.patch
@@ -0,0 +1,12 @@
+Index: ./plugins/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/internal/model/VariableContextManager.java
+===================================================================
+--- ./plugins/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/internal/model/VariableContextManager.java
++++ ./plugins/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/internal/model/VariableContextManager.java
+@@ -27,7 +27,6 @@
+ import org.eclipse.ui.IWorkbenchPart;
+ import org.eclipse.ui.IWorkbenchWindow;
+ import org.eclipse.ui.PlatformUI;
+-import org.eclipse.ui.externaltools.internal.model.ExternalToolBuilder;
+
+ /**
+ * Maintains the context used to expand variables. The context is based on the
diff --git a/eclipse-phpeclipse-rm-win32-help.patch b/eclipse-phpeclipse-rm-win32-help.patch
new file mode 100644
index 0000000..ae0c93b
--- /dev/null
+++ b/eclipse-phpeclipse-rm-win32-help.patch
@@ -0,0 +1,17 @@
+Index: ./plugins/net.sourceforge.phpeclipse.phphelp/plugin.xml
+===================================================================
+--- ./plugins/net.sourceforge.phpeclipse.phphelp/plugin.xml (revision 1625)
++++ ./plugins/net.sourceforge.phpeclipse.phphelp/plugin.xml (working copy)
+@@ -65,12 +65,6 @@
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+- name="%phphelpFormat"
+- category="net.sourceforge.phpeclipse.preferences.PHPPreferencePage"
+- class="net.sourceforge.phpdt.phphelp.PHPHelpPreferencePage"
+- id="net.sourceforge.phpdt.phphelp.PHPHelpPreferencePage">
+- </page>
+- <page
+ name="%httpQuery"
+ category="net.sourceforge.phpeclipse.preferences.PHPPreferencePage"
+ class="net.sourceforge.phpdt.httpquery.preferences.ConfigurationPreferencePage"
diff --git a/eclipse-phpeclipse.spec b/eclipse-phpeclipse.spec
new file mode 100644
index 0000000..c50015d
--- /dev/null
+++ b/eclipse-phpeclipse.spec
@@ -0,0 +1,224 @@
+%define eclipse_base %{_libdir}/eclipse
+%define eclipse_dropin %{_datadir}/eclipse/dropins
+
+Name: eclipse-phpeclipse
+Version: 1.2.3
+Release: 3%{?dist}
+Summary: PHP Eclipse plugin
+Group: Development/Tools
+License: CPL
+URL: http://phpeclipse.net/
+
+Source0: http://downloads.sourceforge.net/project/phpeclipse/a%29%20Eclipse%203.3.x/PHPEclipse-1.2.3/PHPEclipse-1.2.3.200910091456PRD-src.zip
+
+# Fix broken PHP table of contents links in the Eclipse help
+Patch0: %{name}-broken-help-links.patch
+
+# Don't package hidden eclipse project files
+Patch1: %{name}-fix-build-props.patch
+
+# Integrate properly with Fedora's apache (probably does not want to go upstream)
+Patch2: %{name}-httpd-integration.patch
+
+# Remove Windows specific preferences (probably does not want to go upstream)
+Patch4: %{name}-rm-win32-help.patch
+
+# Fix a bug that passed the wrong file location to the external parser
+Patch5: %{name}-external-parser.patch
+
+# Fix a bug that passed in the wrong URL to the browser
+Patch6: %{name}-external-preview.patch
+
+# Fix an exception that was causing the phpmanual not to show when you first open the PHP perspective
+Patch7: %{name}-fix-phpmanual-view.patch
+
+# Remove a reference that was causing a build failure on Eclipse 3.6+
+Patch8: %{name}-remove-internal-eclipse-ref.patch
+
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch: noarch
+
+BuildRequires: java-devel
+BuildRequires: jpackage-utils
+BuildRequires: eclipse-pde >= 3.4
+BuildRequires: htmlparser
+Requires: java
+Requires: jpackage-utils
+Requires: eclipse-platform >= 3.4
+Requires: htmlparser
+Requires: php >= 5
+Requires: php-pecl-xdebug
+Requires: httpd
+
+%description
+PHPEclipse is an open source PHP IDE based on the Eclipse platform. Features
+supported include syntax highlighting, content assist, PHP manual integration,
+templates and support for the XDebug and DBG debuggers.
+
+%prep
+%setup -q -c
+
+# apply patches
+%patch0 -p0 -b .orig
+%patch1 -p0 -b .orig
+%patch2 -p0 -b .orig
+%patch4 -p0 -b .orig
+%patch5 -p0 -b .orig
+%patch6 -p0 -b .orig
+%patch7 -p0 -b .orig
+%patch8 -p0 -b .orig
+
+#remove bundled jars
+find -name '*.class' -exec rm -f '{}' \;
+find -name '*.jar' -exec rm -f '{}' \;
+
+# ditch bundled libs in favor of building against fedora packaged libs
+pushd plugins
+build-jar-repository -s -p net.sourceforge.phpeclipse.phpmanual.htmlparser htmlparser
+popd
+
+# fix jar versions
+find -name MANIFEST.MF | xargs sed --in-place "s/0.0.0/%{version}/"
+
+%build
+# build the main feature
+%{eclipse_base}/buildscripts/pdebuild -f net.sourceforge.phpeclipse.feature
+
+# build the debug features
+%{eclipse_base}/buildscripts/pdebuild -f net.sourceforge.phpeclipse.debug.feature
+%{eclipse_base}/buildscripts/pdebuild -f net.sourceforge.phpeclipse.xdebug.feature
+
+%install
+rm -rf %{buildroot}
+install -d -m 755 %{buildroot}%{eclipse_dropin}
+unzip -q -d %{buildroot}%{eclipse_dropin}/phpeclipse build/rpmBuild/net.sourceforge.phpeclipse.feature.zip
+unzip -q -d %{buildroot}%{eclipse_dropin}/phpeclipse-debug build/rpmBuild/net.sourceforge.phpeclipse.debug.feature.zip
+unzip -q -d %{buildroot}%{eclipse_dropin}/phpeclipse-xdebug build/rpmBuild/net.sourceforge.phpeclipse.xdebug.feature.zip
+
+# need to recreate the symlinks to libraries that were setup in "prep"
+# because for some reason the ant copy task doesn't preserve them
+pushd %{buildroot}%{eclipse_dropin}/phpeclipse/eclipse/plugins/net.sourceforge.phpeclipse.phpmanual.htmlparser_*
+rm *.jar
+build-jar-repository -s -p . htmlparser
+popd
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%doc features/net.sourceforge.phpeclipse.feature/cpl-v10.html
+%{eclipse_dropin}/phpeclipse
+%{eclipse_dropin}/phpeclipse-debug
+%{eclipse_dropin}/phpeclipse-xdebug
+
+%changelog
+* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.3-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+
+* Sat Sep 25 2010 Mat Booth <fedora@matbooth.co.uk> 1.2.3-2
+- Patch out a reference to an internal Eclipse class that was causing a build
+ failure on Eclipse 3.6+
+
+* Tue Jan 26 2010 Alexander Kurtakov <akurtako@redhat.com> 1.2.3-1
+- Update to 1.2.3 release.
+- Use upstream tarball.
+
+* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
+
+* Sun Apr 05 2009 Mat Booth <fedora@matbooth.co.uk> 1.2.1-4
+- Drop GCJ AOT support.
+- Add htmlparser dependency and drop htmlparser patch.
+- Add patch to fix PartInitException and IllegalArgumentException in
+ PHP Manual view.
+
+* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
+* Sun Nov 16 2008 Mat Booth <fedora@matbooth.co.uk> 1.2.1-2
+- Add php-pecl-xdebug dependency.
+
+* Fri Nov 14 2008 Mat Booth <fedora@matbooth.co.uk> 1.2.1-1
+- Update to 1.2.1 and rebase patches.
+- Fixes mark occurances bug in Eclipse 3.4 (#706).
+- Fix NPE on shutdown if external tools are not used.
+
+* Tue Sep 09 2008 Mat Booth <fedora@matbooth.co.uk> 1.2.0-0.4.svn1573
+- Fix FTBFS due to patch fuzz.
+
+* Wed Jul 30 2008 Andrew Overholt <overholt@redhat.com> 1.2.0-0.3.svn1573
+- Update for building against Eclipse SDK 3.4.
+
+* Sun Jun 29 2008 Mat Booth <fedora@matbooth.co.uk> 1.2.0-0.2.svn1573
+- Add patch for Show External Preview functionality.
+- Add patch for Use External PHP Parser functionality.
+
+* Sat Jun 28 2008 Mat Booth <fedora@matbooth.co.uk> 1.2.0-0.1.svn1573
+- New maintainer.
+- Update to version 1.2.0 pre-release, svn1573.
+- Adapt patches to new version.
+- Update package for new Eclipse plugin guidelines.
+
+* Mon Feb 11 2008 Brandon Holbrook <fedora at theholbrooks.org> 1.1.8-18
+- Rebuild for gcc-4.3
+
+* Sat Oct 20 2007 Brandon Holbrook <fedora at theholbrooks.org> 1.1.8-17
+- Reference php5 instead of php4 in httpd.conf [bug 314831]
+
+* Mon Dec 18 2006 Brandon Holbrook <fedora at theholbrooks.org> 1.1.8-16
+- Require eclipse-pde-runtime
+
+* Mon Dec 18 2006 Brandon Holbrook <fedora at theholbrooks.org> 1.1.8-15
+- Own gcj/eclipse-phpeclipse/
+- dos2unix cpl-v10.html
+
+* Mon Dec 18 2006 Brandon Holbrook <fedora at theholbrooks.org> 1.1.8-13
+- Replace datadir with libdir in sharedConfiguration to match new eclipse
+
+* Tue Nov 28 2006 Brandon Holbrook <fedora at theholbrooks.org> 1.1.8-12
+- Added -Dosgi.sharedConfiguration.area to build command
+
+* Mon Nov 27 2006 Brandon Holbrook <fedora at theholbrooks.org> 1.1.8-11
+- Removed maximum version Requirement for eclipse-platform
+
+* Mon Nov 27 2006 Brandon Holbrook <fedora at theholbrooks.org> 1.1.8-10
+- New java command to fix broken builds
+
+* Thu Nov 2 2006 Brandon Holbrook <fedora at theholbrooks.org> 1.1.8-9
+- Use included .html file as %%doc
+
+* Tue Oct 31 2006 Brandon Holbrook <fedora at theholbrooks.org> 1.1.8-8
+- New maintainer
+- Fix Group, License, and Description
+- Include a copy of the CPL-1.0
+
+* Fri Aug 18 2006 Ben Konrath <bkonrath@redhat.com> 1.1.8-7
+- Make external tools plugin re-locatable.
+- Enable GCJ support for Fedora.
+
+* Fri Aug 18 2006 Ben Konrath <bkonrath@redhat.com> 1.1.8-6
+- Use httpd.conf from external tools plugin instead of workspace to work around
+ a race condition in the main phpeclipse plugin.
+
+* Tue Aug 15 2006 Ben Konrath <bkonrath@redhat.com> 1.1.8-5
+- Do not start httpd automatically in httpd integration patch.
+
+* Fri Aug 11 2006 Ben Konrath <bkonrath@redhat.com> 1.1.8-4
+- Add httpd integration patch.
+- Move linux external tool preferences and httpd.conf to the httpd-integration
+ patch.
+- Remove README for httpd integration.
+- Add patch to remove win32 help preferences.
+- Add patch to compile against Eclipse SDK 3.2.
+
+* Mon May 15 2006 Ben Konrath <bkonrath@redhat.com> 1.1.8-3
+- Add preferences for the external tools on linux.
+- Add README for httpd integration.
+
+* Fri May 12 2006 Ben Konrath <bkonrath@redhat.com> 1.1.8-2
+- Add requires.
+
+* Wed Apr 26 2006 Ben Konrath <bkonrath@redhat.com> 1.1.8-1
+- initial version