From af7ab797c2b5548a99d9bcb4c7f74556aa4ac67e Mon Sep 17 00:00:00 2001 From: Francesco Lannutti Date: Sat, 16 Sep 2017 15:53:52 +0200 Subject: [PATCH] build-for-mac-os.sh, script to build ngspice under MacOS --- Makefile.am | 1 + build-for-mac-os.sh | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100755 build-for-mac-os.sh diff --git a/Makefile.am b/Makefile.am index 672087cf7..7ea530ed5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,6 +9,7 @@ EXTRA_DIST = FAQ autogen.sh Stuarts_Poly_Notes \ README.adms contrib \ doc examples m4 visualc @NOTXGRAPH@ \ xgraph/aclocal.m4 \ + build-for-mac-os.sh \ cross-compile.sh cross-compile-shared.sh \ compile_min.sh .gitignore diff --git a/build-for-mac-os.sh b/build-for-mac-os.sh new file mode 100755 index 000000000..ec17fc8d1 --- /dev/null +++ b/build-for-mac-os.sh @@ -0,0 +1,33 @@ +#!/bin/sh +# MacOS build script for NGSPICE + +# Considering a MacOS 10.12 system, there are some prerequisites to be satisfied: +# 1) Install an X11 system of your choice. XQuartz from SourceForge is fine: https://www.xquartz.org +# 2) Install automake, autoconf, libtool and an updated version of bison by using the method you prefer. +# From sources, from 'brew' or from 'MacPorts' are the known ones and I prefer using MacPorts, +# available at this address: https://www.macports.org . +# You can install from a tarball or you can use the installer, which will also configure the PATH. +# +# Said that, the script is quite linear and simple. + + +# Build + +./autogen.sh + +./configure \ + --enable-xspice \ + --enable-cider \ + --enable-pss \ + --disable-debug \ + --prefix=/Applications/ngspice + +make +make DESTDIR="$(pwd)/root-tree" install + +# Package +pkgbuild \ + --root "$(pwd)/root-tree" \ + --identifier ngspice.pkg \ + --install-location / \ + ngspice.pkg