This patch changes metabat so that (1) it is not build statically, (2) it uses
shared libraries rather than static libraries where possible.
diff --git a/SConstruct b/SConstruct
index 69cdc0a..ac99bcb 100644
--- a/SConstruct
+++ b/SConstruct
@@ -26,8 +26,6 @@ debug = ARGUMENTS.get('DEBUG', None)
build_flags = ['-Wall', '-g', '-std=c++11', '-fopenmp']
link_flags = ['-lstdc++', '-lm', '-fopenmp']
-if platform.platform(True, True).find('Darwin') == -1:
- link_flags.extend(['-static', '-static-libgcc', '-static-libstdc++'])
if debug is None:
build_flags.extend(['-O3', '-DNDEBUG', '-Wno-unknown-pragmas', '-Wno-deprecated-declarations', '-Wno-overflow', '-Wno-unused-variable'])
@@ -110,17 +108,17 @@ def findStaticOrShared( lib, testPaths, static_source_list, link_flag_list, stat
for path in testPaths:
if not os.path.isdir(path):
continue
+ for testfile in ('%s/lib%s.so' % (path, lib), '%s/lib%s.dylib' % (path, lib)):
+
Copied from Debian.
From: Jérémy Bobbio <lunar@debian.org>
Subject: Remove build date
Bug-Debian: http://bugs.debian.org/782851
In order to make unzip build reproducibly, we remove the
(already optional) build date from the binary.
--- a/unix/unix.c
+++ b/unix/unix.c
@@ -1705,7 +1705,7 @@
#endif /* Sun */
#endif /* SGI */
-#ifdef __DATE__
+#if 0
" on ", __DATE__
#else
"", ""