mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[ngspice] Initial port (#12695)
* Add ngspice port Add the msvc specific include folder to be copied as well Fix 32-bit builds Use install_msbuild Remove fftw Fix 32-bit build again Update ci baseline and check linkage for dll only Use spaces consistently More clean Update ports/ngspice/CONTROL Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Update ports/ngspice/portfile.cmake Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Update ports/ngspice/portfile.cmake Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Update ports/ngspice/portfile.cmake Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Update scripts/ci.baseline.txt Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> remove uwp support Update ports/ngspice/CONTROL Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * Update ports/ngspice/portfile.cmake Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * Use the suggest supports Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
This commit is contained in:
parent
0330d10c8d
commit
e3031264b9
5
ports/ngspice/CONTROL
Normal file
5
ports/ngspice/CONTROL
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
Source: ngspice
|
||||||
|
Version: 32
|
||||||
|
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)
|
50
ports/ngspice/portfile.cmake
Normal file
50
ports/ngspice/portfile.cmake
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
vcpkg_fail_port_install(ON_TARGET "Linux" "OSX" "UWP" ON_ARCH "arm" "arm64")
|
||||||
|
|
||||||
|
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
||||||
|
|
||||||
|
vcpkg_from_sourceforge(
|
||||||
|
OUT_SOURCE_PATH SOURCE_PATH
|
||||||
|
REPO ngspice/ng-spice-rework
|
||||||
|
REF 32
|
||||||
|
FILENAME "ngspice-32.tar.gz"
|
||||||
|
SHA512 222eaa0cd6577a6eb8454bb49a7050a162d430c4b07a4fdc6baf350c5b3f5b018bac640fd44f465ec09c8cba6a9729b1cbe8d3d8c097f672acc2c22fabe8f4bc
|
||||||
|
PATCHES
|
||||||
|
use-winbison-global.patch
|
||||||
|
)
|
||||||
|
|
||||||
|
vcpkg_find_acquire_program(BISON)
|
||||||
|
|
||||||
|
get_filename_component(BISON_DIR "${BISON}" DIRECTORY)
|
||||||
|
vcpkg_add_to_path(PREPEND "${BISON_DIR}")
|
||||||
|
|
||||||
|
# Ensure its windows
|
||||||
|
if (VCPKG_TARGET_IS_WINDOWS)
|
||||||
|
# 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)
|
||||||
|
|
||||||
|
# We use build_msbuild because install_msbuild is incompatible due to SPICE using .lib for the last 47 years....
|
||||||
|
vcpkg_install_msbuild(
|
||||||
|
USE_VCPKG_INTEGRATION
|
||||||
|
SOURCE_PATH ${SOURCE_PATH}
|
||||||
|
INCLUDES_SUBPATH /src/include
|
||||||
|
LICENSE_SUBPATH COPYING
|
||||||
|
PLATFORM ${TRIPLET_SYSTEM_ARCH} # install_msbuild swaps x86 for win32(bad) if we dont force our own setting
|
||||||
|
PROJECT_SUBPATH visualc/sharedspice.sln
|
||||||
|
TARGET Build
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
message(FATAL_ERROR "Sorry but ngspice only can be built in Windows")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# 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)
|
||||||
|
|
||||||
|
vcpkg_copy_pdbs()
|
13
ports/ngspice/use-winbison-global.patch
Normal file
13
ports/ngspice/use-winbison-global.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/visualc/sharedspice.vcxproj b/visualc/sharedspice.vcxproj
|
||||||
|
index 96786b1..f5d9322 100644
|
||||||
|
--- a/visualc/sharedspice.vcxproj
|
||||||
|
+++ b/visualc/sharedspice.vcxproj
|
||||||
|
@@ -879,7 +879,7 @@
|
||||||
|
<ItemGroup>
|
||||||
|
<CustomBuild Include="..\src\frontend\parse-bison.y;..\src\spicelib\parser\inpptree-parser.y">
|
||||||
|
<Message>invoke win_bison.exe for %(Identity)</Message>
|
||||||
|
- <Command>..\..\flex-bison\win_bison.exe --output=.\tmp-bison\%(Filename).c --defines=.\tmp-bison\%(Filename).h %(Identity) || exit 1</Command>
|
||||||
|
+ <Command>win_bison.exe --output=.\tmp-bison\%(Filename).c --defines=.\tmp-bison\%(Filename).h %(Identity) || exit 1</Command>
|
||||||
|
<Outputs>.\tmp-bison\%(Filename).c;.\tmp-bison\%(Filename).h</Outputs>
|
||||||
|
</CustomBuild>
|
||||||
|
<None Include="..\src\sharedspice.map" />
|
@ -1149,6 +1149,7 @@ networkdirect-sdk:x64-linux=fail
|
|||||||
networkdirect-sdk:x64-osx=fail
|
networkdirect-sdk:x64-osx=fail
|
||||||
networkdirect-sdk:x64-uwp=fail
|
networkdirect-sdk:x64-uwp=fail
|
||||||
networkdirect-sdk:x86-windows=fail
|
networkdirect-sdk:x86-windows=fail
|
||||||
|
ngspice:x64-windows-static=fail
|
||||||
nmslib:arm64-windows=fail
|
nmslib:arm64-windows=fail
|
||||||
nmslib:arm-uwp=fail
|
nmslib:arm-uwp=fail
|
||||||
nmslib:x64-uwp=fail
|
nmslib:x64-uwp=fail
|
||||||
|
Loading…
x
Reference in New Issue
Block a user