#! /bin/sh ## Start with Octave to fulfill most dependencies # brew install octave # brew uninstall octave ## Use Sundails27 instead of Sundials # brew unlink sundials # brew install sundials27 ## Add qscintilla2 # brew install qscintilla2 ## Use Homebrew's texinfo # brew install texinfo ## Use Homebrew's bison # brew install bison ## Qt 5.12 lacks /usr/local/Cellar/qt/5.12.0/bin/qcollectiongenerator ## SEE: http://blog.qt.io/blog/2018/11/02/whats-new-qt-help/ ## In addition, we have done some cleanups in version 5.12. We got rid of an ## ancient porting tool called qhelpconverter. We have merged the ## qcollectiongenerator tool into the qhelpgenerator, which now accepts both ## .qhp and .qhcp files as input and generates .qch and .qhc files, respectively. brew switch qt5 5.12.0 QCOLLECTIONGENERATOR=qhelpgenerator export QCOLLECTIONGENERATOR QT_CPPFLAGS="-I/usr/local/opt/qt/include" export QT_CPPFLAGS QT_LDFLAGS="-F/usr/local/opt/qt/lib" export QT_LDFLAGS ## Install MacTex if building docs is desired ## https://tug.org/mactex/mactex-download.html ## Apply Daniel Sebald's patch for Qt ## https://savannah.gnu.org/bugs/?50025 # patch -p1 < ../1octave-qt_wait_on_worker_thread-djs2018Apr04.patch ## Apply Carlo's patch (provided on maintainer's mail-list) # patch -p1 $@ < ../open_kEClIYyW.patch ## Set Java's home directory export JAVA_HOME="$(/usr/libexec/java_home -v 11)" # Setup dependencies that are not symbolically linked by Homebrew LDFLAGS="" CPPFLAGS="" LDFLAGS="$LDFLAGS -L/usr/local/opt/readline/lib" CPPFLAGS="$CPPFLAGS -I/usr/local/opt/readline/include" LDFLAGS="$LDFLAGS -L/usr/local/opt/sqlite/lib" CPPFLAGS="$CPPFLAGS -I/usr/local/opt/sqlite/include" LDFLAGS="$LDFLAGS -L/usr/local/opt/openssl/lib" CPPFLAGS="$CPPFLAGS -I/usr/local/opt/openssl/include" LDFLAGS="$LDFLAGS -L/usr/local/opt/bison/lib" LDFLAGS="$LDFLAGS -L/usr/local/opt/gettext/lib" CPPFLAGS="$CPPFLAGS -I/usr/local/opt/gettext/include" LDFLAGS="$LDFLAGS -L/usr/local/opt/libffi/lib" LDFLAGS="$LDFLAGS -L/usr/local/opt/icu4c/lib" CPPFLAGS="$CPPFLAGS -I/usr/local/opt/icu4c/include" LDFLAGS="$LDFLAGS -L/usr/local/opt/texinfo/lib" LDFLAGS="$LDFLAGS -F/usr/local/opt/qt/lib" CPPFLAGS="$CPPFLAGS -I/usr/local/opt/sundials27/include" LDFLAGS="$LDFLAGS -L/usr/local/opt/sundials27/lib" LDFLAGS="$LDFLAGS -L/usr/local/opt/zlib/lib" CPPFLAGS="$CPPFLAGS -I/usr/local/opt/zlib/include" LDFLAGS="$LDFLAGS -L/usr/local/opt/qrupdate/lib" PKG_CONFIG_PATH="/usr/local/opt/zlib/lib/pkgconfig" CFLAGS='-g -O2' CXXFLAGS='-g -O2' export LDFLAGS export CPPFLAGS export CFLAGS export CXXFLAGS # Add ICU4C to the pkg-config path PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig" # Add Qt5 to the pkg-config path PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/qt/lib/pkgconfig" export PKG_CONFIG_PATH # Apple's bison [yacc] is too old, so use Homebrew's PATH="/usr/local/opt/bison/bin:$PATH" # Add texinfo to the PATH PATH="/usr/local/opt/texinfo/bin:$PATH" # Add Qt to the PATH PATH="/usr/local/opt/qt/bin:$PATH" export PATH PREFIX="/usr/local/$(whoami)/octave" ../configure \ --prefix=$PREFIX \ --disable-silent-rules \ --enable-link-all-dependencies \ --enable-shared \ --disable-static \ --without-OSMesa \ --with-hdf5-includedir=/usr/local/opt/hdf5/include \ --with-hdf5-libdir=/usr/local/opt/hdf5/lib \ --with-x=no \ --with-blas="-L/usr/local/opt/veclibfort/lib -lvecLibFort" \ --with-portaudio \ --with-sndfile # --disable-docs \ # --disable-dependency-tracking