Qt source tree prep for Desktop Kit creation
This commit is contained in:
		@@ -19,6 +19,7 @@ set (ubuntu_sdk_VERSION_MINOR 5)
 | 
			
		||||
 | 
			
		||||
set (QT_VERSION      "qt-everywhere-opensource-src-5.4.2")
 | 
			
		||||
set (QT_SOURCE_DIR   "${CMAKE_BINARY_DIR}/qt-build/qt-everywhere-opensource-src-5.4.2")
 | 
			
		||||
set (QT_KIT_SOURCE_DIR   "${CMAKE_BINARY_DIR}/qt-build/qt-everywhere-opensource-src-ubuntu")
 | 
			
		||||
set (QT_BUILD_DIR    "${CMAKE_BINARY_DIR}/qt-build/build")
 | 
			
		||||
set (QT_INSTALL_DIR  "${CMAKE_BINARY_DIR}/qt")
 | 
			
		||||
 | 
			
		||||
@@ -114,20 +115,21 @@ ExternalProject_Add(qtcreator_plugin_autopilot
 | 
			
		||||
  INSTALL_COMMAND   sh -c "exit 0"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
SET (QT_KIT_PREFIX "${CMAKE_BINARY_DIR}/qt-build2")
 | 
			
		||||
ExternalProject_Add(${QT_VERSION}-kit
 | 
			
		||||
  DEPENDS ${QT_VERSION}
 | 
			
		||||
  #URL http://download.qt.io/official_releases/qt/5.4/5.4.2/single/qt-everywhere-opensource-src-5.4.2.tar.gz
 | 
			
		||||
SET (QT_KIT_PREFIX "${CMAKE_BINARY_DIR}/qt-api-build")
 | 
			
		||||
ExternalProject_Add(${QT_VERSION}-api
 | 
			
		||||
  PREFIX      "${QT_KIT_PREFIX}"
 | 
			
		||||
  SOURCE_DIR  "${QT_KIT_SOURCE_DIR}"
 | 
			
		||||
  BINARY_DIR  "${QT_KIT_PREFIX}/build"
 | 
			
		||||
  INSTALL_DIR "${QT_KIT_PREFIX}/qt"
 | 
			
		||||
  DOWNLOAD_COMMAND  sh -c "exit 0" #already downloaded
 | 
			
		||||
  DOWNLOAD_COMMAND  sh -c "cd ${QT_KIT_SOURCE_DIR} && ${CMAKE_SOURCE_DIR}/get_qt_sources.py"
 | 
			
		||||
  UPDATE_COMMAND    sh -c "exit 0" #nothing to update
 | 
			
		||||
  CONFIGURE_COMMAND sh -c "${QT_SOURCE_DIR}/configure -prefix /usr/ubuntu-sdk-dev `cat ${CMAKE_SOURCE_DIR}/qt5config`"
 | 
			
		||||
  PATCH_COMMAND     sh -c "cp ${CMAKE_SOURCE_DIR}/desktop_kit_qt.pro ${QT_KIT_SOURCE_DIR}/qt.pro && cp ${CMAKE_SOURCE_DIR}/desktop_kit_configure ${QT_KIT_SOURCE_DIR}/configure" 
 | 
			
		||||
  CONFIGURE_COMMAND sh -c "${QT_KIT_SOURCE_DIR}/configure -prefix /usr/ubuntu-sdk-dev `cat ${CMAKE_SOURCE_DIR}/kit_config`"
 | 
			
		||||
  BUILD_COMMAND     sh -c "make ${GENERATED_MAKE_FLAGS}"
 | 
			
		||||
  INSTALL_COMMAND   sh -c "make INSTALL_ROOT=${QT_KIT_PREFIX}/qt install"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
SET (EXTRAS_PREFIX "${CMAKE_BINARY_DIR}/qt-extras")
 | 
			
		||||
ExternalProject_Add(${QT_VERSION}-extras
 | 
			
		||||
  DEPENDS ${QT_VERSION}-kit
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										6
									
								
								debian/changelog
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								debian/changelog
									
									
									
									
										vendored
									
									
								
							@@ -4,6 +4,12 @@ ubuntu-sdk-ide (3.5.0+15.10.20151020-0ubuntu1~0wily1) wily; urgency=medium
 | 
			
		||||
 | 
			
		||||
 -- Zoltán Balogh <zoltan@bakter.hu>  Wed, 14 Oct 2015 11:57:31 +0300
 | 
			
		||||
 | 
			
		||||
ubuntu-sdk-ide (3.5.0+15.10.20151019-0ubuntu1~0wily1) wily; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * OTA7 update 
 | 
			
		||||
 | 
			
		||||
 -- Zoltán Balogh <zoltan@bakter.hu>  Wed, 14 Oct 2015 11:57:31 +0300
 | 
			
		||||
 | 
			
		||||
ubuntu-sdk-ide (3.5.0+15.10.20150829-0ubuntu1~0vivid9) vivid; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Initial release
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1
									
								
								debian/control
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								debian/control
									
									
									
									
										vendored
									
									
								
							@@ -68,6 +68,7 @@ Build-Depends: debhelper (>= 9),
 | 
			
		||||
               zlib1g-dev,
 | 
			
		||||
               liblttng-ust-dev,
 | 
			
		||||
               libbotan1.10-dev,
 | 
			
		||||
               libboost-regex1.55.0
 | 
			
		||||
Standards-Version: 3.9.4
 | 
			
		||||
Homepage: https://launchpad.net/ubuntu-sdk-ide
 | 
			
		||||
# If you aren't a member of ~ubuntu-sdk-team but need to upload packaging changes,
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										57
									
								
								desktop_kit_configure
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										57
									
								
								desktop_kit_configure
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,57 @@
 | 
			
		||||
#! /bin/sh
 | 
			
		||||
#############################################################################
 | 
			
		||||
##
 | 
			
		||||
## Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
 | 
			
		||||
## Contact: http://www.qt-project.org/legal
 | 
			
		||||
##
 | 
			
		||||
## This file is part of the build tools of the Qt Toolkit.
 | 
			
		||||
##
 | 
			
		||||
## $QT_BEGIN_LICENSE:LGPL$
 | 
			
		||||
## Commercial License Usage
 | 
			
		||||
## Licensees holding valid commercial Qt licenses may use this file in
 | 
			
		||||
## accordance with the commercial license agreement provided with the
 | 
			
		||||
## Software or, alternatively, in accordance with the terms contained in
 | 
			
		||||
## a written agreement between you and Digia.  For licensing terms and
 | 
			
		||||
## conditions see http://qt.digia.com/licensing.  For further information
 | 
			
		||||
## use the contact form at http://qt.digia.com/contact-us.
 | 
			
		||||
##
 | 
			
		||||
## GNU Lesser General Public License Usage
 | 
			
		||||
## Alternatively, this file may be used under the terms of the GNU Lesser
 | 
			
		||||
## General Public License version 2.1 as published by the Free Software
 | 
			
		||||
## Foundation and appearing in the file LICENSE.LGPL included in the
 | 
			
		||||
## packaging of this file.  Please review the following information to
 | 
			
		||||
## ensure the GNU Lesser General Public License version 2.1 requirements
 | 
			
		||||
## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 | 
			
		||||
##
 | 
			
		||||
## In addition, as a special exception, Digia gives you certain additional
 | 
			
		||||
## rights.  These rights are described in the Digia Qt LGPL Exception
 | 
			
		||||
## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
 | 
			
		||||
##
 | 
			
		||||
## GNU General Public License Usage
 | 
			
		||||
## Alternatively, this file may be used under the terms of the GNU
 | 
			
		||||
## General Public License version 3.0 as published by the Free Software
 | 
			
		||||
## Foundation and appearing in the file LICENSE.GPL included in the
 | 
			
		||||
## packaging of this file.  Please review the following information to
 | 
			
		||||
## ensure the GNU General Public License version 3.0 requirements will be
 | 
			
		||||
## met: http://www.gnu.org/copyleft/gpl.html.
 | 
			
		||||
##
 | 
			
		||||
##
 | 
			
		||||
## $QT_END_LICENSE$
 | 
			
		||||
##
 | 
			
		||||
#############################################################################
 | 
			
		||||
 | 
			
		||||
srcpath=`dirname $0`
 | 
			
		||||
srcpath=`(cd "$srcpath"; /bin/pwd)`
 | 
			
		||||
configure=$srcpath/qtbase/configure
 | 
			
		||||
if [ ! -e "$configure" ]; then
 | 
			
		||||
    echo "$configure not found. Did you forget to run \"init-repository\"?" >&2
 | 
			
		||||
    exit 1
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
mkdir -p qtbase || exit
 | 
			
		||||
 | 
			
		||||
echo "+ cd qtbase"
 | 
			
		||||
cd qtbase || exit
 | 
			
		||||
 | 
			
		||||
echo "+ $configure -top-level $@"
 | 
			
		||||
exec "$configure" -top-level "$@"
 | 
			
		||||
							
								
								
									
										81
									
								
								desktop_kit_qt.pro
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										81
									
								
								desktop_kit_qt.pro
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,81 @@
 | 
			
		||||
# Create the super cache so modules will add themselves to it.
 | 
			
		||||
cache(, super)
 | 
			
		||||
 | 
			
		||||
CONFIG += build_pass   # hack to disable the .qmake.super auto-add
 | 
			
		||||
load(qt_build_config)
 | 
			
		||||
CONFIG -= build_pass   # unhack, as it confuses Qt Creator
 | 
			
		||||
 | 
			
		||||
TEMPLATE      = subdirs
 | 
			
		||||
 | 
			
		||||
defineReplace(moduleName) {
 | 
			
		||||
    return(module_$$replace(1, -, _))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# Arguments: module name, [mandatory deps], [optional deps], [project file]
 | 
			
		||||
defineTest(addModule) {
 | 
			
		||||
    contains(QT_SKIP_MODULES, $$1): return(false)
 | 
			
		||||
    mod = $$moduleName($$1)
 | 
			
		||||
 | 
			
		||||
    isEmpty(4) {
 | 
			
		||||
        !exists($$1/$${1}.pro): return(false)
 | 
			
		||||
        $${mod}.subdir = $$1
 | 
			
		||||
        export($${mod}.subdir)
 | 
			
		||||
    } else {
 | 
			
		||||
        !exists($$1/$${4}): return(false)
 | 
			
		||||
        $${mod}.file = $$1/$$4
 | 
			
		||||
        $${mod}.makefile = Makefile
 | 
			
		||||
        export($${mod}.file)
 | 
			
		||||
        export($${mod}.makefile)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    for(d, 2) {
 | 
			
		||||
        dn = $$moduleName($$d)
 | 
			
		||||
        !contains(SUBDIRS, $$dn): \
 | 
			
		||||
            return(false)
 | 
			
		||||
        $${mod}.depends += $$dn
 | 
			
		||||
    }
 | 
			
		||||
    for(d, 3) {
 | 
			
		||||
        dn = $$moduleName($$d)
 | 
			
		||||
        contains(SUBDIRS, $$dn): \
 | 
			
		||||
            $${mod}.depends += $$dn
 | 
			
		||||
    }
 | 
			
		||||
    !isEmpty($${mod}.depends): \
 | 
			
		||||
        export($${mod}.depends)
 | 
			
		||||
 | 
			
		||||
    $${mod}.target = module-$$1
 | 
			
		||||
    export($${mod}.target)
 | 
			
		||||
 | 
			
		||||
    SUBDIRS += $$mod
 | 
			
		||||
    export(SUBDIRS)
 | 
			
		||||
    return(true)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# only qtbase is required to exist. The others may not - but it is the
 | 
			
		||||
# users responsibility to ensure that all needed dependencies exist, or
 | 
			
		||||
# it may not build.
 | 
			
		||||
 | 
			
		||||
ANDROID_EXTRAS =
 | 
			
		||||
android: ANDROID_EXTRAS = qtandroidextras
 | 
			
		||||
 | 
			
		||||
addModule(qtbase)
 | 
			
		||||
addModule(qtsvg, qtbase)
 | 
			
		||||
addModule(qtxmlpatterns, qtbase)
 | 
			
		||||
addModule(qtdeclarative, qtbase, qtsvg qtxmlpatterns)
 | 
			
		||||
addModule(qtquickcontrols, qtdeclarative)
 | 
			
		||||
addModule(qtmultimedia, qtbase, qtdeclarative)
 | 
			
		||||
addModule(qt3d, qtdeclarative)
 | 
			
		||||
addModule(qtsystems, qtbase, qtdeclarative)
 | 
			
		||||
addModule(qtlocation, qtbase, qtsystems qtmultimedia)
 | 
			
		||||
addModule(qtsensors, qtbase, qtdeclarative)
 | 
			
		||||
addModule(qtconnectivity, qtbase $$ANDROID_EXTRAS, qtdeclarative)
 | 
			
		||||
addModule(qtfeedback, qtdeclarative, qtmultimedia)
 | 
			
		||||
addModule(qtpim, qtdeclarative)
 | 
			
		||||
addModule(qtwebsockets, qtbase, qtdeclarative)
 | 
			
		||||
addModule(qttools, qtbase, qtdeclarative qtactiveqt qtwebkit)
 | 
			
		||||
addModule(qtimageformats, qtbase)
 | 
			
		||||
addModule(qtgraphicaleffects, qtdeclarative)
 | 
			
		||||
addModule(qtscript, qtbase, qttools)
 | 
			
		||||
addModule(qtdocgallery, qtdeclarative)
 | 
			
		||||
addModule(qtserialport, qtbase)
 | 
			
		||||
addModule(qtenginio, qtdeclarative)
 | 
			
		||||
addModule(ubuntu-sdk,qtdeclarative qtfeedback qtpim)
 | 
			
		||||
@@ -1,9 +1,12 @@
 | 
			
		||||
#!/usr/bin/python
 | 
			
		||||
 | 
			
		||||
from optparse import OptionParser
 | 
			
		||||
import re
 | 
			
		||||
import urlparse
 | 
			
		||||
from launchpadlib.launchpad import Launchpad
 | 
			
		||||
from subprocess import call
 | 
			
		||||
import sys
 | 
			
		||||
import os
 | 
			
		||||
import glob
 | 
			
		||||
 | 
			
		||||
qt_sources = {"qtpim-opensource-src": 1,
 | 
			
		||||
              "qtsystems-opensource-src": 1,
 | 
			
		||||
@@ -11,6 +14,8 @@ qt_sources = {"qtpim-opensource-src": 1,
 | 
			
		||||
              "qtdeclarative-opensource-src": 1,
 | 
			
		||||
              "qtmultimedia-opensource-src": 1,
 | 
			
		||||
              "qtpim-opensource-src": 1,
 | 
			
		||||
              "qtmultimedia-opensource-src": 1,
 | 
			
		||||
              "ubuntu-ui-toolkit": 1,
 | 
			
		||||
              "qt3d-opensource-src": 0,
 | 
			
		||||
              "qtfeedback-opensource-src": 0,
 | 
			
		||||
              "qtlocation-opensource-src": 0,
 | 
			
		||||
@@ -19,51 +24,83 @@ qt_sources = {"qtpim-opensource-src": 1,
 | 
			
		||||
              "qtsvg-opensource-src": 0,
 | 
			
		||||
              "qttools-opensource-src": 0,
 | 
			
		||||
              "qtwebsockets-opensource-src": 0,
 | 
			
		||||
              "qtxmlpatterns-opensource-src": 0}
 | 
			
		||||
              "qtxmlpatterns-opensource-src": 0,
 | 
			
		||||
              "qtquickcontrols-opensource-src": 0,
 | 
			
		||||
              "qtconnectivity-opensource-src": 0,
 | 
			
		||||
              "qtimageformats-opensource-src": 0,
 | 
			
		||||
              "qtgraphicaleffects-opensource-src": 0,
 | 
			
		||||
              "qtserialport-opensource-src": 0,
 | 
			
		||||
              "qtenginio-opensource-src": 0
 | 
			
		||||
              }
 | 
			
		||||
 | 
			
		||||
hack_set = set(['qt3d', 'qtpim', 'qtfeedback', 'qtsystems'])
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def create_webroot_url_from_self_link(self_link):
 | 
			
		||||
    scheme, netloc, _, _, _ = urlparse.urlsplit(self_link)
 | 
			
		||||
    netloc = netloc.lstrip("api.")
 | 
			
		||||
    return u"%s://%s/" %(scheme, netloc)
 | 
			
		||||
    
 | 
			
		||||
    return u"%s://%s/" % (scheme, netloc)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def get_dsc(archive, package, series):
 | 
			
		||||
    re_version = re.compile(r"^\d+\:")
 | 
			
		||||
    x = archive.getPublishedSources(exact_match=True, source_name=package,
 | 
			
		||||
            distro_series=series)
 | 
			
		||||
                                    distro_series=series)
 | 
			
		||||
    webroot = create_webroot_url_from_self_link(archive.self_link)
 | 
			
		||||
    version = x[0].source_package_version
 | 
			
		||||
    version = re_version.sub("", version, 1)
 | 
			
		||||
    if archive.owner.name == "ubuntu-archive":
 | 
			
		||||
        yield "%subuntu/+archive/primary/+files/%s_%s.dsc" \
 | 
			
		||||
            %(webroot, x[0].source_package_name, version)
 | 
			
		||||
            % (webroot, x[0].source_package_name, version)
 | 
			
		||||
    else:
 | 
			
		||||
        yield "%s/~ci-train-ppa-service/+archive/ubuntu/stable-phone-overlay/+files/%s_%s.dsc" \
 | 
			
		||||
            %(webroot, x[0].source_package_name, version)
 | 
			
		||||
            % (webroot, x[0].source_package_name, version)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def main():
 | 
			
		||||
    parser = OptionParser(usage="usage: %prog [options] source ...")
 | 
			
		||||
    parser.add_option(
 | 
			
		||||
        "-l", "--launchpad", dest="launchpad_instance", default="production")
 | 
			
		||||
    options, args = parser.parse_args()
 | 
			
		||||
 | 
			
		||||
    options.launchpad = Launchpad.login_with(
 | 
			
		||||
        "branch-seeds", options.launchpad_instance)
 | 
			
		||||
 | 
			
		||||
    launchpad = Launchpad.login_anonymously('just testing', 'production')
 | 
			
		||||
    launchpad = Launchpad.login_anonymously('just testing', options.launchpad_instance)
 | 
			
		||||
    ubuntu = launchpad.distributions["ubuntu"]
 | 
			
		||||
    distro_archive = ubuntu.main_archive
 | 
			
		||||
    overlay_archive = launchpad.people["ci-train-ppa-service"].getPPAByName(name="stable-phone-overlay")
 | 
			
		||||
    overlay_archive = launchpad.people["ci-train-ppa-service"].\
 | 
			
		||||
        getPPAByName(name="stable-phone-overlay")
 | 
			
		||||
    series = ubuntu.getSeries(name_or_version="vivid")
 | 
			
		||||
 | 
			
		||||
    for qt_source_package, source in qt_sources.iteritems():
 | 
			
		||||
        if source == 1:
 | 
			
		||||
            archive = overlay_archive 
 | 
			
		||||
            archive = overlay_archive
 | 
			
		||||
        elif source == 0:
 | 
			
		||||
            archive = distro_archive
 | 
			
		||||
        re_version = re.compile(r"^\d+\:")
 | 
			
		||||
        x = archive.getPublishedSources(exact_match=True, source_name=qt_source_package, distro_series=series)[0].source_package_version
 | 
			
		||||
        x = archive.getPublishedSources(exact_match=True,
 | 
			
		||||
                                        source_name=qt_source_package,
 | 
			
		||||
                                        distro_series=series)[0].\
 | 
			
		||||
            source_package_version
 | 
			
		||||
        generator = get_dsc(archive, qt_source_package, series)
 | 
			
		||||
        for i in generator:
 | 
			
		||||
            print(i)
 | 
			
		||||
            if qt_source_package != 'ubuntu-ui-toolkit':
 | 
			
		||||
                qt_module_name = re.sub(r'-opensource-src',
 | 
			
		||||
                                        r'',
 | 
			
		||||
                                        qt_source_package.rstrip())
 | 
			
		||||
            else:
 | 
			
		||||
                qt_module_name = re.sub(r'ubuntu-ui-toolkit',
 | 
			
		||||
                                        r'ubuntu-sdk',
 | 
			
		||||
                                        qt_source_package.rstrip())
 | 
			
		||||
            call(["dget", i, "--quiet", "--download-only"])
 | 
			
		||||
            for dsc_file in glob.glob('%s*dsc' % qt_source_package):
 | 
			
		||||
                call(["dpkg-source", "-x", dsc_file])
 | 
			
		||||
            for junk_files in glob.glob("*.?z"):
 | 
			
		||||
                os.remove(junk_files)
 | 
			
		||||
            for junk_files in glob.glob("*.dsc"):
 | 
			
		||||
                os.remove(junk_files)
 | 
			
		||||
            for fetched_module_directory in \
 | 
			
		||||
                    glob.glob('%s*' % qt_source_package):
 | 
			
		||||
                os.rename(fetched_module_directory, qt_module_name)
 | 
			
		||||
            if qt_module_name in hack_set:
 | 
			
		||||
                git_dir = qt_module_name + "/.git"
 | 
			
		||||
                if not os.path.exists(git_dir):
 | 
			
		||||
                    os.makedirs(git_dir)
 | 
			
		||||
 | 
			
		||||
main()
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										32
									
								
								kit_config
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								kit_config
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,32 @@
 | 
			
		||||
-v 
 | 
			
		||||
-confirm-license
 | 
			
		||||
-sysconfdir /etc/xdg 
 | 
			
		||||
-opensource 
 | 
			
		||||
-plugin-sql-mysql 
 | 
			
		||||
-plugin-sql-odbc 
 | 
			
		||||
-plugin-sql-psql 
 | 
			
		||||
-plugin-sql-sqlite 
 | 
			
		||||
-no-sql-sqlite2 
 | 
			
		||||
-plugin-sql-tds 
 | 
			
		||||
-system-sqlite 
 | 
			
		||||
-system-zlib 
 | 
			
		||||
-system-libjpeg
 | 
			
		||||
-system-libpng 
 | 
			
		||||
-openssl 
 | 
			
		||||
-no-rpath 
 | 
			
		||||
-glib
 | 
			
		||||
-verbose 
 | 
			
		||||
-optimized-qmake 
 | 
			
		||||
-no-strip 
 | 
			
		||||
-no-separate-debug-info 
 | 
			
		||||
-qpa xcb 
 | 
			
		||||
-xcb 
 | 
			
		||||
-icu 
 | 
			
		||||
-accessibility 
 | 
			
		||||
-no-directfb 
 | 
			
		||||
-nomake examples
 | 
			
		||||
-nomake tests
 | 
			
		||||
-skip qtenginio
 | 
			
		||||
-skip qtlocation
 | 
			
		||||
-dbus-linked 
 | 
			
		||||
-system-libjpeg 
 | 
			
		||||
		Reference in New Issue
	
	Block a user