Merge lp:~mardy/ubuntu-system-settings-online-accounts/optional-mir into lp:~mardy/ubuntu-system-settings-online-accounts/master

Proposed by Alberto Mardegan
Status: Merged
Merged at revision: 135
Proposed branch: lp:~mardy/ubuntu-system-settings-online-accounts/optional-mir
Merge into: lp:~mardy/ubuntu-system-settings-online-accounts/master
Diff against target: 128 lines (+79/-3)
4 files modified
debian/control (+1/-1)
debian/rules (+1/-0)
online-accounts-service/mir-helper-stub.cpp (+69/-0)
online-accounts-service/online-accounts-service.pro (+8/-2)
To merge this branch: bzr merge lp:~mardy/ubuntu-system-settings-online-accounts/optional-mir
Reviewer Review Type Date Requested Status
David Barth (community) Approve
Alberto Mardegan Pending
Review via email: mp+231188@code.launchpad.net

Commit message

Make the Mir dependency optional, as it's not available for all architectures.

Description of the change

Make the Mir dependency optional, as it's not available for all architectures.

To post a comment you must log in.
Revision history for this message
David Barth (dbarth) :
review: Approve

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 2014-08-12 12:33:10 +0000
3+++ debian/control 2014-08-18 13:26:04 +0000
4@@ -6,7 +6,7 @@
5 pkg-config,
6 python3:any,
7 libaccounts-qt5-dev,
8- libmirclient-dev,
9+ libmirclient-dev [!powerpc !ppc64 !ppc64el],
10 libnotify-dev,
11 libsignon-qt5-dev,
12 libsystemsettings-dev (>= 0.1+13.10.20130806),
13
14=== modified file 'debian/rules'
15--- debian/rules 2014-06-06 08:10:04 +0000
16+++ debian/rules 2014-08-18 13:26:04 +0000
17@@ -8,6 +8,7 @@
18 dh_auto_configure -- \
19 LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH) \
20 "QMAKE_CXXFLAGS=$(CFLAGS)" \
21+ CONFIG+=enable-mir \
22 CONFIG+=ubuntu-docs \
23 ubuntu-system-settings-online-accounts.pro
24
25
26=== added file 'online-accounts-service/mir-helper-stub.cpp'
27--- online-accounts-service/mir-helper-stub.cpp 1970-01-01 00:00:00 +0000
28+++ online-accounts-service/mir-helper-stub.cpp 2014-08-18 13:26:04 +0000
29@@ -0,0 +1,69 @@
30+/*
31+ * Copyright (C) 2014 Canonical Ltd.
32+ *
33+ * Contact: Alberto Mardegan <alberto.mardegan@canonical.com>
34+ *
35+ * This file is part of online-accounts-ui
36+ *
37+ * This program is free software: you can redistribute it and/or modify it
38+ * under the terms of the GNU General Public License version 3, as published
39+ * by the Free Software Foundation.
40+ *
41+ * This program is distributed in the hope that it will be useful, but
42+ * WITHOUT ANY WARRANTY; without even the implied warranties of
43+ * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
44+ * PURPOSE. See the GNU General Public License for more details.
45+ *
46+ * You should have received a copy of the GNU General Public License along
47+ * with this program. If not, see <http://www.gnu.org/licenses/>.
48+ */
49+
50+#include "debug.h"
51+#include "mir-helper.h"
52+
53+using namespace OnlineAccountsUi;
54+
55+namespace OnlineAccountsUi {
56+
57+static MirHelper *m_instance = 0;
58+
59+} // namespace
60+
61+PromptSession::PromptSession(PromptSessionPrivate *priv):
62+ d_ptr(priv)
63+{
64+}
65+
66+PromptSession::~PromptSession()
67+{
68+}
69+
70+QString PromptSession::requestSocket()
71+{
72+ return QString();
73+}
74+
75+MirHelper::MirHelper(QObject *parent):
76+ QObject(parent),
77+ d_ptr(0)
78+{
79+}
80+
81+MirHelper::~MirHelper()
82+{
83+ m_instance = 0;
84+}
85+
86+MirHelper *MirHelper::instance()
87+{
88+ if (!m_instance) {
89+ m_instance = new MirHelper;
90+ }
91+ return m_instance;
92+}
93+
94+PromptSession *MirHelper::createPromptSession(pid_t initiatorPid)
95+{
96+ Q_UNUSED(initiatorPid);
97+ return 0;
98+}
99
100=== modified file 'online-accounts-service/online-accounts-service.pro'
101--- online-accounts-service/online-accounts-service.pro 2014-08-12 12:33:10 +0000
102+++ online-accounts-service/online-accounts-service.pro 2014-08-18 13:26:04 +0000
103@@ -16,9 +16,16 @@
104 PKGCONFIG += \
105 libnotify \
106 libsignon-qt5 \
107- mirclient \
108 signon-plugins-common
109
110+
111+CONFIG(enable-mir) : system(pkg-config --exists mirclient) {
112+ PKGCONFIG += mirclient
113+ SOURCES += mir-helper.cpp
114+} else {
115+ SOURCES += mir-helper-stub.cpp
116+}
117+
118 DBUS_ADAPTORS += \
119 com.ubuntu.OnlineAccountsUi.xml
120
121@@ -39,7 +46,6 @@
122 inactivity-timer.cpp \
123 indicator-service.cpp \
124 main.cpp \
125- mir-helper.cpp \
126 reauthenticator.cpp \
127 request.cpp \
128 request-manager.cpp \

Subscribers

People subscribed via source and target branches

to all changes: