ports/158722: [patch] devel/gobject-introspection does not build if CC is not cc
Dominic Fandrey
kamikaze at bsdforen.de
Fri Jul 8 08:40:02 UTC 2011
>Number: 158722
>Category: ports
>Synopsis: [patch] devel/gobject-introspection does not build if CC is not cc
>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: Fri Jul 08 08:40:01 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Dominic Fandrey
>Release: RELENG_8
>Organization:
private
>Environment:
FreeBSD mobileKamikaze.norad 8.2-STABLE FreeBSD 8.2-STABLE #0: Thu May 19 21:34:59 CEST 2011 root at mobileKamikaze.norad:/usr/obj/HP6510b-8/amd64/usr/src/sys/HP6510b-8 amd64
>Description:
The post-patch: section of devel/gobject-introspection makes a supstitution of cc in the file giscanner/sourcescanner.py.
For easy reading I will assume CC="XX XY"
Line 237:
for filename in filenames:
if (filename.endswith('.c') or filename.endswith('.cpp') or
filename.endswith('.cc') or filename.endswith('.cxx')):
filename = os.path.abspath(filename)
self._scanner.lex_filename(filename)
else:
headers.append(filename)
Turns to:
for filename in filenames:
if (filename.endswith('.c') or filename.endswith('.cpp') or
filename.endswith('.XX YY') or filename.endswith('.cxx')):
filename = os.path.abspath(filename)
self._scanner.lex_filename(filename)
else:
headers.append(filename)
I think it's clear why that isn't a good idea.
The next affected line is 273:
cpp_args = ['cc', '-E', '-C', '-I.', '-']
cpp_args += self._cpp_options
proc = subprocess.Popen(cpp_args,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE)
Turns to:
cpp_args = ['XX YY', '-E', '-C', '-I.', '-']
cpp_args += self._cpp_options
proc = subprocess.Popen(cpp_args,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE)
However the subprocess.Popen constructor requires the following form:
cpp_args = ['XX', 'YY', '-E', '-C', '-I.', '-']
>How-To-Repeat:
Build with no-default CC, to trigger a build fail use CC with spaces.
>Fix:
The attached patch causes line 239 no longer to be touched and performs the correct substitution for subprocess.Popen in line 273.
Patch attached with submission follows:
diff -Nur gobject-introspection.orig/Makefile gobject-introspection/Makefile
--- gobject-introspection.orig/Makefile 2011-07-08 09:36:31.000000000 +0200
+++ gobject-introspection/Makefile 2011-07-08 10:29:54.000000000 +0200
@@ -40,11 +40,8 @@
MAN1= g-ir-compiler.1 g-ir-generate.1 g-ir-scanner.1
-.include <bsd.port.pre.mk>
-
post-patch:
- @${REINPLACE_CMD} -e 's|'cc'|'${CC:Q}'|g' \
+ @${REINPLACE_CMD} -e "s|'cc'|'${CC:Q:C/[[:space:]]+/', '/g}'|g" \
${WRKSRC}/giscanner/sourcescanner.py
-.include <bsd.port.post.mk>
-
+.include <bsd.port.mk>
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list