aboutsummaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
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)