@@ -1604,9 +1604,11 @@ function frameworkFormula() {
1604
1604
# Final merging pass to combine binaries of same / merged architectures into single binary to prevent linking issues
1605
1605
for dir in " ${merged_dirs[@]} " ; do
1606
1606
echo " Processing directory: $dir "
1607
- # rm -f "${dir}/${1}.a"
1607
+
1608
+ # Find all .a files in the directory
1608
1609
a_files=($( find " $dir " -name ' *.a' -print0 | xargs -0) )
1609
- echo " [$dir ]"
1610
+ echo " [$dir ] - Found archives: ${# a_files[@]} "
1611
+
1610
1612
num_files=${# a_files[@]}
1611
1613
if [ " $num_files " -gt 1 ]; then
1612
1614
echo " Multiple archives found in $dir . Commencing the merge..."
@@ -1622,12 +1624,12 @@ function frameworkFormula() {
1622
1624
xcframework_flags+=" -headers $LIBS_DIR_REAL /$1 /include"
1623
1625
fi
1624
1626
elif [ " $num_files " -gt 0 ]; then
1625
- # Directly use the single archive or skip if none
1626
- echo " Directly use the single archive or skip if none ${a_files[0]} ] "
1627
+ # Directly use the single archive
1628
+ echo " Directly use the single archive ${a_files[0]} "
1627
1629
xcframework_flags+=" -library ${a_files[0]} "
1628
1630
xcframework_flags+=" -headers $LIBS_DIR_REAL /$1 /include"
1629
1631
else
1630
- echo " Skip for [$dir ] ]"
1632
+ echo " No archives found. Skip for [$dir ]"
1631
1633
fi
1632
1634
done
1633
1635
@@ -1721,7 +1723,7 @@ function xframeworkFormula() {
1721
1723
mkdir -p " ${X_INCLUDE} "
1722
1724
mkdir -p " ${X_LICENSE} "
1723
1725
1724
- if [[ $1 == " fmod" ]] || [[ $1 == " fmodex" ]] || [[ $1 == " libusb " ]] || [[ $1 == " glm" ]] || [[ $1 == " json" ]] || [[ $1 == " utf8" ]]; then
1726
+ if [[ $1 == " fmod" ]] || [[ $1 == " fmodex" ]] || [[ $1 == " glm" ]] || [[ $1 == " json" ]] || [[ $1 == " utf8" ]]; then
1725
1727
if ! command -v rsync & > /dev/null; then
1726
1728
if [[ -e " ${LIBS_DIR_REAL} /${1} /lib/${TYPE} /" ]]; then
1727
1729
mkdir -p " ${X_LIBS} "
@@ -1878,14 +1880,17 @@ function xframeworkFormula() {
1878
1880
# Final merging pass to combine binaries of same / merged architectures into single binary to prevent linking issues
1879
1881
echo " merged_dirs:"
1880
1882
for dir in " ${merged_dirs[@]} " ; do
1881
- echo " Processing directory: [$dir ]"
1882
- rm -f " ${dir} /${1} .a"
1883
+ echo " Processing directory: $dir "
1884
+
1885
+ # Find all .a files in the directory
1883
1886
a_files=($( find " $dir " -name ' *.a' -print0 | xargs -0) )
1887
+ echo " [$dir ] - Found archives: ${# a_files[@]} "
1888
+
1884
1889
num_files=${# a_files[@]}
1885
1890
if [ " $num_files " -gt 1 ]; then
1886
- echo " Multiple archives found in [ $dir ] . Commencing the merge..."
1891
+ echo " Multiple archives found in $dir . Commencing the merge..."
1887
1892
libtool -static -o " ${dir} /${1} .a" " ${a_files[@]} "
1888
- echo " Merged into [ ${dir} /${1} .a] "
1893
+ echo " Merged into ${dir} /${1} .a"
1889
1894
for a_file in " ${a_files[@]} " ; do
1890
1895
rm -f " $a_file "
1891
1896
done
@@ -1896,12 +1901,12 @@ function xframeworkFormula() {
1896
1901
xcframework_flags+=" -headers $LIBS_DIR_REAL /$1 /include"
1897
1902
fi
1898
1903
elif [ " $num_files " -gt 0 ]; then
1899
- # Directly use the single archive or skip if none
1900
- echo " Directly use the single archive or skip if none ${a_files[0]} ] "
1904
+ # Directly use the single archive
1905
+ echo " Directly use the single archive ${a_files[0]} "
1901
1906
xcframework_flags+=" -library ${a_files[0]} "
1902
1907
xcframework_flags+=" -headers $LIBS_DIR_REAL /$1 /include"
1903
1908
else
1904
- echo " Skip for [$dir ] ]"
1909
+ echo " No archives found. Skip for [$dir ]"
1905
1910
fi
1906
1911
done
1907
1912
0 commit comments