summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorJimmy Olgeni <olgeni@FreeBSD.org>2003-07-14 21:17:22 +0000
committerJimmy Olgeni <olgeni@FreeBSD.org>2003-07-14 21:17:22 +0000
commitcc601c7d34350a26ffe9fa3b88914c51b4195a1d (patch)
treec5adabb29131d12aa8c291647b04d8dcec9b107d /java
parentDonald Knuth kindly agreed to tag different versions of his tarballs by (diff)
The refactor/rename option would not work when building from sources, as
stated in Eclipse PR 37846. https://bugs.eclipse.org/bugs/show_bug.cgi?id=37846 The REINPLACE_CMD-powered "refactoring" is somewhat brutal, but it is better than 50+ patchfiles or a single large diff.
Notes
Notes: svn path=/head/; revision=84894
Diffstat (limited to 'java')
-rw-r--r--java/eclipse/Makefile17
-rw-r--r--java/eclipse/files/patch-SelectionDispatchAction.java32
2 files changed, 48 insertions, 1 deletions
diff --git a/java/eclipse/Makefile b/java/eclipse/Makefile
index 9d1da442aa85..c79fcf38db94 100644
--- a/java/eclipse/Makefile
+++ b/java/eclipse/Makefile
@@ -7,7 +7,7 @@
PORTNAME= eclipse
PORTVERSION= 2.1.1
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= java devel
MASTER_SITES= ${MASTER_SITE_ECLIPSE}
MASTER_SITE_SUBDIR= R-2.1.1-200306271545
@@ -38,8 +38,23 @@ ECLIPSE_BUILD= 2135
ECLIPSE_OS= freebsd
ECLIPSE_WS= gtk
ECLIPSE_ARCH= x86
+
+# Here we must work around a bug that pops up when building from sources. A
+# certain "run" method must be made visible in the whole class hierarchy by
+# changing making it public, as documented here:
+#
+# https://bugs.eclipse.org/bugs/show_bug.cgi?id=37846
+#
+# This access change has roots in patch-SelectionDispatchAction.java.
post-patch:
@${FIND} ${WRKSRC} -name build.xml | ${XARGS} ${REINPLACE_CMD} 's@verbose="true"@verbose="false"@g'
+ # "refactoring" begins here
+ @${LN} -sf "ui refactoring" ${WRKSRC}/plugins/org.eclipse.jdt.ui/ui_refactoring
+ @for FILE in $$(${FIND} -L ${WRKSRC} -print0 | ${XARGS} -0 ${GREP} -l -E "extends (SelectionDispatchAction|ReorgDestinationAction)" | grep -v " "); do \
+ ${REINPLACE_CMD} -e "s@protected void run(@public void run(@" \
+ -e "s@protected final void run(@public final void run(@" $$FILE; \
+ done
+
.include <bsd.port.mk>
diff --git a/java/eclipse/files/patch-SelectionDispatchAction.java b/java/eclipse/files/patch-SelectionDispatchAction.java
new file mode 100644
index 000000000000..b21c1b0d6870
--- /dev/null
+++ b/java/eclipse/files/patch-SelectionDispatchAction.java
@@ -0,0 +1,32 @@
+
+$FreeBSD$
+
+--- plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/SelectionDispatchAction.java.orig Mon Jul 14 20:30:10 2003
++++ plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/SelectionDispatchAction.java Mon Jul 14 20:30:27 2003
+@@ -123,7 +123,7 @@
+ * Executes this actions with the given structured selection. This default implementation
+ * calls <code>run(ISelection selection)</code>.
+ */
+- protected void run(IStructuredSelection selection) {
++ public void run(IStructuredSelection selection) {
+ run((ISelection)selection);
+ }
+
+@@ -141,7 +141,7 @@
+ * Executes this actions with the given text selection. This default implementation
+ * calls <code>run(ISelection selection)</code>.
+ */
+- protected void run(ITextSelection selection) {
++ public void run(ITextSelection selection) {
+ run((ISelection)selection);
+ }
+
+@@ -159,7 +159,7 @@
+ * Executes this actions with the given selection. This default implementation
+ * does nothing.
+ */
+- protected void run(ISelection selection) {
++ public void run(ISelection selection) {
+ }
+
+ /* (non-Javadoc)