From 1581a99387cebd19931ffba636a38607d44a3537 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 26 Nov 2021 16:07:39 +0000 Subject: [PATCH] Hacks. --- build_one | 59 ++++++++++++++++++++----------------------------------- config.sh | 3 --- tools.sh | 5 +++-- 3 files changed, 24 insertions(+), 43 deletions(-) diff --git a/build_one b/build_one index d978231..b413b56 100644 --- a/build_one +++ b/build_one @@ -29,43 +29,26 @@ export CBS_REPOS=$CBS_BASE/Repos errors=0 -# Some packages (e.g. glib with glib-genmarshal) require native tools -# (that they build) as part of the build process, so we need to build -# the build host's version first. -for v in x86_64 arm64; do - - export CBS_VARIANT=$v - if [ "$VARIANT" == "" -o "$VARIANT" == "$CBS_VARIANT" ]; then - - source $CBS_BASE/tools.sh - source $CBS_BASE/Variants/$CBS_VARIANT - - export CBS_ROOT=$CBS_BASE/$CBS_CLANG_ARCH - export CBS_BUILD=$CBS_BASE/Build/$CBS_CLANG_ARCH - export CBS_BUILD_BIN=$CBS_BASE/x86_64/bin - export PKG_CONFIG_LIBDIR=$CBS_ROOT/lib/pkgconfig - export PKG_CONFIG_PATH= - - # Magic variable to set target OS X version - export MACOSX_DEPLOYMENT_TARGET=$CBS_MACOSX_DEPLOYMENT - export CBS_MACOSX_SDK=$CBS_MACOSX_SDK_PREFIX/MacOSX${CBS_MACOSX_SDK_VERSION}.sdk - - export CBS_OSX_FLAGS="-arch $CBS_CLANG_ARCH -isysroot $CBS_MACOSX_SDK" - export CBS_BUILD_TRIPLE=x86_64-apple-darwin - export CBS_HOST_TRIPLE=$CBS_CONFIGURE_ARCH-apple-darwin - export MESON=$CBS_BASE/meson-0.56.0/meson.py - mkdir -p $CBS_ROOT $CBS_BUILD $CBS_BASE/Log/$CBS_CLANG_ARCH - - cd $CBS_BUILD - echo -n " $PACKAGE for $CBS_VARIANT... " - bash $CBS_BASE/Scripts/$PACKAGE.sh > $CBS_BASE/Log/$CBS_CLANG_ARCH/$PACKAGE.log 2>&1 - if [ "$?" != "0" ]; then - echo "********* ERROR!" - errors=`expr $errors + 1` - else - echo "OK" - fi - fi -done +source $CBS_BASE/tools.sh + +export CBS_ROOT=$CBS_BASE +export CBS_BUILD=$CBS_BASE/Build +export CBS_BUILD_BIN=$CBS_BASE/bin +export PKG_CONFIG_LIBDIR=$CBS_ROOT/lib/pkgconfig +export PKG_CONFIG_PATH= + +# Magic variable to set target OS X version +export MESON=$CBS_BASE/meson-0.56.0/meson.py +mkdir -p $CBS_ROOT $CBS_BUILD $CBS_BASE/Log + +cd $CBS_BUILD +echo -n " $PACKAGE" +bash $CBS_BASE/Scripts/$PACKAGE.sh > $CBS_BASE/Log/$PACKAGE.log 2>&1 +if [ "$?" != "0" ]; then +echo "********* ERROR!" +errors=`expr $errors + 1` +else +echo "OK" +fi exit $errors diff --git a/config.sh b/config.sh index 44e2043..58e569e 100644 --- a/config.sh +++ b/config.sh @@ -2,8 +2,5 @@ export CBS_CURL=curl # Parameter to pass to make for parallel builds # (set the number to the number of cores on your machine) export CBS_PARALLEL="-j4" -# SDK to build against (not necessarily the minimum deployment version) -export CBS_MACOSX_SDK_VERSION=11.0 -export CBS_MACOSX_SDK_PREFIX=/Users/ci/SDK export CBS_CMAKE="cmake" diff --git a/tools.sh b/tools.sh index d2ebc27..889ffa1 100644 --- a/tools.sh +++ b/tools.sh @@ -1,5 +1,6 @@ -export CBS_CC=gcc -export CBS_CXX=g++ +export PATH=$PATH:"/c/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.30.30705/bin/Hostx64/x86" +export CBS_CC="cl.exe" +export CBS_CXX="cl.exe" export CBS_AR=ar export CBS_NM=nm export CBS_STRIP=strip -- 2.30.2