ports/179261: [PATCH] devel/imake: typo fix, use shebangfix, change gcpp test
John Marino
draco at marino.st
Mon Jun 3 15:10:00 UTC 2013
>Number: 179261
>Category: ports
>Synopsis: [PATCH] devel/imake: typo fix, use shebangfix, change gcpp test
>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 Jun 03 15:10:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: John Marino
>Release:
>Organization:
>Environment:
>Description:
The attached patch addresses three issue:
1) error message uses backtick instead of single quote, resulting in both an unterminated quote and perhaps make may try to execute a shell command
2) This makefile uses post-patch to fix a perl shebang, use shebangfix instead
3) Instead of overriding the configure script (which may already be already redundant to Mk/bsd.port.mk lines ~1907) based on OSVERSION, actually check for the existence of /usr/bin/gcpp. (besides being a better test, it turns this test into something DragonFly can also use as OSVERSION is FreeBSD-specific)
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
--- Makefile.orig 2013-06-03 14:46:00.000000000 +0000
+++ Makefile
@@ -13,17 +13,19 @@ RUN_DEPENDS= gccmakedep:${PORTSDIR}/deve
makedepend:${PORTSDIR}/devel/makedepend \
${LOCALBASE}/lib/X11/config/xorg.cf:${PORTSDIR}/x11/xorg-cf-files
+USES= shebangfix
USE_PERL5= yes
XORG_CAT= util
USE_XORG= xproto
+SHEBANG_FILES= mkhtmlindex.pl
# clang's cpp destroys whitespace, particularly hard tabs in makefiles,
# which is fatal for imake.
CPPFLAGS+= -DDEFAULT_CC=\\\"gcc\\\"
.ifdef USE_IMAKE
-.error You have `USE_IMAKE' variable defined either in environment or in make(1) arguments. Please undefine and try again.
+.error You have 'USE_IMAKE' variable defined either in environment or in make(1) arguments. Please undefine and try again.
.endif
MAN1= ccmakedep.1 \
@@ -37,14 +39,12 @@ MAN1= ccmakedep.1 \
xmkmf.1
post-patch:
- @${PERL} -pi -e 's,^#!/usr/bin/perl,#!${PERL},' ${WRKSRC}/mkhtmlindex.pl
@${REINPLACE_CMD} 's/test.*-traditional.*;/true;/' ${WRKSRC}/configure
.include <bsd.port.pre.mk>
# Attempt to force use of GNU cpp, if it is installed as /usr/bin/gcpp.
-.if (${OSVERSION} >= 900506 && ${OSVERSION} < 1000000) || \
- ${OSVERSION} >= 1000010
+.if exists(/usr/bin/gcpp)
CONFIGURE_ENV+= ac_cv_path_RAWCPP="gcpp"
.endif
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list