[vlc-commits] contrib: bootstrap: Simplify macOS sdk detection

David Fuhrmann git at videolan.org
Sun Nov 15 18:23:22 CET 2020


vlc/vlc-3.0 | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Thu May 31 01:12:22 2018 +0200| [d2326c1163882dd4ed92ef24ae2390cddd753ce4] | committer: David Fuhrmann

contrib: bootstrap: Simplify macOS sdk detection

Just use xcrun --show-sdk-path to get the default SDK patch.
This also finds all other variants checked by the other tests.

(cherry picked from commit cddeb563f53168ac859d1b32e08e8212dc93a50c)
Signed-off-by: David Fuhrmann <dfuhrmann at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=d2326c1163882dd4ed92ef24ae2390cddd753ce4
---

 contrib/bootstrap | 23 ++++-------------------
 1 file changed, 4 insertions(+), 19 deletions(-)

diff --git a/contrib/bootstrap b/contrib/bootstrap
index 980b1f9e49..a847306c6b 100755
--- a/contrib/bootstrap
+++ b/contrib/bootstrap
@@ -223,28 +223,13 @@ check_macosx_sdk()
       OSX_VERSION=`xcrun --show-sdk-version`
       echo "OSX_VERSION not specified, assuming $OSX_VERSION"
    fi
-   if test -z "$SDKROOT"
-   then
-      SDKROOT=`xcode-select -print-path`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$OSX_VERSION.sdk
+   if [ -z "$SDKROOT" ]; then
+      SDKROOT=$(xcrun --show-sdk-path)
       echo "SDKROOT not specified, assuming $SDKROOT"
    fi
 
-   if [ ! -d "${SDKROOT}" ]
-   then
-      SDKROOT_NOT_FOUND=`xcode-select -print-path`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$OSX_VERSION.sdk
-      SDKROOT=`xcode-select -print-path`/SDKs/MacOSX$OSX_VERSION.sdk
-      echo "SDKROOT not found at $SDKROOT_NOT_FOUND, trying $SDKROOT"
-   fi
-   if [ ! -d "${SDKROOT}" ]
-   then
-      SDKROOT_NOT_FOUND="$SDKROOT"
-      SDKROOT=`xcrun --show-sdk-path`
-      echo "SDKROOT not found at $SDKROOT_NOT_FOUND, trying $SDKROOT"
-   fi
-
-   if [ ! -d "${SDKROOT}" ]
-   then
-      echo "*** ${SDKROOT} does not exist, please install required SDK, or set SDKROOT manually. ***"
+   if [ ! -d "$SDKROOT" ]; then
+      echo "*** $SDKROOT does not exist, please install required SDK, or set SDKROOT manually. ***"
       exit 1
    fi
 



More information about the vlc-commits mailing list