Skip to content

Commit

Permalink
Adapted and merged to upstream master 18_3_2017
Browse files Browse the repository at this point in the history
  • Loading branch information
Rikislav committed Mar 18, 2017
2 parents 3e590c7 + 29f8320 commit b84973c
Show file tree
Hide file tree
Showing 184 changed files with 2,457 additions and 1,056 deletions.
2 changes: 1 addition & 1 deletion cmake/build_mingw32.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ else
CMAKE_OPTS="$CMAKE_OPTS -DLMMS_BUILD_MSYS=1"
fi

export PATH=$PATH:$MINGW/bin
export PATH=$MINGW/bin:$PATH
export CFLAGS="-march=pentium3 -mtune=generic -mpreferred-stack-boundary=5 -mfpmath=sse"
export CXXFLAGS="$CFLAGS"

Expand Down
2 changes: 1 addition & 1 deletion cmake/build_mingw64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ else
CMAKE_OPTS="$CMAKE_OPTS -DLMMS_BUILD_MSYS=1"
fi

export PATH=$PATH:$MINGW/bin
export PATH=$MINGW/bin:$PATH

if [ "$1" = "-qt5" ]; then
QT5=True
Expand Down
10 changes: 10 additions & 0 deletions cmake/msys/fetch_ppa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,20 @@ PPA_URL=$PPA_ROOT/dists/$PPA_DISTRO/main/binary-$PPA_ARCH/Packages
ppa_dir=./ppa/

temp_file=/tmp/ppa_listing_$$
temp_temp_file=/tmp/ppa_listing_temp_$$

skip_files="binutils openssl flac libgig libogg libvorbis x-bootstrap zlib"
skip_files="$skip_files x-runtime gcc qt_4 qt5 x-stk pkgconfig"
skip_files="$skip_files glib2 libpng"

echo "Connecting to $PPA_HOST to get list of packages..."
wget -qO- $PPA_URL |grep "Filename:" > $temp_file

for j in $skip_files ; do
grep -v $j $temp_file > $temp_temp_file
mv $temp_temp_file $temp_file
done

line_count=`wc -l $temp_file |awk '{print $1}'`

echo "Found $line_count packages for download..."
Expand Down
196 changes: 192 additions & 4 deletions cmake/msys/msys_helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ else
fi

fltkver="1.3.3"
oggver="1.3.2"
vorbisver="1.3.5"
flacver="1.3.2"
gigver="4.0.0"
stkver="4.5.1"

info "Downloading and building fltk $fltkver"

Expand All @@ -75,24 +80,207 @@ if [ $? -ne 0 ]; then
pushd $HOME/fltk-$fltkver

info " - Compiling fltk $fltkver..."
./configure
./configure --prefix=$mingw_root --enable-shared

make

info " - Installing fltk..."
make install DESTDIR=$mingw_root
make install

if [ $? -ne 0 ]; then
err "ERROR: Could not build/install fltk -- Zyn needs this. Exiting."
fi

ln -s $mingw_root/usr/local/bin/fluid.exe $mingw_root/bin/fluid.exe
# ln -s $mingw_root/usr/local/bin/fluid.exe $mingw_root/bin/fluid.exe
popd
else
warn " - Skipping, fluid binary already exists"
fi

popd
info "Downloading and building libogg $oggver"

if [ ! -e $mingw_root/lib/libogg.dll.a ]; then
wget http://downloads.xiph.org/releases/ogg/libogg-$oggver.tar.xz -O $HOME/libogg-source.tar.xz
if [ $? -ne 0 ]; then
err "ERROR: Could not download libogg. Exiting."
fi
tar xf $HOME/libogg-source.tar.xz -C $HOME/
pushd $HOME/libogg-$oggver

info " - Compiling libogg $oggver..."
./configure --prefix=$mingw_root

make

info " - Installing libogg..."
make install

# for some reason libgig needs this
./configure --prefix=/opt$mingw_root

make

info " - Installing libogg..."
make install

if [ $? -ne 0 ]; then
err "ERROR: Could not build/install fltk -- lmms needs this. Exiting."
fi

popd
else
warn " - Skipping, libogg binary already exists"
fi


info "Downloading and building libvorbis $vorbisver"

if [ ! -e $mingw_root/lib/libvorbis.dll.a ]; then
wget http://downloads.xiph.org/releases/vorbis/libvorbis-$vorbisver.tar.xz -O $HOME/libvorbis-source.tar.xz
if [ $? -ne 0 ]; then
err "ERROR: Could not download libogg. Exiting."
fi
tar xf $HOME/libvorbis-source.tar.xz -C $HOME/
pushd $HOME/libvorbis-$vorbisver

