|
|
@@ -124,7 +124,8 @@ checkStatus() {
|
|
|
echo "configure or make $PKG returned with non zero: $STATUS check $LOG_FILE for errors!"
|
|
|
sayIfVerbal "configure or make of $PKG returned with non zero: $STATUS"
|
|
|
open $LOG_FILE
|
|
|
- printPreprocessor
|
|
|
+ #printPreprocessor
|
|
|
+ ./finish.sh
|
|
|
exit $STATUS
|
|
|
else
|
|
|
#echo "make returned with zero"
|
|
|
@@ -180,10 +181,34 @@ checkPGPSig() {
|
|
|
fi
|
|
|
}
|
|
|
|
|
|
+exportBuildScript() {
|
|
|
+ EXPORT_FILE="$1"
|
|
|
+ echo -e "#!/bin/bash" > $EXPORT_FILE
|
|
|
+ echo -e "\nexport SDKROOT=$(xcrun --sdk $PLATFORM_LOWER --show-sdk-path)" >> $EXPORT_FILE
|
|
|
+ echo -e "export VER_MIN=13.0" >> $EXPORT_FILE
|
|
|
+ echo -e "export CC=$(xcrun --sdk $PLATFORM_LOWER --find clang)" >> $EXPORT_FILE
|
|
|
+ echo -e "export CXX=$(xcrun --sdk $PLATFORM_LOWER --find clang++)" >> $EXPORT_FILE
|
|
|
+ echo -e "export LD=$(xcrun --sdk $PLATFORM_LOWER --find ld)" >> $EXPORT_FILE
|
|
|
+ echo -e "export AR=$(xcrun --sdk $PLATFORM_LOWER --find ar)" >> $EXPORT_FILE
|
|
|
+ echo -e "export 'CPP=$(xcrun --sdk $PLATFORM_LOWER -f clang) -E -D__arm__ -D__arm64__ -I$SKEL_PREFIX/$ROOT_PREFIX/include/ -I$SDKROOT/usr/include -arch arm64' " >> $EXPORT_FILE
|
|
|
+ echo -e "export 'CXXCPP=$(xcrun --sdk $PLATFORM_LOWER -f clang++) -E -D__arm__ -D__arm64__ -I$SKEL_PREFIX/$ROOT_PREFIX/include/ -I$SDKROOT/usr/include -arch arm64' " >> $EXPORT_FILE
|
|
|
+ echo -e "export RANLIB=$(xcrun --sdk $PLATFORM_LOWER --find ranlib)" >> $EXPORT_FILE
|
|
|
+ echo -e "export LIBTOOL=$(xcrun --sdk $PLATFORM_LOWER --find libtool)" >> $EXPORT_FILE
|
|
|
+ echo -e "export STRIP=$(xcrun --sdk $PLATFORM_LOWER --find strip)" >> $EXPORT_FILE
|
|
|
+ echo -e "export 'CFLAGS=-arch arm64 -isysroot $SDKROOT -m$PLATFORM_LOWER-version-min=$VER_MIN -I$SKEL_PREFIX/$ROOT_PREFIX/include/ -DARM -DARM64 -D__arm64__ -Wno-unused-command-line-argument'" >> $EXPORT_FILE
|
|
|
+ echo -e "export 'CXXFLAGS=-arch arm64 -isysroot $SDKROOT -m$PLATFORM_LOWER-version-min=$VER_MIN -I$SKEL_PREFIX/$ROOT_PREFIX/include/ -DARM -DARM64 -D__arm64__ -Wno-unused-command-line-argument'" >> $EXPORT_FILE
|
|
|
+ echo -e "export 'LDFLAGS=-arch arm64 -isysroot $SDKROOT -L$SKEL_PREFIX/$ROOT_PREFIX/lib/ $EXTRA_LD_FLAGS'" >> $EXPORT_FILE
|
|
|
+ echo -e "./configure --prefix=/$ROOT_PREFIX --host=$HOST-apple-darwin --target=$HOST-apple-darwin --disable-dependency-tracking --without-manpages --disable-tests $EXTRA_CFG" >> $EXPORT_FILE
|
|
|
+ echo -e "make -j8 DESTDIR="$SKEL_PREFIX" install" >> $EXPORT_FILE
|
|
|
+ chmod +x $EXPORT_FILE
|
|
|
+}
|
|
|
+
|
|
|
buildProduct() {
|
|
|
PKG_NAME=$1
|
|
|
EXTRA_CFG=$2
|
|
|
LOG_FILE="$ROOT_LOG_FOLDER/$PKG_NAME.log"
|
|
|
+
|
|
|
+ #exit 2
|
|
|
touch $LOG_FILE
|
|
|
echo $PKG_NAME
|
|
|
echo "build output going to: " $LOG_FILE
|
|
|
@@ -202,6 +227,7 @@ buildProduct() {
|
|
|
export CFLAGS="-arch arm64 -isysroot $SDKROOT -m$PLATFORM_LOWER-version-min=$VER_MIN -I$SKEL_PREFIX/$ROOT_PREFIX/include/ -DARM -DARM64 -D__arm64__ -Wno-unused-command-line-argument"
|
|
|
export CXXFLAGS=$CFLAGS
|
|
|
export LDFLAGS="-arch arm64 -isysroot $SDKROOT -L$SKEL_PREFIX/$ROOT_PREFIX/lib/ $EXTRA_LD_FLAGS"
|
|
|
+ exportBuildScript "finish.sh"
|
|
|
notifyProgress "configuring $PKG_NAME"
|
|
|
if [[ $LOG_VERBOSE == "verbose"* ]]; then
|
|
|
./configure --prefix=/$ROOT_PREFIX --host=$HOST-apple-darwin --target=$HOST-apple-darwin --disable-dependency-tracking --without-manpages --disable-tests $EXTRA_CFG | tee "${LOG_FILE}"
|