Skip to content

Commit

Permalink
ngspice: fix broken linking, finally
Browse files Browse the repository at this point in the history
  • Loading branch information
barracuda156 committed Aug 31, 2024
1 parent 5d6b890 commit ee942d7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions science/ngspice/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ if {${name} eq ${subport}} {
# TASK_BASIC_INFO_COUNT and friends were renamed in 10.8
patchfiles-append patch-ngspice-older-MACH-defines.diff

# https://trac.macports.org/ticket/70175
patchfiles-append patch-fix-linking.diff

depends_lib-append port:readline \
port:libtool \
port:xorg-libX11 \
Expand All @@ -51,6 +54,7 @@ if {${name} eq ${subport}} {
--enable-pss \
--enable-relpath \
--disable-openmp \
--disable-silent-rules \
--with-readline=${prefix} \
--with-x

Expand All @@ -59,6 +63,11 @@ if {${name} eq ${subport}} {
if {${os.platform} eq "darwin" && ${os.major} <= 10} {
configure.cppflags-append \
-D__NOEXTENSIONS__

# Do not let an arbitrary compiler be set as CC_FOR_BUILD,
# do not link C++ code with gcc.
patchfiles-append patch-use-cxx-to-link-cxx-code.diff
configure.env-append CC_FOR_BUILD=${configure.cc}
}

# Set CFLAGS and LDFLAGS
Expand Down

0 comments on commit ee942d7

Please sign in to comment.