SDL_mixer: Only include the optional frameworks that have been built

From 88f0890a78a0cff1475c50f116f766888e624c01 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Sat, 16 Jul 2022 09:26:06 -0700
Subject: [PATCH] Only include the optional frameworks that have been built

---
 Xcode/SDL_mixer.xcodeproj/project.pbxproj |  2 +-
 Xcode/pkg-support/resources/ReadMe.txt    | 12 +-----------
 2 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/Xcode/SDL_mixer.xcodeproj/project.pbxproj b/Xcode/SDL_mixer.xcodeproj/project.pbxproj
index 940bf3e8..b815e9d5 100644
--- a/Xcode/SDL_mixer.xcodeproj/project.pbxproj
+++ b/Xcode/SDL_mixer.xcodeproj/project.pbxproj
@@ -609,7 +609,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "PRODUCT_NAME=SDL2_mixer\n\n# Sign framework\nif [ \"$SDL_CODESIGN_IDENTITY\" != \"\" ]; then\n    codesign --force --deep --sign \"$SDL_CODESIGN_IDENTITY\" $TARGET_BUILD_DIR/$PRODUCT_NAME.framework/Versions/A || exit $?\nfi\n\n# clean up the framework, remove headers, extra files\nmkdir -p build/dmg-tmp\ncp -a $TARGET_BUILD_DIR/$PRODUCT_NAME.framework build/dmg-tmp/\ncp pkg-support/resources/ReadMe.txt build/dmg-tmp\nmkdir -p build/dmg-tmp/optional\ncp -a $TARGET_BUILD_DIR/xmp_lite.framework build/dmg-tmp/optional/\ncp -a $TARGET_BUILD_DIR/ogg.framework build/dmg-tmp/optional/\ncp -a $TARGET_BUILD_DIR/opus.framework build/dmg-tmp/optional/\n\n# remove the .DS_Store files if any (we may want to provide one in the future for fancy .dmgs)\nrm -rf build/dmg-tmp/.DS_Store\n\n# create the dmg\nhdiutil create -ov -fs HFS+ -volname $PRODUCT_NAME -srcfolder build/dmg-tmp build/$PRODUCT_NAME.dmg\n\n# clean up\nrm -rf build/dmg-tmp\n";
+			shellScript = "PRODUCT_NAME=SDL2_mixer\n\n# Sign framework\nif [ \"$SDL_CODESIGN_IDENTITY\" != \"\" ]; then\n    codesign --force --deep --sign \"$SDL_CODESIGN_IDENTITY\" $TARGET_BUILD_DIR/$PRODUCT_NAME.framework/Versions/A || exit $?\nfi\n\n# clean up the framework, remove headers, extra files\nmkdir -p build/dmg-tmp\ncp -a $TARGET_BUILD_DIR/$PRODUCT_NAME.framework build/dmg-tmp/\ncp pkg-support/resources/ReadMe.txt build/dmg-tmp\nfor i in ogg opus xmp_lite; do\n    if [ -d $TARGET_BUILD_DIR/$i.framework ]; then\n        mkdir -p build/dmg-tmp/optional\n        cp -a $TARGET_BUILD_DIR/$i.framework build/dmg-tmp/optional/\n    fi\ndone\n\n# remove the .DS_Store files if any (we may want to provide one in the future for fancy .dmgs)\nrm -rf build/dmg-tmp/.DS_Store\n\n# create the dmg\nhdiutil create -ov -fs HFS+ -volname $PRODUCT_NAME -srcfolder build/dmg-tmp build/$PRODUCT_NAME.dmg\n\n# clean up\nrm -rf build/dmg-tmp\n";
 		};
 /* End PBXShellScriptBuildPhase section */
 
diff --git a/Xcode/pkg-support/resources/ReadMe.txt b/Xcode/pkg-support/resources/ReadMe.txt
index a31fd29a..2e3c8651 100644
--- a/Xcode/pkg-support/resources/ReadMe.txt
+++ b/Xcode/pkg-support/resources/ReadMe.txt
@@ -14,6 +14,7 @@ Copy the SDL2_mixer.framework to /Library/Frameworks
 
 You may alternatively install it in <your home directory>/Library/Frameworks if your access privileges are not high enough. (Be aware that the Xcode templates we provide in the SDL Developer Extras package may require some adjustment for your system if you do this.)
 
+In the optional directory are additional frameworks you can install or include in your application to support more audio formats.
 
 Use in CMake projects:
 SDL2_mixer.framework can be used in CMake projects using the following pattern:
@@ -25,14 +26,3 @@ target_link_libraries(my_game PRIVATE SDL2_mixer::SDL2_mixer)
 If SDL2_mixer.framework is installed in a non-standard location,
 please refer to the following link for ways to configure CMake:
 https://cmake.org/cmake/help/latest/command/find_package.html#config-mode-search-procedure
-
-
-(Partial) History of PB/Xcode projects:
-2009-09-21 - Updated for 64-bit (Snow Leopard) Universal Binaries.
-	Switched to 10.4 minimum requirement.
-	Reebuilt Ogg Vorbis components for 64-bit Universal.
-	Ogg 1.1.4
-	Vorbis 1.2.3
-	Mac native midi had to be disabled because the code depends on legacy Quicktime and won't compile in 64-bit.
-	
-2006-01-31 - First entry in history. Updated for Universal Binaries. Static libraries of libogg and libvorbis have been brought up-to-date and built as Universal. Infrastructure has been added to support building against smpeg statically, but there may be bugs in smpeg itself (unrelated to static linking) which prevent MP3 playback.