update build system by LAbyOne

Signed-off-by: SergeySlice <sergey.slice@gmail.com>
This commit is contained in:
SergeySlice 2022-10-17 22:32:15 +03:00
parent 42172b4fcc
commit f66297ebee
4 changed files with 31 additions and 16 deletions

View File

@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -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

View File

@ -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
}

33
buildme
View File

@ -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'