diff -Naur gnupoc-package-1.13.orig/sdks/gnupoc-s60_50_rvct-patch gnupoc-package-1.13/sdks/gnupoc-s60_50_rvct-patch --- gnupoc-package-1.13.orig/sdks/gnupoc-s60_50_rvct-patch 1969-12-31 19:00:00.000000000 -0500 +++ gnupoc-package-1.13/sdks/gnupoc-s60_50_rvct-patch 2009-11-17 12:38:44.000000000 -0500 @@ -0,0 +1,762 @@ +diff -Naur cl_arm.pm cl_arm.pm +--- cl_arm.pm 2009-09-04 13:39:17.000000000 -0400 ++++ cl_arm.pm 2009-09-04 14:05:54.000000000 -0400 +@@ -4,7 +4,7 @@ + # + + +-package Cl_arm; ++package cl_arm; + + my $ToolPrefix=''; + my %PlatOpt=( +@@ -60,10 +60,10 @@ + ); + + use Cwd; +-use Armutl; ++use armutl; + use cl_generic; +-use E32env; +-use Genutl; ++use e32env; ++use genutl; + + use constant NOCOMPRESSIONMETHOD => 0; + use constant INFLATECOMPRESSIONMETHOD => 1; +@@ -365,7 +365,7 @@ + my $DefFile=&main::DefFile; + my $EPOCPath=&main::EPOCPath; + my $LinkAs=&main::LinkAs; +- my $LibPath=&main::LibPath.'LIB\\'; ++ my $LibPath=&main::LibPath.'lib/'; + my @MacroList=&main::MacroList(); + push @MacroList, "__SUPPORT_CPP_EXCEPTIONS__"; + +@@ -471,8 +471,7 @@ + &main::Output( + "\n", + "# must set both PATH and Path to make it work correctly\n", +- "Path:=",&main::Path_Drive,$EPOCPath,"gcc\\bin;\$(Path)\n", +- "PATH:=\$(Path)\n", ++ "PATH:=",&main::Path_Drive,$EPOCPath,"gcc/bin:\$(PATH)\n", + "\n" + ); + } +@@ -629,7 +628,7 @@ + if ($BasicTrgType !~ /IMPLIB/io) { + &main::Output ( + " \\\n\t", +- &Generic_Quote("\$(EPOCTRG$_)\\".&main::Trg($_)) ++ &Generic_Quote("\$(EPOCTRG$_)/".&main::Trg($_)) + ); + } + +@@ -664,12 +663,12 @@ + unless (&main::ExportUnfrozen) { + if (-e $DefFile) { # effectively "if project frozen ..." + &main::Output( +- " ", &Generic_Quote("\$(EPOCLIB)\\LIB\\$PrimaryExportLibrary.lib"), ++ " ", &Generic_Quote("\$(EPOCLIB)/lib/$PrimaryExportLibrary.lib"), + ); + # if elf2e32.exe(postlinker) exists, then generate .dso along with .lib + if ($IsExistELF2E32EXE) { + &main::Output( +- " ", &Generic_Quote("\$(EPOCLIB)\\LIB\\$PrimaryExportLibrary.dso"), "\n" ++ " ", &Generic_Quote("\$(EPOCLIB)/lib/$PrimaryExportLibrary.dso"), "\n" + ); + } + else { +@@ -686,7 +685,7 @@ + } else { + &main::Output( + "\n", +- "\t\@echo Not attempting to create \"\$(EPOCLIB)\\LIB\\$PrimaryExportLibrary.lib\"\n", ++ "\t\@echo Not attempting to create \"\$(EPOCLIB)/lib/$PrimaryExportLibrary.lib\"\n", + "\t\@echo from frozen .DEF file, since EXPORTUNFROZEN specified.\n" + ); + } +@@ -698,18 +697,18 @@ + "\n", + "# REAL TARGET - LIBRARY\n", + "\n", +- &Generic_Quote("\$(EPOCLIB)\\LIB\\$ExportLibrary.lib"), " : ", ++ &Generic_Quote("\$(EPOCLIB)/lib/$ExportLibrary.lib"), " : ", + &Generic_Quote($DefFile), "\n", +- "\tperl -S prepdef.pl ", &Generic_Quote($DefFile), " \"\$(EPOCBLD)\\$ExportLibrary.prep.def\"\n", +- "\tdef2dll.bat --path=\$(EPOCLIB)\\LIB \\\n\t\t--bldpath=\$(EPOCBLD) \\\n\t\t--import=$ExportLibrary \\\n", +- "\t\t--deffile=\"\$(EPOCBLD)\\$ExportLibrary.prep.def\" \\\n\t\t--linkAs=$LinkAs \\\n\t\t$InterWorking\n", ++ "\tperl -S prepdef.pl ", &Generic_Quote($DefFile), " \"\$(EPOCBLD)/$ExportLibrary.prep.def\"\n", ++ "\tdef2dll --path=\$(EPOCLIB)/lib \\\n\t\t--bldpath=\$(EPOCBLD) \\\n\t\t--import=$ExportLibrary \\\n", ++ "\t\t--deffile=\"\$(EPOCBLD)/$ExportLibrary.prep.def\" \\\n\t\t--linkAs=$LinkAs \\\n\t\t$InterWorking\n", + "\n", + ); + if ($ExtraExportLibrary) { + &main::Output( + "\n", +- &Generic_Quote("\$(EPOCLIB)\\LIB\\$ExtraExportLibrary.lib"), " : ", +- &Generic_Quote("\$(EPOCLIB)\\LIB\\$ExportLibrary.lib"), "\n", ++ &Generic_Quote("\$(EPOCLIB)/lib/$ExtraExportLibrary.lib"), " : ", ++ &Generic_Quote("\$(EPOCLIB)/lib/$ExportLibrary.lib"), "\n", + "\tcopy \"\$<\" \"\$@\"\n" + ); + } +@@ -717,17 +716,17 @@ + if ($IsExistELF2E32EXE) { + &main::Output( + "\n", +- &Generic_Quote("\$(EPOCLIB)\\LIB\\$ExportLibrary.dso"), " : ", ++ &Generic_Quote("\$(EPOCLIB)/lib/$ExportLibrary.dso"), " : ", + &Generic_Quote($DefFile), "\n", +- "\telf2e32 --definput=\"\$(EPOCBLD)\\$ExportLibrary.prep.def\" --dso=", ++ "\telf2e32 --definput=\"\$(EPOCBLD)/$ExportLibrary.prep.def\" --dso=", +- &Generic_Quote("\$(EPOCLIB)\\LIB\\$ExportLibrary.dso"), ++ &Generic_Quote("\$(EPOCLIB)/lib/$ExportLibrary.dso"), + " --linkas=$LinkAs\n" + ); + if ($ExtraExportLibrary) { + &main::Output( + "\n", +- &Generic_Quote("\$(EPOCLIB)\\LIB\\$ExtraExportLibrary.dso"), " : ", +- &Generic_Quote("\$(EPOCLIB)\\LIB\\$ExportLibrary.dso"), "\n", ++ &Generic_Quote("\$(EPOCLIB)/lib/$ExtraExportLibrary.dso"), " : ", ++ &Generic_Quote("\$(EPOCLIB)/lib/$ExportLibrary.dso"), "\n", + "\tcopy \"\$<\" \"\$@\"\n" + ); + } +@@ -765,7 +764,7 @@ + if ($DefFile and $BasicTrgType!~/^IMPLIB$/io) { + # call perl on the script here so make will die if there are errors + # - this doesn't happen if calling perl in a batch file +- &main::Output( "\tperl -S efreeze.pl \$(EFREEZE_ALLOW_REMOVE) \"$DefFile\" \"\$(EPOCBLD)\\$ExportLibrary.def\" \n" ); ++ &main::Output( "\tperl -S efreeze.pl \$(EFREEZE_ALLOW_REMOVE) \"$DefFile\" \"\$(EPOCBLD)/$ExportLibrary.def\" \n" ); + } + &main::Output( + "\n", +@@ -773,11 +772,11 @@ + ); + if ($DefFile and !$NoExportLibrary) { + &main::Output( +- "\t-\$(ERASE) \"\$(EPOCLIB)\\LIB\\$ExportLibrary.lib\"\n" ++ "\t-\$(ERASE) \"\$(EPOCLIB)/lib/$ExportLibrary.lib\"\n" + ); + if ($ExtraExportLibrary) { + &main::Output( +- "\t-\$(ERASE) \"\$(EPOCLIB)\\LIB\\$ExtraExportLibrary.lib\"\n" ++ "\t-\$(ERASE) \"\$(EPOCLIB)/lib/$ExtraExportLibrary.lib\"\n" + ); + } + } +@@ -1013,33 +1012,33 @@ + # Temporary Workaround for RVCT2.1 static libs problem with RVCT2.2 builds + &main::Output( + " \\\n\t", +- &Generic_Quote("\$(EPOCSTATLINK$Bld)\\EDLLSTUB$RVCTVersion.lib") ++ &Generic_Quote("\$(EPOCSTATLINK$Bld)/edllstub$RVCTVersion.lib") + ); + } + else { + &main::Output( + " \\\n\t", +- &Generic_Quote("\$(EPOCSTATLINK$Bld)\\EDLLSTUB.lib") ++ &Generic_Quote("\$(EPOCSTATLINK$Bld)/edllstub.lib") + ); + } + } + +- PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCSTATLINK$Bld\)\\\\\$_\"\)", @StatLibList); +- PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCLIB\)\\\\LIB\\\\\$_\"\)", @LibList); ++ PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCSTATLINK$Bld\)/\$_\"\)", @StatLibList); ++ PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCLIB\)/lib/\$_\"\)", @LibList); + + #OE Import Libraries + if ( $TrgType=~/^STDEXE$/o || $TrgType=~/^STDDLL$/o ) + { +- PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCLIB\)\\\\LIB\\\\\$_\"\)", @oe_import_library_list); ++ PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCLIB\)/lib/\$_\"\)", @oe_import_library_list); + } + + #OE Glue Code + if ($TrgType=~/^STDEXE$/o) { + if (&main::IsWideCharMain()) { +- PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCLIB\)\\\\$Bld\\\\\$_\"\)", @oe_exe_libs_wchar); ++ PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCLIB\)/$Bld/\$_\"\)", @oe_exe_libs_wchar); + } + else { +- PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCLIB\)\\\\$Bld\\\\\$_\"\)", @oe_exe_libs); ++ PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCLIB\)/$Bld/\$_\"\)", @oe_exe_libs); + } + } + +@@ -1048,7 +1047,7 @@ + $StaticRTLib = "ksrt${RVCTVersion}" if ($SystemTrg); + &main::Output( + " \\\n\t", +- &Generic_Quote("\$(EPOCSTATLINK$Bld)\\$StaticRTLib\.lib") ++ &Generic_Quote("\$(EPOCSTATLINK$Bld)/$StaticRTLib\.lib") + ) unless ($Trg =~ /(U|K)SRT/i || ($BasicTrgType=~/^LIB$/o)); + + unless ($ArmRT || ($BasicTrgType=~/^LIB$/o)) { +@@ -1058,7 +1057,7 @@ + foreach (@RTLibList) { + &main::Output( + " \\\n\t", +- &Generic_Quote("\$(EPOCLIB)\\LIB\\$_") ++ &Generic_Quote("\$(EPOCLIB)/lib/$_") + ) unless ($_ =~ /$TargLib/i); + } + } +@@ -1079,8 +1078,7 @@ + &main::Output( + "VTBLEXPORTS$Bld=" + ); +- my $vtobj = quotemeta("(VtblExports.o)"); +- PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCLIB\)\\\\LIB\\\\\$_$vtobj\"\)", @LibList); ++ PrintList("\' \\\n\t\'\.\&Generic_Quote\(\"\\\$\(EPOCLIB\)/lib/\$_\\\\(VtblExports.o\\\\)\"\)", @LibList); + &main::Output( + "\n", + "\n" +@@ -1114,7 +1112,7 @@ + + &main::Output( + " \\\n\t", +- &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.o") ++ &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.o") + ); + + # Only add if not already added from @StringTables +@@ -1140,13 +1138,13 @@ + + if ($BasicTrgType=~/^LIB$/o) { + &main::Output( +- &Generic_Quote("\$(EPOCTRG$Bld)\\$Trg"), ++ &Generic_Quote("\$(EPOCTRG$Bld)/$Trg"), + " : \$(OBJECTS$Bld)" + ); + } else { + &main::Output( +- &Generic_Quote("\$(EPOCTRG$Bld)\\$Trg"), " : ", +- &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseTrg.in") ++ &Generic_Quote("\$(EPOCTRG$Bld)/$Trg"), " : ", ++ &Generic_Quote("\$(EPOCBLD$Bld)/$BaseTrg.in") + ); + } + +@@ -1157,7 +1155,7 @@ + } + if ($BasicTrgType=~/^(EXE|DLL)$/o) { + &main::Output( +- " ", &Generic_Quote("\$(EPOCSTATLINK$Bld)\\$FirstLib") ++ " ", &Generic_Quote("\$(EPOCSTATLINK$Bld)/$FirstLib") + ); + } + &main::Output( +@@ -1167,23 +1165,23 @@ + # generate an export object from the ordered .DEF file + if ($BasicTrgType=~/^DLL$/o || $TrgType=~/^EXEXP$/o || $TrgType=~/^EXEDLL$/o) { + # make the .exp file a dependency for targets that have exports +- &main::Output(" ", &Generic_Quote("\$(EPOCBLD$Bld)\\$ExportLibrary.exp"), "\n"); ++ &main::Output(" ", &Generic_Quote("\$(EPOCBLD$Bld)/$ExportLibrary.exp"), "\n"); + if (&main::ExportUnfrozen) { + &main::Output( +- "\tdef2dll.bat --path=\$(EPOCBLD$Bld) \\\n\t\t--bldpath=\$(EPOCBLD) \\\n\t\t--export=$ExportLibrary \\\n\t\t--import=$ExportLibrary\\\n", +- "\t\t--deffile=\$(EPOCBLD$Bld)\\$ExportLibrary.def \\\n\t\t--linkAs=$LinkAs \\\n\t\t$InterWorking $symNameLkupOpt\n", ++ "\tdef2dll --path=\$(EPOCBLD$Bld) \\\n\t\t--bldpath=\$(EPOCBLD) \\\n\t\t--export=$ExportLibrary \\\n\t\t--import=$ExportLibrary\\\n", ++ "\t\t--deffile=\$(EPOCBLD$Bld)/$ExportLibrary.def \\\n\t\t--linkAs=$LinkAs \\\n\t\t$InterWorking $symNameLkupOpt\n", + ); + &main::Output( + "\n", +- "\tcopy ", " \"\$(EPOCBLD$Bld)\\$ExportLibrary.lib\" ", +- "\"\$(EPOCLIB)\\LIB\\$ExportLibrary.lib\"", ++ "\tcopy ", " \"\$(EPOCBLD$Bld)/$ExportLibrary.lib\" ", ++ "\"\$(EPOCLIB)/lib/$ExportLibrary.lib\"", + "\n" + ); + if ($ExtraExportLibrary) { + &main::Output( + "\n", +- "\tcopy \"\$(EPOCLIB)\\LIB\\$ExportLibrary.lib\" ", +- "\"\$(EPOCLIB)\\LIB\\$ExtraExportLibrary.lib\"", ++ "\tcopy \"\$(EPOCLIB)/lib/$ExportLibrary.lib\" ", ++ "\"\$(EPOCLIB)/lib/$ExtraExportLibrary.lib\"", + "\n" + ); + } +@@ -1191,14 +1189,14 @@ + if ($IsExistELF2E32EXE) { + &main::Output( + "\n", +- "\telf2e32 --definput=\"\$(EPOCBLD$Bld)\\$ExportLibrary.def\" --dso=", +- "\$(EPOCLIB)\\LIB\\$ExportLibrary.dso --linkas=$LinkAs\n" ++ "\telf2e32 --definput=\"\$(EPOCBLD$Bld)/$ExportLibrary.def\" --dso=", ++ "\$(EPOCLIB)/lib/$ExportLibrary.dso --linkas=$LinkAs\n" + ); + if ($ExtraExportLibrary) { + &main::Output( + "\n", +- "\tcopy \"\$(EPOCLIB)\\LIB\\$ExportLibrary.dso\" ", +- "\"\$(EPOCLIB)\\LIB\\$ExtraExportLibrary.dso\"", ++ "\tcopy \"\$(EPOCLIB)/lib/$ExportLibrary.dso\" ", ++ "\"\$(EPOCLIB)/lib/$ExtraExportLibrary.dso\"", + "\n" + ); + } +@@ -1206,7 +1204,7 @@ + } + } elsif($NamedSymLkup){ + # For an EXE, generate the .exp to accomodate 0th ordinal +- &main::Output(" ", &Generic_Quote("\$(EPOCBLD$Bld)\\$ExportLibrary.exp"), "\n"); ++ &main::Output(" ", &Generic_Quote("\$(EPOCBLD$Bld)/$ExportLibrary.exp"), "\n"); + } + else { + &main::Output("\n"); +@@ -1215,7 +1213,7 @@ + # get rid of any -symbols produced .map file + if ($BasicTrgType=~/^(DLL|EXE)/o) { + &main::Output( +- "\t-\$(ERASE) \"\$(EPOCTRG$Bld)\\$Trg.map\" \n" ++ "\t-\$(ERASE) \"\$(EPOCTRG$Bld)/$Trg.map\" \n" + ); + } + # Generate the dependency info - This is required to put the libraries in the same order +@@ -1224,7 +1222,7 @@ + &main::Output( + "\tperl -S deputil.pl $InterWorking --path=\$(EPOCBLD$Bld) \\\n", + "\t\t--out=$ExportLibrary \\\n", +- "\t\t--libpath=\$(EPOCLIB)\\LIB \\\n", ++ "\t\t--libpath=\$(EPOCLIB)/lib \\\n", + "\t\t\$(LIBS$Bld)\n", + ); + } +@@ -1270,8 +1268,8 @@ + $ObjFile = "V_ENTRY_.o"; + } + &main::Output( +- "\t\t${oP}entry _E32Dll \$(EPOCSTATLINK$Bld)\\$FirstLib($ObjFile) \\\n", +- "\t\t\$(EPOCBLD$Bld)\\$ExportLibrary.exp \\\n" ++ "\t\t${oP}entry _E32Dll \$(EPOCSTATLINK$Bld)/$FirstLib\\($ObjFile\\) \\\n", ++ "\t\t\$(EPOCBLD$Bld)/$ExportLibrary.exp \\\n" + ); + } elsif ($BasicTrgType=~/^EXE$/o || $TrgType=~/^EXEXP$/o) { + # get the right object file for the entry point +@@ -1286,36 +1284,36 @@ + } + } + +- &main::Output( "\t\t${oP}entry _E32Startup \$(EPOCSTATLINK$Bld)\\$FirstLib($ObjFile) \\\n" ); ++ &main::Output( "\t\t${oP}entry _E32Startup \$(EPOCSTATLINK$Bld)/$FirstLib\\($ObjFile\\) \\\n" ); + if ($TrgType=~/^EXEXP$/o || $TrgType=~/^EXEDLL$/o || $NamedSymLkup) { +- &main::Output( "\t\t\$(EPOCBLD$Bld)\\$ExportLibrary.exp \\\n" ); ++ &main::Output( "\t\t\$(EPOCBLD$Bld)/$ExportLibrary.exp \\\n" ); + } + } + if($NamedSymLkup) { + &main::Output( +- "\t\t--edit \"\$(EPOCBLD$Bld)\\$ExportLibrary.dep\" \\\n" ++ "\t\t--edit \"\$(EPOCBLD$Bld)/$ExportLibrary.dep\" \\\n" + ); + } + &main::Output( +- "\t\t-o \"\$(EPOCBLD$Bld)\\$Trg\" \\\n", +- "\t\t${oP}symbols ${oP}list \"\$(EPOCTRG$Bld)\\$Trg.map\" \\\n", +- "\t\t\$(EPOCBLD$Bld)\\$BaseTrg.in \\\n" ++ "\t\t-o \"\$(EPOCBLD$Bld)/$Trg\" \\\n", ++ "\t\t${oP}symbols ${oP}list \"\$(EPOCTRG$Bld)/$Trg.map\" \\\n", ++ "\t\t\$(EPOCBLD$Bld)/$BaseTrg.in \\\n" + ); + &main::Output( +- "\t\t\$(LIBS$Bld) \\\n", ++ "\t\t\$(addsuffix ',\$(addprefix ',\$(LIBS$Bld))) \\\n", + "\t\t\$(VTBLEXPORTS$Bld) \$(USERLDFLAGS) \n" + ); + + if(&main::DebugSwitchUsed() ){ + if(&main::SymbolicDebugEnabled() ) { + &main::Output( +- "\tcopy \"\$(EPOCBLD$Bld)\\$Trg\" \"\$(EPOCTRG$Bld)\\$FeatureVariantBaseTrg.sym\"\n" ++ "\tcopy \"\$(EPOCBLD$Bld)/$Trg\" \"\$(EPOCTRG$Bld)/$FeatureVariantBaseTrg.sym\"\n" + ); + } + } + elsif ($Bld=~/^UDEB$/o) { + &main::Output( +- "\tcopy \"\$(EPOCBLD$Bld)\\$Trg\" \"\$(EPOCTRG$Bld)\\$FeatureVariantBaseTrg.sym\"\n" ++ "\tcopy \"\$(EPOCBLD$Bld)/$Trg\" \"\$(EPOCTRG$Bld)/$FeatureVariantBaseTrg.sym\"\n" + ); + } + +@@ -1440,7 +1438,7 @@ + "\\\n\t\t" + ); + &main::Output( +- " \"\$(EPOCBLD$Bld)\\$Trg\"" ++ " \"\$(EPOCBLD$Bld)/$Trg\"" + ); + &main::Output( + "\\\n\t\t" +@@ -1455,7 +1453,7 @@ + } + elsif ($BasicTrgType=~/^LIB$/o) { + &main::Output( +- "\tarmar ${oP}create \$(EPOCSTATLINK$Bld)\\$Trg ${oP}via $objectsViaFile\n" ++ "\tarmar ${oP}create \$(EPOCSTATLINK$Bld)/$Trg ${oP}via $objectsViaFile\n" + ); + } + +@@ -1467,7 +1465,7 @@ + #------------ + + &main::Output( +- &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseTrg.in"), ": \$(OBJECTS$Bld)\n", ++ &Generic_Quote("\$(EPOCBLD$Bld)/$BaseTrg.in"), ": \$(OBJECTS$Bld)\n", + "\t$Link $linkerDebugOpt ${oP}partial \\\n", + "\t\t-o \$\@ \\\n", + "\t\t${oP}via $objectsViaFile\n\n", +@@ -1480,7 +1478,7 @@ + # TARGET *.EXP + #------------ + &main::Output( +- &Generic_Quote("\$(EPOCBLD$Bld)\\$ExportLibrary.exp"), ": \$(EPOCBLD$Bld)\\$BaseTrg.in" ++ &Generic_Quote("\$(EPOCBLD$Bld)/$ExportLibrary.exp"), ": \$(EPOCBLD$Bld)/$BaseTrg.in" + ); + + # if project is frozen, makedef (and hence the .exp file) are dependent upon it +@@ -1491,9 +1489,9 @@ + } + + &main::Output( +- "\n\tperl -S elf2inf.pl -o \$(EPOCBLD$Bld)\\$ExportLibrary.inf \\\n", ++ "\n\tperl -S elf2inf.pl -o \$(EPOCBLD$Bld)/$ExportLibrary.inf \\\n", + "\t\t\$\<", +- "\n\tperl -S makedef.pl $AbsentSubst -Inf \$(EPOCBLD$Bld)\\$ExportLibrary.inf \\\n" ++ "\n\tperl -S makedef.pl $AbsentSubst -Inf \$(EPOCBLD$Bld)/$ExportLibrary.inf \\\n" + ); + if (!$DefFile || $NoExportLibrary) { + &main::Output( "\t\t-ignore_unfrozen_noncallable \\\n" ); +@@ -1523,12 +1521,12 @@ + $Num++; + } + +- my $theDefFile = "\$(EPOCBLD$Bld)\\$ExportLibrary.def"; ++ my $theDefFile = "\$(EPOCBLD$Bld)/$ExportLibrary.def"; + $theDefFile = $DefFile if (-e $DefFile && !&main::ExportUnfrozen); + &main::Output( +- "\t\t\"\$(EPOCBLD$Bld)\\$ExportLibrary.def\"\n", +- "\tcopy \"\$(EPOCBLD$Bld)\\$ExportLibrary.def\" \"\$(EPOCBLD)\\$ExportLibrary.def\"\n", +- "\tdef2dll.bat $AbsentSubst \\\n\t\t--path=\$(EPOCBLD$Bld) \\\n\t\t--bldpath=\$(EPOCBLD) \\\n\t\t--export=$ExportLibrary \\\n", ++ "\t\t\"\$(EPOCBLD$Bld)/$ExportLibrary.def\"\n", ++ "\tcopy \"\$(EPOCBLD$Bld)/$ExportLibrary.def\" \"\$(EPOCBLD)/$ExportLibrary.def\"\n", ++ "\tdef2dll $AbsentSubst \\\n\t\t--path=\$(EPOCBLD$Bld) \\\n\t\t--bldpath=\$(EPOCBLD) \\\n\t\t--export=$ExportLibrary \\\n", + "\t\t--deffile=$theDefFile \\\n\t\t--linkAs=$LinkAs \\\n\t\t$InterWorking $symNameLkupOpt\n" + ); + } +@@ -1657,12 +1655,12 @@ + + foreach (@BldList) { + &main::Output( +- &Generic_Quote("\$(EPOCBLD$_)\\$BaseSrc.pre"), " ", +- &Generic_Quote("\$(EPOCBLD$_)\\$BaseObj.cpp"), " ", ++ &Generic_Quote("\$(EPOCBLD$_)/$BaseSrc.pre"), " ", ++ &Generic_Quote("\$(EPOCBLD$_)/$BaseObj.cpp"), " ", + ) if $cia; + &main::Output( +- &Generic_Quote("\$(EPOCBLD$_)\\$BaseSrc.lis"), " ", +- &Generic_Quote("\$(EPOCBLD$_)\\$BaseObj.o"), " \\\n", ++ &Generic_Quote("\$(EPOCBLD$_)/$BaseSrc.lis"), " ", ++ &Generic_Quote("\$(EPOCBLD$_)/$BaseObj.o"), " \\\n", + ); + } + &main::Output( +@@ -1691,12 +1689,12 @@ + } + + &main::Output( +- &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.pre"), " ", +- &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseObj.cpp"), " ", ++ &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.pre"), " ", ++ &Generic_Quote("\$(EPOCBLD$Bld)/$BaseObj.cpp"), " ", + ) if $cia; + &main::Output( +- &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.lis"), " ", +- &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseObj.o"), " :", ++ &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.lis"), " ", ++ &Generic_Quote("\$(EPOCBLD$Bld)/$BaseObj.o"), " :", + ); + PrintList("\' \\\n\t\'\.\&Generic_Quote\(\$_\)", @DepList); + &main::Output( +@@ -1723,12 +1721,12 @@ + { + my $IncPath = &main::EPOCIncPath; + +- return quoted_path(&Generic_Quote("$IncPath"."RVCT${RVCTVersion}\\RVCT${RVCTVersion}.H")); ++ return quoted_path(&Generic_Quote("$IncPath"."rvct${RVCTVersion}/rvct${RVCTVersion}.h")); + } + + +-my $preinclude = "--preinclude \$(EPOCINC)\\RVCT${RVCTVersion}\\RVCT${RVCTVersion}.h"; +-my $edg_preinclude = "-I \$(EPOCINC)\\RVCT${RVCTVersion} --preinclude edg_rvct${RVCTVersion}.h"; ++my $preinclude = "--preinclude \$(EPOCINC)/rvct${RVCTVersion}/rvct${RVCTVersion}.h"; ++my $edg_preinclude = "-I \$(EPOCINC)/rvct${RVCTVersion} --preinclude edg_rvct${RVCTVersion}.h"; + + sub SelectLangOptions { + my ($Ext) = @_; +@@ -1793,77 +1791,77 @@ + if ($AsmFilep || $Ext =~ /cia/i) { + &main::Output( + # compile the translated, preprocessed source +- &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.o"), " : ", +- &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.cpp"), "\n", ++ &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.o"), " : ", ++ &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.cpp"), "\n", + "\t\@echo $Src\n", +- "\t\$(ARMCC$Bld) $lfboption$LangOptions -J $SrcPath \$(INCDIR) -o \$\@ \$(EPOCBLD$Bld)\\$BaseSrc\_.cpp\n", ++ "\t\$(ARMCC$Bld) $lfboption$LangOptions -J $SrcPath \$(INCDIR) -o \$\@ \$(EPOCBLD$Bld)/$BaseSrc\_.cpp\n", + "\n", + # rule to translate the preprocessed source +- &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.cpp"), " : ", +- &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.pre"), "\n", +- "\ttranasm.bat -n -s -o=\$\@ \$(EPOCBLD$Bld)\\$BaseSrc.pre\n", ++ &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.cpp"), " : ", ++ &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.pre"), "\n", ++ "\ttranasm.bat -n -s -o=\$\@ \$(EPOCBLD$Bld)/$BaseSrc.pre\n", + "\n", + # rule to preprocess the source +- &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.pre"), " : ", +- &Generic_Quote("$SrcPath\\$Src"), "\n", +- "\t\$(ARMCC$Bld) -E $preinclude $LangOptions -J $SrcPath \$(INCDIR) $SrcPath\\$Src -o \$\@ \n", ++ &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.pre"), " : ", ++ &Generic_Quote("$SrcPath/$Src"), "\n", ++ "\t\$(ARMCC$Bld) -E $preinclude $LangOptions -J $SrcPath \$(INCDIR) $SrcPath/$Src -o \$\@ \n", + # generate an assembly listing target too +- "LISTING$Bld$BaseSrc\_ : ", &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.lis"), "\n", +- "\t", &Generic_CopyAction("$SrcPath\\$BaseSrc\_.$ABI.lst"), ++ "LISTING$Bld$BaseSrc\_ : ", &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.lis"), "\n", ++ "\t", &Generic_CopyAction("$SrcPath/$BaseSrc\_.$ABI.lst"), + "\n", +- &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.lis"), " : ", +- &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.cpp"), "\n", +- "\t\$(ARMCC$Bld) $LangOptions -S -J $SrcPath \$(INCDIR) -o \$\@ \$(EPOCBLD$Bld)\\$BaseSrc\_.cpp\n", ++ &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.lis"), " : ", ++ &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.cpp"), "\n", ++ "\t\$(ARMCC$Bld) $LangOptions -S -J $SrcPath \$(INCDIR) -o \$\@ \$(EPOCBLD$Bld)/$BaseSrc\_.cpp\n", + "\n" + ); + } else { + #If Function Call logging is enabled, add call to function call logger + if ($Function_Call_Logger) { + &main::Output( +- &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.o"), ++ &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.o"), + " : ", +- &Generic_Quote("\$(EPOCBLD$Bld)\\$Logger_Output"), ++ &Generic_Quote("\$(EPOCBLD$Bld)/$Logger_Output"), + "\n", + "\t\@echo $Logger_Output\n", +- "\t\$(ARMCC$Bld) $lfboption$LangOptions -J $SrcPath \$(INCDIR) -o \$\@ \$(EPOCBLD$Bld)\\$Logger_Output\n", ++ "\t\$(ARMCC$Bld) $lfboption$LangOptions -J $SrcPath \$(INCDIR) -o \$\@ \$(EPOCBLD$Bld)/$Logger_Output\n", + "\n", + # generate an assembly listing target too +- "LISTING$Bld$BaseSrc : ", &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.lis"), "\n", +- "\t", &Generic_CopyAction("$SrcPath\\$BaseSrc.$ABI.lst"), ++ "LISTING$Bld$BaseSrc : ", &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.lis"), "\n", ++ "\t", &Generic_CopyAction("$SrcPath/$BaseSrc.$ABI.lst"), + "\n", +- &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.lis"), " : ", +- &Generic_Quote("$SrcPath\\$Logger_Output"), "\n", +- "\t\$(ARMCC$Bld) $LangOptions -S -J $SrcPath \$(INCDIR) -o \$\@ \$(EPOCBLD$Bld)\\$Logger_Output \n", ++ &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.lis"), " : ", ++ &Generic_Quote("$SrcPath/$Logger_Output"), "\n", ++ "\t\$(ARMCC$Bld) $LangOptions -S -J $SrcPath \$(INCDIR) -o \$\@ \$(EPOCBLD$Bld)/$Logger_Output \n", + "\n" + ); + + #Call to Function Call Logger + &main::Output( +- &Generic_Quote("\$(EPOCBLD$Bld)\\$Logger_Output"), " : ", +- &Generic_Quote("$SrcPath\\$Src"), ++ &Generic_Quote("\$(EPOCBLD$Bld)/$Logger_Output"), " : ", ++ &Generic_Quote("$SrcPath/$Src"), + "\n", + "\t \@echo $Logger_Output\n", + "\t \$(FCLOGGER$Bld) $lfboption$edg_preinclude \\\n", + "\t -I $SrcPath \\\n", + "\t \$(INCDIR_FCLOGGER) $FC_Logger_Option \\\n", +- "\t --gen_c_file_name \$\@ $SrcPath\\$Src\n", ++ "\t --gen_c_file_name \$\@ $SrcPath/$Src\n", + "\n\n", + ); + } + else { + &main::Output( +- &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.o"), " : ", +- &Generic_Quote("$SrcPath\\$Src"), "\n", ++ &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.o"), " : ", ++ &Generic_Quote("$SrcPath/$Src"), "\n", + "\t\@echo $Src\n", +- "\t\$(ARMCC$Bld) $lfboption$LangOptions -J $SrcPath \$(INCDIR) -o \$\@ $SrcPath\\$Src\n", ++ "\t\$(ARMCC$Bld) $lfboption$LangOptions -J $SrcPath \$(INCDIR) -o \$\@ $SrcPath/$Src\n", + "\n", + # generate an assembly listing target too +- "LISTING$Bld$BaseSrc : ", &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.lis"), "\n", +- "\t", &Generic_CopyAction("$SrcPath\\$BaseSrc.$ABI.lst"), ++ "LISTING$Bld$BaseSrc : ", &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.lis"), "\n", ++ "\t", &Generic_CopyAction("$SrcPath/$BaseSrc.$ABI.lst"), + "\n", +- &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.lis"), " : ", +- &Generic_Quote("$SrcPath\\$Src"), "\n", +- "\t\$(ARMCC$Bld) $LangOptions -S -J $SrcPath \$(INCDIR) -o \$\@ $SrcPath\\$Src \n", ++ &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.lis"), " : ", ++ &Generic_Quote("$SrcPath/$Src"), "\n", ++ "\t\$(ARMCC$Bld) $LangOptions -S -J $SrcPath \$(INCDIR) -o \$\@ $SrcPath/$Src \n", + "\n" + ); + #Compiler wrapper support starts +@@ -1872,9 +1870,9 @@ + my $Platcmpwrap=&main::Plat; + &main::Output( + "COMPWRAP$Bld$BaseSrc : ", +- &Generic_Quote("$SrcPath\\$Src"), "\n", ++ &Generic_Quote("$SrcPath/$Src"), "\n", + "\t\@echo Analysing $Src\n", +- "\t\$(COMPWRAP) \$(ARMCC$Bld) $LangOptions -S -J $SrcPath \$(INCDIR) -o \$\@ $SrcPath\\$Src \n", ++ "\t\$(COMPWRAP) \$(ARMCC$Bld) $LangOptions -S -J $SrcPath \$(INCDIR) -o \$\@ $SrcPath/$Src \n", + "\n" + ); + } +@@ -1907,12 +1905,12 @@ + # compile the translated, preprocessed source + &main::Output( "OBJECTS$MFVarN = "); + foreach my $obj (@{$CompilationGroups{$KeyFile}{Objects}}) { +- &main::Output( &Generic_Quote("\\\n\t\$(EPOCBLD$Bld)\\$obj"), " "); ++ &main::Output( &Generic_Quote("\\\n\t\$(EPOCBLD$Bld)/$obj"), " "); + } + &main::Output( "\n\n"); + &main::Output( "SOURCES$MFVarN = "); + foreach my $src (@{$CompilationGroups{$KeyFile}{Sources}}) { +- &main::Output( &Generic_Quote("\\\n\t\$(EPOCBLD$Bld)\\$src", " ")); ++ &main::Output( &Generic_Quote("\\\n\t\$(EPOCBLD$Bld)/$src", " ")); + } + &main::Output( "\n\n"); + &main::Output( "\$(OBJECTS$MFVarN) : \$(SOURCES$MFVarN) \n"); +@@ -1927,21 +1925,21 @@ + } + &main::Output( + # rule to translate the preprocessed source +- &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.cpp"), " : ", +- &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.pre"), "\n", +- "\ttranasm.bat -n -s -o=\$\@ \$(EPOCBLD$Bld)\\$BaseSrc.pre\n", ++ &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.cpp"), " : ", ++ &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.pre"), "\n", ++ "\ttranasm.bat -n -s -o=\$\@ \$(EPOCBLD$Bld)/$BaseSrc.pre\n", + "\n", + # rule to preprocess the source +- &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.pre"), " : ", +- &Generic_Quote("$SrcPath\\$Src"), "\n", +- "\t\$(ARMCC$Bld) -E $preinclude $LangOptions -J $SrcPath \$(INCDIR) $SrcPath\\$Src -o \$\@ \n", ++ &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.pre"), " : ", ++ &Generic_Quote("$SrcPath/$Src"), "\n", ++ "\t\$(ARMCC$Bld) -E $preinclude $LangOptions -J $SrcPath \$(INCDIR) $SrcPath/$Src -o \$\@ \n", + # generate an assembly listing target too +- "LISTING$Bld$BaseSrc\_ : ", &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.lis"), "\n", +- "\t", &Generic_CopyAction("$SrcPath\\$BaseSrc\_.$ABI.lst"), ++ "LISTING$Bld$BaseSrc\_ : ", &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.lis"), "\n", ++ "\t", &Generic_CopyAction("$SrcPath/$BaseSrc\_.$ABI.lst"), + "\n", +- &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.lis"), " : ", +- &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.cpp"), "\n", +- "\t\$(ARMCC$Bld) $LangOptions -S -J $SrcPath \$(INCDIR) -o \$\@ \$(EPOCBLD$Bld)\\$BaseSrc\_.cpp\n", ++ &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.lis"), " : ", ++ &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc\_.cpp"), "\n", ++ "\t\$(ARMCC$Bld) $LangOptions -S -J $SrcPath \$(INCDIR) -o \$\@ \$(EPOCBLD$Bld)/$BaseSrc\_.cpp\n", + "\n" + ); + } else { +@@ -1953,7 +1951,7 @@ + # compile the source + &main::Output( "OBJECTS$MFVarN = "); + foreach my $obj (@{$CompilationGroups{$KeyFile}{Objects}}) { +- &main::Output( &Generic_Quote("\\\n\t\$(EPOCBLD$Bld)\\$obj"), " "); ++ &main::Output( &Generic_Quote("\\\n\t\$(EPOCBLD$Bld)/$obj"), " "); + } + &main::Output( "\n\n"); + &main::Output( "SOURCES$MFVarN = "); +@@ -1973,12 +1971,12 @@ + } + # generate an assembly listing target too + &main::Output( +- "LISTING$Bld$BaseSrc : ", &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.lis"), "\n", +- "\t", &Generic_CopyAction("$SrcPath\\$BaseSrc.$ABI.lst"), ++ "LISTING$Bld$BaseSrc : ", &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.lis"), "\n", ++ "\t", &Generic_CopyAction("$SrcPath/$BaseSrc.$ABI.lst"), + "\n", +- &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.lis"), " : ", +- &Generic_Quote("$SrcPath\\$Src"), "\n", +- "\t\$(ARMCC$Bld) $LangOptions -S -J $SrcPath \$(INCDIR) -o \$\@ $SrcPath\\$Src \n", ++ &Generic_Quote("\$(EPOCBLD$Bld)/$BaseSrc.lis"), " : ", ++ &Generic_Quote("$SrcPath/$Src"), "\n", ++ "\t\$(ARMCC$Bld) $LangOptions -S -J $SrcPath \$(INCDIR) -o \$\@ $SrcPath/$Src \n", + "\n" + ); + } +--- e32plat.pm 2009-09-04 13:39:32.000000000 -0400 ++++ e32plat.pm 2009-08-25 15:27:28.000000000 -0400 +@@ -228,7 +228,7 @@ + ASSP=>'MARM', + ASSPABI=>'', + Generic=>1, +- MakeMod=>'Cl_arm', ++ MakeMod=>'cl_arm', + Compiler=>'ARMCC', + DefFile=>'EABI', + EABI=>1, +@@ -238,7 +238,7 @@ + ASSP=>'MARM', + ASSPABI=>'', + Generic=>1, +- MakeMod=>'Cl_arm', ++ MakeMod=>'cl_arm', + Compiler=>'ARMCC', + DefFile=>'EABI', + EABI=>1, +@@ -250,7 +250,7 @@ + ASSP=>'MARM', + ASSPABI=>'', + Generic=>1, +- MakeMod=>'Cl_arm', ++ MakeMod=>'cl_arm', + Compiler=>'ARMCC', + DefFile=>'EABI', + EABI=>1, +--- makmake.pl 2009-09-04 13:39:32.000000000 -0400 ++++ makmake.pl 2009-09-04 14:06:33.000000000 -0400 +@@ -140,7 +140,7 @@ + } + $MMPFILE=&Path_AbsToWork($MMPFILE); + +- eval { &Load_ModuleL('Mmp'); }; ++ eval { &Load_ModuleL('mmp'); }; + die $@ if $@; + if ($Options{v}) { + &Mmp_SetVerbose; +@@ -439,7 +439,7 @@ + + # Special handling for non-default invariant makefiles without FEATUREVARIANT in the MMP file + # In this situation the default variant makefle is just included into the variant makefile +-if (${%{&Mmp_TrgType}}{Basic} =~ /^(EXEDLL|EXE|DLL|LIB)$/ && %FeatureVariantInfo && $FeatureVariantInfo{INVARIANT} && $FeatureVariantInfo{NAME} !~ /^default$/i) ++if (${&Mmp_TrgType}{Basic} =~ /^(EXEDLL|EXE|DLL|LIB)$/ && %FeatureVariantInfo && defined $FeatureVariantInfo{INVARIANT} && $FeatureVariantInfo{INVARIANT} && $FeatureVariantInfo{NAME} !~ /^default$/i) + { + # Make sure the path exists + eval { &Path_MakePathL($MAKEFILE); }; +--- prepfile.pm 2009-09-04 13:39:32.000000000 -0400 ++++ prepfile.pm 2009-09-04 14:08:38.000000000 -0400 +@@ -115,8 +115,8 @@ + # don't upper case everything until you've done this. + + foreach $Macro (@Macros) { +- s/\/ _____$Macro /\/$Macro/g; +- s/_____$Macro /$Macro/g; ++ #s/\/ _____$Macro /\/$Macro/g; ++ #s/_____$Macro /$Macro/g; + s/_____$Macro/$Macro/g; + } + if(/^macro/i) diff -Naur gnupoc-package-1.13.orig/sdks/install_gnupoc_s60_50 gnupoc-package-1.13/sdks/install_gnupoc_s60_50 --- gnupoc-package-1.13.orig/sdks/install_gnupoc_s60_50 2009-03-11 12:38:48.000000000 -0400 +++ gnupoc-package-1.13/sdks/install_gnupoc_s60_50 2009-11-17 12:38:44.000000000 -0500 @@ -80,6 +80,10 @@ find $DEST/epoc32/tools -name \\\*.orig -exec rm {} \\\\; cd $DEST/epoc32/tools; chmod a+x \*.pl bldmake abld makmake bmconv rcomp makesis epoc eshell petran pfsdump setupcomms elf2e32 mifconv makekeys signsis extmake rtf2ptml cjpeg +### Install RVCT support +chmod +x install_rvct_support +./install_rvct_support $DEST + rm -rf _e __END diff -Naur gnupoc-package-1.13.orig/sdks/install_openc_16_s60 gnupoc-package-1.13/sdks/install_openc_16_s60 --- gnupoc-package-1.13.orig/sdks/install_openc_16_s60 1969-12-31 19:00:00.000000000 -0500 +++ gnupoc-package-1.13/sdks/install_openc_16_s60 2009-11-17 12:38:44.000000000 -0500 @@ -0,0 +1,56 @@ +#!/bin/bash +set -e + +if [ $# -ne 2 ]; then + echo "Usage: $0 " + exit 1 +fi + +openc_tarball=$1 +S60_SDK_DIR=$2 + +# create temporary directory +TEMP=$(mktemp -d) +trap "echo Removing temporary files...; rm -rf $TEMP" EXIT + +copy_files() +{ + srcdir=$1 + destdir=$2 + (cd $srcdir && tar -cf- . | tar -C $destdir -xvf-) +} + +# Install OpenC + +unzip -d $TEMP $openc_tarball + +# Install C libraries and headers +# (header files are the same for all SDK versions) +./unshield/unshield -d $TEMP -g opencepoc32_3.1 x $TEMP/Installer/data1.cab +./lowercase $TEMP/opencepoc32_3.1/epoc32 +./fixinclude $TEMP/opencepoc32_3.1/epoc32/include +copy_files $TEMP/opencepoc32_3.1/epoc32/ $S60_SDK_DIR/epoc32/ + +# Install C++ libraries and headers +./unshield/unshield -d $TEMP -g opencppepoc32 x $TEMP/Installer/data1.cab +./lowercase $TEMP/opencppepoc32/epoc32 +./fixinclude $TEMP/opencppepoc32/epoc32/include +copy_files $TEMP/opencppepoc32/epoc32/ $S60_SDK_DIR/epoc32/ + +# Install C plugin +./unshield/unshield -d $TEMP -g opencnokiaplugin x $TEMP/Installer/data1.cab +./lowercase $TEMP/opencnokiaplugin/nokia_plugin/openc/s60opencsis +./lowercase $TEMP/opencnokiaplugin/nokia_plugin/openc/s60opencex +./fixinclude $TEMP/opencnokiaplugin/nokia_plugin/openc/s60opencex +./fixexamples $TEMP/opencnokiaplugin/nokia_plugin/openc/s60opencex +copy_files $TEMP/opencnokiaplugin/ $S60_SDK_DIR/ + +# Install C++ plugin +./unshield/unshield -d $TEMP -g opencppnokiaplugin x $TEMP/Installer/data1.cab +./lowercase $TEMP/opencppnokiaplugin/nokia_plugin/opencpp/s60opencppsis +for d in s60boostex s60opencppex; do + ./lowercase $TEMP/opencppnokiaplugin/nokia_plugin/opencpp/$d + ./fixinclude $TEMP/opencppnokiaplugin/nokia_plugin/opencpp/$d + ./fixexamples $TEMP/opencppnokiaplugin/nokia_plugin/opencpp/$d +done +copy_files $TEMP/opencppnokiaplugin/ $S60_SDK_DIR/ diff -Naur gnupoc-package-1.13.orig/sdks/install_qt_s60 gnupoc-package-1.13/sdks/install_qt_s60 --- gnupoc-package-1.13.orig/sdks/install_qt_s60 1969-12-31 19:00:00.000000000 -0500 +++ gnupoc-package-1.13/sdks/install_qt_s60 2009-11-17 12:38:44.000000000 -0500 @@ -0,0 +1,66 @@ +#!/bin/bash +set -e + +if [ $# -ne 3 ]; then + echo "Usage: $0 " + exit 1 +fi + +qt_s60_tarball=$1 +S60_SDK_DIR=$2 +QT_S60_DIR=$3 + +# create temporary directory +TEMP=$(mktemp -d) +trap "echo Removing temporary files...; rm -rf $TEMP" EXIT + +copy_files() +{ + srcdir=$1 + destdir=$2 + (cd $srcdir && tar -cf- . | tar -C $destdir -xvf-) +} + +# Install Qt for S60 +./7z/7z x -o$TEMP $qt_s60_tarball + +# Symlink .dso/.lib files to versioned names +# (needed by GCCE target) +for e in dso lib; do + for f in $TEMP/\$OUTDIR/epoc32/epoc32/release/armv5/lib/*.$e; do + ln -s $(basename $f) $S60_SDK_DIR/epoc32/release/armv5/lib/$(basename $f .$e)'{00040600}'.$e + done +done + +# Modify Qt UID3 to the self-signed version. This avoids an annoying warning +# about Qt not being installed. +sed -i 's/(0x2001E61C)/(0xE001E61C)/' \ + $TEMP/\$OUTDIR/bin/mkspecs/features/symbian/qt.prf + +# Install SDK files +copy_files $TEMP/\$OUTDIR/epoc32/epoc32/ $S60_SDK_DIR/epoc32/ +mkdir -p $QT_S60_DIR +copy_files $TEMP/\$OUTDIR/bin/ $QT_S60_DIR + +# Convert line ends to Unix format for all files modified by the patch, +# otherwise it will not apply +awk '/^\+\+\+ /{print $2}' qt_s60_linux.patch | sed 's,^b/,,' | while read f; do + test ! -e $QT_S60_DIR/$f || ./dos2unix $QT_S60_DIR/$f +done + +# Various fixes for Linux host support +patch -p1 -d $QT_S60_DIR < qt_s60_linux.patch +patch -p0 -d $QT_S60_DIR < qt_s60_linux_missing_files.patch + +chmod 755 $QT_S60_DIR/bin/createpackage.sh +chmod 755 $QT_S60_DIR/autogen.sh + +# Generate native Qt tools (qmake, moc, uic, rcc) +cd $QT_S60_DIR +./autogen.sh +./configure.bin \ + -opensource \ + -confirm-license \ + -platform linux-g++ \ + -xplatform symbian-abld \ + -prefix $PWD diff -Naur gnupoc-package-1.13.orig/sdks/install_rvct_support gnupoc-package-1.13/sdks/install_rvct_support --- gnupoc-package-1.13.orig/sdks/install_rvct_support 1969-12-31 19:00:00.000000000 -0500 +++ gnupoc-package-1.13/sdks/install_rvct_support 2009-11-17 12:38:44.000000000 -0500 @@ -0,0 +1,51 @@ +#!/bin/bash +set -e + +if [ $# -ne 1 ]; then + echo "Usage: $0 " + exit 1 +fi + +S60_SDK_DIR=$1 + +if ! patch --dry-run -f -d $S60_SDK_DIR/epoc32/tools -p0 < gnupoc-s60_50_rvct-patch >/dev/null; then + echo "ERROR: RVCT support seems already installed! Exiting..." >&2 + exit 1 +fi + +patch -d $S60_SDK_DIR/epoc32/tools -p0 < gnupoc-s60_50_rvct-patch + +cat << "EOF" | sed -f- $S60_SDK_DIR/epoc32/tools/def2dll.bat > $S60_SDK_DIR/epoc32/tools/def2dll.pl +/@goto invoke/d +/__END__/,$d +s,$\(bld\)\?path\\\\,$\1path/,g +s,^\t$PerlLibPath =~,\t#$PerlLibPath =~, +/$PerlLibPath \.=/s,\\\\,/, +s,use Defutl,use defutl, +s,use Armutl,use armutl, +s/\xe7// +s/\x0d$// +EOF + +# wrapper for Windows tools to run with WINE +cat > $S60_SDK_DIR/epoc32/tools/wine_wrapper.sh << "EOF" +#!/bin/sh +DIR=`dirname $0` +TOOL=`basename $0` +wine $DIR/$TOOL.exe "$@" +exit $? +EOF +chmod 755 $S60_SDK_DIR/epoc32/tools/wine_wrapper.sh +ln -s wine_wrapper.sh $S60_SDK_DIR/epoc32/tools/elftran +ln -s wine_wrapper.sh $S60_SDK_DIR/epoc32/tools/genstubs +ln -s wine_wrapper.sh $S60_SDK_DIR/epoc32/tools/getexports + +# wrapper for tools written in Perl +cat > $S60_SDK_DIR/epoc32/tools/perl_wrapper.sh << "EOF" +#!/bin/sh +DIR=`dirname $0` +TOOL=`basename $0` +perl $DIR/$TOOL.pl "$@" +EOF +chmod 755 $S60_SDK_DIR/epoc32/tools/perl_wrapper.sh +ln -s perl_wrapper.sh $S60_SDK_DIR/epoc32/tools/def2dll diff -Naur gnupoc-package-1.13.orig/sdks/install_wrapper gnupoc-package-1.13/sdks/install_wrapper --- gnupoc-package-1.13.orig/sdks/install_wrapper 2008-11-30 14:53:48.000000000 -0500 +++ gnupoc-package-1.13/sdks/install_wrapper 2009-11-17 12:38:44.000000000 -0500 @@ -12,7 +12,8 @@ cp sign.sh wrapper.sh gnupoc-common.sh cshlpcmp $DEST cd $DEST -for i in abld bldmake bmconv epoc eshell makekeys makesis makmake mifconv rcomp signsis ; do +for i in abld bldmake bmconv def2dll elf2e32 elftran epoc eshell genstubs \ + getexports makekeys makesis makmake mifconv rcomp signsis ; do ln -s wrapper.sh $i done if [ "`which gmake`" != "" ]; then diff -Naur gnupoc-package-1.13.orig/sdks/qt_s60_linux_missing_files.patch gnupoc-package-1.13/sdks/qt_s60_linux_missing_files.patch --- gnupoc-package-1.13.orig/sdks/qt_s60_linux_missing_files.patch 1969-12-31 19:00:00.000000000 -0500 +++ gnupoc-package-1.13/sdks/qt_s60_linux_missing_files.patch 2009-11-17 14:50:00.000000000 -0500 @@ -0,0 +1,169 @@ +--- mkspecs/linux-g++/qplatformdefs.h 1969-12-31 19:00:00.000000000 -0500 ++++ mkspecs/linux-g++/qplatformdefs.h 2009-11-17 11:12:51.000000000 -0500 +@@ -0,0 +1,166 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ++** All rights reserved. ++** Contact: Nokia Corporation (qt-info@nokia.com) ++** ++** This file is part of the qmake spec of the Qt Toolkit. ++** ++** $QT_BEGIN_LICENSE:LGPL$ ++** No Commercial Usage ++** This file contains pre-release code and may not be distributed. ++** You may use this file in accordance with the terms and conditions ++** contained in the Technology Preview License Agreement accompanying ++** this package. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Nokia gives you certain additional ++** rights. These rights are described in the Nokia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++** If you have questions regarding the use of this file, please contact ++** Nokia at qt-info@nokia.com. ++** ++** ++** ++** ++** ++** ++** ++** ++** $QT_END_LICENSE$ ++** ++****************************************************************************/ ++ ++#ifndef QPLATFORMDEFS_H ++#define QPLATFORMDEFS_H ++ ++// Get Qt defines/settings ++ ++#include "qglobal.h" ++ ++// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs ++ ++// 1) need to reset default environment if _BSD_SOURCE is defined ++// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0 ++// 3) it seems older glibc need this to include the X/Open stuff ++#ifndef _GNU_SOURCE ++# define _GNU_SOURCE ++#endif ++ ++#include ++ ++ ++// We are hot - unistd.h should have turned on the specific APIs we requested ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#ifndef QT_NO_IPV6IFNAME ++#include ++#endif ++ ++#ifdef QT_LARGEFILE_SUPPORT ++#define QT_STATBUF struct stat64 ++#define QT_STATBUF4TSTAT struct stat64 ++#define QT_STAT ::stat64 ++#define QT_FSTAT ::fstat64 ++#define QT_LSTAT ::lstat64 ++#define QT_OPEN ::open64 ++#define QT_TRUNCATE ::truncate64 ++#define QT_FTRUNCATE ::ftruncate64 ++#define QT_LSEEK ::lseek64 ++#else ++#define QT_STATBUF struct stat ++#define QT_STATBUF4TSTAT struct stat ++#define QT_STAT ::stat ++#define QT_FSTAT ::fstat ++#define QT_LSTAT ::lstat ++#define QT_OPEN ::open ++#define QT_TRUNCATE ::truncate ++#define QT_FTRUNCATE ::ftruncate ++#define QT_LSEEK ::lseek ++#endif ++ ++#ifdef QT_LARGEFILE_SUPPORT ++#define QT_FOPEN ::fopen64 ++#define QT_FSEEK ::fseeko64 ++#define QT_FTELL ::ftello64 ++#define QT_FGETPOS ::fgetpos64 ++#define QT_FSETPOS ::fsetpos64 ++#define QT_MMAP ::mmap64 ++#define QT_FPOS_T fpos64_t ++#define QT_OFF_T off64_t ++#else ++#define QT_FOPEN ::fopen ++#define QT_FSEEK ::fseek ++#define QT_FTELL ::ftell ++#define QT_FGETPOS ::fgetpos ++#define QT_FSETPOS ::fsetpos ++#define QT_MMAP ::mmap ++#define QT_FPOS_T fpos_t ++#define QT_OFF_T long ++#endif ++ ++#define QT_STAT_REG S_IFREG ++#define QT_STAT_DIR S_IFDIR ++#define QT_STAT_MASK S_IFMT ++#define QT_STAT_LNK S_IFLNK ++#define QT_SOCKET_CONNECT ::connect ++#define QT_SOCKET_BIND ::bind ++#define QT_FILENO fileno ++#define QT_CLOSE ::close ++#define QT_READ ::read ++#define QT_WRITE ::write ++#define QT_ACCESS ::access ++#define QT_GETCWD ::getcwd ++#define QT_CHDIR ::chdir ++#define QT_MKDIR ::mkdir ++#define QT_RMDIR ::rmdir ++#define QT_OPEN_LARGEFILE O_LARGEFILE ++#define QT_OPEN_RDONLY O_RDONLY ++#define QT_OPEN_WRONLY O_WRONLY ++#define QT_OPEN_RDWR O_RDWR ++#define QT_OPEN_CREAT O_CREAT ++#define QT_OPEN_TRUNC O_TRUNC ++#define QT_OPEN_APPEND O_APPEND ++ ++#define QT_SIGNAL_RETTYPE void ++#define QT_SIGNAL_ARGS int ++#define QT_SIGNAL_IGNORE SIG_IGN ++ ++#if defined(__GLIBC__) && (__GLIBC__ >= 2) ++#define QT_SOCKLEN_T socklen_t ++#else ++#define QT_SOCKLEN_T int ++#endif ++ ++#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) ++#define QT_SNPRINTF ::snprintf ++#define QT_VSNPRINTF ::vsnprintf ++#endif ++ ++ ++#endif // QPLATFORMDEFS_H diff -Naur gnupoc-package-1.13.orig/sdks/qt_s60_linux.patch gnupoc-package-1.13/sdks/qt_s60_linux.patch --- gnupoc-package-1.13.orig/sdks/qt_s60_linux.patch 1969-12-31 19:00:00.000000000 -0500 +++ gnupoc-package-1.13/sdks/qt_s60_linux.patch 2009-11-18 07:36:32.000000000 -0500 @@ -0,0 +1,1122 @@ +From 2a770398a3af623f1ab05cf817015d3e78834b2d Mon Sep 17 00:00:00 2001 +From: Anderson Lizardo +Date: Sun, 6 Sep 2009 17:09:25 -0400 +Subject: [PATCH] Fix portability problems in bin/createpackage.pl. + +* Use File::Spec functions to manipulate path components. +* Keep $targetplatform lower case for case sensitive systems. +--- + bin/createpackage.pl | 13 +++++-------- + 1 files changed, 5 insertions(+), 8 deletions(-) + mode change 100755 => 100644 bin/createpackage.pl + +diff --git a/bin/createpackage.pl b/bin/createpackage.pl +old mode 100755 +new mode 100644 +index 7e87758..7e97b8e +--- a/bin/createpackage.pl ++++ b/bin/createpackage.pl +@@ -145,10 +145,7 @@ my $signed_sis_name = $pkgoutputbasename.".sis"; + # Store some utility variables + my $scriptpath = dirname(__FILE__); + my $certtext = $certificate; +-my $certpath = $scriptpath; +-$certpath =~ s-^(.*[^\\])$-$1\\-o; # ensure path ends with a backslash +-$certpath =~ s-/-\\-go; # for those working with UNIX shells +-$certpath =~ s-bin\\$-src\\s60installs\\-; # certificates are one step up in hierarcy ++my $certpath = File::Spec->catdir($scriptpath, File::Spec->updir(), "src", "s60installs"); + + # Check some pre-conditions and print error messages if needed + unless (length($templatepkg) && length($platform) && length($target)) { +@@ -172,14 +169,14 @@ if (length($certificate)) { + } else { + #If no certificate is given, check default options + $certtext = "RnD"; +- $certificate = $certpath."rd.cer"; +- $key = $certpath."rd-key.pem"; ++ $certificate = File::Spec->catfile($certpath, "rd.cer"); ++ $key = File::Spec->catfile($certpath, "rd-key.pem"); + + stat($certificate); + unless( -e _ ) { + $certtext = "Self Signed"; +- $certificate = $certpath."selfsigned.cer"; +- $key = $certpath."selfsigned.key"; ++ $certificate = File::Spec->catfile($certpath, "selfsigned.cer"); ++ $key = File::Spec->catfile($certpath, "selfsigned.key"); + } + } + +-- +1.5.6.3 + + +From d7e75dcb8dc0ca5f8e45f96e2256614ae385aab7 Mon Sep 17 00:00:00 2001 +From: Anderson Lizardo +Date: Sun, 6 Sep 2009 19:14:20 -0400 +Subject: [PATCH] Add createpackage.bat equivalent for Unix systems. + +--- + bin/createpackage.sh | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + create mode 100755 bin/createpackage.sh + +diff --git a/bin/createpackage.sh b/bin/createpackage.sh +new file mode 100755 +index 0000000..fdd4eeb +--- /dev/null ++++ b/bin/createpackage.sh +@@ -0,0 +1,3 @@ ++#!/bin/sh ++scriptpath=`dirname $0` ++perl $scriptpath/createpackage.pl "$@" +-- +1.5.6.3 + + +From c71d041a294be8fe7ea8972a6f5da89f83d9cb29 Mon Sep 17 00:00:00 2001 +From: Anderson Lizardo +Date: Sun, 6 Sep 2009 20:39:04 -0400 +Subject: [PATCH] qmake: add Linux host support to Symbian generator + +--- + mkspecs/common/symbian/symbian.conf | 20 +++++--- + mkspecs/features/symbian/application_icon.prf | 12 +++-- + qmake/generators/makefile.cpp | 10 +++- + .../symbian/initprojectdeploy_symbian.cpp | 10 ++-- + qmake/generators/symbian/symmake.cpp | 14 ++++-- + qmake/generators/symbian/symmake_abld.cpp | 55 ++++++++++++++----- + 6 files changed, 84 insertions(+), 37 deletions(-) + +diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf +index 79bac42..4c95f5a 100644 +--- a/mkspecs/common/symbian/symbian.conf ++++ b/mkspecs/common/symbian/symbian.conf +@@ -74,7 +74,7 @@ QMAKE_LIBS_COMPAT = + QMAKE_LIBS_QT_ENTRY = -llibcrt0.lib + QMAKE_LIBS_S60 = -lavkon + +-!isEmpty(QMAKE_SH) { ++win32:!isEmpty(QMAKE_SH) | unix { + QMAKE_COPY = cp + QMAKE_COPY_DIR = cp -r + QMAKE_MOVE = mv +@@ -92,9 +92,15 @@ QMAKE_LIBS_S60 = -lavkon + QMAKE_CHK_DIR_EXISTS = if not exist + } + +-QMAKE_MOC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc.exe +-QMAKE_UIC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic.exe +-QMAKE_IDC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc.exe ++win32 { ++ QMAKE_MOC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc.exe ++ QMAKE_UIC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic.exe ++ QMAKE_IDC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc.exe ++} else { ++ QMAKE_MOC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc ++ QMAKE_UIC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic ++ QMAKE_IDC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc ++} + + QMAKE_IDL = midl + QMAKE_LIB = ar -ru +@@ -105,7 +111,7 @@ QMAKE_STRIP = strip + QMAKE_STRIPFLAGS_LIB += --strip-unneeded + + load(qt_config) +-load(platform_paths) ++load(symbian/platform_paths) + + symbian-abld { + # Versions of abld prior to Symbian^3 have a bug where you cannot remove something from the command line without replacing it +@@ -137,10 +143,10 @@ default_deployment.pkg_prerules = \ + + DEPLOYMENT += default_deployment + +-exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/Series60v5.0.sis )|exists($${EPOCROOT}epoc32/data/z/system/install/Series60v5.0.sis) { ++exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.0.sis )|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.0.sis) { + S60_VERSION = 5.0 + } else { +- exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/Series60v3.2.sis )|exists($${EPOCROOT}epoc32/data/z/system/install/Series60v3.2.sis) { ++ exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v3.2.sis )|exists($${EPOCROOT}epoc32/data/z/system/install/series60v3.2.sis) { + S60_VERSION = 3.2 + } else { + S60_VERSION = 3.1 +diff --git a/mkspecs/features/symbian/application_icon.prf b/mkspecs/features/symbian/application_icon.prf +index b0c1bb1..5dfd1cb 100644 +--- a/mkspecs/features/symbian/application_icon.prf ++++ b/mkspecs/features/symbian/application_icon.prf +@@ -19,13 +19,17 @@ contains( CONFIG, no_icon ) { + # Note: symbian-sbsv2 builds can't utilize extra compiler for mifconv, so ICON handling is done in code + symbian-abld { + #Makefile: requires paths with backslash +- ICON = $$replace( ICON, /, \\) ++ win32:ICON = $$replace(ICON, /, \\) ++ ++ # mifconv requires paths with backslash on Linux ++ unix:FILE_OUT = $(subst \\,\\\\,$(subst /,\\,${QMAKE_FILE_OUT})) ++ else:FILE_OUT = ${QMAKE_FILE_OUT} + + # Extra compiler rules for mifconv + mifconv.output = ${ZDIR}$$APP_RESOURCE_DIR/$${TARGET.UID3}.mif + # Based on: http://www.forum.nokia.com/document/Cpp_Developers_Library + # svg-t icons should always use /c32 depth +- mifconv.commands = mifconv ${QMAKE_FILE_OUT} $$join(ICON, " /c32 ", "/c32 ",) ++ mifconv.commands = mifconv $$FILE_OUT $$join(ICON, " /c32 ", "/c32 ",) + mifconv.input = ICON + mifconv.CONFIG = no_link combine + # target_predeps together with combine seems not to work correctly, lets define it by ourselves +@@ -34,7 +38,7 @@ contains( CONFIG, no_icon ) { + } + # Rules to use generated MIF file from symbian resources + RSS_RULES.number_of_icons = $$size(ICON) +- RSS_RULES.icon_file = $$replace( APP_RESOURCE_DIR, /, \\\\ )\\\\$${TARGET.UID3}.mif ++ RSS_RULES.icon_file = $$APP_RESOURCE_DIR/$${TARGET.UID3}.mif ++ win32:RSS_RULES.icon_file = $$replace(RSS_RULES.icon_file, /, \\\\) + } + } +- +diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp +index 388e64f..f9340f9 100644 +--- a/qmake/generators/makefile.cpp ++++ b/qmake/generators/makefile.cpp +@@ -65,6 +65,12 @@ + #include + #include + ++#ifdef Q_OS_WIN32 ++#define NO_STDERR "2> NUL" ++#else ++#define NO_STDERR "2>/dev/null" ++#endif ++ + QT_BEGIN_NAMESPACE + + // Well, Windows doesn't have this, so here's the macro +@@ -1796,7 +1802,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) + if(tmp_clean.indexOf("${QMAKE_") == -1) { + t << "\n\t" << "-$(DEL_FILE) " << tmp_clean; + if (isForSymbian()) +- t << " 2> NUL"; // Eliminate unnecessary warnings ++ t << " " << NO_STDERR; // Eliminate unnecessary warnings + wrote_clean = true; + } + if(!wrote_clean_cmds || !wrote_clean) { +@@ -1826,7 +1832,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) + } + if(!cleans.isEmpty()) + if (isForSymbian()) +- t << valGlue(cleans, "\n\t" + del_statement, " 2> NUL\n\t" + del_statement, " 2> NUL"); ++ t << valGlue(cleans, "\n\t" + del_statement, " " NO_STDERR "\n\t" + del_statement, " " NO_STDERR); + else + t << valGlue(cleans, "\n\t" + del_statement, "\n\t" + del_statement, ""); + if(!wrote_clean_cmds) { +diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.cpp b/qmake/generators/symbian/initprojectdeploy_symbian.cpp +index f27d1ba..676cea5 100644 +--- a/qmake/generators/symbian/initprojectdeploy_symbian.cpp ++++ b/qmake/generators/symbian/initprojectdeploy_symbian.cpp +@@ -176,12 +176,12 @@ static void createPluginStub(const QFileInfo& info, + QStringList& generatedDirs, + QStringList& generatedFiles) + { +- QDir().mkpath(QLatin1String(PLUGIN_STUB_DIR "\\")); ++ QDir().mkpath(PLUGIN_STUB_DIR); + if (!generatedDirs.contains(PLUGIN_STUB_DIR)) + generatedDirs << PLUGIN_STUB_DIR; + // Plugin stubs must have different name from the actual plugins, because + // the toolchain for creating ROM images cannot handle non-binary .dll files properly. +- QFile stubFile(QLatin1String(PLUGIN_STUB_DIR "\\") + info.completeBaseName() + "." SUFFIX_QTPLUGIN); ++ QFile stubFile(QDir(PLUGIN_STUB_DIR).filePath(info.completeBaseName() + "." SUFFIX_QTPLUGIN)); + if (stubFile.open(QIODevice::WriteOnly)) { + if (!generatedFiles.contains(stubFile.fileName())) + generatedFiles << stubFile.fileName(); +@@ -330,12 +330,12 @@ void initProjectDeploySymbian(QMakeProject* project, + if (isBinary(info)) { + if (deployBinaries) { + // Executables and libraries are deployed to \sys\bin +- QFileInfo releasePath(epocRoot() + "epoc32\\release\\" + platform + "\\" + build + "\\"); ++ QFileInfo releasePath(epocRoot() + QDir::toNativeSeparators("epoc32/release/" + platform + "/" + build + "/")); + if(devicePathHasDriveLetter) { +- deploymentList.append(CopyItem(Option::fixPathToLocalOS(releasePath.absolutePath() + "\\" + info.fileName(), false, true), ++ deploymentList.append(CopyItem(Option::fixPathToLocalOS(QDir(releasePath.absolutePath()).filePath(info.fileName()), false, true), + Option::fixPathToLocalOS(devicePath.left(2) + QLatin1String(SYSBIN_DIR "\\") + info.fileName()))); + } else { +- deploymentList.append(CopyItem(Option::fixPathToLocalOS(releasePath.absolutePath() + "\\" + info.fileName(), false, true), ++ deploymentList.append(CopyItem(Option::fixPathToLocalOS(QDir(releasePath.absolutePath()).filePath(info.fileName()), false, true), + Option::fixPathToLocalOS(deploymentDrive + QLatin1String(SYSBIN_DIR "\\") + info.fileName()))); + } + } +diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp +index 1326a49..381d021 100644 +--- a/qmake/generators/symbian/symmake.cpp ++++ b/qmake/generators/symbian/symmake.cpp +@@ -50,11 +50,17 @@ + #include + #include + ++#ifdef Q_OS_WIN32 ++#define SCRIPT_EXT ".bat" ++#else ++#define SCRIPT_EXT ".sh" ++#endif ++ + #define RESOURCE_DIRECTORY_MMP "/resource/apps" + #define RESOURCE_DIRECTORY_RESOURCE "\\\\resource\\\\apps\\\\" + #define REGISTRATION_RESOURCE_DIRECTORY_HW "/private/10003a3f/import/apps" + #define PLUGIN_COMMON_DEF_FILE_FOR_MMP "./plugin_common.def" +-#define PLUGIN_COMMON_DEF_FILE_ACTUAL "plugin_commonU.def" ++#define PLUGIN_COMMON_DEF_FILE_ACTUAL "plugin_commonu.def" + #define BLD_INF_FILENAME_LEN (sizeof(BLD_INF_FILENAME) - 1) + + #define BLD_INF_RULES_BASE "BLD_INF_RULES." +@@ -401,7 +407,7 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile) + for (int i = 0; i < depList.size(); ++i) { + t << QString("\"%1\" - \"%2\"") + .arg(QString(depList.at(i).from).replace('\\','/')) +- .arg(depList.at(i).to) << endl; ++ .arg(QString(depList.at(i).to).replace('/','\\')) << endl; + } + t << endl; + +@@ -1689,7 +1695,7 @@ void SymbianMakefileGenerator::generateCleanCommands(QTextStream& t, + t << "\t-@ if EXIST \"" << QDir::toNativeSeparators(item) << "\" "; + t << cmd << " " << cmdOptions << " \"" << QDir::toNativeSeparators(item) << "\"" << endl; + #else +- t << "\t-if test -f " << QDir::toNativeSeparators(item) << "; then "; ++ t << "\t-if test -e " << QDir::toNativeSeparators(item) << "; then "; + t << cmd << " " << cmdOptions << " " << QDir::toNativeSeparators(item) << "; fi" << endl; + #endif + } +@@ -1722,7 +1728,7 @@ void SymbianMakefileGenerator::writeSisTargets(QTextStream &t) + + t << OK_SIS_TARGET ":" << endl; + +- QString pkgcommand = QString("\tcreatepackage.bat $(QT_SIS_OPTIONS) %1_template.%2 $(QT_SIS_TARGET) " \ ++ QString pkgcommand = QString("\tcreatepackage" SCRIPT_EXT " $(QT_SIS_OPTIONS) %1_template.%2 $(QT_SIS_TARGET) " \ + "$(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)") + .arg(fixedTarget) + .arg("pkg"); +diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp +index 1b5464f..91893a5 100644 +--- a/qmake/generators/symbian/symmake_abld.cpp ++++ b/qmake/generators/symbian/symmake_abld.cpp +@@ -195,16 +195,21 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool + t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; + t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl; + t << "MOVE = " << var("QMAKE_MOVE") << endl; ++#ifdef Q_OS_WIN32 + t << "XCOPY = xcopy /d /f /h /r /y /i" << endl; + t << "ABLD = ABLD.BAT" << endl; ++#else ++ t << "XCOPY = cp -u -v" << endl; ++ t << "ABLD = abld" << endl; ++#endif + t << "DEBUG_PLATFORMS = " << debugPlatforms.join(" ") << endl; + t << "RELEASE_PLATFORMS = " << releasePlatforms.join(" ") << endl; + t << "MAKE = make" << endl; + t << endl; + t << "ifeq (WINS,$(findstring WINS, $(PLATFORM)))" << endl; +- t << "ZDIR=$(EPOCROOT)epoc32\\release\\$(PLATFORM)\\$(CFG)\\Z" << endl; ++ t << "ZDIR=$(EPOCROOT)" << QDir::toNativeSeparators("epoc32/release/$(PLATFORM)/$(CFG)/z") << endl; + t << "else" << endl; +- t << "ZDIR=$(EPOCROOT)epoc32\\data\\z" << endl; ++ t << "ZDIR=$(EPOCROOT)" << QDir::toNativeSeparators("epoc32/data/z") << endl; + t << "endif" << endl; + t << endl; + t << "DEFINES" << '\t' << " = " +@@ -304,8 +309,13 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool + if (values.at(i).endsWith("/" QT_EXTRA_INCLUDE_DIR)) { + QString fixedValue(QDir::toNativeSeparators(values.at(i))); + dirsToClean << fixedValue; ++#ifdef Q_OS_WIN32 + t << "\t-@ if NOT EXIST \"" << fixedValue << "\" mkdir \"" + << fixedValue << "\"" << endl; ++#else ++ t << "\t-@ if test ! -d \"" << fixedValue << "\"; then mkdir \"" ++ << fixedValue << "\"" << "; fi" < NUL" gets appended to generated clean targets in makefile.cpp. + t << EXTENSION_CLEAN ": " COMPILER_CLEAN_TARGET << endl; ++#ifdef Q_OS_WIN32 + generateCleanCommands(t, dirsToClean, var("QMAKE_DEL_DIR"), " /S /Q ", "", ""); ++#else ++ generateCleanCommands(t, dirsToClean, "rm", " -rf ", "", ""); ++#endif + t << endl; + + t << PRE_TARGETDEPS_TARGET ":" +@@ -375,7 +389,11 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool + // Create execution target + if (debugPlatforms.contains("winscw") && targetType == TypeExe) { + t << "run:" << endl; ++#ifdef Q_OS_WIN32 + t << "\t-call " << epocRoot() << "epoc32\\release\\winscw\\udeb\\" << removePathSeparators(escapeFilePath(fileFixify(project->first("TARGET"))).append(".exe")) << endl << endl; ++#else ++ t << "\t-wine " << epocRoot() << "epoc32/release/winscw/udeb/" << removePathSeparators(escapeFilePath(fileFixify(project->first("TARGET"))).append(".exe")) << endl << endl; ++#endif + } + } + +@@ -422,19 +440,26 @@ bool SymbianAbldMakefileGenerator::writeDeploymentTargets(QTextStream &t) + + void SymbianAbldMakefileGenerator::writeStoreBuildTarget(QTextStream &t) + { +- t << STORE_BUILD_TARGET ":" << endl; +- t << "\t@echo # ============================================================================== > " MAKE_CACHE_NAME << endl; +- t << "\t@echo # This file is generated by make and should not be modified by the user >> " MAKE_CACHE_NAME << endl; +- t << "\t@echo # Name : " << MAKE_CACHE_NAME << " >> " MAKE_CACHE_NAME << endl; +- t << "\t@echo # Part of : " << project->values("TARGET").join(" ") << " >> " MAKE_CACHE_NAME << endl; +- t << "\t@echo # Description : This file is used to cache last build target for >> " MAKE_CACHE_NAME << endl; +- t << "\t@echo # make sis target. >> " MAKE_CACHE_NAME << endl; +- t << "\t@echo # Version : >> " MAKE_CACHE_NAME << endl; +- t << "\t@echo # >> " MAKE_CACHE_NAME << endl; +- t << "\t@echo # ============================================================================== >> " MAKE_CACHE_NAME << endl; +- t << "\t@echo. >> " MAKE_CACHE_NAME << endl; +- t << "\t@echo QT_SIS_TARGET ?= $(QT_SIS_TARGET) >> " MAKE_CACHE_NAME << endl; +- t << endl; ++ QString storeBuildTarget; ++ QTextStream s(&storeBuildTarget); ++ ++ s << STORE_BUILD_TARGET ":" << endl; ++ s << "\t@echo # ============================================================================== > " MAKE_CACHE_NAME << endl; ++ s << "\t@echo # This file is generated by make and should not be modified by the user >> " MAKE_CACHE_NAME << endl; ++ s << "\t@echo # Name : " << MAKE_CACHE_NAME << " >> " MAKE_CACHE_NAME << endl; ++ s << "\t@echo # Part of : " << project->values("TARGET").join(" ") << " >> " MAKE_CACHE_NAME << endl; ++ s << "\t@echo # Description : This file is used to cache last build target for >> " MAKE_CACHE_NAME << endl; ++ s << "\t@echo # make sis target. >> " MAKE_CACHE_NAME << endl; ++ s << "\t@echo # Version : >> " MAKE_CACHE_NAME << endl; ++ s << "\t@echo # >> " MAKE_CACHE_NAME << endl; ++ s << "\t@echo # ============================================================================== >> " MAKE_CACHE_NAME << endl; ++ s << "\t@echo >> " MAKE_CACHE_NAME << endl; ++ s << "\t@echo QT_SIS_TARGET ?= $(QT_SIS_TARGET) >> " MAKE_CACHE_NAME << endl; ++ s << endl; ++#ifndef Q_OS_WIN32 ++ storeBuildTarget.replace("#", "\\#"); ++#endif ++ t << storeBuildTarget; + + generatedFiles << MAKE_CACHE_NAME; + } +-- +1.5.6.3 + + +From 2d5292cc85c0057f0cd5e71aabfb7c29c8362948 Mon Sep 17 00:00:00 2001 +From: Anderson Lizardo +Date: Sun, 6 Sep 2009 20:05:13 -0400 +Subject: [PATCH] Make all Symbian #includes lower case. + +--- + src/gui/kernel/qapplication_s60.cpp | 2 +- + src/gui/kernel/qdnd_s60.cpp | 2 +- + src/gui/kernel/qsound_s60.cpp | 2 +- + src/gui/styles/qs60style_s60.cpp | 4 ++-- + src/gui/text/qfontdatabase_s60.cpp | 2 +- + src/gui/text/qfontengine_s60.cpp | 4 ++-- + src/gui/text/qfontengine_s60_p.h | 2 +- + 7 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp +index 04e4b31..f5a50e4 100644 +--- a/src/gui/kernel/qapplication_s60.cpp ++++ b/src/gui/kernel/qapplication_s60.cpp +@@ -63,7 +63,7 @@ + #include "private/qsoftkeymanager_p.h" + + #include "apgwgnam.h" // For CApaWindowGroupName +-#include // For CMdaAudioToneUtility ++#include // For CMdaAudioToneUtility + + #if defined(Q_WS_S60) + # if !defined(QT_NO_IM) +diff --git a/src/gui/kernel/qdnd_s60.cpp b/src/gui/kernel/qdnd_s60.cpp +index 65deb5d..319c844 100644 +--- a/src/gui/kernel/qdnd_s60.cpp ++++ b/src/gui/kernel/qdnd_s60.cpp +@@ -52,7 +52,7 @@ + #include "qdnd_p.h" + #include "qt_s60_p.h" + +-#include ++#include + // pointer cursor + #include + #include +diff --git a/src/gui/kernel/qsound_s60.cpp b/src/gui/kernel/qsound_s60.cpp +index af0fae6..cbbf838 100644 +--- a/src/gui/kernel/qsound_s60.cpp ++++ b/src/gui/kernel/qsound_s60.cpp +@@ -51,7 +51,7 @@ + #include + + #include +-#include ++#include + + QT_BEGIN_NAMESPACE + +diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp +index a8dbf8d..b33f9f4 100644 +--- a/src/gui/styles/qs60style_s60.cpp ++++ b/src/gui/styles/qs60style_s60.cpp +@@ -58,8 +58,8 @@ + #include + #include + #include +-#include +-#include ++#include ++#include + #include + #include + +diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp +index 808dca6..aa97fc9 100644 +--- a/src/gui/text/qfontdatabase_s60.cpp ++++ b/src/gui/text/qfontdatabase_s60.cpp +@@ -50,7 +50,7 @@ + #include "qendian.h" + #include + #if defined(QT_NO_FREETYPE) +-#include ++#include + #endif + + QT_BEGIN_NAMESPACE +diff --git a/src/gui/text/qfontengine_s60.cpp b/src/gui/text/qfontengine_s60.cpp +index e279ad2..e9883a7 100644 +--- a/src/gui/text/qfontengine_s60.cpp ++++ b/src/gui/text/qfontengine_s60.cpp +@@ -49,8 +49,8 @@ + + #include + #include +-#include +-#include ++#include ++#include + + QT_BEGIN_NAMESPACE + +diff --git a/src/gui/text/qfontengine_s60_p.h b/src/gui/text/qfontengine_s60_p.h +index 9e22245..460b5ee 100644 +--- a/src/gui/text/qfontengine_s60_p.h ++++ b/src/gui/text/qfontengine_s60_p.h +@@ -56,7 +56,7 @@ + #include "qconfig.h" + #include "qfontengine_p.h" + #include "qsize.h" +-#include ++#include + + class CFbsBitmap; + class CFbsBitmapDevice; +-- +1.5.6.3 + + +From 0969e3daa5bbaf9f0a70f3264d1a2ce294148376 Mon Sep 17 00:00:00 2001 +From: Anderson Lizardo +Date: Sun, 6 Sep 2009 20:29:51 -0400 +Subject: [PATCH] Linux support for platform specific commands in .pro files. + +--- + projects.pro | 15 +++++++++++++-- + 1 files changed, 13 insertions(+), 2 deletions(-) + +diff --git a/projects.pro b/projects.pro +index aa1eb71..ef11f20 100644 +--- a/projects.pro ++++ b/projects.pro +@@ -107,7 +107,8 @@ win32 { + } + symbian { + confclean.depends += distclean +- confclean.commands += \ ++ win32 { ++ confclean.commands += \ + (cd src\tools\moc && $(MAKE) distclean) $$escape_expand(\n\t) \ + (cd src\tools\rcc && $(MAKE) distclean) $$escape_expand(\n\t) \ + (cd src\tools\uic && $(MAKE) distclean) $$escape_expand(\n\t) \ +@@ -116,7 +117,17 @@ symbian { + -$(DEL_FILE) mkspecs\qconfig.pri $$escape_expand(\n\t) \ + -$(DEL_FILE) .qmake.cache $$escape_expand(\n\t) \ + (cd qmake && $(MAKE) distclean) +- ++ } else { ++ confclean.commands += \ ++ (cd src/tools/moc && $(MAKE) distclean) $$escape_expand(\n\t) \ ++ (cd src/tools/rcc && $(MAKE) distclean) $$escape_expand(\n\t) \ ++ (cd src/tools/uic && $(MAKE) distclean) $$escape_expand(\n\t) \ ++ -$(DEL_FILE) src/corelib/global/qconfig.h $$escape_expand(\n\t) \ ++ -$(DEL_FILE) src/corelib/global/qconfig.cpp $$escape_expand(\n\t) \ ++ -$(DEL_FILE) mkspecs/qconfig.pri $$escape_expand(\n\t) \ ++ -$(DEL_FILE) .qmake.cache $$escape_expand(\n\t) \ ++ (cd qmake && $(MAKE) distclean) ++ } + } + QMAKE_EXTRA_TARGETS += confclean + qmakeclean.commands += (cd qmake && $(MAKE) clean) +-- +1.5.6.3 + + +From 383629660eeef18345da55d9a84089f699b5bc78 Mon Sep 17 00:00:00 2001 +From: Anderson Lizardo +Date: Mon, 24 Aug 2009 16:21:37 -0400 +Subject: [PATCH] tools/configure: add Linux host support + +--- + tools/configure/configure.pro | 6 ++- + tools/configure/configureapp.cpp | 74 ++++++++++++++++++++++++++++++++++--- + tools/configure/environment.cpp | 68 ++++++++++++++++++++++++++++++++--- + tools/configure/environment.h | 4 ++ + tools/configure/tools.cpp | 9 +++++ + 5 files changed, 148 insertions(+), 13 deletions(-) + +diff --git a/tools/configure/configure.pro b/tools/configure/configure.pro +index 243183c..5918c07 100644 +--- a/tools/configure/configure.pro ++++ b/tools/configure/configure.pro +@@ -82,7 +82,6 @@ SOURCES = main.cpp configureapp.cpp environment.cpp tools.cpp \ + $$QT_SOURCE_TREE/src/corelib/io/qabstractfileengine.cpp \ + $$QT_SOURCE_TREE/src/corelib/io/qfsfileengine.cpp \ + $$QT_SOURCE_TREE/src/corelib/io/qfsfileengine_iterator.cpp \ +- $$QT_SOURCE_TREE/src/corelib/io/qfsfileengine_iterator_win.cpp \ + $$QT_SOURCE_TREE/src/corelib/io/qiodevice.cpp \ + $$QT_SOURCE_TREE/src/corelib/io/qtextstream.cpp \ + $$QT_SOURCE_TREE/src/corelib/io/qtemporaryfile.cpp \ +@@ -104,7 +103,10 @@ SOURCES = main.cpp configureapp.cpp environment.cpp tools.cpp \ + $$QT_SOURCE_TREE/src/corelib/kernel/qmetatype.cpp \ + $$QT_SOURCE_TREE/src/corelib/global/qmalloc.cpp + +-win32:SOURCES += $$QT_SOURCE_TREE/src/corelib/io/qfsfileengine_win.cpp ++win32:SOURCES += $$QT_SOURCE_TREE/src/corelib/io/qfsfileengine_win.cpp \ ++ $$QT_SOURCE_TREE/src/corelib/io/qfsfileengine_iterator_win.cpp ++unix:SOURCES += $$QT_SOURCE_TREE/src/corelib/io/qfsfileengine_unix.cpp \ ++ $$QT_SOURCE_TREE/src/corelib/io/qfsfileengine_iterator_unix.cpp + + DEFINES += COMMERCIAL_VERSION + +diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp +index 735e030..9280d5f 100644 +--- a/tools/configure/configureapp.cpp ++++ b/tools/configure/configureapp.cpp +@@ -56,8 +56,15 @@ + #include + + #include ++#ifdef Q_OS_WIN32 + #include + #include ++#define EXE_EXT ".exe" ++#else ++#include ++#define _getch() getchar() ++#define EXE_EXT ++#endif + + QT_BEGIN_NAMESPACE + +@@ -97,6 +104,7 @@ Configure::Configure( int& argc, char** argv ) + descIndent = 25; + outputWidth = 0; + // Get console buffer output width ++#ifdef Q_OS_WIN32 + CONSOLE_SCREEN_BUFFER_INFO info; + HANDLE hStdout = GetStdHandle(STD_OUTPUT_HANDLE); + if (GetConsoleScreenBufferInfo(hStdout, &info)) +@@ -104,6 +112,9 @@ Configure::Configure( int& argc, char** argv ) + outputWidth = qMin(outputWidth, 79); // Anything wider gets unreadable + if (outputWidth < 35) // Insanely small, just use 79 + outputWidth = 79; ++#else ++ outputWidth = 79; ++#endif + int i; + + /* +@@ -116,9 +127,13 @@ Configure::Configure( int& argc, char** argv ) + + + // Get the path to the executable ++#ifdef Q_OS_WIN32 + wchar_t module_name[MAX_PATH]; + GetModuleFileName(0, module_name, sizeof(module_name) / sizeof(wchar_t)); + QFileInfo sourcePathInfo = QString::fromWCharArray(module_name); ++#else ++ QFileInfo sourcePathInfo = QString::fromLocal8Bit(program_invocation_name); ++#endif + sourcePath = sourcePathInfo.absolutePath(); + sourceDir = sourcePathInfo.dir(); + buildPath = QDir::currentPath(); +@@ -1164,6 +1179,9 @@ void Configure::parseCmdLine() + } else { + dictionary[ "QMAKEMAKEFILE" ] = "Makefile.win32-g++"; + } ++ } else if ( dictionary[ "QMAKESPEC" ] == QString( "linux-g++" ) ) { ++ if ( dictionary[ "MAKE" ].isEmpty() ) dictionary[ "MAKE" ] = "make"; ++ dictionary[ "QMAKEMAKEFILE" ] = "Makefile.unix"; + } else { + if ( dictionary[ "MAKE" ].isEmpty() ) dictionary[ "MAKE" ] = "make"; + dictionary[ "QMAKEMAKEFILE" ] = "Makefile.win32"; +@@ -2674,11 +2692,11 @@ void Configure::generateCachefile() + cacheStream << "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" << endl; + + //so that we can build without an install first (which would be impossible) +- cacheStream << "QMAKE_MOC = $$QT_BUILD_TREE" << fixSeparators("/bin/moc.exe") << endl; +- cacheStream << "QMAKE_UIC = $$QT_BUILD_TREE" << fixSeparators("/bin/uic.exe") << endl; +- cacheStream << "QMAKE_UIC3 = $$QT_BUILD_TREE" << fixSeparators("/bin/uic3.exe") << endl; +- cacheStream << "QMAKE_RCC = $$QT_BUILD_TREE" << fixSeparators("/bin/rcc.exe") << endl; +- cacheStream << "QMAKE_DUMPCPP = $$QT_BUILD_TREE" << fixSeparators("/bin/dumpcpp.exe") << endl; ++ cacheStream << "QMAKE_MOC = $$QT_BUILD_TREE" << fixSeparators("/bin/moc" EXE_EXT) << endl; ++ cacheStream << "QMAKE_UIC = $$QT_BUILD_TREE" << fixSeparators("/bin/uic" EXE_EXT) << endl; ++ cacheStream << "QMAKE_UIC3 = $$QT_BUILD_TREE" << fixSeparators("/bin/uic3" EXE_EXT) << endl; ++ cacheStream << "QMAKE_RCC = $$QT_BUILD_TREE" << fixSeparators("/bin/rcc" EXE_EXT) << endl; ++ cacheStream << "QMAKE_DUMPCPP = $$QT_BUILD_TREE" << fixSeparators("/bin/dumpcpp" EXE_EXT) << endl; + cacheStream << "QMAKE_INCDIR_QT = $$QT_BUILD_TREE" << fixSeparators("/include") << endl; + cacheStream << "QMAKE_LIBDIR_QT = $$QT_BUILD_TREE" << fixSeparators("/lib") << endl; + if (dictionary["CETEST"] == "yes") { +@@ -3000,7 +3018,9 @@ void Configure::generateConfigfiles() + tmpFile.flush(); + + // Replace old qconfig.h with new one ++#ifdef Q_OS_WIN32 + ::SetFileAttributes((wchar_t*)outName.utf16(), FILE_ATTRIBUTE_NORMAL); ++#endif + QFile::remove(outName); + tmpFile.copy(outName); + tmpFile.close(); +@@ -3036,7 +3056,9 @@ void Configure::generateConfigfiles() + } + + outName = defSpec + "/qmake.conf"; ++#ifdef Q_OS_WIN32 + ::SetFileAttributes((wchar_t*)outName.utf16(), FILE_ATTRIBUTE_NORMAL ); ++#endif + QFile qmakeConfFile(outName); + if (qmakeConfFile.open(QFile::Append | QFile::WriteOnly | QFile::Text)) { + QTextStream qmakeConfStream; +@@ -3108,7 +3130,9 @@ void Configure::generateConfigfiles() + tmpFile2.flush(); + + // Replace old qconfig.cpp with new one ++#ifdef Q_OS_WIN32 + ::SetFileAttributes((wchar_t*)outName.utf16(), FILE_ATTRIBUTE_NORMAL ); ++#endif + QFile::remove( outName ); + tmpFile2.copy(outName); + tmpFile2.close(); +@@ -3124,7 +3148,9 @@ void Configure::generateConfigfiles() + tmpFile3.flush(); + + outName = buildPath + "/src/corelib/global/qconfig_eval.cpp"; ++#ifdef Q_OS_WIN32 + ::SetFileAttributes((wchar_t*)outName.utf16(), FILE_ATTRIBUTE_NORMAL ); ++#endif + QFile::remove( outName ); + + if (dictionary["EDITION"] == "Evaluation" || qmakeDefines.contains("QT_EVAL")) +@@ -3313,6 +3339,7 @@ void Configure::displayConfig() + #if !defined(EVAL) + void Configure::generateHeaders() + { ++#ifdef Q_OS_WIN32 + if (dictionary["SYNCQT"] == "yes" + && findFile("perl.exe")) { + cout << "Running syncqt..." << endl; +@@ -3323,6 +3350,18 @@ void Configure::generateHeaders() + env += QString("PATH=" + buildPath + "/bin/;" + qgetenv("PATH")); + Environment::execute(args, env, QStringList()); + } ++#else ++ if (dictionary["SYNCQT"] == "yes" ++ && findFile("perl")) { ++ cout << "Running syncqt..." << endl; ++ QStringList args; ++ args += "perl"; ++ args += buildPath + "/bin/syncqt"; ++ QStringList env; ++ env += QString("QTDIR=" + sourcePath); ++ Environment::execute(args, env, QStringList()); ++ } ++#endif + } + + void Configure::buildQmake() +@@ -3339,6 +3378,7 @@ void Configure::buildQmake() + QFile out(makefile); + if(out.open(QFile::WriteOnly | QFile::Text)) { + QTextStream stream(&out); ++#ifdef Q_OS_WIN32 + stream << "#AutoGenerated by configure.exe" << endl + << "BUILD_PATH = " << QDir::convertSeparators(buildPath) << endl + << "SOURCE_PATH = " << QDir::convertSeparators(sourcePath) << endl; +@@ -3347,12 +3387,32 @@ void Configure::buildQmake() + if (dictionary["EDITION"] == "OpenSource" || + dictionary["QT_EDITION"].contains("OPENSOURCE")) + stream << "QMAKE_OPENSOURCE_EDITION = yes" << endl; ++#else ++ stream << "#AutoGenerated by configure" << endl ++ << "CC = gcc" << endl ++ << "CXX = g++" << endl ++ << "QMAKE_CFLAGS = -pipe" << endl ++ << "QMAKE_CXXFLAGS = $(QMAKE_CFLAGS)" << endl ++ << "QMAKE_LFLAGS =" << endl; ++#endif + stream << "\n\n"; + + QFile in(sourcePath + "/qmake/" + dictionary["QMAKEMAKEFILE"]); + if(in.open(QFile::ReadOnly | QFile::Text)) { + QString d = in.readAll(); +- //### need replaces (like configure.sh)? --Sam ++#ifndef Q_OS_WIN32 ++ d.replace(QRegExp("@SOURCE_PATH@"), QDir::convertSeparators(sourcePath)); ++ d.replace(QRegExp("@BUILD_PATH@"), QDir::convertSeparators(buildPath)); ++ d.replace(QRegExp("@QMAKESPEC@"), fixSeparators(sourcePath + "/mkspecs/" + dictionary["QMAKESPEC"])); ++ d.replace(QRegExp("@QMAKE_QTOBJS@"), ""); ++ d.replace(QRegExp("@QMAKE_QTSRCS@"), ""); ++ d.replace(QRegExp("@QMAKE_LFLAGS@"), "$(QMAKE_LFLAGS)"); ++ QString qmake_cxxflags("$(QMAKE_CXXFLAGS)"); ++ if (dictionary["EDITION"] == "OpenSource" || ++ dictionary["QT_EDITION"].contains("OPENSOURCE")) ++ qmake_cxxflags += " -DQMAKE_OPENSOURCE_EDITION"; ++ d.replace(QRegExp("@QMAKE_CXXFLAGS@"), qmake_cxxflags); ++#endif + stream << d << endl; + } + stream.flush(); +@@ -3729,12 +3789,14 @@ bool Configure::showLicense(QString orgLicenseFile) + } + // Get console line height, to fill the screen properly + int i = 0, screenHeight = 25; // default ++#ifdef Q_OS_WIN32 + CONSOLE_SCREEN_BUFFER_INFO consoleInfo; + HANDLE stdOut = GetStdHandle(STD_OUTPUT_HANDLE); + if (GetConsoleScreenBufferInfo(stdOut, &consoleInfo)) + screenHeight = consoleInfo.srWindow.Bottom + - consoleInfo.srWindow.Top + - 1; // Some overlap for context ++#endif + + // Prompt the license content to the user + QFile file(licenseFile); +diff --git a/tools/configure/environment.cpp b/tools/configure/environment.cpp +index 8dabcf5..c350445 100644 +--- a/tools/configure/environment.cpp ++++ b/tools/configure/environment.cpp +@@ -41,7 +41,12 @@ + + #include "environment.h" + ++#ifdef Q_OS_WIN32 + #include ++#else ++#include ++#include ++#endif + #include + #include + #include +@@ -137,11 +142,9 @@ QString Environment::keyName(const QString &rKey) + If the registry key does not exist, or cannot be accessed, a + QString() is returned. + */ ++#ifdef Q_OS_WIN32 + QString Environment::readRegistryKey(HKEY parentHandle, const QString &rSubkey) + { +-#ifndef Q_OS_WIN32 +- return QString(); +-#else + QString rSubkeyName = keyName(rSubkey); + QString rSubkeyPath = keyPath(rSubkey); + +@@ -213,8 +216,8 @@ QString Environment::readRegistryKey(HKEY parentHandle, const QString &rSubkey) + + RegCloseKey(handle); + return result; +-#endif + } ++#endif + + /*! + Returns the qmakespec for the compiler detected on the system. +@@ -266,7 +269,7 @@ QString Environment::detectQMakeSpec() + Compiler Environment::detectCompiler() + { + #ifndef Q_OS_WIN32 +- return MSVC6; // Always generate MSVC 6.0 versions on other platforms ++ return CC_MSVC6; // Always generate MSVC 6.0 versions on other platforms + #else + if(detectedCompiler != CC_UNKNOWN) + return detectedCompiler; +@@ -317,6 +320,9 @@ Compiler Environment::detectCompiler() + */ + bool Environment::detectExecutable(const QString &executable) + { ++#ifndef Q_OS_WIN32 ++ return true; ++#else + PROCESS_INFORMATION procInfo; + memset(&procInfo, 0, sizeof(procInfo)); + +@@ -335,6 +341,7 @@ bool Environment::detectExecutable(const QString &executable) + CloseHandle(procInfo.hProcess); + } + return couldExecute; ++#endif + } + + /*! +@@ -437,19 +444,30 @@ int Environment::execute(QStringList arguments, const QStringList &additionalEnv + // the additionalEnv strings, then remove all variables defined + // in removeEnv + QMap fullEnvMap; ++#ifdef Q_OS_WIN32 + LPWSTR envStrings = GetEnvironmentStrings(); ++#else ++ char **envStrings = environ; ++#endif + if (envStrings) { ++#ifdef Q_OS_WIN32 + int strLen = 0; + for (LPWSTR envString = envStrings; *(envString); envString += strLen + 1) { + strLen = wcslen(envString); + QString str = QString((const QChar*)envString, strLen); ++#else ++ for (int i = 0; envStrings[i]; ++i) { ++ QString str = QString(envStrings[i]); ++#endif + if (!str.startsWith("=")) { // These are added by the system + int sepIndex = str.indexOf('='); + fullEnvMap.insert(str.left(sepIndex).toUpper(), str.mid(sepIndex +1)); + } + } + } ++#ifdef Q_OS_WIN32 + FreeEnvironmentStrings(envStrings); ++#endif + + // Add additionalEnv variables + for (int i = 0; i < additionalEnv.count(); ++i) { +@@ -470,6 +488,7 @@ int Environment::execute(QStringList arguments, const QStringList &additionalEnv + fullEnv += QString(it.key() + "=" + it.value()); + } + ++#ifdef Q_OS_WIN32 + // ---------------------------- + QString program = arguments.takeAt(0); + QString args = qt_create_commandline(program, arguments); +@@ -520,6 +539,43 @@ int Environment::execute(QStringList arguments, const QStringList &additionalEnv + } + } + return exitCode; ++#else ++ QList ba_list; ++ int i; ++ char **argv = (char **)malloc((arguments.count() + 1) * sizeof(char **)); ++ if (argv == NULL) ++ return -1; ++ for (i = 0; i < arguments.count(); ++i) { ++ ba_list += arguments.at(i).toLocal8Bit(); ++ argv[i] = ba_list.last().data(); ++ } ++ argv[i] = NULL; ++ ++ int exitCode = -1; ++ pid_t pid = fork(); ++ if (pid == 0) { ++ clearenv(); ++ for (i = 0; i < fullEnv.count(); ++i) { ++ ba_list += fullEnv.at(i).toLocal8Bit(); ++ putenv(ba_list.last().data()); ++ } ++ exitCode = execvp(argv[0], argv); ++ cerr << "execute: execve: " << argv[0] << ": " << strerror(errno) << endl; ++ } else if (pid != -1) { ++ int status; ++ if (wait(&status) == pid) { ++ if (WIFEXITED(status)) { ++ exitCode = WEXITSTATUS(status); ++ if (exitCode) ++ cerr << "execute: " << argv[0] << " exited with code " << exitCode << endl; ++ } else if (WIFSIGNALED(signal)) { ++ cerr << "execute: " << argv[0] << " was killed by signal " << WTERMSIG(status) << endl; ++ } ++ } ++ } ++ free(argv); ++ return exitCode; ++#endif + } + + bool Environment::cpdir(const QString &srcDir, const QString &destDir) +@@ -550,7 +606,9 @@ bool Environment::cpdir(const QString &srcDir, const QString &destDir) + #endif + QFile::remove(destFile); + intermediate = QFile::copy(entry.absoluteFilePath(), destFile); ++#ifdef Q_OS_WIN32 + SetFileAttributes((wchar_t*)destFile.utf16(), FILE_ATTRIBUTE_NORMAL); ++#endif + } + if(!intermediate) { + qDebug() << "cpdir: Failure for " << entry.fileName() << entry.isDir(); +diff --git a/tools/configure/environment.h b/tools/configure/environment.h +index 83c2634..9548e9d 100644 +--- a/tools/configure/environment.h ++++ b/tools/configure/environment.h +@@ -40,7 +40,9 @@ + ****************************************************************************/ + + #include ++#ifdef Q_OS_WIN32 + #include ++#endif + + QT_BEGIN_NAMESPACE + +@@ -77,7 +79,9 @@ private: + static CompilerInfo *compilerInfo(Compiler compiler); + static QString keyPath(const QString &rKey); + static QString keyName(const QString &rKey); ++#ifdef Q_OS_WIN32 + static QString readRegistryKey(HKEY parentHandle, const QString &rSubkey); ++#endif + }; + + +diff --git a/tools/configure/tools.cpp b/tools/configure/tools.cpp +index c958dd9..2044544 100644 +--- a/tools/configure/tools.cpp ++++ b/tools/configure/tools.cpp +@@ -48,8 +48,12 @@ + + // std stuff ------------------------------------ + #include ++#ifdef Q_OS_WIN32 + #include + #include ++#else ++#include ++#endif + #define NUMBER_OF_PARTS 7 + + std::ostream &operator<<(std::ostream &s, const QString &val); // defined in configureapp.cpp +@@ -201,8 +205,13 @@ void Tools::checkLicense(QMap &dictionary, QMap +Date: Sun, 6 Sep 2009 19:49:33 -0400 +Subject: [PATCH] Add autogen.sh to generate a configure.bin for Linux. + +--- + autogen.sh | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 files changed, 76 insertions(+), 0 deletions(-) + create mode 100755 autogen.sh + +diff --git a/autogen.sh b/autogen.sh +new file mode 100755 +index 0000000..7199658 +--- /dev/null ++++ b/autogen.sh +@@ -0,0 +1,76 @@ ++#!/bin/bash ++set -e ++ ++QT_S60_DIR=$PWD ++tmp=`mktemp -d` ++trap "echo Removing temporary files...; cd /tmp && rm -rf $tmp" EXIT ++ ++cd $tmp ++mkdir -p tools bin src/corelib/global ++ ++# Create missing headers ++QTDIR=$QT_S60_DIR perl $QT_S60_DIR/bin/syncqt -outdir $PWD ++ ++# Create placeholders for qconfig.h/qconfig.cpp ++echo '/* All features enabled while building qmake */' > src/corelib/global/qconfig.h ++TODAY=`date +%Y-%m-%d` ++cat > src/corelib/global/qconfig.cpp << EOF ++static const char qt_configure_licensee_str [256 + 12] = "qt_lcnsuser=Open Source"; ++static const char qt_configure_licensed_products_str [256 + 12] = "qt_lcnsprod=OpenSource"; ++static const char qt_configure_installation [12+11] = "qt_instdate=$TODAY"; ++static const char qt_configure_prefix_path_str [256 + 12] = "qt_prfxpath=$PWD"; ++static const char qt_configure_documentation_path_str[256 + 12] = "qt_docspath=$PWD/doc"; ++static const char qt_configure_headers_path_str [256 + 12] = "qt_hdrspath=$PWD/include"; ++static const char qt_configure_libraries_path_str [256 + 12] = "qt_libspath=$PWD/lib"; ++static const char qt_configure_binaries_path_str [256 + 12] = "qt_binspath=$PWD/bin"; ++static const char qt_configure_plugins_path_str [256 + 12] = "qt_plugpath=$PWD/plugins"; ++static const char qt_configure_data_path_str [256 + 12] = "qt_datapath=$PWD"; ++static const char qt_configure_translations_path_str [256 + 12] = "qt_trnspath=$PWD/translations"; ++static const char qt_configure_examples_path_str [256 + 12] = "qt_xmplpath=$PWD/example"; ++static const char qt_configure_demos_path_str [256 + 12] = "qt_demopath=$PWD/demos"; ++#define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12; ++#define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12; ++#define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12; ++#define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12; ++#define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12; ++#define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12; ++#define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12; ++#define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12; ++#define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12; ++#define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12; ++#define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12; ++#define QT_CONFIGURE_DEMOS_PATH qt_configure_demos_path_str + 12; ++EOF ++ ++# FIXME: find out why "make" is not looking for qmake source files in the ++# source tree. For now, simply copy the sources ++cp -a $QT_S60_DIR/qmake qmake ++ ++cat > qmake/Makefile << "EOF" ++CC = gcc ++CXX = g++ ++QMAKE_CFLAGS = -pipe ++QMAKE_CXXFLAGS = $(QMAKE_CFLAGS) ++QMAKE_LFLAGS = ++EOF ++sed -e "s,@SOURCE_PATH@,$QT_S60_DIR,g" \ ++ -e "s,@BUILD_PATH@,$PWD,g" \ ++ -e "s,@QMAKE_QTOBJS@,,g" \ ++ -e "s,@QMAKE_QTSRCS@,,g" \ ++ -e "s,@QMAKESPEC@,$QT_S60_DIR/mkspecs/linux-g++,g" \ ++ -e "s,@QMAKE_LFLAGS@,\$(QMAKE_LFLAGS),g" \ ++ -e "s,@QMAKE_CXXFLAGS@, \$(QMAKE_CXXFLAGS) -DQMAKE_OPENSOURCE_EDITION,g" \ ++ $QT_S60_DIR/qmake/Makefile.unix >> qmake/Makefile ++ ++make -C qmake ++ ++cp -a $QT_S60_DIR/tools/configure tools ++sed -i -e "1i\\QT_SOURCE_TREE = $QT_S60_DIR" \ ++ -e '1i\QT_BUILD_TREE = ../..' \ ++ tools/configure/configure.pro ++ ++(cd tools/configure && ++QMAKESPEC=$QT_S60_DIR/mkspecs/linux-g++ $tmp/bin/qmake) ++ ++make -C tools/configure ++cp configure $QT_S60_DIR/configure.bin +-- +1.5.6.3 + diff -Naur gnupoc-package-1.13.orig/tools/install_eka2_tools gnupoc-package-1.13/tools/install_eka2_tools --- gnupoc-package-1.13.orig/tools/install_eka2_tools 2008-11-27 12:08:21.000000000 -0500 +++ gnupoc-package-1.13/tools/install_eka2_tools 2009-11-17 12:38:44.000000000 -0500 @@ -32,7 +32,6 @@ cd rcomp-7.0.1 && $MAKE && cp src/rcomp $DEST/bin cd makesis-4 && $MAKE && cp src/makesis src/signsis src/makekeys $DEST/bin cd make-3.81 && ./configure && $MAKE && cp make $DEST/bin/extmake -cd elf2e32 && $MAKE -f Makefile.local-libelf libelf.a elf2e32 && cp elf2e32 $DEST/bin g++ mifconv.cpp -o $DEST/bin/mifconv ln -sf $TRUE $DEST/bin/rem cp del $DEST/bin diff -Naur gnupoc-package-1.13.orig/tools/make-3.81/job.c gnupoc-package-1.13/tools/make-3.81/job.c --- gnupoc-package-1.13.orig/tools/make-3.81/job.c 2007-08-12 06:55:42.000000000 -0400 +++ gnupoc-package-1.13/tools/make-3.81/job.c 2009-11-17 12:38:44.000000000 -0500 @@ -2499,7 +2499,7 @@ if (ap == new_argv[i]) p = next_token (p + 1) - 1; } - else + else if (p[1] != '\0') { #ifdef HAVE_DOS_PATHS /* Only remove backslashes before characters special to Unixy @@ -2527,7 +2527,7 @@ #endif /* HAVE_DOS_PATHS */ /* Copy and skip the following char. */ - *ap++ = *p; + *ap++ = *++p; } break;