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 lv2, serd, sord, sratom, and lilv support to macOS build. #15 #43

Merged
merged 1 commit into from
May 22, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions scripts/macosx/build_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,8 @@ $PROGDIR/build_vorbis.sh
# Shout depends on openssl, libogg and libvorbis.
$PROGDIR/build_shout.sh
$PROGDIR/build_lame.sh
$PROGDIR/build_lv2.sh
$PROGDIR/build_serd.sh
$PROGDIR/build_sord.sh # depends on serd
$PROGDIR/build_sratom.sh # depends on lv2, serd, sord
$PROGDIR/build_lilv.sh # depends on lv2, serd, sord, sratom
52 changes: 52 additions & 0 deletions scripts/macosx/build_lilv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/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 VERSION_NUMBER=0.24.2
export VERSION=lilv-${VERSION_NUMBER}
export ARCHIVE=$VERSION.tar.bz2

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

# You may need to change these from version to version.
export DYLIB=build/liblilv-0.0.24.2.dylib
export STATICLIB=build/liblilv-0.a

for ARCH in ${MIXXX_ARCHS[@]}
do
mkdir -p $VERSION-$ARCH
tar -jxf $DEPENDENCIES/$ARCHIVE -C $VERSION-$ARCH --strip-components 1
cd $VERSION-$ARCH
source $PROGDIR/environment.sh $ARCH
./waf configure build --static --prefix="$MIXXX_PREFIX"
cd ..
done

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

OTHER_DYLIBS=()
OTHER_STATICLIBS=()
for OTHER_ARCH in ${MIXXX_ARCHS[@]}
do
if [ $OTHER_ARCH != $ARCH ]; then
OTHER_DYLIBS+=(../$VERSION-$OTHER_ARCH/$DYLIB)
OTHER_STATICLIBS+=(../$VERSION-$OTHER_ARCH/$STATICLIB)
fi
done

lipo -create ./$DYLIB ${OTHER_DYLIBS[@]} -output ./$DYLIB
lipo -create ./$STATICLIB ${OTHER_STATICLIBS[@]} -output ./$STATICLIB
./waf install
cd ..
38 changes: 38 additions & 0 deletions scripts/macosx/build_lv2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/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 VERSION_NUMBER=1.14.0
export VERSION=lv2-${VERSION_NUMBER}
export ARCHIVE=$VERSION.tar.bz2

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

for ARCH in ${MIXXX_ARCHS[@]}
do
mkdir -p $VERSION-$ARCH
tar -jxf $DEPENDENCIES/$ARCHIVE -C $VERSION-$ARCH --strip-components 1
cd $VERSION-$ARCH
source $PROGDIR/environment.sh $ARCH

./waf configure build --lv2dir "$MIXXX_PREFIX/Library/Audio/Plug-Ins/LV2" --prefix="$MIXXX_PREFIX" --no-plugins
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't --lv2dir be /Library/Audio/Plug-Ins/LV2 according to the LV2 standard?

Copy link
Contributor

Choose a reason for hiding this comment

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

Does anything need to be specified for the --lv2dir argument?

Copy link
Member Author

Choose a reason for hiding this comment

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

If you don't set --lvd2dir then this installer script tries to install a bunch of manifest junk to /Library/Audio/Plug-Ins/LV2 on the build VM, so I changed it to $PREFIX//Library/Audio/Plug-Ins/LV2. I don't know what we're supposed to do with these manifests -- does Mixxx need to install them on the user's computer? We don't have an installer on macOS, the user just drops the Mixxx.app bundle into /Applications.

Copy link
Member Author

Choose a reason for hiding this comment

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

Put another way, we don't want to change the build VM's global state since each environment should be hermetic, so I had this write to $MIXXX_PREFIX/Library/Audio/Plug-Ins/LV2 instead of /Library/Audio/Plug-Ins/LV2.

From what I can tell, this option only affects where files are written -- I grepped for $MIXXX_PREFIX in all of the generated files and it doesn't occur.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, I presumed --lv2dir set the default plugin search path, but it seems I was wrong. It's not clear to me what these manifests do or if they're really necessary. The README in schemas.lv2 says "These are included with LV2 and installed as a bundle to support validation and
more intelligent use of data by hosts."

Copy link
Contributor

Choose a reason for hiding this comment

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

Alright, well I'll merge this now. If there is an issue with macOS builds detecting LV2 plugins, let's keep this in mind.

cd ..
done

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

# No binaries so no need to lipo anything.
./waf install
cd ..
52 changes: 52 additions & 0 deletions scripts/macosx/build_serd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/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 VERSION_NUMBER=0.28.0
export VERSION=serd-${VERSION_NUMBER}
export ARCHIVE=$VERSION.tar.bz2

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

# You may need to change these from version to version.
export DYLIB=build/libserd-0.0.28.0.dylib
export STATICLIB=build/libserd-0.a

