Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] ngspice: update to 34
@ 2021-08-07 22:57 mtboehlke
  2021-08-07 23:04 ` mtboehlke
                   ` (54 more replies)
  0 siblings, 55 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-07 22:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1586 bytes --]

There is a new pull request by mtboehlke against master on the void-packages repository

https://github.com/mtboehlke/void-packages master
https://github.com/void-linux/void-packages/pull/32403

ngspice: update to 34
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/32403.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-32403.patch --]
[-- Type: text/x-diff, Size: 4522 bytes --]

From 9ab3278addf65172412cb5f00783045b0933568b Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Sat, 7 Aug 2021 17:23:02 -0500
Subject: [PATCH] ngspice: update to 34

Also fixes issue with ngspice binary not being packaged.
Library is now moved to subpackage libngspice.
---
 common/shlibs                              |  2 +-
 srcpkgs/libngspice                         |  1 +
 srcpkgs/ngspice/patches/windows-only.patch | 15 --------
 srcpkgs/ngspice/template                   | 42 +++++++++++++++++++---
 4 files changed, 40 insertions(+), 20 deletions(-)
 create mode 120000 srcpkgs/libngspice
 delete mode 100644 srcpkgs/ngspice/patches/windows-only.patch

diff --git a/common/shlibs b/common/shlibs
index b8fda590d5f3..8e3ae3cc1645 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3202,7 +3202,7 @@ libgloox.so.17 gloox-1.0.20_1
 libgsmsd.so.8 gammu-smsd-1.39.0_1
 libGammu.so.8 gammu-1.39.0_1
 libz3.so z3-4.6.0_2
-libngspice.so.0 ngspice-27_2
+libngspice.so.0 libngspice-34_1
 libvulkan.so.1 vulkan-loader-1.0.57.0_1
 libembb_mtapi_cpp.so embb-1.0.0_3
 libembb_mtapi_c.so embb-1.0.0_3
