summaryrefslogtreecommitdiff
path: root/java/eclipse/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'java/eclipse/Makefile')
-rw-r--r--java/eclipse/Makefile106
1 files changed, 57 insertions, 49 deletions
diff --git a/java/eclipse/Makefile b/java/eclipse/Makefile
index 2f314aaf89ab..1538f601ef03 100644
--- a/java/eclipse/Makefile
+++ b/java/eclipse/Makefile
@@ -1,33 +1,29 @@
PORTNAME= eclipse
-PORTVERSION= 4.24
-PORTREVISION= 2
+DISTVERSION= 4.32
CATEGORIES= java devel
-
-# Tag's Timestamp on eclipse-platform/eclipse.platform.releng.aggregator github.com
-ECLIPSE_TAG= R4_24
-ECLIPSE_TSTAMP= 20220616-0004
+ECLIPSE_TAG= R${DISTVERSION:S|.|_|g}
DIST_SUBDIR= ${PORTNAME}
-MAINTAINER= ports@FreeBSD.org
-COMMENT= Eclipse IDE 2022-06
+MAINTAINER= ngrundmann@gmx.de
+COMMENT= Eclipse IDE
WWW= https://www.eclipse.org/
LICENSE= EPL
ONLY_FOR_ARCHS= aarch64 amd64 powerpc64 powerpc64le
-BUILD_DEPENDS= git:devel/git@lite \
- maven>0:devel/maven \
+BUILD_DEPENDS= git:devel/git \
+ mvn:devel/maven39 \
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
+USES= compiler:c++17-lang gmake pkgconfig gnome
+# The github repositories. The repository under NorbertXYZ is for a predefined maven
+# download, so the build does not need to download while do-build is running
USE_GITHUB= yes
GH_TUPLE= eclipse-platform:eclipse.platform.releng.aggregator:${ECLIPSE_TAG} \
eclipse-jdt:eclipse.jdt:${ECLIPSE_TAG}:a/eclipse.jdt \
@@ -37,57 +33,69 @@ GH_TUPLE= eclipse-platform:eclipse.platform.releng.aggregator:${ECLIPSE_TAG} \
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"
-
+ eclipse-platform:eclipse.platform.runtime:fd42b6e331:h/eclipse.platform.runtime \
+ eclipse-platform:eclipse.platform.swt:${ECLIPSE_TAG}:i/eclipse.platform.swt \
+ eclipse-platform:eclipse.platform.ui:${ECLIPSE_TAG}:j/eclipse.platform.ui \
+ eclipse-equinox:equinox:${ECLIPSE_TAG}:k/equinox \
+ eclipse-equinox:equinox.binaries:${ECLIPSE_TAG}:l/rt.equinox.binaries \
+ eclipse-equinox:p2:${ECLIPSE_TAG}:m/rt.equinox.p2 \
+ NorbertXYZ:eclipse-maven:${DISTVERSION}:n
+USE_GNOME= gtk30
+USE_JAVA= 17+
+
+DESKTOP_ENTRIES= "Eclipse" \
+ "${COMMENT}" \
+ "${PORTNAME}" \
+ "${PORTNAME}" \
+ "Development;IDE;Java;" \
+ "false"
+PORTSCOUT= ignore:1
SUB_FILES= ${PORTNAME}
-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}
+.include <bsd.port.pre.mk>
-ECLIPSE_RESULT= eclipse.platform.releng.tychoeclipsebuilder/eclipse.platform.repository/target/products/org.eclipse.sdk.ide-freebsd.gtk.${ARCH}.tar.gz
+MAVEN_ENV= MAVEN_OPTS=-Xmx2048m CC=${CC} CFLAGS="${CFLAGS}" JAVA_HOME=${JAVA_HOME}
-.include <bsd.port.pre.mk>
+# To make the build working, set the (maven) architecture to x86_64 instead of amd64
+# Finally there are problems with amd64
+MAVEN_ARCH= ${ARCH:S|amd64|x86_64|}
+
+MAVEN_PARAMS= --offline \
+ -Dmaven.repo.local=${WRKDIR}/eclipse-maven-${DISTVERSION} \
+ -Dnative=gtk.freebsd.${MAVEN_ARCH} \
+ -DskipTests clean verify
+
+ECLIPSE_RESULT= eclipse.platform.releng.tychoeclipsebuilder/eclipse.platform.repository/target/products/org.eclipse.sdk.ide-freebsd.gtk.${MAVEN_ARCH}.tar.gz
.if ${COMPILER_TYPE} == clang
CFLAGS+= -Wno-deprecated-non-prototype
.endif
+# Directories needed, but cannot be stored in git, because they are empty
+EMPTY_DIRS= eclipse.platform/resources/bundles/org.eclipse.core.filesystem.freebsd.%%ARCH%%/os/freebsd/%%ARCH%% \
+ eclipse.platform/resources/bundles/org.eclipse.core.filesystem.freebsd.%%ARCH%%/target \
+ eclipse.platform/team/bundles/org.eclipse.core.net.freebsd/target \
+ rt.equinox.binaries/org.eclipse.equinox.executable/bin/gtk/freebsd/%%ARCH%% \
+ rt.equinox.binaries/org.eclipse.equinox.launcher.gtk.freebsd.%%ARCH%%
+
+pre-patch:
+ ${CP} -R ${FILESDIR}/addons/ ${WRKSRC}
+.for DIR in ${EMPTY_DIRS}
+. for _ARCH in aarch64 powerpc64 powerpc64le x86_64
+ ${MKDIR} ${WRKSRC}/${DIR:S|%%ARCH%%|${_ARCH}|g}
+ ${TOUCH} ${WRKSRC}/${DIR:S|%%ARCH%%|${_ARCH}|g}/.empty
+. endfor
+.endfor
+
do-build:
- cd ${WRKSRC} && ${SETENV} ${MAVEN_ENV} mvn --offline ${MAVEN_ECLIPSE} -DskipTests clean verify
+ cd ${WRKSRC} && ${SETENV} ${MAVEN_ENV} mvn ${MAVEN_PARAMS}
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
+# 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}