Skip to content

Commit

Permalink
Add LAME 3.100 to the Mac build. #32
Browse files Browse the repository at this point in the history
  • Loading branch information
rryan committed Apr 17, 2018
1 parent 66a2559 commit d058415
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
1 change: 1 addition & 0 deletions scripts/macosx/build_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,4 @@ $PROGDIR/build_taglib.sh
$PROGDIR/build_vorbis.sh
# Shout depends on openssl, libogg and libvorbis.
$PROGDIR/build_shout.sh
$PROGDIR/build_lame.sh
57 changes: 57 additions & 0 deletions scripts/macosx/build_lame.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/bin/bash

# Echo commands
set -x

# Quit on errors
set -e

# Get the path to our scripts folder.
pushd `dirname $0` > /dev/null
PROGDIR=`pwd -P`
popd > /dev/null

export LAME_VERSION_NUMBER=3.100
export LAME_VERSION=lame-${LAME_VERSION_NUMBER}
export LAME_ARCHIVE=$LAME_VERSION.tar.gz

echo "Building $LAME_VERSION for $MIXXX_ENVIRONMENT_NAME for architectures: ${MIXXX_ARCHS[@]}"

# You may need to change these from version to version.
export LAME_DYLIB=libmp3lame/.libs/libmp3lame.0.dylib
export LAME_STATICLIB=libmp3lame/.libs/libmp3lame.a

for ARCH in ${MIXXX_ARCHS[@]}
do
mkdir -p $LAME_VERSION-$ARCH
tar -zxf $DEPENDENCIES/$LAME_ARCHIVE -C $LAME_VERSION-$ARCH --strip-components 1
cd $LAME_VERSION-$ARCH
source $PROGDIR/environment.sh $ARCH
# Drop non-existent symbol.
# https://hydrogenaud.io/index.php/topic,114777.0.html
sed -i'' -e '/lame_init_old/d' include/libmp3lame.sym
./configure --host $HOST --target $TARGET --disable-dependency-tracking --prefix=$MIXXX_PREFIX --enable-float-approx
make clean
make
cd ..
done

# Install the host version in case there are binaries we want to run.
export ARCH=$HOST_ARCH
cd $LAME_VERSION-$ARCH
source $PROGDIR/environment.sh $ARCH

OTHER_LAME_DYLIBS=()
OTHER_LAME_STATICLIBS=()
for OTHER_ARCH in ${MIXXX_ARCHS[@]}
do
if [ $OTHER_ARCH != $ARCH ]; then
OTHER_LAME_DYLIBS+=(../$LAME_VERSION-$OTHER_ARCH/$LAME_DYLIB)
OTHER_LAME_STATICLIBS+=(../$LAME_VERSION-$OTHER_ARCH/$LAME_STATICLIB)
fi
done

lipo -create ./$LAME_DYLIB ${OTHER_LAME_DYLIBS[@]} -output ./$LAME_DYLIB
lipo -create ./$LAME_STATICLIB ${OTHER_LAME_STATICLIBS[@]} -output ./$LAME_STATICLIB
make install
cd ..
1 change: 1 addition & 0 deletions scripts/macosx/download_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,4 @@ download_and_verify http://prdownloads.sourceforge.net/scons/scons-2.5.0.tar.gz
download_and_verify https://www.sqlite.org/2016/sqlite-autoconf-3130000.tar.gz e2797026b3310c9d08bd472f6d430058c6dd139ff9d4e30289884ccd9744086b
download_and_verify https://taglib.github.io/releases/taglib-1.11.tar.gz ed4cabb3d970ff9a30b2620071c2b054c4347f44fc63546dbe06f97980ece288
download_and_verify http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.5.tar.xz 54f94a9527ff0a88477be0a71c0bab09a4c3febe0ed878b24824906cd4b0e1d1
download_and_verify https://downloads.sourceforge.net/project/lame/lame/3.100/lame-3.100.tar.gz ddfe36cab873794038ae2c1210557ad34857a4b6bdc515785d1da9e175b1da1e

0 comments on commit d058415

Please sign in to comment.