Update ngspice build tool script to ngspice-30

(cherry picked from commit 6186dd5c51)
This commit is contained in:
Ian McInerney 2019-06-30 16:10:45 +01:00 committed by Wayne Stambaugh
parent 3418d53a6d
commit 09d7d0f1bc
1 changed files with 19 additions and 6 deletions

View File

@ -1,10 +1,16 @@
#!/bin/bash
# author: Maciej Suminski <maciej.suminski@cern.ch>
# contributors: madworm
# contributors: madworm, imcinerney
SNAPSHOT_REV="99a20162d5038a328d335d11da69c9eee0549fdc"
SNAPSHOT_GIT="git://git.code.sf.net/p/ngspice/ngspice"
# Set to 1 to pull the tag given by NGSPICE_GIT_TAG
# Set to 0 to pull the commit with the has given by NGSPICE_GIT_HASH
USE_GIT_TAG=1
NGSPICE_GIT_TAG="ngspice-30-2"
NGSPICE_GIT_HASH="d6f5a32c93a46b6dec8a5097533ddf682cecf2d9"
NGSPICE_GIT="git://git.code.sf.net/p/ngspice/ngspice"
BUILD_DIR="/tmp/libngspice_so"
SRC_DIR="${BUILD_DIR}/ngspice"
@ -73,13 +79,13 @@ cd "${BUILD_DIR}" || exit
echo "libngspice (for KiCad) builder v1.2"
echo "(c) CERN 2016"
echo "author: Maciej Suminski <maciej.suminski@cern.ch>"
echo "contributors: madworm"
echo "contributors: madworm, imcinerney"
echo
echo "PREREQUISITES: autoconf automake bison flex gcc git libtool make"
echo
echo "*** Downloading ngspice source code.. ***"
git clone ${SNAPSHOT_GIT}
git clone ${NGSPICE_GIT}
if [ $? != 0 ]; then
echo "*** An error occurred when downloading the source code ***"
@ -94,7 +100,14 @@ else
fi
echo "*** Building libngspice shared library.. ***"
git checkout ${SNAPSHOT_REV}
if [ $USE_GIT_TAG == 1 ]; then
echo "*** Checking out tag ${NGSPICE_GIT_TAG} ***"
git checkout tags/${NGSPICE_GIT_TAG}
else
echo "*** Checking out git commit ${NGSPICE_GIT_HASH} ***"
git checkout ${NGSPICE_GIT_HASH}
fi
./autogen.sh
./configure --with-ngshared --enable-xspice --enable-cider ${CFG_OPTIONS}
make