update for clhep (#4588)
* adding clhep 2.3.4.4, etc and modernizing package.py * add remaining 2.3.x.y clhep releases * setting list_depth to 1 is sufficient * remove whitespace
This commit is contained in:
		 Lynn Garren
					Lynn Garren
				
			
				
					committed by
					
						 Adam J. Stewart
						Adam J. Stewart
					
				
			
			
				
	
			
			
			 Adam J. Stewart
						Adam J. Stewart
					
				
			
						parent
						
							767cdf98d3
						
					
				
				
					commit
					575ee41413
				
			| @@ -26,13 +26,23 @@ | ||||
| from spack import * | ||||
|  | ||||
|  | ||||
| class Clhep(Package): | ||||
| class Clhep(CMakePackage): | ||||
|     """CLHEP is a C++ Class Library for High Energy Physics. """ | ||||
|     homepage = "http://proj-clhep.web.cern.ch/proj-clhep/" | ||||
|     url      = "http://proj-clhep.web.cern.ch/proj-clhep/DISTRIBUTION/tarFiles/clhep-2.2.0.5.tgz" | ||||
|     list_url = "https://proj-clhep.web.cern.ch/proj-clhep/DISTRIBUTION/" | ||||
|     list_url = "https://proj-clhep.web.cern.ch/proj-clhep/" | ||||
|     list_depth = 1 | ||||
|  | ||||
|     version('2.3.4.4', '8b8a33d0d19213b60d6c22ce5fc93761') | ||||
|     version('2.3.4.3', '6941279f70d69492fff1aa955f3f2562') | ||||
|     version('2.3.4.2', '1e7a9046c9ad0b347d6812f8031191da') | ||||
|     version('2.3.4.1', '5ae85571ff3d8b2c481c3f95ea89b751') | ||||
|     version('2.3.4.0', 'dd899d0791a823221927f97edf190348') | ||||
|     version('2.3.3.2', '8b9f8d7f4dccec6d058b3a078f66b6a3') | ||||
|     version('2.3.3.1', '456ef9d262ef4e776af984bfbe2f48c7') | ||||
|     version('2.3.3.0', '3637eaa6750606e589e52c9e155a382e') | ||||
|     version('2.3.2.2', '567b304b0fa017e1e9fbf199f456ebe9') | ||||
|     version('2.3.2.1', '064903cb5c23b54f520d04ca6230b901') | ||||
|     version('2.3.1.1', '16efca7641bc118c9d217cc96fe90bf5') | ||||
|     version('2.3.1.0', 'b084934fc26a4182a08c09c292e19161') | ||||
|     version('2.3.0.0', 'a00399a2ca867f2be902c22fc71d7e2e') | ||||
| @@ -53,12 +63,19 @@ def patch(self): | ||||
|                     '%s/%s/CLHEP/CMakeLists.txt' | ||||
|                     % (self.stage.path, self.spec.version)) | ||||
|  | ||||
|     def install(self, spec, prefix): | ||||
|         # Handle debug | ||||
|         # Pull out the BUILD_TYPE so we can change it (Release is default) | ||||
|         cmake_args = [arg for arg in std_cmake_args if 'BUILD_TYPE' not in arg] | ||||
|         build_type = 'Debug' if '+debug' in spec else 'MinSizeRel' | ||||
|         cmake_args.extend(['-DCMAKE_BUILD_TYPE=' + build_type]) | ||||
|     root_cmakelists_dir = '../CLHEP' | ||||
|  | ||||
|     def build_type(self): | ||||
|         spec = self.spec | ||||
|  | ||||
|         if '+debug' in spec: | ||||
|             return 'Debug' | ||||
|         else: | ||||
|             return 'MinSizeRel' | ||||
|  | ||||
|     def cmake_args(self): | ||||
|         spec = self.spec | ||||
|         cmake_args = [] | ||||
|  | ||||
|         if '+cxx11' in spec: | ||||
|             env['CXXFLAGS'] = self.compiler.cxx11_flag | ||||
| @@ -70,12 +87,4 @@ def install(self, spec, prefix): | ||||
|             cmake_args.append('-DCLHEP_BUILD_CXXSTD=' + | ||||
|                               self.compiler.cxx14_flag) | ||||
|  | ||||
|         # Note that the tar file is unusual in that there's a | ||||
|         # CLHEP directory (addtional layer) | ||||
|         cmake_args.append("../CLHEP") | ||||
|  | ||||
|         # Run cmake in a build directory | ||||
|         with working_dir('build', create=True): | ||||
|             cmake(*cmake_args) | ||||
|             make() | ||||
|             make("install") | ||||
|         return cmake_args | ||||
|   | ||||
		Reference in New Issue
	
	Block a user