Skip to content

Commit

Permalink
ngspice: update to 35
Browse files Browse the repository at this point in the history
Also fixes issue with ngspice binary not being packaged.
Library is now moved to subpackage libngspice.
  • Loading branch information
mtboehlke committed Aug 17, 2021
1 parent 7ba599f commit f8a6814
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 21 deletions.
2 changes: 1 addition & 1 deletion common/shlibs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions srcpkgs/libngspice
15 changes: 0 additions & 15 deletions srcpkgs/ngspice/patches/windows-only.patch

This file was deleted.

47 changes: 42 additions & 5 deletions srcpkgs/ngspice/template
Original file line number Diff line number Diff line change
@@ -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.*"
}
}

0 comments on commit f8a6814

Please sign in to comment.