summaryrefslogtreecommitdiffstats
path: root/tools/configure
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>2014-09-30 10:34:00 +0200
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>2014-10-02 05:59:17 +0200
commit538248d930a7c62212a18f81c31d381752beff13 (patch)
tree1e7289412d777e014a3cb69ecbfd4858cff4e570 /tools/configure
parent08c523a9a86c8ad8202e938e9e740b5234b54331 (diff)
Android: Don't include Apache code under LGPLv2 license
The code which extracts style assets for the Android style is licensed under the Apache license, which is not compatible with LGPLv2.1. It is, however, compatible with LGPLv3. This means that the Android platform plugin cannot be LGPLv2.1 as long as this code is included. To minimize licensing confusion, we default to only providing LGPLv3 for Android. If you want to build a LGPLv2.1-compatible library, you can add -no-android-style-assets to the configuration. This will in turn enable the LGPLv2.1 in the configure output, and it will disable the extraction code in the platform plugin. Running the Android style with an LGPLv2.1-compatible platform plugin will work, but it will look horrible. [ChangeLog][Android] Default open-source license for Qt for Android is now LGPLv3. For compatibility with the LGPLv2.1 license, add "-no-android-style-assets" to your configuration. Change-Id: I6c7b52140f38138520871fa7c69debbb4ee90e6c Task-number: QTBUG-41365 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Christian Stromme <christian.stromme@digia.com>
Diffstat (limited to 'tools/configure')
-rw-r--r--tools/configure/configureapp.cpp23
1 files changed, 20 insertions, 3 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index be692f98c2..99ecc7b2de 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -1331,6 +1331,12 @@ void Configure::parseCmdLine()
dictionary[ "ANDROID_NDK_TOOLCHAIN_VERSION" ] = configCmdLine.at(i);
}
+ else if (configCmdLine.at(i) == "-no-android-style-assets") {
+ dictionary[ "ANDROID_STYLE_ASSETS" ] = "no";
+ } else if (configCmdLine.at(i) == "-android-style-assets") {
+ dictionary[ "ANDROID_STYLE_ASSETS" ] = "yes";
+ }
+
else {
dictionary[ "DONE" ] = "error";
cout << "Unknown option " << configCmdLine.at(i) << endl;
@@ -1693,6 +1699,7 @@ void Configure::applySpecSpecifics()
dictionary[ "REDUCE_RELOCATIONS" ] = "yes";
dictionary[ "QT_GETIFADDRS" ] = "no";
dictionary[ "QT_XKBCOMMON" ] = "no";
+ dictionary["ANDROID_STYLE_ASSETS"] = "yes";
}
}
@@ -3355,6 +3362,9 @@ void Configure::generateQConfigPri()
if (dictionary["DIRECTWRITE"] == "yes")
configStream << " directwrite";
+ if (dictionary["ANDROID_STYLE_ASSETS"] == "yes")
+ configStream << " android-style-assets";
+
// ### For compatibility only, should be removed later.
configStream << " qpa";
@@ -4219,11 +4229,17 @@ bool Configure::showLicense(QString orgLicenseFile)
return true;
}
+ bool showLgpl2 = true;
QString licenseFile = orgLicenseFile;
QString theLicense;
if (dictionary["EDITION"] == "OpenSource" || dictionary["EDITION"] == "Snapshot") {
- theLicense = "GNU Lesser General Public License (LGPL) version 2.1"
- "\nor the GNU Lesser General Public License (LGPL) version 3";
+ if (platform() != ANDROID || dictionary["ANDROID_STYLE_ASSETS"] == "no") {
+ theLicense = "GNU Lesser General Public License (LGPL) version 2.1"
+ "\nor the GNU Lesser General Public License (LGPL) version 3";
+ } else {
+ theLicense = "GNU Lesser General Public License (LGPL) version 3";
+ showLgpl2 = false;
+ }
} else {
// the first line of the license file tells us which license it is
QFile file(licenseFile);
@@ -4241,7 +4257,8 @@ bool Configure::showLicense(QString orgLicenseFile)
<< endl;
if (dictionary["EDITION"] == "OpenSource" || dictionary["EDITION"] == "Snapshot") {
cout << "Type '3' to view the Lesser GNU General Public License version 3 (LGPLv3)." << endl;
- cout << "Type 'L' to view the Lesser GNU General Public License version 2.1 (LGPLv2.1)." << endl;
+ if (showLgpl2)
+ cout << "Type 'L' to view the Lesser GNU General Public License version 2.1 (LGPLv2.1)." << endl;
} else {
cout << "Type '?' to view the " << theLicense << "." << endl;
}