diff --git a/srcpkgs/libngspice b/srcpkgs/libngspice
new file mode 120000
index 000000000000..342fa057690d
--- /dev/null
+++ b/srcpkgs/libngspice
@@ -0,0 +1 @@
+ngspice
\ No newline at end of file
diff --git a/srcpkgs/ngspice/patches/windows-only.patch b/srcpkgs/ngspice/patches/windows-only.patch
deleted file mode 100644
index 8a9ead11e31f..000000000000
--- a/srcpkgs/ngspice/patches/windows-only.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-libshlwapi is Windows-only
-
-diff --git src/xspice/cmpp/Makefile.in src/xspice/cmpp/Makefile.in
-index b450e8c..2ea8716 100644
---- a/src/xspice/cmpp/Makefile.in
-+++ b/src/xspice/cmpp/Makefile.in
-@@ -753,7 +753,7 @@ ifs_yacc.c : ifs_yacc.y
- 
- @CROSS_COMPILING_TRUE@build/cmpp$(BUILD_EXEEXT) : $(BUILD_CMPP_FILES)
- @CROSS_COMPILING_TRUE@	$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) \
--@CROSS_COMPILING_TRUE@		$(AM_CPPFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ $^ -lshlwapi
-+@CROSS_COMPILING_TRUE@		$(AM_CPPFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ $^
- 
- @CROSS_COMPILING_TRUE@distclean-local:
- @CROSS_COMPILING_TRUE@	-rm -rf build
diff --git a/srcpkgs/ngspice/template b/srcpkgs/ngspice/template
index 05beffd8f841..72fcccfe6078 100644
--- a/srcpkgs/ngspice/template
+++ b/srcpkgs/ngspice/template
@@ -1,9 +1,9 @@
 # Template file for 'ngspice'
 pkgname=ngspice
-version=33
+version=34
 revision=1
 build_style=gnu-configure
-configure_args="--with-readline=yes --with-ngshared --enable-xspice --enable-cider"
+configure_args="--with-ngshared --enable-xspice --enable-cider"
 hostmakedepends="bison byacc"
 makedepends="readline-devel libX11-devel libXaw-devel"
 short_desc="Mixed Mode Mixed Level Circuit Simulator based on Spice3F5"
@@ -11,18 +11,52 @@ maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
 license="BSD-3-Clause"
 homepage="http://ngspice.sourceforge.net"
 distfiles="${SOURCEFORGE_SITE}/ngspice/ng-spice-rework/${version}/${pkgname}-${version}.tar.gz"
-checksum=b99db66cc1c57c44e9af1ef6ccb1dcbc8ae1df3e35acf570af578f606f8541f1
+checksum=2263fffc6694754972af7072ef01cfe62ac790800dad651bc290bfcae79bd7b5
+
+# Configure can only handle building ngspice as a library or as a binary, but not both,
+#  so essentially we have to build ngspice twice
+pre_configure() {
+	install -d .build_bins
+	cp -fpr * .build_bins/
+}
+
+# --with-ngshared builds the library, but not binary, so remove flag for the second pass.
+# readline should not be configured for the library, but include it here,
+#  see: https://github.com/imr/ngspice/commit/b86c85f85bbba6e45dc030af3e853edf8b9cfa3d
+post_configure() {
+	cd .build_bins
+	configure_args="--with-readline=yes $(printf %s\\n "$configure_args" | sed 's/--with-ngshared//')" do_configure
+}
+
+post_build() {
+	cd .build_bins
+	do_build
+}
 
 post_install() {
 	vlicense COPYING
+	cd .build_bins
+	do_install
+	# cmpp is not distributed in v34, so don't include man page
+	rm -f "${DESTDIR}/usr/share/man/man1/cmpp.1"
+	# config.h is an internal header file, so don't include
+	#  this will probably be fixed in v35
+	rm -f "${DESTDIR}/usr/include/config.h"
 }
 
 ngspice-devel_package() {
 	short_desc+=" - development files"
-	depends="${sourcepkg}>=${version}_${revision}"
+	depends="libngspice>=${version}_${revision}"
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/*.so"
 		vmove usr/lib/pkgconfig
 	}
 }
+
+libngspice_package() {
+	short_desc+=" - library"
+	pkg_install() {
+		vmove "usr/lib/libngspice.so.*"
+	}
+}

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: ngspice: update to 34
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
@ 2021-08-07 23:04 ` mtboehlke
  2021-08-07 23:05 ` mtboehlke
                   ` (53 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-07 23:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 156 bytes --]

New comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#issuecomment-894716269

Comment:
closes #32251

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: ngspice: update to 34
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
  2021-08-07 23:04 ` mtboehlke
@ 2021-08-07 23:05 ` mtboehlke
  2021-08-07 23:10 ` [PR PATCH] [Updated] " mtboehlke
                   ` (52 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-07 23:05 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 156 bytes --]

New comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#issuecomment-894716269

Comment:
closes #32251

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PR PATCH] [Updated] ngspice: update to 34
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
  2021-08-07 23:04 ` mtboehlke
  2021-08-07 23:05 ` mtboehlke
@ 2021-08-07 23:10 ` mtboehlke
  2021-08-07 23:13 ` mtboehlke
                   ` (51 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-07 23:10 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1605 bytes --]

There is an updated pull request by mtboehlke against master on the void-packages repository

https://github.com/mtboehlke/void-packages master
https://github.com/void-linux/void-packages/pull/32403

ngspice: update to 34
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->
close #32251


A patch file from https://github.com/void-linux/void-packages/pull/32403.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-32403.patch --]
[-- Type: text/x-diff, Size: 6406 bytes --]

From 9ab3278addf65172412cb5f00783045b0933568b Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Sat, 7 Aug 2021 17:23:02 -0500
Subject: [PATCH 1/2] ngspice: update to 34

Also fixes issue with ngspice binary not being packaged.
Library is now moved to subpackage libngspice.
---
 common/shlibs                              |  2 +-
 srcpkgs/libngspice                         |  1 +
 srcpkgs/ngspice/patches/windows-only.patch | 15 --------
 srcpkgs/ngspice/template                   | 42 +++++++++++++++++++---
 4 files changed, 40 insertions(+), 20 deletions(-)
 create mode 120000 srcpkgs/libngspice
 delete mode 100644 srcpkgs/ngspice/patches/windows-only.patch

diff --git a/common/shlibs b/common/shlibs
index b8fda590d5f3..8e3ae3cc1645 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3202,7 +3202,7 @@ libgloox.so.17 gloox-1.0.20_1
 libgsmsd.so.8 gammu-smsd-1.39.0_1
 libGammu.so.8 gammu-1.39.0_1
 libz3.so z3-4.6.0_2
-libngspice.so.0 ngspice-27_2
+libngspice.so.0 libngspice-34_1
 libvulkan.so.1 vulkan-loader-1.0.57.0_1
 libembb_mtapi_cpp.so embb-1.0.0_3
 libembb_mtapi_c.so embb-1.0.0_3
diff --git a/srcpkgs/libngspice b/srcpkgs/libngspice
new file mode 120000
index 000000000000..342fa057690d
--- /dev/null
+++ b/srcpkgs/libngspice
@@ -0,0 +1 @@
+ngspice
\ No newline at end of file
diff --git a/srcpkgs/ngspice/patches/windows-only.patch b/srcpkgs/ngspice/patches/windows-only.patch
deleted file mode 100644
index 8a9ead11e31f..000000000000
--- a/srcpkgs/ngspice/patches/windows-only.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-libshlwapi is Windows-only
-
-diff --git src/xspice/cmpp/Makefile.in src/xspice/cmpp/Makefile.in
-index b450e8c..2ea8716 100644
---- a/src/xspice/cmpp/Makefile.in
-+++ b/src/xspice/cmpp/Makefile.in
-@@ -753,7 +753,7 @@ ifs_yacc.c : ifs_yacc.y
- 
- @CROSS_COMPILING_TRUE@build/cmpp$(BUILD_EXEEXT) : $(BUILD_CMPP_FILES)
- @CROSS_COMPILING_TRUE@	$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) \
--@CROSS_COMPILING_TRUE@		$(AM_CPPFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ $^ -lshlwapi
-+@CROSS_COMPILING_TRUE@		$(AM_CPPFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ $^
- 
- @CROSS_COMPILING_TRUE@distclean-local:
- @CROSS_COMPILING_TRUE@	-rm -rf build
diff --git a/srcpkgs/ngspice/template b/srcpkgs/ngspice/template
index 05beffd8f841..72fcccfe6078 100644
--- a/srcpkgs/ngspice/template
+++ b/srcpkgs/ngspice/template
@@ -1,9 +1,9 @@
 # Template file for 'ngspice'
 pkgname=ngspice
-version=33
+version=34
 revision=1
 build_style=gnu-configure
-configure_args="--with-readline=yes --with-ngshared --enable-xspice --enable-cider"
+configure_args="--with-ngshared --enable-xspice --enable-cider"
 hostmakedepends="bison byacc"
 makedepends="readline-devel libX11-devel libXaw-devel"
 short_desc="Mixed Mode Mixed Level Circuit Simulator based on Spice3F5"
@@ -11,18 +11,52 @@ maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
 license="BSD-3-Clause"
 homepage="http://ngspice.sourceforge.net"
 distfiles="${SOURCEFORGE_SITE}/ngspice/ng-spice-rework/${version}/${pkgname}-${version}.tar.gz"
-checksum=b99db66cc1c57c44e9af1ef6ccb1dcbc8ae1df3e35acf570af578f606f8541f1
+checksum=2263fffc6694754972af7072ef01cfe62ac790800dad651bc290bfcae79bd7b5
+
+# Configure can only handle building ngspice as a library or as a binary, but not both,
+#  so essentially we have to build ngspice twice
+pre_configure() {
+	install -d .build_bins
+	cp -fpr * .build_bins/
+}
+
+# --with-ngshared builds the library, but not binary, so remove flag for the second pass.
+# readline should not be configured for the library, but include it here,
+#  see: https://github.com/imr/ngspice/commit/b86c85f85bbba6e45dc030af3e853edf8b9cfa3d
+post_configure() {
+	cd .build_bins
+	configure_args="--with-readline=yes $(printf %s\\n "$configure_args" | sed 's/--with-ngshared//')" do_configure
+}
+
+post_build() {
+	cd .build_bins
+	do_build
+}
 
 post_install() {
 	vlicense COPYING
+	cd .build_bins
+	do_install
+	# cmpp is not distributed in v34, so don't include man page
+	rm -f "${DESTDIR}/usr/share/man/man1/cmpp.1"
+	# config.h is an internal header file, so don't include
+	#  this will probably be fixed in v35
+	rm -f "${DESTDIR}/usr/include/config.h"
 }
 
 ngspice-devel_package() {
 	short_desc+=" - development files"
-	depends="${sourcepkg}>=${version}_${revision}"
+	depends="libngspice>=${version}_${revision}"
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/*.so"
 		vmove usr/lib/pkgconfig
 	}
 }
+
+libngspice_package() {
+	short_desc+=" - library"
+	pkg_install() {
+		vmove "usr/lib/libngspice.so.*"
+	}
+}

From a7772df6af5e169e446ef204340045d0a6052615 Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Sat, 7 Aug 2021 18:09:13 -0500
Subject: [PATCH 2/2] Revert merge voidlinux:master This reverts commit
 06c27260113437bc348bb0a9532c5ce981b9cfce, reversing changes made to
 9ab3278addf65172412cb5f00783045b0933568b.

---
 srcpkgs/lynx/template | 11 ++++++-----
 srcpkgs/lynx/update   |  5 +++++
 2 files changed, 11 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/lynx/update

diff --git a/srcpkgs/lynx/template b/srcpkgs/lynx/template
index 6ec7a39b4e7a..84244374086e 100644
--- a/srcpkgs/lynx/template
+++ b/srcpkgs/lynx/template
@@ -1,8 +1,9 @@
 # Template file for 'lynx'
 pkgname=lynx
-version=2.9.0dev.9
-revision=1
-wrksrc="lynx${version}"
+version=2.8.9.1
+revision=5
+_distver="${version%.*}rel.${version##*.}"
+wrksrc="lynx${_distver}"
 build_style=gnu-configure
 configure_args="--enable-widec --with-zlib --with-bzlib --with-ssl --enable-ipv6"
 makedepends="zlib-devel bzip2-devel ncurses-devel openssl-devel"
@@ -10,8 +11,8 @@ short_desc="A text browser for the World Wide Web"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="http://lynx.invisible-island.net/"
-distfiles="http://invisible-mirror.net/archives/lynx/tarballs/${pkgname}${version}.tar.bz2"
-checksum=6fd6dd3f57681ad58d3397c273b430a411ae049b367fd4909b3d70b722da501a
+distfiles="http://invisible-mirror.net/archives/lynx/tarballs/${pkgname}${_distver}.tar.gz"
+checksum=a46e4167b8f02c066d2fe2eafcc5603367be0e3fe2e59e9fc4eb016f306afc8e
 
 pre_configure() {
 	sed -i configure \
diff --git a/srcpkgs/lynx/update b/srcpkgs/lynx/update
new file mode 100644
index 000000000000..8079512abebb
--- /dev/null
+++ b/srcpkgs/lynx/update
@@ -0,0 +1,5 @@
+case "$version" in
+	*.*.*.*) version=${version%.*}rel.${version##*.};;
+esac
+
+ignore="*dev*"

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PR PATCH] [Updated] ngspice: update to 34
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (2 preceding siblings ...)
  2021-08-07 23:10 ` [PR PATCH] [Updated] " mtboehlke
@ 2021-08-07 23:13 ` mtboehlke
  2021-08-09 17:20 ` [PR REVIEW] " ericonr
                   ` (50 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-07 23:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1605 bytes --]

There is an updated pull request by mtboehlke against master on the void-packages repository

https://github.com/mtboehlke/void-packages master
https://github.com/void-linux/void-packages/pull/32403

ngspice: update to 34
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->
close #32251


A patch file from https://github.com/void-linux/void-packages/pull/32403.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-32403.patch --]
[-- Type: text/x-diff, Size: 4522 bytes --]

From 9ab3278addf65172412cb5f00783045b0933568b Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Sat, 7 Aug 2021 17:23:02 -0500
Subject: [PATCH] ngspice: update to 34

Also fixes issue with ngspice binary not being packaged.
Library is now moved to subpackage libngspice.
---
 common/shlibs                              |  2 +-
 srcpkgs/libngspice                         |  1 +
 srcpkgs/ngspice/patches/windows-only.patch | 15 --------
 srcpkgs/ngspice/template                   | 42 +++++++++++++++++++---
 4 files changed, 40 insertions(+), 20 deletions(-)
 create mode 120000 srcpkgs/libngspice
 delete mode 100644 srcpkgs/ngspice/patches/windows-only.patch

diff --git a/common/shlibs b/common/shlibs
index b8fda590d5f3..8e3ae3cc1645 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3202,7 +3202,7 @@ libgloox.so.17 gloox-1.0.20_1
 libgsmsd.so.8 gammu-smsd-1.39.0_1
 libGammu.so.8 gammu-1.39.0_1
 libz3.so z3-4.6.0_2
-libngspice.so.0 ngspice-27_2
+libngspice.so.0 libngspice-34_1
 libvulkan.so.1 vulkan-loader-1.0.57.0_1
 libembb_mtapi_cpp.so embb-1.0.0_3
 libembb_mtapi_c.so embb-1.0.0_3
diff --git a/srcpkgs/libngspice b/srcpkgs/libngspice
new file mode 120000
index 000000000000..342fa057690d
--- /dev/null
+++ b/srcpkgs/libngspice
@@ -0,0 +1 @@
+ngspice
\ No newline at end of file
diff --git a/srcpkgs/ngspice/patches/windows-only.patch b/srcpkgs/ngspice/patches/windows-only.patch
deleted file mode 100644
index 8a9ead11e31f..000000000000
--- a/srcpkgs/ngspice/patches/windows-only.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-libshlwapi is Windows-only
-
-diff --git src/xspice/cmpp/Makefile.in src/xspice/cmpp/Makefile.in
-index b450e8c..2ea8716 100644
---- a/src/xspice/cmpp/Makefile.in
-+++ b/src/xspice/cmpp/Makefile.in
-@@ -753,7 +753,7 @@ ifs_yacc.c : ifs_yacc.y
- 
- @CROSS_COMPILING_TRUE@build/cmpp$(BUILD_EXEEXT) : $(BUILD_CMPP_FILES)
- @CROSS_COMPILING_TRUE@	$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) \
--@CROSS_COMPILING_TRUE@		$(AM_CPPFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ $^ -lshlwapi
-+@CROSS_COMPILING_TRUE@		$(AM_CPPFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ $^
- 
- @CROSS_COMPILING_TRUE@distclean-local:
- @CROSS_COMPILING_TRUE@	-rm -rf build
diff --git a/srcpkgs/ngspice/template b/srcpkgs/ngspice/template
index 05beffd8f841..72fcccfe6078 100644
--- a/srcpkgs/ngspice/template
+++ b/srcpkgs/ngspice/template
@@ -1,9 +1,9 @@
 # Template file for 'ngspice'
 pkgname=ngspice
-version=33
+version=34
 revision=1
 build_style=gnu-configure
-configure_args="--with-readline=yes --with-ngshared --enable-xspice --enable-cider"
+configure_args="--with-ngshared --enable-xspice --enable-cider"
 hostmakedepends="bison byacc"
 makedepends="readline-devel libX11-devel libXaw-devel"
 short_desc="Mixed Mode Mixed Level Circuit Simulator based on Spice3F5"
@@ -11,18 +11,52 @@ maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
 license="BSD-3-Clause"
 homepage="http://ngspice.sourceforge.net"
 distfiles="${SOURCEFORGE_SITE}/ngspice/ng-spice-rework/${version}/${pkgname}-${version}.tar.gz"
-checksum=b99db66cc1c57c44e9af1ef6ccb1dcbc8ae1df3e35acf570af578f606f8541f1
+checksum=2263fffc6694754972af7072ef01cfe62ac790800dad651bc290bfcae79bd7b5
+
+# Configure can only handle building ngspice as a library or as a binary, but not both,
+#  so essentially we have to build ngspice twice
+pre_configure() {
+	install -d .build_bins
+	cp -fpr * .build_bins/
+}
+
+# --with-ngshared builds the library, but not binary, so remove flag for the second pass.
+# readline should not be configured for the library, but include it here,
+#  see: https://github.com/imr/ngspice/commit/b86c85f85bbba6e45dc030af3e853edf8b9cfa3d
+post_configure() {
+	cd .build_bins
+	configure_args="--with-readline=yes $(printf %s\\n "$configure_args" | sed 's/--with-ngshared//')" do_configure
+}
+
+post_build() {
+	cd .build_bins
+	do_build
+}
 
 post_install() {
 	vlicense COPYING
+	cd .build_bins
+	do_install
+	# cmpp is not distributed in v34, so don't include man page
+	rm -f "${DESTDIR}/usr/share/man/man1/cmpp.1"
+	# config.h is an internal header file, so don't include
+	#  this will probably be fixed in v35
+	rm -f "${DESTDIR}/usr/include/config.h"
 }
 
 ngspice-devel_package() {
 	short_desc+=" - development files"
-	depends="${sourcepkg}>=${version}_${revision}"
+	depends="libngspice>=${version}_${revision}"
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/*.so"
 		vmove usr/lib/pkgconfig
 	}
 }
+
+libngspice_package() {
+	short_desc+=" - library"
+	pkg_install() {
+		vmove "usr/lib/libngspice.so.*"
+	}
+}

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PR REVIEW] ngspice: update to 34
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (4 preceding siblings ...)
  2021-08-09 17:20 ` [PR REVIEW] " ericonr
@ 2021-08-09 17:20 ` ericonr
  2021-08-09 17:20 ` ericonr
                   ` (48 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: ericonr @ 2021-08-09 17:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 156 bytes --]

New review comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#discussion_r685379347

Comment:
same here

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PR REVIEW] ngspice: update to 34
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (5 preceding siblings ...)
  2021-08-09 17:20 ` ericonr
@ 2021-08-09 17:20 ` ericonr
  2021-08-09 17:20 ` ericonr
                   ` (47 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: ericonr @ 2021-08-09 17:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 252 bytes --]

New review comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#discussion_r685376427

Comment:
```suggestion
	configure_args="--with-readline=yes ${configure_args/--with-ngshared/}" do_configure
```

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PR REVIEW] ngspice: update to 34
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (6 preceding siblings ...)
  2021-08-09 17:20 ` ericonr
@ 2021-08-09 17:20 ` ericonr
  2021-08-09 19:01 ` [PR PATCH] [Updated] " mtboehlke
                   ` (46 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: ericonr @ 2021-08-09 17:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 292 bytes --]

New review comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#discussion_r685375463

Comment:
We can avoid some of this if it supports out of tree builds. So instead you'd do `../configure ...`.

Could indicate it with `configure_script`

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PR REVIEW] ngspice: update to 34
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (3 preceding siblings ...)
  2021-08-07 23:13 ` mtboehlke
@ 2021-08-09 17:20 ` ericonr
  2021-08-09 17:20 ` ericonr
                   ` (49 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: ericonr @ 2021-08-09 17:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 217 bytes --]

New review comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#discussion_r685379129

Comment:
Don't remove with `-f`, otherwise we will carry the workaround forever

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PR PATCH] [Updated] ngspice: update to 34
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (7 preceding siblings ...)
  2021-08-09 17:20 ` ericonr
@ 2021-08-09 19:01 ` mtboehlke
  2021-08-10 16:45 ` mtboehlke
                   ` (45 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-09 19:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1605 bytes --]

There is an updated pull request by mtboehlke against master on the void-packages repository

https://github.com/mtboehlke/void-packages master
https://github.com/void-linux/void-packages/pull/32403

ngspice: update to 34
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->
close #32251


A patch file from https://github.com/void-linux/void-packages/pull/32403.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-32403.patch --]
[-- Type: text/x-diff, Size: 5558 bytes --]

From 9ab3278addf65172412cb5f00783045b0933568b Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Sat, 7 Aug 2021 17:23:02 -0500
Subject: [PATCH 1/2] ngspice: update to 34

Also fixes issue with ngspice binary not being packaged.
Library is now moved to subpackage libngspice.
---
 common/shlibs                              |  2 +-
 srcpkgs/libngspice                         |  1 +
 srcpkgs/ngspice/patches/windows-only.patch | 15 --------
 srcpkgs/ngspice/template                   | 42 +++++++++++++++++++---
 4 files changed, 40 insertions(+), 20 deletions(-)
 create mode 120000 srcpkgs/libngspice
 delete mode 100644 srcpkgs/ngspice/patches/windows-only.patch

diff --git a/common/shlibs b/common/shlibs
index b8fda590d5f3..8e3ae3cc1645 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3202,7 +3202,7 @@ libgloox.so.17 gloox-1.0.20_1
 libgsmsd.so.8 gammu-smsd-1.39.0_1
 libGammu.so.8 gammu-1.39.0_1
 libz3.so z3-4.6.0_2
-libngspice.so.0 ngspice-27_2
+libngspice.so.0 libngspice-34_1
 libvulkan.so.1 vulkan-loader-1.0.57.0_1
 libembb_mtapi_cpp.so embb-1.0.0_3
 libembb_mtapi_c.so embb-1.0.0_3
diff --git a/srcpkgs/libngspice b/srcpkgs/libngspice
new file mode 120000
index 000000000000..342fa057690d
--- /dev/null
+++ b/srcpkgs/libngspice
@@ -0,0 +1 @@
+ngspice
\ No newline at end of file
diff --git a/srcpkgs/ngspice/patches/windows-only.patch b/srcpkgs/ngspice/patches/windows-only.patch
deleted file mode 100644
index 8a9ead11e31f..000000000000
--- a/srcpkgs/ngspice/patches/windows-only.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-libshlwapi is Windows-only
-
-diff --git src/xspice/cmpp/Makefile.in src/xspice/cmpp/Makefile.in
-index b450e8c..2ea8716 100644
---- a/src/xspice/cmpp/Makefile.in
-+++ b/src/xspice/cmpp/Makefile.in
-@@ -753,7 +753,7 @@ ifs_yacc.c : ifs_yacc.y
- 
- @CROSS_COMPILING_TRUE@build/cmpp$(BUILD_EXEEXT) : $(BUILD_CMPP_FILES)
- @CROSS_COMPILING_TRUE@	$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) \
--@CROSS_COMPILING_TRUE@		$(AM_CPPFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ $^ -lshlwapi
-+@CROSS_COMPILING_TRUE@		$(AM_CPPFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ $^
- 
- @CROSS_COMPILING_TRUE@distclean-local:
- @CROSS_COMPILING_TRUE@	-rm -rf build
diff --git a/srcpkgs/ngspice/template b/srcpkgs/ngspice/template
index 05beffd8f841..72fcccfe6078 100644
--- a/srcpkgs/ngspice/template
+++ b/srcpkgs/ngspice/template
@@ -1,9 +1,9 @@
 # Template file for 'ngspice'
 pkgname=ngspice
-version=33
+version=34
 revision=1
 build_style=gnu-configure
-configure_args="--with-readline=yes --with-ngshared --enable-xspice --enable-cider"
+configure_args="--with-ngshared --enable-xspice --enable-cider"
 hostmakedepends="bison byacc"
 makedepends="readline-devel libX11-devel libXaw-devel"
 short_desc="Mixed Mode Mixed Level Circuit Simulator based on Spice3F5"
@@ -11,18 +11,52 @@ maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
 license="BSD-3-Clause"
 homepage="http://ngspice.sourceforge.net"
 distfiles="${SOURCEFORGE_SITE}/ngspice/ng-spice-rework/${version}/${pkgname}-${version}.tar.gz"
-checksum=b99db66cc1c57c44e9af1ef6ccb1dcbc8ae1df3e35acf570af578f606f8541f1
+checksum=2263fffc6694754972af7072ef01cfe62ac790800dad651bc290bfcae79bd7b5
+
+# Configure can only handle building ngspice as a library or as a binary, but not both,
+#  so essentially we have to build ngspice twice
+pre_configure() {
+	install -d .build_bins
+	cp -fpr * .build_bins/
+}
+
+# --with-ngshared builds the library, but not binary, so remove flag for the second pass.
+# readline should not be configured for the library, but include it here,
+#  see: https://github.com/imr/ngspice/commit/b86c85f85bbba6e45dc030af3e853edf8b9cfa3d
+post_configure() {
+	cd .build_bins
+	configure_args="--with-readline=yes $(printf %s\\n "$configure_args" | sed 's/--with-ngshared//')" do_configure
+}
+
+post_build() {
+	cd .build_bins
+	do_build
+}
 
 post_install() {
 	vlicense COPYING
+	cd .build_bins
+	do_install
+	# cmpp is not distributed in v34, so don't include man page
+	rm -f "${DESTDIR}/usr/share/man/man1/cmpp.1"
+	# config.h is an internal header file, so don't include
+	#  this will probably be fixed in v35
+	rm -f "${DESTDIR}/usr/include/config.h"
 }
 
 ngspice-devel_package() {
 	short_desc+=" - development files"
-	depends="${sourcepkg}>=${version}_${revision}"
+	depends="libngspice>=${version}_${revision}"
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/*.so"
 		vmove usr/lib/pkgconfig
 	}
 }
+
+libngspice_package() {
+	short_desc+=" - library"
+	pkg_install() {
+		vmove "usr/lib/libngspice.so.*"
+	}
+}

From 28300b91261eb30ac7a7410e45ba10ee5ff22601 Mon Sep 17 00:00:00 2001
From: mtboehlke <42847685+mtboehlke@users.noreply.github.com>
Date: Mon, 9 Aug 2021 14:01:25 -0500
Subject: [PATCH 2/2] Update srcpkgs/ngspice/template
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Co-authored-by: Érico Nogueira Rolim <34201958+ericonr@users.noreply.github.com>
---
 srcpkgs/ngspice/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ngspice/template b/srcpkgs/ngspice/template
index 72fcccfe6078..00d4d9222c14 100644
--- a/srcpkgs/ngspice/template
+++ b/srcpkgs/ngspice/template
@@ -25,7 +25,7 @@ pre_configure() {
 #  see: https://github.com/imr/ngspice/commit/b86c85f85bbba6e45dc030af3e853edf8b9cfa3d
 post_configure() {
 	cd .build_bins
-	configure_args="--with-readline=yes $(printf %s\\n "$configure_args" | sed 's/--with-ngshared//')" do_configure
+	configure_args="--with-readline=yes ${configure_args/--with-ngshared/}" do_configure
 }
 
 post_build() {

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PR PATCH] [Updated] ngspice: update to 34
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (8 preceding siblings ...)
  2021-08-09 19:01 ` [PR PATCH] [Updated] " mtboehlke
@ 2021-08-10 16:45 ` mtboehlke
  2021-08-10 16:49 ` [PR REVIEW] " mtboehlke
                   ` (44 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-10 16:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1605 bytes --]

There is an updated pull request by mtboehlke against master on the void-packages repository

https://github.com/mtboehlke/void-packages master
https://github.com/void-linux/void-packages/pull/32403

ngspice: update to 34
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->
close #32251


A patch file from https://github.com/void-linux/void-packages/pull/32403.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-32403.patch --]
[-- Type: text/x-diff, Size: 5100 bytes --]

From a85fef480182f9e74139cef2435c5845246bc1f1 Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Sat, 7 Aug 2021 17:23:02 -0500
Subject: [PATCH 1/2] ngspice: update to 34

Also fixes issue with ngspice binary not being packaged.
Library is now moved to subpackage libngspice.
---
 common/shlibs                              |  2 +-
 srcpkgs/libngspice                         |  1 +
 srcpkgs/ngspice/patches/windows-only.patch | 15 ---------
 srcpkgs/ngspice/template                   | 38 +++++++++++++++++++---
 4 files changed, 36 insertions(+), 20 deletions(-)
 create mode 120000 srcpkgs/libngspice
 delete mode 100644 srcpkgs/ngspice/patches/windows-only.patch

diff --git a/common/shlibs b/common/shlibs
index b8fda590d5f3..8e3ae3cc1645 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3202,7 +3202,7 @@ libgloox.so.17 gloox-1.0.20_1
 libgsmsd.so.8 gammu-smsd-1.39.0_1
 libGammu.so.8 gammu-1.39.0_1
 libz3.so z3-4.6.0_2
-libngspice.so.0 ngspice-27_2
+libngspice.so.0 libngspice-34_1
 libvulkan.so.1 vulkan-loader-1.0.57.0_1
 libembb_mtapi_cpp.so embb-1.0.0_3
 libembb_mtapi_c.so embb-1.0.0_3
diff --git a/srcpkgs/libngspice b/srcpkgs/libngspice
new file mode 120000
index 000000000000..342fa057690d
--- /dev/null
+++ b/srcpkgs/libngspice
@@ -0,0 +1 @@
+ngspice
\ No newline at end of file
diff --git a/srcpkgs/ngspice/patches/windows-only.patch b/srcpkgs/ngspice/patches/windows-only.patch
deleted file mode 100644
index 8a9ead11e31f..000000000000
--- a/srcpkgs/ngspice/patches/windows-only.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-libshlwapi is Windows-only
-
-diff --git src/xspice/cmpp/Makefile.in src/xspice/cmpp/Makefile.in
-index b450e8c..2ea8716 100644
---- a/src/xspice/cmpp/Makefile.in
-+++ b/src/xspice/cmpp/Makefile.in
-@@ -753,7 +753,7 @@ ifs_yacc.c : ifs_yacc.y
- 
- @CROSS_COMPILING_TRUE@build/cmpp$(BUILD_EXEEXT) : $(BUILD_CMPP_FILES)
- @CROSS_COMPILING_TRUE@	$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) \
--@CROSS_COMPILING_TRUE@		$(AM_CPPFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ $^ -lshlwapi
-+@CROSS_COMPILING_TRUE@		$(AM_CPPFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ $^
- 
- @CROSS_COMPILING_TRUE@distclean-local:
- @CROSS_COMPILING_TRUE@	-rm -rf build
diff --git a/srcpkgs/ngspice/template b/srcpkgs/ngspice/template
index 05beffd8f841..09645c61e666 100644
--- a/srcpkgs/ngspice/template
+++ b/srcpkgs/ngspice/template
@@ -1,9 +1,10 @@
 # Template file for 'ngspice'
 pkgname=ngspice
-version=33
+version=34
 revision=1
 build_style=gnu-configure
-configure_args="--with-readline=yes --with-ngshared --enable-xspice --enable-cider"
+configure_args="--with-readline=yes --enable-xspice --enable-cider"
+make_build_args="-C .build_lib"
 hostmakedepends="bison byacc"
 makedepends="readline-devel libX11-devel libXaw-devel"
 short_desc="Mixed Mode Mixed Level Circuit Simulator based on Spice3F5"
@@ -11,18 +12,47 @@ maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
 license="BSD-3-Clause"
 homepage="http://ngspice.sourceforge.net"
 distfiles="${SOURCEFORGE_SITE}/ngspice/ng-spice-rework/${version}/${pkgname}-${version}.tar.gz"
-checksum=b99db66cc1c57c44e9af1ef6ccb1dcbc8ae1df3e35acf570af578f606f8541f1
+checksum=2263fffc6694754972af7072ef01cfe62ac790800dad651bc290bfcae79bd7b5
+
+# Configure can only handle building ngspice as a library or as a binary, but not both at once.
+# --with-ngshared builds the library, but not binary, and readline should not be configured for the library
+# see: https://github.com/imr/ngspice/commit/b86c85f85bbba6e45dc030af3e853edf8b9cfa3d
+pre_configure() {
+	install -d .build_lib
+	cd .build_lib
+	../configure --with-ngshared ${configure_args/--with-readline=yes/}
+}
+
+# library built during do_build, now build the binary
+post_build() {
+	unset make_build_args
+	do_build
+}
 
 post_install() {
 	vlicense COPYING
+	cd .build_lib
+	do_install
+	# cmpp is not distributed in v34, so don't include man page
+	rm "${DESTDIR}/usr/share/man/man1/cmpp.1"
+	# config.h is an internal header file, so don't include
+	#  this will probably be fixed in v35
+	rm "${DESTDIR}/usr/include/config.h"
 }
 
 ngspice-devel_package() {
 	short_desc+=" - development files"
-	depends="${sourcepkg}>=${version}_${revision}"
+	depends="libngspice>=${version}_${revision}"
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/*.so"
 		vmove usr/lib/pkgconfig
 	}
 }
+
+libngspice_package() {
+	short_desc+=" - library"
+	pkg_install() {
+		vmove "usr/lib/libngspice.so.*"
+	}
+}

From e20827bd1e7058ade9ab9eee23a3fa4a1b054959 Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Tue, 10 Aug 2021 11:38:29 -0500
Subject: [PATCH 2/2] kicad: revbump to pick up libngspice

---
 srcpkgs/kicad/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kicad/template b/srcpkgs/kicad/template
index c56f7422dbed..850b573e6547 100644
--- a/srcpkgs/kicad/template
+++ b/srcpkgs/kicad/template
@@ -1,7 +1,7 @@
 # Template file for 'kicad'
 pkgname=kicad
 version=5.1.10
-revision=2
+revision=3
 build_style=cmake
 build_helper=cmake-wxWidgets-gtk3
 configure_args="-DKICAD_BUILD_VERSION=${version} -DKICAD_SCRIPTING=ON

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PR REVIEW] ngspice: update to 34
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (9 preceding siblings ...)
  2021-08-10 16:45 ` mtboehlke
@ 2021-08-10 16:49 ` mtboehlke
  2021-08-10 16:49 ` mtboehlke
                   ` (43 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-10 16:49 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 342 bytes --]

New review comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#discussion_r686146595

Comment:
I am pretty unfamiliar with out of tree builds, but does look like it supports it as long as the subdir is configured first.  I reworked the template a bit but this seems to be a good solution.

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: ngspice: update to 34
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (10 preceding siblings ...)
  2021-08-10 16:49 ` [PR REVIEW] " mtboehlke
@ 2021-08-10 16:49 ` mtboehlke
  2021-08-10 16:50 ` [PR REVIEW] " mtboehlke
                   ` (42 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-10 16:49 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 251 bytes --]

New comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#issuecomment-896143408

Comment:
I included the revbump to kicad.

What exactly would happen if we don't have ngspice depend on libngspice?

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PR REVIEW] ngspice: update to 34
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (11 preceding siblings ...)
  2021-08-10 16:49 ` mtboehlke
@ 2021-08-10 16:50 ` mtboehlke
  2021-08-10 16:50 ` mtboehlke
                   ` (41 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-10 16:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 154 bytes --]

New review comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#discussion_r686146728

Comment:
Fixed

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PR REVIEW] ngspice: update to 34
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (12 preceding siblings ...)
  2021-08-10 16:50 ` [PR REVIEW] " mtboehlke
@ 2021-08-10 16:50 ` mtboehlke
  2021-08-10 17:07 ` ericonr
                   ` (40 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-10 16:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 154 bytes --]

New review comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#discussion_r686146891

Comment:
Fixed

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: ngspice: update to 34
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (13 preceding siblings ...)
  2021-08-10 16:50 ` mtboehlke
@ 2021-08-10 17:07 ` ericonr
  2021-08-10 19:46 ` mtboehlke
                   ` (39 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: ericonr @ 2021-08-10 17:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 459 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#issuecomment-896159376

Comment:
> What exactly would happen if we don't have ngspice depend on libngspice?

Basically that someone who installed ngspice locally to use the libraries in their own projects would no longer be able to run them. That doesn't matter for most cases, since those people will usually have `ngspice-devel` installed as well.

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: ngspice: update to 34
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (14 preceding siblings ...)
  2021-08-10 17:07 ` ericonr
@ 2021-08-10 19:46 ` mtboehlke
  2021-08-11  1:39 ` ericonr
                   ` (38 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-10 19:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 348 bytes --]

New comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#issuecomment-896270350

Comment:
I see what you're saying.

As far as the checks go, apparently since v34 you have to add a .spiceinit file to the home directory containing `set ngbehavior=mc`.  They pass on my machine after doing that.

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: ngspice: update to 34
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (15 preceding siblings ...)
  2021-08-10 19:46 ` mtboehlke
@ 2021-08-11  1:39 ` ericonr
  2021-08-11 16:57 ` [PR PATCH] [Updated] " mtboehlke
                   ` (37 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: ericonr @ 2021-08-11  1:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 250 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#issuecomment-896432820

Comment:
You can create a `pre_check` exporting a custom `HOME` and creating the file, if you want to run the tests :)

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PR PATCH] [Updated] ngspice: update to 34
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (16 preceding siblings ...)
  2021-08-11  1:39 ` ericonr
@ 2021-08-11 16:57 ` mtboehlke
  2021-08-11 17:05 ` ngspice: update to 35 mtboehlke
                   ` (36 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-11 16:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1605 bytes --]

There is an updated pull request by mtboehlke against master on the void-packages repository

https://github.com/mtboehlke/void-packages master
https://github.com/void-linux/void-packages/pull/32403

ngspice: update to 34
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->
close #32251


A patch file from https://github.com/void-linux/void-packages/pull/32403.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-32403.patch --]
[-- Type: text/x-diff, Size: 4987 bytes --]

From a702fc2faca1901ee49f05f6727ba523ec2035d0 Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Sat, 7 Aug 2021 17:23:02 -0500
Subject: [PATCH 1/2] ngspice: update to 35

Also fixes issue with ngspice binary not being packaged.
Library is now moved to subpackage libngspice.
---
 common/shlibs                              |  2 +-
 srcpkgs/libngspice                         |  1 +
 srcpkgs/ngspice/patches/windows-only.patch | 15 --------
 srcpkgs/ngspice/template                   | 40 +++++++++++++++++++---
 4 files changed, 38 insertions(+), 20 deletions(-)
 create mode 120000 srcpkgs/libngspice
 delete mode 100644 srcpkgs/ngspice/patches/windows-only.patch

diff --git a/common/shlibs b/common/shlibs
index b8fda590d5f3..6045bed895d1 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3202,7 +3202,7 @@ libgloox.so.17 gloox-1.0.20_1
 libgsmsd.so.8 gammu-smsd-1.39.0_1
 libGammu.so.8 gammu-1.39.0_1
 libz3.so z3-4.6.0_2
-libngspice.so.0 ngspice-27_2
+libngspice.so.0 libngspice-35_1
 libvulkan.so.1 vulkan-loader-1.0.57.0_1
 libembb_mtapi_cpp.so embb-1.0.0_3
 libembb_mtapi_c.so embb-1.0.0_3
diff --git a/srcpkgs/libngspice b/srcpkgs/libngspice
new file mode 120000
index 000000000000..342fa057690d
--- /dev/null
+++ b/srcpkgs/libngspice
@@ -0,0 +1 @@
+ngspice
\ No newline at end of file
diff --git a/srcpkgs/ngspice/patches/windows-only.patch b/srcpkgs/ngspice/patches/windows-only.patch
deleted file mode 100644
index 8a9ead11e31f..000000000000
--- a/srcpkgs/ngspice/patches/windows-only.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-libshlwapi is Windows-only
-
-diff --git src/xspice/cmpp/Makefile.in src/xspice/cmpp/Makefile.in
-index b450e8c..2ea8716 100644
---- a/src/xspice/cmpp/Makefile.in
-+++ b/src/xspice/cmpp/Makefile.in
-@@ -753,7 +753,7 @@ ifs_yacc.c : ifs_yacc.y
- 
- @CROSS_COMPILING_TRUE@build/cmpp$(BUILD_EXEEXT) : $(BUILD_CMPP_FILES)
- @CROSS_COMPILING_TRUE@	$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) \
--@CROSS_COMPILING_TRUE@		$(AM_CPPFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ $^ -lshlwapi
-+@CROSS_COMPILING_TRUE@		$(AM_CPPFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ $^
- 
- @CROSS_COMPILING_TRUE@distclean-local:
- @CROSS_COMPILING_TRUE@	-rm -rf build
diff --git a/srcpkgs/ngspice/template b/srcpkgs/ngspice/template
index 05beffd8f841..04b1f73a63f6 100644
--- a/srcpkgs/ngspice/template
+++ b/srcpkgs/ngspice/template
@@ -1,28 +1,60 @@
 # Template file for 'ngspice'
 pkgname=ngspice
-version=33
+version=35
 revision=1
 build_style=gnu-configure
-configure_args="--with-readline=yes --with-ngshared --enable-xspice --enable-cider"
+configure_args="--with-readline=yes --enable-xspice --enable-cider"
+make_build_args="-C .build_lib"
 hostmakedepends="bison byacc"
 makedepends="readline-devel libX11-devel libXaw-devel"
+checkdepends="perl"
 short_desc="Mixed Mode Mixed Level Circuit Simulator based on Spice3F5"
 maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
 license="BSD-3-Clause"
 homepage="http://ngspice.sourceforge.net"
 distfiles="${SOURCEFORGE_SITE}/ngspice/ng-spice-rework/${version}/${pkgname}-${version}.tar.gz"
-checksum=b99db66cc1c57c44e9af1ef6ccb1dcbc8ae1df3e35acf570af578f606f8541f1
+checksum=c1b7f5c276db579acb3f0a7afb64afdeb4362289a6cab502d4ca302d6e5279ec
+
+# Configure can only handle building ngspice as a library or as a binary, but not both at once.
+# --with-ngshared builds the library, but not binary, and readline should not be configured for the library
+# see: https://github.com/imr/ngspice/commit/b86c85f85bbba6e45dc030af3e853edf8b9cfa3d
+pre_configure() {
+	install -d .build_lib
+	cd .build_lib
+	../configure --with-ngshared ${configure_args/--with-readline=yes/}
+}
+
+# library built during do_build, now build the binary
+post_build() {
+	unset make_build_args
+	do_build
+}
+
+pre_check() {
+	export HOME="$(pwd)/.home_dir"
+	install -d "$HOME"
+	printf 'set ngbehavior=mc\n' > "${HOME}/.spiceinit"
+}
 
 post_install() {
 	vlicense COPYING
+	cd .build_lib
+	do_install
 }
 
 ngspice-devel_package() {
 	short_desc+=" - development files"
-	depends="${sourcepkg}>=${version}_${revision}"
+	depends="libngspice>=${version}_${revision}"
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/*.so"
 		vmove usr/lib/pkgconfig
 	}
 }
+
+libngspice_package() {
+	short_desc+=" - library"
+	pkg_install() {
+		vmove "usr/lib/libngspice.so.*"
+	}
+}

From 44adc457c98a3d41ddc31a5828536a5d66ccc232 Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Wed, 11 Aug 2021 11:54:55 -0500
Subject: [PATCH 2/2] kicad: revbump to pick up libngspice

---
 srcpkgs/kicad/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kicad/template b/srcpkgs/kicad/template
index c56f7422dbed..850b573e6547 100644
--- a/srcpkgs/kicad/template
+++ b/srcpkgs/kicad/template
@@ -1,7 +1,7 @@
 # Template file for 'kicad'
 pkgname=kicad
 version=5.1.10
-revision=2
+revision=3
 build_style=cmake
 build_helper=cmake-wxWidgets-gtk3
 configure_args="-DKICAD_BUILD_VERSION=${version} -DKICAD_SCRIPTING=ON

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: ngspice: update to 35
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (17 preceding siblings ...)
  2021-08-11 16:57 ` [PR PATCH] [Updated] " mtboehlke
@ 2021-08-11 17:05 ` mtboehlke
  2021-08-11 17:07 ` mtboehlke
                   ` (35 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-11 17:05 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 564 bytes --]

New comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#issuecomment-896997155

Comment:
Well, while playing with this I noticed that version 35 has been released. Removing the erroneously included files is no longer needed.  Thanks for the tip for including pre_check!  The only thing I haven't included is a libngspice dependency in ngspice, since it doesn't really seem necessary and doubles the install size for those just looking to use ngspice (admittedly install size probably isn't a big deal either). 

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: ngspice: update to 35
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (18 preceding siblings ...)
  2021-08-11 17:05 ` ngspice: update to 35 mtboehlke
@ 2021-08-11 17:07 ` mtboehlke
  2021-08-12  1:07 ` [PR REVIEW] " ericonr
                   ` (34 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-11 17:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 611 bytes --]

New comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#issuecomment-896997155

Comment:
Well, while playing with this I noticed that version 35 has been released. Removing the erroneously included files is no longer needed.  Thanks for the tip for including pre_check!  The only thing I haven't included is a libngspice dependency in ngspice, since it doesn't really seem necessary and doubles the install size for those just looking to use ngspice (admittedly install size probably isn't a big deal either), but I can add it too if we want to go that way.

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PR REVIEW] ngspice: update to 35
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (20 preceding siblings ...)
  2021-08-12  1:07 ` [PR REVIEW] " ericonr
@ 2021-08-12  1:07 ` ericonr
  2021-08-12  1:07 ` ericonr
                   ` (32 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: ericonr @ 2021-08-12  1:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 193 bytes --]

New review comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#discussion_r687292983

Comment:
```suggestion
	make_build_args= do_build
```

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PR REVIEW] ngspice: update to 35
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (19 preceding siblings ...)
  2021-08-11 17:07 ` mtboehlke
@ 2021-08-12  1:07 ` ericonr
  2021-08-12  1:07 ` ericonr
                   ` (33 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: ericonr @ 2021-08-12  1:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 183 bytes --]

New review comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#discussion_r687292859

Comment:
Maybe have a comment here as to why?

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PR REVIEW] ngspice: update to 35
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (21 preceding siblings ...)
  2021-08-12  1:07 ` ericonr
@ 2021-08-12  1:07 ` ericonr
  2021-08-12  2:28 ` [PR PATCH] [Updated] " mtboehlke
                   ` (31 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: ericonr @ 2021-08-12  1:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 203 bytes --]

New review comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#discussion_r687292724

Comment:
Nit

```suggestion
	export HOME="$PWD/.home_dir"
```

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PR PATCH] [Updated] ngspice: update to 35
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (22 preceding siblings ...)
  2021-08-12  1:07 ` ericonr
@ 2021-08-12  2:28 ` mtboehlke
  2021-08-12  2:29 ` mtboehlke
                   ` (30 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-12  2:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1605 bytes --]

There is an updated pull request by mtboehlke against master on the void-packages repository

https://github.com/mtboehlke/void-packages master
https://github.com/void-linux/void-packages/pull/32403

ngspice: update to 35
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->
close #32251


A patch file from https://github.com/void-linux/void-packages/pull/32403.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-32403.patch --]
[-- Type: text/x-diff, Size: 5832 bytes --]

From a702fc2faca1901ee49f05f6727ba523ec2035d0 Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Sat, 7 Aug 2021 17:23:02 -0500
Subject: [PATCH 1/3] ngspice: update to 35

Also fixes issue with ngspice binary not being packaged.
Library is now moved to subpackage libngspice.
---
 common/shlibs                              |  2 +-
 srcpkgs/libngspice                         |  1 +
 srcpkgs/ngspice/patches/windows-only.patch | 15 --------
 srcpkgs/ngspice/template                   | 40 +++++++++++++++++++---
 4 files changed, 38 insertions(+), 20 deletions(-)
 create mode 120000 srcpkgs/libngspice
 delete mode 100644 srcpkgs/ngspice/patches/windows-only.patch

diff --git a/common/shlibs b/common/shlibs
index b8fda590d5f3..6045bed895d1 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3202,7 +3202,7 @@ libgloox.so.17 gloox-1.0.20_1
 libgsmsd.so.8 gammu-smsd-1.39.0_1
 libGammu.so.8 gammu-1.39.0_1
 libz3.so z3-4.6.0_2
-libngspice.so.0 ngspice-27_2
+libngspice.so.0 libngspice-35_1
 libvulkan.so.1 vulkan-loader-1.0.57.0_1
 libembb_mtapi_cpp.so embb-1.0.0_3
 libembb_mtapi_c.so embb-1.0.0_3
diff --git a/srcpkgs/libngspice b/srcpkgs/libngspice
new file mode 120000
index 000000000000..342fa057690d
--- /dev/null
+++ b/srcpkgs/libngspice
@@ -0,0 +1 @@
+ngspice
\ No newline at end of file
diff --git a/srcpkgs/ngspice/patches/windows-only.patch b/srcpkgs/ngspice/patches/windows-only.patch
deleted file mode 100644
index 8a9ead11e31f..000000000000
--- a/srcpkgs/ngspice/patches/windows-only.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-libshlwapi is Windows-only
-
-diff --git src/xspice/cmpp/Makefile.in src/xspice/cmpp/Makefile.in
-index b450e8c..2ea8716 100644
---- a/src/xspice/cmpp/Makefile.in
-+++ b/src/xspice/cmpp/Makefile.in
-@@ -753,7 +753,7 @@ ifs_yacc.c : ifs_yacc.y
- 
- @CROSS_COMPILING_TRUE@build/cmpp$(BUILD_EXEEXT) : $(BUILD_CMPP_FILES)
- @CROSS_COMPILING_TRUE@	$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) \
--@CROSS_COMPILING_TRUE@		$(AM_CPPFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ $^ -lshlwapi
-+@CROSS_COMPILING_TRUE@		$(AM_CPPFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ $^
- 
- @CROSS_COMPILING_TRUE@distclean-local:
- @CROSS_COMPILING_TRUE@	-rm -rf build
diff --git a/srcpkgs/ngspice/template b/srcpkgs/ngspice/template
index 05beffd8f841..04b1f73a63f6 100644
--- a/srcpkgs/ngspice/template
+++ b/srcpkgs/ngspice/template
@@ -1,28 +1,60 @@
 # Template file for 'ngspice'
 pkgname=ngspice
-version=33
+version=35
 revision=1
 build_style=gnu-configure
-configure_args="--with-readline=yes --with-ngshared --enable-xspice --enable-cider"
+configure_args="--with-readline=yes --enable-xspice --enable-cider"
+make_build_args="-C .build_lib"
 hostmakedepends="bison byacc"
 makedepends="readline-devel libX11-devel libXaw-devel"
+checkdepends="perl"
 short_desc="Mixed Mode Mixed Level Circuit Simulator based on Spice3F5"
 maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
 license="BSD-3-Clause"
 homepage="http://ngspice.sourceforge.net"
 distfiles="${SOURCEFORGE_SITE}/ngspice/ng-spice-rework/${version}/${pkgname}-${version}.tar.gz"
-checksum=b99db66cc1c57c44e9af1ef6ccb1dcbc8ae1df3e35acf570af578f606f8541f1
+checksum=c1b7f5c276db579acb3f0a7afb64afdeb4362289a6cab502d4ca302d6e5279ec
+
+# Configure can only handle building ngspice as a library or as a binary, but not both at once.
+# --with-ngshared builds the library, but not binary, and readline should not be configured for the library
+# see: https://github.com/imr/ngspice/commit/b86c85f85bbba6e45dc030af3e853edf8b9cfa3d
+pre_configure() {
+	install -d .build_lib
+	cd .build_lib
+	../configure --with-ngshared ${configure_args/--with-readline=yes/}
+}
+
+# library built during do_build, now build the binary
+post_build() {
+	unset make_build_args
+	do_build
+}
+
+pre_check() {
+	export HOME="$(pwd)/.home_dir"
+	install -d "$HOME"
+	printf 'set ngbehavior=mc\n' > "${HOME}/.spiceinit"
+}
 
 post_install() {
 	vlicense COPYING
+	cd .build_lib
+	do_install
 }
 
 ngspice-devel_package() {
 	short_desc+=" - development files"
-	depends="${sourcepkg}>=${version}_${revision}"
+	depends="libngspice>=${version}_${revision}"
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/*.so"
 		vmove usr/lib/pkgconfig
 	}
 }
+
+libngspice_package() {
+	short_desc+=" - library"
+	pkg_install() {
+		vmove "usr/lib/libngspice.so.*"
+	}
+}

From 44adc457c98a3d41ddc31a5828536a5d66ccc232 Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Wed, 11 Aug 2021 11:54:55 -0500
Subject: [PATCH 2/3] kicad: revbump to pick up libngspice

---
 srcpkgs/kicad/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kicad/template b/srcpkgs/kicad/template
index c56f7422dbed..850b573e6547 100644
--- a/srcpkgs/kicad/template
+++ b/srcpkgs/kicad/template
@@ -1,7 +1,7 @@
 # Template file for 'kicad'
 pkgname=kicad
 version=5.1.10
-revision=2
+revision=3
 build_style=cmake
 build_helper=cmake-wxWidgets-gtk3
 configure_args="-DKICAD_BUILD_VERSION=${version} -DKICAD_SCRIPTING=ON

From a06704aa3b417a87b3a9cf25504afc7d9138ce76 Mon Sep 17 00:00:00 2001
From: mtboehlke <42847685+mtboehlke@users.noreply.github.com>
Date: Wed, 11 Aug 2021 21:28:41 -0500
Subject: [PATCH 3/3] Update srcpkgs/ngspice/template
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Co-authored-by: Érico Nogueira Rolim <34201958+ericonr@users.noreply.github.com>
---
 srcpkgs/ngspice/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ngspice/template b/srcpkgs/ngspice/template
index 04b1f73a63f6..757898ecce6d 100644
--- a/srcpkgs/ngspice/template
+++ b/srcpkgs/ngspice/template
@@ -31,7 +31,7 @@ post_build() {
 }
 
 pre_check() {
-	export HOME="$(pwd)/.home_dir"
+	export HOME="$PWD/.home_dir"
 	install -d "$HOME"
 	printf 'set ngbehavior=mc\n' > "${HOME}/.spiceinit"
 }

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PR PATCH] [Updated] ngspice: update to 35
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (23 preceding siblings ...)
  2021-08-12  2:28 ` [PR PATCH] [Updated] " mtboehlke
@ 2021-08-12  2:29 ` mtboehlke
  2021-08-12  2:29 ` mtboehlke
                   ` (29 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-12  2:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1605 bytes --]

There is an updated pull request by mtboehlke against master on the void-packages repository

https://github.com/mtboehlke/void-packages master
https://github.com/void-linux/void-packages/pull/32403

ngspice: update to 35
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->
close #32251


A patch file from https://github.com/void-linux/void-packages/pull/32403.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-32403.patch --]
[-- Type: text/x-diff, Size: 6676 bytes --]

From a702fc2faca1901ee49f05f6727ba523ec2035d0 Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Sat, 7 Aug 2021 17:23:02 -0500
Subject: [PATCH 1/4] ngspice: update to 35

Also fixes issue with ngspice binary not being packaged.
Library is now moved to subpackage libngspice.
---
 common/shlibs                              |  2 +-
 srcpkgs/libngspice                         |  1 +
 srcpkgs/ngspice/patches/windows-only.patch | 15 --------
 srcpkgs/ngspice/template                   | 40 +++++++++++++++++++---
 4 files changed, 38 insertions(+), 20 deletions(-)
 create mode 120000 srcpkgs/libngspice
 delete mode 100644 srcpkgs/ngspice/patches/windows-only.patch

diff --git a/common/shlibs b/common/shlibs
index b8fda590d5f3..6045bed895d1 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3202,7 +3202,7 @@ libgloox.so.17 gloox-1.0.20_1
 libgsmsd.so.8 gammu-smsd-1.39.0_1
 libGammu.so.8 gammu-1.39.0_1
 libz3.so z3-4.6.0_2
-libngspice.so.0 ngspice-27_2
+libngspice.so.0 libngspice-35_1
 libvulkan.so.1 vulkan-loader-1.0.57.0_1
 libembb_mtapi_cpp.so embb-1.0.0_3
 libembb_mtapi_c.so embb-1.0.0_3
diff --git a/srcpkgs/libngspice b/srcpkgs/libngspice
new file mode 120000
index 000000000000..342fa057690d
--- /dev/null
+++ b/srcpkgs/libngspice
@@ -0,0 +1 @@
+ngspice
\ No newline at end of file
diff --git a/srcpkgs/ngspice/patches/windows-only.patch b/srcpkgs/ngspice/patches/windows-only.patch
deleted file mode 100644
index 8a9ead11e31f..000000000000
--- a/srcpkgs/ngspice/patches/windows-only.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-libshlwapi is Windows-only
-
-diff --git src/xspice/cmpp/Makefile.in src/xspice/cmpp/Makefile.in
-index b450e8c..2ea8716 100644
---- a/src/xspice/cmpp/Makefile.in
-+++ b/src/xspice/cmpp/Makefile.in
-@@ -753,7 +753,7 @@ ifs_yacc.c : ifs_yacc.y
- 
- @CROSS_COMPILING_TRUE@build/cmpp$(BUILD_EXEEXT) : $(BUILD_CMPP_FILES)
- @CROSS_COMPILING_TRUE@	$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) \
--@CROSS_COMPILING_TRUE@		$(AM_CPPFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ $^ -lshlwapi
-+@CROSS_COMPILING_TRUE@		$(AM_CPPFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ $^
- 
- @CROSS_COMPILING_TRUE@distclean-local:
- @CROSS_COMPILING_TRUE@	-rm -rf build
diff --git a/srcpkgs/ngspice/template b/srcpkgs/ngspice/template
index 05beffd8f841..04b1f73a63f6 100644
--- a/srcpkgs/ngspice/template
+++ b/srcpkgs/ngspice/template
@@ -1,28 +1,60 @@
 # Template file for 'ngspice'
 pkgname=ngspice
-version=33
+version=35
 revision=1
 build_style=gnu-configure
-configure_args="--with-readline=yes --with-ngshared --enable-xspice --enable-cider"
+configure_args="--with-readline=yes --enable-xspice --enable-cider"
+make_build_args="-C .build_lib"
 hostmakedepends="bison byacc"
 makedepends="readline-devel libX11-devel libXaw-devel"
+checkdepends="perl"
 short_desc="Mixed Mode Mixed Level Circuit Simulator based on Spice3F5"
 maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
 license="BSD-3-Clause"
 homepage="http://ngspice.sourceforge.net"
 distfiles="${SOURCEFORGE_SITE}/ngspice/ng-spice-rework/${version}/${pkgname}-${version}.tar.gz"
-checksum=b99db66cc1c57c44e9af1ef6ccb1dcbc8ae1df3e35acf570af578f606f8541f1
+checksum=c1b7f5c276db579acb3f0a7afb64afdeb4362289a6cab502d4ca302d6e5279ec
+
+# Configure can only handle building ngspice as a library or as a binary, but not both at once.
+# --with-ngshared builds the library, but not binary, and readline should not be configured for the library
+# see: https://github.com/imr/ngspice/commit/b86c85f85bbba6e45dc030af3e853edf8b9cfa3d
+pre_configure() {
+	install -d .build_lib
+	cd .build_lib
+	../configure --with-ngshared ${configure_args/--with-readline=yes/}
+}
+
+# library built during do_build, now build the binary
+post_build() {
+	unset make_build_args
+	do_build
+}
+
+pre_check() {
+	export HOME="$(pwd)/.home_dir"
+	install -d "$HOME"
+	printf 'set ngbehavior=mc\n' > "${HOME}/.spiceinit"
+}
 
 post_install() {
 	vlicense COPYING
+	cd .build_lib
+	do_install
 }
 
 ngspice-devel_package() {
 	short_desc+=" - development files"
-	depends="${sourcepkg}>=${version}_${revision}"
+	depends="libngspice>=${version}_${revision}"
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/*.so"
 		vmove usr/lib/pkgconfig
 	}
 }
+
+libngspice_package() {
+	short_desc+=" - library"
+	pkg_install() {
+		vmove "usr/lib/libngspice.so.*"
+	}
+}

From 44adc457c98a3d41ddc31a5828536a5d66ccc232 Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Wed, 11 Aug 2021 11:54:55 -0500
Subject: [PATCH 2/4] kicad: revbump to pick up libngspice

---
 srcpkgs/kicad/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kicad/template b/srcpkgs/kicad/template
index c56f7422dbed..850b573e6547 100644
--- a/srcpkgs/kicad/template
+++ b/srcpkgs/kicad/template
@@ -1,7 +1,7 @@
 # Template file for 'kicad'
 pkgname=kicad
 version=5.1.10
-revision=2
+revision=3
 build_style=cmake
 build_helper=cmake-wxWidgets-gtk3
 configure_args="-DKICAD_BUILD_VERSION=${version} -DKICAD_SCRIPTING=ON

From a06704aa3b417a87b3a9cf25504afc7d9138ce76 Mon Sep 17 00:00:00 2001
From: mtboehlke <42847685+mtboehlke@users.noreply.github.com>
Date: Wed, 11 Aug 2021 21:28:41 -0500
Subject: [PATCH 3/4] Update srcpkgs/ngspice/template
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Co-authored-by: Érico Nogueira Rolim <34201958+ericonr@users.noreply.github.com>
---
 srcpkgs/ngspice/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ngspice/template b/srcpkgs/ngspice/template
index 04b1f73a63f6..757898ecce6d 100644
--- a/srcpkgs/ngspice/template
+++ b/srcpkgs/ngspice/template
@@ -31,7 +31,7 @@ post_build() {
 }
 
 pre_check() {
-	export HOME="$(pwd)/.home_dir"
+	export HOME="$PWD/.home_dir"
 	install -d "$HOME"
 	printf 'set ngbehavior=mc\n' > "${HOME}/.spiceinit"
 }

From 582b55f759c2e7aaeec921e8343972eb87acb9a7 Mon Sep 17 00:00:00 2001
From: mtboehlke <42847685+mtboehlke@users.noreply.github.com>
Date: Wed, 11 Aug 2021 21:28:59 -0500
Subject: [PATCH 4/4] Update srcpkgs/ngspice/template
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Co-authored-by: Érico Nogueira Rolim <34201958+ericonr@users.noreply.github.com>
---
 srcpkgs/ngspice/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/ngspice/template b/srcpkgs/ngspice/template
index 757898ecce6d..eb2ea775f149 100644
--- a/srcpkgs/ngspice/template
+++ b/srcpkgs/ngspice/template
@@ -26,8 +26,7 @@ pre_configure() {
 
 # library built during do_build, now build the binary
 post_build() {
-	unset make_build_args
-	do_build
+	make_build_args= do_build
 }
 
 pre_check() {

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PR PATCH] [Updated] ngspice: update to 35
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (24 preceding siblings ...)
  2021-08-12  2:29 ` mtboehlke
@ 2021-08-12  2:29 ` mtboehlke
  2021-08-12  2:53 ` mtboehlke
                   ` (28 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-12  2:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1605 bytes --]

There is an updated pull request by mtboehlke against master on the void-packages repository

https://github.com/mtboehlke/void-packages master
https://github.com/void-linux/void-packages/pull/32403

ngspice: update to 35
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->
close #32251


A patch file from https://github.com/void-linux/void-packages/pull/32403.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-32403.patch --]
[-- Type: text/x-diff, Size: 6676 bytes --]

From a702fc2faca1901ee49f05f6727ba523ec2035d0 Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Sat, 7 Aug 2021 17:23:02 -0500
Subject: [PATCH 1/4] ngspice: update to 35

Also fixes issue with ngspice binary not being packaged.
Library is now moved to subpackage libngspice.
---
 common/shlibs                              |  2 +-
 srcpkgs/libngspice                         |  1 +
 srcpkgs/ngspice/patches/windows-only.patch | 15 --------
 srcpkgs/ngspice/template                   | 40 +++++++++++++++++++---
 4 files changed, 38 insertions(+), 20 deletions(-)
 create mode 120000 srcpkgs/libngspice
 delete mode 100644 srcpkgs/ngspice/patches/windows-only.patch

diff --git a/common/shlibs b/common/shlibs
index b8fda590d5f3..6045bed895d1 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3202,7 +3202,7 @@ libgloox.so.17 gloox-1.0.20_1
 libgsmsd.so.8 gammu-smsd-1.39.0_1
 libGammu.so.8 gammu-1.39.0_1
 libz3.so z3-4.6.0_2
-libngspice.so.0 ngspice-27_2
+libngspice.so.0 libngspice-35_1
 libvulkan.so.1 vulkan-loader-1.0.57.0_1
 libembb_mtapi_cpp.so embb-1.0.0_3
 libembb_mtapi_c.so embb-1.0.0_3
diff --git a/srcpkgs/libngspice b/srcpkgs/libngspice
new file mode 120000
index 000000000000..342fa057690d
--- /dev/null
+++ b/srcpkgs/libngspice
@@ -0,0 +1 @@
+ngspice
\ No newline at end of file
diff --git a/srcpkgs/ngspice/patches/windows-only.patch b/srcpkgs/ngspice/patches/windows-only.patch
deleted file mode 100644
index 8a9ead11e31f..000000000000
--- a/srcpkgs/ngspice/patches/windows-only.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-libshlwapi is Windows-only
-
-diff --git src/xspice/cmpp/Makefile.in src/xspice/cmpp/Makefile.in
-index b450e8c..2ea8716 100644
---- a/src/xspice/cmpp/Makefile.in
-+++ b/src/xspice/cmpp/Makefile.in
-@@ -753,7 +753,7 @@ ifs_yacc.c : ifs_yacc.y
- 
- @CROSS_COMPILING_TRUE@build/cmpp$(BUILD_EXEEXT) : $(BUILD_CMPP_FILES)
- @CROSS_COMPILING_TRUE@	$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) \
--@CROSS_COMPILING_TRUE@		$(AM_CPPFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ $^ -lshlwapi
-+@CROSS_COMPILING_TRUE@		$(AM_CPPFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ $^
- 
- @CROSS_COMPILING_TRUE@distclean-local:
- @CROSS_COMPILING_TRUE@	-rm -rf build
diff --git a/srcpkgs/ngspice/template b/srcpkgs/ngspice/template
index 05beffd8f841..04b1f73a63f6 100644
--- a/srcpkgs/ngspice/template
+++ b/srcpkgs/ngspice/template
@@ -1,28 +1,60 @@
 # Template file for 'ngspice'
 pkgname=ngspice
-version=33
+version=35
 revision=1
 build_style=gnu-configure
-configure_args="--with-readline=yes --with-ngshared --enable-xspice --enable-cider"
+configure_args="--with-readline=yes --enable-xspice --enable-cider"
+make_build_args="-C .build_lib"
 hostmakedepends="bison byacc"
 makedepends="readline-devel libX11-devel libXaw-devel"
+checkdepends="perl"
 short_desc="Mixed Mode Mixed Level Circuit Simulator based on Spice3F5"
 maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
 license="BSD-3-Clause"
 homepage="http://ngspice.sourceforge.net"
 distfiles="${SOURCEFORGE_SITE}/ngspice/ng-spice-rework/${version}/${pkgname}-${version}.tar.gz"
-checksum=b99db66cc1c57c44e9af1ef6ccb1dcbc8ae1df3e35acf570af578f606f8541f1
+checksum=c1b7f5c276db579acb3f0a7afb64afdeb4362289a6cab502d4ca302d6e5279ec
+
+# Configure can only handle building ngspice as a library or as a binary, but not both at once.
+# --with-ngshared builds the library, but not binary, and readline should not be configured for the library
+# see: https://github.com/imr/ngspice/commit/b86c85f85bbba6e45dc030af3e853edf8b9cfa3d
+pre_configure() {
+	install -d .build_lib
+	cd .build_lib
+	../configure --with-ngshared ${configure_args/--with-readline=yes/}
+}
+
+# library built during do_build, now build the binary
+post_build() {
+	unset make_build_args
+	do_build
+}
+
+pre_check() {
+	export HOME="$(pwd)/.home_dir"
+	install -d "$HOME"
+	printf 'set ngbehavior=mc\n' > "${HOME}/.spiceinit"
+}
 
 post_install() {
 	vlicense COPYING
+	cd .build_lib
+	do_install
 }
 
 ngspice-devel_package() {
 	short_desc+=" - development files"
-	depends="${sourcepkg}>=${version}_${revision}"
+	depends="libngspice>=${version}_${revision}"
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/*.so"
 		vmove usr/lib/pkgconfig
 	}
 }
+
+libngspice_package() {
+	short_desc+=" - library"
+	pkg_install() {
+		vmove "usr/lib/libngspice.so.*"
+	}
+}

From 44adc457c98a3d41ddc31a5828536a5d66ccc232 Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Wed, 11 Aug 2021 11:54:55 -0500
Subject: [PATCH 2/4] kicad: revbump to pick up libngspice

---
 srcpkgs/kicad/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kicad/template b/srcpkgs/kicad/template
index c56f7422dbed..850b573e6547 100644
--- a/srcpkgs/kicad/template
+++ b/srcpkgs/kicad/template
@@ -1,7 +1,7 @@
 # Template file for 'kicad'
 pkgname=kicad
 version=5.1.10
-revision=2
+revision=3
 build_style=cmake
 build_helper=cmake-wxWidgets-gtk3
 configure_args="-DKICAD_BUILD_VERSION=${version} -DKICAD_SCRIPTING=ON

From a06704aa3b417a87b3a9cf25504afc7d9138ce76 Mon Sep 17 00:00:00 2001
From: mtboehlke <42847685+mtboehlke@users.noreply.github.com>
Date: Wed, 11 Aug 2021 21:28:41 -0500
Subject: [PATCH 3/4] Update srcpkgs/ngspice/template
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Co-authored-by: Érico Nogueira Rolim <34201958+ericonr@users.noreply.github.com>
---
 srcpkgs/ngspice/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ngspice/template b/srcpkgs/ngspice/template
index 04b1f73a63f6..757898ecce6d 100644
--- a/srcpkgs/ngspice/template
+++ b/srcpkgs/ngspice/template
@@ -31,7 +31,7 @@ post_build() {
 }
 
 pre_check() {
-	export HOME="$(pwd)/.home_dir"
+	export HOME="$PWD/.home_dir"
 	install -d "$HOME"
 	printf 'set ngbehavior=mc\n' > "${HOME}/.spiceinit"
 }

From 582b55f759c2e7aaeec921e8343972eb87acb9a7 Mon Sep 17 00:00:00 2001
From: mtboehlke <42847685+mtboehlke@users.noreply.github.com>
Date: Wed, 11 Aug 2021 21:28:59 -0500
Subject: [PATCH 4/4] Update srcpkgs/ngspice/template
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Co-authored-by: Érico Nogueira Rolim <34201958+ericonr@users.noreply.github.com>
---
 srcpkgs/ngspice/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/ngspice/template b/srcpkgs/ngspice/template
index 757898ecce6d..eb2ea775f149 100644
--- a/srcpkgs/ngspice/template
+++ b/srcpkgs/ngspice/template
@@ -26,8 +26,7 @@ pre_configure() {
 
 # library built during do_build, now build the binary
 post_build() {
-	unset make_build_args
-	do_build
+	make_build_args= do_build
 }
 
 pre_check() {

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PR PATCH] [Updated] ngspice: update to 35
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (25 preceding siblings ...)
  2021-08-12  2:29 ` mtboehlke
@ 2021-08-12  2:53 ` mtboehlke
  2021-08-12  2:56 ` [PR REVIEW] " mtboehlke
                   ` (27 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-12  2:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1605 bytes --]

There is an updated pull request by mtboehlke against master on the void-packages repository

https://github.com/mtboehlke/void-packages master
https://github.com/void-linux/void-packages/pull/32403

ngspice: update to 35
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->
close #32251


A patch file from https://github.com/void-linux/void-packages/pull/32403.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-32403.patch --]
[-- Type: text/x-diff, Size: 5192 bytes --]

From f4f0cc4d5d681073654e5e58aa00f0fa10babd9f Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Sat, 7 Aug 2021 17:23:02 -0500
Subject: [PATCH 1/2] ngspice: update to 35

Also fixes issue with ngspice binary not being packaged.
Library is now moved to subpackage libngspice.
---
 common/shlibs                              |  2 +-
 srcpkgs/libngspice                         |  1 +
 srcpkgs/ngspice/patches/windows-only.patch | 15 --------
 srcpkgs/ngspice/template                   | 42 +++++++++++++++++++---
 4 files changed, 40 insertions(+), 20 deletions(-)
 create mode 120000 srcpkgs/libngspice
 delete mode 100644 srcpkgs/ngspice/patches/windows-only.patch

diff --git a/common/shlibs b/common/shlibs
index b8fda590d5f3..6045bed895d1 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3202,7 +3202,7 @@ libgloox.so.17 gloox-1.0.20_1
 libgsmsd.so.8 gammu-smsd-1.39.0_1
 libGammu.so.8 gammu-1.39.0_1
 libz3.so z3-4.6.0_2
-libngspice.so.0 ngspice-27_2
+libngspice.so.0 libngspice-35_1
 libvulkan.so.1 vulkan-loader-1.0.57.0_1
 libembb_mtapi_cpp.so embb-1.0.0_3
 libembb_mtapi_c.so embb-1.0.0_3
diff --git a/srcpkgs/libngspice b/srcpkgs/libngspice
new file mode 120000
index 000000000000..342fa057690d
--- /dev/null
+++ b/srcpkgs/libngspice
@@ -0,0 +1 @@
+ngspice
\ No newline at end of file
diff --git a/srcpkgs/ngspice/patches/windows-only.patch b/srcpkgs/ngspice/patches/windows-only.patch
deleted file mode 100644
index 8a9ead11e31f..000000000000
--- a/srcpkgs/ngspice/patches/windows-only.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-libshlwapi is Windows-only
-
-diff --git src/xspice/cmpp/Makefile.in src/xspice/cmpp/Makefile.in
-index b450e8c..2ea8716 100644
---- a/src/xspice/cmpp/Makefile.in
-+++ b/src/xspice/cmpp/Makefile.in
-@@ -753,7 +753,7 @@ ifs_yacc.c : ifs_yacc.y
- 
- @CROSS_COMPILING_TRUE@build/cmpp$(BUILD_EXEEXT) : $(BUILD_CMPP_FILES)
- @CROSS_COMPILING_TRUE@	$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) \
--@CROSS_COMPILING_TRUE@		$(AM_CPPFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ $^ -lshlwapi
-+@CROSS_COMPILING_TRUE@		$(AM_CPPFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ $^
- 
- @CROSS_COMPILING_TRUE@distclean-local:
- @CROSS_COMPILING_TRUE@	-rm -rf build
diff --git a/srcpkgs/ngspice/template b/srcpkgs/ngspice/template
index 05beffd8f841..372184145235 100644
--- a/srcpkgs/ngspice/template
+++ b/srcpkgs/ngspice/template
@@ -1,28 +1,62 @@
 # Template file for 'ngspice'
 pkgname=ngspice
-version=33
+version=35
 revision=1
 build_style=gnu-configure
-configure_args="--with-readline=yes --with-ngshared --enable-xspice --enable-cider"
+configure_args="--with-readline=yes --enable-xspice --enable-cider"
+make_build_args="-C .build_lib"
 hostmakedepends="bison byacc"
 makedepends="readline-devel libX11-devel libXaw-devel"
+checkdepends="perl"
 short_desc="Mixed Mode Mixed Level Circuit Simulator based on Spice3F5"
 maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
 license="BSD-3-Clause"
 homepage="http://ngspice.sourceforge.net"
 distfiles="${SOURCEFORGE_SITE}/ngspice/ng-spice-rework/${version}/${pkgname}-${version}.tar.gz"
-checksum=b99db66cc1c57c44e9af1ef6ccb1dcbc8ae1df3e35acf570af578f606f8541f1
+checksum=c1b7f5c276db579acb3f0a7afb64afdeb4362289a6cab502d4ca302d6e5279ec
+
+# Configure can handle building ngspice as a library or as a binary, but not both at once.
+# --with-ngshared builds the library, but not binary, and readline should not be configured for the library,
+# see: https://github.com/imr/ngspice/commit/b86c85f85bbba6e45dc030af3e853edf8b9cfa3d
+pre_configure() {
+	install -d .build_lib
+	cd .build_lib
+	../configure --with-ngshared ${configure_args/--with-readline=yes/}
+}
+
+# library built during first do_build, now build the binary
+post_build() {
+	make_build_args= do_build
+}
+
+# Starting with v34, some tests fail with "No compatability mode selected!"
+# Solution is to add this line to a .spiceinit file in the home directory,
+# see: https://sourceforge.net/p/ngspice/bugs/554/#b513
+pre_check() {
+	export HOME="${PWD}/.home_dir"
+	install -d "$HOME"
+	printf 'set ngbehavior=mc\n' > "${HOME}/.spiceinit"
+}
 
 post_install() {
 	vlicense COPYING
+	cd .build_lib
+	do_install
 }
 
 ngspice-devel_package() {
 	short_desc+=" - development files"
-	depends="${sourcepkg}>=${version}_${revision}"
+	depends="libngspice>=${version}_${revision}"
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/*.so"
 		vmove usr/lib/pkgconfig
 	}
 }
+
+libngspice_package() {
+	short_desc+=" - library"
+	pkg_install() {
+		vmove "usr/lib/libngspice.so.*"
+	}
+}

From c23864c303ce4bf57400aa06cd0a5df68767637e Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Wed, 11 Aug 2021 21:51:17 -0500
Subject: [PATCH 2/2] kicad: revbump to pick up libngspice

---
 srcpkgs/kicad/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kicad/template b/srcpkgs/kicad/template
index c56f7422dbed..850b573e6547 100644
--- a/srcpkgs/kicad/template
+++ b/srcpkgs/kicad/template
@@ -1,7 +1,7 @@
 # Template file for 'kicad'
 pkgname=kicad
 version=5.1.10
-revision=2
+revision=3
 build_style=cmake
 build_helper=cmake-wxWidgets-gtk3
 configure_args="-DKICAD_BUILD_VERSION=${version} -DKICAD_SCRIPTING=ON

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PR REVIEW] ngspice: update to 35
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (26 preceding siblings ...)
  2021-08-12  2:53 ` mtboehlke
@ 2021-08-12  2:56 ` mtboehlke
  2021-08-12  3:02 ` mtboehlke
                   ` (26 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-12  2:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 159 bytes --]

New review comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#discussion_r687329517

Comment:
Good call.

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: ngspice: update to 35
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (27 preceding siblings ...)
  2021-08-12  2:56 ` [PR REVIEW] " mtboehlke
@ 2021-08-12  3:02 ` mtboehlke
  2021-08-12  3:07 ` [PR REVIEW] " sgn
                   ` (25 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-12  3:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 145 bytes --]

New comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#issuecomment-897310412

Comment:
:)

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PR REVIEW] ngspice: update to 35
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (28 preceding siblings ...)
  2021-08-12  3:02 ` mtboehlke
@ 2021-08-12  3:07 ` sgn
  2021-08-12  3:07 ` sgn
                   ` (24 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: sgn @ 2021-08-12  3:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 490 bytes --]

New review comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#discussion_r687332275

Comment:
I think it's better to remove `--with-readline=yes` from `configure_args` then
```suggestion
do_configure() {
	mkdir build-lib
	cd build-lib
	../configure --with-ngshared ${configure_args}
	mkdir build
	../configure --with-readline=yes ${configure_args}
}

do_build() {
	make -C build-lib ${makejobs}
	make -C build ${makejobs}
}
```

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PR REVIEW] ngspice: update to 35
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (29 preceding siblings ...)
  2021-08-12  3:07 ` [PR REVIEW] " sgn
@ 2021-08-12  3:07 ` sgn
  2021-08-12  3:26 ` mtboehlke
                   ` (23 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: sgn @ 2021-08-12  3:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 257 bytes --]

New review comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#discussion_r687332559

Comment:
And:
```suggestion
do_install() {
	make -C build-lib install
	make -C build install
	vlicense COPYING
}
```

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PR REVIEW] ngspice: update to 35
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (30 preceding siblings ...)
  2021-08-12  3:07 ` sgn
@ 2021-08-12  3:26 ` mtboehlke
  2021-08-12  3:29 ` mtboehlke
                   ` (22 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-12  3:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 297 bytes --]

New review comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#discussion_r687347367

Comment:
It does seem clearer this way.  I kind of liked not touching do_install, etc., to keep defaults and things, but maybe that's just obscuring things.`

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PR REVIEW] ngspice: update to 35
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (31 preceding siblings ...)
  2021-08-12  3:26 ` mtboehlke
@ 2021-08-12  3:29 ` mtboehlke
  2021-08-12 23:53 ` [PR PATCH] [Updated] " mtboehlke
                   ` (21 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-12  3:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 314 bytes --]

New review comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#discussion_r687347367

Comment:
It does seem clearer this way.  I kind of liked not touching do_install, etc., to keep defaults and things, but maybe it just makes it a bit confusing at this point.

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PR PATCH] [Updated] ngspice: update to 35
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (32 preceding siblings ...)
  2021-08-12  3:29 ` mtboehlke
@ 2021-08-12 23:53 ` mtboehlke
  2021-08-12 23:55 ` [PR REVIEW] " mtboehlke
                   ` (20 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-12 23:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1605 bytes --]

There is an updated pull request by mtboehlke against master on the void-packages repository

https://github.com/mtboehlke/void-packages master
https://github.com/void-linux/void-packages/pull/32403

ngspice: update to 35
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->
close #32251


A patch file from https://github.com/void-linux/void-packages/pull/32403.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-32403.patch --]
[-- Type: text/x-diff, Size: 5212 bytes --]

From 7b9cb0b34df22428d4cc3b780f8ffad159656775 Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Sat, 7 Aug 2021 17:23:02 -0500
Subject: [PATCH 1/2] ngspice: update to 35

Also fixes issue with ngspice binary not being packaged.
Library is now moved to subpackage libngspice.
---
 common/shlibs                              |  2 +-
 srcpkgs/libngspice                         |  1 +
 srcpkgs/ngspice/patches/windows-only.patch | 15 -------
 srcpkgs/ngspice/template                   | 47 +++++++++++++++++++---
 4 files changed, 44 insertions(+), 21 deletions(-)
 create mode 120000 srcpkgs/libngspice
 delete mode 100644 srcpkgs/ngspice/patches/windows-only.patch

diff --git a/common/shlibs b/common/shlibs
index b8fda590d5f3..6045bed895d1 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3202,7 +3202,7 @@ libgloox.so.17 gloox-1.0.20_1
 libgsmsd.so.8 gammu-smsd-1.39.0_1
 libGammu.so.8 gammu-1.39.0_1
 libz3.so z3-4.6.0_2
-libngspice.so.0 ngspice-27_2
+libngspice.so.0 libngspice-35_1
 libvulkan.so.1 vulkan-loader-1.0.57.0_1
 libembb_mtapi_cpp.so embb-1.0.0_3
 libembb_mtapi_c.so embb-1.0.0_3
diff --git a/srcpkgs/libngspice b/srcpkgs/libngspice
new file mode 120000
index 000000000000..342fa057690d
--- /dev/null
+++ b/srcpkgs/libngspice
@@ -0,0 +1 @@
+ngspice
\ No newline at end of file
diff --git a/srcpkgs/ngspice/patches/windows-only.patch b/srcpkgs/ngspice/patches/windows-only.patch
deleted file mode 100644
index 8a9ead11e31f..000000000000
--- a/srcpkgs/ngspice/patches/windows-only.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-libshlwapi is Windows-only
-
-diff --git src/xspice/cmpp/Makefile.in src/xspice/cmpp/Makefile.in
-index b450e8c..2ea8716 100644
---- a/src/xspice/cmpp/Makefile.in
-+++ b/src/xspice/cmpp/Makefile.in
-@@ -753,7 +753,7 @@ ifs_yacc.c : ifs_yacc.y
- 
- @CROSS_COMPILING_TRUE@build/cmpp$(BUILD_EXEEXT) : $(BUILD_CMPP_FILES)
- @CROSS_COMPILING_TRUE@	$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) \
--@CROSS_COMPILING_TRUE@		$(AM_CPPFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ $^ -lshlwapi
-+@CROSS_COMPILING_TRUE@		$(AM_CPPFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ $^
- 
- @CROSS_COMPILING_TRUE@distclean-local:
- @CROSS_COMPILING_TRUE@	-rm -rf build
diff --git a/srcpkgs/ngspice/template b/srcpkgs/ngspice/template
index 05beffd8f841..fc34417db5c5 100644
--- a/srcpkgs/ngspice/template
+++ b/srcpkgs/ngspice/template
@@ -1,28 +1,65 @@
 # Template file for 'ngspice'
 pkgname=ngspice
-version=33
+version=35
 revision=1
 build_style=gnu-configure
-configure_args="--with-readline=yes --with-ngshared --enable-xspice --enable-cider"
+configure_args="--enable-xspice --enable-cider"
 hostmakedepends="bison byacc"
 makedepends="readline-devel libX11-devel libXaw-devel"
+checkdepends="perl"
 short_desc="Mixed Mode Mixed Level Circuit Simulator based on Spice3F5"
 maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
 license="BSD-3-Clause"
 homepage="http://ngspice.sourceforge.net"
 distfiles="${SOURCEFORGE_SITE}/ngspice/ng-spice-rework/${version}/${pkgname}-${version}.tar.gz"
-checksum=b99db66cc1c57c44e9af1ef6ccb1dcbc8ae1df3e35acf570af578f606f8541f1
+checksum=c1b7f5c276db579acb3f0a7afb64afdeb4362289a6cab502d4ca302d6e5279ec
 
-post_install() {
+# ngshared binary and shared library can't be built in the same pass
+# --ngshared builds the shared library, and readline should only be enabled for the binary
+# see: https://github.com/imr/ngspice/commit/b86c85f85bbba6e45dc030af3e853edf8b9cfa3d
+do_configure() {
+	mkdir build
+	cd build
+	../configure --with-readline=yes $configure_args
+	mkdir ../build-lib
+	cd ../build-lib
+	../configure --with-ngshared $configure_args
+}
+
+do_build() {
+	make -C build $makejobs
+	make -C build-lib $makejobs
+}
+
+# Starting with v34, some tests fail with "No compatability mode selected!"
+# Solution is to add this line to a .spiceinit file in the home directory,
+# see: https://sourceforge.net/p/ngspice/bugs/554/#b513
+do_check() {
+	export HOME="${PWD}/.home_dir"
+	install -d "$HOME"
+	printf 'set ngbehavior=mc\n' > "${HOME}/.spiceinit"
+	make -C build check
+}
+
+do_install() {
+	make DESTDIR=${DESTDIR} -C build install
+	make DESTDIR=${DESTDIR} -C build-lib install
 	vlicense COPYING
 }
 
 ngspice-devel_package() {
 	short_desc+=" - development files"
-	depends="${sourcepkg}>=${version}_${revision}"
+	depends="libngspice>=${version}_${revision}"
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/*.so"
 		vmove usr/lib/pkgconfig
 	}
 }
+
+libngspice_package() {
+	short_desc+=" - library"
+	pkg_install() {
+		vmove "usr/lib/libngspice.so.*"
+	}
+}

From d60fe18bfb1658bbc28acee22b6cdca6b4c4d7e8 Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Thu, 12 Aug 2021 18:52:40 -0500
Subject: [PATCH 2/2] kicad: revbump to pick up libngspice

---
 srcpkgs/kicad/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kicad/template b/srcpkgs/kicad/template
index c56f7422dbed..850b573e6547 100644
--- a/srcpkgs/kicad/template
+++ b/srcpkgs/kicad/template
@@ -1,7 +1,7 @@
 # Template file for 'kicad'
 pkgname=kicad
 version=5.1.10
-revision=2
+revision=3
 build_style=cmake
 build_helper=cmake-wxWidgets-gtk3
 configure_args="-DKICAD_BUILD_VERSION=${version} -DKICAD_SCRIPTING=ON

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PR REVIEW] ngspice: update to 35
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (33 preceding siblings ...)
  2021-08-12 23:53 ` [PR PATCH] [Updated] " mtboehlke
@ 2021-08-12 23:55 ` mtboehlke
  2021-08-16 15:06 ` mtboehlke
                   ` (19 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-12 23:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 191 bytes --]

New review comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#discussion_r688157492

Comment:
Applied suggestion, with just minor tweaks

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: ngspice: update to 35
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (34 preceding siblings ...)
  2021-08-12 23:55 ` [PR REVIEW] " mtboehlke
@ 2021-08-16 15:06 ` mtboehlke
  2021-08-16 15:07 ` mtboehlke
                   ` (18 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-16 15:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 342 bytes --]

New comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#issuecomment-899586220

Comment:
I am pretty happy with this version of the template.  Functionally these last set of changes to the same as the last, but make it clearer what it's doing.  Thanks for all the helpful feedback so far!

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: ngspice: update to 35
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (35 preceding siblings ...)
  2021-08-16 15:06 ` mtboehlke
@ 2021-08-16 15:07 ` mtboehlke
  2021-08-17 16:15 ` [PR PATCH] [Updated] " mtboehlke
                   ` (17 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-16 15:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 350 bytes --]

New comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#issuecomment-899586220

Comment:
I am pretty happy with this version of the template.  Functionally these last set of changes seem to do the same as the last, but make it clearer what it's doing.  Thanks for all the helpful feedback so far!

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PR PATCH] [Updated] ngspice: update to 35
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (36 preceding siblings ...)
  2021-08-16 15:07 ` mtboehlke
@ 2021-08-17 16:15 ` mtboehlke
  2021-08-17 16:19 ` mtboehlke
                   ` (16 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-17 16:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1605 bytes --]

There is an updated pull request by mtboehlke against master on the void-packages repository

https://github.com/mtboehlke/void-packages master
https://github.com/void-linux/void-packages/pull/32403

ngspice: update to 35
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->
close #32251


A patch file from https://github.com/void-linux/void-packages/pull/32403.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-32403.patch --]
[-- Type: text/x-diff, Size: 5212 bytes --]

From f8a6814d0af6b2796e460c3033b4f0386b0de560 Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Sat, 7 Aug 2021 17:23:02 -0500
Subject: [PATCH 1/2] ngspice: update to 35

Also fixes issue with ngspice binary not being packaged.
Library is now moved to subpackage libngspice.
---
 common/shlibs                              |  2 +-
 srcpkgs/libngspice                         |  1 +
 srcpkgs/ngspice/patches/windows-only.patch | 15 -------
 srcpkgs/ngspice/template                   | 47 +++++++++++++++++++---
 4 files changed, 44 insertions(+), 21 deletions(-)
 create mode 120000 srcpkgs/libngspice
 delete mode 100644 srcpkgs/ngspice/patches/windows-only.patch

diff --git a/common/shlibs b/common/shlibs
index befa6484dfee..756e6792a9b0 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3177,7 +3177,7 @@ libgloox.so.17 gloox-1.0.20_1
 libgsmsd.so.8 gammu-smsd-1.39.0_1
 libGammu.so.8 gammu-1.39.0_1
 libz3.so z3-4.6.0_2
-libngspice.so.0 ngspice-27_2
+libngspice.so.0 libngspice-35_1
 libvulkan.so.1 vulkan-loader-1.0.57.0_1
 libembb_mtapi_cpp.so embb-1.0.0_3
 libembb_mtapi_c.so embb-1.0.0_3
diff --git a/srcpkgs/libngspice b/srcpkgs/libngspice
new file mode 120000
index 000000000000..342fa057690d
--- /dev/null
+++ b/srcpkgs/libngspice
@@ -0,0 +1 @@
+ngspice
\ No newline at end of file
diff --git a/srcpkgs/ngspice/patches/windows-only.patch b/srcpkgs/ngspice/patches/windows-only.patch
deleted file mode 100644
index 8a9ead11e31f..000000000000
--- a/srcpkgs/ngspice/patches/windows-only.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-libshlwapi is Windows-only
-
-diff --git src/xspice/cmpp/Makefile.in src/xspice/cmpp/Makefile.in
-index b450e8c..2ea8716 100644
---- a/src/xspice/cmpp/Makefile.in
-+++ b/src/xspice/cmpp/Makefile.in
-@@ -753,7 +753,7 @@ ifs_yacc.c : ifs_yacc.y
- 
- @CROSS_COMPILING_TRUE@build/cmpp$(BUILD_EXEEXT) : $(BUILD_CMPP_FILES)
- @CROSS_COMPILING_TRUE@	$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) \
--@CROSS_COMPILING_TRUE@		$(AM_CPPFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ $^ -lshlwapi
-+@CROSS_COMPILING_TRUE@		$(AM_CPPFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ $^
- 
- @CROSS_COMPILING_TRUE@distclean-local:
- @CROSS_COMPILING_TRUE@	-rm -rf build
diff --git a/srcpkgs/ngspice/template b/srcpkgs/ngspice/template
index 05beffd8f841..fc34417db5c5 100644
--- a/srcpkgs/ngspice/template
+++ b/srcpkgs/ngspice/template
@@ -1,28 +1,65 @@
 # Template file for 'ngspice'
 pkgname=ngspice
-version=33
+version=35
 revision=1
 build_style=gnu-configure
-configure_args="--with-readline=yes --with-ngshared --enable-xspice --enable-cider"
+configure_args="--enable-xspice --enable-cider"
 hostmakedepends="bison byacc"
 makedepends="readline-devel libX11-devel libXaw-devel"
+checkdepends="perl"
 short_desc="Mixed Mode Mixed Level Circuit Simulator based on Spice3F5"
 maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
 license="BSD-3-Clause"
 homepage="http://ngspice.sourceforge.net"
 distfiles="${SOURCEFORGE_SITE}/ngspice/ng-spice-rework/${version}/${pkgname}-${version}.tar.gz"
-checksum=b99db66cc1c57c44e9af1ef6ccb1dcbc8ae1df3e35acf570af578f606f8541f1
+checksum=c1b7f5c276db579acb3f0a7afb64afdeb4362289a6cab502d4ca302d6e5279ec
 
-post_install() {
+# ngshared binary and shared library can't be built in the same pass
+# --ngshared builds the shared library, and readline should only be enabled for the binary
+# see: https://github.com/imr/ngspice/commit/b86c85f85bbba6e45dc030af3e853edf8b9cfa3d
+do_configure() {
+	mkdir build
+	cd build
+	../configure --with-readline=yes $configure_args
+	mkdir ../build-lib
+	cd ../build-lib
+	../configure --with-ngshared $configure_args
+}
+
+do_build() {
+	make -C build $makejobs
+	make -C build-lib $makejobs
+}
+
+# Starting with v34, some tests fail with "No compatability mode selected!"
+# Solution is to add this line to a .spiceinit file in the home directory,
+# see: https://sourceforge.net/p/ngspice/bugs/554/#b513
+do_check() {
+	export HOME="${PWD}/.home_dir"
+	install -d "$HOME"
+	printf 'set ngbehavior=mc\n' > "${HOME}/.spiceinit"
+	make -C build check
+}
+
+do_install() {
+	make DESTDIR=${DESTDIR} -C build install
+	make DESTDIR=${DESTDIR} -C build-lib install
 	vlicense COPYING
 }
 
 ngspice-devel_package() {
 	short_desc+=" - development files"
-	depends="${sourcepkg}>=${version}_${revision}"
+	depends="libngspice>=${version}_${revision}"
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/*.so"
 		vmove usr/lib/pkgconfig
 	}
 }
+
+libngspice_package() {
+	short_desc+=" - library"
+	pkg_install() {
+		vmove "usr/lib/libngspice.so.*"
+	}
+}

From 535e2a238a7c1b0aa9c535e36902f9cba2fc0a3d Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Thu, 12 Aug 2021 18:52:40 -0500
Subject: [PATCH 2/2] kicad: revbump to pick up libngspice

---
 srcpkgs/kicad/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kicad/template b/srcpkgs/kicad/template
index c56f7422dbed..850b573e6547 100644
--- a/srcpkgs/kicad/template
+++ b/srcpkgs/kicad/template
@@ -1,7 +1,7 @@
 # Template file for 'kicad'
 pkgname=kicad
 version=5.1.10
-revision=2
+revision=3
 build_style=cmake
 build_helper=cmake-wxWidgets-gtk3
 configure_args="-DKICAD_BUILD_VERSION=${version} -DKICAD_SCRIPTING=ON

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: ngspice: update to 35
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (37 preceding siblings ...)
  2021-08-17 16:15 ` [PR PATCH] [Updated] " mtboehlke
@ 2021-08-17 16:19 ` mtboehlke
  2021-08-25 16:17 ` ngspice: update to 35 and fix issue with binary not built/installed mtboehlke
                   ` (15 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-17 16:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 197 bytes --]

New comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#issuecomment-900439633

Comment:
I went ahead and did a rebase since my branch was old.

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: ngspice: update to 35 and fix issue with binary not built/installed
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (38 preceding siblings ...)
  2021-08-17 16:19 ` mtboehlke
@ 2021-08-25 16:17 ` mtboehlke
  2021-08-25 16:17 ` mtboehlke
                   ` (14 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-25 16:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 657 bytes --]

New comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#issuecomment-905679970

Comment:
@ericonr I am not a KiCad user ( or even really an ngspice user), but I was curious about the `/usr/lib/ngspice/*cm` files.  It appears that they are code models used by the xspice extension.  They can be used from KiCad, and should be made available, which this PR woulod break right now.  My question is how best to handle that.  Should they be moved to libngspice and have ngspice then depend on it as well, make another subpackage called something like ngspice-common, or maybe not split off libngspice at all?

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: ngspice: update to 35 and fix issue with binary not built/installed
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (39 preceding siblings ...)
  2021-08-25 16:17 ` ngspice: update to 35 and fix issue with binary not built/installed mtboehlke
@ 2021-08-25 16:17 ` mtboehlke
  2021-08-26  4:24 ` [PR PATCH] [Updated] [WIP] " mtboehlke
                   ` (13 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-25 16:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 656 bytes --]

New comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#issuecomment-905679970

Comment:
@ericonr I am not a KiCad user ( or even really an ngspice user), but I was curious about the `/usr/lib/ngspice/*cm` files.  It appears that they are code models used by the xspice extension.  They can be used from KiCad, and should be made available, which this PR would break right now.  My question is how best to handle that.  Should they be moved to libngspice and have ngspice then depend on it as well, make another subpackage called something like ngspice-common, or maybe not split off libngspice at all?

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] ngspice: update to 35 and fix issue with binary not built/installed
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (40 preceding siblings ...)
  2021-08-25 16:17 ` mtboehlke
@ 2021-08-26  4:24 ` mtboehlke
  2021-08-26  4:27 ` mtboehlke
                   ` (12 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-26  4:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1695 bytes --]

There is an updated pull request by mtboehlke against master on the void-packages repository

https://github.com/mtboehlke/void-packages master
https://github.com/void-linux/void-packages/pull/32403

[WIP] ngspice: update to 35 and fix issue with binary not built/installed
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->
close #32251

(edited PR title to be more clear)


A patch file from https://github.com/void-linux/void-packages/pull/32403.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-32403.patch --]
[-- Type: text/x-diff, Size: 5261 bytes --]

From 719de98287e8e98a3fed1a0d142b8a85ab0b34d7 Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Sat, 7 Aug 2021 17:23:02 -0500
Subject: [PATCH 1/2] ngspice: update to 35

Also fixes issue with ngspice binary not being packaged.
Library is now moved to subpackage libngspice.
---
 common/shlibs                              |  2 +-
 srcpkgs/libngspice                         |  1 +
 srcpkgs/ngspice/patches/windows-only.patch | 15 -------
 srcpkgs/ngspice/template                   | 49 +++++++++++++++++++---
 4 files changed, 46 insertions(+), 21 deletions(-)
 create mode 120000 srcpkgs/libngspice
 delete mode 100644 srcpkgs/ngspice/patches/windows-only.patch

diff --git a/common/shlibs b/common/shlibs
index 0ef8dd581524..435a06185f26 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3181,7 +3181,7 @@ libgloox.so.17 gloox-1.0.20_1
 libgsmsd.so.8 gammu-smsd-1.39.0_1
 libGammu.so.8 gammu-1.39.0_1
 libz3.so z3-4.6.0_2
-libngspice.so.0 ngspice-27_2
+libngspice.so.0 libngspice-35_1
 libvulkan.so.1 vulkan-loader-1.0.57.0_1
 libembb_mtapi_cpp.so embb-1.0.0_3
 libembb_mtapi_c.so embb-1.0.0_3
diff --git a/srcpkgs/libngspice b/srcpkgs/libngspice
new file mode 120000
index 000000000000..342fa057690d
--- /dev/null
+++ b/srcpkgs/libngspice
@@ -0,0 +1 @@
+ngspice
\ No newline at end of file
diff --git a/srcpkgs/ngspice/patches/windows-only.patch b/srcpkgs/ngspice/patches/windows-only.patch
deleted file mode 100644
index 8a9ead11e31f..000000000000
--- a/srcpkgs/ngspice/patches/windows-only.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-libshlwapi is Windows-only
-
-diff --git src/xspice/cmpp/Makefile.in src/xspice/cmpp/Makefile.in
-index b450e8c..2ea8716 100644
---- a/src/xspice/cmpp/Makefile.in
-+++ b/src/xspice/cmpp/Makefile.in
-@@ -753,7 +753,7 @@ ifs_yacc.c : ifs_yacc.y
- 
- @CROSS_COMPILING_TRUE@build/cmpp$(BUILD_EXEEXT) : $(BUILD_CMPP_FILES)
- @CROSS_COMPILING_TRUE@	$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) \
--@CROSS_COMPILING_TRUE@		$(AM_CPPFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ $^ -lshlwapi
-+@CROSS_COMPILING_TRUE@		$(AM_CPPFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ $^
- 
- @CROSS_COMPILING_TRUE@distclean-local:
- @CROSS_COMPILING_TRUE@	-rm -rf build
diff --git a/srcpkgs/ngspice/template b/srcpkgs/ngspice/template
index 05beffd8f841..f7379be5f65a 100644
--- a/srcpkgs/ngspice/template
+++ b/srcpkgs/ngspice/template
@@ -1,28 +1,67 @@
 # Template file for 'ngspice'
 pkgname=ngspice
-version=33
+version=35
 revision=1
 build_style=gnu-configure
-configure_args="--with-readline=yes --with-ngshared --enable-xspice --enable-cider"
+configure_args="--enable-xspice --enable-cider"
 hostmakedepends="bison byacc"
 makedepends="readline-devel libX11-devel libXaw-devel"
+depends="libngspice"
+checkdepends="perl"
 short_desc="Mixed Mode Mixed Level Circuit Simulator based on Spice3F5"
 maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
 license="BSD-3-Clause"
 homepage="http://ngspice.sourceforge.net"
 distfiles="${SOURCEFORGE_SITE}/ngspice/ng-spice-rework/${version}/${pkgname}-${version}.tar.gz"
-checksum=b99db66cc1c57c44e9af1ef6ccb1dcbc8ae1df3e35acf570af578f606f8541f1
+checksum=c1b7f5c276db579acb3f0a7afb64afdeb4362289a6cab502d4ca302d6e5279ec
 
-post_install() {
+# ngshared binary and shared library can't be built in the same pass
+# --ngshared builds the shared library, and readline should only be enabled for the binary
+# see: https://github.com/imr/ngspice/commit/b86c85f85bbba6e45dc030af3e853edf8b9cfa3d
+do_configure() {
+	mkdir build
+	cd build
+	../configure --with-readline=yes $configure_args
+	mkdir ../build-lib
+	cd ../build-lib
+	../configure --with-ngshared $configure_args
+}
+
+do_build() {
+	make -C build $makejobs
+	make -C build-lib $makejobs
+}
+
+# Starting with v34, some tests fail with "No compatability mode selected!"
+# Solution is to add this line to a .spiceinit file in the home directory,
+# see: https://sourceforge.net/p/ngspice/bugs/554/#b513
+do_check() {
+	export HOME="${PWD}/.home_dir"
+	install -d "$HOME"
+	printf 'set ngbehavior=mc\n' > "${HOME}/.spiceinit"
+	make -C build check
+}
+
+do_install() {
+	make DESTDIR=${DESTDIR} -C build install
+	make DESTDIR=${DESTDIR} -C build-lib install
 	vlicense COPYING
 }
 
 ngspice-devel_package() {
 	short_desc+=" - development files"
-	depends="${sourcepkg}>=${version}_${revision}"
+	depends="libngspice>=${version}_${revision}"
 	pkg_install() {
 		vmove usr/include
 		vmove "usr/lib/*.so"
 		vmove usr/lib/pkgconfig
 	}
 }
+
+libngspice_package() {
+	short_desc+=" - library"
+	pkg_install() {
+		vmove "usr/lib/libngspice.so.*"
+		vmove "usr/lib/ngspice"
+	}
+}

From 505c98ebb731ced681dc8ab3941cc1f529b8eb2b Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Wed, 25 Aug 2021 14:29:36 -0500
Subject: [PATCH 2/2] kicad: revbump to pick up libngspice

---
 srcpkgs/kicad/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kicad/template b/srcpkgs/kicad/template
index c56f7422dbed..850b573e6547 100644
--- a/srcpkgs/kicad/template
+++ b/srcpkgs/kicad/template
@@ -1,7 +1,7 @@
 # Template file for 'kicad'
 pkgname=kicad
 version=5.1.10
-revision=2
+revision=3
 build_style=cmake
 build_helper=cmake-wxWidgets-gtk3
 configure_args="-DKICAD_BUILD_VERSION=${version} -DKICAD_SCRIPTING=ON

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: ngspice: update to 35 and fix issue with binary not built/installed
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (41 preceding siblings ...)
  2021-08-26  4:24 ` [PR PATCH] [Updated] [WIP] " mtboehlke
@ 2021-08-26  4:27 ` mtboehlke
  2021-08-26  5:00 ` mtboehlke
                   ` (11 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-26  4:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 700 bytes --]

New comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#issuecomment-905679970

Comment:
@ericonr I am not a KiCad user ( or even really an ngspice user), but I was curious about the `/usr/lib/ngspice/*cm` files.  It appears that they are code models used by the xspice extension.  They can be used from KiCad, and should be made available, which this PR would break right now.  My question is how best to handle that.  Should they be moved to libngspice and have ngspice then depend on it as well, make another subpackage called something like ngspice-common, or maybe not split off libngspice at all?  (I am going with the first option for now)

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: ngspice: update to 35 and fix issue with binary not built/installed
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (42 preceding siblings ...)
  2021-08-26  4:27 ` mtboehlke
@ 2021-08-26  5:00 ` mtboehlke
  2021-08-29 19:49 ` ericonr
                   ` (10 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-26  5:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 684 bytes --]

New comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#issuecomment-905679970

Comment:
@ericonr I am not a KiCad user ( or even really an ngspice user), but I was curious about the `/usr/lib/ngspice/*cm` files.  It appears that they are code models used by the xspice extension.  They can be used from KiCad, and should be made available, which this PR would break right now.  My question is how best to handle that.  Should they be moved to libngspice and have ngspice then depend on it as well, make another subpackage called something like ngspice-common, or maybe not split off libngspice at all?  (PR reflects first option)

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: ngspice: update to 35 and fix issue with binary not built/installed
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (43 preceding siblings ...)
  2021-08-26  5:00 ` mtboehlke
@ 2021-08-29 19:49 ` ericonr
  2021-08-29 19:50 ` ericonr
                   ` (9 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: ericonr @ 2021-08-29 19:49 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 402 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#issuecomment-907859304

Comment:
> My question is how best to handle that. Should they be moved to libngspice and have ngspice then depend on it as well, make another subpackage called something like ngspice-common, or maybe not split off libngspice at all?

I'm honestly ok with this option.

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: ngspice: update to 35 and fix issue with binary not built/installed
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (44 preceding siblings ...)
  2021-08-29 19:49 ` ericonr
@ 2021-08-29 19:50 ` ericonr
  2021-08-30  0:12 ` [PR PATCH] [Updated] " mtboehlke
                   ` (8 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: ericonr @ 2021-08-29 19:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 406 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#issuecomment-907859304

Comment:
> My question is how best to handle that. Should they be moved to libngspice and have ngspice then depend on it as well, make another subpackage called something like ngspice-common, or maybe not split off libngspice at all?

I'm honestly ok with the last option.

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PR PATCH] [Updated] ngspice: update to 35 and fix issue with binary not built/installed
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (45 preceding siblings ...)
  2021-08-29 19:50 ` ericonr
@ 2021-08-30  0:12 ` mtboehlke
  2021-08-30  0:44 ` mtboehlke
                   ` (7 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-30  0:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1689 bytes --]

There is an updated pull request by mtboehlke against master on the void-packages repository

https://github.com/mtboehlke/void-packages master
https://github.com/void-linux/void-packages/pull/32403

ngspice: update to 35 and fix issue with binary not built/installed
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->
close #32251

(edited PR title to be more clear)


A patch file from https://github.com/void-linux/void-packages/pull/32403.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-32403.patch --]
[-- Type: text/x-diff, Size: 3346 bytes --]

From e74e08544f804d04edf2ff46b83f9080d03e03bf Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Sun, 29 Aug 2021 17:58:28 -0500
Subject: [PATCH] ngspice: update to 35

Also fixes issue with ngspice binary not being packaged.
---
 srcpkgs/ngspice/patches/windows-only.patch | 15 ---------
 srcpkgs/ngspice/template                   | 38 +++++++++++++++++++---
 2 files changed, 34 insertions(+), 19 deletions(-)
 delete mode 100644 srcpkgs/ngspice/patches/windows-only.patch

diff --git a/srcpkgs/ngspice/patches/windows-only.patch b/srcpkgs/ngspice/patches/windows-only.patch
deleted file mode 100644
index 8a9ead11e31f..000000000000
--- a/srcpkgs/ngspice/patches/windows-only.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-libshlwapi is Windows-only
-
-diff --git src/xspice/cmpp/Makefile.in src/xspice/cmpp/Makefile.in
-index b450e8c..2ea8716 100644
---- a/src/xspice/cmpp/Makefile.in
-+++ b/src/xspice/cmpp/Makefile.in
-@@ -753,7 +753,7 @@ ifs_yacc.c : ifs_yacc.y
- 
- @CROSS_COMPILING_TRUE@build/cmpp$(BUILD_EXEEXT) : $(BUILD_CMPP_FILES)
- @CROSS_COMPILING_TRUE@	$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) \
--@CROSS_COMPILING_TRUE@		$(AM_CPPFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ $^ -lshlwapi
-+@CROSS_COMPILING_TRUE@		$(AM_CPPFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ $^
- 
- @CROSS_COMPILING_TRUE@distclean-local:
- @CROSS_COMPILING_TRUE@	-rm -rf build
diff --git a/srcpkgs/ngspice/template b/srcpkgs/ngspice/template
index 05beffd8f841..e7d786828310 100644
--- a/srcpkgs/ngspice/template
+++ b/srcpkgs/ngspice/template
@@ -1,19 +1,49 @@
 # Template file for 'ngspice'
 pkgname=ngspice
-version=33
+version=35
 revision=1
 build_style=gnu-configure
-configure_args="--with-readline=yes --with-ngshared --enable-xspice --enable-cider"
+configure_args="--enable-xspice --enable-cider"
 hostmakedepends="bison byacc"
 makedepends="readline-devel libX11-devel libXaw-devel"
+checkdepends="perl"
 short_desc="Mixed Mode Mixed Level Circuit Simulator based on Spice3F5"
 maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
 license="BSD-3-Clause"
 homepage="http://ngspice.sourceforge.net"
 distfiles="${SOURCEFORGE_SITE}/ngspice/ng-spice-rework/${version}/${pkgname}-${version}.tar.gz"
-checksum=b99db66cc1c57c44e9af1ef6ccb1dcbc8ae1df3e35acf570af578f606f8541f1
+checksum=c1b7f5c276db579acb3f0a7afb64afdeb4362289a6cab502d4ca302d6e5279ec
 
-post_install() {
+# ngshared binary and shared library can't be built in the same pass
+# --ngshared builds the shared library, and readline should only be enabled for the binary
+# see: https://github.com/imr/ngspice/commit/b86c85f85bbba6e45dc030af3e853edf8b9cfa3d
+do_configure() {
+	mkdir build
+	cd build
+	../configure --with-readline=yes $configure_args
+	mkdir ../build-lib
+	cd ../build-lib
+	../configure --with-ngshared $configure_args
+}
+
+do_build() {
+	make -C build $makejobs
+	make -C build-lib $makejobs
+}
+
+# Starting with v34, some tests fail with "No compatability mode selected!"
+# Solution is to add this line to a .spiceinit file in the home directory,
+# see: https://sourceforge.net/p/ngspice/bugs/554/#b513
+do_check() {
+	export HOME="${PWD}/.home_dir"
+	install -d "$HOME"
+	printf 'set ngbehavior=mc\n' > "${HOME}/.spiceinit"
+	make -C build check
+}
+
+do_install() {
+	make DESTDIR=${DESTDIR} -C build install
+	make DESTDIR=${DESTDIR} -C build-lib install
 	vlicense COPYING
 }
 

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: ngspice: update to 35 and fix issue with binary not built/installed
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (46 preceding siblings ...)
  2021-08-30  0:12 ` [PR PATCH] [Updated] " mtboehlke
@ 2021-08-30  0:44 ` mtboehlke
  2021-08-30  3:54 ` ericonr
                   ` (6 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-30  0:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 256 bytes --]

New comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#issuecomment-907918210

Comment:
Sounds good!  I went ahead and pushed changes to no longer split a libngspice package.  Builds okay on my system.

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: ngspice: update to 35 and fix issue with binary not built/installed
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (47 preceding siblings ...)
  2021-08-30  0:44 ` mtboehlke
@ 2021-08-30  3:54 ` ericonr
  2021-08-30  5:01 ` mtboehlke
                   ` (5 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: ericonr @ 2021-08-30  3:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 255 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#issuecomment-907993955

Comment:
Ok, I think this still requires a kicad rebuild for some godforsaken reason :/

I can test and confirm tomorrow.

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: ngspice: update to 35 and fix issue with binary not built/installed
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (48 preceding siblings ...)
  2021-08-30  3:54 ` ericonr
@ 2021-08-30  5:01 ` mtboehlke
  2021-08-30 13:00 ` ericonr
                   ` (4 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-30  5:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 308 bytes --]

New comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#issuecomment-908029939

Comment:
Oh, there might be a issue if the version in the repo was linked against readline, which I'm pretty sure it is.  We may want to rebuild kicad anyway just to be safe.

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: ngspice: update to 35 and fix issue with binary not built/installed
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (49 preceding siblings ...)
  2021-08-30  5:01 ` mtboehlke
@ 2021-08-30 13:00 ` ericonr
  2021-08-30 13:30 ` [PR PATCH] [Updated] " ericonr
                   ` (3 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: ericonr @ 2021-08-30 13:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 238 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#issuecomment-908321405

Comment:
It's worse ;) it tries to dlopen `libngspice.so.0.0.0`, but the new file is `libngspice.so.0.0.1`

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PR PATCH] [Updated] ngspice: update to 35 and fix issue with binary not built/installed
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (50 preceding siblings ...)
  2021-08-30 13:00 ` ericonr
@ 2021-08-30 13:30 ` ericonr
  2021-08-30 13:31 ` [PR PATCH] [Merged]: " ericonr
                   ` (2 subsequent siblings)
  54 siblings, 0 replies; 56+ messages in thread
From: ericonr @ 2021-08-30 13:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1687 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/mtboehlke/void-packages master
https://github.com/void-linux/void-packages/pull/32403

ngspice: update to 35 and fix issue with binary not built/installed
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->
close #32251

(edited PR title to be more clear)


A patch file from https://github.com/void-linux/void-packages/pull/32403.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-32403.patch --]
[-- Type: text/x-diff, Size: 4743 bytes --]

From 931a4b16381f98be5bbe2b6ee107b65e30f6316f Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Sun, 29 Aug 2021 17:58:28 -0500
Subject: [PATCH 1/2] ngspice: update to 35

Also fixes issue with ngspice binary not being packaged and include
warning for kicad.
---
 common/shlibs                              |  2 +-
 srcpkgs/ngspice/patches/windows-only.patch | 15 ---------
 srcpkgs/ngspice/template                   | 39 +++++++++++++++++++---
 3 files changed, 36 insertions(+), 20 deletions(-)
 delete mode 100644 srcpkgs/ngspice/patches/windows-only.patch

diff --git a/common/shlibs b/common/shlibs
index 9d2575e83a70..74aec4fd2500 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3181,7 +3181,7 @@ libgloox.so.17 gloox-1.0.20_1
 libgsmsd.so.8 gammu-smsd-1.39.0_1
 libGammu.so.8 gammu-1.39.0_1
 libz3.so z3-4.6.0_2
-libngspice.so.0 ngspice-27_2
+libngspice.so.0 ngspice-35_1
 libvulkan.so.1 vulkan-loader-1.0.57.0_1
 libembb_mtapi_cpp.so embb-1.0.0_3
 libembb_mtapi_c.so embb-1.0.0_3
diff --git a/srcpkgs/ngspice/patches/windows-only.patch b/srcpkgs/ngspice/patches/windows-only.patch
deleted file mode 100644
index 8a9ead11e31f..000000000000
--- a/srcpkgs/ngspice/patches/windows-only.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-libshlwapi is Windows-only
-
-diff --git src/xspice/cmpp/Makefile.in src/xspice/cmpp/Makefile.in
-index b450e8c..2ea8716 100644
---- a/src/xspice/cmpp/Makefile.in
-+++ b/src/xspice/cmpp/Makefile.in
-@@ -753,7 +753,7 @@ ifs_yacc.c : ifs_yacc.y
- 
- @CROSS_COMPILING_TRUE@build/cmpp$(BUILD_EXEEXT) : $(BUILD_CMPP_FILES)
- @CROSS_COMPILING_TRUE@	$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) \
--@CROSS_COMPILING_TRUE@		$(AM_CPPFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ $^ -lshlwapi
-+@CROSS_COMPILING_TRUE@		$(AM_CPPFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ $^
- 
- @CROSS_COMPILING_TRUE@distclean-local:
- @CROSS_COMPILING_TRUE@	-rm -rf build
diff --git a/srcpkgs/ngspice/template b/srcpkgs/ngspice/template
index 05beffd8f841..a471ef7e5779 100644
--- a/srcpkgs/ngspice/template
+++ b/srcpkgs/ngspice/template
@@ -1,19 +1,50 @@
 # Template file for 'ngspice'
+# WARNING: if the libngspice.so.x.y.z file changes name, revbump kicad
 pkgname=ngspice
-version=33
+version=35
 revision=1
 build_style=gnu-configure
-configure_args="--with-readline=yes --with-ngshared --enable-xspice --enable-cider"
+configure_args="--enable-xspice --enable-cider"
 hostmakedepends="bison byacc"
 makedepends="readline-devel libX11-devel libXaw-devel"
+checkdepends="perl"
 short_desc="Mixed Mode Mixed Level Circuit Simulator based on Spice3F5"
 maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
 license="BSD-3-Clause"
 homepage="http://ngspice.sourceforge.net"
 distfiles="${SOURCEFORGE_SITE}/ngspice/ng-spice-rework/${version}/${pkgname}-${version}.tar.gz"
-checksum=b99db66cc1c57c44e9af1ef6ccb1dcbc8ae1df3e35acf570af578f606f8541f1
+checksum=c1b7f5c276db579acb3f0a7afb64afdeb4362289a6cab502d4ca302d6e5279ec
 
-post_install() {
+# ngshared binary and shared library can't be built in the same pass
+# --ngshared builds the shared library, and readline should only be enabled for the binary
+# see: https://github.com/imr/ngspice/commit/b86c85f85bbba6e45dc030af3e853edf8b9cfa3d
+do_configure() {
+	mkdir build
+	cd build
+	../configure --with-readline=yes $configure_args
+	mkdir ../build-lib
+	cd ../build-lib
+	../configure --with-ngshared $configure_args
+}
+
+do_build() {
+	make -C build $makejobs
+	make -C build-lib $makejobs
+}
+
+# Starting with v34, some tests fail with "No compatability mode selected!"
+# Solution is to add this line to a .spiceinit file in the home directory,
+# see: https://sourceforge.net/p/ngspice/bugs/554/#b513
+do_check() {
+	export HOME="${PWD}/.home_dir"
+	install -d "$HOME"
+	printf 'set ngbehavior=mc\n' > "${HOME}/.spiceinit"
+	make -C build check
+}
+
+do_install() {
+	make DESTDIR=${DESTDIR} -C build install
+	make DESTDIR=${DESTDIR} -C build-lib install
 	vlicense COPYING
 }
 

From 07e46aa0ced7716250f55c7f53753106daa915e3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Mon, 30 Aug 2021 10:26:39 -0300
Subject: [PATCH 2/2] kicad: revbump for ngspice-35.

It hardcodes the underlying file for libngspice.so.0, which it dlopens
despite being linked against libngspice.so.0.
---
 srcpkgs/kicad/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kicad/template b/srcpkgs/kicad/template
index c56f7422dbed..850b573e6547 100644
--- a/srcpkgs/kicad/template
+++ b/srcpkgs/kicad/template
@@ -1,7 +1,7 @@
 # Template file for 'kicad'
 pkgname=kicad
 version=5.1.10
-revision=2
+revision=3
 build_style=cmake
 build_helper=cmake-wxWidgets-gtk3
 configure_args="-DKICAD_BUILD_VERSION=${version} -DKICAD_SCRIPTING=ON

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: [PR PATCH] [Merged]: ngspice: update to 35 and fix issue with binary not built/installed
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (51 preceding siblings ...)
  2021-08-30 13:30 ` [PR PATCH] [Updated] " ericonr
@ 2021-08-30 13:31 ` ericonr
  2021-08-30 13:31 ` ericonr
  2021-08-30 15:25 ` mtboehlke
  54 siblings, 0 replies; 56+ messages in thread
From: ericonr @ 2021-08-30 13:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1530 bytes --]

There's a merged pull request on the void-packages repository

ngspice: update to 35 and fix issue with binary not built/installed
https://github.com/void-linux/void-packages/pull/32403

Description:
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->
close #32251

(edited PR title to be more clear)


^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: ngspice: update to 35 and fix issue with binary not built/installed
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (52 preceding siblings ...)
  2021-08-30 13:31 ` [PR PATCH] [Merged]: " ericonr
@ 2021-08-30 13:31 ` ericonr
  2021-08-30 15:25 ` mtboehlke
  54 siblings, 0 replies; 56+ messages in thread
From: ericonr @ 2021-08-30 13:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 186 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#issuecomment-908346180

Comment:
Thanks! I pushed the kicad change and merged.

^ permalink raw reply	[flat|nested] 56+ messages in thread

* Re: ngspice: update to 35 and fix issue with binary not built/installed
  2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
                   ` (53 preceding siblings ...)
  2021-08-30 13:31 ` ericonr
@ 2021-08-30 15:25 ` mtboehlke
  54 siblings, 0 replies; 56+ messages in thread
From: mtboehlke @ 2021-08-30 15:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 162 bytes --]

New comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/32403#issuecomment-908437049

Comment:
:)  Thanks ericonr!

^ permalink raw reply	[flat|nested] 56+ messages in thread

end of thread, other threads:[~2021-08-30 15:25 UTC | newest]

Thread overview: 56+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-07 22:57 [PR PATCH] ngspice: update to 34 mtboehlke
2021-08-07 23:04 ` mtboehlke
2021-08-07 23:05 ` mtboehlke
2021-08-07 23:10 ` [PR PATCH] [Updated] " mtboehlke
2021-08-07 23:13 ` mtboehlke
2021-08-09 17:20 ` [PR REVIEW] " ericonr
2021-08-09 17:20 ` ericonr
2021-08-09 17:20 ` ericonr
2021-08-09 17:20 ` ericonr
2021-08-09 19:01 ` [PR PATCH] [Updated] " mtboehlke
2021-08-10 16:45 ` mtboehlke
2021-08-10 16:49 ` [PR REVIEW] " mtboehlke
2021-08-10 16:49 ` mtboehlke
2021-08-10 16:50 ` [PR REVIEW] " mtboehlke
2021-08-10 16:50 ` mtboehlke
2021-08-10 17:07 ` ericonr
2021-08-10 19:46 ` mtboehlke
2021-08-11  1:39 ` ericonr
2021-08-11 16:57 ` [PR PATCH] [Updated] " mtboehlke
2021-08-11 17:05 ` ngspice: update to 35 mtboehlke
2021-08-11 17:07 ` mtboehlke
2021-08-12  1:07 ` [PR REVIEW] " ericonr
2021-08-12  1:07 ` ericonr
2021-08-12  1:07 ` ericonr
2021-08-12  2:28 ` [PR PATCH] [Updated] " mtboehlke
2021-08-12  2:29 ` mtboehlke
2021-08-12  2:29 ` mtboehlke
2021-08-12  2:53 ` mtboehlke
2021-08-12  2:56 ` [PR REVIEW] " mtboehlke
2021-08-12  3:02 ` mtboehlke
2021-08-12  3:07 ` [PR REVIEW] " sgn
2021-08-12  3:07 ` sgn
2021-08-12  3:26 ` mtboehlke
2021-08-12  3:29 ` mtboehlke
2021-08-12 23:53 ` [PR PATCH] [Updated] " mtboehlke
2021-08-12 23:55 ` [PR REVIEW] " mtboehlke
2021-08-16 15:06 ` mtboehlke
2021-08-16 15:07 ` mtboehlke
2021-08-17 16:15 ` [PR PATCH] [Updated] " mtboehlke
2021-08-17 16:19 ` mtboehlke
2021-08-25 16:17 ` ngspice: update to 35 and fix issue with binary not built/installed mtboehlke
2021-08-25 16:17 ` mtboehlke
2021-08-26  4:24 ` [PR PATCH] [Updated] [WIP] " mtboehlke
2021-08-26  4:27 ` mtboehlke
2021-08-26  5:00 ` mtboehlke
2021-08-29 19:49 ` ericonr
2021-08-29 19:50 ` ericonr
2021-08-30  0:12 ` [PR PATCH] [Updated] " mtboehlke
2021-08-30  0:44 ` mtboehlke
2021-08-30  3:54 ` ericonr
2021-08-30  5:01 ` mtboehlke
2021-08-30 13:00 ` ericonr
2021-08-30 13:30 ` [PR PATCH] [Updated] " ericonr
2021-08-30 13:31 ` [PR PATCH] [Merged]: " ericonr
2021-08-30 13:31 ` ericonr
2021-08-30 15:25 ` mtboehlke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).