diff options
author | Marius Storm-Olsen <marius.storm-olsen@nokia.com> | 2011-02-16 13:15:48 -0600 |
---|---|---|
committer | Marius Storm-Olsen <marius.storm-olsen@nokia.com> | 2011-02-16 13:53:25 -0600 |
commit | b3a1bcc0cddb35c6bdadd87116a72ae6cdadae69 (patch) | |
tree | 4af85a7dbf24ace03ce3d58488642f9dce1fbfcd /patches/0013-Add-module-specific-pris-and-make-syncqt-create-fwd-.patch | |
parent | 2bd42b36013ab6003dd59ae88bd83a4345b38dd7 (diff) |
Renumber the patch series, to make branch tracking easier
Holes in the patch numbers makes it much more tedious to
track 4.7 & master, since you cannot simply use the outcome
of 'git format-patch' anymore.
Diffstat (limited to 'patches/0013-Add-module-specific-pris-and-make-syncqt-create-fwd-.patch')
-rw-r--r-- | patches/0013-Add-module-specific-pris-and-make-syncqt-create-fwd-.patch | 429 |
1 files changed, 429 insertions, 0 deletions
diff --git a/patches/0013-Add-module-specific-pris-and-make-syncqt-create-fwd-.patch b/patches/0013-Add-module-specific-pris-and-make-syncqt-create-fwd-.patch new file mode 100644 index 0000000..d105e91 --- /dev/null +++ b/patches/0013-Add-module-specific-pris-and-make-syncqt-create-fwd-.patch @@ -0,0 +1,429 @@ +From e2a8fde6428f6f1cafe5cd3509f3b723fee468b0 Mon Sep 17 00:00:00 2001 +From: Marius Storm-Olsen <marius.storm-olsen@nokia.com> +Date: Wed, 24 Nov 2010 20:21:06 -0600 +Subject: [PATCH] Add module specific pris, and make syncqt create fwd includes + +The module specific pris define the modules + name + version + dependencies + include paths + lib paths + additional CONFIGs and DEFINES +They are located in the modules source directory, with fwd +includes created in QtKernel/mkspecs/modules build directory. +The pris use + QT_MODULE_INCLUDE_BASE + QT_MODULE_LIB_BASE +to specify the locations for includes and libs. These paths +are normally based on + QT_INSTALL_HEADERS + QT_INSTALL_LIBS +for installed modules, but overridden to the module's build +directory by syncqt for the fwd included pris. +The path of the pris must be specified in the sync.profile +for syncqt to create the fwding pris in QtKernel. +--- + qtkernel/bin/syncqt | 59 ++++++++++++++++++++++++++++-- + qtkernel/mkspecs/features/qt_config.prf | 9 ++++- + qtkernel/src/modules/qt_core.pri | 11 ++++++ + qtkernel/src/modules/qt_dbus.pri | 12 ++++++ + qtkernel/src/modules/qt_gui.pri | 11 ++++++ + qtkernel/src/modules/qt_network.pri | 11 ++++++ + qtkernel/src/modules/qt_opengl.pri | 12 ++++++ + qtkernel/src/modules/qt_openvg.pri | 12 ++++++ + qtkernel/src/modules/qt_sql.pri | 11 ++++++ + qtkernel/src/modules/qt_svg.pri | 11 ++++++ + qtkernel/src/modules/qt_testlib.pri | 12 ++++++ + qtkernel/src/modules/qt_xml.pri | 11 ++++++ + qtkernel/sync.profile | 13 +++++++ + qtxmlpatterns/modules/qt_xmlpatterns.pri | 11 ++++++ + qtxmlpatterns/sync.profile | 3 ++ + 15 files changed, 205 insertions(+), 4 deletions(-) + create mode 100644 qtkernel/src/modules/qt_core.pri + create mode 100644 qtkernel/src/modules/qt_dbus.pri + create mode 100644 qtkernel/src/modules/qt_gui.pri + create mode 100644 qtkernel/src/modules/qt_network.pri + create mode 100644 qtkernel/src/modules/qt_opengl.pri + create mode 100644 qtkernel/src/modules/qt_openvg.pri + create mode 100644 qtkernel/src/modules/qt_sql.pri + create mode 100644 qtkernel/src/modules/qt_svg.pri + create mode 100644 qtkernel/src/modules/qt_testlib.pri + create mode 100644 qtkernel/src/modules/qt_xml.pri + create mode 100644 qtxmlpatterns/modules/qt_xmlpatterns.pri + +diff --git a/qtkernel/bin/syncqt b/qtkernel/bin/syncqt +index e9bb124..fa0fbd3 100755 +--- a/qtkernel/bin/syncqt ++++ b/qtkernel/bin/syncqt +@@ -21,8 +21,16 @@ our $out_basedir = getcwd(); + $out_basedir =~ s=\\=/=g; + our $basedir; + ++# try to figure out where QtKernel is located ++# normally the script location should be enough, if not fall back to ++# QTDIR environment variable. If that doesn't work, later ask the ++# user to use the -qtdir option explicitly. ++my $qtkerneldir = dirname(dirname($0)); ++$qtkerneldir = $ENV{"QTDIR"} if ($qtkerneldir !~ /qtkernel/); ++$qtkerneldir =~ s=\\=/=g if (defined $qtkerneldir); ++ + # will be defined based on the modules sync.profile +-our (%modules, %moduleheaders, %classnames, %mastercontent); ++our (%modules, %moduleheaders, %classnames, %mastercontent, %modulepris); + + # global variables (modified by options) + my $isunix = 0; +@@ -36,6 +44,7 @@ my $check_includes = 0; + my $copy_headers = 0; + my $create_uic_class_map = 1; + my $create_private_headers = 1; ++my $no_module_fwd = 0; + my @modules_to_sync ; + $force_relative = 1 if ( -d "/System/Library/Frameworks" ); + +@@ -60,9 +69,12 @@ sub showUsage + print " -windows Force platform to Windows (default: " . ($force_win ? "yes" : "no") . ")\n"; + print " -showonly Show action but not perform (default: " . ($showonly ? "yes" : "no") . ")\n"; + print " -outdir <PATH> Specify output directory for sync (default: $out_basedir)\n"; ++ print " -qtdir <PATH> Set the path to QtKernel (detected: " . (defined $qtkerneldir ? $qtkerneldir : "-none-") . ")\n"; + print " -quiet Only report problems, not activity (default: " . ($quiet ? "yes" : "no") . ")\n"; +- print " -separate-module <NAME>:<PROFILEDIR>:<HEADERDIR> Create headers for <NAME> with original headers in <HEADERDIR> relative to <PROFILEDIR> \n"; ++ print " -separate-module <NAME>:<PROFILEDIR>:<HEADERDIR>\n"; ++ print " Create headers for <NAME> with original headers in <HEADERDIR> relative to <PROFILEDIR> \n"; + print " -private Force copy private headers (default: " . ($create_private_headers ? "yes" : "no") . ")\n"; ++ print " -no-module-fwd Don't create fwd includes for module pri files\n"; + print " -help This help\n"; + exit 0; + } +@@ -556,7 +568,7 @@ while ( @ARGV ) { + + #parse + my $arg = shift @ARGV; +- if ($arg eq "-h" || $arg eq "-help" || $arg eq "?") { ++ if ($arg eq "-h" || $arg eq "-help" || $arg eq "-?" || $arg eq "?") { + $var = "show_help"; + $val = "yes"; + } elsif($arg eq "-copy") { +@@ -591,10 +603,16 @@ while ( @ARGV ) { + } elsif($arg eq "-private") { + $var = "create_private_headers"; + $val = "yes"; ++ } elsif($arg eq "-qtdir") { ++ $var = "qtdir"; ++ $val = shift @ARGV; + } elsif($arg eq "-base-dir") { + # skip, it's been dealt with at the top of the file + shift @ARGV; + next; ++ } elsif($arg eq "-no-module-fwd") { ++ $var = "no_module_fwd"; ++ $val = "yes"; + } elsif($arg =~/^-/) { + print "Unknown option: $arg\n\n" if(!$var); + showUsage(); +@@ -662,6 +680,15 @@ while ( @ARGV ) { + push @modules_to_sync, $module; + $moduleheaders{$module} = $headerdir; + $create_uic_class_map = 0; ++ } elsif ($var eq "qtdir") { ++ if($val) { ++ $qtkerneldir = $val; ++ $qtkerneldir =~ s=\\=/=g; ++ } else { ++ die "The -qtdir option requires an argument"; ++ } ++ } elsif ($var eq "no_module_fwd") { ++ $no_module_fwd = 1; + } elsif ($var eq "output") { + my $outdir = $val; + if(checkRelative($outdir)) { +@@ -676,6 +703,15 @@ while ( @ARGV ) { + } + } + ++# if the $qtkerneldir neither has 'qtkernel' somewhere in its path, nor a ++# '.qmake.cache' file in its directory, we assume it's not a valid path ++# (remember that a yet-to-be-built qtkernel doesn't have this file either, ++# thus the 'qtkernel' path check!) ++die "Cannot automatically detect/use provided path to QtKernel's build directory!\n" . ++ "QTDIR detected/provided: " . (defined $qtkerneldir ? $qtkerneldir : "-none-") . "\n" . ++ "Please -qtdir option to provide the correct path.\nsyncqt failed" ++ if (!defined $qtkerneldir || (!-e "$qtkerneldir/.qmake.cache" && $qtkerneldir !~ /qtkernel/)); ++ + # if we have no $basedir we cannot be sure which sources you want, so die + die "Could not find any sync.profile for your module!\nPass <module directory> to syncqt to sync your header files.\nsyncqt failed" if (!$basedir); + +@@ -960,6 +996,23 @@ foreach my $lib (@modules_to_sync) { + print HEADERS_PRI_FILE $headers_pri_contents; + close HEADERS_PRI_FILE; + } ++ ++ # create forwarding module pri in qtkernel/mkspecs/modules ++ unless ($no_module_fwd) { ++ my $modulepri = $modulepris{$lib}; ++ if (-e $modulepri) { ++ my $modulepriname = basename($modulepri); ++ my $moduleprifwd = "$qtkerneldir/mkspecs/modules/$modulepriname"; ++ open MODULE_PRI_FILE, ">$moduleprifwd"; ++ print MODULE_PRI_FILE "QT_MODULE_INCLUDE_BASE = $out_basedir/include\n"; ++ print MODULE_PRI_FILE "QT_MODULE_LIB_BASE = $out_basedir/lib\n"; ++ print MODULE_PRI_FILE "include($modulepri)\n"; ++ close MODULE_PRI_FILE; ++ utime(time, (stat($modulepri))[9], $moduleprifwd); ++ } elsif ($modulepri) { ++ print "WARNING: Module $lib\'s pri file '$modulepri' not found.\nSkipped creating forwarding pri for $lib.\n"; ++ } ++ } + } + } + unless($showonly || !$create_uic_class_map) { +diff --git a/qtkernel/mkspecs/features/qt_config.prf b/qtkernel/mkspecs/features/qt_config.prf +index 19e01a1..0da44e9 100644 +--- a/qtkernel/mkspecs/features/qt_config.prf ++++ b/qtkernel/mkspecs/features/qt_config.prf +@@ -11,7 +11,14 @@ isEmpty(QMAKE_QT_CONFIG)|!exists($$QMAKE_QT_CONFIG) { + debug(1, "Cannot load qconfig.pri!") + } else { + debug(1, "Loaded .qconfig.pri from ($$QMAKE_QT_CONFIG)") +- for(mod, $$list($$files($$dirname(QMAKE_QT_CONFIG)/modules/qt_*.pri))):include($$mod) ++ for(mod, $$list($$files($$dirname(QMAKE_QT_CONFIG)/modules/qt_*.pri))) { ++ # For installed Qt these paths will be common for all modules ++ # For development these will vary per module, and syncqt will override the value in the ++ # qt_<module>.pri forwarding file ++ QT_MODULE_INCLUDE_BASE = $$[QT_INSTALL_HEADERS] ++ QT_MODULE_LIB_BASE = $$[QT_INSTALL_LIBS] ++ include($$mod) ++ } + } + + load(qt_functions) +diff --git a/qtkernel/src/modules/qt_core.pri b/qtkernel/src/modules/qt_core.pri +new file mode 100644 +index 0000000..742aefe +--- /dev/null ++++ b/qtkernel/src/modules/qt_core.pri +@@ -0,0 +1,11 @@ ++QT_CORE_VERSION = $$QT_VERSION ++QT_CORE_MAJOR_VERSION = $$QT_MAJOR_VERSION ++QT_CORE_MINOR_VERSION = $$QT_MINOR_VERSION ++QT_CORE_PATCH_VERSION = $$QT_PATCH_VERSION ++ ++QT.core.name = QtCore ++QT.core.includes = $$QT_MODULE_INCLUDE_BASE/QtCore ++QT.core.libs = $$QT_MODULE_LIB_BASE ++QT.core.depends = ++ ++QT_CONFIG += core +diff --git a/qtkernel/src/modules/qt_dbus.pri b/qtkernel/src/modules/qt_dbus.pri +new file mode 100644 +index 0000000..fddcbf7 +--- /dev/null ++++ b/qtkernel/src/modules/qt_dbus.pri +@@ -0,0 +1,12 @@ ++QT_DBUS_VERSION = $$QT_VERSION ++QT_DBUS_MAJOR_VERSION = $$QT_MAJOR_VERSION ++QT_DBUS_MINOR_VERSION = $$QT_MINOR_VERSION ++QT_DBUS_PATCH_VERSION = $$QT_PATCH_VERSION ++ ++QT.dbus.name = QtDBus ++QT.dbus.includes = $$QT_MODULE_INCLUDE_BASE/QtDBus ++QT.dbus.libs = $$QT_MODULE_LIB_BASE ++QT.dbus.depends = core xml ++QT.dbus.CONFIG = dbusadaptors dbusinterfaces ++ ++QT_CONFIG += dbus +diff --git a/qtkernel/src/modules/qt_gui.pri b/qtkernel/src/modules/qt_gui.pri +new file mode 100644 +index 0000000..6da7431 +--- /dev/null ++++ b/qtkernel/src/modules/qt_gui.pri +@@ -0,0 +1,11 @@ ++QT_GUI_VERSION = $$QT_VERSION ++QT_GUI_MAJOR_VERSION = $$QT_MAJOR_VERSION ++QT_GUI_MINOR_VERSION = $$QT_MINOR_VERSION ++QT_GUI_PATCH_VERSION = $$QT_PATCH_VERSION ++ ++QT.gui.name = QtGui ++QT.gui.includes = $$QT_MODULE_INCLUDE_BASE/QtGui ++QT.gui.libs = $$QT_MODULE_LIB_BASE ++QT.gui.depends = core network ++ ++QT_CONFIG += gui +diff --git a/qtkernel/src/modules/qt_network.pri b/qtkernel/src/modules/qt_network.pri +new file mode 100644 +index 0000000..4d32079 +--- /dev/null ++++ b/qtkernel/src/modules/qt_network.pri +@@ -0,0 +1,11 @@ ++QT_CORE_VERSION = $$QT_VERSION ++QT_NETWORK_MAJOR_VERSION = $$QT_MAJOR_VERSION ++QT_NETWORK_MINOR_VERSION = $$QT_MINOR_VERSION ++QT_NETWORK_PATCH_VERSION = $$QT_PATCH_VERSION ++ ++QT.network.name = QtNetwork ++QT.network.includes = $$QT_MODULE_INCLUDE_BASE/QtNetwork ++QT.network.libs = $$QT_MODULE_LIB_BASE ++QT.network.depends = core ++ ++QT_CONFIG += network +diff --git a/qtkernel/src/modules/qt_opengl.pri b/qtkernel/src/modules/qt_opengl.pri +new file mode 100644 +index 0000000..9ad1425 +--- /dev/null ++++ b/qtkernel/src/modules/qt_opengl.pri +@@ -0,0 +1,12 @@ ++QT_OPENGL_VERSION = $$QT_VERSION ++QT_OPENGL_MAJOR_VERSION = $$QT_MAJOR_VERSION ++QT_OPENGL_MINOR_VERSION = $$QT_MINOR_VERSION ++QT_OPENGL_PATCH_VERSION = $$QT_PATCH_VERSION ++ ++QT.opengl.name = QtOpenGL ++QT.opengl.includes = $$QT_MODULE_INCLUDE_BASE/QtOpenGL ++QT.opengl.libs = $$QT_MODULE_LIB_BASE ++QT.opengl.depends = core gui ++QT.opengl.CONFIG = opengl ++ ++QT_CONFIG += opengl +diff --git a/qtkernel/src/modules/qt_openvg.pri b/qtkernel/src/modules/qt_openvg.pri +new file mode 100644 +index 0000000..612bd13 +--- /dev/null ++++ b/qtkernel/src/modules/qt_openvg.pri +@@ -0,0 +1,12 @@ ++QT_OPENVG_VERSION = $$QT_VERSION ++QT_OPENVG_MAJOR_VERSION = $$QT_MAJOR_VERSION ++QT_OPENVG_MINOR_VERSION = $$QT_MINOR_VERSION ++QT_OPENVG_PATCH_VERSION = $$QT_PATCH_VERSION ++ ++QT.openvg.name = QtOpenVG ++QT.openvg.includes = $$QT_MODULE_INCLUDE_BASE/QtOpenVG ++QT.openvg.libs = $$QT_MODULE_LIB_BASE ++QT.openvg.depends = core gui ++QT.openvg.CONFIG = openvg ++ ++QT_CONFIG += openvg +diff --git a/qtkernel/src/modules/qt_sql.pri b/qtkernel/src/modules/qt_sql.pri +new file mode 100644 +index 0000000..bf5917b +--- /dev/null ++++ b/qtkernel/src/modules/qt_sql.pri +@@ -0,0 +1,11 @@ ++QT_SQL_VERSION = $$QT_VERSION ++QT_SQL_MAJOR_VERSION = $$QT_MAJOR_VERSION ++QT_SQL_MINOR_VERSION = $$QT_MINOR_VERSION ++QT_SQL_PATCH_VERSION = $$QT_PATCH_VERSION ++ ++QT.sql.name = QtSql ++QT.sql.includes = $$QT_MODULE_INCLUDE_BASE/QtSql ++QT.sql.libs = $$QT_MODULE_LIB_BASE ++QT.sql.depends = core ++ ++QT_CONFIG += sql +diff --git a/qtkernel/src/modules/qt_svg.pri b/qtkernel/src/modules/qt_svg.pri +new file mode 100644 +index 0000000..faccb78 +--- /dev/null ++++ b/qtkernel/src/modules/qt_svg.pri +@@ -0,0 +1,11 @@ ++QT_SVG_VERSION = $$QT_VERSION ++QT_SVG_MAJOR_VERSION = $$QT_MAJOR_VERSION ++QT_SVG_MINOR_VERSION = $$QT_MINOR_VERSION ++QT_SVG_PATCH_VERSION = $$QT_PATCH_VERSION ++ ++QT.svg.name = QtSvg ++QT.svg.includes = $$QT_MODULE_INCLUDE_BASE/QtSvg ++QT.svg.libs = $$QT_MODULE_LIB_BASE ++QT.svg.depends = core gui ++ ++QT_CONFIG += svg +diff --git a/qtkernel/src/modules/qt_testlib.pri b/qtkernel/src/modules/qt_testlib.pri +new file mode 100644 +index 0000000..0f65438 +--- /dev/null ++++ b/qtkernel/src/modules/qt_testlib.pri +@@ -0,0 +1,12 @@ ++QT_TEST_VERSION = $$QT_VERSION ++QT_TEST_MAJOR_VERSION = $$QT_MAJOR_VERSION ++QT_TEST_MINOR_VERSION = $$QT_MINOR_VERSION ++QT_TEST_PATCH_VERSION = $$QT_PATCH_VERSION ++ ++QT.testlib.name = QtTest ++QT.testlib.includes = $$QT_MODULE_INCLUDE_BASE/QtTest ++QT.testlib.libs = $$QT_MODULE_LIB_BASE ++QT.testlib.depends = core ++QT.testlib.CONFIG = console ++ ++QT_CONFIG += testlib +diff --git a/qtkernel/src/modules/qt_xml.pri b/qtkernel/src/modules/qt_xml.pri +new file mode 100644 +index 0000000..45dbc667 +--- /dev/null ++++ b/qtkernel/src/modules/qt_xml.pri +@@ -0,0 +1,11 @@ ++QT_XML_VERSION = $$QT_VERSION ++QT_XML_MAJOR_VERSION = $$QT_MAJOR_VERSION ++QT_XML_MINOR_VERSION = $$QT_MINOR_VERSION ++QT_XML_PATCH_VERSION = $$QT_PATCH_VERSION ++ ++QT.xml.name = QtXml ++QT.xml.includes = $$QT_MODULE_INCLUDE_BASE/QtXml ++QT.xml.libs = $$QT_MODULE_LIB_BASE ++QT.xml.depends = core ++ ++QT_CONFIG += xml +diff --git a/qtkernel/sync.profile b/qtkernel/sync.profile +index 7d2e4b1..c8ef4fc 100644 +--- a/qtkernel/sync.profile ++++ b/qtkernel/sync.profile +@@ -37,6 +37,19 @@ + "openvg" => "#include <QtOpenVG/QtOpenVG>\n", + "xml" => "#include <QtXml/QtXml>\n", + ); ++%modulepris = ( ++ "QtCore" => "$basedir/src/modules/qt_core.pri", ++ "QtDBus" => "$basedir/src/modules/qt_dbus.pri", ++ "QtGui" => "$basedir/src/modules/qt_gui.pri", ++ "QtNetwork" => "$basedir/src/modules/qt_network.pri", ++ "QtOpenGL" => "$basedir/src/modules/qt_opengl.pri", ++ "QtOpenVG" => "$basedir/src/modules/qt_openvg.pri", ++ "QtSql" => "$basedir/src/modules/qt_sql.pri", ++ "QtSvg" => "$basedir/src/modules/qt_svg.pri", ++ "QtTest" => "$basedir/src/modules/qt_testlib.pri", ++ "QtXml" => "$basedir/src/modules/qt_xml.pri", ++); ++ + @ignore_for_master_contents = ( "qt.h", "qpaintdevicedefs.h" ); + @ignore_for_include_check = ( "qatomic.h" ); + @ignore_for_qt_begin_header_check = ( "qiconset.h", "qconfig.h", "qconfig-dist.h", "qconfig-large.h", "qconfig-medium.h", "qconfig-minimal.h", "qconfig-small.h", "qfeatures.h", "qt_windows.h" ); +diff --git a/qtxmlpatterns/modules/qt_xmlpatterns.pri b/qtxmlpatterns/modules/qt_xmlpatterns.pri +new file mode 100644 +index 0000000..2237142 +--- /dev/null ++++ b/qtxmlpatterns/modules/qt_xmlpatterns.pri +@@ -0,0 +1,11 @@ ++QT_XMLPATTERNS_VERSION = $$QT_VERSION ++QT_XMLPATTERNS_MAJOR_VERSION = $$QT_MAJOR_VERSION ++QT_XMLPATTERNS_MINOR_VERSION = $$QT_MINOR_VERSION ++QT_XMLPATTERNS_PATCH_VERSION = $$QT_PATCH_VERSION ++ ++QT.xmlpatterns.name = QtXmlPatterns ++QT.xmlpatterns.includes = $$QT_MODULE_INCLUDE_BASE $$QT_MODULE_INCLUDE_BASE/QtXmlPatterns ++QT.xmlpatterns.libs = $$QT_MODULE_LIB_BASE ++QT.xmlpatterns.depends = core network ++ ++QT_CONFIG += xmlpatterns +diff --git a/qtxmlpatterns/sync.profile b/qtxmlpatterns/sync.profile +index 6707cea..9548e0f 100644 +--- a/qtxmlpatterns/sync.profile ++++ b/qtxmlpatterns/sync.profile +@@ -9,3 +9,6 @@ + "core" => "#include <QtCore/QtCore>\n", + "network" => "#include <QtNetwork/QtNetwork>\n", + ); ++%modulepris = ( ++ "QtXmlPatterns" => "$basedir/modules/qt_xmlpatterns.pri", ++); +-- +1.7.3.2.343.g7d43d + |