Sophie

Sophie

distrib > Mandriva > 2007.0 > x86_64 > by-pkgid > 451e099f9d4ac7f1f3328fa707d36e1d > files > 3

java-1.4.2-gcj-compat-1.4.2.0-40.103.1mdv2007.0.src.rpm

--- java-gcj-compat-1.0.62/aot-compile-rpm.aot-compile-rpm	2006-08-23 08:04:04.000000000 -0400
+++ java-gcj-compat-1.0.62/aot-compile-rpm	2006-08-25 20:10:49.000000000 -0400
@@ -15,6 +15,7 @@
 
 import aotcompile
 import os
+import re
 import sys
 
 def libdir():
@@ -41,7 +42,8 @@
     dstdir = os.path.join(srcdir, libdir().strip(os.sep), name)
 
     compiler = aotcompile.Compiler(srcdir, dstdir)
-    compiler.gcjflags[0:0] = os.environ.get("RPM_OPT_FLAGS", "").split() 
+    p = re.compile('-O[2-9]+');
+    compiler.gcjflags[0:0] = p.sub('-O', os.environ.get("RPM_OPT_FLAGS", "")).split()
 
     # XXX: This script should not accept options, because having
     # them it cannot be integrated into rpm.  But, gcj cannot