summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2010-02-26 15:11:57 (GMT)
committeraxis <qt-info@nokia.com>2010-02-26 15:17:34 (GMT)
commitec45c75f443f21d47fa47d1fc0396af02befa1c7 (patch)
treeb257d82a599eefeed5fe8454c09faca6899a72e6 /bin
parentf822fb20b806386509aa31c1aefd0004366a19d3 (diff)
downloadQt-ec45c75f443f21d47fa47d1fc0396af02befa1c7.zip
Qt-ec45c75f443f21d47fa47d1fc0396af02befa1c7.tar.gz
Qt-ec45c75f443f21d47fa47d1fc0396af02befa1c7.tar.bz2
Enabled patch_capabilities to work on Linux.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/patch_capabilities.pl11
1 files changed, 8 insertions, 3 deletions
diff --git a/bin/patch_capabilities.pl b/bin/patch_capabilities.pl
index f82c48f..bac7e64 100755
--- a/bin/patch_capabilities.pl
+++ b/bin/patch_capabilities.pl
@@ -73,11 +73,16 @@ if (@ARGV)
if (($pkgFileName =~ m|_template\.pkg$|i) && -r($pkgFileName))
{
my $targetplatform;
- unless ($targetplatform = shift(@ARGV))
+ my $templateFile;
+ my $templateContents;
+ open($templateFile, "< $pkgFileName") or die ("Could not open $pkgFileName");
+ $templateContents = <$templateFile>;
+ close($templateFile);
+ unless (($targetplatform = shift(@ARGV)) || $templateContents !~ /\$\(PLATFORM\)/)
{
Usage();
}
-
+ $targetplatform = "-" if (!$targetplatform);
my @tmpvalues = split('-', $targetplatform);
$target = $tmpvalues[0];
$platform = $tmpvalues[1];
@@ -174,7 +179,7 @@ if (@ARGV)
my $destinationPath = $2;
# If the given file is a binary, check the target and binary type (+ the actual filename) from its path.
- if ($sourcePath =~ m:/epoc32/release/([^/]+)/(udeb|urel|\$\(TARGET\))/(\w+(\.dll|\.exe)):i)
+ if ($sourcePath =~ m:\w+(\.dll|\.exe)$:i)
{
# Do preprocessing for template pkg,
# In case of template pkg target and platform variables are set