mirror of https://github.com/microsoft/vcpkg.git
[ngspice] msbuild (#33160)
* ngspice msbuild * v db * Update ports/ngspice/portfile.cmake * fix install * v db
This commit is contained in:
parent
c73b1e91ba
commit
de2e526fbc
|
|
@ -14,7 +14,7 @@ vcpkg_from_sourceforge(
|
|||
use-winbison-vngspice.patch
|
||||
remove-post-build.patch
|
||||
remove-64-in-codemodel-name.patch
|
||||
Fix-C2065.patch
|
||||
Fix-C2065.patch
|
||||
)
|
||||
|
||||
vcpkg_find_acquire_program(BISON)
|
||||
|
|
@ -25,32 +25,29 @@ vcpkg_add_to_path(PREPEND "${BISON_DIR}")
|
|||
# Sadly, vcpkg globs .libs inside install_msbuild and whines that the 47 year old SPICE format isn't a MSVC lib ;)
|
||||
# We need to kill them off first before the source tree is copied to a tmp location by install_msbuild
|
||||
|
||||
file(REMOVE_RECURSE "${SOURCE_PATH}/contrib")
|
||||
file(REMOVE_RECURSE "${SOURCE_PATH}/examples")
|
||||
file(REMOVE_RECURSE "${SOURCE_PATH}/man")
|
||||
file(REMOVE_RECURSE "${SOURCE_PATH}/tests")
|
||||
file(REMOVE_RECURSE "${SOURCE_PATH}/contrib")
|
||||
file(REMOVE_RECURSE "${SOURCE_PATH}/examples")
|
||||
file(REMOVE_RECURSE "${SOURCE_PATH}/man")
|
||||
file(REMOVE_RECURSE "${SOURCE_PATH}/tests")
|
||||
|
||||
# this builds the main dll
|
||||
vcpkg_install_msbuild(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
INCLUDES_SUBPATH /src/include
|
||||
LICENSE_SUBPATH COPYING
|
||||
vcpkg_msbuild_install(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
# install_msbuild swaps x86 for win32(bad) if we dont force our own setting
|
||||
PLATFORM ${TRIPLET_SYSTEM_ARCH}
|
||||
PROJECT_SUBPATH visualc/sharedspice.sln
|
||||
TARGET Build
|
||||
)
|
||||
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|
||||
file(COPY "${SOURCE_PATH}/src/include/" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
|
||||
|
||||
if("codemodels" IN_LIST FEATURES)
|
||||
# vngspice generates "codemodels" to enhance simulation capabilities
|
||||
# we cannot use install_msbuild as they output with ".cm" extensions on purpose
|
||||
set(BUILDTREE_PATH "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}")
|
||||
file(REMOVE_RECURSE "${BUILDTREE_PATH}")
|
||||
file(COPY "${SOURCE_PATH}/" DESTINATION "${BUILDTREE_PATH}")
|
||||
|
||||
vcpkg_install_msbuild(
|
||||
SOURCE_PATH "${BUILDTREE_PATH}"
|
||||
PROJECT_SUBPATH visualc/vngspice.sln
|
||||
vcpkg_msbuild_install(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
PROJECT_SUBPATH visualc/vngspice.sln
|
||||
# build_msbuild swaps x86 for win32(bad) if we dont force our own setting
|
||||
PLATFORM ${TRIPLET_SYSTEM_ARCH}
|
||||
TARGET Build
|
||||
|
|
@ -67,27 +64,26 @@ if("codemodels" IN_LIST FEATURES)
|
|||
endif()
|
||||
|
||||
#put the code models in the intended location
|
||||
file(GLOB NGSPICE_CODEMODELS_DEBUG
|
||||
"${BUILDTREE_PATH}/visualc/codemodels/${OUT_ARCH}/Debug/*.cm"
|
||||
)
|
||||
file(COPY ${NGSPICE_CODEMODELS_DEBUG} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib/ngspice")
|
||||
if(NOT VCPKG_BUILD_TYPE)
|
||||
file(GLOB NGSPICE_CODEMODELS_DEBUG
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/visualc/codemodels/${OUT_ARCH}/Debug/*.cm"
|
||||
)
|
||||
file(COPY ${NGSPICE_CODEMODELS_DEBUG} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib/ngspice")
|
||||
endif()
|
||||
|
||||
file(GLOB NGSPICE_CODEMODELS_RELEASE
|
||||
"${BUILDTREE_PATH}/visualc/codemodels/${OUT_ARCH}/Release/*.cm"
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/visualc/codemodels/${OUT_ARCH}/Release/*.cm"
|
||||
)
|
||||
file(COPY ${NGSPICE_CODEMODELS_RELEASE} DESTINATION "${CURRENT_PACKAGES_DIR}/lib/ngspice")
|
||||
|
||||
file(COPY ${NGSPICE_CODEMODELS_RELEASE} DESTINATION "${CURRENT_PACKAGES_DIR}/lib/ngspice")
|
||||
|
||||
# copy over spinit (spice init)
|
||||
file(RENAME "${BUILDTREE_PATH}/visualc/spinit_all" "${BUILDTREE_PATH}/visualc/spinit")
|
||||
file(COPY "${BUILDTREE_PATH}/visualc/spinit" DESTINATION "${CURRENT_PACKAGES_DIR}/share/ngspice")
|
||||
file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/visualc/spinit_all" DESTINATION "${CURRENT_PACKAGES_DIR}/share/ngspice")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/share/ngspice/spinit_all" "${CURRENT_PACKAGES_DIR}/share/ngspice/spinit")
|
||||
endif()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
# Unforunately install_msbuild isn't able to dual include directories that effectively layer
|
||||
file(GLOB NGSPICE_INCLUDES "${SOURCE_PATH}/visualc/src/include/ngspice/*")
|
||||
file(COPY ${NGSPICE_INCLUDES} DESTINATION "${CURRENT_PACKAGES_DIR}/include/ngspice")
|
||||
file(GLOB NGSPICE_INCLUDES "${SOURCE_PATH}/visualc/src/include/ngspice/*")
|
||||
file(COPY ${NGSPICE_INCLUDES} DESTINATION "${CURRENT_PACKAGES_DIR}/include/ngspice")
|
||||
|
||||
# This gets copied by install_msbuild but should not be shared
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/cppduals")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/cppduals")
|
||||
|
|
|
|||
|
|
@ -1,10 +1,18 @@
|
|||
{
|
||||
"name": "ngspice",
|
||||
"version": "39",
|
||||
"port-version": 1,
|
||||
"description": "Ngspice is a mixed-level/mixed-signal electronic circuit simulator. It is a successor of the latest stable release of Berkeley SPICE",
|
||||
"homepage": "http://ngspice.sourceforge.net/",
|
||||
"license": "CC-BY-SA-4.0",
|
||||
"supports": "!(linux | osx | arm | uwp)",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-msbuild",
|
||||
"host": true,
|
||||
"platform": "windows"
|
||||
}
|
||||
],
|
||||
"default-features": [
|
||||
"codemodels"
|
||||
],
|
||||
|
|
|
|||
|
|
@ -5714,7 +5714,7 @@
|
|||
},
|
||||
"ngspice": {
|
||||
"baseline": "39",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"ngtcp2": {
|
||||
"baseline": "0.18.0",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "2810bbc81dca4d7c2cc27859dc4403b347e6e40d",
|
||||
"version": "39",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "a0b81daaa09f8f109edf6870909050067ad5bd90",
|
||||
"version": "39",
|
||||
|
|
|
|||
Loading…
Reference in New Issue