Date: Sat, 12 Apr 2014 04:24:43 +0900 From: poyopoyo@puripuri.plala.or.jp To: FreeBSD-gnats-submit@freebsd.org Subject: ports/188472: [PATCH] devel/smake: unbreak on gcc-free systems Message-ID: <86lhvbu0sk.wl%poyopoyo@puripuri.plala.or.jp> Resent-Message-ID: <201404111940.s3BJe17a092371@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86lhvbu0sk.wl%poyopoyo>