Commit 2c83bd47 authored by André's avatar André

Flatpak: Add appindicator plugin

Modules are copied from https://github.com/flathub/shared-modules
parent 237ceb11
<?xml version="1.0" encoding="UTF-8"?>
<component type="addon">
<id>org.gajim.Gajim.Plugin.appindicator</id>
<extends>org.gajim.Gajim</extends>
<name>Ayatana Appindicator integration plugin</name>
<summary>Integrate Gajim with the Ayatana AppIndicator</summary>
<url type="homepage">https://gajim.org/</url>
<metadata_license>CC-BY-SA-3.0</metadata_license>
<project_license>GPL-3.0</project_license>
<update_contact>gajim-devel_AT_gajim.org</update_contact>
</component>
{
"name": "dbus-glib",
"cleanup": [
"*.la",
"/bin",
"/etc",
"/include",
"/libexec",
"/share/gtk-doc",
"/share/man"
],
"config-opts": [
"--disable-static",
"--disable-gtk-doc"
],
"sources": [
{
"type": "archive",
"url": "https://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-0.110.tar.gz",
"sha256": "7ce4760cf66c69148f6bd6c92feaabb8812dee30846b24cd0f7395c436d7e825"
}
]
}
{
"name": "intltool",
"cleanup": [ "*" ],
"sources": [
{
"type": "archive",
"url": "https://launchpad.net/intltool/trunk/0.51.0/+download/intltool-0.51.0.tar.gz",
"sha256": "67c74d94196b153b774ab9f89b2fa6c6ba79352407037c8c14d5aeb334e959cd"
}
]
}
--- libappindicator-12.10.0/src/app-indicator.c 2012-07-11 13:28:34.415113869 -0400
+++ wrk/src/app-indicator.c 2020-03-19 12:14:47.813191652 -0400
@@ -443,7 +443,7 @@
G_STRUCT_OFFSET (AppIndicatorClass, new_icon),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0, G_TYPE_NONE);
+ G_TYPE_NONE, 0);
/**
* AppIndicator::new-attention-icon:
@@ -457,7 +457,7 @@
G_STRUCT_OFFSET (AppIndicatorClass, new_attention_icon),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0, G_TYPE_NONE);
+ G_TYPE_NONE, 0);
/**
* AppIndicator::new-status:
@@ -505,7 +505,7 @@
G_STRUCT_OFFSET (AppIndicatorClass, connection_changed),
NULL, NULL,
g_cclosure_marshal_VOID__BOOLEAN,
- G_TYPE_NONE, 1, G_TYPE_BOOLEAN, G_TYPE_NONE);
+ G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
/**
* AppIndicator::new-icon-theme-path:
@@ -1175,7 +1175,7 @@
gchar * guide = priv->label_guide != NULL ? priv->label_guide : "";
g_signal_emit(G_OBJECT(self), signals[NEW_LABEL], 0,
- label, guide, TRUE);
+ label, guide);
if (priv->dbus_registration != 0 && priv->connection != NULL) {
GError * error = NULL;
@@ -1490,7 +1490,7 @@
static void
theme_changed_cb (GtkIconTheme * theme, gpointer user_data)
{
- g_signal_emit (user_data, signals[NEW_ICON], 0, TRUE);
+ g_signal_emit (user_data, signals[NEW_ICON], 0);
AppIndicator * self = (AppIndicator *)user_data;
AppIndicatorPrivate *priv = self->priv;
@@ -1904,7 +1904,7 @@
}
if (changed) {
- g_signal_emit (self, signals[NEW_ATTENTION_ICON], 0, TRUE);
+ g_signal_emit (self, signals[NEW_ATTENTION_ICON], 0);
if (self->priv->dbus_registration != 0 && self->priv->connection != NULL) {
GError * error = NULL;
@@ -1982,7 +1982,7 @@
}
if (changed) {
- g_signal_emit (self, signals[NEW_ICON], 0, TRUE);
+ g_signal_emit (self, signals[NEW_ICON], 0);
if (self->priv->dbus_registration != 0 && self->priv->connection != NULL) {
GError * error = NULL;
@@ -2048,7 +2048,7 @@
self->priv->icon_theme_path = g_strdup(icon_theme_path);
- g_signal_emit (self, signals[NEW_ICON_THEME_PATH], 0, self->priv->icon_theme_path, TRUE);
+ g_signal_emit (self, signals[NEW_ICON_THEME_PATH], 0, self->priv->icon_theme_path);
if (self->priv->dbus_registration != 0 && self->priv->connection != NULL) {
GError * error = NULL;
--- libappindicator-12.10.0/src/app-indicator.c
+++ libappindicator-12.10.0/src/app-indicator.c
@@ -1606,7 +1606,7 @@ status_icon_changes (AppIndicator * self, gpointer data)
gint n_elements, i;
gboolean found=FALSE;
gtk_icon_theme_get_search_path(icon_theme, &path, &n_elements);
- for (i=0; i< n_elements || path[i] == NULL; i++) {
+ for (i=0; i< n_elements; i++) {
if(g_strcmp0(path[i], self->priv->icon_theme_path) == 0) {
found=TRUE;
break;
From: Olivier Tilloy <olivier.tilloy@canonical.com>
Date: Tue 2018-03-20 12:47:56 +0000
Subject: [PATCH] libappindicator FTBFS on bionic
Fix build failures on bionic,
and update Vcs-* fields in debian/control. (LP: #1757121)
Approved by: Marco Trevisan (Treviño)
---
--- libappindicator-12.10.0/src/app-indicator.c 2017-02-15 14:10:41 +0000
+++ libappindicator-12.10.0/src/app-indicator.c 2018-03-20 12:38:59 +0000
@@ -2196,7 +2196,7 @@ app_indicator_set_secondary_activate_tar
g_return_if_fail (GTK_IS_WIDGET (menuitem));
- priv->sec_activate_target = g_object_ref(G_OBJECT(menuitem));
+ priv->sec_activate_target = g_object_ref(menuitem);
priv->sec_activate_enabled = widget_is_menu_child(self, menuitem);
g_signal_connect(menuitem, "parent-set", G_CALLBACK(sec_activate_target_parent_changed), self);
}
{
"name": "libappindicator",
"build-options": {
"cflags": "-Wno-error"
},
"rm-configure": true,
"config-opts": [
"--disable-static",
"--disable-gtk-doc",
"--disable-tests",
"--disable-mono-tests",
"--enable-introspection=yes",
"--with-gtk=3"
],
"cleanup": [
"/include",
"/lib/pkgconfig",
"/lib/*.la",
"/share/gtk-doc",
"/share/gir-1.0"
],
"sources": [
{
"type": "archive",
"url": "https://launchpad.net/libappindicator/12.10/12.10.0/+download/libappindicator-12.10.0.tar.gz",
"sha256": "d5907c1f98084acf28fd19593cb70672caa0ca1cf82d747ba6f4830d4cc3b49f"
},
{
"type": "patch",
"path": "libappindicator-ftbfs.patch"
},
{
"type": "patch",
"path": "libappindicator-no-python.patch"
},
{
"type": "patch",
"path": "libappindicator-fix-crash-from-incorrect-signal-emission.patch"
},
{
"type": "patch",
"path": "libappindicator-fix-crash-iterating-icon-themes.patch"
},
{
"type": "script",
"commands": ["autoreconf -sfi"],
"dest-filename": "autogen.sh"
}
],
"modules": [
"../intltool/intltool-0.51.json",
"../dbus-glib/dbus-glib-0.110.json",
{
"name": "libdbusmenu",
"build-options": {
"cflags": "-Wno-error",
"env": {
"HAVE_VALGRIND_FALSE": "#",
"HAVE_VALGRIND_TRUE": ""
}
},
"cleanup": [
"/include",
"/libexec",
"/lib/pkgconfig",
"/lib/*.la",
"/share/doc",
"/share/libdbusmenu",
"/share/gtk-doc",
"/share/gir-1.0"
],
"config-opts": [
"--disable-static",
"--disable-gtk-doc",
"--enable-introspection=yes",
"--disable-vala",
"--disable-dumper",
"--disable-tests",
"--with-gtk=3"
],
"sources": [
{
"type": "archive",
"url": "https://launchpad.net/libdbusmenu/16.04/16.04.0/+download/libdbusmenu-16.04.0.tar.gz",
"sha256": "b9cc4a2acd74509435892823607d966d424bd9ad5d0b00938f27240a1bfa878a"
}
]
},
{
"name": "libindicator",
"build-options": {
"cflags": "-Wno-error"
},
"cleanup": [
"/include",
"/libexec",
"/lib/pkgconfig",
"/lib/*.la",
"/share/libindicator",
"/share/gtk-doc",
"/share/gir-1.0"
],
"config-opts": [
"--disable-static",
"--disable-tests",
"--with-gtk=3"
],
"sources": [
{
"type": "archive",
"url": "https://launchpad.net/libindicator/12.10/12.10.1/+download/libindicator-12.10.1.tar.gz",
"sha256": "b2d2e44c10313d5c9cd60db455d520f80b36dc39562df079a3f29495e8f9447f"
},
{
"type": "shell",
"commands": [
"# FTBFS fix",
"sed -e '/LIBINDICATOR_LIBS/ s/\\$LIBM/ $LIBM/' -i configure.ac"
]
},
{
"type": "script",
"commands": ["autoreconf -sfi"],
"dest-filename": "autogen.sh"
}
]
}
]
}
id: org.gajim.Gajim.Devel.Plugin.appindicator
runtime: org.gajim.Gajim.Devel
sdk: org.gnome.Sdk//3.36
build-extension: true
separate-locales: false
appstream-compose: false
build-options:
env:
PYTHONPATH: /app/plugins/appindicator/lib/python3.7/site-packages/
prefix: /app/plugins/appindicator
prepend-pkg-config-path: /app/plugins/appindicator/lib/pkgconfig
prepend-path: /app/plugins/appindicator/bin
modules:
- modules/libappindicator/libappindicator-gtk3-introspection-12.10.json
- name: gajim-appindicator
buildsystem: simple
build-commands:
- 'cp -R -t ${FLATPAK_DEST} *'
post-install:
- install -Dm644 --target-directory=${FLATPAK_DEST}/share/metainfo org.gajim.Gajim.Plugin.appindicator.metainfo.xml
- appstream-compose --basename=org.gajim.Gajim.Devel.Plugin.appindicator --prefix=${FLATPAK_DEST} --origin=flatpak org.gajim.Gajim.Plugin.appindicator
sources:
- type: archive
url: https://ftp.gajim.org/plugins_releases/appindicator_integration_1.3.2.zip
sha256: d56e1af24cc462d2090b33c53c6dd9f2a00d38c6c35aaa616d021c5f069a2333
- type: file
path: ../appindicator_integration/org.gajim.Gajim.Plugin.appindicator.metainfo.xml
sha256: 8591662b70ac496a2411ced0e08fa630744416eb3f301c006e12207ee84cecbf
- type: shell
commands:
- sed -i "s+org.gajim.Gajim+org.gajim.Gajim.Devel+" org.gajim.Gajim.Plugin.*.metainfo.xml
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment