Update pic/shared variants for hdf5, python, silo (#5423)
This commit is contained in:
		@@ -174,6 +174,7 @@ def configure_args(self):
 | 
			
		||||
        if '+shared' in spec:
 | 
			
		||||
            extra_args.append('--enable-shared')
 | 
			
		||||
        else:
 | 
			
		||||
            extra_args.append('--disable-shared')
 | 
			
		||||
            extra_args.append('--enable-static-exec')
 | 
			
		||||
 | 
			
		||||
        if '+cxx' in spec:
 | 
			
		||||
 
 | 
			
		||||
@@ -81,6 +81,8 @@ class Python(AutotoolsPackage):
 | 
			
		||||
    # builds then use a 32-bit type for Py_UNICODE and store Unicode data
 | 
			
		||||
    # internally as UCS4. Note that UCS2 and UCS4 Python builds are not binary
 | 
			
		||||
    # compatible.
 | 
			
		||||
    variant('pic', default=True,
 | 
			
		||||
            description='Produce position-independent code (for shared libs)')
 | 
			
		||||
 | 
			
		||||
    depends_on("openssl")
 | 
			
		||||
    depends_on("bzip2")
 | 
			
		||||
@@ -147,6 +149,8 @@ def configure_args(self):
 | 
			
		||||
 | 
			
		||||
        if '+shared' in spec:
 | 
			
		||||
            config_args.append('--enable-shared')
 | 
			
		||||
        else:
 | 
			
		||||
            config_args.append('--disable-shared')
 | 
			
		||||
 | 
			
		||||
        if '+ucs4' in spec:
 | 
			
		||||
            if spec.satisfies('@:2.7'):
 | 
			
		||||
@@ -161,6 +165,9 @@ def configure_args(self):
 | 
			
		||||
        if spec.satisfies('@3:'):
 | 
			
		||||
            config_args.append('--without-ensurepip')
 | 
			
		||||
 | 
			
		||||
        if '+pic' in spec:
 | 
			
		||||
            config_args.append('CFLAGS={0}'.format(self.compiler.pic_flag))
 | 
			
		||||
 | 
			
		||||
        return config_args
 | 
			
		||||
 | 
			
		||||
    @run_after('install')
 | 
			
		||||
 
 | 
			
		||||
@@ -40,6 +40,8 @@ class Silo(Package):
 | 
			
		||||
    variant('shared', default=True, description='Build shared libraries')
 | 
			
		||||
    variant('silex', default=False,
 | 
			
		||||
            description='Builds Silex, a GUI for viewing Silo files')
 | 
			
		||||
    variant('pic', default=True,
 | 
			
		||||
            description='Produce position-independent code (for shared libs)')
 | 
			
		||||
 | 
			
		||||
    depends_on('hdf5')
 | 
			
		||||
    depends_on('qt', when='+silex')
 | 
			
		||||
@@ -56,6 +58,12 @@ def install(self, spec, prefix):
 | 
			
		||||
        if '+silex' in spec:
 | 
			
		||||
            config_args.append('--with-Qt-dir=%s' % spec['qt'].prefix)
 | 
			
		||||
 | 
			
		||||
        if '+pic' in spec:
 | 
			
		||||
            config_args += [
 | 
			
		||||
                'CFLAGS={0}'.format(self.compiler.pic_flag),
 | 
			
		||||
                'CXXFLAGS={0}'.format(self.compiler.pic_flag),
 | 
			
		||||
                'FCFLAGS={0}'.format(self.compiler.pic_flag)]
 | 
			
		||||
 | 
			
		||||
        configure(
 | 
			
		||||
            '--prefix=%s' % prefix,
 | 
			
		||||
            '--with-hdf5=%s,%s' % (spec['hdf5'].prefix.include,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user