From 5e924a0abcf01178fda81a2dbb2f83bb0238a4ad Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Sat, 11 Nov 2017 13:35:00 +0100 Subject: lxsession: update to 0.5.3 The gtk3 patch is upstreamed now, but new code does not comply with gtk3. Signed-off-by: Max Krummenacher Acked-by: Marcel Ziswiler --- ...lace-use-of-UniqueApp-with-GtkApplication.patch | 99 ++++++++++++++++++++++ .../0002-GTK-3-GtkObject-no-longer-exists.patch | 97 +++++++++++++++++++++ recipes-lxde/lxsession/lxsession_0.5.2.bb | 28 ------ recipes-lxde/lxsession/lxsession_0.5.3.bb | 29 +++++++ 4 files changed, 225 insertions(+), 28 deletions(-) create mode 100644 recipes-lxde/lxsession/lxsession/0001-replace-use-of-UniqueApp-with-GtkApplication.patch create mode 100644 recipes-lxde/lxsession/lxsession/0002-GTK-3-GtkObject-no-longer-exists.patch delete mode 100644 recipes-lxde/lxsession/lxsession_0.5.2.bb create mode 100644 recipes-lxde/lxsession/lxsession_0.5.3.bb diff --git a/recipes-lxde/lxsession/lxsession/0001-replace-use-of-UniqueApp-with-GtkApplication.patch b/recipes-lxde/lxsession/lxsession/0001-replace-use-of-UniqueApp-with-GtkApplication.patch new file mode 100644 index 0000000..07b0e09 --- /dev/null +++ b/recipes-lxde/lxsession/lxsession/0001-replace-use-of-UniqueApp-with-GtkApplication.patch @@ -0,0 +1,99 @@ +From d41062daa4c177d5fb3d4b717d79743e2f9b7182 Mon Sep 17 00:00:00 2001 +From: Max Krummenacher +Date: Sat, 21 Oct 2017 15:26:32 +0200 +Subject: [PATCH 1/2] replace use of UniqueApp with GtkApplication + +i.e. drop libunique use. + +Signed-off-by: Max Krummenacher +--- + lxclipboard/main.c | 14 +++++++++++++- + lxpolkit/main.c | 12 ++++++++++++ + 2 files changed, 25 insertions(+), 1 deletion(-) + +diff --git a/lxclipboard/main.c b/lxclipboard/main.c +index 9656e5b..e9eabfb 100644 +--- a/lxclipboard/main.c ++++ b/lxclipboard/main.c +@@ -25,7 +25,9 @@ + #include + #include + #include ++#if USE_GTK2 + #include ++#endif + #include + + +@@ -65,15 +67,25 @@ LxsessionMain* lxsession_main_construct (GType object_type); + + gint lxsession_main_main (gchar** args, int args_length1) { + gint result = 0; ++#if USE_GTK2 + UniqueApp* app = NULL; + UniqueApp* _tmp0_ = NULL; + UniqueApp* _tmp1_ = NULL; ++#else ++ GtkApplication* app = NULL; ++ GtkApplication* _tmp0_ = NULL; ++ GtkApplication* _tmp1_ = NULL; ++#endif + gboolean _tmp2_ = FALSE; + gboolean _tmp3_ = FALSE; + GMainLoop* _tmp4_ = NULL; + GMainLoop* _tmp5_ = NULL; + gtk_init (&args_length1, &args); +- _tmp0_ = unique_app_new ("org.lxde.lxclipboard", NULL); ++#if USE_GTK2 ++ _tmp0_ = gtk_application_new ("org.lxde.lxclipboard", NULL); ++#else ++ _tmp0_ = gtk_application_new ("org.lxde.lxclipboard", 0); ++#endif + app = _tmp0_; + _tmp1_ = app; + g_object_get (_tmp1_, "is-running", &_tmp2_, NULL); +diff --git a/lxpolkit/main.c b/lxpolkit/main.c +index 243ee1a..9e23e62 100644 +--- a/lxpolkit/main.c ++++ b/lxpolkit/main.c +@@ -26,7 +26,9 @@ + #include + #include + #include ++#if USE_GTK2 + #include ++#endif + #include + + +@@ -67,9 +69,15 @@ LxsessionMain* lxsession_main_construct (GType object_type); + + gint lxsession_main_main (gchar** args, int args_length1) { + gint result = 0; ++#if USE_GTK2 + UniqueApp* app = NULL; + UniqueApp* _tmp0_ = NULL; + UniqueApp* _tmp1_ = NULL; ++#else ++ GtkApplication* app = NULL; ++ GtkApplication* _tmp0_ = NULL; ++ GtkApplication* _tmp1_ = NULL; ++#endif + gboolean _tmp2_ = FALSE; + gboolean _tmp3_ = FALSE; + GMainLoop* _tmp5_ = NULL; +@@ -77,7 +85,11 @@ gint lxsession_main_main (gchar** args, int args_length1) { + textdomain (GETTEXT_PACKAGE); + bind_textdomain_codeset (GETTEXT_PACKAGE, "utf-8"); + gtk_init (&args_length1, &args); ++#if USE_GTK2 + _tmp0_ = unique_app_new ("org.lxde.lxpolkit", NULL); ++#else ++ _tmp0_ = gtk_application_new ("org.lxde.lxclipboard", 0); ++#endif + app = _tmp0_; + _tmp1_ = app; + g_object_get (_tmp1_, "is-running", &_tmp2_, NULL); +-- +2.9.4 + diff --git a/recipes-lxde/lxsession/lxsession/0002-GTK-3-GtkObject-no-longer-exists.patch b/recipes-lxde/lxsession/lxsession/0002-GTK-3-GtkObject-no-longer-exists.patch new file mode 100644 index 0000000..a057255 --- /dev/null +++ b/recipes-lxde/lxsession/lxsession/0002-GTK-3-GtkObject-no-longer-exists.patch @@ -0,0 +1,97 @@ +From 257162a05efa1abb4ded2514b753c27e203a4635 Mon Sep 17 00:00:00 2001 +From: Max Krummenacher +Date: Sat, 21 Oct 2017 15:29:36 +0200 +Subject: [PATCH 2/2] GTK+3: GtkObject no longer exists + +The destroy functionallity is provided by the GWidget class. + +Signed-off-by: Max Krummenacher +--- + lxsession-default-apps/combobox.c | 13 +++++++++++++ + lxsession-default-apps/main.c | 12 ++++++++++++ + 2 files changed, 25 insertions(+) + +diff --git a/lxsession-default-apps/combobox.c b/lxsession-default-apps/combobox.c +index e38515b..1b5960f 100644 +--- a/lxsession-default-apps/combobox.c ++++ b/lxsession-default-apps/combobox.c +@@ -2935,7 +2935,11 @@ static void _____lambda13_ (Block16Data* _data16_) { + _tmp0__length1 = _data15_->mime_list_length1; + _tmp1_ = _data16_->base_name; + ldefault_apps_save_mime_type (_tmp0_, _tmp0__length1, _tmp1_); ++#if USE_GTK2 + gtk_object_destroy ((GtkObject*) _data14_->window_mime); ++#else ++ gtk_widget_destroy ((GtkWidget*) _data14_->window_mime); ++#endif + } + + +@@ -2949,7 +2953,12 @@ static void _____lambda14_ (Block16Data* _data16_) { + Block14Data* _data14_; + _data15_ = _data16_->_data15_; + _data14_ = _data15_->_data14_; ++#if USE_GTK2 + gtk_object_destroy ((GtkObject*) _data14_->window_mime); ++#else ++ gtk_widget_destroy ((GtkWidget*) _data14_->window_mime); ++#endif ++ + } + + +@@ -3395,7 +3404,11 @@ void ldefault_apps_create_mime_associate_window (LDefaultAppsDbusBackend* dbus_b + block16_data_unref (_data16_); + _data16_ = NULL; + } else { ++#if USE_GTK2 + gtk_object_destroy ((GtkObject*) _data14_->window_mime); ++#else ++ gtk_widget_destroy ((GtkWidget*) _data14_->window_mime); ++#endif + } + _tmp59_ = (_vala_array_free (_tmp59_, _tmp59__length1, (GDestroyNotify) g_free), NULL); + } +diff --git a/lxsession-default-apps/main.c b/lxsession-default-apps/main.c +index 59bdb2b..3fcec8e 100644 +--- a/lxsession-default-apps/main.c ++++ b/lxsession-default-apps/main.c +@@ -136,7 +136,11 @@ enum { + GType ldefault_apps_dbus_backend_get_type (void) G_GNUC_CONST; + static Block4Data* block4_data_ref (Block4Data* _data4_); + static void block4_data_unref (void * _userdata_); ++#if USE_GTK2 + static void _gtk_main_quit_gtk_object_destroy (GtkObject* _sender, gpointer self); ++#else ++static void _gtk_main_quit_gtk_object_destroy (GtkWidget* _sender, gpointer self); ++#endif + LDefaultAppsDbusBackend* ldefault_apps_dbus_backend_new (const gchar* type); + LDefaultAppsDbusBackend* ldefault_apps_dbus_backend_construct (GType object_type, const gchar* type); + void ldefault_apps_manual_autostart_init (GtkBuilder* builder); +@@ -399,7 +403,11 @@ static void block4_data_unref (void * _userdata_) { + } + + ++#if USE_GTK2 + static void _gtk_main_quit_gtk_object_destroy (GtkObject* _sender, gpointer self) { ++#else ++static void _gtk_main_quit_gtk_object_destroy (GtkWidget* _sender, gpointer self) { ++#endif + gtk_main_quit (); + } + +@@ -1809,7 +1817,11 @@ LDefaultAppsMainWindows* ldefault_apps_main_windows_construct (GType object_type + return NULL; + } + gtk_window_set_default_size ((GtkWindow*) self, 600, 400); ++#if USE_GTK2 + g_signal_connect ((GtkObject*) self, "destroy", (GCallback) _gtk_main_quit_gtk_object_destroy, NULL); ++#else ++ g_signal_connect ((GtkWidget*) self, "destroy", (GCallback) _gtk_main_quit_gtk_object_destroy, NULL); ++#endif + _tmp6_ = gtk_builder_new (); + builder = _tmp6_; + { +-- +2.9.4 + diff --git a/recipes-lxde/lxsession/lxsession_0.5.2.bb b/recipes-lxde/lxsession/lxsession_0.5.2.bb deleted file mode 100644 index add13d3..0000000 --- a/recipes-lxde/lxsession/lxsession_0.5.2.bb +++ /dev/null @@ -1,28 +0,0 @@ -SUMMARY = "LXDE session manager" -HOMEPAGE = "http://lxde.sf.net/" -SECTION = "x11" - -PR = "r3" - -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=a76102f7f48780284bee49e6edaeb5a9" - -DEPENDS = "dbus dbus-glib glib-2.0 intltool-native libgee libunique virtual/libx11 lxde-common polkit vala-native xproto" -RDEPENDS_${PN} = "upower dbus-x11" - -SRC_URI = "${SOURCEFORGE_MIRROR}/lxde/lxsession-${PV}.tar.xz" -SRC_URI += "file://gtk3.patch" -SRC_URI[md5sum] = "2957acccbf9ce37ef8205ec5424f8047" -SRC_URI[sha256sum] = "2d55e9ea80057fe5ffd68a91a15bb004ad7bf019e50807a8bb9b342115efaada" - -PACKAGECONFIG ?= "gtk3" -PACKAGECONFIG[gtk3] = "--enable-gtk3,,gtk+3" -python __anonymous () { - depends = d.getVar("DEPENDS", d, 1) - if 'gtk3' not in d.getVar('PACKAGECONFIG', True): - d.setVar("DEPENDS", "%s gtk+" % depends) -} - -inherit autotools pkgconfig gettext gobject-introspection - -FILES_${PN} += "${datadir}/lxsession" diff --git a/recipes-lxde/lxsession/lxsession_0.5.3.bb b/recipes-lxde/lxsession/lxsession_0.5.3.bb new file mode 100644 index 0000000..07c0131 --- /dev/null +++ b/recipes-lxde/lxsession/lxsession_0.5.3.bb @@ -0,0 +1,29 @@ +SUMMARY = "LXDE session manager" +HOMEPAGE = "http://lxde.sf.net/" +SECTION = "x11" + +PR = "r3" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=a76102f7f48780284bee49e6edaeb5a9" + +DEPENDS = "dbus dbus-glib glib-2.0 intltool-native libgee libunique virtual/libx11 lxde-common polkit vala-native xproto" +RDEPENDS_${PN} = "upower dbus-x11" + +SRC_URI = "${SOURCEFORGE_MIRROR}/lxde/lxsession-${PV}.tar.xz" +SRC_URI += "file://0001-replace-use-of-UniqueApp-with-GtkApplication.patch" +SRC_URI += "file://0002-GTK-3-GtkObject-no-longer-exists.patch" +SRC_URI[md5sum] = "823c50e6d0e4ce15a23a42e8f8bf4221" +SRC_URI[sha256sum] = "90bf42a45421f45f2c745d60f2c730176e1472642451c06c2ab07dcebdaf1fa8" + +PACKAGECONFIG ?= "gtk3" +PACKAGECONFIG[gtk3] = "--enable-gtk3,,gtk+3" +python __anonymous () { + depends = d.getVar("DEPENDS", d, 1) + if 'gtk3' not in d.getVar('PACKAGECONFIG', True): + d.setVar("DEPENDS", "%s gtk+" % depends) +} + +inherit autotools pkgconfig gettext gobject-introspection + +FILES_${PN} += "${datadir}/lxsession" -- cgit v1.2.3