diff --git a/java/eclipse/Makefile b/java/eclipse/Makefile index c51253580d9a..83ccfbd15d21 100644 --- a/java/eclipse/Makefile +++ b/java/eclipse/Makefile @@ -1,88 +1,94 @@ PORTNAME= eclipse PORTVERSION= 4.24 CATEGORIES= java devel # Tag's Timestamp on eclipse-platform/eclipse.platform.releng.aggregator github.com ECLIPSE_TAG= R4_24 ECLIPSE_TSTAMP= 20220616-0004 DIST_SUBDIR= ${PORTNAME} MAINTAINER= jonc@chen.org.nz COMMENT= Eclipse IDE 2022-06 WWW= https://www.eclipse.org/ LICENSE= EPL ONLY_FOR_ARCHS= aarch64 amd64 powerpc64 powerpc64le BUILD_DEPENDS= git:devel/git@lite \ ${LOCALBASE}/share/java/maven/bin/mvn:devel/maven \ zip:archivers/zip LIB_DEPENDS= libsecret-1.so:security/libsecret \ libwebkit2gtk-4.0.so:www/webkit2-gtk3 PORTSCOUT= ignore:1 USES= compiler:c++11-lang gmake pkgconfig gnome USE_GNOME= gtk30 USE_GITHUB= yes GH_TUPLE= eclipse-platform:eclipse.platform.releng.aggregator:${ECLIPSE_TAG} \ eclipse-jdt:eclipse.jdt:${ECLIPSE_TAG}:a/eclipse.jdt \ eclipse-jdt:eclipse.jdt.core:${ECLIPSE_TAG}:b/eclipse.jdt.core \ eclipse-jdt:eclipse.jdt.core.binaries:${ECLIPSE_TAG}:c/eclipse.jdt.core.binaries \ eclipse-jdt:eclipse.jdt.debug:${ECLIPSE_TAG}:d/eclipse.jdt.debug \ eclipse-jdt:eclipse.jdt.ui:${ECLIPSE_TAG}:e/eclipse.jdt.ui \ eclipse-pde:eclipse.pde:${ECLIPSE_TAG}:f/eclipse.pde \ eclipse-platform:eclipse.platform:${ECLIPSE_TAG}:g/eclipse.platform \ eclipse-platform:eclipse.platform.common:${ECLIPSE_TAG}:h/eclipse.platform.common \ eclipse-platform:eclipse.platform.debug:${ECLIPSE_TAG}:i/eclipse.platform.debug \ eclipse-platform:eclipse.platform.releng:${ECLIPSE_TAG}:j/eclipse.platform.releng \ eclipse-platform:eclipse.platform.resources:${ECLIPSE_TAG}:k/eclipse.platform.resources \ eclipse-platform:eclipse.platform.runtime:fd42b6e331:l/eclipse.platform.runtime \ eclipse-platform:eclipse.platform.swt:${ECLIPSE_TAG}:m/eclipse.platform.swt \ eclipse-platform:eclipse.platform.swt.binaries:${ECLIPSE_TAG}:n/eclipse.platform.swt.binaries \ eclipse-platform:eclipse.platform.team:${ECLIPSE_TAG}:o/eclipse.platform.team \ eclipse-platform:eclipse.platform.text:${ECLIPSE_TAG}:p/eclipse.platform.text \ eclipse-platform:eclipse.platform.ua:${ECLIPSE_TAG}:q/eclipse.platform.ua \ eclipse-platform:eclipse.platform.ui:${ECLIPSE_TAG}:r/eclipse.platform.ui \ eclipse-platform:eclipse.platform.ui.tools:${ECLIPSE_TAG}:s/eclipse.platform.ui.tools \ eclipse-equinox:equinox.binaries:${ECLIPSE_TAG}:t/rt.equinox.binaries \ eclipse-equinox:equinox.bundles:${ECLIPSE_TAG}:u/rt.equinox.bundles \ eclipse-equinox:equinox.framework:${ECLIPSE_TAG}:v/rt.equinox.framework \ eclipse-equinox:p2:${ECLIPSE_TAG}:w/rt.equinox.p2 \ daemonblade:eclipse-maven-repo:${PORTVERSION}:x USE_JAVA= 11+ DESKTOP_ENTRIES="Eclipse" \ "${COMMENT}" \ "${PORTNAME}" \ "${PORTNAME}" \ "Development;IDE;Java;" \ "false" SUB_FILES= ${PORTNAME} -MAVEN_ENV= MAVEN_OPTS=-Xmx1024m CC=${CC} JAVA_HOME=${JAVA_HOME} HOME=${WRKDIR}/githome +MAVEN_ENV= MAVEN_OPTS=-Xmx1024m CC=${CC} CFLAGS="${CFLAGS}" JAVA_HOME=${JAVA_HOME} HOME=${WRKDIR}/githome MAVEN_ECLIPSE= -Dmaven.repo.local=${WRKDIR}/eclipse-maven-repo-${PORTVERSION} \ -Dnative=gtk.freebsd.${ARCH} \ -DforceContextQualifier=v${ECLIPSE_TSTAMP} ECLIPSE_RESULT= eclipse.platform.releng.tychoeclipsebuilder/eclipse.platform.repository/target/products/org.eclipse.sdk.ide-freebsd.gtk.${ARCH}.tar.gz +.include + +.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 150 +CFLAGS+= -Wno-deprecated-non-prototype +.endif + do-build: cd ${WRKSRC} && ${SETENV} ${MAVEN_ENV} mvn --offline ${MAVEN_ECLIPSE} -DskipTests clean verify do-install: ${MKDIR} ${STAGEDIR}${DATADIR} ${TAR} -x --directory ${STAGEDIR}${DATADIR}/.. --file ${WRKSRC}/${ECLIPSE_RESULT} ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin # generate dynamic plist, to cater for different ARCHS post-install: cd ${STAGEDIR}${PREFIX} && ${FIND} -s bin/${PORTNAME} share/${PORTNAME} -not -type d >> ${TMPPLIST} cd ${STAGEDIR}${PREFIX} && ${FIND} -ds share/${PORTNAME} -type d | ${SED} -e 's,^,@dir ,' >> ${TMPPLIST} -.include +.include diff --git a/java/eclipse/files/patch-eclipse.platform.swt b/java/eclipse/files/patch-eclipse.platform.swt index dc00b69720aa..f767ccd32b14 100644 --- a/java/eclipse/files/patch-eclipse.platform.swt +++ b/java/eclipse/files/patch-eclipse.platform.swt @@ -1,354 +1,357 @@ diff -ru eclipse.platform.swt/bundles/org.eclipse.swt/.classpath_gtk eclipse.platform.swt/bundles/org.eclipse.swt/.classpath_gtk --- eclipse.platform.swt/bundles/org.eclipse.swt/.classpath_gtk 0000-00-00 00:00:00.000000000 +0000 +++ eclipse.platform.swt/bundles/org.eclipse.swt/.classpath_gtk 0000-00-00 00:00:00.000000000 +0000 @@ -9,7 +9,7 @@ - + diff -ru eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FillLayout.java eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FillLayout.java --- eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FillLayout.java 0000-00-00 00:00:00.000000000 +0000 +++ eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FillLayout.java 0000-00-00 00:00:00.000000000 +0000 @@ -10,7 +10,6 @@ * * Contributors: * IBM Corporation - initial API and implementation - * Christoph Läubrich - Bug 513185 *******************************************************************************/ package org.eclipse.swt.layout; diff -ru eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java --- eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java 0000-00-00 00:00:00.000000000 +0000 +++ eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java 0000-00-00 00:00:00.000000000 +0000 @@ -10,7 +10,7 @@ * * Contributors: * IBM Corporation - initial API and implementation - * Pierre-Yves B., pyvesdev@gmail.com - Bug 219750: [styled text] Typing ~~ inserts é~~ + * Pierre-Yves B., pyvesdev@gmail.com - Bug 219750 *******************************************************************************/ package org.eclipse.swt.widgets; diff -ru eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/common/org/eclipse/swt/internal/Library.java eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/common/org/eclipse/swt/internal/Library.java --- eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/common/org/eclipse/swt/internal/Library.java 0000-00-00 00:00:00.000000000 +0000 +++ eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/common/org/eclipse/swt/internal/Library.java 0000-00-00 00:00:00.000000000 +0000 @@ -63,12 +63,12 @@ static String arch() { String osArch = System.getProperty("os.arch"); //$NON-NLS-1$ - if (osArch.equals ("amd64")) return "x86_64"; //$NON-NLS-1$ $NON-NLS-2$ return osArch; } static String os() { String osName = System.getProperty("os.name"); //$NON-NLS-1$ + if (osName.equals ("FreeBSD")) return "freebsd"; //$NON-NLS-1$ $NON-NLS-2$ if (osName.equals ("Linux")) return "linux"; //$NON-NLS-1$ $NON-NLS-2$ if (osName.equals ("Mac OS X")) return "macosx"; //$NON-NLS-1$ $NON-NLS-2$ if (osName.startsWith ("Win")) return "win32"; //$NON-NLS-1$ $NON-NLS-2$ diff -ru eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh --- eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh 0000-00-00 00:00:00.000000000 +0000 +++ eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh 0000-00-00 00:00:00.000000000 +0000 -@@ -72,7 +72,7 @@ +@@ -72,9 +72,9 @@ cd `dirname $0` -MAKE_TYPE=make +MAKE_TYPE=gmake - export CFLAGS='-O -Wall -fPIC' +-export CFLAGS='-O -Wall -fPIC' ++export CFLAGS="${CFLAGS--O -Wall} -fPIC" + # Determine which OS we are on + if [ "${OS}" = "" ]; then @@ -86,27 +86,30 @@ MAKEFILE=make_win32.mak ;; *) - SWT_OS=`uname -s | tr -s '[:upper:]' '[:lower:]'` + SWT_OS=`uname -s | tr '[:upper:]' '[:lower:]'` MAKEFILE=make_linux.mak ;; esac # Determine which CPU type we are building for if [ "${MODEL}" = "" ]; then - if uname -i > /dev/null 2>&1; then - MODEL=`uname -i` - if [ ${MODEL} = 'unknown' ]; then - MODEL=`uname -m` - fi - else MODEL=`uname -m` - fi fi case $MODEL in "x86_64") SWT_ARCH=x86_64 AWT_ARCH=amd64 ;; + "powerpc" | "powerpc64") + SWT_ARCH=ppc64 + AWT_ARCH=ppc64 + MODEL=`uname -p` + ;; + "powerpc64le") + SWT_ARCH=ppc64le + AWT_ARCH=ppc64le + MODEL=`uname -p` + ;; *) SWT_ARCH=$MODEL AWT_ARCH=$MODEL @@ -114,6 +117,13 @@ esac case $SWT_OS.$SWT_ARCH in + "freebsd.ppc64") + if [ "${JAVA_HOME}" = "" ]; then + DYNAMIC_JAVA_HOME=`readlink -f /usr/local/bin/java | sed "s:jre/::" | sed "s:bin/java::"` + JAVA_HOME = $DYNAMIC_JAVA_HOME + export JAVA_HOME + fi + ;; "linux.x86_64") if [ "${CC}" = "" ]; then export CC=gcc @@ -159,7 +169,7 @@ # For 64-bit CPUs, we have a switch -if [ ${MODEL} = 'x86_64' -o ${MODEL} = 'ppc64le' -o ${MODEL} = 'aarch64' -o ${MODEL} = 'loongarch64' ]; then +if [ ${MODEL} = 'amd64' -o ${MODEL} = 'powerpc64' -o ${MODEL} = 'powerpc64le' -o ${MODEL} = 'aarch64' -o ${MODEL} = 'loongarch64' ]; then SWT_PTR_CFLAGS=-DJNI64 if [ -d /lib64 ]; then XLIB64=-L/usr/X11R6/lib64 @@ -170,6 +180,11 @@ XLIB64="${XLIB64} -L/usr/lib64" SWT_LFLAGS=-m64 export SWT_LFLAGS + fi + if [ ${SWT_OS} = "freebsd" ] + then + SWT_PTR_CFLAGS="${SWT_PTR_CFLAGS} -m64" + export SWT_LFLAGS=-m64 fi export SWT_PTR_CFLAGS fi diff -ru eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_linux.mak eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_linux.mak --- eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_linux.mak 0000-00-00 00:00:00.000000000 +0000 +++ eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_linux.mak 0000-00-00 00:00:00.000000000 +0000 @@ -98,16 +98,18 @@ WEBKIT_OBJECTS = swt.o webkitgtk.o webkitgtk_structs.o webkitgtk_stats.o webkitgtk_custom.o GLX_OBJECTS = swt.o glx.o glx_structs.o glx_stats.o +port_prefix=`pkg-config --variable=prefix gtk+-3.0` CFLAGS := $(CFLAGS) \ -DSWT_VERSION=$(SWT_VERSION) \ $(NATIVE_STATS) \ $(SWT_DEBUG) \ $(SWT_WEBKIT_DEBUG) \ - -DLINUX -DGTK \ + -DFREEBSD -DGTK \ + -I$(port_prefix)/include \ -I$(JAVA_HOME)/include \ - -I$(JAVA_HOME)/include/linux \ + -I$(JAVA_HOME)/include/freebsd \ ${SWT_PTR_CFLAGS} -LFLAGS = -shared -fPIC ${SWT_LFLAGS} +LFLAGS = -shared -fPIC ${SWT_LFLAGS} -L$(port_prefix)/lib # Treat all warnings as errors. If your new code produces a warning, please # take time to properly understand and fix/silence it as necessary. diff -ru eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java --- eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java 0000-00-00 00:00:00.000000000 +0000 +++ eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java 0000-00-00 00:00:00.000000000 +0000 @@ -65,8 +65,8 @@ /* Initialize the OS flags and locale constants */ String osName = System.getProperty ("os.name"); - boolean isLinux = false, isWin32 = false; - if (osName.equals ("Linux")) isLinux = true; + boolean isLinux = osName.equals ("Linux") || osName.equals ("FreeBSD"); + boolean isWin32 = false; if (osName.startsWith("Windows")) isWin32 = true; IsLinux = isLinux; IsWin32 = isWin32; diff -ru eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java --- eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java 0000-00-00 00:00:00.000000000 +0000 +++ eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java 0000-00-00 00:00:00.000000000 +0000 @@ -114,7 +114,7 @@ * https://www.nczonline.net/blog/2009/01/05/what-determines-that-a-script-is-long-running/ * https://stackoverflow.com/questions/3030024/maximum-execution-time-for-javascript */ - static final int ASYNC_EXEC_TIMEOUT_MS = 10000; + static final int ASYNC_EXEC_TIMEOUT_MS = 100; // Dirty hack for webkit issues on FreeBSD /** Workaround for bug 522733 */ static boolean bug522733FirstInstanceCreated = false; diff -ru eclipse.platform.swt/bundles/org.eclipse.swt/META-INF/p2.inf eclipse.platform.swt/bundles/org.eclipse.swt/META-INF/p2.inf --- eclipse.platform.swt/bundles/org.eclipse.swt/META-INF/p2.inf 0000-00-00 00:00:00.000000000 +0000 +++ eclipse.platform.swt/bundles/org.eclipse.swt/META-INF/p2.inf 0000-00-00 00:00:00.000000000 +0000 @@ -16,19 +16,19 @@ requires.3.filter = (&(osgi.os=macosx)(osgi.ws=cocoa)(osgi.arch=x86_64)(!(org.eclipse.swt.buildtime=true))) requires.4.namespace = org.eclipse.equinox.p2.iu -requires.4.name = org.eclipse.swt.gtk.linux.x86_64 +requires.4.name = org.eclipse.swt.gtk.freebsd.amd64 requires.4.range = [$version$,$version$] -requires.4.filter = (&(osgi.os=linux)(osgi.ws=gtk)(osgi.arch=x86_64)(!(org.eclipse.swt.buildtime=true))) +requires.4.filter = (&(osgi.os=freebsd)(osgi.ws=gtk)(osgi.arch=amd64)(!(org.eclipse.swt.buildtime=true))) requires.5.namespace = org.eclipse.equinox.p2.iu -requires.5.name = org.eclipse.swt.gtk.linux.ppc64le +requires.5.name = org.eclipse.swt.gtk.freebsd.powerpc64 requires.5.range = [$version$,$version$] -requires.5.filter = (&(osgi.os=linux)(osgi.ws=gtk)(osgi.arch=ppc64le)(!(org.eclipse.swt.buildtime=true))) +requires.5.filter = (&(osgi.os=freebsd)(osgi.ws=gtk)(osgi.arch=powerpc64)(!(org.eclipse.swt.buildtime=true))) requires.6.namespace = org.eclipse.equinox.p2.iu -requires.6.name = org.eclipse.swt.gtk.linux.aarch64 +requires.6.name = org.eclipse.swt.gtk.freebsd.powerpc64le requires.6.range = [$version$,$version$] -requires.6.filter = (&(osgi.os=linux)(osgi.ws=gtk)(osgi.arch=aarch64)(!(org.eclipse.swt.buildtime=true))) +requires.6.filter = (&(osgi.os=freebsd)(osgi.ws=gtk)(osgi.arch=powerpc64le)(!(org.eclipse.swt.buildtime=true))) requires.7.namespace = org.eclipse.equinox.p2.iu requires.7.name = org.eclipse.swt.cocoa.macosx.aarch64 diff -ru eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml --- eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml 0000-00-00 00:00:00.000000000 +0000 +++ eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml 0000-00-00 00:00:00.000000000 +0000 @@ -67,17 +67,21 @@ - + - + - + + + + + @@ -88,13 +92,13 @@ - + Matched files ${toString:match} - + diff -ru eclipse.platform.swt/bundles/org.eclipse.swt.tools/Oomph/platformSwt.setup eclipse.platform.swt/bundles/org.eclipse.swt.tools/Oomph/platformSwt.setup --- eclipse.platform.swt/bundles/org.eclipse.swt.tools/Oomph/platformSwt.setup 0000-00-00 00:00:00.000000000 +0000 +++ eclipse.platform.swt/bundles/org.eclipse.swt.tools/Oomph/platformSwt.setup 0000-00-00 00:00:00.000000000 +0000 @@ -91,7 +91,7 @@ xsi:type="predicates:NotPredicate"> + pattern=".*(cocoa|gtk|win32)(\.(freebsd|macosx|aix|hpux|linux|solaris|win32)(\.(amd64|x86_64|powerpc64|ia64|aarch64|arm|ppc64|powerpc64le|s390|s390x|x86|sparcv9))?)?"/> unix - Linux + @@ -122,17 +123,22 @@ ${tycho.version} - - linux - gtk - x86_64 - - - linux - gtk - ppc64le - - + + freebsd + gtk + amd64 + + + freebsd + gtk + powerpc64 + + + freebsd + gtk + powerpc64le + +