Bug 210343 - [patch] Mk/Uses/cran.mk: add compilation keyword
Summary: [patch] Mk/Uses/cran.mk: add compilation keyword
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Wen Heping
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2016-06-17 10:29 UTC by David Naylor
Modified: 2016-06-18 17:52 UTC (History)
1 user (show)

See Also:


Attachments
Add "compiles" keyword to cran.mk, updates ports. (1.73 KB, patch)
2016-06-17 10:29 UTC, David Naylor
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Naylor freebsd_committer freebsd_triage 2016-06-17 10:29:02 UTC
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.
Comment 1 Mathieu Arnold freebsd_committer freebsd_triage 2016-06-17 10:52:23 UTC
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.
Comment 2 Wen Heping freebsd_committer freebsd_triage 2016-06-18 10:52:41 UTC
Approved. Please go ahead !
Thanks !

wen
Comment 3 commit-hook freebsd_committer freebsd_triage 2016-06-18 17:47:11 UTC
A commit references this bug:

Author: dbn
Date: Sat Jun 18 17:46:31 UTC 2016
New revision: 417077
URL: https://svnweb.freebsd.org/changeset/ports/417077

Log:
  Mk/Uses/cran: add "compiles" argument.

  [1] 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.

  [2] Migrate R-cran ports that manually specify the compiler to
  USES=cran,compiles.

  PR:		210343
  Approved by:	wen (1), portmgr (2, blanket)

Changes:
  head/Mk/Uses/cran.mk
  head/math/R/Makefile
  head/math/R/compiler.mk
  head/math/R-cran-MCMCpack/Makefile
  head/math/R-cran-RcppArmadillo/Makefile
Comment 4 David Naylor freebsd_committer freebsd_triage 2016-06-18 17:52:53 UTC
Committed, with modification (per mat's suggestion).