|
@@ -194,8 +194,8 @@ buildProduct() {
|
|
|
export CXX=$(xcrun --sdk $PLATFORM_LOWER --find clang++)
|
|
export CXX=$(xcrun --sdk $PLATFORM_LOWER --find clang++)
|
|
|
export LD=$(xcrun --sdk $PLATFORM_LOWER --find ld)
|
|
export LD=$(xcrun --sdk $PLATFORM_LOWER --find ld)
|
|
|
export AR=$(xcrun --sdk $PLATFORM_LOWER --find ar)
|
|
export AR=$(xcrun --sdk $PLATFORM_LOWER --find ar)
|
|
|
- export CPP="$(xcrun --sdk $PLATFORM_LOWER -f clang) -E -D__arm__ -D__arm64__ -I$SKEL_PREFIX/$ROOT_PREFIX/include/ -I$SDKROOT/usr/include"
|
|
|
|
|
- export CXXCPP="$(xcrun --sdk $PLATFORM_LOWER -f clang++) -E -D__arm__ -D__arm64__ -I$SKEL_PREFIX/$ROOT_PREFIX/include/ -I$SDKROOT/usr/include"
|
|
|
|
|
|
|
+ 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 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 RANLIB=$(xcrun --sdk $PLATFORM_LOWER --find ranlib)
|
|
export RANLIB=$(xcrun --sdk $PLATFORM_LOWER --find ranlib)
|
|
|
export LIBTOOL=$(xcrun --sdk $PLATFORM_LOWER --find libtool)
|
|
export LIBTOOL=$(xcrun --sdk $PLATFORM_LOWER --find libtool)
|
|
|
export STRIP=$(xcrun --sdk $PLATFORM_LOWER --find strip)
|
|
export STRIP=$(xcrun --sdk $PLATFORM_LOWER --find strip)
|
|
@@ -288,10 +288,10 @@ patchDpkg() {
|
|
|
buildBashAndFriends() {
|
|
buildBashAndFriends() {
|
|
|
notifyProgress "Building readline"
|
|
notifyProgress "Building readline"
|
|
|
buildReadline
|
|
buildReadline
|
|
|
- #notifyProgress "Building ncurses"
|
|
|
|
|
- #buildNcurses
|
|
|
|
|
- #notifyProgress "Building bash"
|
|
|
|
|
- #buildBash
|
|
|
|
|
|
|
+ notifyProgress "Building ncurses"
|
|
|
|
|
+ buildNcurses
|
|
|
|
|
+ notifyProgress "Building bash"
|
|
|
|
|
+ buildBash
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
buildReadline() {
|
|
buildReadline() {
|
|
@@ -486,30 +486,33 @@ patchNcurses() {
|
|
|
cp tput.patched.c progs/tput.c
|
|
cp tput.patched.c progs/tput.c
|
|
|
fi
|
|
fi
|
|
|
fi
|
|
fi
|
|
|
- sed -i -- 's|#include <stdlib.h>|\n#if !defined(__arm64__)\n#define __arm64__\n#endif\n\n#include <stdlib.h>|' ncurses/build.priv.h
|
|
|
|
|
- CURSES_PRIV="$SKEL_PREFIX/$ROOT_PREFIX/include/curses.priv.h"
|
|
|
|
|
- FIFO="$SKEL_PREFIX/$ROOT_PREFIX/include/fifo_defs.h"
|
|
|
|
|
- BUILD_P="$SKEL_PREFIX/$ROOT_PREFIX/include/build.priv.h"
|
|
|
|
|
- if [[ ! -f "$CURSES_PRIV" ]]; then
|
|
|
|
|
- cp $BUILD_ROOT/$1/ncurses/*.h "$SKEL_PREFIX/$ROOT_PREFIX/include/"
|
|
|
|
|
|
|
+ #sed -i -- 's|#include <stdlib.h>|\n#if !defined(__arm64__)\n#define __arm64__\n#endif\n\n#include <stdlib.h>|' ncurses/build.priv.h
|
|
|
|
|
+ # CURSES_PRIV="$SKEL_PREFIX/$ROOT_PREFIX/include/curses.priv.h"
|
|
|
|
|
+ # FIFO="$SKEL_PREFIX/$ROOT_PREFIX/include/fifo_defs.h"
|
|
|
|
|
+ # BUILD_P="$SKEL_PREFIX/$ROOT_PREFIX/include/build.priv.h"
|
|
|
|
|
+ # if [[ ! -f "$CURSES_PRIV" ]]; then
|
|
|
|
|
+ # cp $BUILD_ROOT/$1/ncurses/*.h "$SKEL_PREFIX/$ROOT_PREFIX/include/"
|
|
|
#cp "$BUILD_ROOT/$1/ncurses/fifo_defs.h" "$FIFO"
|
|
#cp "$BUILD_ROOT/$1/ncurses/fifo_defs.h" "$FIFO"
|
|
|
#cp "$BUILD_ROOT/$1/ncurses/build.priv.h" "$BUILD_P"
|
|
#cp "$BUILD_ROOT/$1/ncurses/build.priv.h" "$BUILD_P"
|
|
|
- fi
|
|
|
|
|
|
|
+ # fi
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+#http://gnu.mirror.constant.com/ncurses/ncurses-6.0.tar.gz
|
|
|
#https://git.elucubratus.com/elucubratus/elucubratus/-/raw/master/data/ncurses/ncurses_6.1+20181013.orig.tar.gz
|
|
#https://git.elucubratus.com/elucubratus/elucubratus/-/raw/master/data/ncurses/ncurses_6.1+20181013.orig.tar.gz
|
|
|
|
|
|
|
|
buildNcurses() {
|
|
buildNcurses() {
|
|
|
- PKG_NAME="ncurses-6.0"
|
|
|
|
|
|
|
+ PKG_NAME="ncurses-6.1-20181013"
|
|
|
checkBuilt $PKG_NAME
|
|
checkBuilt $PKG_NAME
|
|
|
if [[ $? != 0 ]]; then
|
|
if [[ $? != 0 ]]; then
|
|
|
echo "$PKG_NAME already exists, skipping!"
|
|
echo "$PKG_NAME already exists, skipping!"
|
|
|
else
|
|
else
|
|
|
echo "building $PKG_NAME..."
|
|
echo "building $PKG_NAME..."
|
|
|
- splitName $PKG_NAME
|
|
|
|
|
- downloadProduct http://gnu.mirror.constant.com/ncurses/ncurses-6.0.tar.gz http://gnu.mirror.constant.com/ncurses/ncurses-6.0.tar.gz.sig $RAW_NAME $VERSION
|
|
|
|
|
|
|
+ #splitName $PKG_NAME
|
|
|
|
|
+ downloadProduct https://git.elucubratus.com/elucubratus/elucubratus/-/raw/master/data/ncurses/ncurses_6.1+20181013.orig.tar.gz - ncurses 6.1-20181013
|
|
|
patchNcurses $PKG_NAME
|
|
patchNcurses $PKG_NAME
|
|
|
|
|
+ export HOST="arm"
|
|
|
buildProduct $PKG_NAME
|
|
buildProduct $PKG_NAME
|
|
|
|
|
+ export HOST="aarch64"
|
|
|
fi
|
|
fi
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1036,20 +1039,20 @@ buildDpkg() {
|
|
|
export CPP=""
|
|
export CPP=""
|
|
|
export CXXCPP=""
|
|
export CXXCPP=""
|
|
|
export LZMA_LIBS="$SKEL_PREFIX/$ROOT_PREFIX/lib/liblzma.dylib"
|
|
export LZMA_LIBS="$SKEL_PREFIX/$ROOT_PREFIX/lib/liblzma.dylib"
|
|
|
- export CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
|
|
|
|
|
- export CXX=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
|
|
|
|
|
- export CFLAGS="-isysroot $SDK_PATH -I$SDK_PATH/usr/include -I$SKEL_PREFIX/$ROOT_PREFIX/include/ -arch $ARCH"
|
|
|
|
|
|
|
+ export CC=$(xcrun --sdk $PLATFORM_LOWER --find clang)
|
|
|
|
|
+ export CXX=$(xcrun --sdk $PLATFORM_LOWER --find clang++)
|
|
|
|
|
+ export CFLAGS="-isysroot $SDK_PATH -I$SDK_PATH/usr/include -I$SKEL_PREFIX/$ROOT_PREFIX/include/ -arch $ARCH"
|
|
|
export CXXFLAGS=$CFLAGS
|
|
export CXXFLAGS=$CFLAGS
|
|
|
export LDFLAGS="-isysroot $SDK_PATH -L$SKEL_PREFIX/$ROOT_PREFIX/lib/ -arch $ARCH"
|
|
export LDFLAGS="-isysroot $SDK_PATH -L$SKEL_PREFIX/$ROOT_PREFIX/lib/ -arch $ARCH"
|
|
|
export CPPFLAGS="-isysroot $SDK_PATH -I$SKEL_PREFIX/$ROOT_PREFIX/include/ -arch $ARCH"
|
|
export CPPFLAGS="-isysroot $SDK_PATH -I$SKEL_PREFIX/$ROOT_PREFIX/include/ -arch $ARCH"
|
|
|
export CXXFLAGS=$CFLAGS
|
|
export CXXFLAGS=$CFLAGS
|
|
|
export LDFLAGS="-isysroot $SDK_PATH -L$SKEL_PREFIX/$ROOT_PREFIX/lib/ -arch $ARCH"
|
|
export LDFLAGS="-isysroot $SDK_PATH -L$SKEL_PREFIX/$ROOT_PREFIX/lib/ -arch $ARCH"
|
|
|
if [[ $LOG_VERBOSE == "verbose"* ]]; then
|
|
if [[ $LOG_VERBOSE == "verbose"* ]]; then
|
|
|
- ./configure --prefix="/$ROOT_PREFIX" --disable-start-stop-daemon --host=aarch64-apple-darwin --disable-dependency-tracking PERL_LIBDIR='$(prefix)/lib/' --disable-dselect --localstatedir="/var/" --sysconfdir="/etc" | tee "${LOG_FILE}"
|
|
|
|
|
|
|
+ ./configure --prefix="/$ROOT_PREFIX" --disable-start-stop-daemon --host=aarch64-apple-darwin --disable-dependency-tracking PERL_LIBDIR='$(prefix)/lib/' --disable-dselect --localstatedir="/var/" --sysconfdir="/fs/jb/etc" | tee "${LOG_FILE}"
|
|
|
EC=$(grep "configure: error:" -i "${LOG_FILE}" -c)
|
|
EC=$(grep "configure: error:" -i "${LOG_FILE}" -c)
|
|
|
checkStatus $PKG_NAME $EC "false"
|
|
checkStatus $PKG_NAME $EC "false"
|
|
|
else
|
|
else
|
|
|
- (./configure --prefix="/$ROOT_PREFIX" --disable-start-stop-daemon --host=aarch64-apple-darwin --disable-dependency-tracking PERL_LIBDIR='$(prefix)/lib/' --disable-dselect --localstatedir="/var/" --sysconfdir="/etc" > "${LOG_FILE}" 2>&1)
|
|
|
|
|
|
|
+ (./configure --prefix="/$ROOT_PREFIX" --disable-start-stop-daemon --host=aarch64-apple-darwin --disable-dependency-tracking PERL_LIBDIR='$(prefix)/lib/' --disable-dselect --localstatedir="/var/" --sysconfdir="/fs/jb/etc" > "${LOG_FILE}" 2>&1)
|
|
|
if [[ $OPEN_LOG == "true" ]]; then
|
|
if [[ $OPEN_LOG == "true" ]]; then
|
|
|
open "${LOG_FILE}"
|
|
open "${LOG_FILE}"
|
|
|
fi
|
|
fi
|
|
@@ -1433,6 +1436,38 @@ if [[ "$VERIFY" == "true" ]]; then
|
|
|
gpg --recv-key 69184620 7C0135FB088AAF6C66C650B9BB5869F064EA74AB 702353E0F7E48EDB 7FD9FCCB000BEEEE A15B725964A95EE5 D8692123C4065DEA5E0F3AB5249B39D24F25E3B6 031EC2536E580D8EA286A9F22071B08A33BD3F06 9D5EAAF69013B842
|
|
gpg --recv-key 69184620 7C0135FB088AAF6C66C650B9BB5869F064EA74AB 702353E0F7E48EDB 7FD9FCCB000BEEEE A15B725964A95EE5 D8692123C4065DEA5E0F3AB5249B39D24F25E3B6 031EC2536E580D8EA286A9F22071B08A33BD3F06 9D5EAAF69013B842
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
|
|
+cleanBootstrap() {
|
|
|
|
|
+ # Get rid of the docs
|
|
|
|
|
+ rm -rf "$SKEL_PREFIX/$ROOT_PREFIX/docs"
|
|
|
|
|
+ rm -rf "$SKEL_PREFIX/$ROOT_PREFIX/share/doc"
|
|
|
|
|
+ rm -rf "$SKEL_PREFIX/$ROOT_PREFIX/share/info"
|
|
|
|
|
+ rm -rf "$SKEL_PREFIX/$ROOT_PREFIX/share/man"
|
|
|
|
|
+ rm -rf "$SKEL_PREFIX/$ROOT_PREFIX/man"
|
|
|
|
|
+ rm -rf "$SKEL_PREFIX/$ROOT_PREFIX/share/gnupg" #TODO: See if the keys in this folder are needed
|
|
|
|
|
+ rm -rf "$SKEL_PREFIX/$ROOT_PREFIX/share/readline"
|
|
|
|
|
+
|
|
|
|
|
+ # Get rid of dev stuff
|
|
|
|
|
+ rm -rf "$SKEL_PREFIX/$ROOT_PREFIX/include"
|
|
|
|
|
+ rm -rf "$SKEL_PREFIX/$ROOT_PREFIX/share/aclocal"
|
|
|
|
|
+ rm -rf "$SKEL_PREFIX/$ROOT_PREFIX/share/pkgconfig"
|
|
|
|
|
+ rm -rf "$SKEL_PREFIX/$ROOT_PREFIX/share/common-lisp"
|
|
|
|
|
+
|
|
|
|
|
+ # remove all the static and libtool libraries from the bootstrap, they take up a LOT of space
|
|
|
|
|
+ cd "$SKEL_PREFIX/$ROOT_PREFIX/lib"
|
|
|
|
|
+ rm *.a
|
|
|
|
|
+ rm *.la
|
|
|
|
|
+ rmdir "$SKEL_PREFIX/$ROOT_PREFIX/var"
|
|
|
|
|
+
|
|
|
|
|
+ #Get rid of non-skel packages which were needed to compile
|
|
|
|
|
+ rm -rf "$SKEL_PREFIX/$ROOT_PREFIX/bin/gpg-error-config"
|
|
|
|
|
+ rm -rf "$SKEL_PREFIX/$ROOT_PREFIX/bin/libgcrypt-config"
|
|
|
|
|
+ rm -rf "$SKEL_PREFIX/$ROOT_PREFIX/lib/pkgconfig"
|
|
|
|
|
+ rm -rf "$SKEL_PREFIX/$ROOT_PREFIX/bin/curl-config"
|
|
|
|
|
+ rm -rf "$SKEL_PREFIX/$ROOT_PREFIX/bin/ncurses6-config"
|
|
|
|
|
+ rm -rf "$SKEL_PREFIX/$ROOT_PREFIX/bin/npth-config"
|
|
|
|
|
+ rm -rf "$SKEL_PREFIX/$ROOT_PREFIX/bin/ntbtls-config"
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
mkdirIfNecessary $ROOT_LOG_FOLDER
|
|
mkdirIfNecessary $ROOT_LOG_FOLDER
|
|
|
mkdirIfNecessary $ALREADY_BUILT
|
|
mkdirIfNecessary $ALREADY_BUILT
|
|
|
# Ensure our SDK has all the required "extras" installed/setup
|
|
# Ensure our SDK has all the required "extras" installed/setup
|
|
@@ -1443,5 +1478,9 @@ buildBasicUtils
|
|
|
buildDPKGAndDependencies
|
|
buildDPKGAndDependencies
|
|
|
buildAPTAndDependencies
|
|
buildAPTAndDependencies
|
|
|
|
|
|
|
|
|
|
+# comment the below in to clean up aftewards to slim down the bootstrap
|
|
|
|
|
+
|
|
|
|
|
+#cleanBootstrap
|
|
|
|
|
+
|
|
|
echo -e "\nDone!\n"
|
|
echo -e "\nDone!\n"
|
|
|
sayIfVerbal "Finished!"
|
|
sayIfVerbal "Finished!"
|