diff options
Diffstat (limited to 'java/eclipse/Makefile')
-rw-r--r-- | java/eclipse/Makefile | 206 |
1 files changed, 80 insertions, 126 deletions
diff --git a/java/eclipse/Makefile b/java/eclipse/Makefile index b554a96fde3b..e774b00b67a0 100644 --- a/java/eclipse/Makefile +++ b/java/eclipse/Makefile @@ -1,144 +1,98 @@ -# Created by: Jimmy Kelley <ljboiler@gmail.com> +# Created by: Jonathan Chen <jonc@chen.org.nz> # $FreeBSD$ PORTNAME= eclipse -PORTVERSION= 4.6 -PORTREVISION= 2 +PORTVERSION= 4.11 CATEGORIES= java devel -MASTER_SITES= https://s3.amazonaws.com/freebsd-eclipse-dist/ -DISTFILES= eclipse.platform.releng.aggregator-${PORTVERSION}.xz \ - ${PORTNAME}-maven-repo-${PORTVERSION}.xz -DIST_SUBDIR= eclipse -MAINTAINER= ljboiler@gmail.com -COMMENT= Eclipse Neon +# Update to git-tag on git.eclipse.org +ECLIPSE_TAG= R4_11 +ECLIPSE_TSTAMP= 20190321-0023 + +ECLIPSE_SUFX= ${ECLIPSE_TAG}.tar.xz +ECLIPSE_MODULES=jdt/eclipse.jdt \ + jdt/eclipse.jdt.core \ + jdt/eclipse.jdt.core.binaries \ + jdt/eclipse.jdt.debug \ + jdt/eclipse.jdt.ui \ + pde/eclipse.pde.build \ + pde/eclipse.pde.ui \ + platform/eclipse.platform \ + platform/eclipse.platform.common \ + platform/eclipse.platform.debug \ + platform/eclipse.platform.releng \ + platform/eclipse.platform.releng.aggregator \ + platform/eclipse.platform.resources \ + platform/eclipse.platform.runtime \ + platform/eclipse.platform.swt \ + platform/eclipse.platform.swt.binaries \ + platform/eclipse.platform.team \ + platform/eclipse.platform.text \ + platform/eclipse.platform.ua \ + platform/eclipse.platform.ui \ + platform/eclipse.platform.ui.tools \ + equinox/rt.equinox.binaries \ + equinox/rt.equinox.bundles \ + equinox/rt.equinox.framework \ + equinox/rt.equinox.p2 +# Each Eclipse module has its own MASTER_SITE +.for M in ${ECLIPSE_MODULES} +MASTER_SITES+= https://git.eclipse.org/c/${M}.git/snapshot/:${M:C/[\.\/]//g} +DISTFILES+= ${M:C/.*\///}-${ECLIPSE_SUFX}:${M:C/[\.\/]//g} +.endfor + +DIST_SUBDIR= ${PORTNAME} + +MAINTAINER= jonc@chen.org.nz +COMMENT= Eclipse IDE 2019-03 LICENSE= EPL -BROKEN= fails to build -DEPRECATED= Uses webkit-gtk2 which has security issues -EXPIRATION_DATE=2019-04-30 -ONLY_FOR_ARCHS= amd64 i386 -CONFLICTS_INSTALL= eclipse +ONLY_FOR_ARCHS= amd64 power64 -BUILD_DEPENDS= ${LOCALBASE}/share/java/maven33/bin/mvn:devel/maven33 -LIB_DEPENDS= libcairo.so:graphics/cairo -# libwebkitgtk-1.0.so:www/webkit-gtk2 +BUILD_DEPENDS= git:devel/git-lite \ + ${LOCALBASE}/share/java/maven/bin/mvn:devel/maven +LIB_DEPENDS= libsecret-1.so:security/libsecret \ + libwebkit2gtk-4.0.so:www/webkit2-gtk3 +USES= gmake pkgconfig gnome +USE_GNOME= gtk30 + +USE_GITHUB= yes +GH_ACCOUNT= daemonblade +GH_PROJECT= eclipse-maven-repo +GH_TAGNAME= ${PORTVERSION} -USES= gmake pkgconfig tar:xz -USE_GL= glu -USE_GNOME= gconf2 gtk20 gnomevfs2 libgnome libgnomeui USE_JAVA= yes -JAVA_OS= native JAVA_VERSION= 1.8 -JAVA_VENDOR= openjdk -JAVA_BUILD= yes -JAVA_RUN= yes - -OPTIONS_DEFINE= SWT_GTK3_SUPPORT -SWT_GTK3_SUPPORT_DESC= Enable GTK3 support in SWT (GUI) -OPTIONS_SINGLE= INSTALLPKG -OPTIONS_SINGLE_INSTALLPKG= FULL_SDK PLATFORM_SDK PLATFORM -FULL_SDK_DESC= Full SDK (JDT, PDE, source, API docs) -PLATFORM_SDK_DESC= Platform with source, API Docs (no Java tools) -PLATFORM_DESC= Platform only (no Java tools, no source or docs) - -OPTIONS_DEFAULT= FULL_SDK - -.include <bsd.port.options.mk> - -PATCH_STRIP= -p1 - -.if ${PORT_OPTIONS:MSWT_GTK3_SUPPORT} -USE_GNOME+= gtk30 -#LIB_DEPENDS+= libwebkitgtk-3.0.so:www/webkit-gtk3 -MVN_SETTINGS+= -Dmachine_gtk3=1 -SWTGTK3OPT= -.else -SWTGTK3OPT= SWT_GTK3=0 -.endif - -WRKSRC=${WRKDIR}/eclipse.platform.releng.aggregator-${PORTVERSION} -GITCLONE=${DISTDIR}/eclipse/eclipse-gitclone/eclipse.platform.releng.aggregator - -MVN_LOCAL_REPO= -Dmaven.repo.local=${WRKDIR}/eclipse-maven-repo-${PORTVERSION}/repository -MVN_TEST_FLAG= -Dmaven.test.skip=true -DskipTests=true -MVN_SETTINGS+= --offline -MVN_OPTS?= MAVEN_OPTS='-Xmx1024m' -ECLIPSE_WS= gtk -ECLIPSE_ARCH= x86${ARCH:C/^i.86//:C/^amd/_/} -E_SHORTARCH= ${ARCH:C/^i.86//:C/^amd//} -ECLIPSE_BUILDID=I20160606-1100 -SCRIPTS_ENV+= ECLIPSE_ARCH=${ECLIPSE_ARCH} \ - E_SHORTARCH=${E_SHORTARCH} -PORTDESTDIR= ${PREFIX}/lib/eclipse - -.if ${ARCH}=="i386" -EXTRA_PATCHES= ${FILESDIR}/i386-patch-freebsd_natives -.endif - -.if ${ARCH}=="amd64" -EXTRA_PATCHES= ${FILESDIR}/amd64-patch-freebsd_natives -.endif - -# Someday it would be nice to see about moving the product selection into the patch phase (and only build the -# product the user wants), but that may prove to be difficult if not impossible with the way the eclipse tycho -# builder is a "all-or-nothing" thing right now. -.if ${PORT_OPTIONS:MFULL_SDK} -PRODUCT_TARFILE= \ - ${WRKSRC}/eclipse.platform.releng.tychoeclipsebuilder/sdk/target/products/org.eclipse.sdk.ide-freebsd.${ECLIPSE_WS}.${ECLIPSE_ARCH}.tar.gz -.endif -.if ${PORT_OPTIONS:MPLATFORM_SDK} -PRODUCT_TARFILE= \ - ${WRKSRC}/eclipse.platform.releng.tychoeclipsebuilder/platform.sdk/target/products/org.eclipse.platform.sdk-freebsd.${ECLIPSE_WS}.${ECLIPSE_ARCH}.tar.gz -.endif -.if ${PORT_OPTIONS:MPLATFORM} -PRODUCT_TARFILE= \ - ${WRKSRC}/eclipse.platform.releng.tychoeclipsebuilder/platform/target/products/org.eclipse.platform.ide-freebsd.${ECLIPSE_WS}.${ECLIPSE_ARCH}.tar.gz -.endif - -post-patch: - @(for f in `${GREP} -hE '(\-\-\-|%%ECLIPSE_ARCH%%)' ${FILESDIR}/patch-* | ${GREP} -B1 'ECLIPSE_ARCH' | ${GREP} '^\-\-\-' | ${SED} -e 's/^\-\-\- .\///'` ; \ - do \ - ${ECHO_MSG} "Updating ECLIPSE_ARCH in file $$f"; \ - ${REINPLACE_CMD} -e "s|%%ECLIPSE_ARCH%%|${ECLIPSE_ARCH}|g" ${WRKSRC}/$$f; \ - done) + +DESKTOP_ENTRIES="Eclipse" \ + "${COMMENT}" \ + "${PORTNAME}" \ + "${PORTNAME}" \ + "Development;IDE;Java;" \ + false + +SUB_FILES= ${PORTNAME} + +MAVEN_ENV= MAVEN_OPTS=-Xmx1024m +MAVEN_REPO= -Dmaven.repo.local=${WRKDIR}/${GH_PROJECT}-${PORTVERSION} +MAVEN_ECLIPSE= -Dnative=gtk.freebsd.${ARCH} -Dcomparator.repo=file://${WRKDIR}/${GH_PROJECT}-${PORTVERSION}/p2-stub -DforceContextQualifier=v${ECLIPSE_TSTAMP} + +ECLIPSE_RESULT= eclipse.platform.releng.tychoeclipsebuilder/sdk/target/products/org.eclipse.sdk.ide-freebsd.gtk.${ARCH}.tar.gz + +# Let's abuse this to get to the right place. +WRKSRC_SUBDIR= ../eclipse.platform.releng.aggregator-${ECLIPSE_TAG} do-build: - @(cd ${WRKSRC}; ${SETENV} JAVA_HOME=${JAVA_HOME} M2_HOME=${LOCALBASE}/share/java/maven33 ${MVN_OPTS} \ - mvn ${MVN_SETTINGS} ${MVN_TEST_FLAG} ${MVN_LOCAL_REPO} clean verify -Dnative=${ECLIPSE_WS}.freebsd.${ECLIPSE_ARCH} \ - -DbuildId=${ECLIPSE_BUILDID}) + cd ${WRKSRC} && ${SETENV} ${MAVEN_ENV} mvn --offline ${MAVEN_REPO} ${MAVEN_ECLIPSE} -DskipTests clean verify do-install: - @${RM} -r ${STAGEDIR}${PORTDESTDIR} - @( cd ${STAGEDIR}${PREFIX}/lib; ${TAR} xfz ${PRODUCT_TARFILE} ) - @${FIND} ${STAGEDIR}${PREFIX}/lib -type f -name \*.orig -delete - @${SED} \ - -e "s+%%BROWSER%%+${GECKO:S/19//}+g" \ - -e "s+%%ECLIPSE_HOME%%+${PORTDESTDIR}+g" \ - -e "s+%%JAVA_HOME%%+${JAVA_HOME}+g" \ - -e "s+%%JAVA_OS%%+${JAVA_OS}+g" \ - -e "s+%%JAVA_VERSION%%+${JAVA_VERSION}+g" \ - -e "s+%%LOCALBASE%%+${LOCALBASE}+g" \ - -e "s+%%SWTGTK3OPT%%+${SWTGTK3OPT}+g" \ - ${FILESDIR}/eclipse.in > ${BUILD_WRKSRC}/eclipse.tmp -.if defined(JAVA_VENDOR) - @${REINPLACE_CMD} -e "s+%%JAVA_VENDOR_SPECIFICATION%%+JAVA_VENDOR=\"${JAVA_VENDOR}\"+g" \ - ${BUILD_WRKSRC}/eclipse.tmp -.else - @${REINPLACE_CMD} -e "s+%%JAVA_VENDOR_SPECIFICATION%%++g" \ - ${BUILD_WRKSRC}/eclipse.tmp -.endif - ${INSTALL_SCRIPT} ${BUILD_WRKSRC}/eclipse.tmp ${STAGEDIR}${PREFIX}/bin/eclipse - @(cd ${STAGEDIR}${PREFIX}; ${FIND} -s lib/eclipse -not -type d) >> ${TMPPLIST} - @(cd ${STAGEDIR}${PREFIX}; ${FIND} -s bin/eclipse -not -type d) >> ${TMPPLIST} - @(cd ${STAGEDIR}${PREFIX}; ${FIND} -s -d lib/eclipse -type d -empty) | ${SED} -ne "s,^,@dir ,p" >> ${TMPPLIST} - @${ECHO_CMD} "@exec echo '-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=%D/share/eclipse/dropins' >> %D/lib/eclipse/eclipse.ini" >> ${TMPPLIST} - @${ECHO_CMD} "@unexec ${SED} -i '' '/^-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=/d' %D/lib/eclipse/eclipse.ini" >> ${TMPPLIST} - @${MKDIR} ${STAGEDIR}${PREFIX}/share/eclipse/dropins - @${ECHO_CMD} "@dir share/eclipse/dropins" >> ${TMPPLIST} - -distclean: - ${RM} -r ${DISTDIR}/eclipse + ${MKDIR} ${STAGEDIR}${DATADIR} + ${TAR} -x --directory ${STAGEDIR}${DATADIR}/.. --file ${WRKSRC}/${ECLIPSE_RESULT} + ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin + +# dynamically add timestamped profiles, which should be excluded from pkg-plist +post-install: + cd ${STAGEDIR}${PREFIX} && ${FIND} -s share/${PORTNAME} -name '*.profile.gz' >> ${TMPPLIST} .include <bsd.port.mk> |