From f66297ebeeefa6d36fd961c5470089871a5b575c Mon Sep 17 00:00:00 2001 From: SergeySlice Date: Mon, 17 Oct 2022 22:32:15 +0300 Subject: [PATCH] update build system by LAbyOne Signed-off-by: SergeySlice --- CloverPackage/package/po/clover.pot | 4 ++-- build_gcc12.sh | 6 +++--- buildgettext.sh | 4 ++-- buildme | 33 +++++++++++++++++++++-------- 4 files changed, 31 insertions(+), 16 deletions(-) diff --git a/CloverPackage/package/po/clover.pot b/CloverPackage/package/po/clover.pot index a7637ba44..4a50e3158 100644 --- a/CloverPackage/package/po/clover.pot +++ b/CloverPackage/package/po/clover.pot @@ -6,8 +6,8 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Clover r5146\n" -"POT-Creation-Date: 2022-06-23 20:44+0300\n" +"Project-Id-Version: Clover r5149\n" +"POT-Creation-Date: 2022-10-17 22:07+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/build_gcc12.sh b/build_gcc12.sh index dc43d9f30..7b5d62853 100755 --- a/build_gcc12.sh +++ b/build_gcc12.sh @@ -27,8 +27,8 @@ set -u # exit with error if unbound variables # GCC toolchain source version # here we can change source versions of tools # -export BINUTILS_VERSION=${BINUTILS_VERSION:-binutils-2.38} -export GCC_VERSION=${GCC_VERSION:-12.1.0} +export BINUTILS_VERSION=${BINUTILS_VERSION:-binutils-2.39} +export GCC_VERSION=${GCC_VERSION:-12.2.0} # Version of libraries are from ./contrib/download_prerequisites in gcc source directory export GMP_VERSION=${GMP_VERSION:-gmp-6.2.1} @@ -360,7 +360,7 @@ CompileBinutils () { rm -rf "$BUILD_BINUTILS_DIR" mkdir -p "$BUILD_BINUTILS_DIR" && cd "$BUILD_BINUTILS_DIR" echo "- ${BINUTILS_VERSION} configure..." - local cmd="LDFLAGS=\"-dead_strip\" ${BINUTILS_DIR}/configure --host=${BUILDARCH}-apple-darwin${BUILDREV} --enable-plugins --build=${BUILDARCH}-apple-darwin${BUILDREV} --target=$TARGET --prefix=$PREFIX/cross --with-included-gettext --disable-werror --with-gmp=$PREFIX --with-mpfr=$PREFIX --with-mpc=$PREFIX --with-isl=$PREFIX --disable-isl-version-check --disable-nls --enable-deterministic-archives --with-mmap --with-system-zlib" + local cmd="LDFLAGS=\"-dead_strip\" ${BINUTILS_DIR}/configure --host=${BUILDARCH}-apple-darwin${BUILDREV} --enable-plugins --build=${BUILDARCH}-apple-darwin${BUILDREV} --target=$TARGET --prefix=$PREFIX/cross --with-included-gettext --disable-werror --with-gmp=$PREFIX --with-mpfr=$PREFIX --with-mpc=$PREFIX --with-isl=$PREFIX --disable-isl-version-check --disable-nls --enable-deterministic-archives --with-mmap --with-system-zlib --enable-gprofng=NO" local logfile="$DIR_LOGS/binutils.$ARCH.configure.log.txt" echo "$cmd" > "$logfile" eval "$cmd" >> "$logfile" 2>&1 diff --git a/buildgettext.sh b/buildgettext.sh index 4a7e91399..ed279a3d5 100755 --- a/buildgettext.sh +++ b/buildgettext.sh @@ -10,7 +10,7 @@ set -u # Gettext source version # here we can change source versions of tools # -export GETTEXT_VERSION=${GETTEXT_VERSION:-gettext-0.20.1} +export GETTEXT_VERSION=${GETTEXT_VERSION:-gettext-0.21.1} # Change PREFIX if you want gettext installed on different place # @@ -95,7 +95,7 @@ fnDownloadGettext () local tarball="${GETTEXT_VERSION}.tar.xz" if [[ ! -f "$tarball" ]]; then echo "Status: $tarball not found." - curl -f -o download.tmp --remote-name https://ftp.gnu.org/pub/gnu/gettext/$tarball || exit 1 + curl -k -f -o download.tmp --remote-name https://ftp.gnu.org/pub/gnu/gettext/$tarball || exit 1 mv download.tmp $tarball fi } diff --git a/buildme b/buildme index a6040df11..f3b7779b2 100755 --- a/buildme +++ b/buildme @@ -26,6 +26,8 @@ declare -r SYSNAME="$(uname)" MYTOOLCHAIN=${1:-GCC53} revision=$(git describe --tags $(git rev-list --tags --max-count=1)) lsha1="not a git repo" +pyversion=$(echo $COL_CYAN"Installed Python version: "$COL_WHITE$(/usr/local/bin/python3 --version)) +pynone=$(echo -e "$COL_RED Python3 seems missing on this machine, it is required to build Clover ") export DIR_OUT=${DIR_OUT:-"$CLOVERROOT"/toolchain/tools/output} export DIR_SCT=${DIR_SCT:-${CLOVERROOT}/toolchain/tools/Scripts} if [[ ! -d ${DIR_SCT} ]] || [[ ! -d ${DIR_OUT} ]]; then @@ -240,7 +242,12 @@ buildClover() { ./ebuild.sh -fr -D NO_GRUB_DRIVERS_EMBEDDED -D LESS_DEBUG -t $MYTOOLCHAIN fi fi - # Run a post build script if exist (${DIR_TOOLS}/Scripts/postbuild.sh) + # Run a post build script if exist (${DIR_TOOLS}/CloverScripts/postbuild.sh) + if [[ -x "${DIR_TOOLS}"/CloverScripts/postbuild.sh ]]; then + echo "Running Clover postbuild script" + "${DIR_TOOLS}"/CloverScripts/postbuild.sh "${CLOVERROOT}" $MYTOOLCHAIN + fi + # Run a custom post build script if exist (${DIR_TOOLS}/Scripts/postbuild.sh) if [[ -x "${DIR_TOOLS}"/Scripts/postbuild.sh ]]; then echo "Running postbuild script" "${DIR_TOOLS}"/Scripts/postbuild.sh "${CLOVERROOT}" $MYTOOLCHAIN @@ -452,13 +459,13 @@ USBMap() { open $HOME/Desktop/ClovUtils } -QtiASL() { +Xiasl() { if [[ ! -d $HOME/Desktop/ClovUtils ]]; then mkdir -p $HOME/Desktop/ClovUtils fi - cd $HOME/Desktop/ClovUtils && curl -sLq https://github.com/ic005k/QtiASL/releases/download/1.1.63/Xiasl_Mac.dmg > Xiasl_Mac.dmg + cd $HOME/Desktop/ClovUtils && curl -sLq https://github.com/ic005k/Xiasl/releases/download/1.1.66/Xiasl_Mac.dmg > Xiasl_Mac.dmg hdiutil attach -quiet -noverify -nobrowse Xiasl_Mac.dmg && cp -Rf /Volumes/bin\:release\:Xiasl/Xiasl.app $HOME/Desktop/ClovUtils - hdiutil detach -force /Volumes/bin\:release\:QtiASL + hdiutil detach -force /Volumes/bin\:release\:Xiasl rm -r $HOME/Desktop/ClovUtils/Xiasl_Mac.dmg && open $HOME/Desktop/ClovUtils } @@ -553,7 +560,7 @@ options=( 'Get CloverConfigPlistValidator ' 'Get NativeDisplayBrightness ' 'Get SSDTTime' 'Get USBMap' - 'Get QtiASL' + 'Get Xiasl' 'Get CsrDecode' 'Get gibMacOS' 'Get mountR/W' @@ -602,8 +609,8 @@ select opt in "${options[@]}" USBMap break ;; - "Get QtiASL") - QtiASL + "Get Xiasl") + Xiasl break ;; "Get CsrDecode") @@ -638,10 +645,18 @@ Utilities menu() { echo echo -e $COL_GREEN" ------------------------------------------------------------------------------" -echo -e " 🍀 Clover r${revision}$COL_WHITE (SHA: $lsha1)" +if [[ ! -x "/usr/local/bin/pip3" ]]; then + echo -e " ${pynone}" +fi +echo -e "$COL_GREEN 🍀 Clover r${revision}$COL_WHITE (SHA: $lsha1)" echo -e "$COL_CYAN TOOLCHAIN: $MYTOOLCHAIN (override example: './buildme XCODE8')" -echo -e $COL_GREEN" ------------------------------------------------------------------------------"$COL_RESET +if [[ -x "/usr/local/bin/pip3" ]]; then + echo -e $COL_GREEN" ------------------- ${pyversion}$COL_GREEN ------------------ "$COL_RESET echo -e "\n\n\n\n\n\n\n\n" +else +echo -e $COL_GREEN" ------------------------------------------------------------------------------"$COL_RESET +echo -e "\n\n\n\n\n\n\n" +fi PS3=' Please enter your choice: ' options=( 'build Clover'