Page MenuHomeFreeBSD

Introducing Mk/Uses/

Authored by thierry on Dec 22 2014, 8:19 PM.


Group Reviewers

This is a first proposition for a `USES= blaslapack'.

It handles the dependencies and defines BLASLIB and LAPACKLIB for Openblas (default) or ATLAS, the regular Blas/Lapack, or Gotoblas.

It could detect the installed libraries and change the default accordingly, but due to the "packages" orientation, it does not.

[Sent to maho by mail]

Test Plan

To test it, I have used math/suitesparse, because it can build with these different libraries.

A patch is included to select the option.

Diff Detail

Lint Skipped
Unit Tests Skipped

Event Timeline

thierry retitled this revision from to Introducing Mk/Uses/
thierry updated this object.
thierry edited the test plan for this revision. (Show Details)
thierry added a reviewer: pfg.
thierry set the repository for this revision to rP FreeBSD ports repository.


According to freshports, there are currently 58 libraries that depend on blas.
Perhaps we should set the default to "reference" until all the blas dependent ports adopt the new option? Not sure about the answer as we will end up bumping the affected ports anyway, so bumping them one by one is probably OK too.

Anyways this is a change that I have wanted to see for a long time. Thanks!

bapt added a reviewer: bapt.
bapt added a subscriber: bapt.

It looks good to me

This revision is now accepted and ready to land.Dec 25 2014, 2:58 AM

@bapt: thanks for the review!

@pfg: anyway, we shall modify every consumer port to define this USES. Then, each by one, we can decide either to use the default Openblas, or keep the actual setting.

sunpoet added a subscriber: sunpoet.

Looks good to me.


Do you want to keep _valid_ARGS and blaslapack_ARGS check (line 26 to 46) in same order?

sunpoet edited edge metadata.
pfg edited edge metadata.

After review from Steve Kargl on and more tests with different ports, I shall commit it with some modifications:

  • "netlib" is a better name than "reference" and "gotoblas" better thant "goto"
  • it is safer to set netlib (i.e. blas + lapack) as the default
  • add variables for the library names, not only the "-llibname"