How to get Octave 4.4.0 for macOS with GUI

The macOS package manager Homebrew ships with Octave 4.4 but it links to Apple’s proprietary BLAS implementation, the QT graphical user interface is not supported and the ode15 solvers are broken due to Octave’s outdated sundials 2.x dependency. However, there are two alternatives:
If you prefer a quick and easy solution, then go to octave-app.org and download the disk image that is being put together by apjanke and me. On the other hand, if you want to compile it by yourself (including all necessary patches) then follow the instructions below and hope for the best…

#add openblas repository
brew tap dpo/openblas
brew tap-pin dpo/openblas
#download the new formula
curl https://raw.githubusercontent.com/schoeps/homebrew-openblas/master/octave.rb -o /usr/local/Homebrew/Library/Taps/dpo/homebrew-openblas/octave.rb
#compile
brew install octave --with-qt

How to compile GNU Octave with OpenBLAS on macOS

Gnu-octave-logo The repository homebrew/science is dead, long live dpo/homebrew-openblas! We switched from Apples proprietary Accelerate framework to OpenBLAS, so free your numbers and compile Octave as follows

brew tap dpo/openblas
Pin the repository
brew tap-pin dpo/openblas
Now, install a development snapshot of octave (with GUI and java)
brew install dpo/openblas/octave --devel --with-qt --with-java
MacOS and Linux users with HiDPI screen will enjoy improved plotting thanks to the fixes of jpswensen for bug #49053.

Octave 4.2 released

bildschirmfoto-2016-11-15-um-21-48-24Finally, GNU Octave 4.2 was released (also see the new shiny website). It comes with odeset, odeget and some odeXX compatible time steppers that have been developed with contributions within recent GSOC and SOCIS projects.

macOS users can get the release already today by using homebrew as usual

brew install octave

How to build GNU Octave with Qt5 on the Mac

1503512The graphical user interface of Octave 4.0 can only be compiled with Qt4. Homebrew is dropping 4.x support and moving towards 5.x. Several Octave dependencies have already been updated (e.g. Qscintilla2, see e.g. this issue. However, the upcoming Octave 4.2 (release is scheduled for September 2016) will have full Qt5 as discussed here.

The standard installation uses the command line interface. If you need Octave with graphical user interface then this should work
brew update 
brew upgrade #to get the latest qscintilla
brew install octave --with-gui --HEAD
Update: The post has been edited on Aug 20 since the new formula is now available in homebrew’s science repository.