aboutsummaryrefslogtreecommitdiff
path: root/java/eclipse-pydev
diff options
context:
space:
mode:
authorNicola Vitale <nivit@FreeBSD.org>2012-07-21 12:45:13 +0000
committerNicola Vitale <nivit@FreeBSD.org>2012-07-21 12:45:13 +0000
commit2a1bf99b32297d836310476934d08864d106c622 (patch)
treed341f08450bdb54fd8b56acbcdc1aaca070cde70 /java/eclipse-pydev
parente7010356ea6a572d6a4008baa7880b76c4caffae (diff)
downloadports-2a1bf99b32297d836310476934d08864d106c622.tar.gz
ports-2a1bf99b32297d836310476934d08864d106c622.zip
- Simplify code of files/pkg-install.in, and post-install target
Notes
Notes: svn path=/head/; revision=301274
Diffstat (limited to 'java/eclipse-pydev')
-rw-r--r--java/eclipse-pydev/Makefile21
-rw-r--r--java/eclipse-pydev/files/pkg-install.in13
2 files changed, 14 insertions, 20 deletions
diff --git a/java/eclipse-pydev/Makefile b/java/eclipse-pydev/Makefile
index a01be32821c5..4a80dd706ec3 100644
--- a/java/eclipse-pydev/Makefile
+++ b/java/eclipse-pydev/Makefile
@@ -37,8 +37,7 @@ USE_ZIP= yes
DISTDATE= 2012062818
SUB_FILES= pkg-install
-SUB_LIST= BUNDLES_INFO=${BUNDLES_INFO} DISTDATE=${DISTDATE} \
- PLUGINDIR=${PLUGINDIR} PORTVERSION=${PORTVERSION}
+SUB_LIST= BUNDLES_INFO=${BUNDLES_INFO} PLUGINDIR=${PLUGINDIR}
pre-install:
@# ignore javashell.py file, because there is a syntax error
@@ -46,21 +45,19 @@ pre-install:
${PYTHON_CMD} -m compileall -x javashell.py -f ${WRKSRC}/plugins
${PYTHON_CMD} -O -m compileall -x javashell.py -f ${WRKSRC}
-REVDOM= python.pydev
-PLUGINDIR= ../../share/eclipse/dropins/pydev/eclipse/plugins
+PLUGINDIR= share/eclipse/dropins/pydev/eclipse/plugins
BUNDLES_INFO= ${PREFIX}/lib/eclipse/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info
-COMPONENTS= com com.analysis com.codecompletion com.debug com.fastparser com.refactoring \
- org org.ast org.core org.customizations org.debug org.django org.help org.jython org.parser org.red_core org.refactoring
+
post-install:
@${ECHO_MSG} "===> Updating ${BUNDLES_INFO}"
-.for d in com org
-. for c in ${COMPONENTS:M${d}*}
- @${ECHO_CMD} "${d}.${REVDOM}${c:S,${d},,},${PORTVERSION}.${DISTDATE},${PLUGINDIR}/${d}.${REVDOM}${c:S,${d},,}_${PORTVERSION}.${DISTDATE}/,4,false" >> ${BUNDLES_INFO}
-. endfor
-.endfor
+ @PLUGINS=$$(ls -1 ${PREFIX}/${PLUGINDIR}); \
+ for d in $${PLUGINS}; do \
+ (${ECHO_CMD} "$${d},../../${PLUGINDIR}/$${d}/,4,false" | \
+ ${SED} -e 's/_\([0-9]\)/,\1/1' -e '/templates/d') >> ${BUNDLES_INFO}; \
+ done
@(${SORT} ${BUNDLES_INFO} > ${BUNDLES_INFO}.sort) && \
${MV} ${BUNDLES_INFO}.sort ${BUNDLES_INFO}
- ${CAT} ${PKGMESSAGE}
+ @${CAT} ${PKGMESSAGE}
add-plist-post:
@${ECHO_CMD} "@exec ${MKDIR} %D/share/eclipse/dropins/${PORTNAME}/eclipse/plugins/com.python.pydev.codecompletion_${PORTVERSION}.${DISTDATE}/icons" >> ${TMPPLIST}
diff --git a/java/eclipse-pydev/files/pkg-install.in b/java/eclipse-pydev/files/pkg-install.in
index a0f826dacdcf..3c5c2d73b759 100644
--- a/java/eclipse-pydev/files/pkg-install.in
+++ b/java/eclipse-pydev/files/pkg-install.in
@@ -8,18 +8,15 @@ fi
PATH="/bin:/sbin:/usr/bin:/usr/sbin"
BUNDLES_INFO=%%BUNDLES_INFO%%
-DISTDATE=%%DISTDATE%%
PLUGINDIR=%%PLUGINDIR%%
-PORTVERSION=%%PORTVERSION%%
-REVDOM=python.pydev
+PREFIX=%%PREFIX%%
if [ "$2" = "POST-INSTALL" ]; then
echo "===> Updating ${BUNDLES_INFO}"
- for c in '' '.analysis' '.codecompletion' '.debug' '.fastparser' '.refactoring'; do
- echo "com.${REVDOM}${c},${PORTVERSION}.${DISTDATE},${PLUGINDIR}/com.${REVDOM}${c}_${PORTVERSION}.${DISTDATE}/,4,false" >> ${BUNDLES_INFO}
- done
- for c in '' '.ast' '.core' '.customizations' '.debug' '.django' '.help' '.jython' '.parser' '.red_core' '.refactoring'; do
- echo "org.${REVDOM}${c},${PORTVERSION}.${DISTDATE},${PLUGINDIR}/org.${REVDOM}${c}_${PORTVERSION}.${DISTDATE}/,4,false" >> ${BUNDLES_INFO}
+ for d in $(ls -1 ${PREFIX}/${PLUGINDIR})
+ do
+ (echo "${d},../../${PLUGINDIR}/${d}/,4,false" | \
+ sed -e 's/_\([0-9]\)/,\1/1' -e '/templates/d') >> ${BUNDLES_INFO}
done
sort ${BUNDLES_INFO} > ${BUNDLES_INFO}.sort && \
mv ${BUNDLES_INFO}.sort ${BUNDLES_INFO}