Merge lp:~khurshid-alam/unity-api/fix-build-cosmic into lp:unity-api

Proposed by Khurshid Alam on 2018-10-04
Status: Merged
Merged at revision: 285
Proposed branch: lp:~khurshid-alam/unity-api/fix-build-cosmic
Merge into: lp:unity-api
Diff against target: 225 lines (+33/-19)
13 files modified
debian/control (+2/-2)
include/unity/util/GlibMemory.h (+5/-0)
src/unity/util/FileIO.cpp (+1/-0)
src/unity/util/internal/DaemonImpl.cpp (+1/-0)
test/gtest/unity/util/CMakeLists.txt (+3/-3)
test/gtest/unity/util/ResourcePtr/ResourcePtr_test.cpp (+1/-0)
test/headers/CMakeLists.txt (+7/-4)
test/qmltest/mocks/plugins/Unity/Application/CMakeLists.txt (+2/-2)
test/qmltest/mocks/plugins/Unity/Launcher/CMakeLists.txt (+3/-2)
test/qmltest/mocks/plugins/Unity/Notifications/CMakeLists.txt (+2/-2)
test/qmltest/mocks/plugins/Unity/Notifications/Mocks/CMakeLists.txt (+3/-1)
test/qmltest/mocks/plugins/Unity/Scopes/CMakeLists.txt (+2/-2)
test/qmltest/modules/TestUtil/CMakeLists.txt (+1/-1)
To merge this branch: bzr merge lp:~khurshid-alam/unity-api/fix-build-cosmic
Reviewer Review Type Date Requested Status
Jeremy Bicha 2018-10-04 Needs Fixing on 2018-10-14
Review via email: mp+356161@code.launchpad.net

Commit message

* Satisfy build against >= gcc-7

* Only add internal header tests if exists.

Only add a test for standalone compilation of internal include
directories if the directory exists on disk.

https://github.com/ubports/unity-api/commit/89b77f91f746cca9aa71f1e44a896e51f5b2a9fd

* Fix autoclean conflict with new glib.

The new glib 2.57.2 version introduces reference counted strings, which
causes a redefinition scenario with the autocleanup of gchar here. So,
only include this definition when building against older glib versions.

https://github.com/ubports/unity-api/commit/9e7c45340805532faf4078012b17c8719677714e

* Raplace transitional dummy packages qtquick2 and qttest

* Disable memory tests for now to satisfy build against glib >= 2.58.

Description of the change

I disabled the memory tests as I was getting sigtrap against GLib >= 2.58. It compiles fine in bionic. This is not so serious as none of the unity7 components depend on unity-api.

If you are ok with this please review and merge.

To post a comment you must log in.
292. By Khurshid Alam on 2018-10-04

Remove popularity contest. Not required in this context.

Jeremy Bicha (jbicha) wrote :

