1 # Created by: Nicola Vitale <nivit@FreeBSD.org>
7 CATEGORIES= java devel python
8 MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/PyDev%20${PORTVERSION}/
9 PKGNAMEPREFIX= eclipse-
10 DISTNAME= PyDev%20${PORTVERSION}
12 MAINTAINER= nivit@FreeBSD.org
13 COMMENT= Eclipse plugin for Python and Jython development
17 RUN_DEPENDS= eclipse:${PORTSDIR}/java/eclipse
21 OPTIONS_DEFINE= JYTHON
22 JYTHON_DESC= Use Jython as Python interpreter
27 .include <bsd.port.options.mk>
29 .if ${PORT_OPTIONS:MJYTHON}
30 RUN_DEPENDS+= jython:${PORTSDIR}/lang/jython
37 SUB_FILES= pkg-install
38 SUB_LIST= BUNDLES_INFO=${BUNDLES_INFO} PLUGINDIR=${PLUGINDIR}
41 @# ignore javashell.py file, because there is a syntax error
42 @# see http://goo.gl/E4epH
43 ${PYTHON_CMD} -m compileall -x javashell.py -f ${WRKSRC}/plugins
44 ${PYTHON_CMD} -O -m compileall -x javashell.py -f ${WRKSRC}
46 PLUGINDIR= share/eclipse/dropins/pydev/eclipse/plugins
47 BUNDLES_INFO= ${PREFIX}/lib/eclipse/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info
50 @${ECHO_MSG} "===> Updating ${BUNDLES_INFO}"
51 @PLUGINS=$$(ls -1 ${PREFIX}/${PLUGINDIR}); \
52 for d in $${PLUGINS}; do \
53 (${ECHO_CMD} "$${d},../../${PLUGINDIR}/$${d}/,4,false" | \
54 ${SED} -e 's/_\([0-9]\)/,\1/1' -e '/templates/d') >> ${BUNDLES_INFO}; \
56 @(${SORT} ${BUNDLES_INFO} > ${BUNDLES_INFO}.sort) && \
57 ${MV} ${BUNDLES_INFO}.sort ${BUNDLES_INFO}
61 @${ECHO_CMD} "@exec ${MKDIR} %D/share/eclipse/dropins/${PORTNAME}/eclipse/plugins/com.python.pydev.codecompletion_${PORTVERSION}.${DISTDATE}/icons" >> ${TMPPLIST}
62 @${ECHO_CMD} "@unexec ${SED} -i '' -E '/^((org)|(com))\.python\.pydev/d' %D/lib/eclipse/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info" >> ${TMPPLIST}
64 .include "${PORTSDIR}/java/eclipse/Makefile.plugins"
66 .include <bsd.port.mk>