ports/188472: [PATCH] devel/smake: unbreak on gcc-free systems
poyopoyo at puripuri.plala.or.jp
poyopoyo at puripuri.plala.or.jp
Fri Apr 11 19:40:01 UTC 2014
>Number: 188472
>Category: ports
>Synopsis: [PATCH] devel/smake: unbreak on gcc-free systems
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Fri Apr 11 19:40:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator: SATO Kuro
>Release: FreeBSD 10.0-CURRENT amd64
>Organization:
personal
>Environment:
>Description:
o fix build on gcc-free system.
- replace hard-coded gcc to $(CC) in cc-gcc.rul.
The CC definition here is not used anywhere while configure
script runs 'gcc' unconditionally, then fails.
o prepare rules for any CC string.
- It seems in RULES for freebsd, everything is symlink originated in
386-freebsd-cc.rul so it's safe to create another symlink, at least
for i386/amd64/sparc64-like systems.
>How-To-Repeat:
chmod 0 /usr/bin/gcc && make -> fails
chmod 555 /usr/bin/gcc && make -> builds ok
>Fix:
Index: Makefile
===================================================================
--- Makefile (revision 351004)
+++ Makefile (working copy)
@@ -9,11 +9,6 @@
MAINTAINER= ports at FreeBSD.org
COMMENT= Portable make program with automake features
-DEPRECATED= Abandonware, broken with modern com
-EXPIRATION_DATE= 2014-05-12
-
-BROKEN= Does not build with modern compilers
-
LICENSE= CDDL GPLv2
LICENSE_COMB= multi
LICENSE_FILE_CDDL= ${WRKSRC}/CDDL.Schily.txt
@@ -27,6 +22,12 @@
RULEUSED= "`${WRKSRC}/conf/oarch.sh`"
PLIST_SUB= RULESUSED="${RULEUSED}"
-#BROKEN_i386= fails to find correct configuration file
+MKLINKS= ${WRKSRC}/RULES/MKLINKS
+GCCRULE= ${WRKSRC}/RULES/cc-gcc.rul
+pre-build:
+ ${CHMOD} +w ${MKLINKS} ${GCCRULE}
+ ${REINPLACE_CMD} -i "" -e 's/gcc$$/${CC}/' ${GCCRULE}
+ echo "\$$symlink i386-freebsd-cc.rul ${ARCH}-freebsd-${CC}.rul" >> ${MKLINKS}
+
.include <bsd.port.mk>
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list