Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Jul 2012 21:43:28 +0000 (UTC)
From:      Nicola Vitale <nivit@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r301192 - in head/java/eclipse-pydev: . files
Message-ID:  <201207192143.q6JLhSZu025529@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: nivit
Date: Thu Jul 19 21:43:28 2012
New Revision: 301192
URL: http://svn.freebsd.org/changeset/ports/301192

Log:
  - Add files/pkg-install.in
  - Add a note to pkg-message about the problem of not seeing
    the PyDev perspective
  - Bump PORTREVISION
  - Remove PLIST_SUB
  - Add SUB_LIST, SUB_FILES (for pkg-install)
  - Use a different (and ugly) way to update the bundles.info
    file of Eclipse, and make pointyhat happy(http://goo.gl/LVKpz )
    (post-install target)  [1]
  - Add an @unexec command to pkg-plist to remove any reference
    to PyDev in bundles.info when you uninstall the package
    (add-plist-post target)
  
  Buildlog:	http://goo.gl/B18L5
  Reported by:	pointyhat (via erwin, and beat)  [1]

Added:
  head/java/eclipse-pydev/files/
  head/java/eclipse-pydev/files/pkg-install.in   (contents, props changed)
Modified:
  head/java/eclipse-pydev/Makefile   (contents, props changed)
  head/java/eclipse-pydev/pkg-message   (contents, props changed)

Modified: head/java/eclipse-pydev/Makefile
==============================================================================
--- head/java/eclipse-pydev/Makefile	Thu Jul 19 21:35:27 2012	(r301191)
+++ head/java/eclipse-pydev/Makefile	Thu Jul 19 21:43:28 2012	(r301192)
@@ -7,7 +7,7 @@
 
 PORTNAME=	pydev
 PORTVERSION=	2.6.0
-PORTREVISION=	0
+PORTREVISION=	1
 CATEGORIES=	java devel python
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/PyDev%20${PORTVERSION}/
 PKGNAMEPREFIX=	eclipse-
@@ -31,28 +31,40 @@ JYTHON_DESC=	Use Jython as Python interp
 RUN_DEPENDS+=	jython:${PORTSDIR}/lang/jython
 .endif
 
-PLIST_SUB=	PORTVERSION=${PORTVERSION}.${DISTDATE}
-
 USE_PYTHON=	yes
 USE_ZIP=	yes
 
 DISTDATE=	2012062818
 
+SUB_FILES=	pkg-install
+SUB_LIST=	BUNDLES_INFO=${BUNDLES_INFO} DISTDATE=${DISTDATE} \
+		PLUGINDIR=${PLUGINDIR} PORTVERSION=${PORTVERSION}
+
 pre-install:
 	@# ignore javashell.py file, because there is a syntax error
 	@# see http://goo.gl/E4epH
 	${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
+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:
-	@# Update the bundles.info...
-	@${LOCALBASE}/bin/eclipse -consoleLog -initialize
-	@${CAT} ${PKGMESSAGE}
+	@${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
+	@(${SORT} ${BUNDLES_INFO} > ${BUNDLES_INFO}.sort) && \
+	${MV} ${BUNDLES_INFO}.sort ${BUNDLES_INFO}
+	${CAT} ${PKGMESSAGE}
 
 add-plist-post:
 	@${ECHO_CMD} "@exec ${MKDIR} %D/share/eclipse/dropins/${PORTNAME}/eclipse/plugins/com.python.pydev.codecompletion_${PORTVERSION}.${DISTDATE}/icons" >> ${TMPPLIST}
-	@${ECHO_CMD} "@exec ${LOCALBASE}/bin/eclipse -consoleLog -initialize" >> ${TMPPLIST}
-	@${ECHO_CMD} "@unexec ${LOCALBASE}/bin/eclipse -consoleLog -initialize" >> ${TMPPLIST}
+	@${ECHO_CMD} "@unexec ${SED} -i '' -E '/^((org)|(com))\.python\.pydev/d' %D/lib/eclipse/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info" >> ${TMPPLIST}
 
 .include "${PORTSDIR}/java/eclipse/Makefile.plugins"
 

Added: head/java/eclipse-pydev/files/pkg-install.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/java/eclipse-pydev/files/pkg-install.in	Thu Jul 19 21:43:28 2012	(r301192)
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+if [ $# -ne 2 ]; then
+    echo "usage: $0 distname { POST-INSTALL }" >&2
+    exit 1
+fi
+
+PATH="/bin:/sbin:/usr/bin:/usr/sbin"
+
+BUNDLES_INFO=%%BUNDLES_INFO%%
+DISTDATE=%%DISTDATE%%
+PLUGINDIR=%%PLUGINDIR%%
+PORTVERSION=%%PORTVERSION%%
+REVDOM=python.pydev
+
+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}
+	done
+	sort ${BUNDLES_INFO} > ${BUNDLES_INFO}.sort && \
+	mv ${BUNDLES_INFO}.sort ${BUNDLES_INFO}
+fi
+
+exit 0

Modified: head/java/eclipse-pydev/pkg-message
==============================================================================
--- head/java/eclipse-pydev/pkg-message	Thu Jul 19 21:35:27 2012	(r301191)
+++ head/java/eclipse-pydev/pkg-message	Thu Jul 19 21:43:28 2012	(r301192)
@@ -1,8 +1,13 @@
-
 *********************************************************************
 
   The first time, run Eclipse with the option -clean, and configure
   a Python or Jython interpreter in  Window -> Preferences -> PyDev
   -> Interpreter before creating a new Pydev project
 
+  If you don't see the Pydev perspective in Eclipse, run the command
+
+    eclipse -consoleLog -initialize
+
+  as root or sudoer.
+
 *********************************************************************



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207192143.q6JLhSZu025529>