Bug 211891 - [patch] Mk/cran.mk: fix compiles target
Summary: [patch] Mk/cran.mk: fix compiles target
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: David Naylor
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2016-08-16 06:40 UTC by David Naylor
Modified: 2016-08-18 04:45 UTC (History)
2 users (show)

See Also:


Attachments
Fix Uses/cran.mk when compiles ARG specified (428 bytes, patch)
2016-08-16 06:40 UTC, David Naylor
no flags Details | Diff
Update patch per mat's recommendations (439 bytes, patch)
2016-08-16 15:13 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 2016-08-16 06:40:43 UTC
Created attachment 173723 [details]
Fix Uses/cran.mk when compiles ARG specified

After r419666 USE_GCC is conditionally set in math/R/compiler.mk, however USE_GCC was bringing in the dependency on gfortran.  Fix this by including Uses/fortran.mk when USES=cran:compiles.  

Also, while in the neighborhood, also strip any libraries installed when compiling.
Comment 1 David Naylor freebsd_committer 2016-08-16 06:42:04 UTC
Assign to owner.  CC maintainer of R.
Comment 2 Mathieu Arnold freebsd_committer 2016-08-16 07:41:20 UTC
I think I would prefer if you used "-exec ${STRIP_CMD} {} +" instead of xargs.

Also, to include another USES, you need to do:

.include "${USESDIR}/foo.mk"
Comment 3 David Naylor freebsd_committer 2016-08-16 15:13:19 UTC
Created attachment 173741 [details]
Update patch per mat's recommendations
Comment 4 Wen Heping freebsd_committer 2016-08-16 23:17:30 UTC
(In reply to David Naylor from comment #3)
Please go ahead !

wen
Comment 5 commit-hook freebsd_committer 2016-08-17 15:43:13 UTC
A commit references this bug:

Author: dbn
Date: Wed Aug 17 15:42:24 UTC 2016
New revision: 420356
URL: https://svnweb.freebsd.org/changeset/ports/420356

Log:
  Mk/Uses/cran.mk: fix 'compiles' argument.

  Due to the change in r419666 USE_GCC is not conditionally set, however it
  was bringing in the dependencies for fortran (silently).  Explicitly bring
  in the dependencies for fortran.

  Also, add a target to strip the compiled shared library.

  PR:		211891
  Reviewed by:	mat
  Approved by:	wen

Changes:
  head/Mk/Uses/cran.mk
Comment 6 Joseph Mingrone freebsd_committer 2016-08-18 04:27:04 UTC
"Due to the change in r419666 USE_GCC is not conditionally set..."

The change in r419666 was the opposite.  That is, to *conditionally* set USE_GCC=yes only for older OS versions.  I'm guessing the "not" was inadvertently added since the problem was (1) correctly described in the first comment and (2) properly addressed.
Comment 7 David Naylor freebsd_committer 2016-08-18 04:45:34 UTC
Thanks for catching that.  I've issued a correction on the mailing list.