ports/189691: [PATCH] devel/scons m4 tool, BSD specific problem.
clutton
clutton0 at gmail.com
Mon May 12 01:50:00 UTC 2014
>Number: 189691
>Category: ports
>Synopsis: [PATCH] devel/scons m4 tool, BSD specific problem.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon May 12 01:50:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator: clutton
>Release: current/11
>Organization:
>Environment:
>Description:
The nature of bug is that: it uses m4 -E
Since BSD version of m4 from CURRENT doesn't have -E key, it crashes.
Probably, older versions of BSD would work. But, also, look at devel/autoconf it uses gm4 all the time.
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
diff --git a/devel/scons/Makefile b/devel/scons/Makefile
index 58c2639..e71ff06 100644
--- a/devel/scons/Makefile
+++ b/devel/scons/Makefile
@@ -11,6 +11,8 @@ COMMENT= Build tool alternative to make
LICENSE= MIT
+RUN_DEPENDS= gm4:${PORTSDIR}/devel/m4
+
USE_PYTHON= 2
USE_PYDISTUTILS= yes
PYDISTUTILS_AUTOPLIST= yes
@@ -22,5 +24,6 @@ post-patch:
-e 's,distutils\.command\.install$$,setuptools\.command\.install,' \
-e 's,distutils\.command\.install\.,setuptools\.command\.install\.,' \
${WRKSRC}/setup.py
+ @${FIND} ${WRKSRC} -name \*.orig -delete
.include <bsd.port.mk>
diff --git a/devel/scons/files/patch-engine_SCons_Tool_m4.py b/devel/scons/files/patch-engine_SCons_Tool_m4.py
new file mode 100644
index 0000000..08ad5dc
--- /dev/null
+++ b/devel/scons/files/patch-engine_SCons_Tool_m4.py
@@ -0,0 +1,11 @@
+--- engine/SCons/Tool/m4.py 2013-03-03 16:48:40.000000000 +0200
++++ engine/SCons/Tool/m4.py 2014-05-11 08:08:11.000000000 +0300
+@@ -49,7 +49,7 @@
+ # file and run from there.
+ # The src_suffix setup is like so: file.c.m4 -> file.c,
+ # file.cpp.m4 -> file.cpp etc.
+- env['M4'] = 'm4'
++ env['M4'] = 'gm4'
+ env['M4FLAGS'] = SCons.Util.CLVar('-E')
+ env['M4COM'] = 'cd ${SOURCE.rsrcdir} && $M4 $M4FLAGS < ${SOURCE.file} > ${TARGET.abspath}'
+
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list