diff --git a/eclipse-bug-323736.patch b/eclipse-bug-323736.patch deleted file mode 100644 index 1925346..0000000 --- a/eclipse-bug-323736.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 58f274a78322f0cabb85f1e5638950a3ee59ed61 Mon Sep 17 00:00:00 2001 -From: Maturin -Date: Mon, 9 Nov 2015 21:43:49 +0100 -Subject: [PATCH] Fixed bug 3237365, running Ruby unit tests with 1.8, 1.9 or - later. - ---- - .../testing/dltk-testunit-runner.rb | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -diff --git a/plugins/org.eclipse.dltk.ruby.testing/testing/dltk-testunit-runner.rb b/plugins/org.eclipse.dltk.ruby.testing/testing/dltk-testunit-runner.rb -index 607c2fd..8e32e9a 100644 ---- a/plugins/org.eclipse.dltk.ruby.testing/testing/dltk-testunit-runner.rb -+++ b/plugins/org.eclipse.dltk.ruby.testing/testing/dltk-testunit-runner.rb -@@ -17,6 +17,7 @@ module MessageIds - - # Notification that a test run has ended. - # TEST_RUN_END + elapsedTime.toString(). -+ - TEST_RUN_END = "%RUNTIME" - - # Notification about a test inside the test suite. -@@ -249,7 +250,13 @@ def sendMessage(message) - if port != 0 - path = ENV[DLTK::TestUnit::EnvVars::PATH] - autoRunner = Test::Unit::AutoRunner.new(path != nil) -- autoRunner.output_level = Test::Unit::UI::SILENT -+ -+ if RUBY_VERSION >= "1.9" -+ autoRunner.runner_options[:output_level] = Test::Unit::UI::Console::OutputLevel::SILENT -+ else -+ autoRunner.output_level = Test::Unit::UI::SILENT -+ end -+ - autoRunner.base = path if path - # ssanders - Support non-standard test filenames (e.g. Rails) - autoRunner.pattern = [/\b.*_test\.rb\Z/m] diff --git a/eclipse-bug-489902.patch b/eclipse-bug-489902.patch deleted file mode 100644 index 9ae393e..0000000 --- a/eclipse-bug-489902.patch +++ /dev/null @@ -1,115 +0,0 @@ -From 2f9a3d0dcbff408ab010081fbcb1f74d91dfc24d Mon Sep 17 00:00:00 2001 -From: Alexander Kurtakov -Date: Fri, 18 Mar 2016 09:39:34 +0200 -Subject: Bug 489902 - unreadable Ruby hover help and Ruby Documentation view - -Issue is that AbstractDocumentationView passes COLOR_INFO_BACKGROUND as -bg color to HTMLPrinter but the method called has #000000 as foreground -color. Fixed by passing both bg and fg colors. - -Change-Id: I03dddf075403aa594e3b46b812a47f6308e1993b -Signed-off-by: Alexander Kurtakov --- - .../eclipse/dltk/internal/ui/text/HTMLPrinter.java | 28 +++++++++++++++++++--- - .../ui/infoviews/AbstractDocumentationView.java | 7 ++++-- - 2 files changed, 30 insertions(+), 5 deletions(-) - -diff --git a/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/internal/ui/text/HTMLPrinter.java b/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/internal/ui/text/HTMLPrinter.java -index 4fc9d1c..77f3f3f 100644 ---- a/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/internal/ui/text/HTMLPrinter.java -+++ b/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/internal/ui/text/HTMLPrinter.java -@@ -1,11 +1,10 @@ - /******************************************************************************* -- * Copyright (c) 2000, 2007 IBM Corporation and others. -+ * Copyright (c) 2000, 2016 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * -- - *******************************************************************************/ - package org.eclipse.dltk.internal.ui.text; - -@@ -92,6 +91,28 @@ public class HTMLPrinter { - } - } - -+ public static void insertPageProlog(StringBuffer buffer, int position, -+ RGB bgRGB, RGB fgRGB, String styleSheet) { -+ -+ if (bgRGB == null) -+ insertPageProlog(buffer, position, styleSheet); -+ else { -+ StringBuffer pageProlog = new StringBuffer(300); -+ -+ pageProlog.append(""); //$NON-NLS-1$ -+ -+ appendStyleSheetURL(pageProlog, styleSheet); -+ -+ pageProlog.append(""); //$NON-NLS-1$ -+ -+ buffer.insert(position, pageProlog.toString()); -+ } -+ } -+ - public static void insertStyles(StringBuffer buffer, String[] styles) { - if (styles == null || styles.length == 0) - return; -@@ -167,7 +188,8 @@ public class HTMLPrinter { - - public static void insertPageProlog(StringBuffer buffer, int position, - String styleSheet) { -- insertPageProlog(buffer, position, HTMLUtils.getBgColor(), styleSheet); -+ insertPageProlog(buffer, position, HTMLUtils.getBgColor(), -+ HTMLUtils.getFgColor(), styleSheet); - } - - public static void addPageProlog(StringBuffer buffer) { -diff --git a/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/infoviews/AbstractDocumentationView.java b/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/infoviews/AbstractDocumentationView.java -index 32083f3..55c1b88 100644 ---- a/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/infoviews/AbstractDocumentationView.java -+++ b/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/infoviews/AbstractDocumentationView.java -@@ -109,7 +109,7 @@ public abstract class AbstractDocumentationView extends AbstractInfoView { - private static String fgStyleSheet; - /** The Browser widget */ - private boolean fIsUsingBrowserWidget; -- private RGB fBackgroundColorRGB; -+ private RGB fBackgroundColorRGB, fForegroundColorRGB; - - /** - * The Javadoc view's select all action. -@@ -339,6 +339,7 @@ public abstract class AbstractDocumentationView extends AbstractInfoView { - @Override - protected void setForeground(Color color) { - getControl().setForeground(color); -+ fForegroundColorRGB = color.getRGB(); - } - - /* -@@ -347,8 +348,9 @@ public abstract class AbstractDocumentationView extends AbstractInfoView { - // Apply style sheet - fBackgroundColorRGB = color.getRGB(); - if (getInput() == null) { -- StringBuffer buffer = new StringBuffer(""); //$NON-NLS-1$ -+ StringBuffer buffer = new StringBuffer(); - HTMLPrinter.insertPageProlog(buffer, 0, fBackgroundColorRGB, -+ fForegroundColorRGB, - fgStyleSheet); - setInput(buffer.toString()); - } else { -@@ -548,6 +550,7 @@ public abstract class AbstractDocumentationView extends AbstractInfoView { - private String addPrologeEpilog(StringBuffer buffer) { - if (buffer.length() > 0) { - HTMLPrinter.insertPageProlog(buffer, 0, fBackgroundColorRGB, -+ fForegroundColorRGB, - fgStyleSheet); - HTMLPrinter.addPageEpilog(buffer); - return buffer.toString(); --- -cgit v0.11.2-4-g4a35 - - diff --git a/eclipse-dltk-lucene.patch b/eclipse-dltk-lucene.patch new file mode 100644 index 0000000..9748b92 --- /dev/null +++ b/eclipse-dltk-lucene.patch @@ -0,0 +1,105 @@ +From a34fcb2cf40114a7f2434647c8270de467c09f1b Mon Sep 17 00:00:00 2001 +From: Mat Booth +Date: Tue, 5 Jul 2016 10:35:07 +0100 +Subject: [PATCH] Port to latest system Lucene + +--- + core/plugins/org.eclipse.dltk.core.index.lucene/.classpath | 3 --- + .../org.eclipse.dltk.core.index.lucene/META-INF/MANIFEST.MF | 9 ++++----- + .../org.eclipse.dltk.core.index.lucene/build.properties | 5 +---- + .../dltk/internal/core/index/lucene/BitFlagsQuery.java | 11 +++++------ + .../dltk/internal/core/index/lucene/IndexDirectory.java | 1 - + 5 files changed, 10 insertions(+), 19 deletions(-) + +diff --git a/core/plugins/org.eclipse.dltk.core.index.lucene/.classpath b/core/plugins/org.eclipse.dltk.core.index.lucene/.classpath +index 7376f74..098194c 100644 +--- a/core/plugins/org.eclipse.dltk.core.index.lucene/.classpath ++++ b/core/plugins/org.eclipse.dltk.core.index.lucene/.classpath +@@ -1,8 +1,5 @@ + + +- +- +- + + + +diff --git a/core/plugins/org.eclipse.dltk.core.index.lucene/META-INF/MANIFEST.MF b/core/plugins/org.eclipse.dltk.core.index.lucene/META-INF/MANIFEST.MF +index 029ec8a..57d6e87 100644 +--- a/core/plugins/org.eclipse.dltk.core.index.lucene/META-INF/MANIFEST.MF ++++ b/core/plugins/org.eclipse.dltk.core.index.lucene/META-INF/MANIFEST.MF +@@ -8,11 +8,10 @@ Bundle-Localization: plugin + Bundle-Vendor: %Bundle-Vendor + Require-Bundle: org.eclipse.core.runtime, + org.eclipse.core.resources, +- org.eclipse.dltk.core ++ org.eclipse.dltk.core, ++ org.apache.lucene.core, ++ org.apache.lucene.analyzers-common, ++ org.apache.lucene.misc + Bundle-RequiredExecutionEnvironment: JavaSE-1.7 + Bundle-ActivationPolicy: lazy +-Bundle-ClassPath: ., +- lib/lucene-analyzers-common-5.2.1.jar, +- lib/lucene-core-5.2.1.jar, +- lib/lucene-misc-5.2.1.jar + Export-Package: org.eclipse.dltk.core.index.lucene +diff --git a/core/plugins/org.eclipse.dltk.core.index.lucene/build.properties b/core/plugins/org.eclipse.dltk.core.index.lucene/build.properties +index eb43af9..665bfb0 100644 +--- a/core/plugins/org.eclipse.dltk.core.index.lucene/build.properties ++++ b/core/plugins/org.eclipse.dltk.core.index.lucene/build.properties +@@ -14,8 +14,5 @@ bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + plugin.properties,\ +- about.html,\ +- lib/lucene-analyzers-common-5.2.1.jar,\ +- lib/lucene-core-5.2.1.jar,\ +- lib/lucene-misc-5.2.1.jar ++ about.html + source.. = src/ +diff --git a/core/plugins/org.eclipse.dltk.core.index.lucene/src/org/eclipse/dltk/internal/core/index/lucene/BitFlagsQuery.java b/core/plugins/org.eclipse.dltk.core.index.lucene/src/org/eclipse/dltk/internal/core/index/lucene/BitFlagsQuery.java +index 9af3308..eacc736 100644 +--- a/core/plugins/org.eclipse.dltk.core.index.lucene/src/org/eclipse/dltk/internal/core/index/lucene/BitFlagsQuery.java ++++ b/core/plugins/org.eclipse.dltk.core.index.lucene/src/org/eclipse/dltk/internal/core/index/lucene/BitFlagsQuery.java +@@ -100,10 +100,9 @@ public class BitFlagsQuery extends Query { + @Override + public Explanation explain(LeafReaderContext context, int doc) + throws IOException { +- final Scorer scorer = scorer(context, +- context.reader().getLiveDocs()); ++ final Scorer scorer = scorer(context); + final boolean match = (scorer != null +- && scorer.advance(doc) == doc); ++ && scorer.iterator().advance(doc) == doc); + if (match) { + assert scorer.score() == 0; + return Explanation.match(0, "Match on id" + doc); //$NON-NLS-1$ +@@ -113,9 +112,9 @@ public class BitFlagsQuery extends Query { + } + + @Override +- public Scorer scorer(LeafReaderContext context, Bits acceptDocs) +- throws IOException { +- final DocIdSet set = getDocIdSet(context, acceptDocs); ++ public Scorer scorer(LeafReaderContext context) throws IOException { ++ final DocIdSet set = getDocIdSet(context, ++ context.reader().getLiveDocs()); + if (set == null) { + return null; + } +diff --git a/core/plugins/org.eclipse.dltk.core.index.lucene/src/org/eclipse/dltk/internal/core/index/lucene/IndexDirectory.java b/core/plugins/org.eclipse.dltk.core.index.lucene/src/org/eclipse/dltk/internal/core/index/lucene/IndexDirectory.java +index 20f3b00..5945bf8 100644 +--- a/core/plugins/org.eclipse.dltk.core.index.lucene/src/org/eclipse/dltk/internal/core/index/lucene/IndexDirectory.java ++++ b/core/plugins/org.eclipse.dltk.core.index.lucene/src/org/eclipse/dltk/internal/core/index/lucene/IndexDirectory.java +@@ -93,7 +93,6 @@ public class IndexDirectory extends RAFDirectory { + public IndexOutput createOutput(String name, IOContext context) + throws IOException { + ensureOpen(); +- ensureCanWrite(name); + return new RAFIndexOutput(name); + } + +-- +2.5.5 + diff --git a/eclipse-dltk.spec b/eclipse-dltk.spec index 58dd0e3..e3e73af 100644 --- a/eclipse-dltk.spec +++ b/eclipse-dltk.spec @@ -1,8 +1,8 @@ -%global gittag R5_4_0 +%global gittag R5_5_0 Name: eclipse-dltk -Version: 5.4.0 -Release: 4%{?dist} +Version: 5.5.0 +Release: 1%{?dist} Summary: Dynamic Languages Toolkit (DLTK) Eclipse plug-in License: EPL and (CPL or GPLv2+ or LGPLv2+) and Ruby URL: http://www.eclipse.org/dltk/ @@ -13,14 +13,8 @@ URL: http://www.eclipse.org/dltk/ Source0: eclipse-dltk-%{gittag}.tar.xz Source1: get-dltk.sh -# Fix unit test runner -Patch0: eclipse-bug-323736.patch - -# Fix documentation view colours -Patch1: eclipse-bug-489902.patch - -# Fix empty variable views -Patch2: eclipse-ruby-basicdebugger.patch +# Port to latest system lucene +Patch0: eclipse-dltk-lucene.patch BuildArch: noarch @@ -31,6 +25,9 @@ BuildRequires: eclipse-mylyn BuildRequires: eclipse-rse BuildRequires: eclipse-manpage BuildRequires: h2 +BuildRequires: lucene +BuildRequires: lucene-analysis +BuildRequires: lucene-misc BuildRequires: tycho Requires: eclipse-platform >= 1:4.4.0 @@ -110,12 +107,8 @@ Tests for Eclipse Dynamic Languages Toolkit (DLTK). %prep %setup -q -n eclipse-dltk-%{gittag} -pushd org.eclipse.dltk.ruby -%patch0 -p1 -%patch2 -p1 -popd pushd org.eclipse.dltk.core -%patch1 -p1 +%patch0 -p1 popd # We are not shipping the python and javascript editors @@ -130,6 +123,9 @@ popd sed -i '//,/<\/target>/ d' org.eclipse.dltk.core/core/tests/org.eclipse.dltk.core.tests/pom.xml +%pom_xpath_remove "pom:plugin[pom:artifactId='tycho-packaging-plugin']/pom:dependencies" org.eclipse.dltk.releng/build +%pom_xpath_remove "pom:plugin[pom:artifactId='tycho-packaging-plugin']/pom:configuration" org.eclipse.dltk.releng/build + %mvn_package "::pom::" __noinstall %mvn_package ":*.tests" tests %mvn_package "::jar:sources:" sdk @@ -141,20 +137,12 @@ sed -i '//,/<\/target>/ d' org.eclipse.dltk.core/core/tests/org.eclipse. %mvn_package "org.eclipse.dltk.mylyn:" mylyn %mvn_package "org.eclipse.dltk.rse:" rse %mvn_package "org.eclipse.dltk.sh:" sh -%mvn_package "org.eclipse.dltk.features:org.eclipse.dltk.core{,.index}" core +%mvn_package "org.eclipse.dltk.features:org.eclipse.dltk.core{,.index,.index.lucene}" core %mvn_package "org.eclipse.dltk.features:org.eclipse.dltk.ruby" ruby %mvn_package "org.eclipse.dltk.features:org.eclipse.dltk.{tcl,itcl,xotcl}" tcl %mvn_package "org.eclipse.dltk.features:org.eclipse.dltk.mylyn" mylyn %mvn_package "org.eclipse.dltk.features:org.eclipse.dltk.rse" rse -# TODO fix this upstream -for b in org.eclipse.dltk.ruby/tests/org.eclipse.dltk.ruby.testing.tests ; do - sed -i "/^Bundle-Localization/d" $b/META-INF/MANIFEST.MF - sed -i "s|plugin.properties|OSGI-INF/|" $b/build.properties - mkdir -p $b/OSGI-INF/l10n - mv $b/plugin.properties $b/OSGI-INF/l10n/bundle.properties -done - %build %mvn_build -j -f -- -f org.eclipse.dltk.releng/pom.xml @@ -183,6 +171,9 @@ done %files tests -f .mfiles-tests %changelog +* Mon Jul 04 2016 Mat Booth - 5.5.0-1 +- Update and port to latest Lucene 5 + * Tue Mar 29 2016 Mat Booth - 5.4.0-4 - Fix empty Variables view when debugging Ruby script diff --git a/eclipse-ruby-basicdebugger.patch b/eclipse-ruby-basicdebugger.patch deleted file mode 100644 index 4872133..0000000 --- a/eclipse-ruby-basicdebugger.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 0631971d56be96c2f17966a8abf78162076983e9 Mon Sep 17 00:00:00 2001 -From: Alexander Kurtakov -Date: Fri, 25 Mar 2016 19:03:00 +0200 -Subject: Ensure BasicDebugger works for newer Ruby versions. - -Sending non String to Kernel.eval doesn't work so ensure it is converted -beforehand. - -See-also: https://bugzilla.redhat.com/show_bug.cgi?id=1319761 - -Change-Id: I7dfbf2e2f4b7064d15e860d479c860c4c1ef8102 -Signed-off-by: Alexander Kurtakov ---- - .../debugger/basic/BasicContext.rb | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - -diff --git a/plugins/org.eclipse.dltk.ruby.basicdebugger/debugger/basic/BasicContext.rb b/plugins/org.eclipse.dltk.ruby.basicdebugger/debugger/basic/BasicContext.rb -index f4dde95..3e5bb1d 100644 ---- a/plugins/org.eclipse.dltk.ruby.basicdebugger/debugger/basic/BasicContext.rb -+++ b/plugins/org.eclipse.dltk.ruby.basicdebugger/debugger/basic/BasicContext.rb -@@ -1,3 +1,12 @@ -+############################################################################### -+# Copyright (c) 2005, 2016 IBM Corporation and others. -+# All rights reserved. This program and the accompanying materials -+# are made available under the terms of the Eclipse Public License v1.0 -+# which accompanies this distribution, and is available at -+# http://www.eclipse.org/legal/epl-v10.html -+# -+############################################################################### -+ - require 'monitor' - require 'common/Logger' - require 'debugger/AbstractContext' -@@ -95,7 +104,7 @@ module XoredDebugger - end - binding = frame[ :binding ] - info = frame[ :info ] -- Kernel.eval(text, binding, info.file, info.line) -+ Kernel.eval(text.to_s, binding, info.file, info.line) - end - - # Stack depth --- -cgit v0.11.2-4-g4a35 - - diff --git a/get-dltk.sh b/get-dltk.sh index ea771ef..a10dd7b 100755 --- a/get-dltk.sh +++ b/get-dltk.sh @@ -2,7 +2,7 @@ set -e NAME="eclipse-dltk" -TAG=R5_4_0 +TAG=R5_5_0 rm -fr $NAME-$TAG mkdir $NAME-$TAG diff --git a/sources b/sources index 6ae7f3b..46f60e4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a3a226eeade694cd8af0756a9d368e3d eclipse-dltk-R5_4_0.tar.xz +70346c267142369a4ccb35ce43d6d544 eclipse-dltk-R5_5_0.tar.xz