View | Details | Raw Unified | Return to bug 209659
Collapse All | Expand All

(-)emulators/dynagen/files/patch-dynagen (+19 lines)
Line 0 Link Here
1
--- dynagen.orig	2017-04-21 12:04:48 UTC
2
+++ dynagen
3
@@ -947,6 +947,7 @@ class Dynagen:
4
     def open_config(self, FILENAME):
5
         """ Open the config file"""
6
 
7
+        global CONFIGSPECPATH
8
         # look for configspec in CONFIGSPECPATH and the same directory as dynagen
9
         realpath = os.path.realpath(sys.argv[0])
10
         self.debug('realpath ' + realpath)
11
@@ -1443,7 +1444,7 @@ class Dynagen:
12
     def import_ini(self, FILENAME):
13
         """ Read in the INI file"""
14
 
15
-        global telnetstring
16
+        global telnetstring, INIPATH
17
         # look for the INI file in the same directory as dynagen
18
         realpath = os.path.realpath(sys.argv[0])
19
         pathname = os.path.dirname(realpath)
(-)emulators/dynagen/Makefile (-8 / +19 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	dynagen
4
PORTNAME=	dynagen
5
PORTVERSION=	0.11.0
5
PORTVERSION=	0.11.0
6
PORTREVISION=	4
6
PORTREVISION=	5
7
CATEGORIES=	emulators
7
CATEGORIES=	emulators
8
MASTER_SITES=	SF/dyna-gen/${PORTNAME}%20source%20_%20Linux/${PORTNAME}%20${PORTVERSION}
8
MASTER_SITES=	SF/dyna-gen/${PORTNAME}%20source%20_%20Linux/${PORTNAME}%20${PORTVERSION}
9
9
Lines 21-44 PORTDOCS= * Link Here
21
PORTEXAMPLES=	*
21
PORTEXAMPLES=	*
22
PORTDATA=	*
22
PORTDATA=	*
23
23
24
USES=		dos2unix python shebangfix
24
USES=		dos2unix shebangfix
25
SHEBANG_FILES=	*.py dynagen
25
SHEBANG_FILES=	*.py dynagen
26
26
27
USE_PYTHON=	distutils autoplist
27
USE_PYTHON=	distutils autoplist
28
ALL_TARGET=	# empty
28
ALL_TARGET=	# empty
29
NO_ARCH=	yes
29
NO_ARCH=	yes
30
30
31
.include <bsd.port.pre.mk>
31
OPTIONS_SINGLE=	PY
32
PY_DESC=	Choose Python version
33
OPTIONS_DEFAULT=	PYTHON2
34
OPTIONS_SINGLE_PY=	PYTHON2 PYTHON3
35
PYTHON2_USES=	python:2
36
PYTHON3_USES=	python:3
37
38
.include <bsd.port.options.mk>
32
39
33
post-extract:
40
post-extract:
34
	@${CP} ${FILESDIR}/setup.py ${WRKSRC}
41
	@${CP} ${FILESDIR}/setup.py ${WRKSRC}
35
42
36
post-patch:
43
post-patch:
37
.if ${PYTHON_MAJOR_VER} >= 3
44
	${REINPLACE_CMD} -E \
38
	@${ECHO_MSG} "===>   Converting to python${PYTHON_MAJOR_VER}"
45
		-e "s|^(CONFIGSPECPATH = \[).*(])$$|\1 '${DATADIR}' \2|" \
46
		-e "s|^(INIPATH = \[).*(])$$|\1 '${PREFIX}/etc' \2|" \
47
		${WRKSRC}/dynagen
48
49
post-patch-PYTHON3-on:
50
	@${ECHO_MSG} "===> Converting to python${PYTHON_MAJOR_VER}"
39
	${PYTHONBASE}/bin/2to3-${PYTHON_VER} --no-diffs --write ${WRKSRC} ${WRKSRC}/dynagen
51
	${PYTHONBASE}/bin/2to3-${PYTHON_VER} --no-diffs --write ${WRKSRC} ${WRKSRC}/dynagen
40
	@${ECHO_MSG} "===>   end of converting"
52
	@${ECHO_MSG} "===> end of converting"
41
.endif
42
53
43
post-install:
54
post-install:
44
	${INSTALL_SCRIPT} ${WRKSRC}/dynagen ${STAGEDIR}${PREFIX}/bin
55
	${INSTALL_SCRIPT} ${WRKSRC}/dynagen ${STAGEDIR}${PREFIX}/bin
Lines 68-71 post-install: Link Here
68
	${INSTALL_DATA} ${WRKSRC}/sample_labs/simple2/simple2.net ${STAGEDIR}${EXAMPLESDIR}/sample_labs/simple2
79
	${INSTALL_DATA} ${WRKSRC}/sample_labs/simple2/simple2.net ${STAGEDIR}${EXAMPLESDIR}/sample_labs/simple2
69
	${INSTALL_DATA} ${WRKSRC}/sample_labs/all_config_options.txt ${STAGEDIR}${EXAMPLESDIR}/sample_labs
80
	${INSTALL_DATA} ${WRKSRC}/sample_labs/all_config_options.txt ${STAGEDIR}${EXAMPLESDIR}/sample_labs
70
81
71
.include <bsd.port.post.mk>
82
.include <bsd.port.mk>

Return to bug 209659