Tweak java/eclipse-pydev version 2.8.1
[dports.git] / java / eclipse-pydev / Makefile
1 # Created by: Nicola Vitale <nivit@FreeBSD.org>
2 # $FreeBSD$
3
4 PORTNAME=       pydev
5 PORTVERSION=    2.8.1
6 PORTREVISION=   0
7 CATEGORIES=     java devel python
8 MASTER_SITES=   SF/${PORTNAME}/${PORTNAME}/PyDev%20${PORTVERSION}/
9 PKGNAMEPREFIX=  eclipse-
10 DISTNAME=       PyDev%20${PORTVERSION}
11
12 MAINTAINER=     nivit@FreeBSD.org
13 COMMENT=        Eclipse plugin for Python and Jython development
14
15 LICENSE=        EPL
16
17 RUN_DEPENDS=    eclipse:${PORTSDIR}/java/eclipse
18
19 NO_WRKSUBDIR=   yes
20
21 OPTIONS_DEFINE= JYTHON
22 JYTHON_DESC=    Use Jython as Python interpreter
23
24 USES=           zip
25
26 NO_STAGE=       yes
27 .include <bsd.port.options.mk>
28
29 .if ${PORT_OPTIONS:MJYTHON}
30 RUN_DEPENDS+=   jython:${PORTSDIR}/lang/jython
31 .endif
32
33 USE_PYTHON=     yes
34
35 DISTDATE=       2013072611
36
37 SUB_FILES=      pkg-install
38 SUB_LIST=       BUNDLES_INFO=${BUNDLES_INFO} PLUGINDIR=${PLUGINDIR}
39
40 pre-install:
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}
45
46 PLUGINDIR=      share/eclipse/dropins/pydev/eclipse/plugins
47 BUNDLES_INFO=   ${PREFIX}/lib/eclipse/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info
48
49 post-install:
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}; \
55         done
56         @(${SORT} ${BUNDLES_INFO} > ${BUNDLES_INFO}.sort) && \
57         ${MV} ${BUNDLES_INFO}.sort ${BUNDLES_INFO}
58         @${CAT} ${PKGMESSAGE}
59
60 add-plist-post:
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}
63
64 .include "${PORTSDIR}/java/eclipse/Makefile.plugins"
65
66 .include <bsd.port.mk>