From 959b63ba8fd78f4b7c6c1cdc0b42ba89d92ae27e Mon Sep 17 00:00:00 2001 From: nosuz Date: Tue, 21 Oct 2014 11:52:30 -0400 Subject: [PATCH] Fix kicad-install.sh to only install wxPython when building with scripting enabled. --- scripts/kicad-install.sh | 43 ++++++++++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/scripts/kicad-install.sh b/scripts/kicad-install.sh index f5eb9c4f2d..946952cfcd 100755 --- a/scripts/kicad-install.sh +++ b/scripts/kicad-install.sh @@ -103,13 +103,27 @@ install_prerequisites() libglew-dev libssl-dev libwxgtk3.0-dev - python-wxgtk3.0 " - for p in ${prerequisite_list} - do - sudo apt-get install $p || exit 1 - done + for p in ${prerequisite_list} + do + sudo apt-get install $p || exit 1 + done + + # Only install the scripting prerequisites if required. + if [ "$(expr match "$OPTS" '.*\(-DKICAD_SCRIPTING=ON\)')" == "-DKICAD_SCRIPTING=ON" ]; then + #echo "KICAD_SCRIPTING=ON" + scripting_prerequisites=" + python-dev + python-wxgtk3.0-dev + swig + " + + for sp in ${scripting_prerequisites} + do + sudo apt-get install $sp || exit 1 + done + fi # assume all yum systems have same prerequisites elif [ "$(expr match "$PM" '.*\(yum\)')" == "yum" ]; then @@ -131,13 +145,26 @@ install_prerequisites() grep openssl-devel wxGTK-devel - wxPython " - for p in ${prerequisite_list} - do + for p in ${prerequisite_list} + do sudo yum install $p || exit 1 done + + # Only install the scripting prerequisites if required. + if [ "$(expr match "$OPTS" '.*\(-DKICAD_SCRIPTING=ON\)')" == "-DKICAD_SCRIPTING=ON" ]; then + #echo "KICAD_SCRIPTING=ON" + scripting_prerequisites=" + swig + wxPython + " + + for sp in ${scripting_prerequisites} + do + sudo yum install $sp || exit 1 + done + fi else echo echo "Incompatible System. Neither 'yum' nor 'apt-get' found. Not possible to continue."