Skip to contentSkip to conversation

open-isns: Fix build with musl

PATCH In review Khem Raj 2 participants 6 messages Dec 14, 2017 – Dec 18, 2017

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/5 open-isns: Fix build with musl

---
 ....h-endian.h-is-available-on-musl-on-linux.patch | 38 ++++++++++++++++++++++
 .../recipes-support/open-isns/open-isns_0.97.bb    |  6 ++--
 2 files changed, 41 insertions(+), 3 deletions(-)
 create mode 100644 meta-networking/recipes-support/open-isns/open-isns/0001-util.h-endian.h-is-available-on-musl-on-linux.patch
meta-networking/recipes-support/open-isns/open-isns/0001-util.h-endian.h-is-available-on-musl-on-linux.patch new file +38 -0
new file mode 100644
index 000000000..825e2bf6a
@@ -0,0 +1,38 @@
+From e0d86318227a23f00cf0f6639a6685bb9f5771a1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 12 Dec 2017 09:42:19 -0800
+Subject: [PATCH] util.h: endian.h is available on musl on linux
+
+just checking for glibc alone is not enough since
+it excludes musl, therefore check for platform
+being linux as well
+
+Fixes build issues
+
+include/libisns/util.h:114:12: fatal error: sys/endian.h: No such file or directory
+ #  include <sys/endian.h>
+            ^~~~~~~~~~~~~~
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Submitted
+
+ include/libisns/util.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/libisns/util.h b/include/libisns/util.h
+index 9a2bd13..6cc1a1b 100644
+--- a/include/libisns/util.h
++++ b/include/libisns/util.h
+@@ -100,7 +100,7 @@ enum {
+  * There's no htonll yet
+  */
+ #ifndef htonll
+-# ifdef __GLIBC__
++# if defined(__GLIBC__) || defined(__linux__)
+ #  include <endian.h>
+ #  include <byteswap.h>
+ #  if __BYTE_ORDER == __BIG_ENDIAN
+-- 
+2.15.1
+
meta-networking/recipes-support/open-isns/open-isns_0.97.bb +3 -3
index 9ee1f87c8..abfa7510e 100644
@@ -13,9 +13,9 @@ SECTION = "net"
 
 DEPENDS = "openssl"
 
-SRC_URI = " \
-    git://github.com/open-iscsi/open-isns \
-"
+SRC_URI = "git://github.com/open-iscsi/open-isns \
+           file://0001-util.h-endian.h-is-available-on-musl-on-linux.patch \
+           "
 
 SRCREV ?= "09954404e948e41eb0fce8e28836018b4ce3d20d"
 
Signature · 1 line
2.15.1
author
#1 lore raw

PATCH 2/5 gtk-xfce-engine: Fix build with glib-2.0 > 2.53

Fixes errors like
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd6 in position 980: invalid continuation byte Makefile:737: recipe for target 'xfce_typebuiltin.h' failed

---
 .../gtk-xfce-engine/glib-2.54-ftbfs.patch          | 23 ++++++++++++++++++++++
 .../gtk-xfce-engine/gtk-xfce-engine_3.2.0.bb       |  2 ++
 2 files changed, 25 insertions(+)
 create mode 100644 meta-xfce/recipes-xfce/gtk-xfce-engine/gtk-xfce-engine/glib-2.54-ftbfs.patch
meta-xfce/recipes-xfce/gtk-xfce-engine/gtk-xfce-engine/glib-2.54-ftbfs.patch new file +23 -0
new file mode 100644
index 000000000..fb8910204
@@ -0,0 +1,23 @@
+Description: Fix FTBFS with glib 2.54
+ glib-mkenums now expects input files to be UTF-8,
+ fix the encoding of libgnomeui/gnome-scores.h
+Author: Adrian Bunk <[email protected]>
+
+ported from: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=870738
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+
+Index: gtk-xfce-engine-3.2.0/gtk-3.0/xfce_style_types.h
+===================================================================
+--- gtk-xfce-engine-3.2.0.orig/gtk-3.0/xfce_style_types.h
++++ gtk-xfce-engine-3.2.0/gtk-3.0/xfce_style_types.h
+@@ -19,7 +19,7 @@
+  *
+  *  Portions based Thinice port by 
+  *                       Tim Gerla <[email protected]>,
+- *                       Tomas �gren <[email protected],
++ *                       Tomas Ögren <[email protected]>,
+  *                       Richard Hult <[email protected]>
+  *  Portions based on Smooth theme by
+  *                       Andrew Johnson <[email protected]>
meta-xfce/recipes-xfce/gtk-xfce-engine/gtk-xfce-engine_3.2.0.bb +2 -0
index ae7f99f5a..ef4f4bfa8 100644
@@ -8,6 +8,8 @@ inherit xfce distro_features_check
 
 REQUIRED_DISTRO_FEATURES = "x11"
 
+SRC_URI += "file://glib-2.54-ftbfs.patch"
+
 SRC_URI[md5sum] = "363d6c16a48a00e26d45c45c2e1fd739"
 SRC_URI[sha256sum] = "875c9c3bda96faf050a2224649cc42129ffb662c4de33add8c0fd1fb860b47ed"
 
Signature · 1 line
2.15.1
author
#3 lore raw

PATCH 3/5 glade: Fix build with glib-2.0 > 2.53.4

In reply to Khem Raj

Fixes
| ../../glade-3.20.0/gladeui/glade-signal-model.c:68:1: error: conflicting types for 'g_ptr_array_find' | g_ptr_array_find (GPtrArray *array, gpointer data)

---
 .../0001-Use-g_ptr_array_find-from-GLib.patch      | 93 ++++++++++++++++++++++
 meta-oe/recipes-devtools/glade/glade_3.20.0.bb     |  1 +
 2 files changed, 94 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/glade/glade/0001-Use-g_ptr_array_find-from-GLib.patch
meta-oe/recipes-devtools/glade/glade/0001-Use-g_ptr_array_find-from-GLib.patch new file +93 -0
new file mode 100644
index 000000000..d2071f5d2
@@ -0,0 +1,93 @@
+
+m 8a73d114ca5b4d37a770d0b6b69dd17a366dbcf4 Mon Sep 17 00:00:00 2001
+From: Jonh Wendell <[email protected]>
+Date: Thu, 4 May 2017 11:05:48 -0300
+Subject: Use g_ptr_array_find() from GLib
+
+https://bugzilla.gnome.org/show_bug.cgi?id=782161
+---
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <[email protected]>
+
+ configure.ac                 |  2 ++
+ gladeui/glade-signal-model.c | 30 ++++++++++--------------------
+ 2 files changed, 12 insertions(+), 20 deletions(-)
+
+Index: glade-3.20.0/configure.ac
+===================================================================
+--- glade-3.20.0.orig/configure.ac
++++ glade-3.20.0/configure.ac
+@@ -146,8 +146,10 @@ dnl ====================================
+ dnl Check for gtk+
+ dnl ================================================================
+ GTK_REQUIRED=3.20.0
++GLIB_REQUIRED=2.53.2
+ PKG_CHECK_MODULES([GTK],[
+   gtk+-3.0 >= $GTK_REQUIRED
++  glib-2.0 >= $GLIB_REQUIRED
+   gmodule-2.0
+   libxml-2.0 >= 2.4.0
+ ])
+Index: glade-3.20.0/gladeui/glade-signal-model.c
+===================================================================
+--- glade-3.20.0.orig/gladeui/glade-signal-model.c
++++ glade-3.20.0/gladeui/glade-signal-model.c
+@@ -64,18 +64,6 @@ G_DEFINE_TYPE_WITH_CODE (GladeSignalMode
+                          G_IMPLEMENT_INTERFACE (GTK_TYPE_TREE_DRAG_SOURCE,
+                                                 gtk_tree_drag_source_iface_init))
+ 
+-static gint
+-g_ptr_array_find (GPtrArray *array, gpointer data)
+-{
+-  gint i;
+-  for (i = 0; i < array->len; i++)
+-    {
+-      if (array->pdata[i] == data)
+-	return i;
+-    }
+-  return -1;
+-}
+-
+ static void
+ glade_signal_model_init (GladeSignalModel *object)
+ {
+@@ -524,13 +512,11 @@ glade_signal_model_get_path (GtkTreeMode
+ 	    {
+ 	      if (handlers)
+ 		{
+-		  gint handler_index = g_ptr_array_find (handlers, handler);
+-		  if (handler_index == -1) /* dummy handler */
+-		    {
+-		      index1 += handlers->len;
+-		    }
+-		  else
++		  guint handler_index;
++		  if (g_ptr_array_find (handlers, handler, &handler_index))
+ 		    index1 += handler_index;
++		  else
++		    index1 += handlers->len;
+ 		}
+ 	      break;
+ 	    }
+@@ -582,7 +568,8 @@ glade_signal_model_get_value (GtkTreeMod
+         {
+           GPtrArray *handlers = g_hash_table_lookup (sig_model->priv->signals,
+                                                      glade_signal_get_name (signal));
+-          if (!handlers || !handlers->len || g_ptr_array_find (handlers, signal) == 0)
++          guint index;
++          if (!handlers || !handlers->len || (g_ptr_array_find (handlers, signal, &index) && index == 0))
+             g_value_set_boolean (value, TRUE);
+           else
+             g_value_set_boolean (value, FALSE);
+@@ -718,7 +705,10 @@ glade_signal_model_iter_next (GtkTreeMod
+ 	}
+       else if (handlers)
+ 	{
+-	  gint new_index = g_ptr_array_find (handlers, handler) + 1;
++	  guint new_index = 0;
++	  if (g_ptr_array_find (handlers, handler, &new_index))
++	    new_index++;
++
+ 	  if (new_index < handlers->len)
+ 	    {
+ 	      glade_signal_model_create_signal_iter (sig_model, widget,
meta-oe/recipes-devtools/glade/glade_3.20.0.bb +1 -0
index f33b6e31b..ff6dcce26 100644
@@ -13,6 +13,7 @@ inherit autotools pkgconfig gnomebase gobject-introspection
 
 SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/glade/3.20/glade-${PV}.tar.xz \
            file://remove-yelp-help-rules-var.patch \
+           file://0001-Use-g_ptr_array_find-from-GLib.patch \
           "
 SRC_URI[md5sum] = "9964a2da14c5f845eae363889586ca43"
 SRC_URI[sha256sum] = "82d96dca5dec40ee34e2f41d49c13b4ea50da8f32a3a49ca2da802ff14dc18fe"
Signature · 1 line
2.15.1
author
#4 lore raw

PATCH 4/5 libgnome: Fix invalid UTF-8 in header

In reply to Khem Raj
---
 .../libgnome/libgnome/05_fix_invalid_utf8.patch    | 26 ++++++++++++++++++++++
 .../recipes-gnome/libgnome/libgnome_2.32.1.bb      |  4 +++-
 2 files changed, 29 insertions(+), 1 deletion(-)
 create mode 100644 meta-gnome/recipes-gnome/libgnome/libgnome/05_fix_invalid_utf8.patch
meta-gnome/recipes-gnome/libgnome/libgnome/05_fix_invalid_utf8.patch new file +26 -0
new file mode 100644
index 000000000..cd90b8ed9
@@ -0,0 +1,26 @@
+From 33313713c4f5c1de500859ff128d6fd7e3af5722 Mon Sep 17 00:00:00 2001
+From: Colin Walters <[email protected]>
+Date: Mon, 7 Aug 2017 12:57:43 -0400
+Subject: gnome-config.h: Fix invalid UTF-8 in header
+
+This breaks the new Python `glib-mkenums`.
+---
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+
+ libgnome/gnome-config.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libgnome/gnome-config.h b/libgnome/gnome-config.h
+index 0c3dfe6..b9d659d 100644
+--- a/libgnome/gnome-config.h
++++ b/libgnome/gnome-config.h
+@@ -270,7 +270,7 @@ void gnome_config_clean_key_ (const char *path, gboolean priv);
+ #define gnome_config_private_clean_key(path) \
+ 	(gnome_config_clean_key_((path),TRUE))
+ 
+-/* returns the true filename of the config file�*/
++/* returns the true filename of the config file */
+ #define gnome_config_get_real_path(path) \
+ 	(g_build_filename (gnome_user_dir_get(),(path),NULL))
+ #define gnome_config_private_get_real_path(path) \
meta-gnome/recipes-gnome/libgnome/libgnome_2.32.1.bb +3 -1
index 0055ba4a3..94fcf2e8c 100644
@@ -9,7 +9,9 @@ PR = "r2"
 
 SRC_URI[archive.md5sum] = "a4345e6087ae6195d65a4674ffdca559"
 SRC_URI[archive.sha256sum] = "b2c63916866485793b87398266dd7778548c1734923c272a94d84ee011b6f7a4"
-SRC_URI += "file://0001-libgnome-Makefile.am-allow-deprecated-symbols.patch"
+SRC_URI += "file://0001-libgnome-Makefile.am-allow-deprecated-symbols.patch \
+            file://05_fix_invalid_utf8.patch \
+"
 GNOME_COMPRESS_TYPE="bz2"
 
 DEPENDS += "libcanberra gconf-native gnome-vfs libbonobo esound intltool-native gnome-common-native"
Signature · 1 line
2.15.1
author
#5 lore raw

PATCH 5/5 libgnomeui: Fix build with newer glib-2.0

In reply to Khem Raj
---
 .../libgnome/libgnomeui/05_fix_invalid_utf8.patch   | 21 +++++++++++++++++++++
 .../recipes-gnome/libgnome/libgnomeui_2.24.5.bb     |  1 +
 2 files changed, 22 insertions(+)
 create mode 100644 meta-gnome/recipes-gnome/libgnome/libgnomeui/05_fix_invalid_utf8.patch
meta-gnome/recipes-gnome/libgnome/libgnomeui/05_fix_invalid_utf8.patch new file +21 -0
new file mode 100644
index 000000000..bb09b4795
@@ -0,0 +1,21 @@
+Description: Fix FTBFS with glib 2.54
+ glib-mkenums now expects input files to be UTF-8,
+ fix the encoding of libgnomeui/gnome-scores.h
+Author: Adrian Bunk <[email protected]>
+
+Signed-off-by: Khem Raj <[email protected]>
+Upstream-Status: Pending
+
+Index: libgnomeui-2.24.5/libgnomeui/gnome-scores.h
+===================================================================
+--- libgnomeui-2.24.5.orig/libgnomeui/gnome-scores.h
++++ libgnomeui-2.24.5/libgnomeui/gnome-scores.h
+@@ -27,7 +27,7 @@
+  * "High Scores" Widget 
+  *
+  * AUTHOR: 
+- * Horacio J. Pe�a <[email protected]>
++ * Horacio J. Peña <[email protected]>
+  *
+  * This is free software (under the terms of the GNU LGPL)
+  *
meta-gnome/recipes-gnome/libgnome/libgnomeui_2.24.5.bb +1 -0
index 45219d4d7..b78ffc505 100644
@@ -17,6 +17,7 @@ SRC_URI += " \
     file://0001-suppress-string-format-literal-warning-to-fix-build-.patch \
     file://gnome-stock-pixbufs.h \
     file://no-pixbuf-csource.patch \
+    file://05_fix_invalid_utf8.patch \
 "
 SRC_URI[archive.md5sum] = "d4bb506b1916015323928faab5aa708b"
 SRC_URI[archive.sha256sum] = "ae352f2495889e65524c979932c909f4629a58e64290fb0c95333373225d3c0f"
Signature · 1 line
2.15.1
#2 lore raw

Re: [meta-xfce][PATCH 2/5] gtk-xfce-engine: Fix build with glib-2.0 > 2.53

In reply to Khem Raj
Quoted 6 lines · Khem Raj

Fixes errors like
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd6 in position 980:
invalid continuation byte
Makefile:737: recipe for target 'xfce_typebuiltin.h' failed

Seems patch 2-5 of this series did not make it into patchwork (->

master-next).

Andreas