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 NO_STAGE=       yes
25 .include <bsd.port.options.mk>
26
27 .if ${PORT_OPTIONS:MJYTHON}
28 RUN_DEPENDS+=   jython:${PORTSDIR}/lang/jython
29 .endif
30
31 USE_PYTHON=     yes
32 USE_ZIP=        yes
33
34 DISTDATE=       2013072611
35
36 SUB_FILES=      pkg-install
37 SUB_LIST=       BUNDLES_INFO=${BUNDLES_INFO} PLUGINDIR=${PLUGINDIR}
38
39 pre-install:
40         @# ignore javashell.py file, because there is a syntax error
41         @# see http://goo.gl/E4epH
42         ${PYTHON_CMD} -m compileall  -x javashell.py -f ${WRKSRC}/plugins
43         ${PYTHON_CMD} -O -m compileall -x javashell.py -f ${WRKSRC}
44
45 PLUGINDIR=      share/eclipse/dropins/pydev/eclipse/plugins
46 BUNDLES_INFO=   ${PREFIX}/lib/eclipse/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info
47
48 post-install:
49         @${ECHO_MSG} "===>   Updating ${BUNDLES_INFO}"
50         @PLUGINS=$$(ls -1 ${PREFIX}/${PLUGINDIR}); \
51         for d in $${PLUGINS}; do \
52             (${ECHO_CMD} "$${d},../../${PLUGINDIR}/$${d}/,4,false" | \
53             ${SED} -e 's/_\([0-9]\)/,\1/1' -e '/templates/d') >> ${BUNDLES_INFO}; \
54         done
55         @(${SORT} ${BUNDLES_INFO} > ${BUNDLES_INFO}.sort) && \
56         ${MV} ${BUNDLES_INFO}.sort ${BUNDLES_INFO}
57         @${CAT} ${PKGMESSAGE}
58
59 add-plist-post:
60         @${ECHO_CMD} "@exec ${MKDIR} %D/share/eclipse/dropins/${PORTNAME}/eclipse/plugins/com.python.pydev.codecompletion_${PORTVERSION}.${DISTDATE}/icons" >> ${TMPPLIST}
61         @${ECHO_CMD} "@unexec ${SED} -i '' -E '/^((org)|(com))\.python\.pydev/d' %D/lib/eclipse/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info" >> ${TMPPLIST}
62
63 .include "${PORTSDIR}/java/eclipse/Makefile.plugins"
64
65 .include <bsd.port.mk>