info " - Compiling libvorbis $vorbisver..."
./configure --prefix=$mingw_root

make

info " - Installing libvorbis..."
make install

# for some reason libgig needs this
./configure --prefix=/opt$mingw_root

make

info " - Installing libvorbis..."
make install

if [ $? -ne 0 ]; then
err "ERROR: Could not build/install libvorbis -- lmms needs this. Exiting."
fi

popd
else
warn " - Skipping, libvorbis binary already exists"
fi

info "Downloading and building flac $flacver"

if [ ! -e $mingw_root/lib/libFLAC.dll.a ]; then
wget http://downloads.xiph.org/releases/flac/flac-$flacver.tar.xz -O $HOME/flac-source.tar.xz
if [ $? -ne 0 ]; then
err "ERROR: Could not download flac. Exiting."
fi
tar xf $HOME/flac-source.tar.xz -C $HOME/
pushd $HOME/flac-$flacver

info " - Compiling flac $flacver..."
./configure --prefix=$mingw_root

make

info " - Installing flac..."
make install

# for some reason libgig needs this
./configure --prefix=/opt$mingw_root

make

info " - Installing flac..."
make install

if [ $? -ne 0 ]; then
err "ERROR: Could not build/install flac -- lmms needs this. Exiting."
fi

popd
else
warn " - Skipping, libvorbis flac already exists"
fi

info "Downloading and building libgig $gigver"

if [ ! -e $mingw_root/lib/libgig/libgig.dll.a ]; then
wget http://download.linuxsampler.org/packages/libgig-$gigver.tar.bz2 -O $HOME/gig-source.tar.xz
if [ $? -ne 0 ]; then
err "ERROR: Could not download libgig. Exiting."
fi
tar xf $HOME/gig-source.tar.xz -C $HOME/
pushd $HOME/libgig-$gigver

info " - Compiling libgig $gigver..."
./configure --prefix=$mingw_root

make

info " - Installing libgig..."
make install

mv $mingw_root/lib/bin/libakai-0.dll $mingw_root/bin
mv $mingw_root/lib/bin/libgig-7.dll $mingw_root/bin

if [ $? -ne 0 ]; then
err "ERROR: Could not build/install libgig -- gigplayer needs this. Exiting."
fi

popd
else
warn " - Skipping, libgig binary already exists"
fi

info "Downloading and building stk $stkver"

if [ ! -e $mingw_root/lib/libstk.dll ]; then
wget http://ccrma.stanford.edu/software/stk/release/stk-$stkver.tar.gz -O $HOME/stk-source.tar.xz
if [ $? -ne 0 ]; then
err "ERROR: Could not download stk. Exiting."
fi
tar xf $HOME/stk-source.tar.xz -C $HOME/
pushd $HOME/stk-$stkver

info " - Compiling stk $stkver..."
./configure --prefix=$mingw_root

make

info " - Installing stk..."
make install

if [ $? -ne 0 ]; then
err "ERROR: Could not build/install stk -- mallotstk needs this. Exiting."
fi

mv $mingw_root/lib/libstk.so $mingw_root/lib/libstk.dll
mv $mingw_root/lib/libstk-$stkver.so $mingw_root/lib/libstk-$stkver.dll

popd
else
warn " - Skipping, stk binary already exists"
fi

# make a symlink to make cmake happy
if [ $mingw_root = "/mingw64" ]; then
if [ ! -e /opt/mingw64/bin/x86_64-w64-mingw32-pkg-config ]; then
ln -s /usr/bin/pkg-config /opt/mingw64/bin/x86_64-w64-mingw32-pkg-config
fi
fi
if [ $mingw_root = "/mingw32" ]; then

if [ ! -e /opt/mingw32/bin/i686-w64-mingw32-pkg-config ]; then
ln -s /usr/bin/pkg-config /opt/mingw32/bin/i686-w64-mingw32-pkg-config
fi
fi

info "Cleaning up..."
rm -rf $HOME/fltk-$fltkver
rm -rf $HOME/libogg-$oggver
rm -rf $HOME/libvorbis-$vorbisver
rm -rf $HOME/flac-$flacver
rm -rf $HOME/libgig-$gigver
rm -rf $HOME/stk-$stkver
info "Done."
Loading

0 comments on commit b84973c

Please sign in to comment.