From 58babdfa0e00fdb8cbc25ea0a129b0134b7ffe46 Mon Sep 17 00:00:00 2001 From: Lincoln Ramsay Date: Tue, 17 Mar 2009 16:42:42 +1000 Subject: [PATCH 5/5] Fix license handling for Qt 4.5.1. --- src/build/bin/configure | 24 ++++++++++-------- src/qtopiadesktop/build/bin/configure | 42 +++++++++++++++++--------------- 2 files changed, 35 insertions(+), 31 deletions(-) diff --git a/src/build/bin/configure b/src/build/bin/configure index 0a9c8e4..09f259c 100755 --- a/src/build/bin/configure +++ b/src/build/bin/configure @@ -141,18 +141,20 @@ my %licenseInfo = (); $licenseInfo{Product} = "Qt Extended"; checkLicenseKey(); -# Remove any license files left over -if ( !configopt("depot") ) { - for my $location ( $qt_depot_path ) { - for my $file ( glob("$location/LICENSE*"), glob("$location/.LICENSE*") ) { - unlink $file; - } - my $source = "$depotpath/".$licenseInfo{LicenseFile}; - my $dest = "$location/".$licenseInfo{DestLicenseFile}; - if ( -f $dest ) { - unlink $dest; +if ( $qtVersionStr[1] == 4 || ($qtVersionStr[1] == 5 && $qtVersionStr[2] == 0) ) { + # Remove any license files left over + if ( !configopt("depot") ) { + for my $location ( $qt_depot_path ) { + for my $file ( glob("$location/LICENSE*"), glob("$location/.LICENSE*") ) { + unlink $file; + } + my $source = "$depotpath/".$licenseInfo{LicenseFile}; + my $dest = "$location/".$licenseInfo{DestLicenseFile}; + if ( -f $dest ) { + unlink $dest; + } + copy("$depotpath/".$licenseInfo{LicenseFile}, "$location/".$licenseInfo{DestLicenseFile}); } - copy("$depotpath/".$licenseInfo{LicenseFile}, "$location/".$licenseInfo{DestLicenseFile}); } } diff --git a/src/qtopiadesktop/build/bin/configure b/src/qtopiadesktop/build/bin/configure index 4560b2a..b3ef943 100755 --- a/src/qtopiadesktop/build/bin/configure +++ b/src/qtopiadesktop/build/bin/configure @@ -134,26 +134,28 @@ my %licenseInfo = (); $licenseInfo{Product} = "Qt Extended Sync Agent"; checkLicenseKey(); -# Remove any license files left over -if ( !configopt("depot") ) { - for my $location ( $qt_depot_path ) { - for my $file ( glob("$location/LICENSE*"), glob("$location/.LICENSE*") ) { - unlink $file; - } - my $source = "$depotpath/".$licenseInfo{LicenseFile}; - my $dest = "$location/".$licenseInfo{DestLicenseFile}; - if ( -f $dest ) { - unlink $dest; - } - copy("$depotpath/".$licenseInfo{LicenseFile}, "$location/".$licenseInfo{DestLicenseFile}); - if ( $isWindows ) { - # configure.exe doesn't know about LICENSE.Qtopia, just put in all of the .LICENSE* files - copy("$depotpath/".$licenseInfo{LicenseFile}, "$location/.LICENSE"); - copy("$depotpath/".$licenseInfo{LicenseFile}, "$location/.LICENSE-US"); - copy("$depotpath/".$licenseInfo{LicenseFile}, "$location/.LICENSE-EVALUATION"); - copy("$depotpath/".$licenseInfo{LicenseFile}, "$location/.LICENSE-EVALUATION-US"); - copy("$depotpath/".$licenseInfo{LicenseFile}, "$location/.LICENSE-DESKTOP"); - copy("$depotpath/".$licenseInfo{LicenseFile}, "$location/.LICENSE-DESKTOP-US"); +if ( $qtVersionStr[1] == 4 || ($qtVersionStr[1] == 5 && $qtVersionStr[2] == 0) ) { + # Remove any license files left over + if ( !configopt("depot") ) { + for my $location ( $qt_depot_path ) { + for my $file ( glob("$location/LICENSE*"), glob("$location/.LICENSE*") ) { + unlink $file; + } + my $source = "$depotpath/".$licenseInfo{LicenseFile}; + my $dest = "$location/".$licenseInfo{DestLicenseFile}; + if ( -f $dest ) { + unlink $dest; + } + copy("$depotpath/".$licenseInfo{LicenseFile}, "$location/".$licenseInfo{DestLicenseFile}); + if ( $isWindows ) { + # configure.exe doesn't know about LICENSE.Qtopia, just put in all of the .LICENSE* files + copy("$depotpath/".$licenseInfo{LicenseFile}, "$location/.LICENSE"); + copy("$depotpath/".$licenseInfo{LicenseFile}, "$location/.LICENSE-US"); + copy("$depotpath/".$licenseInfo{LicenseFile}, "$location/.LICENSE-EVALUATION"); + copy("$depotpath/".$licenseInfo{LicenseFile}, "$location/.LICENSE-EVALUATION-US"); + copy("$depotpath/".$licenseInfo{LicenseFile}, "$location/.LICENSE-DESKTOP"); + copy("$depotpath/".$licenseInfo{LicenseFile}, "$location/.LICENSE-DESKTOP-US"); + } } } } -- 1.6.1