fortrangoingonforty/sniffly / 7ac35c5

Browse files

2 changed files

StatusFile+-
M VERSION 1 1
M scripts/bundle-libs.sh 7 2
VERSIONmodified
@@ -1,1 +1,1 @@
1
-0.4.0
1
+0.4.2
scripts/bundle-libs.shmodified
@@ -91,12 +91,17 @@ dylibbundler -of -b \
9191
     -s /opt/homebrew/opt/zstd/lib 2>&1 || echo "  (dylibbundler completed with warnings - this is expected)"
9292
 
9393
 echo ""
94
-echo "Step 2.5: Manually fixing GFortran library references..."
95
-# dylibbundler fails to fully fix libgfortran due to header limits, so we fix remaining references manually
94
+echo "Step 2.5: Manually fixing GFortran and GTK-Fortran library references..."
95
+# dylibbundler sometimes misses @rpath references, so we fix them manually
96
+
9697
 # Fix binary's reference to libgfortran
9798
 install_name_tool -change /opt/homebrew/opt/gcc/lib/gcc/current/libgfortran.5.dylib @executable_path/../Frameworks/libgfortran.5.dylib "$MACOS_BIN" 2>/dev/null || true
9899
 install_name_tool -change /usr/local/lib/gcc/current/libgfortran.5.dylib @executable_path/../Frameworks/libgfortran.5.dylib "$MACOS_BIN" 2>/dev/null || true
99100
 
101
+# Fix binary's @rpath reference to libgtk-4-fortran (CRITICAL FIX)
102
+install_name_tool -change @rpath/libgtk-4-fortran.4.8.0.dylib @executable_path/../Frameworks/libgtk-4-fortran.4.8.0.dylib "$MACOS_BIN" 2>/dev/null || true
103
+install_name_tool -change /usr/local/lib/libgtk-4-fortran.4.8.0.dylib @executable_path/../Frameworks/libgtk-4-fortran.4.8.0.dylib "$MACOS_BIN" 2>/dev/null || true
104
+
100105
 # Fix libgfortran's internal references (only if it exists and isn't fully fixed)
101106
 if [ -f "$FRAMEWORKS/libgfortran.5.dylib" ]; then
102107
     # Try to fix remaining references - these might fail if header is full, but that's OK