Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 May 2015 19:29:51 +0000 (UTC)
From:      Thomas Zander <riggs@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r386571 - in head/emulators/dynagen: . files
Message-ID:  <201505161929.t4GJTpWd051423@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: riggs
Date: Sat May 16 19:29:50 2015
New Revision: 386571
URL: https://svnweb.freebsd.org/changeset/ports/386571

Log:
  - Allow to work with python 3
  - Use autoplist
  
  PR:		199781
  Submitted by:	pavelivolkov@gmail.com (maintainer)

Modified:
  head/emulators/dynagen/Makefile
  head/emulators/dynagen/files/setup.py   (contents, props changed)

Modified: head/emulators/dynagen/Makefile
==============================================================================
--- head/emulators/dynagen/Makefile	Sat May 16 19:10:43 2015	(r386570)
+++ head/emulators/dynagen/Makefile	Sat May 16 19:29:50 2015	(r386571)
@@ -3,7 +3,7 @@
 
 PORTNAME=	dynagen
 PORTVERSION=	0.11.0
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	emulators
 MASTER_SITES=	SF/dyna-gen/${PORTNAME}%20source%20_%20Linux/${PORTNAME}%20${PORTVERSION}
 
@@ -15,26 +15,7 @@ LICENSE=	GPLv2
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}configobj>=4.4.0:${PORTSDIR}/devel/py-configobj \
 		dynamips:${PORTSDIR}/emulators/dynamips-community
 
-PLIST_FILES=	bin/dynagen \
-		"@sample etc/dynagen.ini.sample" \
-		%%PYTHON_SITELIBDIR%%/confConsole.py \
-		%%PYTHON_SITELIBDIR%%/confConsole.pyc \
-		%%PYTHON_SITELIBDIR%%/confConsole.pyo \
-		%%PYTHON_SITELIBDIR%%/console.py \
-		%%PYTHON_SITELIBDIR%%/console.pyc \
-		%%PYTHON_SITELIBDIR%%/console.pyo \
-		%%PYTHON_SITELIBDIR%%/dynamips_lib.py \
-		%%PYTHON_SITELIBDIR%%/dynamips_lib.pyc \
-		%%PYTHON_SITELIBDIR%%/dynamips_lib.pyo \
-		%%PYTHON_SITELIBDIR%%/pemu_lib.py \
-		%%PYTHON_SITELIBDIR%%/pemu_lib.pyc \
-		%%PYTHON_SITELIBDIR%%/pemu_lib.pyo \
-		%%PYTHON_SITELIBDIR%%/pemubin.py \
-		%%PYTHON_SITELIBDIR%%/pemubin.pyc \
-		%%PYTHON_SITELIBDIR%%/pemubin.pyo \
-		%%PYTHON_SITELIBDIR%%/pemuwrapper.py \
-		%%PYTHON_SITELIBDIR%%/pemuwrapper.pyc \
-		%%PYTHON_SITELIBDIR%%/pemuwrapper.pyo
+PLIST_FILES=	bin/dynagen "@sample etc/dynagen.ini.sample"
 
 PORTDOCS=	*
 PORTEXAMPLES=	*
@@ -53,12 +34,22 @@ python_bol_CMD=|;9s|^python|${PYTHON_CMD
 python_cnf_OLD_CMD=the an incredible combination
 python_cnf_CMD=|;s|^CONFIGSPECPATH.*|CONFIGSPECPATH = ['${PREFIX}/share/dynagen']
 
-USE_PYTHON=	distutils
+USE_PYTHON=	distutils autoplist
 ALL_TARGET=	# empty
 
+.include <bsd.port.options.mk>
+.include <bsd.port.pre.mk>
+
 post-extract:
 	@${CP} ${FILESDIR}/setup.py ${WRKSRC}
 
+post-patch:
+.if ${PYTHON_MAJOR_VER} >= 3
+	@${ECHO_MSG} "===>   Converting to python${PYTHON_MAJOR_VER}"
+	${PYTHONBASE}/bin/2to3-${PYTHON_VER} --no-diffs --write ${WRKSRC} ${WRKSRC}/dynagen
+	@${ECHO_MSG} "===>   end of converting"
+.endif
+
 post-install:
 	${INSTALL_SCRIPT} ${WRKSRC}/dynagen ${STAGEDIR}${PREFIX}/bin
 	${INSTALL_DATA} ${WRKSRC}/dynagen.ini ${STAGEDIR}${PREFIX}/etc/dynagen.ini.sample
@@ -87,4 +78,4 @@ post-install:
 	${INSTALL_DATA} ${WRKSRC}/sample_labs/simple2/simple2.net ${STAGEDIR}${EXAMPLESDIR}/sample_labs/simple2
 	${INSTALL_DATA} ${WRKSRC}/sample_labs/all_config_options.txt ${STAGEDIR}${EXAMPLESDIR}/sample_labs
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

Modified: head/emulators/dynagen/files/setup.py
==============================================================================
--- head/emulators/dynagen/files/setup.py	Sat May 16 19:10:43 2015	(r386570)
+++ head/emulators/dynagen/files/setup.py	Sat May 16 19:29:50 2015	(r386571)
@@ -14,7 +14,7 @@ setup( # Distribution meta-data
     url = "http://sourceforge.net/projects/dyna-gen",
     license = "GPLv2",
     long_description = """Dynagen is a utility for use with the dynamips Cisco router simulator. It allows you to quickly provision and manage virtual networks using an INI like configuration file.""",
-    py_modules = ['confConsole','console','dynamips_lib','pemu_lib', 'pemubin', 'pemuwrapper']
+    py_modules = ['confConsole','console','dynamips_lib','pemu_lib','pemubin','pemuwrapper']
 )
 
 print "If you have installed the modules, copy dynagen to some "



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