Created attachment 171503 [details]
Add "compiles" keyword to cran.mk, updates ports.
TLDR: add compiles keyword to USES=cran for consistency.
While updating a R-cran port I got the following error:
Error: /usr/local/lib/R/library/tseries/libs/tseries.so is linked to /usr/local/lib/gcc48/libgfortran.so.3 from lang/gcc but it is not declared as a dependency
Error: /usr/local/lib/R/library/tseries/libs/tseries.so is linked to /usr/local/lib/gcc48/libquadmath.so.0 from lang/gcc but it is not declared as a dependency
To fix this I propose introducing a keyword to USES=cran to register the dependency on GCC. In this patch I have also updated the two other ports that have manually introduced a dependency on gcc.
The reason for this is to introduce consistency with the main R port. Should the R port change what compiler it uses (for example, a specific version of gcc, or even clang) then there are only two locations that need updating: R and cran.mk. Currently, one needs to update 1 + n, where n is the number of (unbounded) ports that need compilation.
Best would be to add a lang/R/compiler.mk that would be included in both lang/R/Makefile and Mk/Uses/cran.mk so that only one place needs to be changed.
Approved. Please go ahead !
A commit references this bug:
Date: Sat Jun 18 17:46:31 UTC 2016
New revision: 417077
Mk/Uses/cran: add "compiles" argument.
 Add "compiles" argument to cran to allow R-cran ports need to compile
code to bring in the correct compiler dependencies. Also, ensure
consistency between the compiler selected by the R port and the R-cran ports.
 Migrate R-cran ports that manually specify the compiler to
Approved by: wen (1), portmgr (2, blanket)
Committed, with modification (per mat's suggestion).