osxcross/tools/gen_sdk_package_pbzx.sh
Thomas Pöchtrager 68bdbd9452 New:
* Added support for TAPIv3 stubs (including "zippering" target)
* Added support for MacOSX SDKs up to 10.14
* Added new SDK packaging script for SDKs that end with ".xip" (tools/gen_sdk_package_pbzx.sh <xcode.xip>) (tested up to Xcode 10.2.1)
* Updated cctools to 921 and ld64 to 409.12

Fixed:
* Implemented fix for https://github.com/tpoechtrager/osxcross/issues/171
* Implemented fix for https://github.com/tpoechtrager/osxcross/issues/178
* Implemented fix for https://github.com/tpoechtrager/osxcross/issues/182

Changed:
* cctools, ld64, apple-libtapi and xar are now "git clone"'d and no longer come with OSXCross.

Removed:
* Support for Cygwin and *BSD (besides FreeBSD)
* Support for building OSXCross with GCC
2019-06-01 19:57:44 +02:00

54 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
pushd "${0%/*}/.." &>/dev/null
source tools/tools.sh
require cpio
if [ $PLATFORM == "Darwin" ]; then
echo "Use gen_sdk_package.sh on Mac OS X" 1>&2
exit 1
fi
if [ $# -eq 0 ]; then
echo "Usage: $0 <xcode.xip>" 1>&2
exit 1
fi
mkdir -p $BUILD_DIR
pushd $BUILD_DIR &>/dev/null
build_xar
get_sources https://github.com/tpoechtrager/pbzx.git master
if [ $f_res -eq 1 ]; then
pushd $CURRENT_BUILD_PROJECT_NAME &>/dev/null
mkdir -p $TARGET_DIR_SDK_TOOLS/bin
verbose_cmd $CC -I $TARGET_DIR/include -L $TARGET_DIR/lib pbzx.c \
-o $TARGET_DIR_SDK_TOOLS/bin/pbzx -llzma -lxar \
-Wl,-rpath,$TARGET_DIR/lib
build_success
popd &>/dev/null
fi
create_tmp_dir
pushd $TMP_DIR &>/dev/null
echo "Extracting $1 (this may take several minutes) ..."
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$TARGET_DIR/lib \
verbose_cmd "$TARGET_DIR/bin/xar -xf $1 -C $TMP_DIR"
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$TARGET_DIR/lib \
verbose_cmd "$TARGET_DIR/SDK/tools/bin/pbzx -n Content | cpio -i"
popd &>/dev/null # TMP_DIR
popd &>/dev/null # BUILD_DIR
echo ""
XCODEDIR=$TMP_DIR \
./tools/gen_sdk_package.sh