2003-10-30 13:54:12 +01:00
|
|
|
# New ports collection makefile for: eclipse
|
2003-06-17 19:39:48 +02:00
|
|
|
# Date created: March 7, 2003
|
2004-10-27 18:57:48 +02:00
|
|
|
# Whom: various members of freebsd-java
|
2003-06-17 19:39:48 +02:00
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= eclipse
|
2006-02-08 16:01:39 +01:00
|
|
|
PORTVERSION= 3.1.2
|
|
|
|
PORTREVISION= 0
|
2003-06-17 19:39:48 +02:00
|
|
|
CATEGORIES= java devel
|
2003-07-05 00:33:09 +02:00
|
|
|
MASTER_SITES= ${MASTER_SITE_ECLIPSE}
|
2006-02-08 16:01:39 +01:00
|
|
|
MASTER_SITE_SUBDIR= R-${PORTVERSION}-200601181600
|
2004-10-27 18:57:48 +02:00
|
|
|
DISTNAME= ${PORTNAME}-sourceBuild-srcIncluded-${PORTVERSION}
|
|
|
|
DIST_SUBDIR= eclipse
|
2003-06-17 19:39:48 +02:00
|
|
|
|
2005-08-28 17:29:51 +02:00
|
|
|
MAINTAINER= freebsd-eclipse@FreeBSD.org
|
2003-06-17 19:39:48 +02:00
|
|
|
COMMENT= An open extensible IDE for anything and nothing in particular
|
|
|
|
|
2004-10-27 18:57:48 +02:00
|
|
|
BUILD_DEPENDS= ant:${PORTSDIR}/devel/apache-ant \
|
|
|
|
zip:${PORTSDIR}/archivers/zip
|
2004-11-08 17:55:45 +01:00
|
|
|
BUILD_DEPENDS+= ${EXTRACT_DEPENDS}
|
2003-06-17 19:39:48 +02:00
|
|
|
|
2005-07-31 07:26:16 +02:00
|
|
|
ONLY_FOR_ARCHS= i386 amd64
|
2004-07-25 10:01:09 +02:00
|
|
|
USE_GMAKE= yes
|
2003-06-17 19:39:48 +02:00
|
|
|
USE_ZIP= yes
|
2004-10-27 18:57:48 +02:00
|
|
|
USE_GCC= 3.4
|
2004-07-25 10:01:09 +02:00
|
|
|
|
|
|
|
USE_JAVA= yes
|
|
|
|
JAVA_VERSION= 1.4+
|
2004-10-27 18:57:48 +02:00
|
|
|
JAVA_OS= native
|
2004-07-25 10:01:09 +02:00
|
|
|
|
2003-07-10 13:27:06 +02:00
|
|
|
USE_REINPLACE= yes
|
2003-06-17 19:39:48 +02:00
|
|
|
NO_WRKSUBDIR= yes
|
2004-07-25 10:01:09 +02:00
|
|
|
|
2005-07-31 07:26:16 +02:00
|
|
|
PORTDESTDIR= ${PREFIX}/eclipse
|
|
|
|
|
2004-07-25 10:01:09 +02:00
|
|
|
ECLIPSE_OS= freebsd
|
|
|
|
|
|
|
|
.if defined(WITH_MOTIF)
|
|
|
|
ECLIPSE_WS= motif
|
|
|
|
USE_ICONV= yes
|
|
|
|
USE_MOTIF= yes
|
|
|
|
.else
|
|
|
|
ECLIPSE_WS= gtk
|
2005-07-31 07:26:16 +02:00
|
|
|
.if !defined(WITHOUT_MOZILLA)
|
2006-01-19 17:49:57 +01:00
|
|
|
MAKE_MOZILLA= make_mozilla
|
2005-09-28 14:19:50 +02:00
|
|
|
.if defined(WITH_MOZILLA) && ${WITH_MOZILLA} != "mozilla"
|
2005-06-18 21:08:51 +02:00
|
|
|
BROWSER= ${WITH_MOZILLA}
|
|
|
|
BUILD_DEPENDS+= ${BROWSER}:${PORTSDIR}/www/${BROWSER}
|
2004-10-27 18:57:48 +02:00
|
|
|
.else
|
|
|
|
BUILD_DEPENDS+= mozilla:${PORTSDIR}/www/mozilla
|
|
|
|
BROWSER= mozilla
|
|
|
|
.endif
|
2005-07-31 07:26:16 +02:00
|
|
|
.else
|
|
|
|
BROWSER=
|
|
|
|
MAKE_MOZILLA=
|
|
|
|
.endif
|
|
|
|
.if defined(WITHOUT_CAIRO)
|
|
|
|
MAKE_CAIRO=
|
|
|
|
.else
|
2005-11-06 07:04:35 +01:00
|
|
|
LIB_DEPENDS= cairo.2:${PORTSDIR}/graphics/cairo
|
2005-07-31 07:26:16 +02:00
|
|
|
MAKE_CAIRO= make_cairo
|
|
|
|
.endif
|
2004-07-25 10:01:09 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITHOUT_GNOMEVFS)
|
|
|
|
MAKE_GNOME=
|
2005-09-28 14:19:50 +02:00
|
|
|
USE_GNOME= gtk20 pkgconfig desktopfileutils
|
2004-07-25 10:01:09 +02:00
|
|
|
.else
|
|
|
|
MAKE_GNOME= make_gnome
|
2005-09-28 14:19:50 +02:00
|
|
|
USE_GNOME= gtk20 gnomevfs2 libgnome libgnomeui pkgconfig desktopfileutils
|
2004-07-25 10:01:09 +02:00
|
|
|
.endif
|
2003-06-17 19:39:48 +02:00
|
|
|
|
2005-07-31 07:26:16 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
.if (${ARCH} == "amd64")
|
|
|
|
ECLIPSE_ARCH= amd64
|
|
|
|
ECLIPSE_SWT= gtk64
|
|
|
|
.else
|
|
|
|
ECLIPSE_ARCH= x86
|
|
|
|
ECLIPSE_SWT= gtk
|
|
|
|
.endif
|
|
|
|
|
|
|
|
MAKE_ENV+= BROWSER=${BROWSER} \
|
2003-06-17 19:39:48 +02:00
|
|
|
ECLIPSE_ARCH=${ECLIPSE_ARCH} \
|
|
|
|
ECLIPSE_OS=${ECLIPSE_OS} \
|
|
|
|
ECLIPSE_WS=${ECLIPSE_WS} \
|
2004-07-25 10:01:09 +02:00
|
|
|
JAVA_HOME=${JAVA_HOME} \
|
2005-07-31 07:26:16 +02:00
|
|
|
MAKE_GNOME=${MAKE_GNOME} \
|
|
|
|
MAKE_MOZILLA=${MAKE_MOZILLA} \
|
|
|
|
MAKE_CAIRO=${MAKE_CAIRO} \
|
2005-09-14 16:46:36 +02:00
|
|
|
MACHINE_ARCH=${MACHINE_ARCH} \
|
2005-07-31 07:26:16 +02:00
|
|
|
MOTIF_HOME=${X11_HOME}
|
2003-06-17 19:39:48 +02:00
|
|
|
|
2005-09-28 14:19:50 +02:00
|
|
|
PLIST_FILES= bin/eclipse share/applications/eclipse.desktop
|
2003-06-17 19:39:48 +02:00
|
|
|
|
2005-11-06 13:44:04 +01:00
|
|
|
SWTCAIRO=${WRKSRC}/plugins/org.eclipse.swt/Eclipse SWT PI/cairo/library
|
2005-07-31 07:26:16 +02:00
|
|
|
SWTGTK=${WRKSRC}/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library
|
|
|
|
SWTMOTIF=${WRKSRC}/plugins/org.eclipse.swt/Eclipse SWT PI/motif/library
|
2003-07-10 13:27:06 +02:00
|
|
|
|
2005-07-31 07:26:16 +02:00
|
|
|
# Manually patch some files with spaces in the path
|
|
|
|
post-patch:
|
|
|
|
@${PATCH} ${PATCH_DIST_ARGS} "${SWTMOTIF}/build.sh" \
|
|
|
|
${FILESDIR}/manualpatch-plugins-swt-motif-build.sh
|
|
|
|
@${PATCH} ${PATCH_DIST_ARGS} "${SWTMOTIF}/make_freebsd.mak" \
|
|
|
|
${FILESDIR}/manualpatch-plugins-swt-motif-make_freebsd.mak
|
|
|
|
@${PATCH} ${PATCH_DIST_ARGS} "${SWTGTK}/make_freebsd.mak" \
|
|
|
|
${FILESDIR}/manualpatch-plugins-swt-gtk-make_freebsd.mak
|
|
|
|
@${PATCH} ${PATCH_DIST_ARGS} "${SWTGTK}/build.sh" \
|
|
|
|
${FILESDIR}/manualpatch-plugins-swt-gtk-build.sh
|
2005-11-06 13:44:04 +01:00
|
|
|
@${PATCH} ${PATCH_DIST_ARGS} \
|
|
|
|
"plugins/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo.c" \
|
|
|
|
${FILESDIR}/manualpatch-plugins-swt-cairo-library \
|
|
|
|
+ "plugins/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo.h" \
|
|
|
|
+ "plugins/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_custom.c" \
|
|
|
|
+ "plugins/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.c" \
|
|
|
|
+ "plugins/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.h" \
|
|
|
|
+ "plugins/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_structs.c" \
|
|
|
|
+ "plugins/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_structs.h"
|
|
|
|
|
2005-07-31 07:26:16 +02:00
|
|
|
do-build:
|
|
|
|
@(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} \
|
|
|
|
./build -os ${ECLIPSE_OS} -ws ${ECLIPSE_WS} -arch ${ECLIPSE_ARCH} -compilelibs)
|
|
|
|
|
|
|
|
do-install:
|
|
|
|
@${MKDIR} ${PORTDESTDIR}
|
|
|
|
@${TAR} -xzf ${WRKSRC}/result/*.tar.gz -C ${PREFIX}
|
|
|
|
@${SED} \
|
|
|
|
-e "s+%%ECLIPSE_HOME%%+${PORTDESTDIR}+g" \
|
2005-10-09 16:54:21 +02:00
|
|
|
-e "s+%%PREFIX%%+${PREFIX}+g" \
|
2005-07-31 07:26:16 +02:00
|
|
|
-e "s+%%X11BASE%%+${X11BASE}+g" \
|
|
|
|
-e "s+%%BROWSER%%+${BROWSER}+g" \
|
2005-10-30 13:47:05 +01:00
|
|
|
-e "s,%%JAVA_VERSION%%,${JAVA_VERSION},g" \
|
|
|
|
-e "s+%%JAVA_OS%%+${JAVA_OS}+g" \
|
2005-07-31 07:26:16 +02:00
|
|
|
${FILESDIR}/eclipse.in > ${WRKSRC}/eclipse.tmp
|
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/eclipse.tmp ${PREFIX}/bin/eclipse
|
2005-09-14 16:46:36 +02:00
|
|
|
@${SED} \
|
|
|
|
-e "s+%%ECLIPSE_HOME%%+${PORTDESTDIR}+g" \
|
|
|
|
-e "s+%%PREFIX%%+${PREFIX}+g" \
|
|
|
|
${FILESDIR}/eclipse.desktop > ${WRKSRC}/eclipse.desktop.tmp
|
2005-09-28 14:19:50 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/eclipse.desktop.tmp ${PREFIX}/share/applications/eclipse.desktop
|
2005-07-31 07:26:16 +02:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/launchertmp/eclipse ${PREFIX}/eclipse/eclipse
|
2005-09-28 14:19:50 +02:00
|
|
|
@-update-desktop-database
|
2005-07-31 07:26:16 +02:00
|
|
|
@(cd ${WRKSRC}; ${FIND} -s eclipse -not -type d) >> ${TMPPLIST}
|
2005-09-28 14:19:50 +02:00
|
|
|
@echo '@exec ${PREFIX}/bin/update-desktop-database > /dev/null || /usr/bin/true' >> ${TMPPLIST}
|
2005-07-31 07:26:16 +02:00
|
|
|
@(cd ${WRKSRC}; ${FIND} -s -d eclipse -type d) \
|
|
|
|
| ${SED} -ne 's,^,@dirrm ,p' >> ${TMPPLIST}
|
2005-09-28 14:19:50 +02:00
|
|
|
@echo '@unexec ${PREFIX}/bin/update-desktop-database > /dev/null || /usr/bin/true' >> ${TMPPLIST}
|
2003-07-14 23:17:22 +02:00
|
|
|
|
2004-07-25 10:01:09 +02:00
|
|
|
.include <bsd.port.post.mk>
|