unity8: remove (mir does not build anymore)

Related: https://gitlab.com/postmarketOS/pmaports/issues/357
This commit is contained in:
Oliver Smith 2019-09-14 02:16:04 +02:00
parent d1078bc319
commit 7d005e693e
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
65 changed files with 0 additions and 5496 deletions

View file

@ -1,378 +0,0 @@
From 0e3381dc788670849751dcb01b4257b56095b334 Mon Sep 17 00:00:00 2001
From: Luca Weiss <luca@z3ntu.xyz>
Date: Thu, 27 Sep 2018 23:31:06 +0200
Subject: [PATCH 1/4] 0001-formats-locale-property.patch
---
data/org.freedesktop.Accounts.User.xml | 45 +++++++++++++++
src/libaccountsservice/act-user.c | 69 +++++++++++++++++++++++
src/libaccountsservice/act-user.h | 3 +
src/user.c | 76 ++++++++++++++++++++++++++
4 files changed, 193 insertions(+)
diff --git a/data/org.freedesktop.Accounts.User.xml b/data/org.freedesktop.Accounts.User.xml
index 4ab989a..0856974 100644
--- a/data/org.freedesktop.Accounts.User.xml
+++ b/data/org.freedesktop.Accounts.User.xml
@@ -150,6 +150,41 @@
</doc:doc>
</method>
+ <method name="SetFormatsLocale">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <arg name="formats_locale" direction="in" type="s">
+ <doc:doc>
+ <doc:summary>
+ The new regional formats, as a locale specification like "de_DE.UTF-8".
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ Sets the users regional formats.
+ </doc:para>
+ </doc:description>
+ <doc:permission>
+ The caller needs one of the following PolicyKit authorizations:
+ <doc:list>
+ <doc:item>
+ <doc:term>org.freedesktop.accounts.change-own-user-data</doc:term>
+ <doc:definition>To change his own language</doc:definition>
+ </doc:item>
+ <doc:item>
+ <doc:term>org.freedesktop.accounts.user-administration</doc:term>
+ <doc:definition>To change the language of another user</doc:definition>
+ </doc:item>
+ </doc:list>
+ </doc:permission>
+ <doc:errors>
+ <doc:error name="org.freedesktop.Accounts.Error.PermissionDenied">if the caller lacks the appropriate PolicyKit authorization</doc:error>
+ <doc:error name="org.freedesktop.Accounts.Error.Failed">if the operation failed</doc:error>
+ </doc:errors>
+ </doc:doc>
+ </method>
+
<method name="SetXSession">
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="user_set_x_session"/>
@@ -668,6 +703,16 @@
</doc:doc>
</property>
+ <property name="FormatsLocale" type="s" access="read">
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ The users regional formats, as a locale specification like "de_DE.UTF-8".
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </property>
+
<property name="XSession" type="s" access="read">
<doc:doc>
<doc:description>
diff --git a/src/libaccountsservice/act-user.c b/src/libaccountsservice/act-user.c
index dbb9b53..c0b52db 100644
--- a/src/libaccountsservice/act-user.c
+++ b/src/libaccountsservice/act-user.c
@@ -93,6 +93,7 @@ enum {
PROP_LOGIN_HISTORY,
PROP_ICON_FILE,
PROP_LANGUAGE,
+ PROP_FORMATS_LOCALE,
PROP_X_SESSION,
PROP_IS_LOADED
};
@@ -122,6 +123,7 @@ struct _ActUser {
char *location;
char *icon_file;
char *language;
+ char *formats_locale;
char *x_session;
GList *our_sessions;
GList *other_sessions;
@@ -308,6 +310,9 @@ act_user_get_property (GObject *object,
case PROP_LANGUAGE:
g_value_set_string (value, user->language);
break;
+ case PROP_FORMATS_LOCALE:
+ g_value_set_string (value, user->formats_locale);
+ break;
case PROP_X_SESSION:
g_value_set_string (value, user->x_session);
break;
@@ -463,6 +468,13 @@ act_user_class_init (ActUserClass *class)
"User's locale.",
NULL,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+ g_object_class_install_property (gobject_class,
+ PROP_FORMATS_LOCALE,
+ g_param_spec_string ("formats_locale",
+ "Regional Formats",
+ "User's regional formats.",
+ NULL,
+ G_PARAM_READABLE));
g_object_class_install_property (gobject_class,
PROP_X_SESSION,
g_param_spec_string ("x-session",
@@ -583,6 +595,7 @@ act_user_finalize (GObject *object)
g_free (user->location);
if (user->login_history)
g_variant_unref (user->login_history);
+ g_free (user->formats_locale);
if (user->accounts_proxy != NULL) {
g_object_unref (user->accounts_proxy);
@@ -1051,6 +1064,22 @@ act_user_get_language (ActUser *user)
return user->language;
}
+/**
+ * act_user_get_formats_locale:
+ * @user: a #ActUser
+ *
+ * Returns the path to the configured formats locale of @user.
+ *
+ * Returns: (transfer none): a path to an icon
+ */
+const char *
+act_user_get_formats_locale (ActUser *user)
+{
+ g_return_val_if_fail (ACT_IS_USER (user), NULL);
+
+ return user->formats_locale;
+}
+
/**
* act_user_get_x_session:
* @user: a #ActUser
@@ -1279,6 +1308,17 @@ collect_props (const gchar *key,
user->language = g_strdup (new_language);
g_object_notify (G_OBJECT (user), "language");
}
+
+ } else if (strcmp (key, "FormatsLocale") == 0) {
+ const char *new_formats_locale;
+
+ new_formats_locale = g_variant_get_string (value, NULL);
+ if (g_strcmp0 (user->formats_locale, new_formats_locale) != 0) {
+ g_free (user->formats_locale);
+ user->formats_locale = g_strdup (new_formats_locale);
+ g_object_notify (G_OBJECT (user), "formats_locale");
+ }
+
} else if (strcmp (key, "XSession") == 0) {
const char *new_x_session;
@@ -1618,6 +1658,35 @@ act_user_get_password_expiration_policy (ActUser *user,
}
}
+/**
+ * act_user_set_formats_locale:
+ * @user: the user object to alter.
+ * @formats_locale: a locale (e.g. en_US.utf8)
+ *
+ * Assigns a new formats locale for @user.
+ *
+ * Note this function is synchronous and ignores errors.
+ **/
+void
+act_user_set_formats_locale (ActUser *user,
+ const char *formats_locale)
+{
+ GError *error = NULL;
+
+ g_return_if_fail (ACT_IS_USER (user));
+ g_return_if_fail (formats_locale != NULL);
+ g_return_if_fail (ACCOUNTS_IS_USER (user->accounts_proxy));
+
+ if (!accounts_user_call_set_formats_locale_sync (user->accounts_proxy,
+ formats_locale,
+ NULL,
+ &error)) {
+ g_warning ("SetFormatsLocale call failed: %s", error->message);
+ g_error_free (error);
+ return;
+ }
+}
+
/**
* act_user_set_email:
* @user: the user object to alter.
diff --git a/src/libaccountsservice/act-user.h b/src/libaccountsservice/act-user.h
index 76dceb6..e026ce2 100644
--- a/src/libaccountsservice/act-user.h
+++ b/src/libaccountsservice/act-user.h
@@ -77,6 +77,7 @@ gboolean act_user_is_local_account (ActUser *user);
gboolean act_user_is_nonexistent (ActUser *user);
const char *act_user_get_icon_file (ActUser *user);
const char *act_user_get_language (ActUser *user);
+const char *act_user_get_formats_locale (ActUser *user);
const char *act_user_get_x_session (ActUser *user);
const char *act_user_get_primary_session_id (ActUser *user);
@@ -96,6 +97,8 @@ void act_user_set_email (ActUser *user,
const char *email);
void act_user_set_language (ActUser *user,
const char *language);
+void act_user_set_formats_locale (ActUser *user,
+ const char *formats_locale);
void act_user_set_x_session (ActUser *user,
const char *x_session);
void act_user_set_location (ActUser *user,
diff --git a/src/user.c b/src/user.c
index 802d07a..e0dc56a 100644
--- a/src/user.c
+++ b/src/user.c
@@ -58,6 +58,7 @@ enum {
PROP_SHELL,
PROP_EMAIL,
PROP_LANGUAGE,
+ PROP_FORMATS_LOCALE,
PROP_X_SESSION,
PROP_LOCATION,
PROP_LOGIN_FREQUENCY,
@@ -93,6 +94,7 @@ struct User {
gchar *shell;
gchar *email;
gchar *language;
+ gchar *formats_locale;
gchar *x_session;
gchar *location;
guint64 login_frequency;
@@ -319,6 +321,13 @@ user_update_from_keyfile (User *user,
g_object_notify (G_OBJECT (user), "language");
}
+ s = g_key_file_get_string (keyfile, "User", "FormatsLocale", NULL);
+ if (s != NULL) {
+ g_free (user->formats_locale);
+ user->formats_locale = s;
+ g_object_notify (G_OBJECT (user), "formats-locale");
+ }
+
s = g_key_file_get_string (keyfile, "User", "XSession", NULL);
if (s != NULL) {
g_free (user->x_session);
@@ -402,6 +411,9 @@ user_save_to_keyfile (User *user,
if (user->language)
g_key_file_set_string (keyfile, "User", "Language", user->language);
+ if (user->formats_locale)
+ g_key_file_set_string (keyfile, "User", "FormatsLocale", user->formats_locale);
+
if (user->x_session)
g_key_file_set_string (keyfile, "User", "XSession", user->x_session);
@@ -1103,6 +1115,61 @@ user_set_language (AccountsUser *auser,
return TRUE;
}
+static void
+user_change_formats_locale_authorized_cb (Daemon *daemon,
+ User *user,
+ GDBusMethodInvocation *context,
+ gpointer data)
+
+{
+ gchar *formats_locale = data;
+
+ if (g_strcmp0 (user->formats_locale, formats_locale) != 0) {
+ g_free (user->formats_locale);
+ user->formats_locale = g_strdup (formats_locale);
+
+ save_extra_data (user);
+
+ accounts_user_emit_changed (ACCOUNTS_USER (user));
+
+ g_object_notify (G_OBJECT (user), "formats_locale");
+ }
+
+ accounts_user_complete_set_formats_locale (ACCOUNTS_USER (user), context);
+}
+
+gboolean
+user_set_formats_locale (AccountsUser *auser,
+ GDBusMethodInvocation *context,
+ const gchar *formats_locale)
+{
+ User *user = (User*)auser;
+
+ int uid;
+ const gchar *action_id;
+
+ if (!get_caller_uid (context, &uid)) {
+ throw_error (context, ERROR_FAILED, "identifying caller failed");
+ return FALSE;
+ }
+
+ if (user->uid == (uid_t) uid)
+ action_id = "org.freedesktop.accounts.change-own-user-data";
+ else
+ action_id = "org.freedesktop.accounts.user-administration";
+
+ daemon_local_check_auth (user->daemon,
+ user,
+ action_id,
+ TRUE,
+ user_change_formats_locale_authorized_cb,
+ context,
+ g_strdup (formats_locale),
+ (GDestroyNotify) g_free);
+
+ return TRUE;
+}
+
static void
user_change_x_session_authorized_cb (Daemon *daemon,
User *user,
@@ -2209,6 +2276,7 @@ user_finalize (GObject *object)
g_free (user->default_icon_file);
g_free (user->email);
g_free (user->language);
+ g_free (user->formats_locale);
g_free (user->x_session);
g_free (user->location);
g_free (user->password_hint);
@@ -2235,6 +2303,9 @@ user_set_property (GObject *object,
case PROP_LANGUAGE:
user->language = g_value_dup_string (value);
break;
+ case PROP_FORMATS_LOCALE:
+ user->formats_locale = g_value_dup_string (value);
+ break;
case PROP_X_SESSION:
user->x_session = g_value_dup_string (value);
break;
@@ -2303,6 +2374,9 @@ user_get_property (GObject *object,
case PROP_LANGUAGE:
g_value_set_string (value, user->language);
break;
+ case PROP_FORMATS_LOCALE:
+ g_value_set_string (value, user->formats_locale);
+ break;
case PROP_X_SESSION:
g_value_set_string (value, user->x_session);
break;
@@ -2366,6 +2440,7 @@ user_accounts_user_iface_init (AccountsUserIface *iface)
iface->handle_set_account_type = user_set_account_type;
iface->handle_set_automatic_login = user_set_automatic_login;
iface->handle_set_email = user_set_email;
+ iface->handle_set_formats_locale = user_set_formats_locale;
iface->handle_set_home_directory = user_set_home_directory;
iface->handle_set_icon_file = user_set_icon_file;
iface->handle_set_language = user_set_language;
@@ -2414,6 +2489,7 @@ user_init (User *user)
user->default_icon_file = NULL;
user->email = NULL;
user->language = NULL;
+ user->formats_locale = NULL;
user->x_session = NULL;
user->location = NULL;
user->password_mode = PASSWORD_MODE_REGULAR;
--
2.20.1

View file

@ -1,190 +0,0 @@
From 5f8f807b2a9a22d203d948127b24e5790b6b64b9 Mon Sep 17 00:00:00 2001
From: Luca Weiss <luca@z3ntu.xyz>
Date: Thu, 27 Sep 2018 23:31:06 +0200
Subject: [PATCH 2/4] 0007-add-lightdm-support.patch
---
src/daemon.c | 143 +++++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 132 insertions(+), 11 deletions(-)
diff --git a/src/daemon.c b/src/daemon.c
index 312394a..ae59e50 100644
--- a/src/daemon.c
+++ b/src/daemon.c
@@ -1413,10 +1413,10 @@ daemon_local_check_auth (Daemon *daemon,
}
gboolean
-load_autologin (Daemon *daemon,
- gchar **name,
- gboolean *enabled,
- GError **error)
+load_autologin_gdm (Daemon *daemon,
+ gchar **name,
+ gboolean *enabled,
+ GError **error)
{
GKeyFile *keyfile;
GError *local_error;
@@ -1459,23 +1459,89 @@ load_autologin (Daemon *daemon,
return TRUE;
}
-static gboolean
-save_autologin (Daemon *daemon,
- const gchar *name,
- gboolean enabled,
+gboolean
+load_autologin_lightdm (Daemon *daemon,
+ gchar **name,
+ gboolean *enabled,
+ GError **error)
+{
+ GKeyFile *keyfile;
+ const gchar *filename;
+
+ filename = "/etc/lightdm/lightdm.conf";
+
+ keyfile = g_key_file_new ();
+ if (!g_key_file_load_from_file (keyfile,
+ filename,
+ G_KEY_FILE_KEEP_COMMENTS,
+ error)) {
+ g_key_file_free (keyfile);
+ return FALSE;
+ }
+
+ *name = g_key_file_get_string (keyfile, "SeatDefaults", "autologin-user", error);
+ *enabled = (*error == NULL && (*name) && (*name)[0] != 0);
+
+ g_key_file_free (keyfile);
+
+ return (*error == NULL);
+}
+
+gboolean
+load_autologin (Daemon *daemon,
+ gchar **name,
+ gboolean *enabled,
GError **error)
+{
+ GDBusProxy *proxy;
+
+ /* First, determine whether we should load GDM or LightDM values by
+ checking if GDM is running. */
+ proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
+ G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES|
+ G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS|
+ G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
+ NULL,
+ "org.gnome.DisplayManager",
+ "/org/gnome/DisplayManager/Manager",
+ "org.gnome.DisplayManager.Manager",
+ NULL, /* GCancellable */
+ NULL); /* GError */
+
+ if (proxy != NULL) {
+ g_object_unref (proxy);
+ return load_autologin_gdm (daemon, name, enabled, error);
+ } else {
+ return load_autologin_lightdm (daemon, name, enabled, error);
+ }
+}
+
+static gboolean
+save_autologin_gdm (Daemon *daemon,
+ const gchar *name,
+ gboolean enabled,
+ GError **error)
{
GKeyFile *keyfile;
gchar *data;
gboolean result;
+ GError *local_error = NULL;
+
+ if (!g_file_test ("/etc/gdm3", G_FILE_TEST_EXISTS))
+ return TRUE; /* not an error, just not installed */
keyfile = g_key_file_new ();
if (!g_key_file_load_from_file (keyfile,
PATH_GDM_CUSTOM,
G_KEY_FILE_KEEP_COMMENTS,
- error)) {
- g_key_file_free (keyfile);
- return FALSE;
+ &local_error)) {
+ /* It's OK for custom.conf to not exist, we will make it */
+ if (!g_error_matches (local_error, G_FILE_ERROR, G_FILE_ERROR_NOENT)) {
+ g_propagate_error (error, local_error);
+ g_key_file_free (keyfile);
+ return FALSE;
+ }
+ g_error_free (local_error);
}
g_key_file_set_string (keyfile, "daemon", "AutomaticLoginEnable", enabled ? "True" : "False");
@@ -1490,6 +1556,61 @@ save_autologin (Daemon *daemon,
return result;
}
+static gboolean
+save_autologin_lightdm (Daemon *daemon,
+ const gchar *name,
+ gboolean enabled,
+ GError **error)
+{
+ GKeyFile *keyfile;
+ const gchar *filename;
+ gchar *data;
+ gboolean result;
+ GError *local_error = NULL;
+
+ if (!g_file_test ("/etc/lightdm", G_FILE_TEST_EXISTS))
+ return TRUE; /* not an error, just not installed */
+
+ filename = "/etc/lightdm/lightdm.conf";
+
+ keyfile = g_key_file_new ();
+ if (!g_key_file_load_from_file (keyfile,
+ filename,
+ G_KEY_FILE_KEEP_COMMENTS,
+ &local_error)) {
+ /* It's OK for custom.conf to not exist, we will make it */
+ if (!g_error_matches (local_error, G_FILE_ERROR, G_FILE_ERROR_NOENT)) {
+ g_propagate_error (error, local_error);
+ g_key_file_free (keyfile);
+ return FALSE;
+ }
+ g_error_free (local_error);
+ }
+
+ g_key_file_set_string (keyfile, "SeatDefaults", "autologin-user", enabled ? name : "");
+
+ data = g_key_file_to_data (keyfile, NULL, NULL);
+ result = g_file_set_contents (filename, data, -1, error);
+
+ g_key_file_free (keyfile);
+ g_free (data);
+
+ return result;
+}
+
+static gboolean
+save_autologin (Daemon *daemon,
+ const gchar *name,
+ gboolean enabled,
+ GError **error)
+{
+ if (!save_autologin_gdm (daemon, name, enabled, error))
+ return FALSE;
+ if (!save_autologin_lightdm (daemon, name, enabled, error))
+ return FALSE;
+ return TRUE;
+}
+
gboolean
daemon_local_set_automatic_login (Daemon *daemon,
User *user,
--
2.20.1

View file

@ -1,369 +0,0 @@
From bf5c35a6ffec43378f7a7483642e866b5efbcfdb Mon Sep 17 00:00:00 2001
From: Luca Weiss <luca@z3ntu.xyz>
Date: Thu, 27 Sep 2018 23:31:07 +0200
Subject: [PATCH 3/4] 0011-add-background-file-support.patch
---
data/org.freedesktop.Accounts.User.xml | 45 ++++++++++++
src/libaccountsservice/act-user.c | 67 ++++++++++++++++++
src/user.c | 98 ++++++++++++++++++++++++++
3 files changed, 210 insertions(+)
diff --git a/data/org.freedesktop.Accounts.User.xml b/data/org.freedesktop.Accounts.User.xml
index 0856974..103661c 100644
--- a/data/org.freedesktop.Accounts.User.xml
+++ b/data/org.freedesktop.Accounts.User.xml
@@ -331,6 +331,41 @@
</doc:doc>
</method>
+ <method name="SetBackgroundFile">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <arg name="filename" direction="in" type="s">
+ <doc:doc>
+ <doc:summary>
+ The absolute filename of a png file to use as the users background.
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ Sets the users background.
+ </doc:para>
+ </doc:description>
+ <doc:permission>
+ The caller needs one of the following PolicyKit authorizations:
+ <doc:list>
+ <doc:item>
+ <doc:term>org.freedesktop.accounts.change-own-user-data</doc:term>
+ <doc:definition>To change his own background</doc:definition>
+ </doc:item>
+ <doc:item>
+ <doc:term>org.freedesktop.accounts.user-administration</doc:term>
+ <doc:definition>To change the background of another user</doc:definition>
+ </doc:item>
+ </doc:list>
+ </doc:permission>
+ <doc:errors>
+ <doc:error name="org.freedesktop.Accounts.Error.PermissionDenied">if the caller lacks the appropriate PolicyKit authorization</doc:error>
+ <doc:error name="org.freedesktop.Accounts.Error.Failed">if the operation failed</doc:error>
+ </doc:errors>
+ </doc:doc>
+ </method>
+
<method name="SetIconFile">
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<arg name="filename" direction="in" type="s">
@@ -770,6 +805,16 @@
</doc:doc>
</property>
+ <property name="BackgroundFile" type="s" access="read">
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ The filename of a png file containing the users background.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </property>
+
<property name="IconFile" type="s" access="read">
<doc:doc>
<doc:description>
diff --git a/src/libaccountsservice/act-user.c b/src/libaccountsservice/act-user.c
index c0b52db..36d1ade 100644
--- a/src/libaccountsservice/act-user.c
+++ b/src/libaccountsservice/act-user.c
@@ -91,6 +91,7 @@ enum {
PROP_LOGIN_FREQUENCY,
PROP_LOGIN_TIME,
PROP_LOGIN_HISTORY,
+ PROP_BACKGROUND_FILE,
PROP_ICON_FILE,
PROP_LANGUAGE,
PROP_FORMATS_LOCALE,
@@ -121,6 +122,7 @@ struct _ActUser {
char *shell;
char *email;
char *location;
+ char *background_file;
char *icon_file;
char *language;
char *formats_locale;
@@ -304,6 +306,9 @@ act_user_get_property (GObject *object,
case PROP_LOCATION:
g_value_set_string (value, user->location);
break;
+ case PROP_BACKGROUND_FILE:
+ g_value_set_string (value, user->background_file);
+ break;
case PROP_ICON_FILE:
g_value_set_string (value, user->icon_file);
break;
@@ -454,6 +459,13 @@ act_user_class_init (ActUserClass *class)
G_VARIANT_TYPE ("a(xxa{sv})"),
NULL,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+ g_object_class_install_property (gobject_class,
+ PROP_BACKGROUND_FILE,
+ g_param_spec_string ("background-file",
+ "Background File",
+ "The path to a background for this user.",
+ NULL,
+ G_PARAM_READABLE));
g_object_class_install_property (gobject_class,
PROP_ICON_FILE,
g_param_spec_string ("icon-file",
@@ -585,6 +597,7 @@ act_user_finalize (GObject *object)
g_free (user->user_name);
g_free (user->real_name);
+ g_free (user->background_file);
g_free (user->icon_file);
g_free (user->language);
g_free (user->object_path);
@@ -1032,6 +1045,22 @@ act_user_is_nonexistent (ActUser *user)
return user->nonexistent;
}
+/**
+ * act_user_get_background_file:
+ * @user: a #ActUser
+ *
+ * Returns the path to the account background belonging to @user.
+ *
+ * Returns: (transfer none): a path to a background
+ */
+const char *
+act_user_get_background_file (ActUser *user)
+{
+ g_return_val_if_fail (ACT_IS_USER (user), NULL);
+
+ return user->background_file;
+}
+
/**
* act_user_get_icon_file:
* @user: a #ActUser
@@ -1290,6 +1319,15 @@ collect_props (const gchar *key,
user->login_history = g_variant_ref (new_login_history);
g_object_notify (G_OBJECT (user), "login-history");
}
+ } else if (strcmp (key, "BackgroundFile") == 0) {
+ const char *new_background_file;
+
+ new_background_file = g_variant_get_string (value, NULL);
+ if (g_strcmp0 (user->background_file, new_background_file) != 0) {
+ g_free (user->background_file);
+ user->background_file = g_strdup (new_background_file);
+ g_object_notify (G_OBJECT (user), "background-file");
+ }
} else if (strcmp (key, "IconFile") == 0) {
const char *new_icon_file;
@@ -1745,6 +1783,35 @@ act_user_set_language (ActUser *user,
}
}
+/**
+ * act_user_set_background_file:
+ * @user: the user object to alter.
+ * @background_file: path to an background
+ *
+ * Assigns a new background for @user.
+ *
+ * Note this function is synchronous and ignores errors.
+ **/
+void
+act_user_set_background_file (ActUser *user,
+ const char *background_file)
+{
+ GError *error = NULL;
+
+ g_return_if_fail (ACT_IS_USER (user));
+ g_return_if_fail (background_file != NULL);
+ g_return_if_fail (ACCOUNTS_IS_USER (user->accounts_proxy));
+
+ if (!accounts_user_call_set_background_file_sync (user->accounts_proxy,
+ background_file,
+ NULL,
+ &error)) {
+ g_warning ("SetBackgroundFile call failed: %s", error->message);
+ g_error_free (error);
+ return;
+ }
+}
+
/**
* act_user_set_x_session:
* @user: the user object to alter.
diff --git a/src/user.c b/src/user.c
index e0dc56a..c32971e 100644
--- a/src/user.c
+++ b/src/user.c
@@ -64,6 +64,7 @@ enum {
PROP_LOGIN_FREQUENCY,
PROP_LOGIN_TIME,
PROP_LOGIN_HISTORY,
+ PROP_BACKGROUND_FILE,
PROP_ICON_FILE,
PROP_LOCKED,
PROP_PASSWORD_MODE,
@@ -98,6 +99,7 @@ struct User {
gchar *x_session;
gchar *location;
guint64 login_frequency;
+ gchar *background_file;
gint64 login_time;
gint64 expiration_time;
gint64 last_change_time;
@@ -356,6 +358,13 @@ user_update_from_keyfile (User *user,
g_object_notify (G_OBJECT (user), "password-hint");
}
+ s = g_key_file_get_string (keyfile, "User", "Background", NULL);
+ if (s != NULL) {
+ g_free (user->background_file);
+ user->background_file = s;
+ g_object_notify (G_OBJECT (user), "background-file");
+ }
+
s = g_key_file_get_string (keyfile, "User", "Icon", NULL);
if (s != NULL) {
g_free (user->icon_file);
@@ -423,6 +432,9 @@ user_save_to_keyfile (User *user,
if (user->password_hint)
g_key_file_set_string (keyfile, "User", "PasswordHint", user->password_hint);
+ if (user->background_file)
+ g_key_file_set_string (keyfile, "User", "Background", user->background_file);
+
if (user->icon_file)
g_key_file_set_string (keyfile, "User", "Icon", user->icon_file);
@@ -1460,6 +1472,86 @@ become_user (gpointer data)
}
}
+static void
+user_change_background_file_authorized_cb (Daemon *daemon,
+ User *user,
+ GDBusMethodInvocation *context,
+ gpointer data)
+{
+ gchar *filename;
+ GFile *file;
+ GFileInfo *info;
+ GFileType type;
+
+ filename = g_strdup (data);
+
+ if (filename == NULL ||
+ *filename == '\0') {
+ g_free (filename);
+ filename = NULL;
+
+ goto background_saved;
+ }
+
+ file = g_file_new_for_path (filename);
+ info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_TYPE,
+ 0, NULL, NULL);
+ type = g_file_info_get_file_type (info);
+
+ g_object_unref (info);
+ g_object_unref (file);
+
+ if (type != G_FILE_TYPE_REGULAR) {
+ g_debug ("not a regular file\n");
+ throw_error (context, ERROR_FAILED, "file '%s' is not a regular file", filename);
+ g_free (filename);
+ return;
+ }
+
+background_saved:
+ g_free (user->background_file);
+ user->background_file = filename;
+
+ save_extra_data (user);
+
+ accounts_user_emit_changed (ACCOUNTS_USER (user));
+
+ g_object_notify (G_OBJECT (user), "background-file");
+
+ accounts_user_complete_set_background_file (ACCOUNTS_USER (user), context);
+}
+
+gboolean
+user_set_background_file (AccountsUser *auser,
+ GDBusMethodInvocation *context,
+ const gchar *filename)
+{
+ User *user = (User*)auser;
+ int uid;
+ const gchar *action_id;
+
+ if (!get_caller_uid (context, &uid)) {
+ throw_error (context, ERROR_FAILED, "identifying caller failed");
+ return FALSE;
+ }
+
+ if (user->uid == (uid_t) uid)
+ action_id = "org.freedesktop.accounts.change-own-user-data";
+ else
+ action_id = "org.freedesktop.accounts.user-administration";
+
+ daemon_local_check_auth (user->daemon,
+ user,
+ action_id,
+ TRUE,
+ user_change_background_file_authorized_cb,
+ context,
+ g_strdup (filename),
+ (GDestroyNotify)g_free);
+
+ return TRUE;
+}
+
static void
user_change_icon_file_authorized_cb (Daemon *daemon,
User *user,
@@ -2274,6 +2366,7 @@ user_finalize (GObject *object)
g_free (user->shell);
g_free (user->icon_file);
g_free (user->default_icon_file);
+ g_free (user->background_file);
g_free (user->email);
g_free (user->language);
g_free (user->formats_locale);
@@ -2383,6 +2476,9 @@ user_get_property (GObject *object,
case PROP_LOCATION:
g_value_set_string (value, user->location);
break;
+ case PROP_BACKGROUND_FILE:
+ g_value_set_string (value, user->background_file);
+ break;
case PROP_ICON_FILE:
if (user->icon_file)
g_value_set_string (value, user->icon_file);
@@ -2439,6 +2535,7 @@ user_accounts_user_iface_init (AccountsUserIface *iface)
{
iface->handle_set_account_type = user_set_account_type;
iface->handle_set_automatic_login = user_set_automatic_login;
+ iface->handle_set_background_file = user_set_background_file;
iface->handle_set_email = user_set_email;
iface->handle_set_formats_locale = user_set_formats_locale;
iface->handle_set_home_directory = user_set_home_directory;
@@ -2485,6 +2582,7 @@ user_init (User *user)
user->account_type = ACCOUNT_TYPE_STANDARD;
user->home_dir = NULL;
user->shell = NULL;
+ user->background_file = NULL;
user->icon_file = NULL;
user->default_icon_file = NULL;
user->email = NULL;
--
2.20.1

View file

@ -1,570 +0,0 @@
From a1b09a0d0243ac3a7fbd26c176a274dd3716f391 Mon Sep 17 00:00:00 2001
From: Luca Weiss <luca@z3ntu.xyz>
Date: Thu, 27 Sep 2018 23:32:49 +0200
Subject: [PATCH 4/4] 0016-add-input-sources-support.patch
---
data/org.freedesktop.Accounts.User.xml | 45 ++++++
src/libaccountsservice/act-user.c | 82 ++++++++++
src/libaccountsservice/act-user.h | 3 +
src/user.c | 213 +++++++++++++++++++++++++
4 files changed, 343 insertions(+)
diff --git a/data/org.freedesktop.Accounts.User.xml b/data/org.freedesktop.Accounts.User.xml
index 103661c..ede2a19 100644
--- a/data/org.freedesktop.Accounts.User.xml
+++ b/data/org.freedesktop.Accounts.User.xml
@@ -185,6 +185,41 @@
</doc:doc>
</method>
+ <method name="SetInputSources">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <arg name="sources" direction="in" type="aa{ss}">
+ <doc:doc>
+ <doc:summary>
+ A list of input sources.
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ Sets the user's input sources.
+ </doc:para>
+ </doc:description>
+ <doc:permission>
+ The caller needs one of the following PolicyKit authorizations:
+ <doc:list>
+ <doc:item>
+ <doc:term>org.freedesktop.accounts.change-own-user-data</doc:term>
+ <doc:definition>To change his own input sources</doc:definition>
+ </doc:item>
+ <doc:item>
+ <doc:term>org.freedesktop.accounts.user-administration</doc:term>
+ <doc:definition>To change the input sources of another user</doc:definition>
+ </doc:item>
+ </doc:list>
+ </doc:permission>
+ <doc:errors>
+ <doc:error name="org.freedesktop.Accounts.Error.PermissionDenied">if the caller lacks the appropriate PolicyKit authorization</doc:error>
+ <doc:error name="org.freedesktop.Accounts.Error.Failed">if the operation failed</doc:error>
+ </doc:errors>
+ </doc:doc>
+ </method>
+
<method name="SetXSession">
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="user_set_x_session"/>
@@ -748,6 +783,16 @@
</doc:doc>
</property>
+ <property name="InputSources" type="aa{ss}" access="read">
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ The user's input sources.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </property>
+
<property name="XSession" type="s" access="read">
<doc:doc>
<doc:description>
diff --git a/src/libaccountsservice/act-user.c b/src/libaccountsservice/act-user.c
index 36d1ade..43fc0ff 100644
--- a/src/libaccountsservice/act-user.c
+++ b/src/libaccountsservice/act-user.c
@@ -95,6 +95,7 @@ enum {
PROP_ICON_FILE,
PROP_LANGUAGE,
PROP_FORMATS_LOCALE,
+ PROP_INPUT_SOURCES,
PROP_X_SESSION,
PROP_IS_LOADED
};
@@ -126,6 +127,7 @@ struct _ActUser {
char *icon_file;
char *language;
char *formats_locale;
+ GVariant *input_sources;
char *x_session;
GList *our_sessions;
GList *other_sessions;
@@ -318,6 +320,9 @@ act_user_get_property (GObject *object,
case PROP_FORMATS_LOCALE:
g_value_set_string (value, user->formats_locale);
break;
+ case PROP_INPUT_SOURCES:
+ g_value_set_variant (value, user->input_sources);
+ break;
case PROP_X_SESSION:
g_value_set_string (value, user->x_session);
break;
@@ -487,6 +492,14 @@ act_user_class_init (ActUserClass *class)
"User's regional formats.",
NULL,
G_PARAM_READABLE));
+ g_object_class_install_property (gobject_class,
+ PROP_INPUT_SOURCES,
+ g_param_spec_variant ("input-sources",
+ "Input sources",
+ "User's input sources.",
+ G_VARIANT_TYPE ("aa{ss}"),
+ NULL,
+ G_PARAM_READABLE));
g_object_class_install_property (gobject_class,
PROP_X_SESSION,
g_param_spec_string ("x-session",
@@ -606,6 +619,8 @@ act_user_finalize (GObject *object)
g_free (user->shell);
g_free (user->email);
g_free (user->location);
+ if (user->input_sources)
+ g_variant_unref (user->input_sources);
if (user->login_history)
g_variant_unref (user->login_history);
g_free (user->formats_locale);
@@ -1109,6 +1124,22 @@ act_user_get_formats_locale (ActUser *user)
return user->formats_locale;
}
+/**
+ * act_user_get_input_sources:
+ * @user: a #ActUser
+ *
+ * Returns the input sources of @user.
+ *
+ * Returns: (transfer none): a list of input sources
+ */
+GVariant *
+act_user_get_input_sources (ActUser *user)
+{
+ g_return_val_if_fail (ACT_IS_USER (user), NULL);
+
+ return user->input_sources;
+}
+
/**
* act_user_get_x_session:
* @user: a #ActUser
@@ -1357,6 +1388,19 @@ collect_props (const gchar *key,
g_object_notify (G_OBJECT (user), "formats_locale");
}
+ } else if (strcmp (key, "InputSources") == 0) {
+ GVariant *sources;
+
+ g_variant_get (value, "@aa{ss}", &sources);
+
+ if (!user->input_sources || !g_variant_equal (sources, user->input_sources)) {
+ if (user->input_sources)
+ g_variant_unref (user->input_sources);
+ user->input_sources = g_variant_ref (sources);
+ g_object_notify (G_OBJECT (user), "input-sources");
+ }
+
+ g_variant_unref (sources);
} else if (strcmp (key, "XSession") == 0) {
const char *new_x_session;
@@ -1612,6 +1656,15 @@ _act_user_load_from_user (ActUser *user,
user->language = g_strdup (user_to_copy->language);
g_object_notify (G_OBJECT (user), "language");
+ if (user_to_copy->input_sources != user->input_sources) {
+ if (user->input_sources)
+ g_variant_unref (user->input_sources);
+ user->input_sources = user_to_copy->input_sources;
+ if (user->input_sources)
+ g_variant_ref (user->input_sources);
+ g_object_notify (G_OBJECT (user), "input-sources");
+ }
+
g_free (user->x_session);
user->x_session = g_strdup (user_to_copy->x_session);
g_object_notify (G_OBJECT (user), "x-session");
@@ -1812,6 +1865,35 @@ act_user_set_background_file (ActUser *user,
}
}
+/**
+ * act_user_set_input_sources:
+ * @user: the user object to alter.
+ * @sources: a list of input sources
+ *
+ * Assigns new input sources for @user.
+ *
+ * Note this function is synchronous and ignores errors.
+ **/
+void
+act_user_set_input_sources (ActUser *user,
+ GVariant *sources)
+{
+ GError *error = NULL;
+
+ g_return_if_fail (ACT_IS_USER (user));
+ g_return_if_fail (ACCOUNTS_IS_USER (user->accounts_proxy));
+ g_return_if_fail (g_variant_is_of_type (sources, G_VARIANT_TYPE ("aa{ss}")));
+
+ if (!accounts_user_call_set_input_sources_sync (user->accounts_proxy,
+ sources,
+ NULL,
+ &error)) {
+ g_warning ("SetInputSources call failed: %s", error->message);
+ g_error_free (error);
+ return;
+ }
+}
+
/**
* act_user_set_x_session:
* @user: the user object to alter.
diff --git a/src/libaccountsservice/act-user.h b/src/libaccountsservice/act-user.h
index e026ce2..de9a5a9 100644
--- a/src/libaccountsservice/act-user.h
+++ b/src/libaccountsservice/act-user.h
@@ -78,6 +78,7 @@ gboolean act_user_is_nonexistent (ActUser *user);
const char *act_user_get_icon_file (ActUser *user);
const char *act_user_get_language (ActUser *user);
const char *act_user_get_formats_locale (ActUser *user);
+GVariant *act_user_get_input_sources (ActUser *user);
const char *act_user_get_x_session (ActUser *user);
const char *act_user_get_primary_session_id (ActUser *user);
@@ -99,6 +100,8 @@ void act_user_set_language (ActUser *user,
const char *language);
void act_user_set_formats_locale (ActUser *user,
const char *formats_locale);
+void act_user_set_input_sources (ActUser *user,
+ GVariant *sources);
void act_user_set_x_session (ActUser *user,
const char *x_session);
void act_user_set_location (ActUser *user,
diff --git a/src/user.c b/src/user.c
index c32971e..17772f8 100644
--- a/src/user.c
+++ b/src/user.c
@@ -59,6 +59,7 @@ enum {
PROP_EMAIL,
PROP_LANGUAGE,
PROP_FORMATS_LOCALE,
+ PROP_INPUT_SOURCES,
PROP_X_SESSION,
PROP_LOCATION,
PROP_LOGIN_FREQUENCY,
@@ -96,6 +97,7 @@ struct User {
gchar *email;
gchar *language;
gchar *formats_locale;
+ GVariant *input_sources;
gchar *x_session;
gchar *location;
guint64 login_frequency;
@@ -307,6 +309,75 @@ user_update_from_pwent (User *user,
accounts_user_emit_changed (ACCOUNTS_USER (user));
}
+static gint
+intcmp (gconstpointer a,
+ gconstpointer b,
+ gpointer user_data)
+{
+ return GPOINTER_TO_INT (a) - GPOINTER_TO_INT (b);
+}
+
+static GVariant *
+key_file_get_input_sources (GKeyFile *key_file)
+{
+ GVariantBuilder builder;
+ GSequence *indices;
+ GSequenceIter *indices_iter;
+ gchar **groups;
+ gchar **groups_iter;
+
+ indices = g_sequence_new (NULL);
+ groups = g_key_file_get_groups (key_file, NULL);
+
+ for (groups_iter = groups; *groups_iter; groups_iter++) {
+ if (g_str_has_prefix (*groups_iter, "InputSource") && (*groups_iter)[11]) {
+ gchar *end;
+ guint64 index;
+
+ index = g_ascii_strtoull (*groups_iter + 11, &end, 0);
+
+ if (!*end)
+ g_sequence_insert_sorted (indices, GINT_TO_POINTER (index), intcmp, NULL);
+ }
+ }
+
+ g_strfreev (groups);
+
+ g_variant_builder_init (&builder, G_VARIANT_TYPE ("aa{ss}"));
+
+ indices_iter = g_sequence_get_begin_iter (indices);
+
+ while (!g_sequence_iter_is_end (indices_iter)) {
+ guint index;
+ gchar *group;
+ gchar **keys;
+ gchar **keys_iter;
+
+ g_variant_builder_open (&builder, G_VARIANT_TYPE ("a{ss}"));
+
+ index = GPOINTER_TO_UINT (g_sequence_get (indices_iter));
+ group = g_strdup_printf ("InputSource%u", index);
+ keys = g_key_file_get_keys (key_file, group, NULL, NULL);
+
+ for (keys_iter = keys; *keys_iter; keys_iter++) {
+ gchar *value = g_key_file_get_string (key_file, group, *keys_iter, NULL);
+ g_variant_builder_add (&builder, "{ss}", *keys_iter, value);
+ g_free (value);
+ }
+
+ g_strfreev (keys);
+ g_free (group);
+
+ g_variant_builder_close (&builder);
+
+ indices_iter = g_sequence_iter_next (indices_iter);
+ }
+
+ g_sequence_free (indices);
+
+ return g_variant_ref_sink (g_variant_builder_end (&builder));
+}
+
void
user_update_from_keyfile (User *user,
GKeyFile *keyfile)
@@ -330,6 +401,11 @@ user_update_from_keyfile (User *user,
g_object_notify (G_OBJECT (user), "formats-locale");
}
+ if (user->input_sources != NULL)
+ g_variant_unref (user->input_sources);
+ user->input_sources = key_file_get_input_sources (keyfile);
+ g_object_notify (G_OBJECT (user), "input-sources");
+
s = g_key_file_get_string (keyfile, "User", "XSession", NULL);
if (s != NULL) {
g_free (user->x_session);
@@ -408,6 +484,51 @@ user_update_system_account_property (User *user,
g_object_notify (G_OBJECT (user), "system-account");
}
+static void
+key_file_set_input_sources (GKeyFile *key_file,
+ GVariant *input_sources)
+{
+ gchar **groups;
+ gchar **groups_iter;
+ GVariantIter sources;
+ GVariantIter *source;
+ guint i;
+
+ /* Remove all groups matching regex "InputSource\d+". */
+
+ groups = g_key_file_get_groups (key_file, NULL);
+
+ for (groups_iter = groups; *groups_iter; groups_iter++) {
+ if (g_str_has_prefix (*groups_iter, "InputSource")) {
+ for (i = 11; g_ascii_isdigit ((*groups_iter)[i]); i++);
+
+ if (i > 11 && !(*groups_iter)[i])
+ g_key_file_remove_group (key_file, *groups_iter, NULL);
+ }
+ }
+
+ g_strfreev (groups);
+
+ /* Write all input sources to key file. */
+
+ g_variant_iter_init (&sources, input_sources);
+
+ for (i = 0; g_variant_iter_next (&sources, "a{ss}", &source); i++) {
+ gchar *group;
+ const gchar *key;
+ const gchar *value;
+
+ group = g_strdup_printf ("InputSource%u", i);
+
+ while (g_variant_iter_next (source, "{&s&s}", &key, &value))
+ g_key_file_set_string (key_file, group, key, value);
+
+ g_free (group);
+
+ g_variant_iter_free (source);
+ }
+}
+
static void
user_save_to_keyfile (User *user,
GKeyFile *keyfile)
@@ -423,6 +544,9 @@ user_save_to_keyfile (User *user,
if (user->formats_locale)
g_key_file_set_string (keyfile, "User", "FormatsLocale", user->formats_locale);
+ if (user->input_sources)
+ key_file_set_input_sources (keyfile, user->input_sources);
+
if (user->x_session)
g_key_file_set_string (keyfile, "User", "XSession", user->x_session);
@@ -1182,6 +1306,67 @@ user_set_formats_locale (AccountsUser *auser,
return TRUE;
}
+static void
+user_change_input_sources_authorized_cb (Daemon *daemon,
+ User *user,
+ GDBusMethodInvocation *context,
+ gpointer data)
+
+{
+ GVariant *sources = data;
+
+ if (sources != user->input_sources &&
+ (!sources || !user->input_sources ||
+ !g_variant_equal (sources, user->input_sources))) {
+ if (user->input_sources)
+ g_variant_unref (user->input_sources);
+
+ user->input_sources = sources;
+
+ if (user->input_sources)
+ g_variant_ref (user->input_sources);
+
+ save_extra_data (user);
+
+ accounts_user_emit_changed (ACCOUNTS_USER (user));
+
+ g_object_notify (G_OBJECT (user), "input-sources");
+ }
+
+ accounts_user_complete_set_input_sources (ACCOUNTS_USER (user), context);
+}
+
+static gboolean
+user_set_input_sources (AccountsUser *auser,
+ GDBusMethodInvocation *context,
+ GVariant *sources)
+{
+ User *user = (User*)auser;
+ int uid;
+ const gchar *action_id;
+
+ if (!get_caller_uid (context, &uid)) {
+ throw_error (context, ERROR_FAILED, "identifying caller failed");
+ return FALSE;
+ }
+
+ if (user->uid == (uid_t) uid)
+ action_id = "org.freedesktop.accounts.change-own-user-data";
+ else
+ action_id = "org.freedesktop.accounts.user-administration";
+
+ daemon_local_check_auth (user->daemon,
+ user,
+ action_id,
+ TRUE,
+ user_change_input_sources_authorized_cb,
+ context,
+ sources ? g_variant_ref (sources) : NULL,
+ sources ? (GDestroyNotify) g_variant_unref : NULL);
+
+ return TRUE;
+}
+
static void
user_change_x_session_authorized_cb (Daemon *daemon,
User *user,
@@ -2281,6 +2466,12 @@ user_real_get_language (AccountsUser *user)
return USER (user)->language;
}
+static GVariant *
+user_real_get_input_sources (AccountsUser *user)
+{
+ return USER (user)->input_sources;
+}
+
static const gchar *
user_real_get_xsession (AccountsUser *user)
{
@@ -2377,6 +2568,9 @@ user_finalize (GObject *object)
if (user->login_history)
g_variant_unref (user->login_history);
+ if (user->input_sources)
+ g_variant_unref (user->input_sources);
+
if (G_OBJECT_CLASS (user_parent_class)->finalize)
(*G_OBJECT_CLASS (user_parent_class)->finalize) (object);
}
@@ -2388,6 +2582,7 @@ user_set_property (GObject *object,
GParamSpec *pspec)
{
User *user = USER (object);
+ GVariant *variant;
switch (param_id) {
case PROP_ACCOUNT_TYPE:
@@ -2398,6 +2593,18 @@ user_set_property (GObject *object,
break;
case PROP_FORMATS_LOCALE:
user->formats_locale = g_value_dup_string (value);
+ break;
+ case PROP_INPUT_SOURCES:
+ variant = g_value_get_variant (value);
+
+ if (variant != user->input_sources) {
+ if (user->input_sources)
+ g_variant_unref (user->input_sources);
+ user->input_sources = variant;
+ if (user->input_sources)
+ g_variant_ref (user->input_sources);
+ }
+
break;
case PROP_X_SESSION:
user->x_session = g_value_dup_string (value);
@@ -2470,6 +2677,9 @@ user_get_property (GObject *object,
case PROP_FORMATS_LOCALE:
g_value_set_string (value, user->formats_locale);
break;
+ case PROP_INPUT_SOURCES:
+ g_value_set_variant (value, user->input_sources);
+ break;
case PROP_X_SESSION:
g_value_set_string (value, user->x_session);
break;
@@ -2541,6 +2751,7 @@ user_accounts_user_iface_init (AccountsUserIface *iface)
iface->handle_set_home_directory = user_set_home_directory;
iface->handle_set_icon_file = user_set_icon_file;
iface->handle_set_language = user_set_language;
+ iface->handle_set_input_sources = user_set_input_sources;
iface->handle_set_location = user_set_location;
iface->handle_set_locked = user_set_locked;
iface->handle_set_password = user_set_password;
@@ -2559,6 +2770,7 @@ user_accounts_user_iface_init (AccountsUserIface *iface)
iface->get_shell = user_real_get_shell;
iface->get_email = user_real_get_email;
iface->get_language = user_real_get_language;
+ iface->get_input_sources = user_real_get_input_sources;
iface->get_xsession = user_real_get_xsession;
iface->get_location = user_real_get_location;
iface->get_login_frequency = user_real_get_login_frequency;
@@ -2588,6 +2800,7 @@ user_init (User *user)
user->email = NULL;
user->language = NULL;
user->formats_locale = NULL;
+ user->input_sources = NULL;
user->x_session = NULL;
user->location = NULL;
user->password_mode = PASSWORD_MODE_REGULAR;
--
2.20.1

View file

@ -1,59 +0,0 @@
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
# Needed because of https://github.com/ubports/system-settings/issues/65
pkgname=accountsservice-ubuntu
_pkgname=accountsservice
pkgver=0.6.45
pkgrel=1
pkgdesc="D-Bus interface for user account query and manipulation"
url="http://www.freedesktop.org/software/accountsservice/"
arch="x86_64"
license="GPL-3.0-or-later"
depends=""
depends_dev="glib-dev gobject-introspection-dev polkit-dev"
makedepends="$depends_dev intltool gnome-doc-utils"
provides="$_pkgname=$pkgver lib$_pkgname=$pkgver"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
# Issues about "Ubuntu-specific" patches:
# https://gitlab.freedesktop.org/accountsservice/accountsservice/issues/22
# https://gitlab.freedesktop.org/accountsservice/accountsservice/issues/52
source="http://www.freedesktop.org/software/accountsservice/accountsservice-$pkgver.tar.xz
musl-fgetspent_r.patch
0001-0001-formats-locale-property.patch.patch
0002-0007-add-lightdm-support.patch.patch
0003-0011-add-background-file-support.patch.patch
0004-0016-add-input-sources-support.patch.patch"
builddir="$srcdir"/$_pkgname-$pkgver
build() {
cd "$builddir"
# Hack to check for /var/log/wtmp instead of /var/log/utx.log
sed -i configure -e "s;utx\.log;wtmp;g"
ac_cv_file__var_log_utx_log=yes ./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--localstatedir=/var \
--disable-systemd \
--enable-introspection=yes
make
}
check() {
cd "$builddir"
make check
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
}
sha512sums="09975f9fa03a3177d923de6d6f6e6acfffeb2ff4924c45eaac78c994c16974427c8e936a87034747ba494d2bb3df6e8a92ff44db387761b06e06e311d7cf105a accountsservice-0.6.45.tar.xz
469392beca8f5941eafaa193c4fcb0472770ee4183ce520416a1b5d6abafe0e201990eb74d06bfbd9e20af08e55aff5f0031f267083f6c6879f0fe4e5028103c musl-fgetspent_r.patch
ad924e29432c92fbf8cdfab7e1d023f67502003f54ab1f0db3d264a7e71a9aececa65ef4c4de110df3f9892f8f90bb50018115b61513e883ac6797ad8c6dd4f4 0001-0001-formats-locale-property.patch.patch
3d91eebc4e877a73dd9fad802d8473a8f4275b82d2ac79fc1d0191262794b95cdf50edd6ea76e9bfc946c523b9d88e8cabc90a3b00211b404565c8884cd62653 0002-0007-add-lightdm-support.patch.patch
8baf966e83e74efb3b5fe75722320953c481bb2e7803bbece539e3ffb82ce2879fcebfa4512f59978f852dbf7e62a21fca5a8cd668fd94549d39796730b61518 0003-0011-add-background-file-support.patch.patch
9cfe41e017e0025d3f474b07b6f7599728b7ff8a0eecbbf629d035b6542f9af1b61469eb38f1ca295999a5baeb69424ed39b56703ac5919c9946eab6135a9eb4 0004-0016-add-input-sources-support.patch.patch"

View file

@ -1,34 +0,0 @@
diff --git a/src/daemon.c b/src/daemon.c
index 312394a..e7b3c58 100644
--- a/src/daemon.c
+++ b/src/daemon.c
@@ -140,6 +140,28 @@ error_get_type (void)
#define MAX_LOCAL_USERS 50
#endif
+#ifndef __GLIBC__
+ /* Musl libc does not support fgetspent_r(), write own
+ * wrapper
+ */
+static int fgetspent_r(FILE *fp, struct spwd *spbuf, char *buf, size_t buflen, struct spwd **spbufp) {
+ struct spwd *shadow_entry = fgetspent(fp);
+ if(!shadow_entry)
+ return -1;
+ size_t namplen = strlen(shadow_entry->sp_namp);
+ size_t pwdplen = strlen(shadow_entry->sp_pwdp);
+
+ if(namplen + pwdplen + 2 > buflen)
+ return -1;
+
+ *spbufp = memcpy(spbuf, shadow_entry, sizeof(struct spwd));
+ spbuf->sp_namp = strncpy(buf, shadow_entry->sp_namp, namplen + 1);
+ spbuf->sp_pwdp = strncpy(buf + namplen + 1, shadow_entry->sp_pwdp, pwdplen + 1);
+
+ return 0;
+}
+#endif
+
static struct passwd *
entry_generator_fgetpwent (Daemon *daemon,
GHashTable *users,

View file

@ -1,40 +0,0 @@
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=click
pkgver=0_git20190129
_commit="cc108942faa348a155e665a5c07828dd36954d6a"
pkgrel=0
pkgdesc="Click is a simplified packaging format"
url="https://github.com/ubports/click"
arch="x86_64"
license="GPL-3.0"
depends=""
depends_dev="libgee-dev gobject-introspection-dev"
makedepends="$depends_dev cmake intltool vala gobject-introspection autoconf libtool automake json-glib-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="$pkgname-$_commit.tar.gz::https://github.com/ubports/$pkgname/archive/$_commit.tar.gz"
builddir="$srcdir/$pkgname-$_commit"
options="!check" # Needs dpkg
build() {
cd "$builddir"
./autogen.sh
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--disable-packagekit \
--disable-systemd
make
}
check() {
cd "$builddir"
make check
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir/" PYTHON_INSTALL_FLAGS="--root=$pkgdir/" install
}
sha512sums="c7b2aed6bd14a791cde5ea97d6558c29a6e86e5da48ea15cd008e0811fab254ce6c0e289eb7e00554a5522e1f5562ed0d4e24e057ea4d1bd37b9a11580ef69d7 click-cc108942faa348a155e665a5c07828dd36954d6a.tar.gz"

View file

@ -1,31 +0,0 @@
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=cmake-extras
pkgver=0_git20190219
_commit="365500ed7903180d034b64e06d0c0cdd9de2162f"
pkgrel=0
pkgdesc="A collection of add-ons for the CMake build tool"
url="https://github.com/ubports/cmake-extras"
arch="noarch"
license="GPL-3.0"
depends="cmake"
makedepends="cmake"
options="!check" # No testsuite
source="$pkgname-$_commit.tar.gz::https://github.com/ubports/$pkgname/archive/$_commit.tar.gz
Use_gtest_cmake_from_mir.patch
qmlplugindump_path.patch"
builddir="$srcdir/$pkgname-$_commit"
build() {
cd "$builddir"
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .
make
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
}
sha512sums="79c8224fd96368ca68534c90178c16178e668bc0655ea42d139fcee4a995c92bc9b6c20f2b6cd0df2bc38cc009f9e15306513d06a3f095c5f344994cae4cb01c cmake-extras-365500ed7903180d034b64e06d0c0cdd9de2162f.tar.gz
996334490e062868b2dd24a0d2d688d95877343ae2db6a06efc580d14ffe1d00f0c9277be0929b9c7c859aef2dea0be68ddc49a7495ad16eaa0a156838f8bca9 Use_gtest_cmake_from_mir.patch
e55bd3ae7372b33534d239f7e959af0eba5687aba0386613381e4f9fc840f89213f5ae92544b7e969943d46e815d49c66fd24c29c44fd4166bb3a6bf81e1ac7e qmlplugindump_path.patch"

View file

@ -1,171 +0,0 @@
diff --git a/src/GMock/GMockConfig.cmake b/src/GMock/GMockConfig.cmake
index 2078030..77ba4a3 100644
--- a/src/GMock/GMockConfig.cmake
+++ b/src/GMock/GMockConfig.cmake
@@ -1,92 +1,77 @@
-# Copyright (C) 2014 Canonical Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Build with system gmock and embedded gtest
-#
-# Usage:
-#
-# find_package(GMock)
-#
-# ...
-#
-# target_link_libraries(
-# my-target
-# ${GTEST_BOTH_LIBRARIES}
-# )
-#
-# NOTE: Due to the way this package finder is implemented, do not attempt
-# to find the GMock package more than once.
-
-find_package(Threads)
-
-if (EXISTS "/usr/src/googletest")
- # As of version 1.8.0
- set(GMOCK_SOURCE_DIR "/usr/src/googletest/googlemock" CACHE PATH "gmock source directory")
- set(GMOCK_INCLUDE_DIRS "${GMOCK_SOURCE_DIR}/include" CACHE PATH "gmock source include directory")
- set(GTEST_INCLUDE_DIRS "/usr/src/googletest/googletest/include" CACHE PATH "gtest source include directory")
+include(FindPackageHandleStandardArgs)
+
+find_package(GTest)
+
+pkg_check_modules (GTEST REQUIRED "gtest >= 1.8.0")
+pkg_check_modules (GTEST_MAIN REQUIRED "gtest_main >= 1.8.0")
+if (GTEST_FOUND AND GTEST_MAIN_FOUND)
+ set(GTEST_LIBRARY ${GTEST_LIBRARIES})
+ set(GTEST_MAIN_LIBRARY ${GTEST_MAIN_LIBRARIES})
+ set(GTEST_BOTH_LIBRARIES ${GTEST_LIBRARY} ${GTEST_MAIN_LIBRARY})
+endif()
+
+if (NOT GTEST_FOUND)
+ include(ExternalProject)
+
+ find_path(GTEST_ROOT
+ NAMES CMakeLists.txt
+ PATHS /usr/src/gtest /usr/src/googletest/googletest/
+ DOC "Path to GTest CMake project")
+
+ ExternalProject_Add(GTest PREFIX ./gtest
+ SOURCE_DIR ${GTEST_ROOT}
+ CMAKE_ARGS
+ -DCMAKE_CXX_COMPILER_WORKS=1
+ -DCMAKE_CXX_FLAGS='${CMAKE_CXX_FLAGS}'
+ -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
+ INSTALL_COMMAND true
+ BUILD_BYPRODUCTS
+ ${CMAKE_CURRENT_BINARY_DIR}/gtest/src/GTest-build/libgtest.a
+ ${CMAKE_CURRENT_BINARY_DIR}/gtest/src/GTest-build/libgtest_main.a
+ ${CMAKE_CURRENT_BINARY_DIR}/gtest/src/GMock-build/libgmock.a)
+
+ ExternalProject_Get_Property(GTest binary_dir)
+
+ add_library(gtest UNKNOWN IMPORTED)
+ set_target_properties(gtest PROPERTIES IMPORTED_LOCATION ${binary_dir}/libgtest.a)
+ add_dependencies(gtest GTest)
+ set(GTEST_LIBRARY "gtest")
+
+ add_library(gtest_main UNKNOWN IMPORTED)
+ set_target_properties(gtest_main PROPERTIES IMPORTED_LOCATION ${binary_dir}/libgtest_main.a)
+ add_dependencies(gtest_main GTest)
+ set(GTEST_MAIN_LIBRARY "gtest_main")
+
+ set(GTEST_BOTH_LIBRARIES ${GTEST_LIBRARY} ${GTEST_MAIN_LIBRARY})
+ find_path(GTEST_INCLUDE_DIRS NAMES gtest/gtest.h)
+ find_package_handle_standard_args(GTest GTEST_LIBRARY GTEST_BOTH_LIBRARIES GTEST_INCLUDE_DIRS)
+endif()
+
+find_file(GMOCK_SOURCE
+ NAMES gmock-all.cc
+ DOC "GMock source"
+ PATHS /usr/src/googletest/googlemock/src/ /usr/src/gmock/ /usr/src/gmock/src)
+
+if (EXISTS ${GMOCK_SOURCE})
+ find_path(GMOCK_INCLUDE_DIR gmock/gmock.h PATHS /usr/src/googletest/googlemock/include)
+
+ add_library(GMock STATIC ${GMOCK_SOURCE})
+
+ if (EXISTS /usr/src/googletest/googlemock/src)
+ set_source_files_properties(${GMOCK_SOURCE} PROPERTIES COMPILE_FLAGS "-I/usr/src/googletest/googlemock")
+ endif()
+
+ if (EXISTS /usr/src/gmock/src)
+ set_source_files_properties(${GMOCK_SOURCE} PROPERTIES COMPILE_FLAGS "-I/usr/src/gmock")
+ endif()
+
+ find_package_handle_standard_args(GMock DEFAULT_MSG GMOCK_INCLUDE_DIR)
+
+ set(GMOCK_LIBRARY GMock)
else()
- set(GMOCK_SOURCE_DIR "/usr/src/gmock" CACHE PATH "gmock source directory")
- set(GMOCK_INCLUDE_DIRS "/usr/include" CACHE PATH "gmock source include directory")
- set(GTEST_INCLUDE_DIRS "/usr/include" CACHE PATH "gtest source include directory")
+ # Assume gmock is no longer source, we'll find out soon enough if that's wrong
+ add_custom_target(GMock)
+ string(REPLACE gtest gmock GMOCK_LIBRARY ${GTEST_LIBRARY})
endif()
-# We add -g so we get debug info for the gtest stack frames with gdb.
-# The warnings are suppressed so we get a noise-free build for gtest and gmock if the caller
-# has these warnings enabled.
-set(findgmock_cxx_flags "${CMAKE_CXX_FLAGS} -g -Wno-old-style-cast -Wno-missing-field-initializers -Wno-ctor-dtor-privacy -Wno-switch-default")
-
-set(findgmock_bin_dir "${CMAKE_CURRENT_BINARY_DIR}/gmock")
-set(findgmock_gtest_lib "${findgmock_bin_dir}/gtest/libgtest.a")
-set(findgmock_gtest_main_lib "${findgmock_bin_dir}/gtest/libgtest_main.a")
-set(findgmock_gmock_lib "${findgmock_bin_dir}/libgmock.a")
-set(findgmock_gmock_main_lib "${findgmock_bin_dir}/libgmock_main.a")
-
-include(ExternalProject)
-ExternalProject_Add(GMock SOURCE_DIR "${GMOCK_SOURCE_DIR}"
- BINARY_DIR "${findgmock_bin_dir}"
- BUILD_BYPRODUCTS "${findgmock_gtest_lib}"
- "${findgmock_gtest_main_lib}"
- "${findgmock_gmock_lib}"
- "${findgmock_gmock_main_lib}"
- INSTALL_COMMAND ""
- CMAKE_ARGS "-DCMAKE_CXX_FLAGS=${findgmock_cxx_flags}")
-
-add_library(gtest INTERFACE)
-target_include_directories(gtest INTERFACE ${GTEST_INCLUDE_DIRS})
-target_link_libraries(gtest INTERFACE ${findgmock_gtest_lib} ${CMAKE_THREAD_LIBS_INIT})
-add_dependencies(gtest GMock)
-
-add_library(gtest_main INTERFACE)
-target_include_directories(gtest_main INTERFACE ${GTEST_INCLUDE_DIRS})
-target_link_libraries(gtest_main INTERFACE ${findgmock_gtest_main_lib} gtest)
-
-add_library(gmock INTERFACE)
-target_include_directories(gmock INTERFACE ${GMOCK_INCLUDE_DIRS})
-target_link_libraries(gmock INTERFACE ${findgmock_gmock_lib} gtest)
-
-add_library(gmock_main INTERFACE)
-target_include_directories(gmock_main INTERFACE ${GMOCK_INCLUDE_DIRS})
-target_link_libraries(gmock_main INTERFACE ${findgmock_gmock_main_lib} gmock)
-
-set(GTEST_LIBRARIES gtest)
-set(GTEST_MAIN_LIBRARIES gtest_main)
-set(GMOCK_LIBRARIES gmock gmock_main)
-set(GTEST_BOTH_LIBRARIES ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES})
-
-unset(findgmock_cxx_flags)
-unset(findgmock_bin_dir)
-unset(findgmock_gtest_lib)
-unset(findgmock_gtest_main_lib)
-unset(findgmock_gmock_lib)
-unset(findgmock_gmock_main_lib)
+set(GMOCK_LIBRARIES ${GTEST_BOTH_LIBRARIES} ${GMOCK_LIBRARY})

View file

@ -1,13 +0,0 @@
diff --git a/src/QmlPlugins/QmlPluginsConfig.cmake b/src/QmlPlugins/QmlPluginsConfig.cmake
index f563330..7e326bf 100644
--- a/src/QmlPlugins/QmlPluginsConfig.cmake
+++ b/src/QmlPlugins/QmlPluginsConfig.cmake
@@ -2,7 +2,7 @@
# target before loading this plugin.
if(NOT TARGET qmlplugindump)
- find_program(qmlplugindump_exe qmlplugindump)
+ find_program(qmlplugindump_exe qmlplugindump HINTS /usr/lib/qt5/bin/)
if(NOT qmlplugindump_exe)
msg(FATAL_ERROR "Could not locate qmlplugindump.")

View file

@ -1,26 +0,0 @@
From 96d2928d15ee0506573866f367762c9deea75542 Mon Sep 17 00:00:00 2001
From: Luca Weiss <luca@z3ntu.xyz>
Date: Sun, 30 Dec 2018 23:59:16 +0100
Subject: [PATCH] Use qmlplugindump-qt5
Fixes #4
---
import/Ubuntu/Content/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/import/Ubuntu/Content/CMakeLists.txt b/import/Ubuntu/Content/CMakeLists.txt
index 1322309..5cd18bf 100644
--- a/import/Ubuntu/Content/CMakeLists.txt
+++ b/import/Ubuntu/Content/CMakeLists.txt
@@ -95,7 +95,7 @@ endif()
if(NOT CMAKE_CROSSCOMPILING)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/plugins.qmltypes
- COMMAND qmlplugindump -qt=qt5 -noinstantiate -notrelocatable Ubuntu.Content 1.1 ../../ > ${CMAKE_CURRENT_BINARY_DIR}/plugins.qmltypes
+ COMMAND qmlplugindump-qt5 -noinstantiate -notrelocatable Ubuntu.Content 1.1 ../../ > ${CMAKE_CURRENT_BINARY_DIR}/plugins.qmltypes
DEPENDS ${PLUGIN}
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
)
--
2.20.1

View file

@ -1,46 +0,0 @@
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=content-hub
pkgver=0_git20190129
_commit="3f046207beec0441a5e2cd567e63becaafd181eb"
pkgrel=0
pkgdesc="Content sharing/picking infrastructure and service, designed to allow apps to securely and efficiently exchange content"
url="https://github.com/ubports/content-hub"
arch="x86_64"
license="GPL-3.0 LGPL-3.0"
depends=""
depends_dev="qt5-qtdeclarative-dev ubuntu-app-launch-dev gsettings-qt-dev libnih-dev ubuntu-download-manager-dev libnotify-dev libapparmor-dev ubuntu-ui-toolkit-dev"
makedepends="$depends_dev cmake cmake-extras libapparmor"
checkdepends="gtest-dev gmock dbus-test-runner"
options="!check" # 92% tests passed, 1 tests failed out of 12 (xfvb-run script is missing, see https://bugs.alpinelinux.org/issues/9617)
source="$pkgname-$_commit.tar.gz::https://github.com/ubports/$pkgname/archive/$_commit.tar.gz
0001-Use-qmlplugindump-qt5.patch"
subpackages="$pkgname-dev $pkgname-lang"
builddir="$srcdir/$pkgname-$_commit"
prepare() {
default_prepare
# Don't build tests
truncate -s 0 "$builddir"/tests/CMakeLists.txt
}
build() {
mkdir "$builddir"/build
cd "$builddir"/build
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib ..
make
}
check() {
cd "$builddir"/build/tests
CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}
package() {
cd "$builddir"/build
make DESTDIR="$pkgdir" install
}
sha512sums="b0d7b0c7d47941f88e4aa6ce5e57f900419c16d1cbd8efa07dcdd8f50194f4961e6263e59ca37ddb671e4ce6c5aa55d292887765a3f98ea20d40a5c71602d19b content-hub-3f046207beec0441a5e2cd567e63becaafd181eb.tar.gz
f5a13fbbf2a26342a043474b5911ad4949e6b61f36116197e9c614d2e399f4dcb6adbab08376764756d68d45cfd55215dd49aa5cdfe5926b61d928a8424ba767 0001-Use-qmlplugindump-qt5.patch"

View file

@ -1,43 +0,0 @@
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=geonames
pkgver=0_git20180310
pkgrel=0
_commit="5d77e827cd8800e9738f0e8ac2f865a59a9f68b2"
pkgdesc='Geonames'
arch="x86_64"
url='https://unity8.io'
license="GPL-3.0"
depends=""
depends_dev=""
makedepends="$depends_dev gtk-doc autoconf automake libtool"
# See https://github.com/ubports/geonames/issues/1
source="$pkgname-$_commit.tar.gz::http://repo.ubports.com/pool/xenial/main/g/geonames/geonames_0.3+ubports1+0~20180310073020.3~1.gbp5d77e8.tar.gz"
subpackages="$pkgname-dev $pkgname-lang"
options="!check" # Tests fail
builddir="$srcdir/source"
prepare() {
cd "$builddir"
./autogen.sh \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr
}
build() {
make
}
check() {
cd "$builddir"
make check
}
package() {
cd "$builddir"
make DESTDIR="${pkgdir}" install
}
sha512sums="347976e251fa4a48760bae96f3f6326bee06fc799cd989237898a23fb72e49929b202dcd0fd33eaf06dc9a8966f47deedcf105ec402a3125bffdbfd14a4dc5b6 geonames-5d77e827cd8800e9738f0e8ac2f865a59a9f68b2.tar.gz"

View file

@ -1,38 +0,0 @@
From 32d7af4f22bbd99b3bd7775290300dc920f275ac Mon Sep 17 00:00:00 2001
From: Luca Weiss <luca@z3ntu.xyz>
Date: Mon, 31 Dec 2018 18:15:02 +0100
Subject: [PATCH] Add missing header include
---
src/MatchUtils.cpp | 2 ++
tests/functional/menus/MenuMain.cpp | 1 +
2 files changed, 3 insertions(+)
diff --git a/src/MatchUtils.cpp b/src/MatchUtils.cpp
index 19f458a..7f2c98e 100644
--- a/src/MatchUtils.cpp
+++ b/src/MatchUtils.cpp
@@ -20,6 +20,8 @@
#include <unity/util/ResourcePtr.h>
+#include <functional>
+
using namespace std;
namespace util = unity::util;
diff --git a/tests/functional/menus/MenuMain.cpp b/tests/functional/menus/MenuMain.cpp
index 5123177..cbc7cbe 100644
--- a/tests/functional/menus/MenuMain.cpp
+++ b/tests/functional/menus/MenuMain.cpp
@@ -25,6 +25,7 @@
#include <iostream>
#include <memory>
+#include <functional>
using namespace std;
using namespace unity::util;
--
2.20.1

View file

@ -1,40 +0,0 @@
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=gmenuharness
pkgver=0_git20161202
_commit="a5380607d3b494fd221add2837f5824327f77dff"
pkgrel=0
pkgdesc="Library to test GMenuModel structures."
url="https://github.com/unity8-team/gmenuharness"
arch="x86_64"
license="LGPL-3.0"
depends=""
depends_dev=""
makedepends="$depends_dev cmake cmake-extras qt5-qtbase-dev unity-api-dev glib-dev gtest-dev gmock libqtdbustest"
checkdepends=""
source="$pkgname-$_commit.tar.gz::https://github.com/unity8-team/$pkgname/archive/$_commit.tar.gz
0001-Add-missing-header-include.patch"
subpackages="$pkgname-dev"
builddir="$srcdir/$pkgname-$_commit"
options="!check" # something with dbus - 0% tests passed, 1 tests failed out of 1
build() {
mkdir "$builddir"/build
cd "$builddir"/build
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib ..
make
}
check() {
cd "$builddir"/build/tests
CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}
package() {
cd "$builddir"/build
make DESTDIR="$pkgdir" install
}
sha512sums="c86f45f94deb106280508b74b2f33ff5aa50c47f98bb6f26587f0c21709abd13dc9bf905857be7510809622b8d10b03facc184d56bd0557630865f93d3d52605 gmenuharness-a5380607d3b494fd221add2837f5824327f77dff.tar.gz
3b4d93b57a6b4c440e98d5dc08e3b1e67857662b12dbee27912f442dc7daffc0b2fb1703da42dba09b2c3d81eaa7a2130aea7c69964abf8f03bf49e5e9cf1712 0001-Add-missing-header-include.patch"

View file

@ -1,36 +0,0 @@
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=gsettings-qt
pkgver=0_git20180418
_commit="c8ecb2bf269f4ed0a4477bad262751d77ae6bb72"
pkgrel=0
pkgdesc="Library to access GSettings from Qt"
url="https://github.com/ubports/gsettings-qt"
arch="x86_64"
license="LGPL-3.0"
depends=""
depends_dev="qt5-qtdeclarative-dev"
makedepends="$depends_dev qt5-qtbase-dev"
subpackages="$pkgname-dev"
source="$pkgname-$_commit.tar.gz::https://github.com/ubports/$pkgname/archive/$_commit.tar.gz
fix_install.patch"
builddir="$srcdir/$pkgname-$_commit"
options="!check" # Requires running X11 server
build() {
cd "$builddir"
qmake-qt5
make -j1 # See https://github.com/ubports/gsettings-qt/issues/2
}
check() {
cd "$builddir"
make check
}
package() {
cd "$builddir"
make INSTALL_ROOT="$pkgdir" install
}
sha512sums="696e10212369f02a811b7b56f2a2b496383dcd6d008f83b6f71da4d70fa3f26cfafe35ce4689eacd6d15d4cdd0ba3d632b33de045022f74e6f7b828062011b35 gsettings-qt-c8ecb2bf269f4ed0a4477bad262751d77ae6bb72.tar.gz
de1dd50997868c67742a23909b3682068e7262991df6f0e27dfd0f2774de26dc07f524f1a0fe335b93ee8044b78ee42e9af8d9a38c03f9cf073e361f6f6c2b08 fix_install.patch"

View file

@ -1,16 +0,0 @@
diff --git a/GSettings/gsettings-qt.pro b/GSettings/gsettings-qt.pro
index 218eeea..6f1cd3e 100644
--- a/GSettings/gsettings-qt.pro
+++ b/GSettings/gsettings-qt.pro
@@ -25,6 +25,10 @@ INSTALLS += extra
qmltypes.path = $$installPath
qmltypes.files = plugins.qmltypes
-qmltypes.extra = export LD_PRELOAD=../src/libgsettings-qt.so.1; $$[QT_INSTALL_BINS]/qmlplugindump -notrelocatable GSettings 1.0 .. > $(INSTALL_ROOT)/$$installPath/plugins.qmltypes
+# TODO: Complain at whoever is responsible for this - I lost an hour debugging this
+# Relative and absolute LD_PRELOAD path doesn't work
+# Relative LD_LIBRARY_PATH doesn't work
+# Absolute LD_LIBRARY_PATH DOES work
+qmltypes.extra = export LD_LIBRARY_PATH=$$PWD/../src; $$[QT_INSTALL_BINS]/qmlplugindump -notrelocatable GSettings 1.0 .. > $(INSTALL_ROOT)/$$installPath/plugins.qmltypes
INSTALLS += qmltypes

View file

@ -1,31 +0,0 @@
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=gsettings-ubuntu-touch-schemas
pkgver=0_git20181006
pkgrel=0
_commit="b3bdf178e4226c91c567b84f1adf9202b2492ca2"
pkgdesc='Collection of GSettings schemas for settings shared by various components of an Ubuntu environment'
arch="noarch"
url='https://unity8.io'
license="LGPL-2.1"
depends=""
makedepends="gnome-common automake autoconf glib-dev intltool"
source="$pkgname-$_commit.tar.gz::https://github.com/ubports/$pkgname/archive/$_commit.tar.gz"
builddir="$srcdir/$pkgname-$_commit"
build() {
cd "$builddir"
./autogen.sh \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--localstatedir=/var
make
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
}
sha512sums="9cb68efeda62d4802345292b75593658eed28e8068aa0361bafdc3c9fd1d4212cf1f0ad8cf9350aa438ecc3c937e1952ea9f89c85be418594e01febe6c8a70c8 gsettings-ubuntu-touch-schemas-b3bdf178e4226c91c567b84f1adf9202b2492ca2.tar.gz"

View file

@ -1,39 +0,0 @@
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=indicator-network
pkgver=0_git20190212
_commit="3cb4ada3d87303e6b981cf1307244f3a88017fec"
pkgrel=0
pkgdesc="The 'Network' indicator for Ubuntu Touch"
arch="x86_64"
url="https://unity8.io"
license="GPL-3.0"
depends=""
depends_dev="glib-dev unity-api-dev ofono-dev networkmanager-dev libsecret-dev url-dispatcher-dev qt5-qtdeclarative-dev libqofono-dev"
makedepends="$depends_dev cmake-extras gtest-dev gmock libqtdbustest libqtdbusmock gmenuharness-dev"
source="$pkgname-$_commit.tar.gz::https://github.com/ubports/$pkgname/archive/$_commit.tar.gz"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
builddir="$srcdir/$pkgname-$_commit"
options="!check" # Tests hang
build() {
mkdir -p "$builddir"/build
cd "$builddir"/build
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib ..
make
}
check() {
cd "$builddir"/build
CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}
package() {
cd "$builddir"/build
make DESTDIR="$pkgdir" install
}
sha512sums="a5ce04d9a896b2887592caf6f3bab8962569cdc5ba09a77c7799ce42b1b3cc78f8f2bb66d704a9b1487784755854188dcf012ca0515cdd79e418c51afad78b72 indicator-network-3cb4ada3d87303e6b981cf1307244f3a88017fec.tar.gz"

View file

@ -1,36 +0,0 @@
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=libqtdbusmock
pkgver=0_git20181013
_commit="f3ac84e2f3c005ae59a10a392c1b2ad4b8e6c528"
pkgrel=0
pkgdesc="Library for mocking DBus interactions using Qt"
url="https://github.com/ubports/libqtdbusmock"
arch="x86_64"
license="LGPL-3.0"
depends=""
makedepends="cmake cmake-extras libqtdbustest networkmanager-dev qt5-qtbase-dev gtest-dev gmock"
checkdepends="py3-dbusmock"
source="$pkgname-$_commit.tar.gz::https://github.com/ubports/$pkgname/archive/$_commit.tar.gz
no_coverage.patch"
builddir="$srcdir/$pkgname-$_commit"
options="!check" # 0% tests passed, 1 tests failed out of 1
build() {
cd "$builddir"
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib .
make
}
check() {
cd "$builddir"
CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
}
sha512sums="d59ce4258ce1e26896c533ed0aa99bb3f30d731ca55d7742bd635edef6c8c0ee82343b3e960effa8a58ed9268de8e870dbeaafaf420a08a49aea1f9cbc294ac7 libqtdbusmock-f3ac84e2f3c005ae59a10a392c1b2ad4b8e6c528.tar.gz
b5a5616c00b7da8cb7ed5c1129a63372a8760412143b3cc3d57efe2e23ba1aa7d9a75c3f82b6b72eb5e2b12973a1b5a252aa77e557e74f8b9d7bcf94f0421942 no_coverage.patch"

View file

@ -1,19 +0,0 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -68,16 +68,3 @@
check
${CMAKE_CTEST_COMMAND} --force-new-ctest-process --output-on-failure
)
-
-find_package(CoverageReport)
-enable_coverage_report(
- TARGETS
- qtdbusmock
- unit-tests
- FILTER
- ${CMAKE_SOURCE_DIR}/tests/*
- ${CMAKE_BINARY_DIR}/*
- TESTS
- unit-tests
-)
-

View file

@ -1,36 +0,0 @@
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=libqtdbustest
pkgver=0_git20180611
_commit="24e410ea77c9fa08894365c60bf08811a3b60bc0"
pkgrel=0
pkgdesc='Library for testing DBus interactions using Qt'
url='https://github.com/ubports/libqtdbustest'
arch="x86_64"
license=LGPL-3.0
depends=""
makedepends="cmake cmake-extras gmock gtest-dev qt5-qtbase-dev"
checkdepends="procps py3-dbusmock dbus-x11"
source="$pkgname-$_commit.tar.gz::https://github.com/ubports/$pkgname/archive/$_commit.tar.gz
SuicidalSleep.patch"
builddir="$srcdir/$pkgname-$_commit"
build() {
cd "$builddir"
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_INSTALL_LIBEXECDIR=lib .
make
}
check() {
cd "$builddir"
CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
}
sha512sums="e587a3342879cf11543529cf2e6ad9f6266963afdad29f91bcf2742086cb9f889eca36f335280a658ecbf9a5e5319154e0b7ea842a008b3d2fb7740488ed442e libqtdbustest-24e410ea77c9fa08894365c60bf08811a3b60bc0.tar.gz
4ce1c9a23784412b7e171129db2dc13e39a515249edc73bdbd835996d76670eeafead55dbaa197ec8614d560038f6bf9fa999be3e5989d4d7134172e9dcf25bb SuicidalSleep.patch"

View file

@ -1,13 +0,0 @@
diff --git a/tests/libqtdbustest/TestSuicidalProcess.cpp b/tests/libqtdbustest/TestSuicidalProcess.cpp
index 3bdaeea..fa1e4eb 100644
--- a/tests/libqtdbustest/TestSuicidalProcess.cpp
+++ b/tests/libqtdbustest/TestSuicidalProcess.cpp
@@ -51,7 +51,7 @@ TEST_F(TestSuicidalProcess, BehavesLikeNormalQProcess) {
pgrep.waitForFinished();
pgrep.waitForReadyRead();
- EXPECT_EQ("sleep 5",
+ EXPECT_EQ("/bin/sleep 5",
QString::fromUtf8(pgrep.readAll().trimmed()).toStdString());
}

View file

@ -1,47 +0,0 @@
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=libusermetrics
pkgver=0_git20190101
_commit="ed7dd5d3fb5b01c345f942561008c4ca86568b34"
pkgrel=0
pkgdesc='Library for exporting anonymous metrics about users'
arch="x86_64"
url="https://unity8.io"
license="GPL-3.0 LGPL-3.0 LGPL-2.1"
depends=""
depends_dev="qt5-qtxmlpatterns-dev libapparmor-dev gsettings-qt-dev qt5-qtdeclarative-dev click-dev qdjango-dev"
makedepends="$depends_dev cmake-extras qt5-qtbase-dev libapparmor libqtdbustest intltool"
source="$pkgname-$_commit.tar.gz::https://github.com/ubports/$pkgname/archive/$_commit.tar.gz"
subpackages="$pkgname-dev $pkgname-lang"
builddir="$srcdir/$pkgname-$_commit"
prepare() {
default_prepare
mkdir "$builddir"/build
# Don't build tests
truncate -s 0 "$builddir"/tests/CMakeLists.txt
}
build() {
cd "$builddir"/build
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DWerror=OFF ..
make
}
check() {
cd "$builddir"/build
CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}
package() {
cd "$builddir"/build
make DESTDIR="$pkgdir" install
}
sha512sums="39a61b1afd4e91eacd1d01322a0c505dbc14b557bd802b41d050fd2e93280ebc77bb2c66608496f06c970324d84bd215d8f8de9cbdc421d6061443a9d2554dc2 libusermetrics-ed7dd5d3fb5b01c345f942561008c4ca86568b34.tar.gz"

View file

@ -1,40 +0,0 @@
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=location-service
pkgver=0_git20190111
pkgrel=2
_commit="b1d6a2fda0269be01a573b2b3726184a25168110"
pkgdesc="Location service aggregating position/velocity/heading updates and exporting them over dbus"
arch="x86_64"
url="https://unity8.io"
license="GPL-3.0 LGPL-3.0"
depends=""
depends_dev="boost-dev dbus-dev net-cpp-dev process-cpp-dev properties-cpp-dev json-c-dev libapparmor-dev gflags-dev glog-dev trust-store-dev"
makedepends="$depends_dev cmake-extras gettext gtest-dev gmock dbus-cpp-dev"
source="$pkgname-$_commit.tar.gz::https://github.com/ubports/$pkgname/archive/$_commit.tar.gz"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
options="!check" # Several failures
builddir="$srcdir/$pkgname-$_commit"
build() {
mkdir -p "$builddir"/build
cd "$builddir"/build
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DLOCATION_SERVICE_ENABLE_GPS_PROVIDER=OFF ..
make
}
check() {
cd "$builddir"/build
CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}
package() {
cd "$builddir"/build
make DESTDIR="$pkgdir" install
}
sha512sums="72821a935f9401d5006ee76f1b034976773af621a3a9ad2dfab15af6e99c8cbfbcb32304a4e2d8ce072bfc38309db2058bc78b2fd1f5e7342bb7f51ff857ad93 location-service-b1d6a2fda0269be01a573b2b3726184a25168110.tar.gz"

View file

@ -1,66 +0,0 @@
From e038df1a9ef91aab176225de7bad6871dc3f2a29 Mon Sep 17 00:00:00 2001
From: Oliver Smith <ollieparanoid@bitmessage.ch>
Date: Fri, 5 Jul 2019 22:43:16 +0200
Subject: [PATCH 1/2] Fix google::protobuf::closure related errors
Include google/protobuf/stubs/callback.h to get rid of build errors like
the following, when building against protobuf 3.8.0:
[ 20%] Building CXX object src/server/scene/CMakeFiles/mirscene.dir/broadcasting_session_event_sink.cpp.o
In file included from /home/pmos/build/src/mir-1.1.2/src/server/frontend/session_mediator.cpp:19:
In file included from /home/pmos/build/src/mir-1.1.2/src/server/frontend/session_mediator.h:22:
In file included from /home/pmos/build/src/mir-1.1.2/src/server/frontend/display_server.h:22:
/home/pmos/build/src/mir-1.1.2/src/include/common/mir/protobuf/display_server.h:37:27: error: no type named 'Closure' in namespace 'google::protobuf'
google::protobuf::Closure* done) = 0;
~~~~~~~~~~~~~~~~~~^
/home/pmos/build/src/mir-1.1.2/src/include/common/mir/protobuf/display_server.h:41:27: error: no type named 'Closure' in namespace 'google::protobuf'
google::protobuf::Closure* done) = 0;
~~~~~~~~~~~~~~~~~~^
Related: https://github.com/MirServer/mir/issues/913
---
src/client/rpc/mir_basic_rpc_channel.h | 2 ++
src/include/common/mir/protobuf/display_server.h | 1 +
src/include/common/mir/protobuf/display_server_debug.h | 1 +
3 files changed, 4 insertions(+)
diff --git a/src/client/rpc/mir_basic_rpc_channel.h b/src/client/rpc/mir_basic_rpc_channel.h
index e0af61a..f4a650d 100644
--- a/src/client/rpc/mir_basic_rpc_channel.h
+++ b/src/client/rpc/mir_basic_rpc_channel.h
@@ -27,6 +27,8 @@
#include <condition_variable>
#include <functional>
+#include <google/protobuf/stubs/callback.h>
+
namespace google
{
namespace protobuf
diff --git a/src/include/common/mir/protobuf/display_server.h b/src/include/common/mir/protobuf/display_server.h
index 481af5a..852230d 100644
--- a/src/include/common/mir/protobuf/display_server.h
+++ b/src/include/common/mir/protobuf/display_server.h
@@ -19,6 +19,7 @@
#ifndef MIR_PROTOBUF_DISPLAY_SERVER_H_
#define MIR_PROTOBUF_DISPLAY_SERVER_H_
+#include <google/protobuf/stubs/callback.h>
#include "mir_protobuf.pb.h"
namespace mir
diff --git a/src/include/common/mir/protobuf/display_server_debug.h b/src/include/common/mir/protobuf/display_server_debug.h
index c60436e..20f9583 100644
--- a/src/include/common/mir/protobuf/display_server_debug.h
+++ b/src/include/common/mir/protobuf/display_server_debug.h
@@ -19,6 +19,7 @@
#ifndef MIR_PROTOBUF_DISPLAY_SERVER_DEBUG_H_
#define MIR_PROTOBUF_DISPLAY_SERVER_DEBUG_H_
+#include <google/protobuf/stubs/callback.h>
#include "mir_protobuf.pb.h"
namespace mir
--
2.17.2

View file

@ -1,53 +0,0 @@
From bac975363a78ab2bea2bdc6a3a9e199e9beea1f0 Mon Sep 17 00:00:00 2001
From: Oliver Smith <ollieparanoid@bitmessage.ch>
Date: Sat, 6 Jul 2019 00:13:36 +0200
Subject: [PATCH 2/2] Remove drmIsMaster to use libdrm version
Here is the proper version of this patch, but it does not apply cleanly
on mir-1.1.2, so I chose to simply remove the whole drmIsMaster().
https://github.com/MirServer/mir/pull/814
This patch can be removed once we update to a newer mir version, which
has the pull request above included.
---
.../console/minimal_console_services.cpp | 23 -------------------
1 file changed, 23 deletions(-)
diff --git a/src/server/console/minimal_console_services.cpp b/src/server/console/minimal_console_services.cpp
index b6d7918..51df9f3 100644
--- a/src/server/console/minimal_console_services.cpp
+++ b/src/server/console/minimal_console_services.cpp
@@ -35,29 +35,6 @@
#include <sys/types.h>
#include <drm.h>
-// TODO: once libdrm provides this symbol, we need a way to set MIR_LIBDRM_HAS_IS_MASTER
-#ifndef MIR_LIBDRM_HAS_IS_MASTER
-bool drmIsMaster(int fd)
-{
- struct drm_mode_mode_cmd cmd;
-
- ::memset(&cmd, 0, sizeof cmd);
- /* Set an invalid connector_id to ensure that ATTACHMODE errors with
- * EINVAL in the unlikely event someone feels like calling this on a
- * kernel prior to 3.9. */
- cmd.connector_id = -1;
-
- if (drmIoctl(fd, DRM_IOCTL_MODE_ATTACHMODE, &cmd) != -1)
- {
- /* On 3.9 ATTACHMODE was changed to drm_noop, and so will succeed
- * iff we've got a master fd */
- return true;
- }
-
- return errno == EINVAL;
-}
-#endif
-
mir::MinimalConsoleDevice::MinimalConsoleDevice(std::unique_ptr<mir::Device::Observer> observer)
: observer{std::move(observer)}
{
--
2.17.2

View file

@ -1,46 +0,0 @@
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=mir
pkgver=1.1.2
pkgrel=4
pkgdesc="Canonical's display server"
url="https://mir-server.io"
arch="x86_64"
license="GPL-2.0 GPL-3.0 LGPL-2.1 LGPL-3.0"
depends="xkeyboard-config dmz-cursor-theme ttf-freefont"
depends_dev="boost-dev mesa-dev glm-dev protobuf-dev glog-dev gflags-dev eudev-dev glib-dev wayland-dev libepoxy-dev nettle-dev libinput-dev
capnproto-dev libxml++-2.6-dev py3-pillow freetype-dev libevdev-dev umockdev-dev lttng-ust-dev yaml-cpp-dev libxcursor-dev"
makedepends="$depends_dev cmake libxkbcommon-dev gtest-dev gmock clang-dev"
source="
https://github.com/MirServer/mir/releases/download/v$pkgver/mir-$pkgver.tar.xz
0001-Fix-google-protobuf-closure-related-errors.patch
0002-Remove-drmIsMaster-to-use-libdrm-version.patch
"
subpackages="$pkgname-dev"
options="!check" # Some tests fail
build() {
cd "$builddir"
export CC=clang
export CXX=clang++
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DMIR_USE_LD=ld
make
}
check() {
cd "$builddir"
bin/mir_acceptance_tests
bin/mir_integration_tests
bin/mir_unit_tests
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir/" install
}
sha512sums="4431615d795b93239a83a197d61a5900f094a2108933be4e4da09220bd20e2b031e5232174805216a964279fcf8786672d5c40c3be83856d1903f128b7b814b7 mir-1.1.2.tar.xz
6f0d22d2d0ec85793b5067f2dcb95ac57ef5118096028098f096b32781f49acfe28ab52523ac34f72035ec7518056c392a9fc46ea5c41332538fe7a0d0db303a 0001-Fix-google-protobuf-closure-related-errors.patch
279c009d8d54823bcfdfd564543ffa4cb1ad99cef211f82d5eefe3cc33fda80d5455dfaf8ba732f6cd1067bb442d732b364fdeee07018006def13b55887c6da8 0002-Remove-drmIsMaster-to-use-libdrm-version.patch"

View file

@ -1,37 +0,0 @@
From 1289c8754848b1b95d89037aea6ddf3bde3534db Mon Sep 17 00:00:00 2001
From: Luca Weiss <luca@z3ntu.xyz>
Date: Sat, 12 Jan 2019 14:12:54 +0100
Subject: [PATCH 1/3] Use proper GTest
---
CMakeLists.txt | 2 --
tests/CMakeLists.txt | 2 +-
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d5076b4..e6e5485 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -84,6 +84,4 @@ add_subdirectory(examples/)
#### Enable tests
include(CTest)
-set(GTEST_ROOT /usr/src/gtest)
add_subdirectory(tests/)
-add_subdirectory(${GTEST_ROOT} ${CMAKE_CURRENT_BINARY_DIR}/gtest)
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 2b7204f..659510c 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,7 +1,7 @@
find_package(PkgConfig REQUIRED)
pkg_check_modules(PROCESS_CPP process-cpp REQUIRED)
-include_directories(${GTEST_ROOT}/src)
+find_package(GTest)
include_directories(${PROCESS_CPP_INCLUDE_DIRS})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11")
--
2.20.1

View file

@ -1,48 +0,0 @@
From 3e44a0e6b759f1cc5483e73efd9a3e50a276fdb3 Mon Sep 17 00:00:00 2001
From: Luca Weiss <luca@z3ntu.xyz>
Date: Sat, 12 Jan 2019 14:13:21 +0100
Subject: [PATCH 2/3] Use getenv instead of secure_getenv
---
src/bridge/bridge.h | 4 ++--
src/ubuntu/application/base_module.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/bridge/bridge.h b/src/bridge/bridge.h
index c972e6a..eafacbd 100644
--- a/src/bridge/bridge.h
+++ b/src/bridge/bridge.h
@@ -44,7 +44,7 @@ class HIDDEN_SYMBOL Bridge
void* resolve_symbol(const char* symbol, const char* module = "") const
{
- static const char* test_modules = secure_getenv("UBUNTU_PLATFORM_API_TEST_OVERRIDE");
+ static const char* test_modules = getenv("UBUNTU_PLATFORM_API_TEST_OVERRIDE");
if (test_modules && strstr(test_modules, module)) {
printf("Platform API: INFO: Overriding symbol '%s' with test version\n", symbol);
return Scope::dlsym_fn(lib_override_handle, symbol);
@@ -57,7 +57,7 @@ class HIDDEN_SYMBOL Bridge
Bridge()
: lib_handle(Scope::dlopen_fn(Scope::path(), RTLD_LAZY))
{
- if (Scope::override_path() && secure_getenv("UBUNTU_PLATFORM_API_TEST_OVERRIDE"))
+ if (Scope::override_path() && getenv("UBUNTU_PLATFORM_API_TEST_OVERRIDE"))
lib_override_handle = (Scope::dlopen_fn(Scope::override_path(), RTLD_LAZY));
}
diff --git a/src/ubuntu/application/base_module.h b/src/ubuntu/application/base_module.h
index 31522e3..379276b 100644
--- a/src/ubuntu/application/base_module.h
+++ b/src/ubuntu/application/base_module.h
@@ -47,7 +47,7 @@ struct HIDDEN_SYMBOL ToBackend
char module_name[32];
if (cache == NULL) {
- cache = secure_getenv("UBUNTU_PLATFORM_API_BACKEND");
+ cache = getenv("UBUNTU_PLATFORM_API_BACKEND");
if (cache == NULL) {
FILE *conf;
conf = fopen("/etc/ubuntu-platform-api/application.conf", "r");
--
2.20.1

View file

@ -1,208 +0,0 @@
From 35d1771d83879a0e6970682b1e75f83d9cb1d143 Mon Sep 17 00:00:00 2001
From: Luca Weiss <luca@z3ntu.xyz>
Date: Sat, 12 Jan 2019 14:14:45 +0100
Subject: [PATCH 3/3] Only use hybris if available
---
src/ubuntu/application/touch/CMakeLists.txt | 58 +++++++--------
.../application/touch/hybris/CMakeLists.txt | 30 ++++----
src/ubuntu/hardware/CMakeLists.txt | 70 ++++++++++---------
3 files changed, 82 insertions(+), 76 deletions(-)
diff --git a/src/ubuntu/application/touch/CMakeLists.txt b/src/ubuntu/application/touch/CMakeLists.txt
index b0272cd..fb4408d 100644
--- a/src/ubuntu/application/touch/CMakeLists.txt
+++ b/src/ubuntu/application/touch/CMakeLists.txt
@@ -1,35 +1,37 @@
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11")
+if(Hybris)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11")
-add_subdirectory(hybris)
+ add_subdirectory(hybris)
-add_library(
- ubuntu_application_api_touch_mirclient SHARED
+ add_library(
+ ubuntu_application_api_touch_mirclient SHARED
- module.cpp
- module_version.h
-)
+ module.cpp
+ module_version.h
+ )
-target_link_libraries(
- ubuntu_application_api_touch_mirclient
+ target_link_libraries(
+ ubuntu_application_api_touch_mirclient
- "-Wl,--whole-archive"
- ubuntu_application_api_mirclient
- ubuntu_application_api_hybris
- ${UBUNTU_APPLICATION_API_LINK_LIBRARIES}
- "-Wl,--no-whole-archive"
- #TODO: Alarms
-)
+ "-Wl,--whole-archive"
+ ubuntu_application_api_mirclient
+ ubuntu_application_api_hybris
+ ${UBUNTU_APPLICATION_API_LINK_LIBRARIES}
+ "-Wl,--no-whole-archive"
+ #TODO: Alarms
+ )
-set_target_properties(
- ubuntu_application_api_touch_mirclient
- PROPERTIES
- VERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR}.${UBUNTU_PLATFORM_API_VERSION_MINOR}.${UBUNTU_PLATFORM_API_VERSION_PATCH}
- SOVERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR}
-)
+ set_target_properties(
+ ubuntu_application_api_touch_mirclient
+ PROPERTIES
+ VERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR}.${UBUNTU_PLATFORM_API_VERSION_MINOR}.${UBUNTU_PLATFORM_API_VERSION_PATCH}
+ SOVERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR}
+ )
-install(
- TARGETS ubuntu_application_api_touch_mirclient
- # this is not a development library to compile against, users should always
- # specify the SONAME; so don't build a *.so
- LIBRARY DESTINATION "${LIB_INSTALL_DIR}" NAMELINK_SKIP
-)
+ install(
+ TARGETS ubuntu_application_api_touch_mirclient
+ # this is not a development library to compile against, users should always
+ # specify the SONAME; so don't build a *.so
+ LIBRARY DESTINATION "${LIB_INSTALL_DIR}" NAMELINK_SKIP
+ )
+endif()
diff --git a/src/ubuntu/application/touch/hybris/CMakeLists.txt b/src/ubuntu/application/touch/hybris/CMakeLists.txt
index 26a1c59..2ce2912 100644
--- a/src/ubuntu/application/touch/hybris/CMakeLists.txt
+++ b/src/ubuntu/application/touch/hybris/CMakeLists.txt
@@ -1,17 +1,19 @@
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -fPIC")
+if(Hybris)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -fPIC")
-add_library(
- ubuntu_application_api_hybris STATIC
-
- ubuntu_application_sensors_hybris.cpp
-)
+ add_library(
+ ubuntu_application_api_hybris STATIC
-include_directories(
- ${CMAKE_BINARY_DIR}/include
-)
+ ubuntu_application_sensors_hybris.cpp
+ )
-target_link_libraries(
- ubuntu_application_api_hybris
-
- ${Hybris}
-)
+ include_directories(
+ ${CMAKE_BINARY_DIR}/include
+ )
+
+ target_link_libraries(
+ ubuntu_application_api_hybris
+
+ ${Hybris}
+ )
+endif()
diff --git a/src/ubuntu/hardware/CMakeLists.txt b/src/ubuntu/hardware/CMakeLists.txt
index df1f0d2..b780f16 100644
--- a/src/ubuntu/hardware/CMakeLists.txt
+++ b/src/ubuntu/hardware/CMakeLists.txt
@@ -1,45 +1,47 @@
-set(
- UBUNTU_HARDWARE_API_LINK_LIBRARIES
-
- ubuntu_hardware_alarm
-)
+if(Hybris)
+ set(
+ UBUNTU_HARDWARE_API_LINK_LIBRARIES
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -fPIC")
+ ubuntu_hardware_alarm
+ )
-include_directories(
- ${CMAKE_BINARY_DIR}/include
-)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -fPIC")
-include_directories(../../bridge)
+ include_directories(
+ ${CMAKE_BINARY_DIR}/include
+ )
-add_subdirectory(alarms/)
+ include_directories(../../bridge)
-add_library(
- ubuntu_platform_hardware_api SHARED
- ubuntu_platform_hardware_api.cpp
-)
+ add_subdirectory(alarms/)
-target_link_libraries(
- ubuntu_platform_hardware_api
+ add_library(
+ ubuntu_platform_hardware_api SHARED
+ ubuntu_platform_hardware_api.cpp
+ )
- "-Wl,--whole-archive"
- ${UBUNTU_HARDWARE_API_LINK_LIBRARIES}
- "-Wl,--no-whole-archive"
+ target_link_libraries(
+ ubuntu_platform_hardware_api
- dl
- ${Hybris}
-)
+ "-Wl,--whole-archive"
+ ${UBUNTU_HARDWARE_API_LINK_LIBRARIES}
+ "-Wl,--no-whole-archive"
-set_target_properties(
- ubuntu_platform_hardware_api
- PROPERTIES
- VERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR}.${UBUNTU_PLATFORM_API_VERSION_MINOR}.${UBUNTU_PLATFORM_API_VERSION_PATCH}
- SOVERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR}
-)
+ dl
+ ${Hybris}
+ )
-install(
- TARGETS ubuntu_platform_hardware_api
- ${INSTALL_TARGETS_DEFAULT_ARGS}
-)
+ set_target_properties(
+ ubuntu_platform_hardware_api
+ PROPERTIES
+ VERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR}.${UBUNTU_PLATFORM_API_VERSION_MINOR}.${UBUNTU_PLATFORM_API_VERSION_PATCH}
+ SOVERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR}
+ )
-add_subdirectory(tests/)
+ install(
+ TARGETS ubuntu_platform_hardware_api
+ ${INSTALL_TARGETS_DEFAULT_ARGS}
+ )
+
+ add_subdirectory(tests/)
+endif()
--
2.20.1

View file

@ -1,45 +0,0 @@
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=platform-api
pkgver=0_git20180218
pkgrel=0
_commit="464a38b496ec499ed19fb93aefd6770abd5c19b8"
pkgdesc="Platform API for system level capabilities"
arch="x86_64"
url='https://unity8.io'
license="GPL-3.0 LGPL-3.0"
depends=""
depends_dev="process-cpp-dev url-dispatcher-dev location-service-dev"
makedepends="$depends_dev cmake cmake-extras dbus-cpp-dev"
checkdepends="gtest-dev gmock"
source="$pkgname-$_commit.tar.gz::https://github.com/ubports/$pkgname/archive/$_commit.tar.gz
0001-Use-proper-GTest.patch
0002-Use-getenv-instead-of-secure_getenv.patch
0003-Only-use-hybris-if-available.patch"
subpackages="$pkgname-dev"
builddir="$srcdir/$pkgname-$_commit"
build() {
mkdir -p build
cd build
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib ..
make
}
check() {
cd "$builddir"/build
make test
}
package() {
cd "$builddir"/build
make DESTDIR="$pkgdir" install
}
sha512sums="e2218778bdef261b0b1e16e70eb720c1ab2f369d410dbb24edd4acc9ab882ffdcc9a96e16b5e703960dae63c49d82912bb5671e678c1caf6c4f4bc6b9784b7ee platform-api-464a38b496ec499ed19fb93aefd6770abd5c19b8.tar.gz
45825a297eadafc4ad51cc989785704e974f4b6d714753a120165b40868fb7b0addd0d473bd97b01d248082817605128ddc4909ab0c0f81162129fa322d20d64 0001-Use-proper-GTest.patch
c7eb662fd843ac73d91366d11fd331281c040dd8a58665419fad155f0af2054c66496ee58c3db40040736a2673efe44d2343f5bb11cb5188965ee04a1bc36907 0002-Use-getenv-instead-of-secure_getenv.patch
2cf7c3d05c9f8f100afcb0d921729cb9479250e7b8ad3f9d00be3689ed0026a990d1a6ce5d3fcc24c930880aaefe33f0236509fae6e22a2563cab27127cefc3e 0003-Only-use-hybris-if-available.patch"

View file

@ -1,39 +0,0 @@
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=qdjango
pkgver=0.6.2
pkgrel=0
pkgdesc="A Qt-based C++ web framework"
url="https://github.com/jlaine/qdjango"
arch="x86_64"
license="LGPL-2.1"
depends=""
depends_dev="qt5-qtdeclarative-dev"
makedepends="$depends_dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/jlaine/qdjango/archive/v$pkgver.tar.gz"
subpackages="$pkgname-dev $pkgname-doc"
prepare() {
default_prepare
mkdir "$builddir"/build
# Remove tests as they fail to compile
sed -i 's|SUBDIRS += tests examples|SUBDIRS += examples|' qdjango.pro
}
build() {
cd build
qmake-qt5 PREFIX=/usr ..
make
}
check() {
cd build
make check
}
package() {
cd build
make INSTALL_ROOT="$pkgdir" install
}
sha512sums="0280b09f0740ca7e70f62e36ea9e5bb648fe6d3ba1492e59f8c956df163c6db2338ea735e0b7937ee6e417f503a510eedf983ec6dc9744021a0c83a9432aa33f qdjango-0.6.2.tar.gz"

View file

@ -1,38 +0,0 @@
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=qmenumodel
pkgver=0_git20180727
pkgrel=0
_commit="30e3dc541966abfd2ac1436caec7cd4bebdf996e"
pkgdesc='qmenumodel'
arch="x86_64"
url="https://unity8.io"
license="LGPL-3.1"
depends=""
depends_dev="qt5-qtdeclarative-dev"
makedepends="$depends_dev cmake qt5-qtbase-dev"
checkdepends="dbus-test-runner"
source="$pkgname-$_commit.tar.gz::https://github.com/ubports/$pkgname/archive/$_commit.tar.gz"
subpackages="$pkgname-dev"
builddir="$srcdir/$pkgname-$_commit"
options="!check" # 44% tests passed, 5 tests failed out of 9
build() {
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib
make
}
check() {
cd "$builddir"
make test
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
}
sha512sums="36fb9314703aed90862f405792ff9eaac3761972dfd51591ba2270809681d0a0035151241a9efb20595ea5a66860398041be8cf8d0b5865253cbb16475373172 qmenumodel-30e3dc541966abfd2ac1436caec7cd4bebdf996e.tar.gz"

View file

@ -1,43 +0,0 @@
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=qtmir
pkgver=0_git20190222
_commit="1bddb8c2331f990a53286aeeb070ed384850b52e"
pkgrel=0
pkgdesc="QPA plugin to make Qt a Mir server"
arch="x86_64"
url="https://unity8.io"
license="LGPL-3.0"
depends=""
makedepends="$depends_dev cmake cmake-extras gtest-dev mir-dev process-cpp-dev qt5-qtdeclarative-dev qt5-qtsensors-dev ubuntu-app-launch-dev gsettings-qt-dev libqtdbustest libqtdbusmock content-hub-dev valgrind-dev url-dispatcher-dev"
source="$pkgname-$_commit.tar.gz::https://github.com/ubports/$pkgname/archive/$_commit.tar.gz"
builddir="$srcdir/$pkgname-$_commit"
prepare() {
default_prepare
mkdir -p "$builddir"/build
# Don't build tests, they require Mir to be built with tests which is disabled
truncate -s 0 "$builddir"/tests/CMakeLists.txt
}
build() {
cd "$builddir"/build
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib ..
make
}
check() {
cd "$builddir"/build
CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}
package() {
cd "$builddir"/build
make DESTDIR="$pkgdir" install
}
sha512sums="36492fc7ffe0937abb343e9ab816b7194636a4fb8e946f25a3113639460e0c79f8449c05d8fe4b44e4e30167fa39dd8c054bd4df536e21926b73b855212db9eb qtmir-1bddb8c2331f990a53286aeeb070ed384850b52e.tar.gz"

View file

@ -1,40 +0,0 @@
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=settings-components
pkgver=0_git20180610
pkgrel=0
_commit="d66cac294e48d2a65ff8b5140187916c0eb1f2e8"
pkgdesc="Ubuntu settings components for Unity8"
arch="x86_64"
url="https://unity8.io"
license="GPL-3.0 LGPL-3.0"
depends=""
makedepends="cmake cmake-extras qt5-qtdeclarative-dev"
source="$pkgname-$_commit.tar.gz::https://github.com/ubports/$pkgname/archive/$_commit.tar.gz
qmltestrunner.patch"
subpackages="$pkgname-lang"
builddir="$srcdir/$pkgname-$_commit"
options="!check" # 0% tests passed, 1 tests failed out of 1
build() {
mkdir -p "$builddir"/build
cd "$builddir"/build
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib ..
make
}
check() {
cd "$builddir"/build
make test
}
package() {
cd "$builddir"/build
make DESTDIR="$pkgdir" install
}
sha512sums="199b2baf552f35bac4f16027e7823fae21149b0cfade6c99d3e0e802d32ba75fec3ac4e1a8651940e7216bfef737d3f7227e3b09840483b64d24a404a204e92a settings-components-d66cac294e48d2a65ff8b5140187916c0eb1f2e8.tar.gz
0cbe24ba24468ccfae80b6d6b49c68b55e44561ac7914645746af15ee252c12341f2b401390cffbed520963d1cb7da6980f99520ee820528de964b8a714b87b4 qmltestrunner.patch"

View file

@ -1,29 +0,0 @@
diff --git a/cmake/modules/QmlTest.cmake b/cmake/modules/QmlTest.cmake
index 42d5c49..3ccd6ac 100644
--- a/cmake/modules/QmlTest.cmake
+++ b/cmake/modules/QmlTest.cmake
@@ -65,9 +65,9 @@ endfunction()
# This function wraps add_executable_test, see below for available arguments.
function(add_qml_unittest PATH COMPONENT_NAME)
- import_executables(qmltestrunner)
+ import_executables(qmltestrunner-qt5)
- add_executable_test(${COMPONENT_NAME} qmltestrunner
+ add_executable_test(${COMPONENT_NAME} qmltestrunner-qt5
${ARGN}
ARGS -input ${CMAKE_CURRENT_SOURCE_DIR}/${PATH}/tst_${COMPONENT_NAME}.qml ${QMLTEST_ARGS}
)
@@ -84,10 +84,10 @@ endfunction()
# This function wraps add_manual_test, see below for available arguments.
function(add_manual_qml_test PATH COMPONENT_NAME)
- import_executables(qmlscene)
+ import_executables(qmlscene-qt5)
cmake_parse_arguments(QMLTEST "${QMLTEST_OPTIONS}" "${QMLTEST_SINGLE}" "${QMLTEST_MULTI}" ${ARGN})
- add_manual_test(${COMPONENT_NAME} qmlscene
+ add_manual_test(${COMPONENT_NAME} qmlscene-qt5
${ARGN}
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/${PATH}/tst_${COMPONENT_NAME}.qml ${QMLTEST_ARGS}
)

View file

@ -1,48 +0,0 @@
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=system-settings
_pkgname=system-settings
pkgver=0_git20181011
_commit="7414ae1e6436aafe8be2717b382ab865bd923a2e"
pkgrel=2
pkgdesc="System Settings application for Unity8"
url="https://github.com/ubports/system-settings"
arch="x86_64"
license="GPL-3.0"
depends=""
makedepends="cmake qt5-qtbase-dev upower-dev networkmanager-dev accountsservice-ubuntu-dev geonames-dev icu-dev libqtdbusmock gsettings-qt-dev click-dev gnome-desktop-dev trust-store-dev qt5-qtdeclarative-dev qt5-qtdeclarative intltool"
source="$pkgname-$_commit.tar.gz::https://github.com/ubports/$pkgname/archive/$_commit.tar.gz
qmltestrunner.patch"
builddir="$srcdir/$pkgname-$_commit"
options="!check" # Needs xvfb-run
prepare() {
default_prepare
mkdir "$builddir"/build
# Don't build the update page, needs apt libraries
sed -i 's/update.cpp//g' plugins/system-update/CMakeLists.txt
sed -i 's/apt-pkg//g' plugins/system-update/CMakeLists.txt
sed -i 's/apt-pkg//g' tests/mocks/Ubuntu/SystemSettings/Update/CMakeLists.txt
truncate -s 0 "$builddir"/tests/plugins/system-update/CMakeLists.txt
}
build() {
cd "$builddir"/build
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib ..
make
}
check() {
cd "$builddir"/build
CTEST_OUTPUT_ON_FAILURE=true ctest
}
package() {
cd "$builddir"/build
make DESTDIR="$pkgdir" install
}
sha512sums="a4cbc9d5be75268032bf4a325b95bab180b5cf20e7f6b6a176e195522c076edf048962f7acbcda56f368fca745ef8e2888261bd35a5c772d54e0ff42c51f6ad4 system-settings-7414ae1e6436aafe8be2717b382ab865bd923a2e.tar.gz
d839e01038301ecccaba86407f0b82c56cac175992d7900893a5aa6a71468a7a78a6458ba56a39c949947be7c9b705409db9f8e70e08ddf3155259ceb5327d31 qmltestrunner.patch"

View file

@ -1,13 +0,0 @@
diff --git a/cmake/QmlTest.cmake b/cmake/QmlTest.cmake
index 253b1206..dbdf6668 100644
--- a/cmake/QmlTest.cmake
+++ b/cmake/QmlTest.cmake
@@ -19,7 +19,7 @@
# qmltest_DEFAULT_IMPORT_PATHS
# qmltest_DEFAULT_PROPERTIES
-find_program(qmltestrunner_exe qmltestrunner)
+find_program(qmltestrunner_exe qmltestrunner-qt5)
find_program(qmlscene_exe qmlscene)
find_program(gcc_exe gcc)

View file

@ -1,40 +0,0 @@
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=trust-store
pkgver=0_git20180614
_commit="029270066854c281213cbf7dab10e21682c61b86"
pkgrel=2
pkgdesc="An API for creating, reading, updating and deleting trust requests answered by users."
url="https://github.com/ubports/trust-store"
arch="x86_64"
license="LGPL-3.0"
depends=""
makedepends="cmake cmake-extras mir-dev boost-dev process-cpp-dev dbus-cpp-dev properties-cpp-dev libapparmor-dev libapparmor qt5-qtdeclarative-dev gtest-dev gmock"
source="$pkgname-$_commit.tar.gz::https://github.com/ubports/$pkgname/archive/$_commit.tar.gz
link_with_libintl.patch
no_werror.patch"
subpackages="$pkgname-dev $pkgname-lang"
builddir="$srcdir/$pkgname-$_commit"
options="!check" # 62% tests passed, 5 tests failed out of 13
build() {
mkdir "$builddir/build"
cd "$builddir/build"
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib ..
make
}
check() {
cd "$builddir/build"
make test
}
package() {
cd "$builddir/build"
make DESTDIR="$pkgdir" install
}
sha512sums="ae011c74f5a581f2cc6d5e69fe3ce69b085ca39d4f62c2fe0969283f8b8c0883ca461f706be11e9151af5e6fc38c4533b9e17fcf71f91ff3d97f76a711591fd4 trust-store-029270066854c281213cbf7dab10e21682c61b86.tar.gz
8a632fb81a063f0e35aa0040f775656dbf5f4fef7a6383ef2320b31d30c5561444fada85602c7837062413e99c4171f5ac44c7e52678fc3fb1a7a5487cc7a297 link_with_libintl.patch
b839985eaedbab84240a619f5775b4b1d4a22cb38aec3314d125665550889cde845ba86f065346dc83aac8a03900feae62c69db69e4cb2983b9f20128c373ffb no_werror.patch"

View file

@ -1,20 +0,0 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 32b3632..4661cbc 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -17,6 +17,7 @@
find_package(Qt5Core REQUIRED)
find_package(Qt5Qml REQUIRED)
find_package(Qt5Quick REQUIRED)
+find_package(Intl REQUIRED)
pkg_check_modules(DBUS_CPP dbus-cpp REQUIRED)
pkg_check_modules(DBUS dbus-1 REQUIRED)
@@ -108,6 +109,7 @@ if (TRUST_STORE_MIR_AGENT_ENABLED)
target_link_libraries(
trust-prompt
+ ${Intl_LIBRARIES}
Qt5::Core Qt5::Gui Qt5::Qml Qt5::Quick
${Boost_LIBRARIES}
${PROCESS_CPP_LDFLAGS}

View file

@ -1,15 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0e86292..a68687e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,8 +39,8 @@ include(cmake/EnableCoverageReport.cmake)
include(cmake/PrePush.cmake)
include(GNUInstallDirs)
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wall -pedantic -Wextra -fPIC -fvisibility=hidden -pthread")
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Werror -Wall -fno-strict-aliasing -fvisibility=hidden -fvisibility-inlines-hidden -pedantic -Wextra -fPIC -pthread")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic -Wextra -fPIC -fvisibility=hidden -pthread")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -fno-strict-aliasing -fvisibility=hidden -fvisibility-inlines-hidden -pedantic -Wextra -fPIC -pthread")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
#####################################################################

View file

@ -1,46 +0,0 @@
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=ubuntu-app-launch
pkgver=0_git20181230
pkgrel=0
_commit="55c0338a110a10994de4efc220d36293080770e2"
pkgdesc="Session init system job for Launching Applications"
arch="x86_64"
url="https://unity8.io"
license="GPL-3.0"
depends_dev="gobject-introspection-dev lttng-ust-dev json-glib-dev zeitgeist-dev unity-api-dev curl-dev properties-cpp-dev"
makedepends="$depends_dev cmake cmake-extras dbus-test-runner qt5-qtdeclarative gtest-dev glib-dev mir-dev"
checkdepends="gtest-dev gmock py3-dbusmock"
source="$pkgname-$_commit.tar.gz::https://github.com/ubports/$pkgname/archive/$_commit.tar.gz
libual-test_libertine.patch"
subpackages="$pkgname-dev"
builddir="$srcdir/$pkgname-$_commit"
options="!check" # Tests have to be adjusted for POSIX backend
prepare() {
default_prepare
# Don't build tests, see above
truncate -s 0 "$builddir"/tests/CMakeLists.txt
}
build() {
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib
make
}
check() {
cd "$builddir"
make test
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
}
sha512sums="0834277bd0cf14255bbf67a558933044a3daa04b62de4df1bf540dad63f2a03411ec3b1833c1ef7b97a26051064a37e9b1c9a2078caad8bd4d389425f0fd091e ubuntu-app-launch-55c0338a110a10994de4efc220d36293080770e2.tar.gz
aaec2d03930b85ea4298c056670ecc1e7855ecb951ecaa13cc94a762524928aacdd86a8d89cf86fa16f44bd8a6064e2f8cc3450a9f06cc57e1fa8bbd1a21c2d9 libual-test_libertine.patch"

View file

@ -1,51 +0,0 @@
diff --git a/tests/libual-test.cc b/tests/libual-test.cc
index 623911a..7e11034 100644
--- a/tests/libual-test.cc
+++ b/tests/libual-test.cc
@@ -32,7 +32,7 @@
#include "ubuntu-app-launch.h"
#include "eventually-fixture.h"
-#include "libertine-service.h"
+//#include "libertine-service.h"
#include "mir-mock.h"
#include "snapd-mock.h"
#include "systemd-mock.h"
@@ -46,7 +46,7 @@ protected:
DbusTestService *service = NULL;
DbusTestDbusMock *mock = NULL;
DbusTestDbusMock *cgmock = NULL;
- std::shared_ptr<LibertineService> libertine;
+ //std::shared_ptr<LibertineService> libertine;
std::shared_ptr<SystemdMock> systemd;
GDBusConnection *bus = NULL;
std::string last_focus_appid;
@@ -122,8 +122,8 @@ protected:
dbus_test_service_add_task(service, *systemd);
/* Add in Libertine */
- libertine = std::make_shared<LibertineService>();
- dbus_test_service_add_task(service, *libertine);
+ //libertine = std::make_shared<LibertineService>();
+ //dbus_test_service_add_task(service, *libertine);
dbus_test_service_start_tasks(service);
@@ -131,7 +131,7 @@ protected:
g_dbus_connection_set_exit_on_close(bus, FALSE);
g_object_add_weak_pointer(G_OBJECT(bus), (gpointer *)&bus);
- ASSERT_EVENTUALLY_FUNC_EQ(false, std::function<bool()>{[&] { return libertine->getUniqueName().empty(); }});
+ //ASSERT_EVENTUALLY_FUNC_EQ(false, std::function<bool()>{[&] { return libertine->getUniqueName().empty(); }});
ASSERT_TRUE(ubuntu_app_launch_observer_add_app_focus(focus_cb, this));
ASSERT_TRUE(ubuntu_app_launch_observer_add_app_resume(resume_cb, this));
@@ -145,7 +145,7 @@ protected:
ubuntu::app_launch::Registry::clearDefault();
systemd.reset();
- libertine.reset();
+ //libertine.reset();
g_clear_object(&service);
g_object_unref(bus);

View file

@ -1,43 +0,0 @@
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=ubuntu-download-manager
pkgver=0_git20181003
_commit="b77fc522e41f43e5dba248e990ab6ae9c43cef40"
pkgrel=2
pkgdesc="Provides a service for downloading files while an application is suspended"
arch="x86_64"
url="https://unity8.io"
license="LGPL-3.0"
depends=""
depends_dev="qt5-qtdeclarative-dev boost-dev glog-dev libnih-dev"
makedepends="$depends_dev cmake cmake-extras gtest-dev gmock"
checkdepends="dbus-test-runner xvfb" # and xvfb-run :)
source="$pkgname-$_commit.tar.gz::https://github.com/ubports/$pkgname/archive/$_commit.tar.gz
cmake-extras.patch"
subpackages="$pkgname-dev"
builddir="$srcdir/$pkgname-$_commit"
options="!check" # Tests fail
build() {
mkdir -p "$builddir"/build
cd "$builddir"/build
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBEXECDIR=/usr/lib \
-DCMAKE_INSTALL_LIBDIR=lib ..
make
}
check() {
cd "$builddir"/build
make test
}
package() {
cd "$builddir"/build
make DESTDIR="$pkgdir" install
}
sha512sums="1e9c9d41eb3f35a2d4280a746936b1d791fc3d300aae9d6842785559c9729f7f3f291b922bf093833cb0091fa8f8a92ef34833e162782ed28eba7d2e6f7ed6ae ubuntu-download-manager-b77fc522e41f43e5dba248e990ab6ae9c43cef40.tar.gz
36fa1cfccfa29b9c298711bf8c7e264ec15d4e78a3e47cdd12f8ab0752f83504dc4b3e8576e84ca529ff631c8a9a7452a88bfa9612b7261fe8d80c4c8c4f1d35 cmake-extras.patch"

View file

@ -1,395 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fd724b55..8e0e7525 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,5 @@
project(ubuntu-download-manager)
cmake_minimum_required(VERSION 2.8)
-set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fPIC -pthread")
# for dh_translations to extract the domain
@@ -11,7 +10,7 @@ add_definitions(-DI18N_DOMAIN="${GETTEXT_PACKAGE}")
# Standard install paths
include(GNUInstallDirs)
-include(EnableCoverageReport)
+find_package(CoverageReport)
#####################################################################
# Enable code coverage calculation with gcov/gcovr/lcov
# Usage:
diff --git a/cmake/modules/EnableCoverageReport.cmake b/cmake/modules/EnableCoverageReport.cmake
deleted file mode 100644
index dc8c8d29..00000000
--- a/cmake/modules/EnableCoverageReport.cmake
+++ /dev/null
@@ -1,153 +0,0 @@
-# - Creates a special coverage build type and target on GCC.
-#
-# Defines a function ENABLE_COVERAGE_REPORT which generates the coverage target
-# for selected targets. Optional arguments to this function are used to filter
-# unwanted results using globbing expressions. Moreover targets with tests for
-# the source code can be specified to trigger regenerating the report if the
-# test has changed
-#
-# ENABLE_COVERAGE_REPORT(TARGETS target... [FILTER filter...] [TESTS test targets...])
-#
-# To generate a coverage report first build the project with
-# CMAKE_BUILD_TYPE=coverage, then call make test and afterwards make coverage.
-#
-# The coverage report is based on gcov. Depending on the availability of lcov
-# a HTML report will be generated and/or an XML report of gcovr is found.
-# The generated coverage target executes all found solutions. Special targets
-# exist to create e.g. only the xml report: coverage-xml.
-#
-# Copyright (C) 2010 by Johannes Wienke <jwienke at techfak dot uni-bielefeld dot de>
-#
-# This program is free software; you can redistribute it
-# and/or modify it under the terms of the GNU General
-# Public License as published by the Free Software Foundation;
-# either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-
-INCLUDE(ParseArguments)
-
-FIND_PACKAGE(Lcov)
-FIND_PACKAGE(gcovr)
-
-FUNCTION(ENABLE_COVERAGE_REPORT)
-
- # argument parsing
- PARSE_ARGUMENTS(ARG "FILTER;TARGETS;TESTS" "" ${ARGN})
-
- SET(COVERAGE_RAW_FILE "${CMAKE_BINARY_DIR}/coverage.raw.info")
- SET(COVERAGE_FILTERED_FILE "${CMAKE_BINARY_DIR}/coverage.info")
- SET(COVERAGE_REPORT_DIR "${CMAKE_BINARY_DIR}/coveragereport")
- SET(COVERAGE_XML_FILE "${CMAKE_BINARY_DIR}/coverage.xml")
- SET(COVERAGE_XML_COMMAND_FILE "${CMAKE_BINARY_DIR}/coverage-xml.cmake")
-
- # decide if there is any tool to create coverage data
- SET(TOOL_FOUND FALSE)
- IF(LCOV_FOUND OR GCOVR_FOUND)
- SET(TOOL_FOUND TRUE)
- ENDIF()
- IF(NOT TOOL_FOUND)
- MESSAGE(STATUS "Cannot enable coverage targets because neither lcov nor gcovr are found.")
- ENDIF()
-
- STRING(TOLOWER "${CMAKE_BUILD_TYPE}" COVERAGE_BUILD_TYPE)
- IF(CMAKE_COMPILER_IS_GNUCXX AND TOOL_FOUND AND "${COVERAGE_BUILD_TYPE}" MATCHES "coverage")
-
- MESSAGE(STATUS "Coverage support enabled for targets: ${ARG_TARGETS}")
-
- # create coverage build type
- SET(CMAKE_CXX_FLAGS_COVERAGE ${CMAKE_CXX_FLAGS_DEBUG} PARENT_SCOPE)
- SET(CMAKE_C_FLAGS_COVERAGE ${CMAKE_C_FLAGS_DEBUG} PARENT_SCOPE)
- SET(CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} coverage PARENT_SCOPE)
-
- # instrument targets
- SET_TARGET_PROPERTIES(${ARG_TARGETS} PROPERTIES COMPILE_FLAGS --coverage
- LINK_FLAGS --coverage)
-
- # html report
- IF (LCOV_FOUND)
-
- MESSAGE(STATUS "Enabling HTML coverage report")
-
- # set up coverage target
-
- ADD_CUSTOM_COMMAND(OUTPUT ${COVERAGE_RAW_FILE}
- COMMAND ${LCOV_EXECUTABLE} -c -d ${CMAKE_BINARY_DIR} -o ${COVERAGE_RAW_FILE}
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
- COMMENT "Collecting coverage data"
- DEPENDS ${ARG_TARGETS} ${ARG_TESTS}
- VERBATIM)
-
- # filter unwanted stuff
- LIST(LENGTH ARG_FILTER FILTER_LENGTH)
- IF(${FILTER_LENGTH} GREATER 0)
- SET(FILTER COMMAND ${LCOV_EXECUTABLE})
- FOREACH(F ${ARG_FILTER})
- SET(FILTER ${FILTER} -r ${COVERAGE_FILTERED_FILE} ${F})
- ENDFOREACH()
- SET(FILTER ${FILTER} -o ${COVERAGE_FILTERED_FILE})
- ELSE()
- SET(FILTER "")
- ENDIF()
-
- ADD_CUSTOM_COMMAND(OUTPUT ${COVERAGE_FILTERED_FILE}
- COMMAND ${LCOV_EXECUTABLE} -e ${COVERAGE_RAW_FILE} "${CMAKE_SOURCE_DIR}*" -o ${COVERAGE_FILTERED_FILE}
- ${FILTER}
- DEPENDS ${COVERAGE_RAW_FILE}
- COMMENT "Filtering recorded coverage data for project-relevant entries"
- VERBATIM)
- ADD_CUSTOM_COMMAND(OUTPUT ${COVERAGE_REPORT_DIR}
- COMMAND ${CMAKE_COMMAND} -E make_directory ${COVERAGE_REPORT_DIR}
- COMMAND ${GENHTML_EXECUTABLE} --legend --show-details -t "${PROJECT_NAME} test coverage" -o ${COVERAGE_REPORT_DIR} ${COVERAGE_FILTERED_FILE}
- DEPENDS ${COVERAGE_FILTERED_FILE}
- COMMENT "Generating HTML coverage report in ${COVERAGE_REPORT_DIR}"
- VERBATIM)
-
- ADD_CUSTOM_TARGET(coverage-html
- DEPENDS ${COVERAGE_REPORT_DIR})
-
- ENDIF()
-
- # xml coverage report
- IF(GCOVR_FOUND)
-
- MESSAGE(STATUS "Enabling XML coverage report")
-
- # gcovr cannot write directly to a file so the execution needs to
- # be wrapped in a cmake file that generates the file output
- FILE(WRITE ${COVERAGE_XML_COMMAND_FILE}
- "SET(ENV{LANG} en)\n")
- FILE(APPEND ${COVERAGE_XML_COMMAND_FILE}
- "EXECUTE_PROCESS(COMMAND \"${GCOVR_EXECUTABLE}\" -x -r \"${CMAKE_SOURCE_DIR}\" OUTPUT_FILE \"${COVERAGE_XML_FILE}\" WORKING_DIRECTORY \"${CMAKE_BINARY_DIR}\")\n")
-
- ADD_CUSTOM_COMMAND(OUTPUT ${COVERAGE_XML_FILE}
- COMMAND ${CMAKE_COMMAND} ARGS -P ${COVERAGE_XML_COMMAND_FILE}
- COMMENT "Generating coverage XML report"
- VERBATIM)
-
- ADD_CUSTOM_TARGET(coverage-xml
- DEPENDS ${COVERAGE_XML_FILE})
-
- ENDIF()
-
- # provide a global coverage target executing both steps if available
- SET(GLOBAL_DEPENDS "")
- IF(LCOV_FOUND)
- LIST(APPEND GLOBAL_DEPENDS ${COVERAGE_REPORT_DIR})
- ENDIF()
- IF(GCOVR_FOUND)
- LIST(APPEND GLOBAL_DEPENDS ${COVERAGE_XML_FILE})
- ENDIF()
- IF(LCOV_FOUND OR GCOVR_FOUND)
- ADD_CUSTOM_TARGET(coverage
- DEPENDS ${GLOBAL_DEPENDS})
- ENDIF()
-
- ENDIF()
-
-ENDFUNCTION()
diff --git a/cmake/modules/FindGtest.cmake b/cmake/modules/FindGtest.cmake
deleted file mode 100644
index 25350d59..00000000
--- a/cmake/modules/FindGtest.cmake
+++ /dev/null
@@ -1,67 +0,0 @@
-include(ExternalProject)
-include(FindPackageHandleStandardArgs)
-
-#gtest
-if (EXISTS /usr/src/googletest)
- set (USING_GOOGLETEST_1_8 TRUE)
- set (GTEST_INSTALL_DIR /usr/src/googletest/googletest/include)
-else()
- set(GTEST_INSTALL_DIR /usr/src/gmock/gtest/include)
-endif()
-find_path(GTEST_INCLUDE_DIR gtest/gtest.h
- HINTS ${GTEST_INSTALL_DIR})
-
-#gmock
-find_path(GMOCK_INSTALL_DIR CMakeLists.txt
- HINTS /usr/src/googletest /usr/src/gmock)
-if(${GMOCK_INSTALL_DIR} STREQUAL "GMOCK_INSTALL_DIR-NOTFOUND")
- message(FATAL_ERROR "google-mock package not found")
-endif()
-
-find_path(GMOCK_INCLUDE_DIR gmock/gmock.h)
-
-if (USING_GOOGLETEST_1_8)
- set(GMOCK_BASE_BINARY_DIR ${CMAKE_BINARY_DIR}/gmock/libs)
- set(GMOCK_BINARY_DIR ${GMOCK_BASE_BINARY_DIR}/googlemock)
- set(GTEST_BINARY_DIR ${GMOCK_BINARY_DIR}/gtest)
-else()
- set(GMOCK_BASE_BINARY_DIR ${CMAKE_BINARY_DIR}/gmock/libs)
- set(GMOCK_BINARY_DIR ${GMOCK_BASE_BINARY_DIR})
- set(GTEST_BINARY_DIR ${GMOCK_BINARY_DIR}/gtest)
-endif()
-
-set(GTEST_CMAKE_ARGS "")
-if (${MIR_IS_CROSS_COMPILING})
- set(GTEST_CMAKE_ARGS
- -DCMAKE_TOOLCHAIN_FILE=${CMAKE_MODULE_PATH}/LinuxCrossCompile.cmake)
-endif()
-
-if (USING_GOOGLETEST_1_8)
- list(APPEND GTEST_CMAKE_ARGS -DBUILD_GTEST=ON)
-endif()
-
-ExternalProject_Add(
- GMock
- #where to build in source tree
- PREFIX ${GMOCK_PREFIX}
- #where the source is external to the project
- SOURCE_DIR ${GMOCK_INSTALL_DIR}
- #forward the compilers to the subproject so cross-arch builds work
- CMAKE_ARGS ${GTEST_CMAKE_ARGS}
- BINARY_DIR ${GMOCK_BASE_BINARY_DIR}
-
- #we don't need to install, so skip
- INSTALL_COMMAND ""
-)
-
-set(GMOCK_LIBRARY ${GMOCK_BINARY_DIR}/libgmock.a)
-set(GMOCK_MAIN_LIBRARY ${GMOCK_BINARY_DIR}/libgmock_main.a)
-set(GMOCK_BOTH_LIBRARIES ${GMOCK_LIBRARY} ${GMOCK_MAIN_LIBRARY})
-set(GTEST_LIBRARY ${GTEST_BINARY_DIR}/libgtest.a)
-set(GTEST_MAIN_LIBRARY ${GTEST_BINARY_DIR}/libgtest_main.a)
-set(GTEST_BOTH_LIBRARIES ${GTEST_LIBRARY} ${GTEST_MAIN_LIBRARY})
-set(GTEST_ALL_LIBRARIES ${GTEST_BOTH_LIBRARIES} ${GMOCK_BOTH_LIBRARIES})
-
-find_package_handle_standard_args(GTest DEFAULT_MSG
- GMOCK_INCLUDE_DIR
- GTEST_INCLUDE_DIR)
diff --git a/cmake/modules/FindLcov.cmake b/cmake/modules/FindLcov.cmake
deleted file mode 100644
index 70628f4e..00000000
--- a/cmake/modules/FindLcov.cmake
+++ /dev/null
@@ -1,29 +0,0 @@
-# - Find lcov
-# Will define:
-#
-# LCOV_EXECUTABLE - the lcov binary
-# GENHTML_EXECUTABLE - the genhtml executable
-#
-# Copyright (C) 2010 by Johannes Wienke <jwienke at techfak dot uni-bielefeld dot de>
-#
-# This program is free software; you can redistribute it
-# and/or modify it under the terms of the GNU General
-# Public License as published by the Free Software Foundation;
-# either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-
-INCLUDE(FindPackageHandleStandardArgs)
-
-FIND_PROGRAM(LCOV_EXECUTABLE lcov)
-FIND_PROGRAM(GENHTML_EXECUTABLE genhtml)
-
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lcov DEFAULT_MSG LCOV_EXECUTABLE GENHTML_EXECUTABLE)
-
-# only visible in advanced view
-MARK_AS_ADVANCED(LCOV_EXECUTABLE GENHTML_EXECUTABLE)
diff --git a/cmake/modules/Findgcovr.cmake b/cmake/modules/Findgcovr.cmake
deleted file mode 100644
index e4c43fe1..00000000
--- a/cmake/modules/Findgcovr.cmake
+++ /dev/null
@@ -1,31 +0,0 @@
-# - Find gcovr scrip
-# Will define:
-#
-# GCOVR_EXECUTABLE - the gcovr script
-#
-# Uses:
-#
-# GCOVR_ROOT - root to search for the script
-#
-# Copyright (C) 2011 by Johannes Wienke <jwienke at techfak dot uni-bielefeld dot de>
-#
-# This program is free software; you can redistribute it
-# and/or modify it under the terms of the GNU General
-# Public License as published by the Free Software Foundation;
-# either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-
-INCLUDE(FindPackageHandleStandardArgs)
-
-FIND_PROGRAM(GCOVR_EXECUTABLE gcovr HINTS ${GCOVR_ROOT} "${GCOVR_ROOT}/bin")
-
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(gcovr DEFAULT_MSG GCOVR_EXECUTABLE)
-
-# only visible in advanced view
-MARK_AS_ADVANCED(GCOVR_EXECUTABLE)
diff --git a/cmake/modules/ParseArguments.cmake b/cmake/modules/ParseArguments.cmake
deleted file mode 100644
index e13f671a..00000000
--- a/cmake/modules/ParseArguments.cmake
+++ /dev/null
@@ -1,52 +0,0 @@
-# Parse arguments passed to a function into several lists separated by
-# upper-case identifiers and options that do not have an associated list e.g.:
-#
-# SET(arguments
-# hello OPTION3 world
-# LIST3 foo bar
-# OPTION2
-# LIST1 fuz baz
-# )
-# PARSE_ARGUMENTS(ARG "LIST1;LIST2;LIST3" "OPTION1;OPTION2;OPTION3" ${arguments})
-#
-# results in 7 distinct variables:
-# * ARG_DEFAULT_ARGS: hello;world
-# * ARG_LIST1: fuz;baz
-# * ARG_LIST2:
-# * ARG_LIST3: foo;bar
-# * ARG_OPTION1: FALSE
-# * ARG_OPTION2: TRUE
-# * ARG_OPTION3: TRUE
-#
-# taken from http://www.cmake.org/Wiki/CMakeMacroParseArguments
-
-MACRO(PARSE_ARGUMENTS prefix arg_names option_names)
- SET(DEFAULT_ARGS)
- FOREACH(arg_name ${arg_names})
- SET(${prefix}_${arg_name})
- ENDFOREACH(arg_name)
- FOREACH(option ${option_names})
- SET(${prefix}_${option} FALSE)
- ENDFOREACH(option)
-
- SET(current_arg_name DEFAULT_ARGS)
- SET(current_arg_list)
- FOREACH(arg ${ARGN})
- SET(larg_names ${arg_names})
- LIST(FIND larg_names "${arg}" is_arg_name)
- IF (is_arg_name GREATER -1)
- SET(${prefix}_${current_arg_name} ${current_arg_list})
- SET(current_arg_name ${arg})
- SET(current_arg_list)
- ELSE (is_arg_name GREATER -1)
- SET(loption_names ${option_names})
- LIST(FIND loption_names "${arg}" is_option)
- IF (is_option GREATER -1)
- SET(${prefix}_${arg} TRUE)
- ELSE (is_option GREATER -1)
- SET(current_arg_list ${current_arg_list} ${arg})
- ENDIF (is_option GREATER -1)
- ENDIF (is_arg_name GREATER -1)
- ENDFOREACH(arg)
- SET(${prefix}_${current_arg_name} ${current_arg_list})
-ENDMACRO(PARSE_ARGUMENTS)
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 9ec602cf..ab56cc39 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -14,7 +14,7 @@
#
# Authored by: Manuel de la Peña <manuel.delapena@canonical.com>
-find_package(Gtest REQUIRED)
+find_package(GMock REQUIRED)
include_directories(${GMOCK_INCLUDE_DIR} ${GTEST_INCLUDE_DIR})
if(NOT "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")

View file

@ -1,25 +0,0 @@
From 49fe9d5aaef907d309710577699d788b53bde15c Mon Sep 17 00:00:00 2001
From: Luca Weiss <luca@z3ntu.xyz>
Date: Wed, 3 Oct 2018 17:07:51 +0200
Subject: [PATCH 2/5] Fix "Missing sentinel in function call" warning
---
src/UbuntuToolkit/ucurihandler.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/UbuntuToolkit/ucurihandler.cpp b/src/UbuntuToolkit/ucurihandler.cpp
index ad752f80c..c9f0566c9 100644
--- a/src/UbuntuToolkit/ucurihandler.cpp
+++ b/src/UbuntuToolkit/ucurihandler.cpp
@@ -75,7 +75,7 @@ UCUriHandler::UCUriHandler()
qWarning() << "UCUriHandler: Empty \"APP_ID\" environment variable, ignoring.";
return;
}
- char* path = nih_dbus_path(NULL, "", applicationId.constData(), NULL);
+ char* path = nih_dbus_path(NULL, "", applicationId.constData(), (char *)NULL);
objectPath = QString::fromLocal8Bit(path);
nih_free(path);
--
2.20.1

View file

@ -1,28 +0,0 @@
From 1091e7af92eba4bba90632e9ea3386ae68dbeba2 Mon Sep 17 00:00:00 2001
From: Luca Weiss <luca@z3ntu.xyz>
Date: Wed, 3 Oct 2018 17:08:08 +0200
Subject: [PATCH 3/5] Add option to disable building of docs
---
ubuntu-sdk.pro | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/ubuntu-sdk.pro b/ubuntu-sdk.pro
index 4cd2e9cfe..b5ff7e0db 100644
--- a/ubuntu-sdk.pro
+++ b/ubuntu-sdk.pro
@@ -11,7 +11,10 @@ load(qt_parts)
src_uitk_launcher.subdir = ubuntu-ui-toolkit-launcher
src_uitk_launcher.depends = sub-src
-SUBDIRS += po documentation app-launch-profiler src_uitk_launcher apicheck
+SUBDIRS += po app-launch-profiler src_uitk_launcher apicheck
+!CONFIG(no_docs) {
+ SUBDIRS += documentation
+}
sub_tests.CONFIG -= no_default_target
sub_tests.CONFIG -= no_default_install
--
2.20.1

View file

@ -1,155 +0,0 @@
From f306efd7fcceac905093a0ef58aae93412813d16 Mon Sep 17 00:00:00 2001
From: Luca Weiss <luca@z3ntu.xyz>
Date: Sun, 30 Dec 2018 22:31:37 +0100
Subject: [PATCH 4/5] Make it compile with Qt 5.12
---
src/UbuntuToolkit/ucstylehints.cpp | 35 +++++++++++++++---------------
src/UbuntuToolkit/ucstylehints_p.h | 8 +++----
2 files changed, 21 insertions(+), 22 deletions(-)
diff --git a/src/UbuntuToolkit/ucstylehints.cpp b/src/UbuntuToolkit/ucstylehints.cpp
index cf1bba798..852f55777 100644
--- a/src/UbuntuToolkit/ucstylehints.cpp
+++ b/src/UbuntuToolkit/ucstylehints.cpp
@@ -27,17 +27,17 @@
UT_NAMESPACE_BEGIN
// verifies property declaration correctness
-void UCStyleHintsParser::verifyBindings(const QV4::CompiledData::Unit *qmlUnit, const QList<const QV4::CompiledData::Binding *> &bindings)
+void UCStyleHintsParser::verifyBindings(const QQmlRefPointer<QV4::CompiledData::CompilationUnit> &compilationUnit, const QList<const QV4::CompiledData::Binding *> &bindings)
{
Q_FOREACH(const QV4::CompiledData::Binding *binding, bindings) {
- verifyProperty(qmlUnit, binding);
+ verifyProperty(compilationUnit, binding);
}
}
-void UCStyleHintsParser::verifyProperty(const QV4::CompiledData::Unit *qmlUnit, const QV4::CompiledData::Binding *binding)
+void UCStyleHintsParser::verifyProperty(const QQmlRefPointer<QV4::CompiledData::CompilationUnit> &compilationUnit, const QV4::CompiledData::Binding *binding)
{
if (binding->type == QV4::CompiledData::Binding::Type_Object) {
- error(qmlUnit->objectAt(binding->value.objectIndex),
+ error(compilationUnit->objectAt(binding->value.objectIndex),
QStringLiteral("StyleHints does not support creating state-specific objects."));
return;
}
@@ -45,15 +45,15 @@ void UCStyleHintsParser::verifyProperty(const QV4::CompiledData::Unit *qmlUnit,
// group properties or attached properties, we do handle those as well
if (binding->type == QV4::CompiledData::Binding::Type_GroupProperty
|| binding->type == QV4::CompiledData::Binding::Type_AttachedProperty) {
- const QV4::CompiledData::Object *subObj = qmlUnit->objectAt(binding->value.objectIndex);
+ const QV4::CompiledData::Object *subObj = compilationUnit->objectAt(binding->value.objectIndex);
const QV4::CompiledData::Binding *subBinding = subObj->bindingTable();
for (quint32 i = 0; i < subObj->nBindings; ++i, ++subBinding) {
- verifyProperty(qmlUnit, subBinding);
+ verifyProperty(compilationUnit, subBinding);
}
}
// filter out signals!
- QString propertyName = qmlUnit->stringAt(binding->propertyNameIndex);
+ QString propertyName = compilationUnit->stringAt(binding->propertyNameIndex);
if (propertyName.startsWith(QStringLiteral("on")) && propertyName.at(2).isUpper()) {
error(binding, QStringLiteral("Signal properties are not supported."));
return;
@@ -61,10 +61,9 @@ void UCStyleHintsParser::verifyProperty(const QV4::CompiledData::Unit *qmlUnit,
}
// decodes property declarations, stores the bindings and values
-void UCStyleHintsParser::applyBindings(QObject *obj, QV4::CompiledData::CompilationUnit *cdata, const QList<const QV4::CompiledData::Binding *> &bindings)
+void UCStyleHintsParser::applyBindings(QObject *obj, const QQmlRefPointer<QV4::CompiledData::CompilationUnit> &compilationUnit, const QList<const QV4::CompiledData::Binding *> &bindings)
{
UCStyleHints *hints = static_cast<UCStyleHints*>(obj);
- const QV4::CompiledData::Unit *qmlUnit = cdata->data;
UCStyledItemBase *styledItem = qobject_cast<UCStyledItemBase*>(hints->parent());
if (!styledItem) {
@@ -73,26 +72,26 @@ void UCStyleHintsParser::applyBindings(QObject *obj, QV4::CompiledData::Compilat
}
Q_FOREACH(const QV4::CompiledData::Binding *binding, bindings) {
- hints->decodeBinding(QString(), qmlUnit, binding);
+ hints->decodeBinding(QString(), compilationUnit, binding);
}
- hints->m_cdata = cdata;
+ hints->m_cdata = compilationUnit;
hints->m_decoded = true;
}
-void UCStyleHints::decodeBinding(const QString &propertyPrefix, const QV4::CompiledData::Unit *qmlUnit, const QV4::CompiledData::Binding *binding)
+void UCStyleHints::decodeBinding(const QString &propertyPrefix, const QQmlRefPointer<QV4::CompiledData::CompilationUnit> &compilationUnit, const QV4::CompiledData::Binding *binding)
{
- QString propertyName = propertyPrefix + qmlUnit->stringAt(binding->propertyNameIndex);
+ QString propertyName = propertyPrefix + compilationUnit->stringAt(binding->propertyNameIndex);
// handle grouped properties first
if (binding->type == QV4::CompiledData::Binding::Type_GroupProperty
|| binding->type == QV4::CompiledData::Binding::Type_AttachedProperty) {
- const QV4::CompiledData::Object *subObj = qmlUnit->objectAt(binding->value.objectIndex);
+ const QV4::CompiledData::Object *subObj = compilationUnit->objectAt(binding->value.objectIndex);
const QV4::CompiledData::Binding *subBinding = subObj->bindingTable();
QString pre = propertyName + ".";
for (quint32 i = 0; i < subObj->nBindings; ++i, ++subBinding) {
- decodeBinding(pre, qmlUnit, subBinding);
+ decodeBinding(pre, compilationUnit, subBinding);
}
return;
}
@@ -100,7 +99,7 @@ void UCStyleHints::decodeBinding(const QString &propertyPrefix, const QV4::Compi
switch (binding->type) {
case QV4::CompiledData::Binding::Type_Script:
{
- QString expression = binding->valueAsScriptString(qmlUnit);
+ QString expression = binding->valueAsScriptString(compilationUnit.data());
QUrl url = QUrl();
int line = -1;
int column = -1;
@@ -125,12 +124,12 @@ void UCStyleHints::decodeBinding(const QString &propertyPrefix, const QV4::Compi
case QV4::CompiledData::Binding::Type_TranslationById:
case QV4::CompiledData::Binding::Type_String:
{
- m_values << qMakePair(propertyName, binding->valueAsString(qmlUnit));
+ m_values << qMakePair(propertyName, binding->valueAsString(compilationUnit.data()));
break;
}
case QV4::CompiledData::Binding::Type_Number:
{
- m_values << qMakePair(propertyName, binding->valueAsNumber());
+ m_values << qMakePair(propertyName, binding->valueAsNumber(compilationUnit->constants));
break;
}
case QV4::CompiledData::Binding::Type_Boolean:
diff --git a/src/UbuntuToolkit/ucstylehints_p.h b/src/UbuntuToolkit/ucstylehints_p.h
index ef5fafd6e..ddc96a7f1 100644
--- a/src/UbuntuToolkit/ucstylehints_p.h
+++ b/src/UbuntuToolkit/ucstylehints_p.h
@@ -78,7 +78,7 @@ private:
friend class UCStyleHintsParser;
void propertyNotFound(const QString &styleName, const QString &property);
- void decodeBinding(const QString &propertyPrefix, const QV4::CompiledData::Unit *qmlUnit, const QV4::CompiledData::Binding *binding);
+ void decodeBinding(const QString &propertyPrefix, const QQmlRefPointer<QV4::CompiledData::CompilationUnit> &compilationUnit, const QV4::CompiledData::Binding *binding);
};
class UBUNTUTOOLKIT_EXPORT UCStyleHintsParser : public QQmlCustomParser
@@ -86,11 +86,11 @@ class UBUNTUTOOLKIT_EXPORT UCStyleHintsParser : public QQmlCustomParser
public:
UCStyleHintsParser() : QQmlCustomParser(QQmlCustomParser::AcceptsSignalHandlers) {}
- void verifyBindings(const QV4::CompiledData::Unit *qmlUnit, const QList<const QV4::CompiledData::Binding *> &bindings) override;
- void applyBindings(QObject *obj, QV4::CompiledData::CompilationUnit *cdata, const QList<const QV4::CompiledData::Binding *> &bindings) override;
+ void verifyBindings(const QQmlRefPointer<QV4::CompiledData::CompilationUnit> &compilationUnit, const QList<const QV4::CompiledData::Binding *> &bindings) override;
+ void applyBindings(QObject *obj, const QQmlRefPointer<QV4::CompiledData::CompilationUnit> &compilationUnit, const QList<const QV4::CompiledData::Binding *> &bindings) override;
private:
- void verifyProperty(const QV4::CompiledData::Unit *qmlUnit, const QV4::CompiledData::Binding *binding);
+ void verifyProperty(const QQmlRefPointer<QV4::CompiledData::CompilationUnit> &compilationUnit, const QV4::CompiledData::Binding *binding);
};
UT_NAMESPACE_END
--
2.20.1

View file

@ -1,686 +0,0 @@
From 83d90533ebcef429fd7499c5e6ad856e42062820 Mon Sep 17 00:00:00 2001
From: Luca Weiss <luca@z3ntu.xyz>
Date: Sun, 30 Dec 2018 22:53:00 +0100
Subject: [PATCH 5/5] Adjust for removed QTest::waitForEvents() method
See https://github.com/qt/qtbase/commit/75e583b3fcbdbbb999633eb5f2267720dd695cfa
---
.../tst_deprecated_theme_engine.cpp | 4 +-
.../src/tst_i18n_LocalizedApp.cpp | 2 +-
.../src/tst_i18n_RelativeTime.cpp | 2 +-
.../tst_inversemouseareatest.cpp | 32 +++----
tests/unit/mainview11/tst_mainview.cpp | 2 +-
tests/unit/mainview13/tst_mainview.cpp | 2 +-
.../mousefilters/tst_mousefilterstest.cpp | 96 +++++++++----------
tests/unit/performance/tst_performance.cpp | 2 +-
tests/unit/statesaver/tst_statesaver.cpp | 2 +-
tests/unit/subtheming/tst_subtheming.cpp | 2 +-
10 files changed, 73 insertions(+), 73 deletions(-)
diff --git a/tests/unit/deprecated_theme_engine/tst_deprecated_theme_engine.cpp b/tests/unit/deprecated_theme_engine/tst_deprecated_theme_engine.cpp
index 19bea4c5f..94b0edf1c 100644
--- a/tests/unit/deprecated_theme_engine/tst_deprecated_theme_engine.cpp
+++ b/tests/unit/deprecated_theme_engine/tst_deprecated_theme_engine.cpp
@@ -56,13 +56,13 @@ public:
void setTheme(const QString &theme)
{
rootObject()->setProperty("themeName", theme);
- QTest::waitForEvents();
+ qApp->processEvents();
}
void setStyle(const QString &style)
{
rootObject()->setProperty("styleDocument", style);
- QTest::waitForEvents();
+ qApp->processEvents();
}
};
diff --git a/tests/unit/i18n/LocalizedApp/src/tst_i18n_LocalizedApp.cpp b/tests/unit/i18n/LocalizedApp/src/tst_i18n_LocalizedApp.cpp
index 8333460fd..84da303ad 100644
--- a/tests/unit/i18n/LocalizedApp/src/tst_i18n_LocalizedApp.cpp
+++ b/tests/unit/i18n/LocalizedApp/src/tst_i18n_LocalizedApp.cpp
@@ -57,7 +57,7 @@ public:
{
// load the document
view->setSource(QUrl::fromLocalFile(document));
- QTest::waitForEvents();
+ qApp->processEvents();
return view->rootObject();
}
diff --git a/tests/unit/i18n/RelativeTime/src/tst_i18n_RelativeTime.cpp b/tests/unit/i18n/RelativeTime/src/tst_i18n_RelativeTime.cpp
index 957a9570b..abd497e07 100644
--- a/tests/unit/i18n/RelativeTime/src/tst_i18n_RelativeTime.cpp
+++ b/tests/unit/i18n/RelativeTime/src/tst_i18n_RelativeTime.cpp
@@ -57,7 +57,7 @@ public:
{
// load the document
view->setSource(QUrl::fromLocalFile(document));
- QTest::waitForEvents();
+ qApp->processEvents();
return view->rootObject();
}
diff --git a/tests/unit/inversemousearea/tst_inversemouseareatest.cpp b/tests/unit/inversemousearea/tst_inversemouseareatest.cpp
index 19736ca5c..9fd448a66 100644
--- a/tests/unit/inversemousearea/tst_inversemouseareatest.cpp
+++ b/tests/unit/inversemousearea/tst_inversemouseareatest.cpp
@@ -97,7 +97,7 @@ private Q_SLOTS:
// connect pressed signal to capture mouse object
QObject::connect(area, SIGNAL(pressed(QQuickMouseEvent*)), this, SLOT(capturePressed(QQuickMouseEvent*)));
QTest::mouseClick(quickView.data(), Qt::LeftButton, Qt::NoModifier, QPoint(10, 10));
- QTest::waitForEvents();
+ qApp->processEvents();
QVERIFY(eventCleanup.isEmpty());
}
@@ -110,7 +110,7 @@ private Q_SLOTS:
// connect pressed signal to capture mouse object
QObject::connect(area, SIGNAL(pressed(QQuickMouseEvent*)), this, SLOT(capturePressed(QQuickMouseEvent*)));
QTest::mouseClick(quickView.data(), Qt::LeftButton, Qt::NoModifier, QPoint(10, 10));
- QTest::waitForEvents();
+ qApp->processEvents();
QVERIFY(eventCleanup.isEmpty());
}
@@ -119,7 +119,7 @@ private Q_SLOTS:
QScopedPointer<InverseMouseAreaTest> quickView(new InverseMouseAreaTest("SensingAreaError.qml"));
QTest::mouseClick(quickView.data(), Qt::LeftButton, 0, QPoint(20, 20));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(quickView->rootObject()->property("log").toString(), QString("IMA"));
}
@@ -134,7 +134,7 @@ private Q_SLOTS:
quickView->findItem<QQuickItem*>("clickArea");
QTest::mouseClick(l[0], Qt::LeftButton, 0, QPoint(20, 10));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(quickView->rootObject()->property("log").toString(), QString("IMA"));
}
@@ -143,7 +143,7 @@ private Q_SLOTS:
QScopedPointer<InverseMouseAreaTest> quickView(new InverseMouseAreaTest("OverlappedMouseArea.qml"));
QTest::mouseClick(quickView.data(), Qt::LeftButton, 0, QPoint(20, 10));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(quickView->rootObject()->property("log").toString(), QString("MA"));
}
@@ -161,7 +161,7 @@ private Q_SLOTS:
// click in the top rectangle, use 800msec delay to prevent dblclick detection
QTest::mouseClick(quickView.data(), Qt::LeftButton, 0, QPoint(10, 10), DOUBLECLICK_TIMEOUT);
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(ma1Spy.count(), 0);
QCOMPARE(ma2Spy.count(), 0);
QCOMPARE(imaSpy.count(), 1);
@@ -169,7 +169,7 @@ private Q_SLOTS:
// click in the second rectangle, use 800msec delay to prevent dblclick detection
QTest::mouseClick(quickView.data(), Qt::LeftButton, 0, QPoint(10, 65), DOUBLECLICK_TIMEOUT);
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(ma1Spy.count(), 0);
QCOMPARE(ma2Spy.count(), 0);
QCOMPARE(imaSpy.count(), 1);
@@ -177,7 +177,7 @@ private Q_SLOTS:
// click in the button, use 800msec delay to prevent dblclick detection
QTest::mouseClick(quickView.data(), Qt::LeftButton, 0, QPoint(25, 85), DOUBLECLICK_TIMEOUT);
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(ma1Spy.count(), 0);
QCOMPARE(ma2Spy.count(), 1);
QCOMPARE(imaSpy.count(), 0);
@@ -185,14 +185,14 @@ private Q_SLOTS:
// double click in the second rectangle
QSignalSpy imaDSpy(area, SIGNAL(doubleClicked(QQuickMouseEvent*)));
QTest::mouseDClick(quickView.data(), Qt::LeftButton, 0, QPoint(10, 65));
- QTest::waitForEvents();
+ qApp->processEvents();
// FIXME: this is flaky
QCOMPARE(imaDSpy.count(), 1);
imaDSpy.clear();
// double click in the first rectangle
QTest::mouseDClick(quickView.data(), Qt::LeftButton, 0, QPoint(10, 10));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(imaDSpy.count(), 1);
imaDSpy.clear();
}
@@ -210,21 +210,21 @@ private Q_SLOTS:
QSignalSpy ma2Spy(ma2, SIGNAL(pressed(QQuickMouseEvent*)));
QTest::mouseClick(quickView.data(), Qt::LeftButton, 0, QPoint(10, 10), DOUBLECLICK_TIMEOUT);
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(ma1Spy.count(), 1);
QCOMPARE(ma2Spy.count(), 0);
QCOMPARE(imaSpy.count(), 1);
ma1Spy.clear(); imaSpy.clear();
QTest::mouseClick(quickView.data(), Qt::LeftButton, 0, QPoint(10, 65), DOUBLECLICK_TIMEOUT);
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(ma1Spy.count(), 0);
QCOMPARE(ma2Spy.count(), 1);
QCOMPARE(imaSpy.count(), 1);
ma2Spy.clear(); imaSpy.clear();
QTest::mouseClick(quickView.data(), Qt::LeftButton, 0, QPoint(25, 80), DOUBLECLICK_TIMEOUT);
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(ma1Spy.count(), 0);
QCOMPARE(ma2Spy.count(), 1);
QCOMPARE(imaSpy.count(), 0);
@@ -253,21 +253,21 @@ private Q_SLOTS:
// click on the topmost rectangle
QTest::mouseClick(quickView.data(), Qt::LeftButton, 0, QPoint(10, 10), DOUBLECLICK_TIMEOUT);
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(ma2Spy.count(), 0);
QCOMPARE(imaSpy.count(), 1);
imaSpy.clear();
// click on the second rectangle
QTest::mouseClick(quickView.data(), Qt::LeftButton, 0, QPoint(10, 65), DOUBLECLICK_TIMEOUT);
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(ma2Spy.count(), 0);
QCOMPARE(imaSpy.count(), 1);
imaSpy.clear();
// click on the button
QTest::mouseClick(quickView.data(), Qt::LeftButton, 0, QPoint(25, 85), DOUBLECLICK_TIMEOUT);
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(ma2Spy.count(), 1);
QCOMPARE(imaSpy.count(), 0);
diff --git a/tests/unit/mainview11/tst_mainview.cpp b/tests/unit/mainview11/tst_mainview.cpp
index f1e68f4c6..e9ae2257a 100644
--- a/tests/unit/mainview11/tst_mainview.cpp
+++ b/tests/unit/mainview11/tst_mainview.cpp
@@ -57,7 +57,7 @@ public:
{
// load the document
view->setSource(QUrl::fromLocalFile(document));
- QTest::waitForEvents();
+ qApp->processEvents();
return view->rootObject();
}
diff --git a/tests/unit/mainview13/tst_mainview.cpp b/tests/unit/mainview13/tst_mainview.cpp
index 36c5c78cc..287dd75ee 100644
--- a/tests/unit/mainview13/tst_mainview.cpp
+++ b/tests/unit/mainview13/tst_mainview.cpp
@@ -57,7 +57,7 @@ public:
{
// load the document
view->setSource(QUrl::fromLocalFile(document));
- QTest::waitForEvents();
+ qApp->processEvents();
return view->rootObject();
}
diff --git a/tests/unit/mousefilters/tst_mousefilterstest.cpp b/tests/unit/mousefilters/tst_mousefilterstest.cpp
index 955289a07..dc0b28bac 100644
--- a/tests/unit/mousefilters/tst_mousefilterstest.cpp
+++ b/tests/unit/mousefilters/tst_mousefilterstest.cpp
@@ -146,7 +146,7 @@ private Q_SLOTS:
preventDblClick();
QTest::mouseClick(view.data(), Qt::LeftButton, 0, guPoint(2, 2));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(view->rootObject()->hasFocus(), true);
QCOMPARE(pressed.count(), 1);
QCOMPARE(released.count(), 1);
@@ -175,7 +175,7 @@ private Q_SLOTS:
preventDblClick();
QTest::mouseClick(view.data(), Qt::LeftButton, 0, guPoint(2, 2));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(view->rootObject()->hasFocus(), true);
QCOMPARE(pressed.count(), 1);
QCOMPARE(released.count(), 1);
@@ -204,7 +204,7 @@ private Q_SLOTS:
preventDblClick();
QTest::mouseClick(view.data(), Qt::LeftButton, 0, guPoint(10, 10));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(view->rootObject()->hasFocus(), false);
QCOMPARE(pressed.count(), 1);
QCOMPARE(released.count(), 1);
@@ -234,7 +234,7 @@ private Q_SLOTS:
preventDblClick();
QTest::mouseClick(view.data(), Qt::LeftButton, 0, guPoint(10, 10));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(view->rootObject()->hasFocus(), false);
QCOMPARE(pressed.count(), 1);
QCOMPARE(released.count(), 1);
@@ -265,7 +265,7 @@ private Q_SLOTS:
QTest::mousePress(view.data(), Qt::LeftButton, 0, guPoint(2, 2));
QTest::mouseMove(view.data(), guPoint(2.2, 2.2));
QTest::mouseRelease(view.data(), Qt::LeftButton, 0, guPoint(2.2, 2.2));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(view->rootObject()->hasFocus(), true);
QCOMPARE(pressed.count(), 1);
QCOMPARE(released.count(), 1);
@@ -296,7 +296,7 @@ private Q_SLOTS:
QTest::mousePress(view.data(), Qt::LeftButton, 0, guPoint(10, 10));
QTest::mouseMove(view.data(), guPoint(10.2, 10.2));
QTest::mouseRelease(view.data(), Qt::LeftButton, 0, guPoint(10.2, 10.2));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(view->rootObject()->hasFocus(), false);
QCOMPARE(pressed.count(), 1);
QCOMPARE(released.count(), 1);
@@ -327,7 +327,7 @@ private Q_SLOTS:
QTest::mousePress(view.data(), Qt::LeftButton, 0, guPoint(2, 2));
QTest::mouseMove(view.data(), guPoint(2.7, 2.7));
QTest::mouseRelease(view.data(), Qt::LeftButton, 0, guPoint(2.7, 2.7));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(view->rootObject()->hasFocus(), true);
QCOMPARE(pressed.count(), 1);
QCOMPARE(released.count(), 1);
@@ -358,7 +358,7 @@ private Q_SLOTS:
QTest::mousePress(view.data(), Qt::LeftButton, 0, guPoint(10, 10));
QTest::mouseMove(view.data(), guPoint(10.6, 10.6));
QTest::mouseRelease(view.data(), Qt::LeftButton, 0, guPoint(10.6, 10.6));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(view->rootObject()->hasFocus(), false);
QCOMPARE(pressed.count(), 1);
QCOMPARE(released.count(), 1);
@@ -395,10 +395,10 @@ private Q_SLOTS:
// introduce small delay to suppress double clicks
preventDblClick();
QTest::mouseClick(view.data(), Qt::LeftButton, 0, guPoint(10, 10));
- QTest::waitForEvents();
+ qApp->processEvents();
preventDblClick();
QTest::mouseClick(view.data(), Qt::LeftButton, 0, guPoint(10, 69));
- QTest::waitForEvents();
+ qApp->processEvents();
if (!inputPanelPresent()) {
QEXPECT_FAIL(0, "No OSK installed", Abort);
}
@@ -432,7 +432,7 @@ private Q_SLOTS:
QTest::mousePress(view.data(), Qt::LeftButton, 0, guPoint(2, 2));
QTest::mouseMove(view.data(), guPoint(2.7, 2.7));
QTest::mouseRelease(view.data(), Qt::LeftButton, 0, guPoint(2.7, 2.7));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(view->rootObject()->hasFocus(), true);
QCOMPARE(pressed.count(), 1);
QCOMPARE(released.count(), 1);
@@ -464,7 +464,7 @@ private Q_SLOTS:
QTest::mousePress(view.data(), Qt::LeftButton, 0, guPoint(10, 10));
QTest::mouseMove(view.data(), guPoint(10.5, 10.5));
QTest::mouseRelease(view.data(), Qt::LeftButton, 0, guPoint(10.5, 10.5));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(view->rootObject()->hasFocus(), false);
QCOMPARE(pressed.count(), 1);
QCOMPARE(released.count(), 1);
@@ -496,7 +496,7 @@ private Q_SLOTS:
QTest::mousePress(view.data(), Qt::LeftButton, 0, guPoint(10, 10));
QTest::mouseMove(view.data(), guPoint(15, 15));
QTest::mouseRelease(view.data(), Qt::LeftButton, 0, guPoint(15, 15));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(view->rootObject()->hasFocus(), false);
QCOMPARE(pressed.count(), 1);
QCOMPARE(released.count(), 1);
@@ -519,7 +519,7 @@ private Q_SLOTS:
preventDblClick();
mousePressAndHold(view.data(), Qt::LeftButton, 0, guPoint(2, 2));
QTest::mouseRelease(view.data(), Qt::LeftButton, 0, guPoint(2, 2));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(view->rootObject()->hasFocus(), true);
QCOMPARE(pressAndHold.count(), 1);
QCOMPARE(clicked.count(), 0);
@@ -536,7 +536,7 @@ private Q_SLOTS:
preventDblClick();
mousePressAndHold(view.data(), Qt::LeftButton, 0, guPoint(2, 2));
QTest::mouseRelease(view.data(), Qt::LeftButton, 0, guPoint(2, 2));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(view->rootObject()->hasFocus(), true);
QCOMPARE(pressAndHold.count(), 1);
QCOMPARE(clicked.count(), 1);
@@ -556,7 +556,7 @@ private Q_SLOTS:
preventDblClick();
QTest::mouseDClick(view.data(), Qt::LeftButton, 0, guPoint(2, 2));
- QTest::waitForEvents();
+ qApp->processEvents();
QVariant selectedText = input->property("selectedText");
QCOMPARE(input->hasFocus(), true);
QVERIFY(selectedText.isValid());
@@ -600,7 +600,7 @@ private Q_SLOTS:
preventDblClick();
QTest::mouseClick(view.data(), Qt::LeftButton, 0, guPoint(2, 2));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(input->hasFocus(), true);
QCOMPARE(pressed.count(), 1);
QCOMPARE(released.count(), 1);
@@ -631,7 +631,7 @@ private Q_SLOTS:
preventDblClick();
QTest::mouseClick(view.data(), Qt::LeftButton, 0, guPoint(2, 2));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(input->hasFocus(), false);
// only the pressed was blocked, the rest of the events land in the proxy
QCOMPARE(pressed.count(), 0);
@@ -663,7 +663,7 @@ private Q_SLOTS:
preventDblClick();
QTest::mouseClick(view.data(), Qt::LeftButton, 0, guPoint(2, 2));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(input->hasFocus(), false);
QCOMPARE(pressed.count(), 1);
QCOMPARE(released.count(), 1);
@@ -694,7 +694,7 @@ private Q_SLOTS:
preventDblClick();
QTest::mouseClick(view.data(), Qt::LeftButton, 0, guPoint(2, 2));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(input->hasFocus(), true);
QCOMPARE(pressed.count(), 0);
QCOMPARE(released.count(), 1);
@@ -725,7 +725,7 @@ private Q_SLOTS:
preventDblClick();
QTest::mouseClick(view.data(), Qt::LeftButton, 0, guPoint(2, 2));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(input->hasFocus(), false);
QCOMPARE(pressed.count(), 1);
QCOMPARE(released.count(), 1);
@@ -756,7 +756,7 @@ private Q_SLOTS:
preventDblClick();
QTest::mouseClick(input->window(), Qt::LeftButton, 0, guPoint(10, 7));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(input->hasFocus(), true);
QCOMPARE(pressed.count(), 1);
QCOMPARE(released.count(), 1);
@@ -780,7 +780,7 @@ private Q_SLOTS:
preventDblClick();
QTest::mouseDClick(input->window(), Qt::LeftButton, 0, guPoint(10, 7));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(input->hasFocus(), true);
QVariant selectedText = input->property("selectedText");
QVERIFY(selectedText.isValid());
@@ -807,7 +807,7 @@ private Q_SLOTS:
preventDblClick();
QTest::mouseClick(view.data(), Qt::LeftButton, 0, guPoint(2, 2));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(input->hasFocus(), true);
QCOMPARE(pressed.count(), 1);
QCOMPARE(released.count(), 0);
@@ -843,9 +843,9 @@ private Q_SLOTS:
for (int i = 0; i < 30; i++) {
QTest::mouseMove(flickable->window(), guPoint(5 + i, 5 + i));
}
- QTest::waitForEvents();
+ qApp->processEvents();
QTest::mouseRelease(flickable->window(), Qt::LeftButton, 0, guPoint(35, 35));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(pressed.count(), 1);
QCOMPARE(released.count(), 1);
@@ -883,7 +883,7 @@ private Q_SLOTS:
QTest::mouseMove(flickable->window(), guPoint(5 + i, 5 + i));
}
QTest::mouseRelease(flickable->window(), Qt::LeftButton, 0, guPoint(35, 35));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(pressed.count(), 1);
QCOMPARE(released.count(), 1);
@@ -913,7 +913,7 @@ private Q_SLOTS:
// Note: press inside the filtered area, so entered() exited() positionChanged() will
// all receive the pressed button
QTest::mousePress(view.data(), Qt::LeftButton, 0, guPoint(5, 5));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(entered.count(), 1);
// when entered(), buttons are the same as when pressed
QCOMPARE(mouseEventParams.handler, QString("EVENT1"));
@@ -921,12 +921,12 @@ private Q_SLOTS:
QTest::mouseMove(view.data(), guPoint(15, 5));
QTest::mouseMove(view.data(), guPoint(25, 5));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(mouseEvent2Params.handler, QString("EVENT2"));
QCOMPARE(mouseEvent2Params.pressedButton, Qt::LeftButton);
QTest::mouseRelease(view.data(), Qt::LeftButton, 0, guPoint(35, 5));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(exited.count(), 1);
// when entered(), button is the same when pressed, however buttons
// does no longer contains the button pressed
@@ -1005,14 +1005,14 @@ private Q_SLOTS:
//center of the view
QTest::mouseMove(view.data(), guPoint(1, 1));
QTest::mouseMove(view.data(), guPoint(15, 15));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(entered.count(), 1);
QCOMPARE(mouseEvent3Params.handler, QString("EVENT4"));
QCOMPARE(mouseEvent3Params.pressedButton, Qt::NoButton);
QTest::mousePress(view.data(), Qt::LeftButton, 0, guPoint(15, 15));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(mouseEventParams.handler, QString("EVENT1"));
QCOMPARE(mouseEventParams.pressedButton, Qt::LeftButton);
@@ -1020,7 +1020,7 @@ private Q_SLOTS:
//go out of the mousearea on the right
QTest::mouseMove(view.data(), guPoint(45, 15));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(mouseEvent2Params.handler, QString("EVENT2"));
QCOMPARE(mouseEvent2Params.pressedButton, Qt::LeftButton);
QCOMPARE(exited.count(), 1);
@@ -1029,7 +1029,7 @@ private Q_SLOTS:
//move back in
QTest::mouseMove(view.data(), guPoint(25, 15));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(mouseEvent2Params.handler, QString("EVENT2"));
QCOMPARE(mouseEvent2Params.pressedButton, Qt::LeftButton);
QCOMPARE(entered.count(), 2);
@@ -1038,7 +1038,7 @@ private Q_SLOTS:
//and out again
QTest::mouseMove(view.data(), guPoint(45, 15));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(mouseEvent2Params.handler, QString("EVENT2"));
QCOMPARE(mouseEvent2Params.pressedButton, Qt::LeftButton);
QCOMPARE(exited.count(), 2);
@@ -1046,7 +1046,7 @@ private Q_SLOTS:
QCOMPARE(mouseEvent3Params.pressedButton, Qt::LeftButton);
QTest::mouseRelease(view.data(), Qt::LeftButton, 0, guPoint(45, 15));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(positionChanged.count(), 4);
}
@@ -1104,13 +1104,13 @@ private Q_SLOTS:
// produce long press
// FIXME move this under UbuntuTestCase
mousePressAndHold(test.data(), Qt::LeftButton, 0, guPoint(20, 30));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(hostHoldSpy.count(), 1);
QCOMPARE(proxyHoldSpy.count(), 1);
// click
QTest::mouseRelease(test.data(), Qt::LeftButton, 0, guPoint(20, 30));
- QTest::waitForEvents();
+ qApp->processEvents();
}
void testCase_forwardComposedEventsToProxy_whenMoved()
@@ -1133,13 +1133,13 @@ private Q_SLOTS:
QTest::mouseMove(test.data(), guPoint(20 + i, 30 + i));
}
QTest::qWait(UCMouse::DefaultPressAndHoldDelay / 2 + 200);
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(hostHoldSpy.count(), 0);
QCOMPARE(proxyHoldSpy.count(), 0);
// click
QTest::mouseRelease(test.data(), Qt::LeftButton, 0, guPoint(20, 30));
- QTest::waitForEvents();
+ qApp->processEvents();
}
void testCase_forwardToChainedItems()
@@ -1162,7 +1162,7 @@ private Q_SLOTS:
QObject::connect(proxy2, SIGNAL(pressed(QQuickMouseEvent*,QQuickItem*)), this, SLOT(onMouseEvent3(QQuickMouseEvent*,QQuickItem*)));
QTest::mousePress(test.data(), Qt::LeftButton, 0, guPoint(20, 30));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(hostPressed.count(), 1);
QCOMPARE(proxy1Pressed.count(), 1);
QCOMPARE(proxy2Pressed.count(), 1);
@@ -1173,7 +1173,7 @@ private Q_SLOTS:
// click
QTest::mouseRelease(test.data(), Qt::LeftButton, 0, guPoint(20, 30));
- QTest::waitForEvents();
+ qApp->processEvents();
}
void testCase_ignoreSynthesizedEvents() {
@@ -1199,32 +1199,32 @@ private Q_SLOTS:
//send a touch event, which will be converted to a synthesized mouse event, since
//no item in this QML is handling touch events
UCTestExtras::touchPress(0, overlayArea, guPoint(15, 15));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(areaPressed.count(), 0);
QCOMPARE(overlayAreaPressed.count(), 1);
QCOMPARE(overlayFilterPressed.count(), 0);
UCTestExtras::touchRelease(0, overlayArea, guPoint(15, 15));
- QTest::waitForEvents();
+ qApp->processEvents();
overlayFilter->setProperty("ignoreSynthesizedEvents", false);
QCOMPARE(overlayFilter->property("ignoreSynthesizedEvents").toBool(), false);
UCTestExtras::touchPress(1, overlayArea, guPoint(15, 15));
- QTest::waitForEvents();
+ qApp->processEvents();
QCOMPARE(areaPressed.count(), 0);
//the filter doesn't accept the pressed event by default
QCOMPARE(overlayAreaPressed.count(), 2);
QCOMPARE(overlayFilterPressed.count(), 1);
UCTestExtras::touchRelease(1, overlayArea, guPoint(15, 15));
- QTest::waitForEvents();
+ qApp->processEvents();
overlayArea->setEnabled(false);
QCOMPARE(overlayArea->isEnabled(), false);
UCTestExtras::touchPress(2, overlayArea, guPoint(15, 15));
- QTest::waitForEvents();
+ qApp->processEvents();
//the filter gets the event but its owner is not enabled, so we expect it
//to propagate to the area underneath
@@ -1232,7 +1232,7 @@ private Q_SLOTS:
QCOMPARE(overlayAreaPressed.count(), 2);
QCOMPARE(overlayFilterPressed.count(), 2);
UCTestExtras::touchRelease(2, overlayArea, guPoint(15, 15));
- QTest::waitForEvents();
+ qApp->processEvents();
}
};
diff --git a/tests/unit/performance/tst_performance.cpp b/tests/unit/performance/tst_performance.cpp
index 605ef79c4..ce31de076 100644
--- a/tests/unit/performance/tst_performance.cpp
+++ b/tests/unit/performance/tst_performance.cpp
@@ -35,7 +35,7 @@ private:
QQuickItem *loadDocument(const QString &document)
{
quickView->setSource(QUrl::fromLocalFile(document));
- QTest::waitForEvents();
+ qApp->processEvents();
return quickView->rootObject();
}
diff --git a/tests/unit/statesaver/tst_statesaver.cpp b/tests/unit/statesaver/tst_statesaver.cpp
index 19c2a0c21..4c55d903d 100644
--- a/tests/unit/statesaver/tst_statesaver.cpp
+++ b/tests/unit/statesaver/tst_statesaver.cpp
@@ -458,7 +458,7 @@ private Q_SLOTS:
QVERIFY(topLoader);
topLoader->setProperty("source", "Dynamic.qml");
- QTest::waitForEvents();
+ qApp->processEvents();
QObject *testItem = view->rootObject()->findChild<QObject*>("testItem");
QVERIFY(testItem);
diff --git a/tests/unit/subtheming/tst_subtheming.cpp b/tests/unit/subtheming/tst_subtheming.cpp
index 77e099cee..1db1de29e 100644
--- a/tests/unit/subtheming/tst_subtheming.cpp
+++ b/tests/unit/subtheming/tst_subtheming.cpp
@@ -739,7 +739,7 @@ private Q_SLOTS:
void test_mixed_versions() {
ThemeTestCase::ignoreWarning("OtherVersion.qml", 19, 1, "QML StyledItem: Mixing of Ubuntu.Components module versions 1.3 and 1.2 detected!");
QScopedPointer<ThemeTestCase> view(new ThemeTestCase("OtherVersion.qml"));
- QTest::waitForEvents();
+ qApp->processEvents();
UCStyledItemBase *newStyled = static_cast<UCStyledItemBase*>(view->rootObject());
UCStyledItemBase *otherStyled = view->findItem<UCStyledItemBase*>("otherStyled");
QCOMPARE(UCStyledItemBasePrivate::get(newStyled)->styleInstance()->objectName(), QString("OptionSelector13"));
--
2.20.1

View file

@ -1,46 +0,0 @@
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=ubuntu-ui-toolkit
pkgver=0_git20190208
_commit="cee7f49f493f37ebf0690137ed85700f94bacdf9"
pkgrel=0
pkgdesc='The Ubuntu UI toolkit used in Ubuntu Touch'
arch="x86_64"
url="https://unity8.io"
license="LGPL-3.0"
depends="qt5-qtfeedback"
depends_dev="libnih-dev qt5-qtsvg-dev qt5-qtpim-dev qt5-qtsystems-dev lttng-ust-dev libxi-dev eudev-dev mir-dev libevdev-dev qt5-qtgraphicaleffects qt5-qtfeedback-dev"
makedepends="$depends_dev qt5-qttools-dev qt5-qtdeclarative-dev"
source="$pkgname-$_commit.tar.gz::https://github.com/ubports/$pkgname/archive/$_commit.tar.gz
0004-Make-it-compile-with-Qt-5.12.patch
replace-bash-for-sh.patch"
subpackages="$pkgname-dev $pkgname-lang"
options="!check" # Complaining about a non-existing file
builddir="$srcdir/$pkgname-$_commit"
prepare() {
default_prepare
# Lets warnings be warnings and not errors
sed -i 's|warning_clean|warn_off|' "$builddir"/.qmake.conf
}
build() {
cd "$builddir"
qmake-qt5 "CONFIG+=no_docs"
make
}
check() {
cd "$builddir"
make check
}
package() {
cd "$builddir"
make INSTALL_ROOT="$pkgdir" install
}
sha512sums="bdbef210a353349d26b273979a5fca67d47cee16fc56f8386247ff6c7871635e2cf7dbca8e69bc258a46db536885bc3350de2a7706ef4a01b1dcced505e31600 ubuntu-ui-toolkit-cee7f49f493f37ebf0690137ed85700f94bacdf9.tar.gz
5b5c00bd365ee4068e2e0622a0ce31c7b67b0c6cf136b0d717dd68ac9559bc2d9c54e1e0c9106fa1d6e3438de974fa8b44c023888fe87bc1d1ed584023184eba 0004-Make-it-compile-with-Qt-5.12.patch
e01567f2426f78b0862e7b09cd99cabf3d885b600592e6a4f0e07dc077fae2ba8dd1d2deba3bb89d31171a90db6de909281664bcbc7736b9432f2bc0b26544e1 replace-bash-for-sh.patch"

View file

@ -1,10 +0,0 @@
diff --git a/documentation/docs.sh b/documentation/docs.sh
index 10fcfc49d..aa93dea62 100755
--- a/documentation/docs.sh
+++ b/documentation/docs.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
#
# Copyright 2012 Canonical Ltd.
#

View file

@ -1,40 +0,0 @@
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=unity-api
pkgver=0_git20190211
_commit="3361ed583f7545684965ac8b0094cd88a5cf26cd"
pkgrel=0
pkgdesc="API for Unity shell integration"
url="https://github.com/ubports/unity-api"
arch="x86_64"
license="LGPL-3.0"
depends=""
depends_dev=""
makedepends="$depends_dev cmake cmake-extras qt5-qtdeclarative-dev libqtdbustest gtest-dev gmock"
source="$pkgname-$_commit.tar.gz::https://github.com/ubports/$pkgname/archive/$_commit.tar.gz
qmltestrunner.patch"
subpackages="$pkgname-dev"
builddir="$srcdir/$pkgname-$_commit"
options="!check" # 88% tests passed, 3 tests failed out of 26
build() {
mkdir "$builddir"/build
cd "$builddir"/build
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib ..
make
}
check() {
cd "$builddir"/build
CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}
package() {
cd "$builddir"/build
make DESTDIR="$pkgdir" install
}
sha512sums="fe69fdfb958a885a4a7472868750d7eb23c29d77a1c32914f47f7ffc9adfd62e6f354e6d48498890eb7f5a6ad42fdec3c0bcae690ca59f06f634db3574e72aee unity-api-3361ed583f7545684965ac8b0094cd88a5cf26cd.tar.gz
8695998cb0451943ff08f00be52766d27c439184b1e8531a563cffe4bf4251dea52d5bc3493d797f4f6007f13130930c6b0cfb2c04b9dc54e6891e17c2978fb9 qmltestrunner.patch"

View file

@ -1,13 +0,0 @@
diff --git a/cmake/modules/QmlTest.cmake b/cmake/modules/QmlTest.cmake
index 8241703..d209b55 100644
--- a/cmake/modules/QmlTest.cmake
+++ b/cmake/modules/QmlTest.cmake
@@ -15,7 +15,7 @@
# qmltest_DEFAULT_IMPORT_PATHS
# qmltest_DEFAULT_PROPERTIES
-find_program(qmltestrunner_exe qmltestrunner)
+find_program(qmltestrunner_exe qmltestrunner-qt5)
if(NOT qmltestrunner_exe)
message(FATAL_ERROR "Could not locate qmltestrunner.")

View file

@ -1,97 +0,0 @@
From 8a7bf1e2b6499cccaf92bd36ce30f10643b7719a Mon Sep 17 00:00:00 2001
From: Luca Weiss <luca@z3ntu.xyz>
Date: Tue, 29 Jan 2019 19:15:51 +0100
Subject: [PATCH] Use GMock config from cmake-extras
---
CMakeLists.txt | 2 +-
cmake/FindGtest.cmake | 64 -------------------------------------------
2 files changed, 1 insertion(+), 65 deletions(-)
delete mode 100644 cmake/FindGtest.cmake
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 87e95fa..5b7e4d3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -57,7 +57,7 @@ enable_testing()
option(MIR_ENABLE_TESTS "Build tests" ON)
if (MIR_ENABLE_TESTS)
- find_package(Gtest REQUIRED)
+ find_package(GMock REQUIRED)
include_directories(${MIRCLIENT_INCLUDE_DIRS} )
include_directories(${GMOCK_INCLUDE_DIR} ${GTEST_INCLUDE_DIR})
add_subdirectory(tests/)
diff --git a/cmake/FindGtest.cmake b/cmake/FindGtest.cmake
deleted file mode 100644
index 15a34a1..0000000
--- a/cmake/FindGtest.cmake
+++ /dev/null
@@ -1,64 +0,0 @@
-include(ExternalProject)
-include(FindPackageHandleStandardArgs)
-
-#gtest
-if(EXISTS /usr/src/googletest)
- set(USING_GOOGLETEST_1_8 TRUE)
- set(GTEST_INSTALL_DIR /usr/src/googletest/googletest/include)
-else()
- set(GTEST_INSTALL_DIR /usr/src/gmock/gtest/include)
-endif()
-
-find_path(GTEST_INCLUDE_DIR gtest/gtest.h
- HINTS ${GTEST_INSTALL_DIR})
-
-#gmock
-find_path(GMOCK_INSTALL_DIR CMakeLists.txt
- HINTS /usr/src/googletest /usr/src/gmock)
-if(${GMOCK_INSTALL_DIR} STREQUAL "GMOCK_INSTALL_DIR-NOTFOUND")
- message(FATAL_ERROR "google-mock package not found")
-endif()
-
-find_path(GMOCK_INCLUDE_DIR gmock/gmock.h)
-
-if (USING_GOOGLETEST_1_8)
- set(GMOCK_BASE_BINARY_DIR ${CMAKE_BINARY_DIR}/gmock/libs)
- set(GMOCK_BINARY_DIR ${GMOCK_BASE_BINARY_DIR}/googlemock)
- set(GTEST_BINARY_DIR ${GMOCK_BINARY_DIR}/gtest)
-else()
- set(GMOCK_BASE_BINARY_DIR ${CMAKE_BINARY_DIR}/gmock/libs)
- set(GMOCK_BINARY_DIR ${GMOCK_BASE_BINARY_DIR})
- set(GTEST_BINARY_DIR ${GMOCK_BINARY_DIR}/gtest)
-endif()
-
-set(GTEST_CMAKE_ARGS "")
-
-if (USING_GOOGLETEST_1_8)
- list(APPEND GTEST_CMAKE_ARGS -DBUILD_GTEST=ON)
-endif()
-
-ExternalProject_Add(
- GMock
- #where to build in source tree
- PREFIX ${GMOCK_PREFIX}
- #where the source is external to the project
- SOURCE_DIR ${GMOCK_INSTALL_DIR}
- #forward the compilers to the subproject so cross-arch builds work
- CMAKE_ARGS ${GTEST_CMAKE_ARGS}
- BINARY_DIR ${GMOCK_BASE_BINARY_DIR}
-
- #we don't need to install, so skip
- INSTALL_COMMAND ""
-)
-
-set(GMOCK_LIBRARY ${GMOCK_BINARY_DIR}/libgmock.a)
-set(GMOCK_MAIN_LIBRARY ${GMOCK_BINARY_DIR}/libgmock_main.a)
-set(GMOCK_BOTH_LIBRARIES ${GMOCK_LIBRARY} ${GMOCK_MAIN_LIBRARY})
-set(GTEST_LIBRARY ${GTEST_BINARY_DIR}/libgtest.a)
-set(GTEST_MAIN_LIBRARY ${GTEST_BINARY_DIR}/libgtest_main.a)
-set(GTEST_BOTH_LIBRARIES ${GTEST_LIBRARY} ${GTEST_MAIN_LIBRARY})
-set(GTEST_ALL_LIBRARIES ${GTEST_BOTH_LIBRARIES} ${GMOCK_BOTH_LIBRARIES})
-
-find_package_handle_standard_args(GTest DEFAULT_MSG
- GMOCK_INCLUDE_DIR
- GTEST_INCLUDE_DIR)
--
2.20.1

View file

@ -1,38 +0,0 @@
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=unity-system-compositor
pkgver=0_git20180219
_commit="609fef0d04e8088218894f4ee7835a1d18e55240"
pkgrel=1
pkgdesc="System compositor using the Mir display server"
arch="x86_64"
url="https://unity8.io"
license="GPL-3.0"
depends=""
makedepends="$depends_dev cmake cmake-extras gtest-dev gmock gdk-pixbuf-dev mir-dev dbus-dev"
checkdepends="dbus"
source="$pkgname-$_commit.tar.gz::https://github.com/ubports/$pkgname/archive/$_commit.tar.gz
0001-Use-GMock-config-from-cmake-extras.patch"
builddir="$srcdir/$pkgname-$_commit"
options="!check" # 50% tests passed, 1 tests failed out of 2
build() {
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib
make
}
check() {
cd "$builddir"
CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
}
sha512sums="ce53738c8728d6aa05b43493ef336b9775d0d81681760cc34b7eacea93117c1da5f2da58e6773ef9cd2a610945eef8a5543dd9a99fa5a629e45b73946bbab007 unity-system-compositor-609fef0d04e8088218894f4ee7835a1d18e55240.tar.gz
7b6c6c8d34e6ddb7a8b4b357faaa9eab714908662e2a07cc781b1a0c32a1964427531af214d2edcae9e3a4dc1933e803ee314c7c7aeb83743e9cff3f143ed0d9 0001-Use-GMock-config-from-cmake-extras.patch"

View file

@ -1,21 +0,0 @@
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=unity7-schemas
pkgver=1
pkgrel=0
pkgdesc="Some glib schema file required by Unity 8"
arch="x86_64"
url="https://unity8.io"
license="GPL-3.0 LGPL-3.0"
depends=""
makedepends=""
# See https://github.com/vanyasem/Unity8-Arch/blob/95e949261f37eece33d4695a884e8269ed113113/unity7-schemas/PKGBUILD
source="com.canonical.Unity.gschema.xml"
options="!check"
package() {
install -Dm644 com.canonical.Unity.gschema.xml \
"$pkgdir"/usr/share/glib-2.0/schemas/com.canonical.Unity.gschema.xml
}
sha512sums="06d55abde653f72508bf2a71ff780d4f6b51a2e2d3544cf242dc2d5adc2b3728e86653958f719a9135c35263c2d43a964fbe29e5c8adf00e5296af0a2e88cc5a com.canonical.Unity.gschema.xml"

View file

@ -1,254 +0,0 @@
<schemalist>
<enum id="form-factor-enum">
<value nick="Automatic" value="0" />
<value nick="Desktop" value="1" />
<value nick="Netbook" value="2" />
<value nick="TV" value="3" />
</enum>
<enum id="home-expanded-enum">
<value nick="Not Expanded" value="0" />
<value nick="Expanded" value="1" />
</enum>
<enum id="launcher-position-enum">
<value nick="Left" value="0" />
<value nick="Bottom" value="1" />
</enum>
<enum id="desktop-type-enum">
<value nick="Ubuntu" value="0" />
<value nick="UbuntuKylin" value="1" />
</enum>
<schema path="/com/canonical/unity/" id="com.canonical.Unity" gettext-domain="unity">
<key enum="form-factor-enum" name="form-factor">
<default>"Automatic"</default>
<summary>The form factor Unity should target.</summary>
<description>The form factor chosen will affect the size and appearance of the Dash, Launcher and also the Window Management behaviour.</description>
</key>
<key enum="home-expanded-enum" name="home-expanded">
<default>"Expanded"</default>
<summary>Whether the home screen should be expanded.</summary>
<description>Whether the home screen should be expanded.</description>
</key>
<key enum="desktop-type-enum" name="desktop-type">
<default>"Ubuntu"</default>
<summary>The current desktop name.</summary>
<description>The current desktop name.</description>
</key>
<key type="i" name="minimize-count">
<default>0</default>
<summary>Number of times a normal window has been minimized.</summary>
<description>This is used to adjust the animation speed by making it progressively faster the more it is used.</description>
</key>
<key type="i" name="minimize-fast-duration">
<default>300</default>
<summary>The duration for the minimize animation when it is at its fastest setting.</summary>
<description>This is the duration that the minimize animation will have when it has been used more than an number of times equal minimize-speed-threshold.</description>
</key>
<key type="i" name="minimize-slow-duration">
<default>800</default>
<summary>The duration for the minimize animation when it is at its slowest setting.</summary>
<description>This is the duration that the minimize animation will have when it has never been used.</description>
</key>
<key type="i" name="minimize-speed-threshold">
<default>100</default>
<summary>The number of minimizations required to reach maximum speed.</summary>
<description>The speed of the minimize animation will progressively get faster as minimize-count approaches this value.</description>
</key>
<key type="b" name="double-click-activate">
<default>true</default>
<summary>Enable/Disable dash result double-click activation.</summary>
<description>This is used to enable/disable double-click result activation in the dash. Double-click to activate, single click preview</description>
</key>
<key type="b" name="integrated-menus">
<default>false</default>
<summary>Enable/Disable the integrated menus in Unity.</summary>
<description>When this is enabled, the application menus will be shown
on the window decoration, otherwise they will be always shown on the
unity top panel</description>
</key>
<key type="u" name="show-menus-now-delay">
<default>180</default>
<range min="0" max="5000"/>
<summary>Delay (in ms) before showing the menus when pressing Alt</summary>
<description>This allows tune the delay before presenting unity menus
(in non always-show-menus mode).</description>
</key>
<key type="b" name="always-show-menus">
<default>false</default>
<summary>Toggle the menu visibility based on mouse hovering.</summary>
<description>When this is enabled, the application menus will be always
shown (on the window decoration or in the unity panel, depending whether
integrated menus are enabled), otherwise they will be shown only when
the mouse cursor is over the relative mouse area.</description>
</key>
<key type="as" name="whitelist-repeated-keys">
<default>[
'XF86KbdBrightnessUp',
'XF86KbdBrightnessDown',
'XF86MonBrightnessUp',
'XF86MonBrightnessDown',
'XF86AudioRaiseVolume',
'XF86AudioLowerVolume'
]</default>
<summary>List of keycodes that should be processed even if auto-repated.</summary>
<description>These keycodes are processed even if they are auto-repeated.</description>
</key>
<key type="b" name="pam-check-account-type">
<default>false</default>
<summary>Enable/Disable PAM account checking</summary>
<description>Whether PAM should check the result of account modules
when authenticating. Only do this if you have account
configured properly on your system.</description>
</key>
<key type="b" name="lowgfx">
<default>false</default>
<summary>Enable/Disable Low Graphics Mode</summary>
<description>Whether Unity runs in Low Graphics Mode.</description>
</key>
</schema>
<schema path="/com/canonical/unity/interface/" id="com.canonical.Unity.Interface" gettext-domain="unity">
<key type="d" name="text-scale-factor">
<default>1.0</default>
<range min="0.5" max="3.0"/>
<summary>Font scaling for unity and applications.</summary>
<description>This value defines the global font scaling used by both
unity and applications. It will match the current system font scaling.</description>
</key>
<key type="d" name="cursor-scale-factor">
<default>1.0</default>
<range min="0.5" max="3.0"/>
<summary>Mouse cursor scaling.</summary>
<description>This value defines the global mouse cursor scaling used by both
unity and applications. Changing this value allows to use a custom scaling
for the mouse cursor.</description>
</key>
<key type="s" name="app-scale-factor-monitor">
<default>''</default>
<summary>The name of the monitor that controls the global app scaling factor.</summary>
<description>This value defines the monitor that unity will use (if found) as reference
for scaling all the applications.</description>
</key>
<key type="b" name="app-fallback-to-maximum-scale-factor">
<default>true</default>
<summary>Use the maximum per-monitor scale-factor as application scale factor if no target monitor is found.</summary>
<description>When this is enabled, the applications scale factor will match
the scale factor of the monitor with the greater value, in case the monitor
defined in 'app-scale-factor-monitor' is not provided or available.</description>
</key>
</schema>
<schema path="/com/canonical/unity/launcher/" id="com.canonical.Unity.Launcher" gettext-domain="unity">
<key type="as" name="favorites">
<default>[
'application://ubiquity.desktop',
'application://org.gnome.Nautilus.desktop',
'application://firefox.desktop',
'application://libreoffice-writer.desktop',
'application://libreoffice-calc.desktop',
'application://libreoffice-impress.desktop',
'application://org.gnome.Software.desktop',
'application://ubuntu-amazon-default.desktop',
'application://unity-control-center.desktop',
'unity://running-apps',
'unity://expo-icon',
'unity://devices'
]</default>
<summary>List of items that should be shown by default in the launcher</summary>
<description>These items can be: application://desktop-id.desktop, device://uiid and unity://special-id (including: unity://running-apps (icons of running applications) unity://devices (icons of attached devices), unity://expo-icon (icon of the workspace switcher) and unity://desktop-icon (the show-desktop icon)); the order of this list determines the launcher item's position.</description>
</key>
<key type="as" name="items">
<default>[
'application:///dialer-app.desktop',
'application:///messaging-app.desktop',
'application:///address-book-app.desktop',
'application:///ubuntu-system-settings.desktop',
'appid://com.ubuntu.camera/camera/current-user-version',
'appid://com.ubuntu.gallery/gallery/current-user-version',
'application:///webbrowser-app.desktop'
]</default>
<summary>List of items that should be shown by default in the launcher</summary>
<description>These items can be: application:///desktop-id.desktop or appid://package/app/current-user-version.</description>
</key>
<key type="s" name="favorite-migration">
<default>''</default>
<summary>Version of last migration done</summary>
<description>This is a detection key for the favorite migration script to know whether the needed migration is done or not.</description>
</key>
<key enum="launcher-position-enum" name="launcher-position">
<default>"Left"</default>
<summary>The position of launcher.</summary>
<description>The position of launcher.</description>
</key>
</schema>
<schema path="/com/canonical/unity/devices/" id="com.canonical.Unity.Devices" gettext-domain="unity">
<key type="as" name="blacklist">
<default>[]</default>
<summary>List of device uuid blacklist from the launcher.</summary>
<description>These devices are not shown in the launcher by default.</description>
</key>
</schema>
<schema path="/com/canonical/unity/dash/" id="com.canonical.Unity.Dash" gettext-domain="unity">
<key type="as" name="scopes">
<default>[ 'home.scope', 'applications.scope', 'files.scope', 'video.scope', 'music.scope', 'photos.scope', 'social.scope' ]</default>
<summary>List of scope ids specifying which scopes should be created and the order to display them in.</summary>
<description>The scopes listed in the scope bar will be ordered according to this list.</description>
</key>
<key type="as" name="favorite-scopes">
<default>[ 'scope://clickscope', 'scope://musicaggregator', 'scope://videoaggregator' ]</default>
<summary>List of scope queries specifying what should be displayed in the dash.</summary>
<description>List of favorite scopes displayed in the dash.</description>
</key>
</schema>
<schema path="/com/canonical/unity/decorations/" id="com.canonical.Unity.Decorations" gettext-domain="unity">
<key type="u" name="grab-wait">
<default>175</default>
<range min="0" max="1000"/>
<summary>Milliseconds to wait before considering a mouse pressure a grab</summary>
<description>The number of ms to wait before starting the window movement (and then
showing the proper mouse cursor, and grabbing the window)</description>
</key>
</schema>
<schema path="/com/canonical/unity/integrated-menus/" id="com.canonical.Unity.IntegratedMenus" gettext-domain="unity">
<key type="u" name="click-movement-threshold">
<default>15</default>
<range min="0" max="30"/>
<summary>Number of pixels to ignore on mouse pressure</summary>
<description>This value define how many pixels the user can move the mouse
when holding the mouse button, before we consider his action a movement
(to grab the window).</description>
</key>
<key type="u" name="double-click-wait">
<default>0</default>
<range min="0" max="300"/>
<summary>Milliseconds to wait before activating a menu after mouse release</summary>
<description>The number of ms to wait after a mouse button release event before considering
it a click. When this value is greater than 0, then it's possible to maximize
a window by double-clicking on its menus if the second click happens before the
specified value of ms is elapsed</description>
</key>
<key type="b" name="unfocused-windows-popup">
<default>true</default>
<summary>Whether to pop-up a menu when clicking over unfocused windows entries</summary>
<description>By disabling this setting you can make unity to only focus a window
when clicking over unfocused menu entries</description>
</key>
</schema>
<schema path="/com/canonical/unity/gestures/" id="com.canonical.Unity.Gestures" gettext-domain="unity">
<key type="b" name="launcher-drag">
<default>true</default>
<summary>Multi-touch gesture to reveal the launcher.</summary>
<description>When this is enabled, a 4 finger swipe from left to right will reveal launcher,
provided that the launcher is set to auto-hide.</description>
</key>
<key type="b" name="dash-tap">
<default>true</default>
<summary>Multi-touch gesture to open the dash.</summary>
<description>When this is enabled, a 4 finger tap will open the dash.</description>
</key>
<key type="b" name="windows-drag-pinch">
<default>true</default>
<summary>Multi-touch gestures to manage the windows.</summary>
<description>When this is enabled, 3 finger gestures such as drag, and pinch, will
help manage the windows.</description>
</key>
</schema>
</schemalist>

View file

@ -1,78 +0,0 @@
From ad7848c68e447c9abfb6507f3fe42c120ea098cf Mon Sep 17 00:00:00 2001
From: Luca Weiss <luca@z3ntu.xyz>
Date: Tue, 29 Jan 2019 19:21:04 +0100
Subject: [PATCH 1/5] AndroidAway
---
plugins/Lights/CMakeLists.txt | 20 +-------------------
src/CMakeLists.txt | 2 +-
src/ShellApplication.cpp | 8 ++++----
3 files changed, 6 insertions(+), 24 deletions(-)
diff --git a/plugins/Lights/CMakeLists.txt b/plugins/Lights/CMakeLists.txt
index 22365f6e2..d86f132d1 100644
--- a/plugins/Lights/CMakeLists.txt
+++ b/plugins/Lights/CMakeLists.txt
@@ -1,19 +1 @@
-pkg_check_modules(ANDROID_HEADERS REQUIRED android-headers)
-pkg_check_modules(ANDROID_HARDWARE REQUIRED libhardware)
-
-include_directories(
- SYSTEM
- ${ANDROID_HEADERS_INCLUDE_DIRS}
-)
-
-add_library(Lights-qml MODULE
- plugin.cpp
- Lights.cpp
- )
-
-target_link_libraries(Lights-qml
- Qt5::Qml Qt5::Gui
- ${ANDROID_HARDWARE_LIBRARIES}
- )
-
-add_unity8_plugin(Lights 0.1 Lights TARGETS Lights-qml)
+message("Sorry")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index fc0c9ca9b..8dd6614f5 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -42,7 +42,7 @@ if (ENABLE_TOUCH_EMULATION)
set(SOURCE_FILES ${SOURCE_FILES} MouseTouchAdaptor.cpp)
endif()
-pkg_check_modules(ANDROID_PROPERTIES REQUIRED libandroid-properties)
+#pkg_check_modules(ANDROID_PROPERTIES REQUIRED libandroid-properties) # No Android, I desktop
add_executable(${SHELL_APP} ${SOURCE_FILES})
if (NOT "${ANDROID_PROPERTIES_INCLUDE_DIRS}" STREQUAL "")
diff --git a/src/ShellApplication.cpp b/src/ShellApplication.cpp
index d7365ca37..c1181cc6f 100644
--- a/src/ShellApplication.cpp
+++ b/src/ShellApplication.cpp
@@ -26,7 +26,7 @@
#include <libintl.h>
// libandroid-properties
-#include <hybris/properties/properties.h>
+//#include <hybris/properties/properties.h> // I no Android, I disk top
// local
#include <paths.h>
@@ -49,9 +49,9 @@ ShellApplication::ShellApplication(int & argc, char ** argv, bool isMirServer)
if (!parser.deviceName().isEmpty()) {
m_deviceName = parser.deviceName();
} else {
- char buffer[200];
- property_get("ro.product.device", buffer /* value */, "desktop" /* default_value*/);
- m_deviceName = QString(buffer);
+ //char buffer[200];
+ //property_get("ro.product.device", buffer /* value */, "desktop" /* default_value*/);
+ //m_deviceName = QString(buffer); // I still no Vedroid
}
m_qmlArgs.setDeviceName(m_deviceName);
--
2.20.1

View file

@ -1,26 +0,0 @@
From 526ac3f293fa9c6afcf1e4db3c12ee271ffc206b Mon Sep 17 00:00:00 2001
From: Luca Weiss <luca@z3ntu.xyz>
Date: Tue, 29 Jan 2019 19:23:11 +0100
Subject: [PATCH 2/5] NoDpkgParse
---
data/CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index f13c6b639..ea0d788f1 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -20,7 +20,7 @@ install(FILES
DESTINATION ${CMAKE_INSTALL_DATADIR}/lightdm/lightdm.conf.d
)
-add_custom_target(pkgversion ALL COMMAND dpkg-parsechangelog -l${CMAKE_SOURCE_DIR}/debian/changelog --show-field version > ${CMAKE_CURRENT_BINARY_DIR}/version)
+#add_custom_target(pkgversion ALL COMMAND dpkg-parsechangelog -l${CMAKE_SOURCE_DIR}/debian/changelog --show-field version > ${CMAKE_CURRENT_BINARY_DIR}/version)
install(FILES com.canonical.Unity8.gschema.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/glib-2.0/schemas)
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/version DESTINATION ${CMAKE_INSTALL_LOCALSTATEDIR}/lib/unity8)
+#install(FILES ${CMAKE_CURRENT_BINARY_DIR}/version DESTINATION ${CMAKE_INSTALL_LOCALSTATEDIR}/lib/unity8)
--
2.20.1

View file

@ -1,39 +0,0 @@
From bdf8809c66c39d3be91fdd033b20922e1aecd3c2 Mon Sep 17 00:00:00 2001
From: Luca Weiss <luca@z3ntu.xyz>
Date: Tue, 29 Jan 2019 19:24:14 +0100
Subject: [PATCH 3/5] Add missing includes
---
.../LightDM/IntegratedLightDM/liblightdm/UsersModelPrivate.h | 2 ++
tests/mocks/liblightdm/MockUsersModel.cpp | 2 ++
2 files changed, 4 insertions(+)
diff --git a/plugins/LightDM/IntegratedLightDM/liblightdm/UsersModelPrivate.h b/plugins/LightDM/IntegratedLightDM/liblightdm/UsersModelPrivate.h
index d072228dd..3dcf4c4db 100644
--- a/plugins/LightDM/IntegratedLightDM/liblightdm/UsersModelPrivate.h
+++ b/plugins/LightDM/IntegratedLightDM/liblightdm/UsersModelPrivate.h
@@ -23,6 +23,8 @@
#include <QObject>
#include <QString>
+#include <sys/types.h>
+
class AccountsServiceDBusAdaptor;
namespace QLightDM
diff --git a/tests/mocks/liblightdm/MockUsersModel.cpp b/tests/mocks/liblightdm/MockUsersModel.cpp
index cbf8354a5..4fbb9435b 100644
--- a/tests/mocks/liblightdm/MockUsersModel.cpp
+++ b/tests/mocks/liblightdm/MockUsersModel.cpp
@@ -26,6 +26,8 @@
#include <QDir>
#include <QIcon>
+#include <sys/types.h>
+
namespace QLightDM
{
--
2.20.1

View file

@ -1,47 +0,0 @@
From 2853d23485b8fdbf778d3b8368b87ae76a5da672 Mon Sep 17 00:00:00 2001
From: Luca Weiss <luca@z3ntu.xyz>
Date: Tue, 29 Jan 2019 19:25:24 +0100
Subject: [PATCH 4/5] Add -qt5 suffix to search for Qt tools
---
cmake/modules/QmlTest.cmake | 4 ++--
tests/CMakeLists.txt | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/cmake/modules/QmlTest.cmake b/cmake/modules/QmlTest.cmake
index 25a4f6fde..da7e0a3b5 100644
--- a/cmake/modules/QmlTest.cmake
+++ b/cmake/modules/QmlTest.cmake
@@ -114,9 +114,9 @@ endfunction()
# This function wraps add_executable_test, see below for available arguments.
function(add_qml_unittest PATH COMPONENT_NAME)
- import_executables(qmltestrunner)
+ import_executables(qmltestrunner-qt5)
- add_executable_test(${COMPONENT_NAME} qmltestrunner
+ add_executable_test(${COMPONENT_NAME} qmltestrunner-qt5
${ARGN}
ARGS -input ${CMAKE_CURRENT_SOURCE_DIR}/${PATH}/tst_${COMPONENT_NAME}.qml ${QMLTEST_ARGS}
)
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 65a874083..8a36dec83 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -130,11 +130,11 @@ endfunction()
if(DEFINED ENV{DEB_BUILD_MULTIARCH})
set(QDBUSXML2CPP_EXECUTABLE "/usr/lib/$ENV{DEB_BUILD_MULTIARCH}/qt5/bin/qdbusxml2cpp")
else()
- FIND_PROGRAM(QDBUSXML2CPP_EXECUTABLE qdbusxml2cpp)
+ FIND_PROGRAM(QDBUSXML2CPP_EXECUTABLE qdbusxml2cpp-qt5)
endif()
if(NOT QDBUSXML2CPP_EXECUTABLE)
- message(FATAL_ERROR "qdbusxml2cpp not found")
+ message(FATAL_ERROR "qdbusxml2cpp-qt5 not found")
endif()
install(DIRECTORY data graphics
--
2.20.1

View file

@ -1,79 +0,0 @@
From a70ffba3209f6b2cf497db060bddd2f21dec2a2b Mon Sep 17 00:00:00 2001
From: Luca Weiss <luca@z3ntu.xyz>
Date: Tue, 29 Jan 2019 22:19:51 +0100
Subject: [PATCH 5/5] Link against libintl
---
plugins/LightDM/FullLightDM/CMakeLists.txt | 1 +
src/CMakeLists.txt | 1 +
tests/mocks/AccountsService/CMakeLists.txt | 1 +
tests/plugins/LightDM/IntegratedLightDM/CMakeLists.txt | 3 +++
4 files changed, 6 insertions(+)
diff --git a/plugins/LightDM/FullLightDM/CMakeLists.txt b/plugins/LightDM/FullLightDM/CMakeLists.txt
index 0d0154172..e9c804bff 100644
--- a/plugins/LightDM/FullLightDM/CMakeLists.txt
+++ b/plugins/LightDM/FullLightDM/CMakeLists.txt
@@ -27,6 +27,7 @@ target_link_libraries(FullLightDM-qml
${LIBLIGHTDM_LDFLAGS}
${LIBUSERMETRICSOUTPUT_LDFLAGS}
Qt5::DBus Qt5::Gui Qt5::Qml
+ intl
)
add_unity8_plugin(FullLightDM 0.1 LightDM/FullLightDM TARGETS FullLightDM-qml)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 8dd6614f5..386493848 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -52,6 +52,7 @@ target_link_libraries(${SHELL_APP}
Qt5::DBus Qt5::Gui Qt5::Qml Qt5::Quick Qt5::Test
${ANDROID_PROPERTIES_LDFLAGS} ${GSETTINGS_QT_LDFLAGS}
UbuntuGestures connectivity-qt1 unity8-private
+ intl
)
if (ENABLE_TOUCH_EMULATION)
diff --git a/tests/mocks/AccountsService/CMakeLists.txt b/tests/mocks/AccountsService/CMakeLists.txt
index c10e2dab8..b6a3a4563 100644
--- a/tests/mocks/AccountsService/CMakeLists.txt
+++ b/tests/mocks/AccountsService/CMakeLists.txt
@@ -17,6 +17,7 @@ add_library(MockAccountsService-qml MODULE
target_link_libraries(MockAccountsService-qml
Qt5::DBus Qt5::Qml
MockLightDM
+ intl
)
add_unity8_mock(AccountsService 0.1 AccountsService
diff --git a/tests/plugins/LightDM/IntegratedLightDM/CMakeLists.txt b/tests/plugins/LightDM/IntegratedLightDM/CMakeLists.txt
index c35cbff8f..67918cfc8 100644
--- a/tests/plugins/LightDM/IntegratedLightDM/CMakeLists.txt
+++ b/tests/plugins/LightDM/IntegratedLightDM/CMakeLists.txt
@@ -15,6 +15,7 @@ add_dependencies(GreeterDBusTestExec MockLightDM)
target_link_libraries(GreeterDBusTestExec
Qt5::Core Qt5::DBus Qt5::Quick Qt5::Test
MockLightDM
+ intl
)
target_include_directories(GreeterDBusTestExec PUBLIC
${CMAKE_SOURCE_DIR}/plugins/LightDM
@@ -87,6 +88,7 @@ add_dependencies(GreeterUsersModelTestExec MockLightDM)
target_link_libraries(GreeterUsersModelTestExec
Qt5::Core Qt5::Test
MockLightDM
+ intl
)
target_include_directories(GreeterUsersModelTestExec PUBLIC
${CMAKE_SOURCE_DIR}/plugins/LightDM
@@ -114,6 +116,7 @@ add_dependencies(GreeterPromptsModelTestExec MockLightDM)
target_link_libraries(GreeterPromptsModelTestExec
Qt5::Core Qt5::Test
MockLightDM
+ intl
)
target_include_directories(GreeterPromptsModelTestExec PUBLIC
${CMAKE_SOURCE_DIR}/plugins/LightDM
--
2.20.1

View file

@ -1,53 +0,0 @@
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=unity8
pkgver=0_git20181011
_commit="18c3f6f3c6d6274e1a63562b955bd65f41266fb8"
pkgrel=1
pkgdesc="A convergent desktop environment"
arch="x86_64"
url="https://unity8.io"
license="GPL-3.0 LGPL-2.1"
depends="qt5-qtgraphicaleffects settings-components gsettings-ubuntu-touch-schemas qtmir unity-system-compositor unity7-schemas"
depends_dev="qt5-qtbase-dev qt5-qtdeclarative-dev unity-api-dev geonames-dev qmenumodel-dev qmenumodel gnome-desktop-dev ubuntu-app-launch-dev ubuntu-ui-toolkit-dev libqtdbustest libqtdbusmock indicator-network-dev gsettings-qt-dev libusermetrics-dev lightdm-qt5 lightdm-qt5-dev ubuntu-download-manager-dev linux-pam-dev"
makedepends="$depends_dev cmake cmake-extras dbus-test-runner doxygen graphviz system-settings"
checkdepends="py3-dbusmock"
source="$pkgname-$_commit.tar.gz::https://github.com/ubports/$pkgname/archive/$_commit.tar.gz
0001-AndroidAway.patch
0002-NoDpkgParse.patch
0003-Add-missing-includes.patch
0004-Add-qt5-suffix-to-search-for-Qt-tools.patch
0005-Link-against-libintl.patch"
subpackages="$pkgname-lang"
builddir="$srcdir/$pkgname-$_commit"
options="!check" # 90% tests passed, 2 tests failed out of 20
build() {
mkdir "$builddir"/build
cd "$builddir"/build
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_INSTALL_LOCALSTATEDIR=/var ..
make
}
check() {
cd "$builddir"/build
CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}
package() {
cd "$builddir"/build
make DESTDIR="$pkgdir" install
# Remove this mock as apk thinks, it conflicts with the qmenumodel package
rm -r "$pkgdir"/usr/lib/unity8/qml/mocks/QMenuModel/
}
sha512sums="6bf08f06d6046fe8cf68c3c9aa8f6ef273285ac6362e1167bebb00c309d9407418fefc6635f75beb6301b8ec9192952a56544178ade94859a10f59a701b6c39a unity8-18c3f6f3c6d6274e1a63562b955bd65f41266fb8.tar.gz
1d1ea9426684dc79c784598b80c9f827fa2b57804b47eeb864706c72ac36241c80075a256d49b3fd77ab012defcd93969db2d9cd310d8f5a97a5392dfb01f035 0001-AndroidAway.patch
3e39c7147c606630bf557cabdb142503396f0e935d16a54ece31456fbd361982982d665551ea978a1f65eb964547d1b3136ca41397e6976a20f26da5c470f83a 0002-NoDpkgParse.patch
c35096ea3c4a5ab115b33deecd9e36dfb687ba6bacdc69d67f0db0921bc113523923eb1605037074e90d65f30d9f5e9d1e58d0b429c8fa5bfc5f89c538f810bb 0003-Add-missing-includes.patch
79954f156288cdccf1f04664c3a8ef171ae52631c69d6905ef74fbc598ae52506871818cddcb67adeb6c0f7f131c002e2b1c0c5bb89ca103095976daf271bf6c 0004-Add-qt5-suffix-to-search-for-Qt-tools.patch
d5eee19c2acaafb14a1aaf27264befc32a22872e4f76f9987f10490f458092e2199df52cf820bd4a675a8c28a02a808a198c13f1397b89229dc813d4b06f59be 0005-Link-against-libintl.patch"

View file

@ -1,37 +0,0 @@
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=url-dispatcher
pkgver=0_git20181007
_commit="b9a83f539b6d0c51b7f2397d40aed1132366672b"
pkgrel=0
pkgdesc="Service to allow sending of URLs and get handlers started"
arch="x86_64"
url="https://unity8.io"
license="LGPL-3.0"
depends=""
depends_dev="ubuntu-app-launch-dev json-glib-dev click-dev libapparmor-dev"
makedepends="$depends_dev cmake dbus-test-runner cmake-extras glib-dev gtest-dev gmock"
source="$pkgname-$_commit.tar.gz::https://github.com/ubports/$pkgname/archive/$_commit.tar.gz"
subpackages="$pkgname-dev"
builddir="$srcdir/$pkgname-$_commit"
options="!check" # 'Test #3: service-test' hangs
build() {
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib
make
}
check() {
cd "$builddir"
CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
}
sha512sums="f26576fa67777c041236e9fe6e6ad5607a240e63959872abc752d4023443b3473da55af39f3d19c888470e639229e84eecde75dcfa6e0b8622b1ee5634ac8f19 url-dispatcher-b9a83f539b6d0c51b7f2397d40aed1132366672b.tar.gz"