diff --git a/scripts/get_libngspice_so.sh b/scripts/get_libngspice_so.sh index b1d9ebb..62969a7 100755 --- a/scripts/get_libngspice_so.sh +++ b/scripts/get_libngspice_so.sh @@ -75,7 +75,8 @@ echo "(c) CERN 2016" echo "author: Maciej Suminski " echo "contributors: madworm" echo -echo "PREREQUISITES: autoconf automake bison flex gcc git libtool make" +echo "PREREQUISITES: autoconf automake bison=2.7 flex gcc git libtool make" +echo "for bison 2.7 and debian based os see: https://askubuntu.com/questions/444982/install-bison-2-7-in-ubuntu-14-04#answer-461961" echo echo "*** Downloading ngspice source code.. ***" @@ -95,6 +96,32 @@ fi echo "*** Building libngspice shared library.. ***" git checkout ${SNAPSHOT_REV} + +# patch for flex -o problem, see https://github.com/ellson/MOTHBALLED-graphviz/issues/1184#issuecomment-267042766 +echo "applying patch for flex -o problem" +git apply <<'EOF' +diff --git a/src/xspice/cmpp/Makefile.am b/src/xspice/cmpp/Makefile.am +index e38bfe1..4b1e35b 100644 +--- a/src/xspice/cmpp/Makefile.am ++++ b/src/xspice/cmpp/Makefile.am +@@ -17,13 +17,13 @@ cmpp_SOURCES = main.c cmpp.h \ + mod_lex.l mod_yacc.y mod_yacc_y.h + + mod_lex.c : mod_lex.l +- $(am__skiplex) $(LEXCOMPILE) -o $@ $< ++ $(am__skiplex) $(LEXCOMPILE) -o$@ $< + + mod_yacc.c : mod_yacc.y + $(am__skipyacc) $(YACCCOMPILE) -o $@ $< + + ifs_lex.c : ifs_lex.l +- $(am__skiplex) $(LEXCOMPILE) -o $@ $< ++ $(am__skiplex) $(LEXCOMPILE) -o$@ $< + + ifs_yacc.c : ifs_yacc.y + $(am__skipyacc) $(YACCCOMPILE) -o $@ $< +EOF + ./autogen.sh ./configure --with-ngshared --enable-xspice --enable-cider ${CFG_OPTIONS} make