From a702fc2faca1901ee49f05f6727ba523ec2035d0 Mon Sep 17 00:00:00 2001 From: Mat Boehlke 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 " 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 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() {