set CPPFLAGS/LDFLAGS to consistently pick up headers and libraries on

gcc and clang archs. add dep on fftw.

fixes a build problem on ports-gcc archs where the default library path
includes /usr/local/lib/gcc/ARCH-unknown-openbsd/15.2.0/../../.., a.k.a.
/usr/local/lib, but the default include search path for system headers
just has /usr/local/lib/gcc/x86_64-unknown-openbsd/15.2.0/include{,-fixed}
and /usr/include (so the library is picked up, but headers are not).

ok claudio@
This commit is contained in:
sthen
2026-01-28 13:53:10 +00:00
parent 67fdb0dcd0
commit 901a6c9511
3 changed files with 13 additions and 4 deletions
+3
View File
@@ -29,3 +29,6 @@ CONFIGURE_ARGS += --enable-cider \
--with-readline=yes
CONFIGURE_ARGS += --disable-openmp
CONFIGURE_ENV = CPPFLAGS=-I${LOCALBASE}/include \
LDFLAGS=-L${LOCALBASE}/lib
+4 -2
View File
@@ -1,15 +1,17 @@
COMMENT = ngspice shared library, based on Berkeley SPICE
PKGNAME = libngspice-${V}
REVISION = 0
REVISION = 1
SHARED_LIBS += ngspice 0.0 # 0.0
WANTLIB += ${COMPILER_LIBCXX} m pthread
WANTLIB += ${COMPILER_LIBCXX} fftw3 m pthread
CONFIGURE_ARGS += --with-ngshared \
--enable-shared
LIB_DEPENDS = math/fftw3
# same tests as cad/ngspice/ngspice, but they assume you've built a binary
NO_TEST = Yes
+6 -2
View File
@@ -1,9 +1,13 @@
REVISION = 0
COMMENT = circuit simulator, based on Berkeley SPICE
WANTLIB += ${COMPILER_LIBCXX} ICE SM X11 Xau Xaw Xdmcp Xext Xft
WANTLIB += Xmu Xpm Xrender Xt c curses expat fontconfig freetype
WANTLIB += m readline xcb z
WANTLIB += Xmu Xpm Xrender Xt c curses expat fftw3 fontconfig
WANTLIB += freetype m readline xcb z
CONFIGURE_ARGS += --with-x
LIB_DEPENDS = math/fftw3
.include <bsd.port.mk>