|
|
@@ -1,4 +1,4 @@
|
|
|
-#!/bin/bash
|
|
|
+#!/bin/bash -x
|
|
|
|
|
|
BUILD_ROOT="$(pwd)"
|
|
|
ROOT_LOG_FOLDER="$BUILD_ROOT/Logs"
|
|
|
@@ -64,6 +64,10 @@ while test $# -gt 0; do
|
|
|
esac
|
|
|
done
|
|
|
|
|
|
+printPreprocessor() {
|
|
|
+ $(xcrun --sdk $PLATFORM_LOWER --find clang) -E - - -dM < /dev/null
|
|
|
+}
|
|
|
+
|
|
|
sayIfVerbal() {
|
|
|
if [[ $SPEAK == "true" ]]; then
|
|
|
say $1
|
|
|
@@ -120,6 +124,7 @@ 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
|
|
|
exit $STATUS
|
|
|
else
|
|
|
#echo "make returned with zero"
|
|
|
@@ -200,21 +205,27 @@ buildProduct() {
|
|
|
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}"
|
|
|
+ EC=$(grep "configure: error:" -i "${LOG_FILE}" -c)
|
|
|
+ checkStatus $PKG_NAME $EC "false"
|
|
|
else
|
|
|
(./configure --prefix=/$ROOT_PREFIX --host=$HOST-apple-darwin --target=$HOST-apple-darwin --disable-dependency-tracking --without-manpages --disable-tests $EXTRA_CFG > "${LOG_FILE}" 2>&1)
|
|
|
+ checkStatus $PKG_NAME $? "false"
|
|
|
if [[ $OPEN_LOG == "true" ]]; then
|
|
|
open "${LOG_FILE}"
|
|
|
fi
|
|
|
fi
|
|
|
- checkStatus $PKG_NAME $? "false"
|
|
|
+
|
|
|
notifyProgress "making $PKG_NAME"
|
|
|
echo -e "\n\nPOST CONFIGURE\n\n" >> "$LOG_FILE"
|
|
|
if [[ $LOG_VERBOSE == "verbose"* ]]; then
|
|
|
make -j8 DESTDIR="$SKEL_PREFIX" install | tee -a "${LOG_FILE}"
|
|
|
+ EC=$(grep "fatal error:" -i "${LOG_FILE}" -c)
|
|
|
+ checkStatus $EC $? "true"
|
|
|
else
|
|
|
(make -j8 DESTDIR="$SKEL_PREFIX" install >> "${LOG_FILE}" 2>&1) #& spinner
|
|
|
+ checkStatus $PKG_NAME $? "true"
|
|
|
fi
|
|
|
- checkStatus $PKG_NAME $? "true"
|
|
|
+
|
|
|
cd "$BUILD_ROOT"
|
|
|
}
|
|
|
|
|
|
@@ -879,21 +890,25 @@ buildOpenSSL() {
|
|
|
notifyProgress "Configuring openSSL"
|
|
|
if [[ $LOG_VERBOSE == "verbose"* ]]; then
|
|
|
./Configure ios64-cross no-dso no-hw no-engine --prefix="/$ROOT_PREFIX" | tee "${LOG_FILE}"
|
|
|
+ EC=$(grep "configure: error:" -i "${LOG_FILE}" -c)
|
|
|
+ checkStatus $PKG_NAME $EC "false"
|
|
|
else
|
|
|
(./Configure ios64-cross no-dso no-hw no-engine --prefix="/$ROOT_PREFIX" > "$LOG_FILE" 2>&1)
|
|
|
+ checkStatus $PKG_NAME $? "false"
|
|
|
if [[ $OPEN_LOG == "true" ]]; then
|
|
|
open "${LOG_FILE}"
|
|
|
fi
|
|
|
fi
|
|
|
- checkStatus $PKG_NAME $? "false"
|
|
|
echo -e "\n\nPOST CONFIGURE\n\n" >> "$LOG_FILE"
|
|
|
notifyProgress "making openSSL"
|
|
|
if [[ $LOG_VERBOSE == "verbose"* ]]; then
|
|
|
make DESTDIR="$SKEL_PREFIX" install | tee -a "${LOG_FILE}"
|
|
|
+ EC=$(grep "fatal error:" -i "${LOG_FILE}" -c)
|
|
|
+ checkStatus $PKG_NAME $EC "true"
|
|
|
else
|
|
|
(make DESTDIR="$SKEL_PREFIX" install >> "${LOG_FILE}" 2>&1)
|
|
|
+ checkStatus $PKG_NAME $? "true"
|
|
|
fi
|
|
|
- checkStatus $PKG_NAME $? "true"
|
|
|
cd "$BUILD_ROOT"
|
|
|
fi
|
|
|
}
|
|
|
@@ -1096,9 +1111,9 @@ buildGpgError() {
|
|
|
downloadProduct $DOWNLOAD_URL $DOWNLOAD_URL.sig libgpg-error 1.32
|
|
|
#sed -i -- 's|#include <stdlib.h>|\n#if !defined(__arm64__)\n#define __arm64__\n#endif\n\n#include <stdlib.h>|' ncurses/build.priv.h
|
|
|
#echo -e "\n#if !defined(__arm64__)\n#define __arm64__\n#endif\n\n" >> config.h.in
|
|
|
- export HOST="arm"
|
|
|
+ #export HOST="arm"
|
|
|
buildProduct $PKG_NAME "--enable-threads=posix"
|
|
|
- export HOST="aarch64"
|
|
|
+ #export HOST="aarch64"
|
|
|
fi
|
|
|
}
|
|
|
|
|
|
@@ -1409,9 +1424,9 @@ mkdirIfNecessary $ALREADY_BUILT
|
|
|
# Ensure our SDK has all the required "extras" installed/setup
|
|
|
prepSDK
|
|
|
|
|
|
-buildBashAndFriends
|
|
|
-buildBasicUtils
|
|
|
-buildDPKGAndDependencies
|
|
|
+#buildBashAndFriends
|
|
|
+#buildBasicUtils
|
|
|
+#buildDPKGAndDependencies
|
|
|
buildAPTAndDependencies
|
|
|
|
|
|
echo -e "\nDone!\n"
|