From 2998683db941b7127fe66df62eefa194626008b0 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Sat, 3 Aug 2024 22:20:59 +1000 Subject: [PATCH 1/2] xCFrameworks fix type out for osx --- apothecary/apothecary | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/apothecary/apothecary b/apothecary/apothecary index 7955c516e..b3827c791 100755 --- a/apothecary/apothecary +++ b/apothecary/apothecary @@ -1545,19 +1545,25 @@ function frameworkFormula() { mkdir -p $XLIBSLOCAL fi export XLIBS_DIR_REAL=$(realpath $XLIBSLOCAL) + + if [[ $TYPE == "osx" ]]; then + TYPE_OUT="macos" + else + TYPE_OUT=${TYPE} + fi if [ ! -e "$LIBS_DIR/$1" ] ; then echoVerbose " Nothing to create framework from to merge in lib dest dir: \"$1\"" elif [ $1 == "pkg-config" ] || [ $1 == "kiss" ]; then echoVerbose " No need to create framework for: \"$1\"" else - rm -rf $LIBS_DIR_REAL/$1/lib/$TYPE/*.xcframework + rm -rf $LIBS_DIR_REAL/$1/lib/$TYPE_OUT/*.xcframework - echoSuccess " Framework lib dest dir: \"$1\" \"$LIBS_DIR_REAL/$1/lib/$TYPE/\" " + echoSuccess " Framework lib dest dir: \"$1\" \"$LIBS_DIR_REAL/$1/lib/$TYPE_OUT/\" " xcframework_flags="" XDIR="${XLIBS_DIR_REAL}/" - X_LIBS="$XDIR/${1}/lib/${TYPE}/" + X_LIBS="$XDIR/${1}/lib/${TYPE_OUT}/" X_INCLUDE=$XDIR/${1}/include X_LICENSE=$XDIR/${1}/license @@ -1752,11 +1758,7 @@ function frameworkFormula() { echoSuccess " flags: [\"$1\" \"$xcframework_flags\"]" HERE_DIR=$(cd $(dirname "./"); pwd -P) - if [[ $TYPE == "osx" ]]; then - TYPE_OUT="macos" - else - TYPE_OUT=${TYPE} - fi + XCFRAMEWORK_PATH="${LIBS_DIR_REAL}/${1}/lib/${TYPE_OUT}/$1.xcframework" From c679afc4584c8004ed5dc5ab4f30152614d84c84 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Sat, 3 Aug 2024 22:59:40 +1000 Subject: [PATCH 2/2] Type Fix --- apothecary/apothecary | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apothecary/apothecary b/apothecary/apothecary index b3827c791..8dbdd08bc 100755 --- a/apothecary/apothecary +++ b/apothecary/apothecary @@ -1572,9 +1572,9 @@ function frameworkFormula() { if [[ $1 == "fmod" ]] || [[ $1 == "fmodex" ]] || [[ $1 == "glm" ]] || [[ $1 == "json" ]] || [[ $1 == "utf8" ]]; then if ! command -v rsync &> /dev/null; then - if [[ -e "${LIBS_DIR_REAL}/${1}/lib/${TYPE}/" ]]; then + if [[ -e "${LIBS_DIR_REAL}/${1}/lib/${TYPE_OUT}/" ]]; then mkdir -p "${X_LIBS}" - cp -av "${LIBS_DIR_REAL}/${1}/lib/${TYPE}/"* ${X_LIBS} + cp -av "${LIBS_DIR_REAL}/${1}/lib/${TYPE_OUT}/"* ${X_LIBS} fi if [[ -e "${LIBS_DIR_REAL}/${1}/include/" ]]; then cp -av "${LIBS_DIR_REAL}/${1}/include/"* ${X_INCLUDE} @@ -1583,9 +1583,9 @@ function frameworkFormula() { cp -av "${LIBS_DIR_REAL}/${1}/license/"* ${X_LICENSE} fi else - if [[ -e "${LIBS_DIR_REAL}/${1}/lib/${TYPE}" ]]; then + if [[ -e "${LIBS_DIR_REAL}/${1}/lib/${TYPE_OUT}" ]]; then mkdir -p "${X_LIBS}" - rsync -av --delete "${LIBS_DIR_REAL}/${1}/lib/${TYPE}/" ${X_LIBS} + rsync -av --delete "${LIBS_DIR_REAL}/${1}/lib/${TYPE_OUT}/" ${X_LIBS} fi if [[ -e "${LIBS_DIR_REAL}/${1}/include/" ]]; then rsync -av --delete "${LIBS_DIR_REAL}/${1}/include/" ${X_INCLUDE} @@ -1624,7 +1624,7 @@ function frameworkFormula() { LIB_NAME="" CURRENT_TYPE=$TYPE BINARY_NAME="" - XCFRAMEWORK_PATH="${LIBS_DIR_REAL}/${1}/lib/${TYPE}/$1.xcframework" + XCFRAMEWORK_PATH="${LIBS_DIR_REAL}/${1}/lib/${TYPE_OUT}/$1.xcframework" declare -a merged_dirs=() LIB_NAME="" for CURRENT_TYPE in "${PLATFORM_TYPES[@]}"; do