Skip to content

Commit

Permalink
ngspice: Add install script to relocate code model path
Browse files Browse the repository at this point in the history
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!
  • Loading branch information
Biswa96 committed Dec 9, 2023
1 parent 7876a70 commit 05bd0b2
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 0 deletions.
1 change: 1 addition & 0 deletions mingw-w64-ngspice/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
9 changes: 9 additions & 0 deletions mingw-w64-ngspice/ngspice-CLANG32.install
Original file line number Diff line number Diff line change
@@ -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
}
9 changes: 9 additions & 0 deletions mingw-w64-ngspice/ngspice-CLANG64.install
Original file line number Diff line number Diff line change
@@ -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
}
9 changes: 9 additions & 0 deletions mingw-w64-ngspice/ngspice-CLANGARM64.install
Original file line number Diff line number Diff line change
@@ -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
}
9 changes: 9 additions & 0 deletions mingw-w64-ngspice/ngspice-MINGW32.install
Original file line number Diff line number Diff line change
@@ -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
}
9 changes: 9 additions & 0 deletions mingw-w64-ngspice/ngspice-MINGW64.install
Original file line number Diff line number Diff line change
@@ -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
}
9 changes: 9 additions & 0 deletions mingw-w64-ngspice/ngspice-UCRT64.install
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit 05bd0b2

Please sign in to comment.