Skip to content

Commit

Permalink
ngspice: update to version 43 (#25041)
Browse files Browse the repository at this point in the history
  • Loading branch information
bpdegnan authored Aug 30, 2024
1 parent 7d9c168 commit bd31f2c
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 65 deletions.
90 changes: 42 additions & 48 deletions science/ngspice/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
PortSystem 1.0

name ngspice
version 36
version 43
revision 0
license BSD
categories science cad
maintainers nomaintainer
maintainers {gmail.com:degnan.68k @bpdegnan} \
{mark @markemer} \
openmaintainer

description Circuit simulator based on Spice 3f5, XSpice and others
long_description \
Ngspice is a mixed-level/mixed-signal circuit simulator. Its \
Expand All @@ -18,38 +21,35 @@ long_description \
homepage http://ngspice.sourceforge.net/
master_sites sourceforge:project/ngspice/ng-spice-rework/${version}

checksums rmd160 094d76e789b65d10e7d80f2f2f90397ed0ec13c9 \
sha256 4f818287efba245341046635b757ae81f879549b326a4316b5f6e697aa517f8c \
size 8450071
checksums rmd160 577a26e18e70fdf1fceb87ae3c6a783c3cf00d8e \
sha256 14dd6a6f08531f2051c13ae63790a45708bd43f3e77886a6a84898c297b13699 \
size 10279606

set docdir ${prefix}/share/doc/${name}

if {${name} eq ${subport}} {

# freetype2 headers are not found by default
# we could fix the header path in configure.ac, but then need autorecconf, etc
configure.cppflags-prepend -I${prefix}/include/freetype2

# TASK_BASIC_INFO_COUNT and friends were renamed in 10.8
patchfiles-append patch-ngspice-older-MACH-defines.diff

depends_lib-append port:ncurses \
port:libedit \
depends_lib-append port:readline \
port:libtool \
port:xorg-libX11 \
port:xorg-libXaw \
port:xorg-libXext \
port:xorg-libXmu \
port:xorg-libXt \
port:fftw-3
port:xorg-libXext

configure.args --enable-cider \
--enable-xspice \
--enable-pss \
--with-editline \
--with-x \
--disable-debug \
--disable-silent-rules
--enable-relpath \
--disable-openmp \
--with-readline=${prefix} \
--with-x

# Set CFLAGS and LDFLAGS
configure.ldflags-append -L${prefix}/lib

build.args VERBOSE=1
post-destroot {
xinstall -d ${destroot}${docdir}
xinstall -m 644 -W ${worksrcpath} \
Expand All @@ -74,21 +74,8 @@ if {${name} eq ${subport}} {
depends_run-append port:ngspice-lib
}

variant openmp description {Add OpenMP support variant} {
# ngspice does not specify what openmp version they require
# version 2.5 is the least strict, and works
compiler.openmp_version 2.5
configure.args-append --enable-openmp

# see https://trac.macports.org/ticket/64511
# not too much sure
configure.cflags-append "-mcmodel=large"
configure.cxxflags-append "-mcmodel=large"
configure.ldflags-append "-mcmodel=large"
}

default_variants +manual +lib

livecheck.regex ${name}-(\[0-9.\]+)${extract.suffix}

# running the tests from MacPorts errors early, probably due to a permissions
Expand All @@ -103,22 +90,21 @@ if {${name} eq ${subport}} {

subport ngspice-docs {
supported_archs noarch
platforms any
description PDF manual for ngspice
long_description {*}${description}

distname ${name}-${version}-manual.pdf
extract.suffix
extract.only

checksums rmd160 8c15aab0859fbf6540e3e2aa06f486e46ed13397 \
sha256 f9f308ddcd11ea9708cdcf74894c28befc4d1dd8f00edbcb76a5706daf36cdbc \
size 2397103
checksums rmd160 af261765d31bb74434eb66f1e13b67c116223b04 \
sha256 ae1d8db376df224e0d82e46d34a9d7ada068a69d685144f43b5efe5a2d06f0e8 \
size 2559027

use_configure no

build {}

destroot {
xinstall -d ${destroot}${docdir}
xinstall -m 644 ${distpath}/${distname} ${destroot}${docdir}
Expand All @@ -130,22 +116,30 @@ subport ngspice-lib {
long_description {*}${description}

# freetype2 headers are not found by default
# we could fix the header path in configure.ac, but then need autorecconf, etc
configure.cppflags-prepend -I${prefix}/include/freetype2

# TASK_BASIC_INFO_COUNT and friends were renamed in 10.8
patchfiles-append patch-ngspice-older-MACH-defines.diff

depends_lib-append port:libedit \
port:fftw-3
depends_lib-append port:autoconf \
port:automake \
port:bison \
port:flex \
port:gawk \
port:readline \
port:libtool

configure.args --enable-cider \
--enable-xspice \
--enable-pss \
--with-editline \
--disable-debug \
--disable-silent-rules \
--enable-relpath \
--disable-openmp \
--with-readline=${prefix} \
--with-ngshared

# Set CFLAGS and LDFLAGS
configure.cflags-append -m64 -O2 -Wall -I${prefix}/include/freetype2 -I${prefix}/include
configure.ldflags-append -m64 -L${prefix}/lib

# Use the correct prefix
use_configure yes
destroot {
xinstall -d ${destroot}${prefix}/lib
xinstall -m 755 -W ${worksrcpath}/src/.libs \
Expand Down
17 changes: 0 additions & 17 deletions science/ngspice/files/patch-ngspice-older-MACH-defines.diff

This file was deleted.

0 comments on commit bd31f2c

Please sign in to comment.