# Build FreeMat4.2 from source
# for Ubuntu 12.04 i686
# check your CPU, change make -j NUM if necessary
# install dependent packages and tools
sudo apt-get install libboost-dev portaudio19-dev \
libfftw3-dev libpcre3-dev libatlas-dev libffi-dev \
libncurses5-dev libvolpack1-dev liblapack-dev libglu1-mesa-dev \
zlib1g-dev libqt4-dev
sudo apt-get install build-essential patch subversion \
html2text cmake-curses-gui qt4-qmake texlive-latex-base
cd ~ && mkdir src
cd src
cd FreeMat
# portaudio.patch
# it fixes the error -> linking libportaudio to FreeMat (pa_unix_hostapis ERROR)
mkdir build && cd build
# ccmake provides by cmake-curses-gui package
# config CMakeLists.txt using GUI
ccmake ../
# Like this:
# By default LLVM is ON, just set to OFF
AMD_SYS_INCLUDE_DIR AMD_SYS_INCLUDE_DIR-NOTFOUND
AMD_SYS_LIBRARY AMD_SYS_LIBRARY-NOTFOUND
Boost_DIR Boost_DIR-NOTFOUND
CMAKE_BUILD_TYPE
CMAKE_INSTALL_PREFIX /opt/local
DL_LIB /usr/lib/i386-linux-gnu/libdl.so
FFI_INCLUDE_DIR /usr/include/i386-linux-gnu
FFI_LIBRARY /usr/lib/i386-linux-gnu/libffi.so
FFTWF_LIBRARY /usr/lib/libfftw3f.so
FFTW_INCLUDE_DIR /usr/include
FFTW_LIBRARY /usr/lib/libfftw3.so
FORCE_BUNDLED_AMD OFF
FORCE_BUNDLED_PCRE OFF
FORCE_BUNDLED_PORTAUDIO ON
FORCE_BUNDLED_UMFPACK OFF
FORCE_BUNDLED_ZLIB OFF
FORCE_SYSTEM_LIBS OFF
NCURSES_LIBRARY /usr/lib/i386-linux-gnu/libncurses.so
PCRE_SYS_INCLUDE_DIR /usr/include
PCRE_SYS_LIBRARY /usr/lib/i386-linux-gnu/libpcre.so
PORTAUDIO_SYS_INCLUDE_DIR /usr/include
PORTAUDIO_SYS_LIBRARY /usr/lib/i386-linux-gnu/libportaudio.so
PTHREADS_LIB /usr/lib/i386-linux-gnu/libpthread.so
QT_QMAKE_EXECUTABLE /usr/bin/qmake
UMFPACK_SYS_INCLUDE_DIR UMFPACK_SYS_INCLUDE_DIR-NOTFOUND
UMFPACK_SYS_LIBRARY UMFPACK_SYS_LIBRARY-NOTFOUND
USE_ITK OFF
USE_LLVM OFF
USE_VTK OFF
ZLIB_SYS_INCLUDE_DIR /usr/include
ZLIB_SYS_LIBRARY /usr/lib/i386-linux-gnu/libz.so
# change the value of CMAKE_INSTALL_PREFIX to install FreeMat wherever you like
# make and install
make -j4 && make install
# Create a quick-start file From Dash
# or download from the attachment
# change Exec=PATH_TO_FREEMAT
FREEMAT_PNG=/usr/share/app-install/icons/FreeMat.png
sudo cp ~/Downloads/FreeMat_Logo2.png $FREEMAT_PNG
cat << EOF | sudo tee /usr/share/applications/FreeMat.desktop > /dev/null
[Desktop Entry]
Version=4.2
Name=FreeMat
GenericName=FreeMat
Comment=Matlab-like platform
Exec=/opt/local/bin/FreeMat
Icon=$FREEMAT_PNG
Terminal=false
Type=Application
EOF
Hope this can help you!