From 05bd0b29d9524b71528d8ec54bb0940e6f5a1c76 Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Fri, 8 Dec 2023 13:48:47 +0000 Subject: [PATCH] ngspice: Add install script to relocate code model path This fixes errors like the following. Error opening code model "/ucrt64/lib/ngspice/spice2poly.cm": The specified module could not be found. Error: Library /ucrt64/lib/ngspice/spice2poly.cm couldn't be loaded! --- mingw-w64-ngspice/PKGBUILD | 1 + mingw-w64-ngspice/ngspice-CLANG32.install | 9 +++++++++ mingw-w64-ngspice/ngspice-CLANG64.install | 9 +++++++++ mingw-w64-ngspice/ngspice-CLANGARM64.install | 9 +++++++++ mingw-w64-ngspice/ngspice-MINGW32.install | 9 +++++++++ mingw-w64-ngspice/ngspice-MINGW64.install | 9 +++++++++ mingw-w64-ngspice/ngspice-UCRT64.install | 9 +++++++++ 7 files changed, 55 insertions(+) create mode 100644 mingw-w64-ngspice/ngspice-CLANG32.install create mode 100644 mingw-w64-ngspice/ngspice-CLANG64.install create mode 100644 mingw-w64-ngspice/ngspice-CLANGARM64.install create mode 100644 mingw-w64-ngspice/ngspice-MINGW32.install create mode 100644 mingw-w64-ngspice/ngspice-MINGW64.install create mode 100644 mingw-w64-ngspice/ngspice-UCRT64.install diff --git a/mingw-w64-ngspice/PKGBUILD b/mingw-w64-ngspice/PKGBUILD index a015259e0bfbd..4a98658497b40 100644 --- a/mingw-w64-ngspice/PKGBUILD +++ b/mingw-w64-ngspice/PKGBUILD @@ -29,6 +29,7 @@ makedepends=( "${MINGW_PACKAGE_PREFIX}-autotools" "${MINGW_PACKAGE_PREFIX}-cc" ) +install="${_realname}-${MSYSTEM}.install" source=( "https://downloads.sourceforge.net/project/${_realname}/ng-spice-rework/${pkgver}/${_realname}-${pkgver}.tar.gz" "https://downloads.sourceforge.net/project/${_realname}/ng-spice-rework/${pkgver}/${_realname}-doc-${pkgver}.tar.gz" diff --git a/mingw-w64-ngspice/ngspice-CLANG32.install b/mingw-w64-ngspice/ngspice-CLANG32.install new file mode 100644 index 0000000000000..4a871df2684dc --- /dev/null +++ b/mingw-w64-ngspice/ngspice-CLANG32.install @@ -0,0 +1,9 @@ +post_install() { + local _prefix="/clang32" + local _prefix_win="$(cygpath -m "${_prefix}")" + sed -s "s|${_prefix}|${_prefix_win}|g" -i "${_prefix}/share/ngspice/scripts/spinit" +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-ngspice/ngspice-CLANG64.install b/mingw-w64-ngspice/ngspice-CLANG64.install new file mode 100644 index 0000000000000..6166d167f597e --- /dev/null +++ b/mingw-w64-ngspice/ngspice-CLANG64.install @@ -0,0 +1,9 @@ +post_install() { + local _prefix="/clang64" + local _prefix_win="$(cygpath -m "${_prefix}")" + sed -s "s|${_prefix}|${_prefix_win}|g" -i "${_prefix}/share/ngspice/scripts/spinit" +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-ngspice/ngspice-CLANGARM64.install b/mingw-w64-ngspice/ngspice-CLANGARM64.install new file mode 100644 index 0000000000000..10641137ead61 --- /dev/null +++ b/mingw-w64-ngspice/ngspice-CLANGARM64.install @@ -0,0 +1,9 @@ +post_install() { + local _prefix="/clangarm64" + local _prefix_win="$(cygpath -m "${_prefix}")" + sed -s "s|${_prefix}|${_prefix_win}|g" -i "${_prefix}/share/ngspice/scripts/spinit" +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-ngspice/ngspice-MINGW32.install b/mingw-w64-ngspice/ngspice-MINGW32.install new file mode 100644 index 0000000000000..bcce2261e76d3 --- /dev/null +++ b/mingw-w64-ngspice/ngspice-MINGW32.install @@ -0,0 +1,9 @@ +post_install() { + local _prefix="/mingw32" + local _prefix_win="$(cygpath -m "${_prefix}")" + sed -s "s|${_prefix}|${_prefix_win}|g" -i "${_prefix}/share/ngspice/scripts/spinit" +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-ngspice/ngspice-MINGW64.install b/mingw-w64-ngspice/ngspice-MINGW64.install new file mode 100644 index 0000000000000..0bdd2e15eb087 --- /dev/null +++ b/mingw-w64-ngspice/ngspice-MINGW64.install @@ -0,0 +1,9 @@ +post_install() { + local _prefix="/mingw64" + local _prefix_win="$(cygpath -m "${_prefix}")" + sed -s "s|${_prefix}|${_prefix_win}|g" -i "${_prefix}/share/ngspice/scripts/spinit" +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-ngspice/ngspice-UCRT64.install b/mingw-w64-ngspice/ngspice-UCRT64.install new file mode 100644 index 0000000000000..20b68e40617a9 --- /dev/null +++ b/mingw-w64-ngspice/ngspice-UCRT64.install @@ -0,0 +1,9 @@ +post_install() { + local _prefix="/ucrt64" + local _prefix_win="$(cygpath -m "${_prefix}")" + sed -s "s|${_prefix}|${_prefix_win}|g" -i "${_prefix}/share/ngspice/scripts/spinit" +} + +post_upgrade() { + post_install +}