summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/swig/package.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/swig/package.py b/var/spack/repos/builtin/packages/swig/package.py
index 8847f6a906..789170a685 100644
--- a/var/spack/repos/builtin/packages/swig/package.py
+++ b/var/spack/repos/builtin/packages/swig/package.py
@@ -22,6 +22,7 @@ class Swig(AutotoolsPackage):
homepage = "http://www.swig.org"
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('3.0.12', '82133dfa7bba75ff9ad98a7046be687c')
version('3.0.11', '13732eb0f1ab2123d180db8425c1edea')
@@ -31,12 +32,27 @@ class Swig(AutotoolsPackage):
version('2.0.12', 'c3fb0b2d710cc82ed0154b91e43085a4')
version('2.0.2', 'eaf619a4169886923e5f828349504a29')
version('1.3.40', '2df766c9e03e02811b1ab4bba1c7b9cc')
+ version('fortran', branch='master',
+ git='https://github.com/swig-fortran/swig.git')
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'
@run_after('install')
def create_symlink(self):
+ # CMake compatibility: see https://github.com/spack/spack/pull/6240
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')