2017-09-16 15:53:52 +02:00
|
|
|
#!/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 \
|
2020-05-03 11:46:03 +02:00
|
|
|
--with-x \
|
2017-09-16 15:53:52 +02:00
|
|
|
--enable-xspice \
|
|
|
|
|
--enable-cider \
|
|
|
|
|
--enable-pss \
|
2020-05-03 11:46:03 +02:00
|
|
|
--with-readline=yes \
|
|
|
|
|
--enable-openmp \
|
2017-09-16 15:53:52 +02:00
|
|
|
--disable-debug \
|
2020-05-03 18:06:05 +02:00
|
|
|
--prefix=/Applications/ngspice \
|
|
|
|
|
CFLAGS="-O2 -I/opt/X11/include/freetype2" \
|
|
|
|
|
LDFLAGS="-lomp"
|
|
|
|
|
# The last two lines may depend on the lib installations
|
|
|
|
|
# please check if there are any problems
|
2017-09-16 15:53:52 +02:00
|
|
|
|
2020-05-05 20:55:22 +02:00
|
|
|
make clean
|
2020-05-03 11:46:03 +02:00
|
|
|
make -j4
|
2017-09-16 15:53:52 +02:00
|
|
|
make DESTDIR="$(pwd)/root-tree" install
|
|
|
|
|
|
|
|
|
|
# Package
|
|
|
|
|
pkgbuild \
|
|
|
|
|
--root "$(pwd)/root-tree" \
|
|
|
|
|
--identifier ngspice.pkg \
|
|
|
|
|
--install-location / \
|
|
|
|
|
ngspice.pkg
|