aboutsummaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
Diffstat (limited to 'ports')
-rw-r--r--ports/ngspice/CONTROL1
-rw-r--r--ports/ngspice/portfile.cmake16
2 files changed, 14 insertions, 3 deletions
diff --git a/ports/ngspice/CONTROL b/ports/ngspice/CONTROL
index dc2d6946f..545e117b0 100644
--- a/ports/ngspice/CONTROL
+++ b/ports/ngspice/CONTROL
@@ -1,5 +1,6 @@
Source: ngspice
Version: 34
+Port-Version: 1
Homepage: http://ngspice.sourceforge.net/
Description: Ngspice is a mixed-level/mixed-signal electronic circuit simulator. It is a successor of the latest stable release of Berkeley SPICE
Supports: !(linux|osx|arm|uwp)
diff --git a/ports/ngspice/portfile.cmake b/ports/ngspice/portfile.cmake
index 1064a3860..915d120bd 100644
--- a/ports/ngspice/portfile.cmake
+++ b/ports/ngspice/portfile.cmake
@@ -55,15 +55,25 @@ if("codemodels" IN_LIST FEATURES)
PLATFORM ${TRIPLET_SYSTEM_ARCH}
TARGET Build
)
-
+
+ # ngspice oddly has solution configs of x64 and x86 but
+ # output folders of x64 and win32
+ if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64)
+ set(OUT_ARCH x64)
+ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x86)
+ set(OUT_ARCH Win32)
+ else()
+ message(FATAL_ERROR "Unsupported target architecture")
+ endif()
+
#put the code models in the intended location
file(GLOB NGSPICE_CODEMODELS_DEBUG
- ${BUILDTREE_PATH}/visualc/codemodels/${TRIPLET_SYSTEM_ARCH}/Debug/*.cm
+ ${BUILDTREE_PATH}/visualc/codemodels/${OUT_ARCH}/Debug/*.cm
)
file(COPY ${NGSPICE_CODEMODELS_DEBUG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/ngspice)
file(GLOB NGSPICE_CODEMODELS_RELEASE
- ${BUILDTREE_PATH}/visualc/codemodels/${TRIPLET_SYSTEM_ARCH}/Release/*.cm
+ ${BUILDTREE_PATH}/visualc/codemodels/${OUT_ARCH}/Release/*.cm
)
file(COPY ${NGSPICE_CODEMODELS_RELEASE} DESTINATION ${CURRENT_PACKAGES_DIR}/lib/ngspice)