gnu: vlc: Fix build.
[jackhill/guix/guix.git] / gnu / packages / patches / metabat-fix-compilation.patch
1 This patch changes metabat so that (1) it is not build statically, (2) it uses
2 shared libraries rather than static libraries where possible.
3
4 diff --git a/SConstruct b/SConstruct
5 index 69cdc0a..ac99bcb 100644
6 --- a/SConstruct
7 +++ b/SConstruct
8 @@ -26,8 +26,6 @@ debug = ARGUMENTS.get('DEBUG', None)
9 build_flags = ['-Wall', '-g', '-std=c++11', '-fopenmp']
10 link_flags = ['-lstdc++', '-lm', '-fopenmp']
11
12 -if platform.platform(True, True).find('Darwin') == -1:
13 - link_flags.extend(['-static', '-static-libgcc', '-static-libstdc++'])
14
15 if debug is None:
16 build_flags.extend(['-O3', '-DNDEBUG', '-Wno-unknown-pragmas', '-Wno-deprecated-declarations', '-Wno-overflow', '-Wno-unused-variable'])
17 @@ -110,17 +108,17 @@ def findStaticOrShared( lib, testPaths, static_source_list, link_flag_list, stat
18 for path in testPaths:
19 if not os.path.isdir(path):
20 continue
21 + for testfile in ('%s/lib%s.so' % (path, lib), '%s/lib%s.dylib' % (path, lib)):
22 + if os.path.isfile(testfile):
23 + print "Found shared library %s as %s" % (lib, testfile)
24 + link_flag_list.extend( ["-L%s" % (path), "-l%s" % (lib) ] )
25 + return
26 for suffix in staticSuffixes:
27 testfile = '%s/lib%s%s' % (path, lib, suffix)
28 if os.path.isfile(testfile):
29 static_source_list.append(testfile)
30 print "Found static library %s as %s" % (lib, testfile)
31 return
32 - for testfile in ('%s/lib%s.so' % (path, lib), '%s/lib%s.dylib' % (path, lib)):
33 - if os.path.isfile(testfile):
34 - print "Found shared library %s as %s" % (lib, testfile)
35 - link_flag_list.extend( ["-L%s" % (path), "-l%s" % (lib) ] )
36 - return
37 print "Could not find library for %s!!! Looked in %s" % (lib, testPaths)
38 return
39