summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2010-02-26 16:11:57 +0100
committeraxis <qt-info@nokia.com>2010-02-26 16:17:34 +0100
commitec45c75f443f21d47fa47d1fc0396af02befa1c7 (patch)
treeb257d82a599eefeed5fe8454c09faca6899a72e6 /bin
parentf822fb20b806386509aa31c1aefd0004366a19d3 (diff)
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 f82c48f130..bac7e64f65 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