Update SWIG versions and add Fortran fork (#12185)
* Add git repositories for SWIG and SWIG-Fortran * Fix typo in documentation * Move 'master' to top of SWIG version list
This commit is contained in:
		
				
					committed by
					
						
						Adam J. Stewart
					
				
			
			
				
	
			
			
			
						parent
						
							30cf665d16
						
					
				
				
					commit
					172fcb0225
				
			@@ -22,6 +22,7 @@ class Swig(AutotoolsPackage):
 | 
				
			|||||||
    homepage = "http://www.swig.org"
 | 
					    homepage = "http://www.swig.org"
 | 
				
			||||||
    url      = "http://prdownloads.sourceforge.net/swig/swig-3.0.12.tar.gz"
 | 
					    url      = "http://prdownloads.sourceforge.net/swig/swig-3.0.12.tar.gz"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    version('master', git='https://github.com/swig/swig.git')
 | 
				
			||||||
    version('4.0.0', 'e8a39cd6437e342cdcbd5af27a9bf11b62dc9efec9248065debcb8276fcbb925')
 | 
					    version('4.0.0', 'e8a39cd6437e342cdcbd5af27a9bf11b62dc9efec9248065debcb8276fcbb925')
 | 
				
			||||||
    version('3.0.12', '82133dfa7bba75ff9ad98a7046be687c')
 | 
					    version('3.0.12', '82133dfa7bba75ff9ad98a7046be687c')
 | 
				
			||||||
    version('3.0.11', '13732eb0f1ab2123d180db8425c1edea')
 | 
					    version('3.0.11', '13732eb0f1ab2123d180db8425c1edea')
 | 
				
			||||||
@@ -31,12 +32,27 @@ class Swig(AutotoolsPackage):
 | 
				
			|||||||
    version('2.0.12', 'c3fb0b2d710cc82ed0154b91e43085a4')
 | 
					    version('2.0.12', 'c3fb0b2d710cc82ed0154b91e43085a4')
 | 
				
			||||||
    version('2.0.2',  'eaf619a4169886923e5f828349504a29')
 | 
					    version('2.0.2',  'eaf619a4169886923e5f828349504a29')
 | 
				
			||||||
    version('1.3.40', '2df766c9e03e02811b1ab4bba1c7b9cc')
 | 
					    version('1.3.40', '2df766c9e03e02811b1ab4bba1c7b9cc')
 | 
				
			||||||
 | 
					    version('fortran', branch='master',
 | 
				
			||||||
 | 
					            git='https://github.com/swig-fortran/swig.git')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    depends_on('pcre')
 | 
					    depends_on('pcre')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # Git repository does *not* include configure script
 | 
				
			||||||
 | 
					    for _version in ['@fortran', '@master']:
 | 
				
			||||||
 | 
					        depends_on('autoconf', type='build', when=_version)
 | 
				
			||||||
 | 
					        depends_on('automake', type='build', when=_version)
 | 
				
			||||||
 | 
					        depends_on('libtool', type='build', when=_version)
 | 
				
			||||||
 | 
					    depends_on('pkgconfig', type='build')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    build_directory = 'spack-build'
 | 
					    build_directory = 'spack-build'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @run_after('install')
 | 
					    @run_after('install')
 | 
				
			||||||
    def create_symlink(self):
 | 
					    def create_symlink(self):
 | 
				
			||||||
 | 
					        # CMake compatibility: see https://github.com/spack/spack/pull/6240
 | 
				
			||||||
        with working_dir(self.prefix.bin):
 | 
					        with working_dir(self.prefix.bin):
 | 
				
			||||||
            os.symlink('swig', 'swig%i.0' % self.spec.version[0])
 | 
					            os.symlink('swig', 'swig{0}'.format(self.spec.version.up_to(2)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    for _version in ['@fortran', '@master']:
 | 
				
			||||||
 | 
					        @when(_version)
 | 
				
			||||||
 | 
					        def autoreconf(self, spec, prefix):
 | 
				
			||||||
 | 
					            which('sh')('./autogen.sh')
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user