Merge lp:~unity-team/qtmir/inline-gles-surfaces into lp:qtmir

Proposed by Michał Sawicz on 2016-04-06
Status: Merged
Approved by: Gerry Boland on 2016-04-12
Approved revision: 482
Merged at revision: 476
Proposed branch: lp:~unity-team/qtmir/inline-gles-surfaces
Merge into: lp:qtmir
Prerequisite: lp:~dandrader/qtmir/surfaceListModel
Diff against target: 268 lines (+229/-0)
6 files modified
debian/bileto_convert_to_gles (+28/-0)
debian/control (+1/-0)
debian/gles-patches/convert-to-gles.patch (+179/-0)
debian/gles-patches/series (+1/-0)
tests/CMakeLists.txt (+6/-0)
tests/convert-to-gles.sh (+14/-0)
To merge this branch: bzr merge lp:~unity-team/qtmir/inline-gles-surfaces
Reviewer Review Type Date Requested Status
Gerry Boland 2016-04-06 Approve on 2016-04-12
Review via email: mp+291156@code.launchpad.net

Commit Message

Inline -gles packaging.

To post a comment you must log in.
482. By Michał Sawicz on 2016-04-06

Merge lp:~dandrader/qtmir/surfaceListModel

Gerry Boland (gerboland) wrote :

