From 7c4323099b73f3a42f455a85e9b53c0bca81b519 Mon Sep 17 00:00:00 2001 From: Marek Roszko Date: Thu, 11 Feb 2021 03:06:01 -0500 Subject: [ngspice] fix win32 codemodel glob (#16131) * [ngspice] Fix 32-bit code models not being globbed correctly * [ngspice] update x-add-version --- ports/ngspice/CONTROL | 1 + ports/ngspice/portfile.cmake | 16 +++++++++++++--- versions/baseline.json | 2 +- versions/n-/ngspice.json | 5 +++++ 4 files changed, 20 insertions(+), 4 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) diff --git a/versions/baseline.json b/versions/baseline.json index 1af467aa0..ba1e7e4e1 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4074,7 +4074,7 @@ }, "ngspice": { "baseline": "34", - "port-version": 0 + "port-version": 1 }, "nifticlib": { "baseline": "2020-04-30", diff --git a/versions/n-/ngspice.json b/versions/n-/ngspice.json index 692e4ae9c..f7d4016c9 100644 --- a/versions/n-/ngspice.json +++ b/versions/n-/ngspice.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "249a0e9bafd17932e3d46a0f979a2983b8a78b0d", + "version-string": "34", + "port-version": 1 + }, { "git-tree": "2a9bd9cf0045f6a35080bf13ea51abba65bd49a6", "version-string": "34", -- cgit v1.2.3