Merge default with raptor 2.13.0 stable
authorraptorbot
Fri, 16 Apr 2010 19:32:39 +0100
changeset 434 c3bf95590c94
parent 433 5698eefedfc8 (current diff)
parent 315 6325833fc679 (diff)
child 435 7bfa3e482854
Merge default with raptor 2.13.0 stable
--- a/bintools/elftools/group/elftran.mmp	Wed Apr 14 14:26:41 2010 +0100
+++ b/bintools/elftools/group/elftran.mmp	Fri Apr 16 19:32:39 2010 +0100
@@ -45,5 +45,5 @@
 source          byte_pair.cpp pagedCompress.cpp
 
 systeminclude   ../inc /epoc32/include ../../../imgtools/imglib/compress /epoc32/include/tools/
-
+OS_LAYER_SYSTEMINCLUDE
 VENDORID        0x70000001
--- a/bintools/evalid/EvalidCompare.pm	Wed Apr 14 14:26:41 2010 +0100
+++ b/bintools/evalid/EvalidCompare.pm	Fri Apr 16 19:32:39 2010 +0100
@@ -27,6 +27,29 @@
 use File::Path;
 use File::Basename;
 use File::Copy;
+use Config;
+
+# Search for tools with Raptor...
+sub FindTool($)
+{
+  my $tool = shift;
+  my $location = $tool;
+  if ($Config{osname} =~ m/MSWin32/i && $ENV{SBS_HOME} && -e $ENV{SBS_HOME}."/win32/mingw/bin/".$tool.".exe")
+  {
+    $location = $ENV{SBS_HOME}."/win32/mingw/bin/".$tool.".exe"; 
+  }
+  elsif(-e $ENV{EPOCROOT}."epoc32/gcc_mingw/bin/".$tool.".exe")
+  {
+    $location = $ENV{EPOCROOT}."epoc32/gcc_mingw/bin/".$tool.".exe";
+  }
+  elsif(-e $FindBin::Bin."/".$tool.".exe")
+  {
+    $location = $FindBin::Bin."/".$tool.".exe"; 
+  }
+  return $location;
+}
+
+
 
 #
 # Constants.
@@ -71,11 +94,11 @@
 # they also enabled an order of expandor arguments where the filename is not last
 my %typeHandler = (
       e32 => {reader => 'elf2e32 --dump --e32input=', filter => \&Elf2E32Filter},
-      arm => {reader => 'nm --no-sort', filter => \&NmFilter, retry => 1, relative_paths => 1},
+      arm => {reader => FindTool("nm").' --no-sort', filter => \&NmFilter, retry => 1, relative_paths => 1},
       elf => {reader => 'elfdump -i', filter => \&ElfDumpFilter, rawretry => 1},
-      intel => {reader => '%EPOCROOT%epoc32\gcc_mingw\bin\nm --no-sort', filter => \&NmFilter, rawretry => 1, relative_paths => 1, skipstderr => 1},
+      intel => {reader => FindTool("nm").' --no-sort', filter => \&NmFilter, rawretry => 1, relative_paths => 1, skipstderr => 1},
       intel_pe => {reader => 'pe_dump', filter => \&FilterNone, rawretry => 1},
-	  zip => {reader => '"'.$FindBin::Bin.'/unzip" -l -v', filter => \&UnzipFilter, rawretry => 1},
+	  zip => {reader => FindTool("unzip").' -l -v', filter => \&UnzipFilter, rawretry => 1},
       map => {filter => \&MapFilter, skipblanks => 1},
       sgml => {filter => \&SgmlFilter},
       preprocessed_text => {filter => \&PreprocessedTextFilter},
@@ -231,7 +254,7 @@
     }
   }
 
-  if ($typeBuf =~ /^!<arch>\x0A(.{48}([0-9 ]{10})\x60\x0A(......))/s) {
+  if ($typeBuf =~ /^!<arch>\x0A(.{48}([0-9 ]{9}).\x60\x0A(......))/s) {
     # library - could be MARM or WINS
 
     $typeBuf = $1;
@@ -240,7 +263,7 @@
     open (FILE, $file) or die "Error: Couldn't open \"$file\" for reading: $!\n";
     binmode (FILE);
     
-    while ($typeBuf =~ /^.{48}([0-9 ]{10})\x60\x0A(......)/s) {
+    while ($typeBuf =~ /^.{48}([0-9 ]{9}).\x60\x0A(......)/s) {
       # $1 is the size of the archive member, $2 is first 6 bytes of the file
       # There may be several different sorts of file in the archive, and we
       # need to scan through until we find a type we recognize:
--- a/e32tools/e32lib/group/seclib.mmp	Wed Apr 14 14:26:41 2010 +0100
+++ b/e32tools/e32lib/group/seclib.mmp	Fri Apr 16 19:32:39 2010 +0100
@@ -45,7 +45,7 @@
 userinclude     ../setcap 
 userinclude     ../../e32lib/e32image/inc
 systeminclude   /epoc32/include
-
+OS_LAYER_SYSTEMINCLUDE
 OPTION          GCC -w
 
 //macro __PLACEMENT_NEW_INLINE
--- a/e32tools/elf2e32/group/elf2e32.mmp	Wed Apr 14 14:26:41 2010 +0100
+++ b/e32tools/elf2e32/group/elf2e32.mmp	Fri Apr 16 19:32:39 2010 +0100
@@ -27,6 +27,7 @@
 source	 	pl_elfrelocation.cpp  pl_elfrelocations.cpp  pl_symbol.cpp  polydll_fb_target.cpp  polydll_rebuild_target.cpp  usecasebase.cpp 
 source	 	byte_pair.cpp  pagedcompress.cpp checksum.cpp stdexe_target.cpp
 
+OS_LAYER_SYSTEMINCLUDE
 systeminclude    /epoc32/include  /epoc32/include/tools  
 userinclude		../source ../include
 
--- a/imgtools/imaker/src/imaker.pm	Wed Apr 14 14:26:41 2010 +0100
+++ b/imgtools/imaker/src/imaker.pm	Fri Apr 16 19:32:39 2010 +0100
@@ -351,7 +351,7 @@
 {
     (my $dir = shift()) =~ s/^>>?(?!>)//;
     my $absdir = "";
-    eval { local $SIG{__DIE__}; $absdir = Cwd::abs_path($dir) };
+    if (-e $dir) {$absdir = Cwd::abs_path($dir) };
     return(PathConv($absdir || File::Spec->rel2abs($dir,
         $dir !~ /^$gWorkdrive/i && $dir =~ /^([a-z]:)/i ? "$1/" : ""), shift(), shift()));
 }