aboutsummaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
authorMarek Roszko <mark.roszko@gmail.com>2021-02-11 03:06:01 -0500
committerGitHub <noreply@github.com>2021-02-11 00:06:01 -0800
commit7c4323099b73f3a42f455a85e9b53c0bca81b519 (patch)
treeb906d579397019a87fa4592f1628b9f15861a69b /ports
parent8cf29a3c880235049d27c275f30d3c623900a9ec (diff)
downloadvcpkg-7c4323099b73f3a42f455a85e9b53c0bca81b519.tar.gz
vcpkg-7c4323099b73f3a42f455a85e9b53c0bca81b519.zip
[ngspice] fix win32 codemodel glob (#16131)
* [ngspice] Fix 32-bit code models not being globbed correctly * [ngspice] update x-add-version
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)