Skip to content
Snippets Groups Projects
Commit 9ef88402 authored by Albert Gräf's avatar Albert Gräf
Browse files

Check for a custom libquicktime-ffmpeg package.

parent b361a6e4
No related branches found
No related tags found
1 merge request!839Gem on the Mac
...@@ -51,9 +51,22 @@ for pd_darwin in `find $PD_APP_CONTENTS -name '*.pd_darwin'`; do ...@@ -51,9 +51,22 @@ for pd_darwin in `find $PD_APP_CONTENTS -name '*.pd_darwin'`; do
fi fi
done done
# check for .so plugins used by libquicktime and others # check for libquicktime plugins, copy them over
rm -rf $PD_APP_PLUGINS/libquicktime rm -rf $PD_APP_PLUGINS/libquicktime
test -d ${optlocal}/libquicktime/lib/libquicktime && cp -r ${optlocal}/libquicktime/lib/libquicktime $PD_APP_PLUGINS || true libqt_ffmpeg_plugins=${optlocal}/libquicktime-ffmpeg/lib/libquicktime
libqt_plugins=${optlocal}/libquicktime/lib/libquicktime
# prefer libquicktime-ffmpeg, in case we have both installed
if test -d ${libqt_ffmpeg_plugins}; then
cp -r ${libqt_ffmpeg_plugins} $PD_APP_PLUGINS
elif test -d ${libqt_plugins}; then
cp -r ${libqt_plugins} $PD_APP_PLUGINS
elif [ "$optlocal" != "/opt/local" ]; then
echo "No libquicktime found, did you install it?" >&2
fi
# change permissions so that install_name can write to the plugin files
chmod -fR u+xw $PD_APP_PLUGINS/libquicktime
# check for .so plugins used by libquicktime and others
for so in $PD_APP_PLUGINS/*/*.so; do for so in $PD_APP_PLUGINS/*/*.so; do
LIBS=`otool -L $so | sed -n 's|.*'"${optlocal}"'/\(.*\.dylib\).*|\1|p'` LIBS=`otool -L $so | sed -n 's|.*'"${optlocal}"'/\(.*\.dylib\).*|\1|p'`
if [ "x$LIBS" != "x" ]; then if [ "x$LIBS" != "x" ]; then
...@@ -71,6 +84,23 @@ for so in $PD_APP_PLUGINS/*/*.so; do ...@@ -71,6 +84,23 @@ for so in $PD_APP_PLUGINS/*/*.so; do
done done
echo " " echo " "
fi fi
# Homebrew also has some libraries in its cellar (keg-only package?).
LIBS=`otool -L $so | sed -n 's|.*'"/usr/local/Cellar"'/\(.*\.dylib\).*|\1|p'`
if [ "x$LIBS" != "x" ]; then
echo "`echo $so | sed 's|.*/\(lib.*/.*\.so\)|\1|'` is using:"
for lib in $LIBS; do
echo " $lib"
new_lib=`echo $lib | sed 's|.*/\(.*\.dylib\)|\1|'`
if [ -e $PD_APP_LIB/$new_lib ]; then
echo "$PD_APP_LIB/$new_lib already exists, skipping copy."
else
install -vp /usr/local/Cellar/$lib $PD_APP_LIB
fi
# @executable_path starts from Contents/Resources/app.nw/bin
install_name_tool -change /usr/local/Cellar/$lib @executable_path/../../../$LIB_DIR/$new_lib $so
done
echo " "
fi
done done
for dylib in $PD_APP_LIB/*.dylib; do for dylib in $PD_APP_LIB/*.dylib; do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment