summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew W Elble <aweits@rit.edu>2020-11-30 04:43:45 -0500
committerGitHub <noreply@github.com>2020-11-30 10:43:45 +0100
commit499ada708e19018c905e2eabb18a9a41efce8240 (patch)
tree4de2bd49e5689d209eda03e3706b4a742bb6343a
parent7b587bdda397db8207d271e659a2f861d3643529 (diff)
downloadspack-499ada708e19018c905e2eabb18a9a41efce8240.tar.gz
spack-499ada708e19018c905e2eabb18a9a41efce8240.tar.bz2
spack-499ada708e19018c905e2eabb18a9a41efce8240.tar.xz
spack-499ada708e19018c905e2eabb18a9a41efce8240.zip
kicad: new package (#20074)
-rw-r--r--var/spack/repos/builtin/packages/kicad/package.py78
-rw-r--r--var/spack/repos/builtin/packages/ngspice/package.py21
2 files changed, 99 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/kicad/package.py b/var/spack/repos/builtin/packages/kicad/package.py
new file mode 100644
index 0000000000..e89d2b5a38
--- /dev/null
+++ b/var/spack/repos/builtin/packages/kicad/package.py
@@ -0,0 +1,78 @@
+# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+
+class Kicad(CMakePackage):
+ """KiCad is an open source software suite for Electronic Design
+ Automation (EDA). The programs handle Schematic Capture, and PCB
+ Layout with Gerber output."""
+
+ homepage = 'https://kicad.org'
+ url = 'https://gitlab.com/kicad/code/kicad/-/archive/5.1.8/kicad-5.1.8.tar.gz'
+ maintainers = ['aweits']
+
+ version('5.1.8', sha256='bf24f8ef427b4a989479b8e4af0b8ae5c54766755f12748e2e88a922c5344ca4')
+
+ depends_on('wxwidgets')
+ depends_on('python@3:', type=('build', 'run'))
+ # py-wxpython needs work
+ # depends_on('py-wxpython', type=('build', 'run'))
+ depends_on('glew')
+ depends_on('gl')
+ depends_on('glm')
+ depends_on('boost@1.56:')
+ depends_on('oce+X11')
+ depends_on('swig', type='build')
+ depends_on('curl')
+ depends_on('pkgconfig')
+ depends_on('git', type=('build', 'run'))
+ depends_on('ngspice')
+ depends_on('hicolor-icon-theme', type=('build', 'run'))
+ depends_on('adwaita-icon-theme', type=('build', 'run'))
+ depends_on('gsettings-desktop-schemas', type=('build', 'run'))
+
+ extends('python')
+
+ resource_list = [
+ # version, resource, sha256sum
+ ('5.1.8', 'footprints', '8937b5ba0f67844ffaca40632bebe9c2f4f17fba446137434aa72363c55d7dd9'),
+ ('5.1.8', 'packages3D', '81e64939e922742431284bb19d1ec274d6dc10fd238e5583ead21dc08876c221'),
+ ('5.1.8', 'symbols', '98cedcca4d7ad6e3be96ec5a41f8f9b3414eae276bac1efdfd3f8871f0f8bc7e'),
+ ('5.1.8', 'templates', 'd64ca82854e9780413447a3fa82a528b264d39f57d467fddfc78f919e7ed15c5'),
+ ]
+
+ for ver, lib, checksum in resource_list:
+ resource(when='@{0}'.format(ver),
+ name=lib,
+ url='https://gitlab.com/kicad/libraries/kicad-{0}/-/archive/{1}/kicad-{0}-{1}.tar.bz2'.format(lib, ver),
+ sha256=checksum,
+ destination='',
+ )
+
+ def setup_dependent_build_environment(self, env, dependent_spec):
+ env.prepend_path('XDG_DATA_DIRS', self.prefix.share)
+
+ def setup_dependent_run_environment(self, env, dependent_spec):
+ env.prepend_path('XDG_DATA_DIRS', self.prefix.share)
+
+ def setup_build_environment(self, env):
+ env.prepend_path("XDG_DATA_DIRS", self.prefix.share)
+
+ def setup_run_environment(self, env):
+ env.prepend_path("XDG_DATA_DIRS", self.prefix.share)
+
+ def cmake_args(self):
+ args = []
+ args.append('-DKICAD_SCRIPTING_PYTHON3=ON')
+ args.append('-DKICAD_SCRIPTING_WXPYTHON=OFF')
+ return args
+
+ @run_after('install')
+ def install_libraries(self):
+ for ver, lib, checksum in self.resource_list:
+ with working_dir('kicad-{0}-{1}'.format(lib, ver)):
+ args = std_cmake_args
+ cmake(*args)
+ make('install')
diff --git a/var/spack/repos/builtin/packages/ngspice/package.py b/var/spack/repos/builtin/packages/ngspice/package.py
new file mode 100644
index 0000000000..ed491e7443
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ngspice/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+
+class Ngspice(AutotoolsPackage):
+ """ngspice is the open source spice simulator for electric and
+ electronic circuits."""
+
+ homepage = "http://ngspice.sourceforge.net/"
+ url = "https://sourceforge.net/projects/ngspice/files/ngspice-33.tar.gz"
+ version('33', sha256='b99db66cc1c57c44e9af1ef6ccb1dcbc8ae1df3e35acf570af578f606f8541f1')
+
+ depends_on('fftw')
+
+ def configure_args(self):
+ args = []
+ args.append('--without-x')
+ args.append('--with-ngshared')
+ return args