summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2010-01-28 12:06:48 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2010-01-28 13:04:54 (GMT)
commit08c1c9ef6f30706cd574eded656f4d65a1b18db5 (patch)
tree5a2dea17cfab716f955eee9adc8d69e3912c4e07 /bin
parent7060118fe35b358ce6739734d03a285708127b60 (diff)
downloadQt-08c1c9ef6f30706cd574eded656f4d65a1b18db5.zip
Qt-08c1c9ef6f30706cd574eded656f4d65a1b18db5.tar.gz
Qt-08c1c9ef6f30706cd574eded656f4d65a1b18db5.tar.bz2
Added support for ifdeffing for manufacturer in generated pkg files
DEPLOYMENT.manufacturers variable can be used to define manufacturer identifiers. DEPLOYMENT.manufacturers.fail_note variable can be used to define a file that contains the text to be shown in case of failed manufacturer check. Task-number: QTBUG-7695 Reviewed-by: Janne Koskinen
Diffstat (limited to 'bin')
-rwxr-xr-xbin/patch_capabilities.pl25
1 files changed, 24 insertions, 1 deletions
diff --git a/bin/patch_capabilities.pl b/bin/patch_capabilities.pl
index 9daa13e..8afe776 100755
--- a/bin/patch_capabilities.pl
+++ b/bin/patch_capabilities.pl
@@ -108,6 +108,8 @@ if (@ARGV)
open (NEW_PKG, ">>".$tempPkgFileName);
open (PKG, "<".$pkgFileName);
+ my $manufacturerElseBlock = 0;
+
# Parse each line.
while (<PKG>)
{
@@ -133,7 +135,28 @@ if (@ARGV)
# from depended packages that are also patched and therefore have different UID.
if ($line =~ m/^\(0x[0-9|a-f|A-F]*\).*\{.*\}$/)
{
- $newLine = ""
+ $newLine = "\n"
+ }
+
+ # Remove manufacturer ifdef
+ if ($line =~ m/^.*\(MANUFACTURER\)\=\(.*\).*$/)
+ {
+ $newLine = "\n";
+ }
+
+ if ($line =~ m/^ELSEIF.*MANUFACTURER$/)
+ {
+ $manufacturerElseBlock = 1;
+ }
+
+ if ($manufacturerElseBlock eq 1)
+ {
+ $newLine = "\n";
+ }
+
+ if ($line =~ m/^ENDIF.*MANUFACTURER$/)
+ {
+ $manufacturerElseBlock = 0;
}
print NEW_PKG $newLine;