svn commit: r402352 - head/lang/gcc

Gerald Pfeifer gerald at pfeifer.com
Sun Feb 19 16:06:50 UTC 2017


[ Old e-mail alert -- but still relevant ]

On Tue, 24 Nov 2015, Alexey Dokuchaev wrote:
>> +	for c in gfortran g++ gcc; do \
>> +	    ${LN} -s ${PREFIX}/bin/"$$c"${SUFFIX} ${STAGEDIR}${PREFIX}/bin/$$c ; \
>> +	done
> Symlinks are badly created (will be broken if e.g. $prefix mounted under
> non-/ via NFS), better (untested) approach would be:
> 
> .for f in gfortran g++ gcc
> 	${LN} -sf ${f}${SUFFIX} ${STAGEDIR}${PREFIX}/bin/${f}
> .endfor

At first I wasn't completely clear what you had in mind here (or 
rather: why exactly), and I did not get a single report from a 
user in the 15 months since then.

On the other hand, we can always improve things and what I understand
you aimed for seems more consistent with how we generally do things.


What do you think about the patch below?

Only problem is, portlint now warns

  WARN: g++: this is a symlink. Please remove it.
  WARN: gcc: this is a symlink. Please remove it.
  WARN: gfortran: this is a symlink. Please remove it.

which I did not do when I've been using absolute paths.

Gerald

Index: Makefile
===================================================================
--- Makefile	(revision 434403)
+++ Makefile	(working copy)
@@ -164,7 +167,7 @@
 	# This is the canonical GCC port, so add key commands without
 	# version numbers as part of their names.
 	for c in gfortran g++ gcc; do \
-	    ${LN} -s ${PREFIX}/bin/"$$c"${SUFFIX} ${STAGEDIR}${PREFIX}/bin/$$c ; \
+	    ${LN} -s $${c}${SUFFIX} ${STAGEDIR}${PREFIX}/bin/$${c} ; \
 	done
 
 .include <bsd.port.post.mk>


More information about the svn-ports-all mailing list