From 1ddbb29b9e6c5fefd3029c4b4637c031e10d2176 Mon Sep 17 00:00:00 2001 From: barracuda156 Date: Mon, 31 Jul 2023 09:55:00 +0800 Subject: [PATCH 5/5] Pick Macports patches --- CMakeLists.txt | 2 -- cmake/apple/install_apple.sh.in | 28 ++++++---------------------- cmake/apple/lmms.plist.in | 2 +- plugins/zynaddsubfx/CMakeLists.txt | 1 + 4 files changed, 8 insertions(+), 25 deletions(-) diff --git CMakeLists.txt CMakeLists.txt index b56a8c07b..a52125b8d 100644 --- CMakeLists.txt +++ CMakeLists.txt @@ -72,8 +72,6 @@ OPTION(BUNDLE_QT_TRANSLATIONS "Install Qt translation files for LMMS" OFF) IF(LMMS_BUILD_APPLE) - # Fix linking on 10.14+. See issue #4762 on github - LINK_DIRECTORIES(/usr/local/lib) SET(WANT_SOUNDIO OFF) SET(WANT_ALSA OFF) SET(WANT_PULSEAUDIO OFF) diff --git cmake/apple/install_apple.sh.in cmake/apple/install_apple.sh.in index 259734208..83b26f142 100644 --- cmake/apple/install_apple.sh.in +++ cmake/apple/install_apple.sh.in @@ -5,28 +5,15 @@ # Debug the loading of dynamic libraries using `export DYLD_PRINT_LIBRARIES=1` # STK rawwaves directory -STK_RAWWAVE=$HOME/stk-*/rawwaves - -if [ ! -d "$STK_RAWWAVE" ]; then - STK_RAWWAVE=$(brew --prefix stk)/share/stk/rawwaves -fi +STK_RAWWAVE=@PREFIX@/share/stk/rawwaves # Place to create ".app" bundle -APP="@CMAKE_BINARY_DIR@/@PROJECT_NAME_UCASE@.app" +APP="@DESTROOT@@APPLICATIONS_DIR@/@PROJECT_NAME_UCASE@.app" MSG_COLOR='\x1B[1;36m' COLOR_RESET='\x1B[0m' echo -e "$MSG_COLOR\n\nCreating App Bundle \"$APP\"...$COLOR_RESET" -# Locate macdeployqt, assume homebrew & Qt5 -which macdeployqt > /dev/null 2>&1 -if [ $? -ne 0 ]; then - export PATH=$PATH:$(brew --prefix qt)/bin -fi - -# Remove any old .app bundles -rm -Rf "$APP" - # Copy/overwrite Info.plist \cp "@CMAKE_BINARY_DIR@/Info.plist" "@CMAKE_INSTALL_PREFIX@/" @@ -34,11 +21,12 @@ rm -Rf "$APP" mkdir -p "$APP/Contents/MacOS" mkdir -p "$APP/Contents/Frameworks" mkdir -p "$APP/Contents/Resources" -mkdir -p "$APP/Contents/share/stk/rawwaves" +mkdir -p "$APP/Contents/share/stk" cd "@CMAKE_INSTALL_PREFIX@" cp -R * "$APP/Contents" cp "@CMAKE_SOURCE_DIR@/cmake/apple/"*.icns "$APP/Contents/Resources/" -cp $STK_RAWWAVE/*.raw "$APP/Contents/share/stk/rawwaves" > /dev/null 2>&1 +# Symlink STK rawwaves +ln -s ${STK_RAWWAVE} ${APP}/Contents/share/stk/rawwaves # Make all libraries writable for macdeployqt cd "$APP" @@ -91,9 +79,6 @@ for file in "$APP/Contents/lib/lmms/ladspa/"*.so; do _executables="${_executables} -executable=$_thisfile" done -# Finalize .app -macdeployqt "$APP" $_executables - # Carla is a standalone plugin. Remove library, look for it side-by-side LMMS.app # This MUST be done AFTER calling macdeployqt # @@ -115,6 +100,5 @@ for file in "$APP/Contents/lib/lmms/"libcarla*; do done done -# Cleanup -rm -rf "$APP/Contents/bin" +exit echo -e "\nFinished.\n\n" diff --git cmake/apple/lmms.plist.in cmake/apple/lmms.plist.in index 88fe0b0bf..63fd0e0d1 100644 --- cmake/apple/lmms.plist.in +++ cmake/apple/lmms.plist.in @@ -13,7 +13,7 @@ APPL CFBundleGetInfoString - @MACOSX_BUNDLE_GUI_IDENTIFIER@ @MACOSX_BUNDLE_LONG_VERSION_STRING@ + @MACOSX_BUNDLE_LONG_VERSION_STRING@