Skip to content

Instantly share code, notes, and snippets.

@fredriks
Last active September 17, 2016 01:40
Show Gist options
  • Save fredriks/3ea303960fd0c39879b6 to your computer and use it in GitHub Desktop.
Save fredriks/3ea303960fd0c39879b6 to your computer and use it in GitHub Desktop.
bbcrd/audiowaveform with statically linked libsndfile and libmad

Build and install libsndfile

http://www.linuxfromscratch.org/blfs/view/svn/multimedia/libsndfile.html

wget http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.26.tar.gz
tar xf libsndfile-1.0.26.tar.gz
cd libsndfile-1.0.26
./configure
make
sudo make install

Build and install libmad

http://www.linuxfromscratch.org/blfs/view/svn/multimedia/libmad.html

sudo yum -qy install patch autoconf automake libtool
wget http://www.linuxfromscratch.org/patches/blfs/svn/libmad-0.15.1b-fixes-1.patch
wget http://downloads.sourceforge.net/mad/libmad-0.15.1b.tar.gz
tar xf libmad-0.15.1b.tar.gz
cd libmad-0.15.1b
patch -Np1 -i ../libmad-0.15.1b-fixes-1.patch
sed "s@AM_CONFIG_HEADER@AC_CONFIG_HEADERS@g" -i configure.ac
touch NEWS AUTHORS ChangeLog
autoreconf -fi
./configure
make
sudo make install

Build audiowaveform

https://github.com/bbcrd/audiowaveform/tree/1.0.10

sudo yum -qy install git cmake gd-devel boost-devel
git clone https://github.com/bbcrd/audiowaveform.git
cd audiowaveform/
git checkout 1.0.10
sed -i '/LIBMAD_LIBRARY/ s/mad)/mad.a)/' cmake/modules/FindLibMad.cmake
sed -i '/LIBSNDFILE_LIBRARY/ s/sndfile)/sndfile.a)/' cmake/modules/FindLibSndFile.cmake
wget https://googlemock.googlecode.com/files/gmock-1.7.0.zip
unzip gmock-1.7.0.zip
ln -s gmock-1.7.0 gmock
mkdir build
cd build/
cmake -D LIBSNDFILE_LIBRARY=/usr/local/lib/libsndfile.a -D LIBMAD_LIBRARY=/usr/local/lib/libmad.a ..
make
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment