Commit 4113dcc2 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

change darwin_app/Makefile to use homebrew for the libs

parent a4c9f545
Pipeline #278 failed with stage
in 0 seconds
......@@ -64,7 +64,7 @@ all:
install: darwin_app
#------------------------------------------------------------------------------#
darwin_app: darwin_app_core extended_install darwin_app_embed_libs spotlight_importer_install
darwin_app: darwin_app_core extended_install darwin_app_embed_libs
@echo " "
@echo "Pd.app build succeeded!"
......
......@@ -22,17 +22,17 @@ PD_APP_LIB=$PD_APP_CONTENTS/$LIB_DIR
echo " "
for pd_darwin in `find $PD_APP_CONTENTS -name '*.pd_darwin'`; do
LIBS=`otool -L $pd_darwin | sed -n 's|.*/opt/local/lib/\(.*\.dylib\).*|\1|p'`
LIBS=`otool -L $pd_darwin | sed -n 's|.*/usr/local/opt/\(.*\.dylib\).*|\1|p'`
if [ "x$LIBS" != "x" ]; then
echo "`echo $pd_darwin | sed 's|.*/\(.*\.pd_darwin$\)|\1|'` is using:"
for lib in $LIBS; do
echo " $lib"
install -d $PD_APP_LIB
install -p /opt/local/lib/$lib $PD_APP_LIB
install -p /usr/local/opt/$lib $PD_APP_LIB/$(basename $lib)
new_lib=`echo $lib | sed 's|.*/\(.*\.dylib\)|\1|'`
# @executable_path starts from Contents/Resources/app.nw/bin/pd
install_name_tool -id @executable_path/../../../$LIB_DIR/$new_lib $PD_APP_LIB/$new_lib
install_name_tool -change /opt/local/lib/$lib @executable_path/../../../$LIB_DIR/$new_lib $pd_darwin
install_name_tool -change /usr/local/opt/$lib @executable_path/../../../$LIB_DIR/$new_lib $pd_darwin
done
echo " "
fi
......@@ -40,7 +40,7 @@ done
# check for .so plugins used by libquicktime and others
for so in $PD_APP_LIB/*/*.so; do
LIBS=`otool -L $so | sed -n 's|.*/opt/local/lib/\(.*\.dylib\).*|\1|p'`
LIBS=`otool -L $so | sed -n 's|.*/usr/local/opt/\(.*\.dylib\).*|\1|p'`
if [ "x$LIBS" != "x" ]; then
echo "`echo $so | sed 's|.*/\(lib.*/.*\.so\)|\1|'` is using:"
for lib in $LIBS; do
......@@ -49,17 +49,17 @@ for so in $PD_APP_LIB/*/*.so; do
if [ -e $PD_APP_LIB/$new_lib ]; then
echo "$PD_APP_LIB/$new_lib already exists, skipping copy."
else
install -vp /opt/local/lib/$lib $PD_APP_LIB
install -vp /usr/local/opt/$lib $PD_APP_LIB
fi
# @executable_path starts from Contents/Resources/bin/pd
install_name_tool -change /opt/local/lib/$lib @executable_path/../../../$LIB_DIR/$new_lib $so
install_name_tool -change /usr/local/opt/$lib @executable_path/../../../$LIB_DIR/$new_lib $so
done
echo " "
fi
done
for dylib in $PD_APP_LIB/*.dylib; do
LIBS=`otool -L $dylib | sed -n 's|.*/opt/local/lib/\(.*\.dylib\).*|\1|p'`
LIBS=`otool -L $dylib | sed -n 's|.*/usr/local/opt/\(.*\.dylib\).*|\1|p'`
if [ "x$LIBS" != "x" ]; then
echo "`echo $dylib | sed 's|.*/\(.*\.dylib\)|\1|'` is using:"
for lib in $LIBS; do
......@@ -68,11 +68,11 @@ for dylib in $PD_APP_LIB/*.dylib; do
if [ -e $PD_APP_LIB/$new_lib ]; then
echo "$PD_APP_LIB/$new_lib already exists, skipping copy."
else
install -vp /opt/local/lib/$lib $PD_APP_LIB
install -vp /usr/local/opt/$lib $PD_APP_LIB
fi
# @executable_path starts from Contents/Resources/bin/pd
install_name_tool -id @executable_path/../../../$LIB_DIR/$new_lib $PD_APP_LIB/$new_lib
install_name_tool -change /opt/local/lib/$lib @executable_path/../../../$LIB_DIR/$new_lib $dylib
install_name_tool -change /usr/local/opt/$lib @executable_path/../../../$LIB_DIR/$new_lib $dylib
done
echo " "
fi
......@@ -80,7 +80,7 @@ done
# run it one more time to catch dylibs that depend on dylibs
for dylib in $PD_APP_LIB/*.dylib; do
LIBS=`otool -L $dylib | sed -n 's|.*/sw/lib/\(.*\.dylib\).*|\1|p'`
LIBS=`otool -L $dylib | sed -n 's|.*/usr/local/opt/\(.*\.dylib\).*|\1|p'`
if [ "x$LIBS" != "x" ]; then
echo "`echo $dylib | sed 's|.*/\(.*\.dylib\)|\1|'` is using:"
for lib in $LIBS; do
......@@ -89,11 +89,11 @@ for dylib in $PD_APP_LIB/*.dylib; do
if [ -e $PD_APP_LIB/$new_lib ]; then
echo "$PD_APP_LIB/$new_lib already exists, skipping copy."
else
install -vp /opt/local/lib/$lib $PD_APP_LIB
install -vp /usr/local/opt/$lib $PD_APP_LIB
fi
# @executable_path starts from Contents/Resources/app.nw/bin/pd
install_name_tool -id @executable_path/../../../$LIB_DIR/$new_lib $PD_APP_LIB/$new_lib
install_name_tool -change /opt/local/lib/$lib @executable_path/../../../$LIB_DIR/$new_lib $dylib
install_name_tool -change /usr/local/opt/$lib @executable_path/../../../$LIB_DIR/$new_lib $dylib
done
echo " "
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment