Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LAME 3.100 to the Mac build. #32 #37

Merged
merged 1 commit into from
Apr 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions scripts/macosx/build_environment.sh
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
@@ -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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't this be just sed -i '/lame_init_old/d' include/libmp3lame.sym

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Annoyingly, macOS's sed takes a non-optional extension parameter:
https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/sed.1.html

./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
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