LGTM. I've marking approved. Let's try sticking in a silo, and test the GLES packages are ok

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'debian/bileto_convert_to_gles'
2--- debian/bileto_convert_to_gles 1970-01-01 00:00:00 +0000
3+++ debian/bileto_convert_to_gles 2016-04-06 18:14:36 +0000
4@@ -0,0 +1,28 @@
5+#!/bin/sh
6+
7+# This script converts the debian/ packaging into an alternate source package
8+# which builds with GLES. You should copy the source tree into a new directory
9+# before running this script (so you have one copy for GLES and one copy for
10+# regular GL).
11+
12+set -eu
13+
14+# Steps to start a new quilt patch:
15+# quilt new convert-to-gles.patch
16+# quilt add debian/*
17+# # apply changes
18+
19+# Steps to refresh this quilt patch when nongles changes:
20+# quilt push -af
21+# # fix up
22+
23+# When finished, save quilt patch with:
24+# quilt refresh
25+# quilt pop -a
26+
27+export QUILT_PATCHES=debian/gles-patches
28+quilt push -a
29+
30+sed --in-place 's/^qtmir /qtmir-gles /g' debian/changelog
31+
32+rm --recursive --force ./.pc/
33
34=== modified file 'debian/control'
35--- debian/control 2016-04-06 18:14:36 +0000
36+++ debian/control 2016-04-06 18:14:36 +0000
37@@ -35,6 +35,7 @@
38 qtbase5-private-dev,
39 qtdeclarative5-dev,
40 qtdeclarative5-private-dev,
41+ quilt,
42 Standards-Version: 3.9.5
43 Homepage: https://launchpad.net/qtmir
44 # if you don't have have commit access to this branch but would like to upload
45
46=== added directory 'debian/gles-patches'
47=== added file 'debian/gles-patches/convert-to-gles.patch'
48--- debian/gles-patches/convert-to-gles.patch 1970-01-01 00:00:00 +0000
49+++ debian/gles-patches/convert-to-gles.patch 2016-04-06 18:14:36 +0000
50@@ -0,0 +1,179 @@
51+Index: inline-gles-quilt/debian/control
52+===================================================================
53+--- inline-gles-quilt.orig/debian/control
54++++ inline-gles-quilt/debian/control
55+@@ -1,4 +1,4 @@
56+-Source: qtmir
57++Source: qtmir-gles
58+ Section: libs
59+ Priority: optional
60+ Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
61+@@ -16,7 +16,13 @@ Build-Depends: cmake,
62+ libmirserver-dev (>= 0.19.0),
63+ libmtdev-dev,
64+ libprocess-cpp-dev,
65++ libqt5gui5-gles,
66++ libqt5quick5-gles,
67++ libqt5quickparticles5-gles,
68++ libqt5quicktest5,
69++ libqt5quickwidgets5-gles,
70+ libqt5sensors5-dev,
71++ libqt5test5,
72+ libqtdbusmock1-dev (>= 0.2),
73+ libqtdbustest1-dev (>= 0.2),
74+ libubuntu-app-launch2-dev,
75+@@ -31,8 +37,8 @@ Build-Depends: cmake,
76+ # lttng-gen-ts needs python3, but doesn't depend on it itself: bug 1359147
77+ python3:any,
78+ qt5-default,
79+- qtbase5-dev,
80+- qtbase5-private-dev,
81++ qtbase5-gles-dev,
82++ qtbase5-private-gles-dev,
83+ qtdeclarative5-dev,
84+ qtdeclarative5-private-dev,
85+ quilt,
86+@@ -45,7 +51,7 @@ Vcs-Bzr: lp:qtmir
87+ Vcs-Browser: http://bazaar.launchpad.net/~mir-team/qtmir/trunk/files
88+
89+ Package: qtmir-android
90+-Architecture: armhf
91++Architecture: amd64 i386
92+ Multi-Arch: same
93+ Conflicts: libqtmir,
94+ qtmir-desktop,
95+@@ -56,65 +62,10 @@ Replaces: libqtmir,
96+ Provides: qtmir,
97+ Depends: ${misc:Depends},
98+ ${shlibs:Depends},
99+-Description: Qt platform abstraction (QPA) plugin for a Mir server (mobile)
100++Description: Qt platform abstraction (QPA) plugin for a Mir server (mobile) - OpenGLES
101+ QtMir is a set of Qt5 components to enable one to write a Mir server with Qt.
102+ It contains a QPA (Qt Platform Abstraction) plugin which creates and manages
103+ a Mir server. It also exposes some internal Mir functionality.
104+ .
105+- This variant of the package is for Android-based phones and tablets.
106+-
107+-Package: qtmir-desktop
108+-Architecture: any
109+-Multi-Arch: same
110+-Conflicts: qtmir-android,
111+- qtubuntu-android,
112+-Replaces: libqtmir,
113+- qtmir-android,
114+- qtubuntu-android,
115+-Provides: qtmir,
116+-Depends: ${misc:Depends},
117+- ${shlibs:Depends},
118+-Description: Qt platform abstraction (QPA) plugin for a Mir server (desktop)
119+- QtMir is a set of Qt5 components to enable one to write a Mir server with Qt.
120+- It contains a QPA (Qt Platform Abstraction) plugin which creates and manages
121+- a Mir server. It also exposes some internal Mir functionality.
122+- .
123+- This variant of the package is for GNU-based desktops.
124+-
125+-Package: qtdeclarative5-qtmir-plugin
126+-Architecture: any
127+-Multi-Arch: same
128+-Pre-Depends: ${misc:Pre-Depends},
129+-Depends: qtmir-desktop (= ${source:Version}) | qtmir-android (= ${source:Version}),
130+- ${misc:Depends},
131+- ${shlibs:Depends},
132+-Replaces: libqtmir,
133+- libunity-mir1,
134+-Conflicts: libqtmir,
135+- libunity-mir1,
136+-Provides: unity-application-impl,
137+- unity-application-impl-15,
138+-Description: Qt plugin for Unity specific Mir APIs
139+- QtMir provides Qt/QML bindings for Mir features that are exposed through the
140+- qtmir-desktop or qtmir-android QPA plugin such as Application management
141+- (start/stop/suspend/resume) and surface management.
142+-
143+-Package: qtmir-tests
144+-Architecture: any
145+-Multi-Arch: same
146+-Pre-Depends: ${misc:Pre-Depends},
147+-Depends: autopilot-qt5,
148+- littler,
149+- lttng-tools,
150+- mir-test-tools,
151+- python3-autopilot,
152+- python3-babeltrace,
153+- python3-evdev,
154+- python3-mir-perf-framework,
155+- qtdeclarative5-qtmir-plugin,
156+- qtmir-desktop (= ${source:Version}) | qtmir-android (= ${source:Version}),
157+- ${misc:Depends},
158+- ${shlibs:Depends},
159+-Description: QtMir tests and demos
160+- This package provides benchmark tests and a simple shell and client using the
161+- QtMir QPA.
162++ This variant of the package is for Android-based phones and tablets (built
163++ against the OpenGLES variant of qtbase).
164+Index: inline-gles-quilt/debian/rules
165+===================================================================
166+--- inline-gles-quilt.orig/debian/rules
167++++ inline-gles-quilt/debian/rules
168+@@ -3,60 +3,28 @@
169+
170+ export DPKG_GENSYMBOLS_CHECK_LEVEL=4
171+
172+-include /usr/share/dpkg/default.mk
173+-
174+ ANDROID_DIR = build-android
175+-DESKTOP_DIR = build-desktop
176+ TMP1_DIR = $(CURDIR)/debian/tmp1
177+-TMP2_DIR = $(CURDIR)/debian/tmp2
178+-
179+-# We only want to build qtmir-android on arches using Qt built with OpenGL ES2.0
180+-DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
181+-gles2_architectures = armhf
182+-
183+-USES_GLES2 = $(findstring $(DEB_HOST_ARCH), $(gles2_architectures))
184+
185+ %:
186+ dh $@ --parallel --fail-missing
187+
188+ override_dh_clean:
189+-ifeq ($(DEB_HOST_ARCH),$(USES_GLES2))
190+ rm -rf $(TMP1_DIR)
191+-endif
192+- rm -rf $(TMP2_DIR)
193+ dh_clean
194+
195+ override_dh_auto_configure:
196+-ifeq ($(DEB_HOST_ARCH),$(USES_GLES2))
197+ mkdir -p $(ANDROID_DIR) && dh_auto_configure -B$(ANDROID_DIR) -- $(FLAGS) $(CURDIR) -DUSE_OPENGLES=1
198+-# See comment in CMakeLists.txt
199+- mkdir -p $(DESKTOP_DIR) && dh_auto_configure -B$(DESKTOP_DIR) -- $(FLAGS) $(CURDIR) -DUSE_OPENGL_BUT_LINK_AGAINST_OPENGLES=1
200+-else
201+- mkdir -p $(DESKTOP_DIR) && dh_auto_configure -B$(DESKTOP_DIR) -- $(FLAGS) $(CURDIR) -DUSE_OPENGLES=1
202+-endif
203+
204+ override_dh_auto_build:
205+-ifeq ($(DEB_HOST_ARCH),$(USES_GLES2))
206+ dh_auto_build -B$(ANDROID_DIR)
207+-endif
208+- dh_auto_build -B$(DESKTOP_DIR)
209+
210+ override_dh_auto_test:
211+-ifeq ($(DEB_HOST_ARCH),$(USES_GLES2))
212+ dh_auto_test -B$(ANDROID_DIR)
213+-endif
214+- dh_auto_test -B$(DESKTOP_DIR)
215+
216+ override_dh_auto_install:
217+-ifeq ($(DEB_HOST_ARCH),$(USES_GLES2))
218+ dh_auto_install -B$(ANDROID_DIR) --destdir=$(TMP1_DIR)
219+-endif
220+- dh_auto_install -B$(DESKTOP_DIR) --destdir=$(TMP2_DIR)
221+
222+ override_dh_install:
223+-ifeq ($(DEB_HOST_ARCH),$(USES_GLES2))
224++ cat $(CURDIR)/debian/qtmir-tests.install $(CURDIR)/debian/qtdeclarative5-qtmir-plugin.install | xargs -I% sh -c "rm -rf $(TMP1_DIR)/%"
225+ dh_install --sourcedir=$(TMP1_DIR) -pqtmir-android
226+-endif
227+- dh_install --sourcedir=$(TMP2_DIR) -pqtmir-desktop
228+- dh_install --sourcedir=$(TMP2_DIR) -pqtdeclarative5-qtmir-plugin
229+- dh_install --sourcedir=$(TMP2_DIR) -pqtmir-tests
230
231=== added file 'debian/gles-patches/series'
232--- debian/gles-patches/series 1970-01-01 00:00:00 +0000
233+++ debian/gles-patches/series 2016-04-06 18:14:36 +0000
234@@ -0,0 +1,1 @@
235+convert-to-gles.patch
236
237=== modified file 'tests/CMakeLists.txt'
238--- tests/CMakeLists.txt 2015-09-30 15:45:17 +0000
239+++ tests/CMakeLists.txt 2016-04-06 18:14:36 +0000
240@@ -3,3 +3,9 @@
241 add_subdirectory(framework)
242 add_subdirectory(mirserver)
243 add_subdirectory(modules)
244+
245+add_test(
246+ NAME convert-to-gles
247+ COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/convert-to-gles.sh
248+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
249+)
250
251=== added file 'tests/convert-to-gles.sh'
252--- tests/convert-to-gles.sh 1970-01-01 00:00:00 +0000
253+++ tests/convert-to-gles.sh 2016-04-06 18:14:36 +0000
254@@ -0,0 +1,14 @@
255+#!/bin/sh
256+
257+set -eux
258+
259+# Skip this test inside qtmir-gles package as the patch is already applied.
260+[ "$(dpkg-parsechangelog --show-field Source)" = "qtmir" ] || exit 0
261+
262+QUILT_EXIT=0
263+export QUILT_PATCHES=debian/gles-patches
264+
265+quilt push -a || QUILT_EXIT=$?
266+quilt pop -a
267+
268+exit $QUILT_EXIT

Subscribers

People subscribed via source and target branches