diff options
Diffstat (limited to 'java/eclipse/files')
-rw-r--r-- | java/eclipse/files/Makefile | 162 | ||||
-rw-r--r-- | java/eclipse/files/eclipse.in | 47 | ||||
-rw-r--r-- | java/eclipse/files/patch-BootLoader.java | 23 | ||||
-rw-r--r-- | java/eclipse/files/patch-InternalBootLoader.java | 11 | ||||
-rw-r--r-- | java/eclipse/files/patch-RuntimeErrorDialog.java | 21 | ||||
-rw-r--r-- | java/eclipse/files/patch-UpdateManagerUtils.java | 18 | ||||
-rw-r--r-- | java/eclipse/files/patch-build.xml | 23 | ||||
-rw-r--r-- | java/eclipse/files/patch-core.resources::plugin.properties | 7 | ||||
-rw-r--r-- | java/eclipse/files/patch-eclipseMotif.c | 14 | ||||
-rw-r--r-- | java/eclipse/files/patch-update.core::plugin.properties | 9 | ||||
-rw-r--r-- | java/eclipse/files/patch-update.cpp | 13 |
11 files changed, 348 insertions, 0 deletions
diff --git a/java/eclipse/files/Makefile b/java/eclipse/files/Makefile new file mode 100644 index 000000000000..47fe627dca0c --- /dev/null +++ b/java/eclipse/files/Makefile @@ -0,0 +1,162 @@ +# $FreeBSD$ + +ECHO= /bin/echo +MKDIR= /bin/mkdir -p +SED= sed +ANT= ant -Dos=$(ECLIPSE_OS) -Dws=$(ECLIPSE_WS) + +PORTDESTDIR= $(PREFIX)/eclipse + +CFLAGS+= -I$(JAVA_HOME)/include \ + -I$(JAVA_HOME)/include/bsd \ + -I$(JAVA_HOME)/include/freebsd + +LIBUPDATE= libupdate.so +LIBUPDATE_DST= plugins/org.eclipse.update.core.freebsd/os/freebsd/x86 +LIBUPDATE_SRC= plugins/org.eclipse.update.core.freebsd/src + +SWT_VERSION= $(ECLIPSE_BUILD) +LIBSWT= libswt-gtk-$(SWT_VERSION).so +LIBSWTPI= libswt-pi-gtk-$(SWT_VERSION).so +LIBSWT_DST= plugins/org.eclipse.swt.gtk/os/freebsd/x86 +LIBSWT_SRC= plugins/org.eclipse.swt/Eclipse_SWT + +LAUNCHER= eclipse +LAUNCHER_DST= plugins/platform-launcher/bin/freebsd/gtk +LAUNCHER_SRC= plugins/platform-launcher/library/gtk + +LAUNCHER_SRCS= $(LAUNCHER_SRC)/../eclipse.c \ + $(LAUNCHER_SRC)/../eclipseUtil.c \ + $(LAUNCHER_SRC)/eclipseGtk.c +LAUNCHER_OBJS= $(LAUNCHER_SRCS:S/.c/.o/g) + +LAUNCHER_CFLAGS= -s \ + -DPROGRAM_NAME="\"$(LAUNCHER)\"" \ + -DDEFAULT_OS="\"$(ECLIPSE_OS)\"" \ + -DDEFAULT_OS_ARCH="\"$(ECLIPSE_ARCH)\"" \ + -DDEFAULT_WS="\"$(ECLIPSE_WS)\"" \ + -I$(LAUNCHER_SRC) \ + -I$(LAUNCHER_SRC)/.. \ + `pkg-config --cflags gtk+-2.0` +LAUNCHER_LIBS= `pkg-config --libs gtk+-2.0` + +ECLIPSE_TOPLEVEL_FILES= \ + startup.jar splash.bmp cpl-v10.html \ + install.ini notice.html .eclipseproduct + +ECLIPSE_CORE_FEATURES= \ + org.eclipse.jdt \ + org.eclipse.jdt.source \ + org.eclipse.pde \ + org.eclipse.platform \ + org.eclipse.platform.source \ + org.eclipse.team.extras + +ECLIPSE_GTK_FEATURES= \ + org.eclipse.platform.freebsd.gtk \ + org.eclipse.platform.freebsd.gtk.source \ + org.eclipse.sdk.freebsd.gtk \ + +ECLIPSE_MOTIF_FEATURES= \ + org.eclipse.platform.freebsd.gtk \ + org.eclipse.platform.freebsd.gtk.source \ + org.eclipse.sdk.freebsd.gtk \ + +ECLIPSE_FEATURES= $(ECLIPSE_CORE_FEATURES) + +.if $(ECLIPSE_WS) == gtk +ECLIPSE_FEATURES+= $(ECLIPSE_GTK_FEATURES) +.endif + +.if $(ECLIPSE_WS) == motif +ECLIPSE_FEATURES+= $(ECLIPSE_MOTIF_FEATURES) +.endif + +all: binaries java + +binaries: libupdate libswt launcher + +libupdate: $(LIBUPDATE_DST)/$(LIBUPDATE) + +$(LIBUPDATE_DST)/$(LIBUPDATE): $(LIBUPDATE_SRC)/update.cpp + @$(ECHO) "===> Building $(LIBUPDATE)." + $(MKDIR) $(LIBUPDATE_DST) + $(CXX) $(CFLAGS) -shared -fpic -fPIC -I$(LIBUPDATE_SRC) -o $(.TARGET) $(.ALLSRC) + +libswt: $(LIBSWT_DST)/$(LIBSWTPI) $(LIBSWT_DST)/$(LIBSWT) + +$(LIBSWT_DST)/$(LIBSWT): $(LIBSWT_SRC)/callback.o + @$(ECHO) "===> Linking $(LIBSWT)." + $(MKDIR) $(LIBSWT_DST) + $(CC) -shared -Wl,-x -o $(.TARGET) $(.ALLSRC) + +$(LIBSWT_DST)/$(LIBSWTPI): $(LIBSWT_SRC)/structs.o $(LIBSWT_SRC)/swt.o + @$(ECHO) "===> Linking $(LIBSWTPI)." + $(MKDIR) $(LIBSWT_DST) + $(CC) -shared -Wl,-x -o $(.TARGET) $(.ALLSRC) \ + `pkg-config --libs gthread-2.0` \ + `pkg-config --libs gtk+-2.0` + +.for i in callback.c structs.c swt.c +$(LIBSWT_SRC)/${i:R:S/$/.o/g}: $(LIBSWT_SRC)/$i + @$(ECHO) "===> Compiling $i." + $(CC) $(CFLAGS) -c -s -fpic -fPIC -o $(.TARGET) $(.ALLSRC) \ + `pkg-config --cflags gthread-2.0` \ + `pkg-config --cflags gtk+-2.0` +.endfor + +launcher: $(LAUNCHER_DST)/$(LAUNCHER) + +.for i in $(LAUNCHER_SRCS) +${i:R:S/$/.o/g}: $i + @$(ECHO) "===> Compiling $i." + $(CC) -c $(CFLAGS) $(LAUNCHER_CFLAGS) -o $(.TARGET) $(.ALLSRC) +.endfor + +$(LAUNCHER_DST)/$(LAUNCHER):: $(LAUNCHER_OBJS) + @$(ECHO) "===> Linking $(LAUNCHER)." + $(MKDIR) $(LAUNCHER_DST) + $(CXX) -o $(.TARGET) $(.ALLSRC) $(LAUNCHER_LIBS) + +java: build-java build-doc build-install + +build-java: + @$(ECHO) "===> Compiling Java sources." + $(ANT) -f build.xml compile + +build-doc: + @$(ECHO) "===> Building Javadoc." + $(ANT) -f build.xml buildDoc + +build-install: + $(ANT) -f build.xml install + +install: + @$(ECHO) "===> Creating destination directory..." + @$(MKDIR) $(PORTDESTDIR) + @$(ECHO) "===> Installing a schell script..." + @$(SED) \ + -e "/%%ECLIPSE_HOME%%/s//$(PORTDESTDIR:S/\//\\\//g)/g" \ + -e "/%%JAVA_HOME%%/s//$(JAVA_HOME:S/\//\\\//g)/g" \ + eclipse.in > eclipse.tmp + $(BSD_INSTALL_SCRIPT) eclipse.tmp $(PREFIX)/bin/eclipse + @$(ECHO) "===> Installing Eclipse plaftorm." + @$(MKDIR) $(PORTDESTDIR) + $(BSD_INSTALL_PROGRAM) $(LAUNCHER_DST)/$(LAUNCHER) $(PORTDESTDIR) +.for i in $(ECLIPSE_TOPLEVEL_FILES) + $(BSD_INSTALL_DATA) plugins/org.eclipse.platform/$i $(PORTDESTDIR) +.endfor +.for i in $(ECLIPSE_FEATURES) + @$(ECHO) "===> Installing feature $i" + $(ANT) -f features/$i-feature/build.xml \ + -Dfeature.base=$(PORTDESTDIR) \ + -Dinclude.children=yes \ + gather.bin.parts +.endfor + +clean: + rm -rf $(LIBUPDATE_DST)/$(LIBUPDATE) + rm -rf $(LIBSWT_DST)/$(LIBSWTPI) $(LIBSWT_DST)/$(LIBSWT) + rm -rf $(LAUNCHER_DST)/$(LAUNCHER) + rm -rf $(LAUNCHER_OBJS) + rm -rf $(LIBSWT_SRC)/*.o $(LAUNCHER_OBJS) diff --git a/java/eclipse/files/eclipse.in b/java/eclipse/files/eclipse.in new file mode 100644 index 000000000000..d5cc2d4311a3 --- /dev/null +++ b/java/eclipse/files/eclipse.in @@ -0,0 +1,47 @@ +#!/bin/sh +# +# FreeBSD-specific startup script for Eclipse Platform +# +# See: http://www.eclipse.org +# +# $FreeBSD$ +# + +DEFAULT_JAVA_HOME=%%JAVA_HOME%% +ECLIPSE_HOME=%%ECLIPSE_HOME%% +DEFAULT_JAVA_CMD=java + + +#----------------------------------------------------------------------------- +# Determine configuration settings +#----------------------------------------------------------------------------- + +# Determine the JDK home directory +if [ -z "${JAVA_HOME}" ]; then + JAVA_HOME=${DEFAULT_JAVA_HOME} +fi + +# Determine 'java' executable +if [ -z "${JAVACMD}" ]; then + if [ -n "${JAVA_HOME}" ]; then + JAVACMD="${JAVA_HOME}/bin/java" + else + JAVACMD=${DEFAULT_JAVACMD} + fi +fi + +# Check if 'java' executable can be found +if [ ! -x "$JAVACMD" ]; then + echo "Error: JAVA_HOME is not defined correctly: ${JAVA_HOME}" + echo " Unable to find ${JAVACMD}" + exit 1 +fi + +# Check if 'eclipse' executable can be found +if [ ! -x "${ECLIPSE_HOME}/eclipse" ]; then + echo "Error: ECLIPSE_HOME is not defined correctly: ${ECLIPSE_HOME}" + echo " Unable to find eclipse launcher binary" + exit 1 +fi + +PATH=${JAVA_HOME}/bin:$PATH "${ECLIPSE_HOME}/eclipse" $@ diff --git a/java/eclipse/files/patch-BootLoader.java b/java/eclipse/files/patch-BootLoader.java new file mode 100644 index 000000000000..057397aa2c7a --- /dev/null +++ b/java/eclipse/files/patch-BootLoader.java @@ -0,0 +1,23 @@ +--- plugins/org.eclipse.core.boot/src/org/eclipse/core/boot/BootLoader.java.orig Thu Mar 6 12:13:43 2003 ++++ plugins/org.eclipse.core.boot/src/org/eclipse/core/boot/BootLoader.java Thu Mar 6 12:15:17 2003 +@@ -51,6 +51,12 @@ + public static final String OS_LINUX = "linux";//$NON-NLS-1$ + + /** ++ * Constant string (value "freebsd") indicating the platform is running on a ++ * FreeBSD operating system. ++ */ ++ public static final String OS_FREEBSD = "freebsd";//$NON-NLS-1$ ++ ++ /** + * Constant string (value "aix") indicating the platform is running on an + * AIX-based operating system. + */ +@@ -164,6 +170,7 @@ + OS_AIX, + OS_HPUX, + OS_LINUX, ++ OS_FREEBSD, + OS_MACOSX, + OS_QNX, + OS_SOLARIS, diff --git a/java/eclipse/files/patch-InternalBootLoader.java b/java/eclipse/files/patch-InternalBootLoader.java new file mode 100644 index 000000000000..e71270ec1c12 --- /dev/null +++ b/java/eclipse/files/patch-InternalBootLoader.java @@ -0,0 +1,11 @@ +--- plugins/org.eclipse.core.boot/src/org/eclipse/core/internal/boot/InternalBootLoader.java.orig Thu Mar 6 12:17:11 2003 ++++ plugins/org.eclipse.core.boot/src/org/eclipse/core/internal/boot/InternalBootLoader.java Thu Mar 6 12:18:11 2003 +@@ -946,6 +946,8 @@ + ws = BootLoader.WS_WIN32; + else if (os.equals(BootLoader.OS_LINUX)) + ws = BootLoader.WS_MOTIF; ++ else if (os.equals(BootLoader.OS_FREEBSD)) ++ ws = BootLoader.WS_GTK; + else if (os.equals(BootLoader.OS_MACOSX)) + ws = BootLoader.WS_CARBON; + else if (os.equals(BootLoader.OS_HPUX)) diff --git a/java/eclipse/files/patch-RuntimeErrorDialog.java b/java/eclipse/files/patch-RuntimeErrorDialog.java new file mode 100644 index 000000000000..da93620a419f --- /dev/null +++ b/java/eclipse/files/patch-RuntimeErrorDialog.java @@ -0,0 +1,21 @@ +--- plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/RuntimeErrorDialog.java.orig Thu Mar 6 12:23:58 2003 ++++ plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/RuntimeErrorDialog.java Thu Mar 6 12:25:26 2003 +@@ -68,8 +68,10 @@ + data.widthHint = getMinimumMessageWidth(); + // set the default height on linux. + // Note: on Windows, the default height is fine. +- if (System.getProperty("os.name").startsWith("Linux")) ++ if (System.getProperty("os.name").startsWith("Linux") || ++ System.getProperty("os.name").startsWith("FreeBSD")) + data.heightHint = convertVerticalDLUsToPixels(100); ++ else + text.setLayoutData(data); + text.setFont(parent.getFont()); + text.setBackground(composite.getDisplay().getSystemColor(SWT.COLOR_WHITE)); +@@ -88,4 +90,4 @@ + dialog.open(); + return; + } +-} +\ No newline at end of file ++} diff --git a/java/eclipse/files/patch-UpdateManagerUtils.java b/java/eclipse/files/patch-UpdateManagerUtils.java new file mode 100644 index 000000000000..d666ee2fee28 --- /dev/null +++ b/java/eclipse/files/patch-UpdateManagerUtils.java @@ -0,0 +1,18 @@ +--- plugins/org.eclipse.update.core/src/org/eclipse/update/internal/core/UpdateManagerUtils.java.orig Thu Mar 6 14:43:57 2003 ++++ plugins/org.eclipse.update.core/src/org/eclipse/update/internal/core/UpdateManagerUtils.java Thu Mar 6 14:44:53 2003 +@@ -17,7 +17,7 @@ + */
+ public class UpdateManagerUtils {
+
+- private static boolean OS_UNIX = BootLoader.OS_HPUX.equals(BootLoader.getOS()) || BootLoader.OS_AIX.equals(BootLoader.getOS()) || BootLoader.OS_LINUX.equals(BootLoader.getOS()) || BootLoader.OS_SOLARIS.equals(BootLoader.getOS());
++ private static boolean OS_UNIX = BootLoader.OS_HPUX.equals(BootLoader.getOS()) || BootLoader.OS_AIX.equals(BootLoader.getOS()) || BootLoader.OS_LINUX.equals(BootLoader.getOS()) || BootLoader.OS_FREEBSD.equals(BootLoader.getOS()) || BootLoader.OS_SOLARIS.equals(BootLoader.getOS());
+
+ private static Map table;
+
+@@ -735,4 +735,4 @@ + writer.init(file,encoding);
+ return writer;
+ }
+-} +\ No newline at end of file ++} diff --git a/java/eclipse/files/patch-build.xml b/java/eclipse/files/patch-build.xml new file mode 100644 index 000000000000..b78501cbff3d --- /dev/null +++ b/java/eclipse/files/patch-build.xml @@ -0,0 +1,23 @@ +--- build.xml.orig Thu Nov 7 15:18:47 2002 ++++ build.xml Thu Feb 13 19:32:36 2003 +@@ -181,7 +187,19 @@ + <equals arg1="${ws}" arg2="photon" /> + </and> + </condition> +- ++ <condition property="launcherBin" value="${install}/plugins/platform-launcher/bin/freebsd/motif"> ++ <and> ++ <equals arg1="${os}" arg2="freebsd" /> ++ <equals arg1="${ws}" arg2="motif" /> ++ </and> ++ </condition> ++ <condition property="launcherBin" value="${install}/plugins/platform-launcher/bin/freebsd/gtk"> ++ <and> ++ <equals arg1="${os}" arg2="freebsd" /> ++ <equals arg1="${ws}" arg2="gtk" /> ++ </and> ++ </condition> ++ + <condition property="win"> + <and> + <os family="windows" /> diff --git a/java/eclipse/files/patch-core.resources::plugin.properties b/java/eclipse/files/patch-core.resources::plugin.properties new file mode 100644 index 000000000000..fd9458728651 --- /dev/null +++ b/java/eclipse/files/patch-core.resources::plugin.properties @@ -0,0 +1,7 @@ +--- plugins/org.eclipse.core.resources/plugin.properties.orig Thu Mar 6 15:10:52 2003 ++++ plugins/org.eclipse.core.resources/plugin.properties Thu Mar 6 15:11:38 2003 +@@ -15,3 +15,4 @@ + + win32FragmentName = Core Resource Management Win32 Fragment + linuxFragmentName = Core Resource Management Linux Fragment ++freebsdFragmentName = Core Resource Management FreeBSD Fragment diff --git a/java/eclipse/files/patch-eclipseMotif.c b/java/eclipse/files/patch-eclipseMotif.c new file mode 100644 index 000000000000..c999493f7458 --- /dev/null +++ b/java/eclipse/files/patch-eclipseMotif.c @@ -0,0 +1,14 @@ +--- plugins/platform-launcher/library/motif/eclipseMotif.c.orig Fri Nov 8 05:17:00 2002 ++++ plugins/platform-launcher/library/motif/eclipseMotif.c Fri Nov 29 05:55:57 2002 +@@ -323,7 +323,11 @@ + if (jvmProcess != 0) + { + wait( &exitCode ); ++#if !defined(__FreeBSD__) + jvmExitCode = ((exitCode & 0x00ff) == 0 ? (exitCode >> 8) : exitCode); /* see wait(2) */ ++#else ++ jvmExitCode = WIFEXITED(exitCode) ? WEXITSTATUS(exitCode) : exitCode; /* see wait(2) */ ++#endif + } + + /* Return the exit code from the JVM. */ diff --git a/java/eclipse/files/patch-update.core::plugin.properties b/java/eclipse/files/patch-update.core::plugin.properties new file mode 100644 index 000000000000..18227b382169 --- /dev/null +++ b/java/eclipse/files/patch-update.core::plugin.properties @@ -0,0 +1,9 @@ +--- plugins/org.eclipse.update.core/plugin.properties.orig Thu Mar 6 15:01:18 2003 ++++ plugins/org.eclipse.update.core/plugin.properties Thu Mar 6 15:01:59 2003 +@@ -2,5 +2,6 @@ + providerName= Eclipse.org
+ fragmentNameWin= Install/Update Core for Windows
+ fragmentNameLinux= Install/Update Core for Linux
++fragmentNameFreeBSD= Install/Update Core for FreeBSD
+
+
diff --git a/java/eclipse/files/patch-update.cpp b/java/eclipse/files/patch-update.cpp new file mode 100644 index 000000000000..eabdfd542d23 --- /dev/null +++ b/java/eclipse/files/patch-update.cpp @@ -0,0 +1,13 @@ +--- plugins/org.eclipse.update.core.linux/src/update.cpp.orig Tue Mar 4 14:18:02 2003 ++++ plugins/org.eclipse.update.core.linux/src/update.cpp Tue Mar 4 14:20:21 2003 +@@ -3,8 +3,8 @@ + * All Rights Reserved.
+ */
+
+-# include <sys/types.h>
+-# include <sys/statfs.h>
++# include <sys/param.h>
++# include <sys/mount.h>
+ # include <update.h>
+
+ /*
|