for ARCH in ${MIXXX_ARCHS[@]}
do
mkdir -p $VERSION-$ARCH
tar -jxf $DEPENDENCIES/$ARCHIVE -C $VERSION-$ARCH --strip-components 1
cd $VERSION-$ARCH
source $PROGDIR/environment.sh $ARCH
./waf configure build --static --prefix="$MIXXX_PREFIX"
cd ..
done

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

OTHER_DYLIBS=()
OTHER_STATICLIBS=()
for OTHER_ARCH in ${MIXXX_ARCHS[@]}
do
if [ $OTHER_ARCH != $ARCH ]; then
OTHER_DYLIBS+=(../$VERSION-$OTHER_ARCH/$DYLIB)
OTHER_STATICLIBS+=(../$VERSION-$OTHER_ARCH/$STATICLIB)
fi
done

lipo -create ./$DYLIB ${OTHER_DYLIBS[@]} -output ./$DYLIB
lipo -create ./$STATICLIB ${OTHER_STATICLIBS[@]} -output ./$STATICLIB
./waf install
cd ..
52 changes: 52 additions & 0 deletions scripts/macosx/build_sord.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/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 VERSION_NUMBER=0.16.0
export VERSION=sord-${VERSION_NUMBER}
export ARCHIVE=$VERSION.tar.bz2

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

# You may need to change these from version to version.
export DYLIB=build/libsord-0.0.16.0.dylib
export STATICLIB=build/libsord-0.a

for ARCH in ${MIXXX_ARCHS[@]}
do
mkdir -p $VERSION-$ARCH
tar -jxf $DEPENDENCIES/$ARCHIVE -C $VERSION-$ARCH --strip-components 1
cd $VERSION-$ARCH
source $PROGDIR/environment.sh $ARCH
./waf configure build --static --prefix="$MIXXX_PREFIX"
cd ..
done

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

OTHER_DYLIBS=()
OTHER_STATICLIBS=()
for OTHER_ARCH in ${MIXXX_ARCHS[@]}
do
if [ $OTHER_ARCH != $ARCH ]; then
OTHER_DYLIBS+=(../$VERSION-$OTHER_ARCH/$DYLIB)
OTHER_STATICLIBS+=(../$VERSION-$OTHER_ARCH/$STATICLIB)
fi
done

lipo -create ./$DYLIB ${OTHER_DYLIBS[@]} -output ./$DYLIB
lipo -create ./$STATICLIB ${OTHER_STATICLIBS[@]} -output ./$STATICLIB
./waf install
cd ..
52 changes: 52 additions & 0 deletions scripts/macosx/build_sratom.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/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 VERSION_NUMBER=0.6.0
export VERSION=sratom-${VERSION_NUMBER}
export ARCHIVE=$VERSION.tar.bz2

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

# You may need to change these from version to version.
export DYLIB=build/libsratom-0.0.6.0.dylib
export STATICLIB=build/libsratom-0.a

for ARCH in ${MIXXX_ARCHS[@]}
do
mkdir -p $VERSION-$ARCH
tar -jxf $DEPENDENCIES/$ARCHIVE -C $VERSION-$ARCH --strip-components 1
cd $VERSION-$ARCH
source $PROGDIR/environment.sh $ARCH
./waf configure build --static --prefix="$MIXXX_PREFIX"
cd ..
done

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

OTHER_DYLIBS=()
OTHER_STATICLIBS=()
for OTHER_ARCH in ${MIXXX_ARCHS[@]}
do
if [ $OTHER_ARCH != $ARCH ]; then
OTHER_DYLIBS+=(../$VERSION-$OTHER_ARCH/$DYLIB)
OTHER_STATICLIBS+=(../$VERSION-$OTHER_ARCH/$STATICLIB)
fi
done

lipo -create ./$DYLIB ${OTHER_DYLIBS[@]} -output ./$DYLIB
lipo -create ./$STATICLIB ${OTHER_STATICLIBS[@]} -output ./$STATICLIB
./waf install
cd ..
5 changes: 5 additions & 0 deletions scripts/macosx/download_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,8 @@ download_and_verify https://www.sqlite.org/2016/sqlite-autoconf-3130000.tar.gz e
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
download_and_verify http://lv2plug.in/spec/lv2-1.14.0.tar.bz2 b8052683894c04efd748c81b95dd065d274d4e856c8b9e58b7c3da3db4e71d32
download_and_verify https://download.drobilla.net/serd-0.28.0.tar.bz2 1df21a8874d256a9f3d51a18b8c6e2539e8092b62cc2674b110307e93f898aec
download_and_verify https://download.drobilla.net/sord-0.16.0.tar.bz2 9d3cb2c9966e93f537f37377171f162023cea6784ca069699be4a7770c8a035a
download_and_verify https://download.drobilla.net/sratom-0.6.0.tar.bz2 440ac2b1f4f0b7878f8b95698faa1e8f8c50929a498f68ec5d066863626a3d43
download_and_verify http://download.drobilla.net/lilv-0.24.2.tar.bz2 f7ec65b1c1f1734ded3a6c051bbaf50f996a0b8b77e814a33a34e42bce50a522