From ca7cb847436277c2edfbf4c03916bce265809446 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig-=C3=98rjan=20Smelror?= Date: Sat, 2 Dec 2017 22:32:24 +0100 Subject: [PATCH] Version 1.6.5 - Script will check for necessary apps and libs and suggest where to find them if missing. Updated one patch. --- build.leia | 57 +++++++++++++++++++++--- include/build.leia/language/en_US.inc | 7 ++- include/build.leia/language/no_NB.inc | 5 ++- include/patches/add-kekePower-info.patch | 49 +++++++++++--------- include/patches/diff | 43 ------------------ 5 files changed, 87 insertions(+), 74 deletions(-) delete mode 100644 include/patches/diff diff --git a/build.leia b/build.leia index 55d5b34..cce154f 100755 --- a/build.leia +++ b/build.leia @@ -1,6 +1,6 @@ #!/bin/env zsh -SCRIPT_VERSION="1.6.4" +SCRIPT_VERSION="1.6.5" if [[ ! ${1} == "fix" ]]; then # A simple check to see if you're already running this script. @@ -84,12 +84,6 @@ include themes/${THEME:l} # Usage: loggy include common/loggy -if [[ ! -x $( which git ) ]]; then - MSG="${L_130}" - echo "${TIME}[$(date +%T)]${END} ${W}${MSG}${END}" - clean_exit ${0:t} -fi - # We try to find the system language and include it in the script. # If we don't have the translation for the supplied language, the # script will ask if the user wants to use en_US for now. @@ -118,6 +112,55 @@ else fi fi +# This is the pre-check section where we look for necessary binaries +# First off is Git +typeset -a NOT_FOUND +if [[ ! -x $( which git ) ]]; then + git_MSG="${L_130}" + #echo "${TIME}[$(date +%T)]${END} ${W}${MSG}${END}" + git_URL="https://git-scm.org/" + NOT_FOUND=( git ) +fi + +# In Mageia 6, these two packages are not currently present +# RapidJSON and fmt +# Let's look for them and print out useful information +# Looking for RapidJSON +if [[ ! $( pkg-config --cflags RapidJSON ) ]]; then + rapidjson_MSG="${L_131}" + #echo "${TIME}[$(date +%T)]${END} ${W}${MSG}${END}" + rapidjson_URL="https://github.com/Tencent/rapidjson/releases" + echo "${TIME}[$(date +%T)]${END} ${W}${MSG}${END}" + NOT_FOUND+=( rapidjson ) +fi + +# Now we look for libfmt in /usr/lib and /usr/local/lib +if [[ ! -a /usr/lib/libfmt.a && ! -a /usr/lib64/libfmt.a && ! -a /usr/local/lib/libfmt.a && ! -a /usr/local/lib64/libfmt.a ]]; then + libfmt_MSG="${L_132}" + #echo "${TIME}[$(date +%T)]${END} ${W}${MSG}${END}" + libfmt_URL="https://github.com/fmtlib/fmt/releases" + #echo "${TIME}[$(date +%T)]${END} ${W}${MSG}${END}" + NOT_FOUND+=( libfmt ) +fi + +for not_found in ${NOT_FOUND} +do + MSG="" + # MSG="\$${not_found}_MSG" + echo "${TIME}[$(date +%T)]${END} ${WARNING}$( eval echo \$${not_found}_MSG:u )${END}" + MSG="${L_133}${not_found}" + echo "${TIME}[$(date +%T)]${END} ${YELLOW}${MSG}${END}" + URL="$( eval echo \$${not_found}_URL )" + # URL="\$${not_found}_URL" + echo "${TIME}[$(date +%T)]${END} ${W}${ARROW} ${URL}${END}" +done +if [[ ${NOT_FOUND[-1]} ]]; then + clean_exit ${0:t} +fi + +#help=Help_${i} +# eval echo \$${help} + # Function: SHOWHELP # Usage: ShowHelp ${0:t} function ShowHelp () { diff --git a/include/build.leia/language/en_US.inc b/include/build.leia/language/en_US.inc index 9226106..0bd12a9 100755 --- a/include/build.leia/language/en_US.inc +++ b/include/build.leia/language/en_US.inc @@ -79,4 +79,9 @@ L_118="Clearing the ccache cache will significantly increase build times." L_119="It will also make sure you build Kodi with the latest libraries." L_120="All set. You can launch Kodi with the command" -L_121="You can view the log output in this file" \ No newline at end of file +L_121="You can view the log output in this file" + +L_130="git cound not be found." +L_131="RapidJSON could not be found." +L_132="libfmt could not be found." +L_133="Please install " \ No newline at end of file diff --git a/include/build.leia/language/no_NB.inc b/include/build.leia/language/no_NB.inc index 6de0363..aef5f89 100755 --- a/include/build.leia/language/no_NB.inc +++ b/include/build.leia/language/no_NB.inc @@ -81,4 +81,7 @@ L_119="Det vil også gjøre sitt til at Kodi blir bygget med de siste biblioteke L_120="Det gikk veldig bra. Du kan starte Kodi med denne kommandoen" L_121="Du kan se hele loggen i denne filen" -L_130="Du må ha git installert for å bruke dette skriptet." \ No newline at end of file +L_130="git ble ikke funnet." +L_131="RapidJSON ble ikke funnet." +L_132="libfmt ble ikke funnet." +L_133="Vennligst installer " \ No newline at end of file diff --git a/include/patches/add-kekePower-info.patch b/include/patches/add-kekePower-info.patch index 1d0195d..e95d1c8 100644 --- a/include/patches/add-kekePower-info.patch +++ b/include/patches/add-kekePower-info.patch @@ -1,12 +1,24 @@ -Index: addons/skin.estuary/xml/SettingsSystemInfo.xml ---- addons/skin.estuary/xml/SettingsSystemInfo.xml -+++ addons/skin.estuary/xml/SettingsSystemInfo.xml (unsaved) -@@ -234,16 +234,26 @@ - font12 +--- SettingsSystemInfo.xml.orig 2017-11-15 13:59:29.108796515 +0100 ++++ addons/skin.estuary/xml/SettingsSystemInfo.xml 2017-11-15 13:57:25.757407395 +0100 +@@ -219,6 +219,39 @@ black -- -- Vendor text url + ++ ++ Vendor text ++ 10 ++ 170 ++ 1210 ++ 800 ++ horizontal ++ ++ Vendor text label ++ auto ++ 25 ++ ++ font25_title ++ black ++ + + + Vendor url @@ -15,23 +27,16 @@ Index: addons/skin.estuary/xml/SettingsSystemInfo.xml + 1210 + 800 + horizontal -+ -+ Vendor url text - auto - 25 - - font12 -- black -- -- -- -+ button_focus ++ ++ Vendor text url ++ auto ++ 25 ++ ++ font12 ++ yellow + black + + -+ -+ + - 0 - diff --git a/include/patches/diff b/include/patches/diff deleted file mode 100644 index ccd9784..0000000 --- a/include/patches/diff +++ /dev/null @@ -1,43 +0,0 @@ ---- addons/skin.estuary/xml/SettingsSystemInfo.xml.orig 2017-11-09 17:54:38.273448966 +0100 -+++ addons/skin.estuary/xml/SettingsSystemInfo.xml 2017-11-09 17:50:04.762429867 +0100 -@@ -219,6 +219,40 @@ - black - - -+ -+ Vendor text -+ 10 -+ 170 -+ 1210 -+ 800 -+ horizontal -+ -+ Vendor text label -+ auto -+ 25 -+ -+ font25_title -+ yellow -+ black -+ -+ -+ -+ Vendor url -+ 10 -+ 200 -+ 1210 -+ 800 -+ horizontal -+ -+ Vendor url text -+ auto -+ 25 -+ -+ font12 -+ white -+ black -+ -+ - - -