Skip to content

Commit 21d7780

Browse files
committed
update to ngspice 44.2
1 parent 264a135 commit 21d7780

File tree

2 files changed

+55
-9
lines changed

2 files changed

+55
-9
lines changed

mingw-w64-ngspice/PKGBUILD

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
_realname=ngspice
55
pkgbase=mingw-w64-${_realname}
66
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
7-
pkgver=42
7+
pkgver=44.2
88
pkgrel=1
99
pkgdesc="Mixed-level/Mixed-signal circuit simulator based on Spice3f5, Cider1b1, and Xspice (mingw-w64)"
1010
arch=('any')
@@ -24,6 +24,8 @@ depends=(
2424
"${MINGW_PACKAGE_PREFIX}-fftw"
2525
"${MINGW_PACKAGE_PREFIX}-gcc-libs"
2626
"${MINGW_PACKAGE_PREFIX}-omp"
27+
"${MINGW_PACKAGE_PREFIX}-ncurses"
28+
"${MINGW_PACKAGE_PREFIX}-readline"
2729
)
2830
makedepends=(
2931
"${MINGW_PACKAGE_PREFIX}-cc"
@@ -32,16 +34,19 @@ makedepends=(
3234
install="${_realname}-${MSYSTEM}.install"
3335
source=(
3436
"https://downloads.sourceforge.net/project/${_realname}/ng-spice-rework/${pkgver}/${_realname}-${pkgver}.tar.gz"
35-
"https://downloads.sourceforge.net/project/${_realname}/ng-spice-rework/${pkgver}/${_realname}-doc-${pkgver}.tar.gz"
37+
"https://downloads.sourceforge.net/project/${_realname}/ng-spice-rework/${pkgver}/${_realname}-doc-${pkgver%%.*}.tar.gz"
3638
"no-explicit-lstdc++.patch"
39+
"curses.patch"
3740
)
38-
sha256sums=('737fe3846ab2333a250dfadf1ed6ebe1860af1d8a5ff5e7803c772cc4256e50a'
39-
'bb971b1553d2ab19a9188f00fa14eb84b24bff6d1fbe0a7e16ffa1147ce6a9a4'
40-
'57f0f6e79faead15b0e1338a32c414b851997edb716467e8c0bc9a10df423582')
41+
sha256sums=('e7dadfb7bd5474fd22409c1e5a67acdec19f77e597df68e17c5549bc1390d7fd'
42+
'6dce369c3001d121404f88a2c5eac1ba01c46d7c70a1034ec53f1ff007ec7321'
43+
'57f0f6e79faead15b0e1338a32c414b851997edb716467e8c0bc9a10df423582'
44+
'6cf7f34df2d829008b6cc14dfcce70c0426f340fa9bcae93613f71c8c97aa2f5')
4145

4246
prepare() {
4347
cd "${srcdir}/${_realname}-${pkgver}"
4448
patch -Np1 -i "${srcdir}/no-explicit-lstdc++.patch"
49+
patch -Np1 -i "${srcdir}/curses.patch"
4550
autoreconf -fiv
4651
}
4752

@@ -56,6 +61,7 @@ build() {
5661
--enable-openmp
5762
--enable-xspice
5863
--enable-cider
64+
--without-x
5965
)
6066

6167
# FS#45230, create so lib
@@ -70,7 +76,7 @@ build() {
7076
--host=${MINGW_CHOST} \
7177
"${_common_flags[@]}" \
7278
--with-ngshared
73-
make
79+
make -j
7480

7581
mkdir -p "${srcdir}/build-static-${MSYSTEM}" && cd "${srcdir}/build-static-${MSYSTEM}"
7682

@@ -79,14 +85,14 @@ build() {
7985
../${_realname}-${pkgver}/configure \
8086
"${_common_flags[@]}" \
8187
--with-wingui
82-
make
88+
make -j
8389

8490
mkdir -p "${srcdir}/build-console-${MSYSTEM}" && cd "${srcdir}/build-console-${MSYSTEM}"
8591

8692
LDFLAGS+=" -lgdi32"
8793
../${_realname}-${pkgver}/configure \
88-
"${_common_flags[@]}"
89-
make
94+
"${_common_flags[@]}"
95+
make -j
9096
}
9197

9298
package() {

mingw-w64-ngspice/curses.patch

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
diff --git a/configure.ac b/configure.ac
2+
index f97a93ea6..232fa7ac1 100644
3+
--- a/configure.ac
4+
+++ b/configure.ac
5+
@@ -1280,6 +1280,20 @@ else
6+
AC_CHECK_LIB([readline], [readline],
7+
[LIBS="$LIBS -lreadline"],
8+
[AC_MSG_ERROR([Couldn't find readline libraries.])])
9+
+
10+
+PKG_CHECK_MODULES_STATIC([NCURSES], [ncursesw], [
11+
+ AC_SUBST([CURSES_CFLAGS], ["$NCURSES_CFLAGS"])
12+
+ AC_SUBST([CURSES_LIBS], ["$NCURSES_LIBS"])
13+
+ AC_DEFINE([HAVE_CURSES_H], [1], [Define if curses.h is available])
14+
+
15+
+ # Force the compiler to use the ncursesw include path for all subsequent checks
16+
+ CPPFLAGS="$CPPFLAGS $NCURSES_CFLAGS"
17+
+])
18+
+
19+
+AC_CHECK_HEADERS([curses.h], [], [
20+
+ AC_MSG_WARN([curses.h not found, but ncurses/curses.h is available.])
21+
+])
22+
+
23+
fi
24+
else
25+
# Especially defined for macOS (Big Sur), with readline installed from Brew
26+
diff --git a/src/xspice/verilog/Makefile.am b/src/xspice/verilog/Makefile.am
27+
index 262d63384..1a298cff0 100644
28+
--- a/src/xspice/verilog/Makefile.am
29+
+++ b/src/xspice/verilog/Makefile.am
30+
@@ -45,7 +45,9 @@
31+
install-exec-hook:
32+
cd $(DESTDIR)$(pkglibdir); \
33+
rm -f ivlng*a libvvp* ; \
34+
- mv ivlngvpi.* ivlng.vpi
35+
+ if [ -f ivlngvpi.* ]; then \
36+
+ mv ivlngvpi.* ivlng.vpi; \
37+
+ fi
38+
39+
uninstall-hook:
40+
rm -f $(DESTDIR)$(pkglibdir)/ivlng.vpi $(DESTDIR)$(pkglibdir)/ivlng.so

0 commit comments

Comments
 (0)