As OpenSSL is expected to be in a standard UNIX location but that's not always the case on macOS, this works around the issue regardless of package manager used as long as pkg-config is installed into $PATH
Macports default prefix is /opt/local
Homebrew on M1 uses /opt/homebrew
Move setting build_complete_file to after fetching project_name using
get_project_name_from_url. Avoids empty ".FOO_build_complete" file name.
* Fix up a number of shellcheck issues in get_sources().
Signed-off-by: Ben Kochie <superq@gmail.com>
Being able to extract SDKs from Command Line Tools for Xcode instead
of the full Xcode package saves bandwidth, disk space, and time.
Two scripts are added:
* tools/gen_sdk_package_tools.sh: extracts SDKs from installed
Command Line Tools on macOS (/Library/Developer/CommandLineTools)
or from a path specified via XCODE_TOOLS_DIR
* tools/gen_sdk_package_tools_dmg.sh: unpacks the content of provided
Command_Line_Tools_for_Xcode.dmg and extracts SDKs via the above
script.
Tested with Command Line Tools for Xcode 12.x.
* build_compiler_rt.sh: Change git repository. The llvm.org one is no longer synced.
* build_compiler_rt.sh: Add check for os/lock.h.
* xcrun: "Support" -show-sdk-platform-path.
* sw_vers: Output 0CFFFF for Build Version.
* 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
This pulls in the https://github.com/darlinghq/darling-dmg/pull/41 fix
for compilation with newer GCC.
The error message this fixes is
```
osxcross/build/darling-dmg/src/main-fuse.cpp:137:28: error: no member named 'function' in namespace 'std'
int handle_exceptions(std::function<int()> func)
~~~~~^
osxcross/build/darling-dmg/src/main-fuse.cpp:137:44: error: use of undeclared identifier 'func'
int handle_exceptions(std::function<int()> func)
^
osxcross/build/darling-dmg/src/main-fuse.cpp:137:49: error: expected ';' after top level declarator
int handle_exceptions(std::function<int()> func)
^
;
3 errors generated.
```