1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-12 07:27:57 +00:00

- Allow to work with python 3

- Use autoplist

PR:		199781
Submitted by:	pavelivolkov@gmail.com (maintainer)
This commit is contained in:
Thomas Zander 2015-05-16 19:29:50 +00:00
parent cc099ba546
commit 49b87c519c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=386571
2 changed files with 15 additions and 24 deletions

View File

@ -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>

View File

@ -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 "