summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2020-05-12 17:14:14 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-05-14 14:15:11 +0100
commite324a20ea15036bab78131761d172d45fe7e98f4 (patch)
treed2338d63760efeacaba2917dd6319e4c38424bb7 /meta/recipes-graphics
parent0308e5082a1186daaa63d5f5006c3b5f76922566 (diff)
downloadpoky-e324a20ea15036bab78131761d172d45fe7e98f4.tar.gz
menu-cache: Replace -fcommon with fix
(From OE-Core rev: 97984f171b562f4ccaef527e6766b0e94697cf43) Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics')
-rw-r--r--meta/recipes-graphics/menu-cache/files/0001-Support-gcc10-compilation.patch111
-rw-r--r--meta/recipes-graphics/menu-cache/menu-cache_1.1.0.bb6
2 files changed, 114 insertions, 3 deletions
diff --git a/meta/recipes-graphics/menu-cache/files/0001-Support-gcc10-compilation.patch b/meta/recipes-graphics/menu-cache/files/0001-Support-gcc10-compilation.patch
new file mode 100644
index 0000000000..aeae864cd4
--- /dev/null
+++ b/meta/recipes-graphics/menu-cache/files/0001-Support-gcc10-compilation.patch
@@ -0,0 +1,111 @@
1From 1ce739649b4d66339a03fc0ec9ee7a2f7c141780 Mon Sep 17 00:00:00 2001
2From: Mamoru TASAKA <mtasaka@fedoraproject.org>
3Date: Fri, 24 Jan 2020 13:33:00 +0900
4Subject: Support gcc10 compilation
5
6gcc10 now defaults to -fno-common, and with gcc10 menu-cache compilation fails like
7
8/bin/ld: menu-merge.o:menu-cache-gen/menu-tags.h:167: multiple definition of `DirDirs'; main.o:menu-cache-gen/menu-tags.h:167: first defined here
9/bin/ld: menu-merge.o:menu-cache-gen/menu-tags.h:164: multiple definition of `AppDirs'; main.o:menu-cache-gen/menu-tags.h:164: first defined here
10/bin/ld: menu-merge.o:menu-cache-gen/menu-tags.h:52: multiple definition of `menuTag_Layout'; main.o:menu-cache-gen/menu-tags.h:52: first defined here
11....
12
13This patch fixes compilation with gcc10: properly declaring variables in header with "extern", and also removing some unneeded variables in header files.
14
15Upstream-Status: Submitted [https://github.com/lxde/menu-cache/pull/19]
16Signed-off-by: Adrian Bunk <bunk@stusta.de>
17---
18 menu-cache-gen/menu-tags.h | 55 ++++++++++++--------------------------
19 1 file changed, 17 insertions(+), 38 deletions(-)
20
21diff --git a/menu-cache-gen/menu-tags.h b/menu-cache-gen/menu-tags.h
22index f3fd7d3..f71c0bc 100644
23--- a/menu-cache-gen/menu-tags.h
24+++ b/menu-cache-gen/menu-tags.h
25@@ -22,38 +22,17 @@
26 #include <libfm/fm-extra.h>
27 #include <menu-cache.h>
28
29-FmXmlFileTag menuTag_Menu;
30-FmXmlFileTag menuTag_AppDir;
31-FmXmlFileTag menuTag_DefaultAppDirs;
32-FmXmlFileTag menuTag_DirectoryDir;
33-FmXmlFileTag menuTag_DefaultDirectoryDirs;
34-FmXmlFileTag menuTag_Include;
35-FmXmlFileTag menuTag_Exclude;
36-FmXmlFileTag menuTag_Filename;
37-FmXmlFileTag menuTag_Or;
38-FmXmlFileTag menuTag_And;
39-FmXmlFileTag menuTag_Not;
40-FmXmlFileTag menuTag_Category;
41-FmXmlFileTag menuTag_MergeFile;
42-FmXmlFileTag menuTag_MergeDir;
43-FmXmlFileTag menuTag_DefaultMergeDirs;
44-FmXmlFileTag menuTag_Directory;
45-FmXmlFileTag menuTag_Name;
46-FmXmlFileTag menuTag_Deleted;
47-FmXmlFileTag menuTag_NotDeleted;
48-FmXmlFileTag menuTag_OnlyUnallocated;
49-FmXmlFileTag menuTag_NotOnlyUnallocated;
50-FmXmlFileTag menuTag_All;
51-FmXmlFileTag menuTag_LegacyDir;
52-FmXmlFileTag menuTag_KDELegacyDirs;
53-FmXmlFileTag menuTag_Move;
54-FmXmlFileTag menuTag_Old;
55-FmXmlFileTag menuTag_New;
56-FmXmlFileTag menuTag_Layout;
57-FmXmlFileTag menuTag_DefaultLayout;
58-FmXmlFileTag menuTag_Menuname;
59-FmXmlFileTag menuTag_Separator;
60-FmXmlFileTag menuTag_Merge;
61+extern FmXmlFileTag menuTag_AppDir;
62+extern FmXmlFileTag menuTag_DirectoryDir;
63+extern FmXmlFileTag menuTag_Include;
64+extern FmXmlFileTag menuTag_Exclude;
65+extern FmXmlFileTag menuTag_Filename;
66+extern FmXmlFileTag menuTag_Or;
67+extern FmXmlFileTag menuTag_And;
68+extern FmXmlFileTag menuTag_Not;
69+extern FmXmlFileTag menuTag_Category;
70+extern FmXmlFileTag menuTag_All;
71+extern FmXmlFileTag menuTag_LegacyDir;
72
73 typedef enum {
74 MERGE_NONE, /* starting value */
75@@ -152,19 +131,19 @@ typedef struct {
76 } MenuRule;
77
78 /* requested language(s) */
79-char **languages;
80+extern char **languages;
81
82 /* list of menu files to monitor */
83-GSList *MenuFiles;
84+extern GSList *MenuFiles;
85
86 /* list of menu dirs to monitor */
87-GSList *MenuDirs;
88+extern GSList *MenuDirs;
89
90 /* list of available app dirs */
91-GSList *AppDirs;
92+extern GSList *AppDirs;
93
94 /* list of available dir dirs */
95-GSList *DirDirs;
96+extern GSList *DirDirs;
97
98 /* parse and merge menu files */
99 MenuMenu *get_merged_menu(const char *file, FmXmlFile **xmlfile, GError **error);
100@@ -177,7 +156,7 @@ gboolean save_menu_cache(MenuMenu *layout, const char *menuname, const char *fil
101 void _free_layout_items(GList *data);
102
103 /* verbosity level */
104-gint verbose;
105+extern gint verbose;
106
107 #define DBG if (verbose) g_debug
108 #define VDBG if (verbose > 1) g_debug
109--
1102.17.1
111
diff --git a/meta/recipes-graphics/menu-cache/menu-cache_1.1.0.bb b/meta/recipes-graphics/menu-cache/menu-cache_1.1.0.bb
index 7a11228ef0..fc4e0a4d84 100644
--- a/meta/recipes-graphics/menu-cache/menu-cache_1.1.0.bb
+++ b/meta/recipes-graphics/menu-cache/menu-cache_1.1.0.bb
@@ -8,7 +8,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0964c689fcf4c21c6797ea87408416b6"
8SECTION = "x11/libs" 8SECTION = "x11/libs"
9DEPENDS = "glib-2.0 libfm-extra" 9DEPENDS = "glib-2.0 libfm-extra"
10 10
11SRC_URI = "${SOURCEFORGE_MIRROR}/lxde/menu-cache-${PV}.tar.xz" 11SRC_URI = "${SOURCEFORGE_MIRROR}/lxde/menu-cache-${PV}.tar.xz \
12 file://0001-Support-gcc10-compilation.patch \
13"
12 14
13SRC_URI[md5sum] = "99999a0bca48b980105208760c8fd893" 15SRC_URI[md5sum] = "99999a0bca48b980105208760c8fd893"
14SRC_URI[sha256sum] = "ed02eb459dcb398f69b9fa5bf4dd813020405afc84331115469cdf7be9273ec7" 16SRC_URI[sha256sum] = "ed02eb459dcb398f69b9fa5bf4dd813020405afc84331115469cdf7be9273ec7"
@@ -16,5 +18,3 @@ SRC_URI[sha256sum] = "ed02eb459dcb398f69b9fa5bf4dd813020405afc84331115469cdf7be9
16UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/lxde/files/menu-cache/1.1/" 18UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/lxde/files/menu-cache/1.1/"
17 19
18inherit autotools gettext pkgconfig gtk-doc 20inherit autotools gettext pkgconfig gtk-doc
19
20CFLAGS += "-fcommon"