Please clean up your commits and force push. (In particular, the commit history doesn't need the popularity contest addition and removal.)

review: Needs Fixing
Jeremy Bicha (jbicha) wrote :

sil2100 said he was going to handle this.

Ɓukasz Zemczak (sil2100) wrote :

Merged and released.

Khurshid Alam (khurshid-alam) wrote :

Thanks.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2017-03-25 22:40:06 +0000
3+++ debian/control 2018-10-04 23:21:00 +0000
4@@ -21,8 +21,8 @@
5 qtbase5-dev (>= 5.5),
6 qtdeclarative5-dev,
7 qtdeclarative5-dev-tools,
8- qtdeclarative5-qtquick2-plugin,
9- qtdeclarative5-test-plugin,
10+ qml-module-qtquick2,
11+ qml-module-qttest,
12 Standards-Version: 3.9.4
13 Homepage: https://launchpad.net/unity-api
14 # If you aren't a member of ~unity-team but need to upload
15
16=== removed directory 'include/unity/api/internal'
17=== removed directory 'include/unity/internal'
18=== modified file 'include/unity/util/GlibMemory.h'
19--- include/unity/util/GlibMemory.h 2017-04-04 09:27:33 +0000
20+++ include/unity/util/GlibMemory.h 2018-10-04 23:21:00 +0000
21@@ -210,7 +210,12 @@
22 /**
23 * Manually add extra definitions for gchar* and gchar**
24 */
25+#if GLIB_CHECK_VERSION(2, 57, 2)
26+typedef GRefStringSPtr gcharSPtr;
27+typedef GRefStringUPtr gcharUPtr;
28+#else
29 UNITY_UTIL_DEFINE_GLIB_SMART_POINTERS(gchar, g_free)
30+#endif
31 typedef gchar* gcharv;
32 UNITY_UTIL_DEFINE_GLIB_SMART_POINTERS(gcharv, g_strfreev)
33
34
35=== modified file 'src/unity/util/FileIO.cpp'
36--- src/unity/util/FileIO.cpp 2013-06-26 23:47:34 +0000
37+++ src/unity/util/FileIO.cpp 2018-10-04 23:21:00 +0000
38@@ -26,6 +26,7 @@
39 #include <unistd.h>
40 #include <string.h>
41 #include <sys/stat.h>
42+#include <functional>
43
44 using namespace std;
45
46
47=== modified file 'src/unity/util/internal/DaemonImpl.cpp'
48--- src/unity/util/internal/DaemonImpl.cpp 2013-06-26 23:47:34 +0000
49+++ src/unity/util/internal/DaemonImpl.cpp 2018-10-04 23:21:00 +0000
50@@ -30,6 +30,7 @@
51 #include <cassert>
52 #include <sstream>
53 #include <vector>
54+#include <functional>
55
56 using namespace std;
57
58
59=== modified file 'test/gtest/unity/util/CMakeLists.txt'
60--- test/gtest/unity/util/CMakeLists.txt 2017-04-04 09:37:22 +0000
61+++ test/gtest/unity/util/CMakeLists.txt 2018-10-04 23:21:00 +0000
62@@ -1,9 +1,9 @@
63 add_subdirectory(Daemon)
64 add_subdirectory(DefinesPtrs)
65 add_subdirectory(FileIO)
66-add_subdirectory(GioMemory)
67-add_subdirectory(GlibMemory)
68-add_subdirectory(GObjectMemory)
69+#add_subdirectory(GioMemory)
70+#add_subdirectory(GlibMemory)
71+#add_subdirectory(GObjectMemory)
72 add_subdirectory(IniParser)
73 add_subdirectory(ResourcePtr)
74 add_subdirectory(SnapPath)
75
76=== modified file 'test/gtest/unity/util/ResourcePtr/ResourcePtr_test.cpp'
77--- test/gtest/unity/util/ResourcePtr/ResourcePtr_test.cpp 2013-06-26 23:47:34 +0000
78+++ test/gtest/unity/util/ResourcePtr/ResourcePtr_test.cpp 2018-10-04 23:21:00 +0000
79@@ -21,6 +21,7 @@
80 #include <unity/util/ResourcePtr.h>
81
82 #include <set>
83+#include <functional>
84
85 using namespace std;
86 using namespace unity;
87
88=== modified file 'test/headers/CMakeLists.txt'
89--- test/headers/CMakeLists.txt 2017-03-25 22:40:06 +0000
90+++ test/headers/CMakeLists.txt 2018-10-04 23:21:00 +0000
91@@ -28,10 +28,13 @@
92 ${CMAKE_CURRENT_SOURCE_DIR}/compile_headers.py
93 ${public_inc_dir} ${CMAKE_CXX_COMPILER} "-I${root_inc_dir} -I${public_inc_dir} ${CMAKE_CXX_FLAGS}" "--exclusions" ${exclusions})
94
95- # Test that each internal header compiles stand-alone.
96- add_test(stand-alone-${location}-internal-headers
97- ${CMAKE_CURRENT_SOURCE_DIR}/compile_headers.py
98- ${internal_inc_dir} ${CMAKE_CXX_COMPILER} "-I${root_inc_dir} -I${internal_inc_dir} ${CMAKE_CXX_FLAGS}" "--exclusions" ${exclusions})
99+ # Test that each internal header compiles stand-alone,
100+ # if internal headers exist.
101+ if(EXISTS ${internal_inc_dir})
102+ add_test(stand-alone-${location}-internal-headers
103+ ${CMAKE_CURRENT_SOURCE_DIR}/compile_headers.py
104+ ${internal_inc_dir} ${CMAKE_CXX_COMPILER} "-I${root_inc_dir} -I${internal_inc_dir} ${CMAKE_CXX_FLAGS}" "--exclusions" ${exclusions})
105+ endif(EXISTS ${internal_inc_dir})
106
107 # Test that no public header includes an internal header
108 add_test(clean-public-${location}-headers ${CMAKE_CURRENT_SOURCE_DIR}/check_public_headers.py ${public_inc_dir})
109
110=== modified file 'test/qmltest/mocks/plugins/Unity/Application/CMakeLists.txt'
111--- test/qmltest/mocks/plugins/Unity/Application/CMakeLists.txt 2014-09-03 22:59:26 +0000
112+++ test/qmltest/mocks/plugins/Unity/Application/CMakeLists.txt 2018-10-04 23:21:00 +0000
113@@ -20,7 +20,7 @@
114
115 add_library(ApplicationMocks SHARED ${ApplicationMocks_SOURCES})
116
117-qt5_use_modules(ApplicationMocks Core Gui)
118+target_link_libraries(ApplicationMocks Qt5::Core Qt5::Gui)
119
120 set(TestApplicationPlugin_SOURCES
121 TestApplicationPlugin.cpp
122@@ -28,7 +28,7 @@
123
124 add_library(TestApplicationPlugin MODULE ${TestApplicationPlugin_SOURCES})
125
126-qt5_use_modules(TestApplicationPlugin Core Gui Quick)
127+target_link_libraries(TestApplicationPlugin Qt5::Core Qt5::Gui Qt5::Quick)
128
129 target_link_libraries(TestApplicationPlugin ApplicationMocks)
130
131
132=== modified file 'test/qmltest/mocks/plugins/Unity/Launcher/CMakeLists.txt'
133--- test/qmltest/mocks/plugins/Unity/Launcher/CMakeLists.txt 2016-11-10 18:13:30 +0000
134+++ test/qmltest/mocks/plugins/Unity/Launcher/CMakeLists.txt 2018-10-04 23:21:00 +0000
135@@ -29,7 +29,8 @@
136
137 add_library(LauncherMocks SHARED ${LauncherMocks_SOURCES})
138
139-qt5_use_modules(LauncherMocks Core Gui)
140+#find_package(Qt5Gui REQUIRED)
141+target_link_libraries(LauncherMocks Qt5::Core Qt5::Gui)
142
143 set(TestLauncherPlugin_SOURCES
144 TestLauncherPlugin.cpp
145@@ -37,7 +38,7 @@
146
147 add_library(TestLauncherPlugin MODULE ${TestLauncherPlugin_SOURCES})
148
149-qt5_use_modules(TestLauncherPlugin Core Quick)
150+target_link_libraries(TestLauncherPlugin Qt5::Core Qt5::Quick)
151
152 target_link_libraries(TestLauncherPlugin LauncherMocks)
153
154
155=== modified file 'test/qmltest/mocks/plugins/Unity/Notifications/CMakeLists.txt'
156--- test/qmltest/mocks/plugins/Unity/Notifications/CMakeLists.txt 2013-05-14 08:12:15 +0000
157+++ test/qmltest/mocks/plugins/Unity/Notifications/CMakeLists.txt 2018-10-04 23:21:00 +0000
158@@ -21,7 +21,7 @@
159
160 add_library(NotificationsMocks SHARED ${NotificationsMocks_SOURCES})
161
162-qt5_use_modules(NotificationsMocks Core)
163+target_link_libraries(NotificationsMocks Qt5::Core)
164
165 set(TestNotificationsPlugin_SOURCES
166 TestNotificationsPlugin.cpp
167@@ -29,7 +29,7 @@
168
169 add_library(TestNotificationsPlugin MODULE ${TestNotificationsPlugin_SOURCES})
170
171-qt5_use_modules(TestNotificationsPlugin Core Quick)
172+target_link_libraries(TestNotificationsPlugin Qt5::Core Qt5::Quick)
173
174 target_link_libraries(TestNotificationsPlugin NotificationsMocks)
175
176
177=== modified file 'test/qmltest/mocks/plugins/Unity/Notifications/Mocks/CMakeLists.txt'
178--- test/qmltest/mocks/plugins/Unity/Notifications/Mocks/CMakeLists.txt 2013-05-14 08:12:15 +0000
179+++ test/qmltest/mocks/plugins/Unity/Notifications/Mocks/CMakeLists.txt 2018-10-04 23:21:00 +0000
180@@ -4,7 +4,9 @@
181
182 add_library(MockNotificationsPlugin MODULE ${MockNotificationsPlugin_SOURCES})
183
184-qt5_use_modules(MockNotificationsPlugin Core Quick)
185+#find_package(Qt5Core REQUIRED)
186+#find_package(Qt5Quick REQUIRED)
187+target_link_libraries(MockNotificationsPlugin Qt5::Core Qt5::Quick)
188
189 target_link_libraries(MockNotificationsPlugin NotificationsMocks)
190
191
192=== modified file 'test/qmltest/mocks/plugins/Unity/Scopes/CMakeLists.txt'
193--- test/qmltest/mocks/plugins/Unity/Scopes/CMakeLists.txt 2016-03-10 10:26:13 +0000
194+++ test/qmltest/mocks/plugins/Unity/Scopes/CMakeLists.txt 2018-10-04 23:21:00 +0000
195@@ -39,7 +39,7 @@
196
197 add_library(ScopesMocks SHARED ${ScopesMocks_SOURCES})
198
199-qt5_use_modules(ScopesMocks Core)
200+target_link_libraries(ScopesMocks Qt5::Core)
201
202 set(TestScopesPlugin_SOURCES
203 TestScopesPlugin.cpp
204@@ -47,7 +47,7 @@
205
206 add_library(TestScopesPlugin MODULE ${TestScopesPlugin_SOURCES})
207
208-qt5_use_modules(TestScopesPlugin Core Quick)
209+target_link_libraries(TestScopesPlugin Qt5::Core Qt5::Quick)
210
211 target_link_libraries(TestScopesPlugin ScopesMocks)
212
213
214=== modified file 'test/qmltest/modules/TestUtil/CMakeLists.txt'
215--- test/qmltest/modules/TestUtil/CMakeLists.txt 2014-09-12 16:59:50 +0000
216+++ test/qmltest/modules/TestUtil/CMakeLists.txt 2018-10-04 23:21:00 +0000
217@@ -15,7 +15,7 @@
218
219 add_library(TestUtilQml MODULE ${TestUtilQML_SOURCES})
220
221-qt5_use_modules(TestUtilQml Core Quick)
222+target_link_libraries(TestUtilQml Qt5::Core Qt5::Quick)
223
224 # copy qmldir file into build directory for shadow builds
225 file(GLOB QML_JS_FILES qmldir *.js *.qml)

Subscribers

People subscribed via source and target branches

to all changes: