GDL and missing dependencies (#8283)
* GDL and missing dependencies Signed-off-by: Ricardo Silva <ricardo.silva@epfl.ch> * GDL and GraphicsMagick improvements * GDL: sort variants and dependencies, add descriptions * GDL: add wx variant * GDL: make variants explicit (in cmake args) * GraphicsMagick: sort dependencies * GraphicsMagick: cleanup boilerplate comments Signed-off-by: Ricardo Silva <ricardo.silva@epfl.ch> * Improvements/Fixes for gdl, plplot and graphicsmagick * gdl: * variants: * openmp * be explicit about enabling/disabling x11 * dependencies: * logic for plplot with/without wx * some previously missing (where being picked up from the system) * graphicsmagick: previously missing dependencies (where being picked up from the system) * plplot: more versions + variants + dependencies Signed-off-by: Ricardo Silva <ricardo.silva@epfl.ch> * GDL: hdf4/5 variants * also sorted explicit enabling/disabling of cmake flags for readability Signed-off-by: Ricardo Silva <ricardo.silva@epfl.ch> * plplot: fix variant descriptions Signed-off-by: Ricardo Silva <ricardo.silva@epfl.ch> * Add tcl variant, use find_libraries for portability Signed-off-by: Ricardo Silva <ricardo.silva@epfl.ch> * plplot: flake8 Signed-off-by: Ricardo Silva <ricardo.silva@epfl.ch>
This commit is contained in:
		 Ricardo Silva
					Ricardo Silva
				
			
				
					committed by
					
						 Adam J. Stewart
						Adam J. Stewart
					
				
			
			
				
	
			
			
			 Adam J. Stewart
						Adam J. Stewart
					
				
			
						parent
						
							7488ed4ff5
						
					
				
				
					commit
					9b2953939b
				
			
							
								
								
									
										129
									
								
								var/spack/repos/builtin/packages/gdl/package.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										129
									
								
								var/spack/repos/builtin/packages/gdl/package.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,129 @@ | ||||
| ############################################################################## | ||||
| # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. | ||||
| # Produced at the Lawrence Livermore National Laboratory. | ||||
| # | ||||
| # This file is part of Spack. | ||||
| # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. | ||||
| # LLNL-CODE-647188 | ||||
| # | ||||
| # For details, see https://github.com/spack/spack | ||||
| # Please also see the NOTICE and LICENSE files for our notice and the LGPL. | ||||
| # | ||||
| # This program is free software; you can redistribute it and/or modify | ||||
| # it under the terms of the GNU Lesser General Public License (as | ||||
| # published by the Free Software Foundation) version 2.1, February 1999. | ||||
| # | ||||
| # This program is distributed in the hope that it will be useful, but | ||||
| # WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF | ||||
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and | ||||
| # conditions of the GNU Lesser General Public License for more details. | ||||
| # | ||||
| # You should have received a copy of the GNU Lesser General Public | ||||
| # License along with this program; if not, write to the Free Software | ||||
| # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||||
| ############################################################################## | ||||
| from spack import * | ||||
|  | ||||
|  | ||||
| class Gdl(CMakePackage): | ||||
|     """A free and open-source IDL/PV-WAVE compiler. | ||||
|  | ||||
|     GNU Data Language (GDL) is a free/libre/open source incremental compiler | ||||
|     compatible with IDL and to some extent with PV-WAVE. | ||||
|     """ | ||||
|  | ||||
|     homepage = "https://github.com/gnudatalanguage/gdl" | ||||
|     url      = "https://github.com/gnudatalanguage/gdl/archive/v0.9.8.tar.gz" | ||||
|  | ||||
|     version('0.9.8', '447b0362e1df5ea8af814a969e89d3ec') | ||||
|  | ||||
|     variant( | ||||
|             'graphicsmagick', | ||||
|             default=False, | ||||
|             description='Enable GraphicsMagick' | ||||
|            ) | ||||
|     variant('hdf4', default=False, description='Enable HDF4') | ||||
|     variant('hdf5', default=True, description='Enable HDF5') | ||||
|     variant('openmp', default=True, description='Enable OpenMP') | ||||
|     variant('proj', default=True, description='Enable LIBPROJ4') | ||||
|     variant('python', default=False, description='Enable Python') | ||||
|     variant('wx', default=False, description='Enable WxWidgets') | ||||
|     variant('x11', default=False, description='Enable X11') | ||||
|  | ||||
|     extends('python', when='+python') | ||||
|  | ||||
|     depends_on('graphicsmagick', when='+graphicsmagick') | ||||
|     depends_on('hdf', when='+hdf4') | ||||
|     depends_on('hdf5', when='+hdf5') | ||||
|     depends_on('libx11', when='+x11') | ||||
|     depends_on('plplot+wx', when='+wx@:5.11') | ||||
|     depends_on('plplot+wx+wxold', when='+wx@5.12:') | ||||
|     depends_on('plplot~wx', when='~wx') | ||||
|     depends_on('proj', when='+proj') | ||||
|     depends_on('py-numpy', type=('build', 'run'), when='+python') | ||||
|     depends_on('python@2.7:2.8', type=('build', 'run'), when='+python') | ||||
|     depends_on('wx', when='+wx') | ||||
|  | ||||
|     depends_on('eigen') | ||||
|     depends_on('fftw') | ||||
|     depends_on('gsl') | ||||
|     depends_on('jpeg') | ||||
|     depends_on('libice') | ||||
|     depends_on('libsm') | ||||
|     depends_on('libxinerama') | ||||
|     depends_on('libxxf86vm') | ||||
|     depends_on('netcdf') | ||||
|     depends_on('pslib') | ||||
|     depends_on('readline') | ||||
|  | ||||
|     def cmake_args(self): | ||||
|         args = [] | ||||
|  | ||||
|         # GraphicsMagick covers the same features as ImageMagick and | ||||
|         # only version 6 of ImageMagick is supported (version 7 is packaged) | ||||
|         args += ['-DMAGICK=OFF'] | ||||
|  | ||||
|         if '+graphicsmagick' in self.spec: | ||||
|             args += ['-DGRAPHICSMAGICK=ON'] | ||||
|         else: | ||||
|             args += ['-DGRAPHICSMAGICK=OFF'] | ||||
|  | ||||
|         if '+hdf4' in self.spec: | ||||
|             args += ['-DHDF=ON'] | ||||
|         else: | ||||
|             args += ['-DHDF=OFF'] | ||||
|  | ||||
|         if '+hdf5' in self.spec: | ||||
|             args += ['-DHDF5=ON'] | ||||
|         else: | ||||
|             args += ['-DHDF5=OFF'] | ||||
|  | ||||
|         if '+openmp' in self.spec: | ||||
|             args += ['-DOPENMP=ON'] | ||||
|         else: | ||||
|             args += ['-DOPENMP=OFF'] | ||||
|  | ||||
|         if '+proj' in self.spec: | ||||
|             args += [ | ||||
|                 '-DLIBPROJ4=ON', | ||||
|                 '-DLIBPROJ4DIR={0}'.format(self.spec['proj'].prefix) | ||||
|             ] | ||||
|         else: | ||||
|             args += ['-DLIBPROJ4=OFF'] | ||||
|  | ||||
|         if '+python' in self.spec: | ||||
|             args += ['-DPYTHON=ON'] | ||||
|         else: | ||||
|             args += ['-DPYTHON=OFF'] | ||||
|  | ||||
|         if '+wx' in self.spec: | ||||
|             args += ['-DWXWIDGETS=ON'] | ||||
|         else: | ||||
|             args += ['-DWXWIDGETS=OFF'] | ||||
|  | ||||
|         if '+x11' in self.spec: | ||||
|             args += ['-DX11=ON'] | ||||
|         else: | ||||
|             args += ['-DX11=OFF'] | ||||
|  | ||||
|         return args | ||||
							
								
								
									
										60
									
								
								var/spack/repos/builtin/packages/graphicsmagick/package.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								var/spack/repos/builtin/packages/graphicsmagick/package.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,60 @@ | ||||
| ############################################################################## | ||||
| # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. | ||||
| # Produced at the Lawrence Livermore National Laboratory. | ||||
| # | ||||
| # This file is part of Spack. | ||||
| # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. | ||||
| # LLNL-CODE-647188 | ||||
| # | ||||
| # For details, see https://github.com/spack/spack | ||||
| # Please also see the NOTICE and LICENSE files for our notice and the LGPL. | ||||
| # | ||||
| # This program is free software; you can redistribute it and/or modify | ||||
| # it under the terms of the GNU Lesser General Public License (as | ||||
| # published by the Free Software Foundation) version 2.1, February 1999. | ||||
| # | ||||
| # This program is distributed in the hope that it will be useful, but | ||||
| # WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF | ||||
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and | ||||
| # conditions of the GNU Lesser General Public License for more details. | ||||
| # | ||||
| # You should have received a copy of the GNU Lesser General Public | ||||
| # License along with this program; if not, write to the Free Software | ||||
| # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||||
| ############################################################################## | ||||
| from spack import * | ||||
|  | ||||
|  | ||||
| class Graphicsmagick(AutotoolsPackage): | ||||
|     """GraphicsMagick is the swiss army knife of image processing. | ||||
|  | ||||
|     Provides a robust and efficient collection of tools and libraries which | ||||
|     support reading, writing, and manipulating an image in over 88 major | ||||
|     formats including important formats like DPX, GIF, JPEG, JPEG-2000, PNG, | ||||
|     PDF, PNM, and TIFF. | ||||
|     """ | ||||
|  | ||||
|     homepage = "http://www.graphicsmagick.org/" | ||||
|     url      = "https://sourceforge.net/projects/graphicsmagick/files/graphicsmagick/1.3.29/GraphicsMagick-1.3.29.tar.xz/download" | ||||
|  | ||||
|     version('1.3.29', 'ddde0dd239592db50c5378472355c03c') | ||||
|  | ||||
|     depends_on('bzip2') | ||||
|     depends_on('ghostscript') | ||||
|     depends_on('ghostscript-fonts') | ||||
|     depends_on('graphviz') | ||||
|     depends_on('jasper') | ||||
|     depends_on('jpeg') | ||||
|     depends_on('lcms') | ||||
|     depends_on('libice') | ||||
|     depends_on('libpng') | ||||
|     depends_on('libsm') | ||||
|     depends_on('libtiff') | ||||
|     depends_on('libtool') | ||||
|     depends_on('libxml2') | ||||
|     depends_on('xz') | ||||
|     depends_on('zlib') | ||||
|  | ||||
|     def configure_args(self): | ||||
|         args = ['--enable-shared'] | ||||
|         return args | ||||
							
								
								
									
										123
									
								
								var/spack/repos/builtin/packages/plplot/package.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										123
									
								
								var/spack/repos/builtin/packages/plplot/package.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,123 @@ | ||||
| ############################################################################## | ||||
| # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. | ||||
| # Produced at the Lawrence Livermore National Laboratory. | ||||
| # | ||||
| # This file is part of Spack. | ||||
| # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. | ||||
| # LLNL-CODE-647188 | ||||
| # | ||||
| # For details, see https://github.com/spack/spack | ||||
| # Please also see the NOTICE and LICENSE files for our notice and the LGPL. | ||||
| # | ||||
| # This program is free software; you can redistribute it and/or modify | ||||
| # it under the terms of the GNU Lesser General Public License (as | ||||
| # published by the Free Software Foundation) version 2.1, February 1999. | ||||
| # | ||||
| # This program is distributed in the hope that it will be useful, but | ||||
| # WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF | ||||
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and | ||||
| # conditions of the GNU Lesser General Public License for more details. | ||||
| # | ||||
| # You should have received a copy of the GNU Lesser General Public | ||||
| # License along with this program; if not, write to the Free Software | ||||
| # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||||
| ############################################################################## | ||||
| from spack import * | ||||
|  | ||||
|  | ||||
| class Plplot(CMakePackage): | ||||
|     """PLplot is a cross-platform package for creating scientific plots.""" | ||||
|  | ||||
|     homepage = "http://plplot.sourceforge.net/" | ||||
|     url      = "https://sourceforge.net/projects/plplot/files/plplot/5.13.0%20Source/plplot-5.13.0.tar.gz/download" | ||||
|  | ||||
|     version('5.13.0', 'bfefeae7fb9a23377c6dc37b44a7da8a') | ||||
|     version('5.12.0', '998a05be218e5de8f2faf988b8dbdc51') | ||||
|     version('5.11.0', '632c9e13b09f4e2b2517b3567bc3cece') | ||||
|  | ||||
|     variant('java', default=False, description='Enable Java binding') | ||||
|     variant('lua', default=False, description='Enable Lua binding') | ||||
|     variant('pango', default=False, description='Enable Pango') | ||||
|     variant('python', default=False, description='Enable Python binding') | ||||
|     variant('qt', default=False, description='Enable QT binding') | ||||
|     variant('tcl', default=True, description='Enable TCL binding') | ||||
|     variant('wx', default=False, description='Enable WxWidgets') | ||||
|     variant('wxold', default=False, description='Use WxWidgets old interface') | ||||
|  | ||||
|     conflicts('~wx', when='+wxold') | ||||
|     conflicts('+wxold', when='@:5.11') | ||||
|  | ||||
|     depends_on('java', when='+java') | ||||
|     depends_on('lua', when='+lua') | ||||
|     depends_on('pango', when='+pango') | ||||
|     depends_on('py-numpy', type=('build', 'run'), when='+python') | ||||
|     depends_on('python@2.7:2.8', type=('build', 'run'), when='+python') | ||||
|     depends_on('qt', when='+qt') | ||||
|     depends_on('tcl', when='+tcl') | ||||
|     depends_on('wx', when='+wx') | ||||
|  | ||||
|     depends_on('freetype') | ||||
|     depends_on('gtkplus') | ||||
|     depends_on('libx11') | ||||
|     depends_on('qhull') | ||||
|     depends_on('swig') | ||||
|  | ||||
|     def cmake_args(self): | ||||
|         args = [] | ||||
|         # needs 'tk with wish' | ||||
|         args += ['-DENABLE_tk=OFF'] | ||||
|  | ||||
|         if '+java' in self.spec: | ||||
|             args += ['-DENABLE_java=ON'] | ||||
|         else: | ||||
|             args += ['-DENABLE_java=OFF'] | ||||
|  | ||||
|         if '+lua' in self.spec: | ||||
|             args += ['-DENABLE_lua=ON'] | ||||
|         else: | ||||
|             args += ['-DENABLE_lua=OFF'] | ||||
|  | ||||
|         if '+python' in self.spec: | ||||
|             args += ['-DENABLE_python=ON'] | ||||
|         else: | ||||
|             args += ['-DENABLE_python=OFF'] | ||||
|  | ||||
|         if '+qt' in self.spec: | ||||
|             args += ['-DENABLE_qt=ON'] | ||||
|         else: | ||||
|             args += ['-DENABLE_qt=OFF'] | ||||
|  | ||||
|         if '+tcl' in self.spec: | ||||
|             args += ['-DENABLE_tcl=ON'] | ||||
|             # could also be addressed by creating the links within tcl | ||||
|             # as is done for the tclsh executable | ||||
|             args += [ | ||||
|                 '-DTCL_INCLUDE_PATH={0}/include'.format( | ||||
|                     self.spec['tcl'].prefix.include | ||||
|                 ), | ||||
|                 '-DTCL_LIBRARY={0}'.format( | ||||
|                     LibraryList(find_libraries( | ||||
|                         'libtcl*', | ||||
|                         self.spec['tcl'].prefix.lib, | ||||
|                         shared=True, | ||||
|                     )), | ||||
|                 ), | ||||
|                 '-DTCL_STUB_LIBRARY={0}'.format( | ||||
|                     LibraryList(find_libraries( | ||||
|                         'libtclstub*', | ||||
|                         self.spec['tcl'].prefix.lib, | ||||
|                         shared=False, | ||||
|                     )), | ||||
|                 ) | ||||
|             ] | ||||
|         else: | ||||
|             args += ['-DENABLE_tcl=OFF'] | ||||
|  | ||||
|         if '+wx' in self.spec: | ||||
|             args += ['-DENABLE_wxwidgets=ON'] | ||||
|             if '+wxold' in self.spec: | ||||
|                 args += ['-DOLD_WXWIDGETS=ON'] | ||||
|         else: | ||||
|             args += ['-DENABLE_wxwidgets=OFF'] | ||||
|  | ||||
|         return args | ||||
							
								
								
									
										37
									
								
								var/spack/repos/builtin/packages/pslib/package.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								var/spack/repos/builtin/packages/pslib/package.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,37 @@ | ||||
| ############################################################################## | ||||
| # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. | ||||
| # Produced at the Lawrence Livermore National Laboratory. | ||||
| # | ||||
| # This file is part of Spack. | ||||
| # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. | ||||
| # LLNL-CODE-647188 | ||||
| # | ||||
| # For details, see https://github.com/spack/spack | ||||
| # Please also see the NOTICE and LICENSE files for our notice and the LGPL. | ||||
| # | ||||
| # This program is free software; you can redistribute it and/or modify | ||||
| # it under the terms of the GNU Lesser General Public License (as | ||||
| # published by the Free Software Foundation) version 2.1, February 1999. | ||||
| # | ||||
| # This program is distributed in the hope that it will be useful, but | ||||
| # WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF | ||||
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and | ||||
| # conditions of the GNU Lesser General Public License for more details. | ||||
| # | ||||
| # You should have received a copy of the GNU Lesser General Public | ||||
| # License along with this program; if not, write to the Free Software | ||||
| # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||||
| ############################################################################## | ||||
| from spack import * | ||||
|  | ||||
|  | ||||
| class Pslib(AutotoolsPackage): | ||||
|     """C-library to create PostScript files on the fly.""" | ||||
|  | ||||
|     homepage = "http://pslib.sourceforge.net/" | ||||
|     url      = "https://kent.dl.sourceforge.net/project/pslib/pslib/0.4.5/pslib-0.4.5.tar.gz" | ||||
|  | ||||
|     version('0.4.5', '03f39393628a6d758799b9f845047e27') | ||||
|  | ||||
|     depends_on('jpeg') | ||||
|     depends_on('libpng') | ||||
		Reference in New Issue
	
	Block a user