diff options
| -rw-r--r-- | meta/recipes-graphics/menu-cache/files/0001-Support-gcc10-compilation.patch | 111 | ||||
| -rw-r--r-- | meta/recipes-graphics/menu-cache/menu-cache_1.1.0.bb | 6 |
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 @@ | |||
| 1 | From 1ce739649b4d66339a03fc0ec9ee7a2f7c141780 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Mamoru TASAKA <mtasaka@fedoraproject.org> | ||
| 3 | Date: Fri, 24 Jan 2020 13:33:00 +0900 | ||
| 4 | Subject: Support gcc10 compilation | ||
| 5 | |||
| 6 | gcc10 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 | |||
| 13 | This patch fixes compilation with gcc10: properly declaring variables in header with "extern", and also removing some unneeded variables in header files. | ||
| 14 | |||
| 15 | Upstream-Status: Submitted [https://github.com/lxde/menu-cache/pull/19] | ||
| 16 | Signed-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 | |||
| 21 | diff --git a/menu-cache-gen/menu-tags.h b/menu-cache-gen/menu-tags.h | ||
| 22 | index 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 | -- | ||
| 110 | 2.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" | |||
| 8 | SECTION = "x11/libs" | 8 | SECTION = "x11/libs" |
| 9 | DEPENDS = "glib-2.0 libfm-extra" | 9 | DEPENDS = "glib-2.0 libfm-extra" |
| 10 | 10 | ||
| 11 | SRC_URI = "${SOURCEFORGE_MIRROR}/lxde/menu-cache-${PV}.tar.xz" | 11 | SRC_URI = "${SOURCEFORGE_MIRROR}/lxde/menu-cache-${PV}.tar.xz \ |
| 12 | file://0001-Support-gcc10-compilation.patch \ | ||
| 13 | " | ||
| 12 | 14 | ||
| 13 | SRC_URI[md5sum] = "99999a0bca48b980105208760c8fd893" | 15 | SRC_URI[md5sum] = "99999a0bca48b980105208760c8fd893" |
| 14 | SRC_URI[sha256sum] = "ed02eb459dcb398f69b9fa5bf4dd813020405afc84331115469cdf7be9273ec7" | 16 | SRC_URI[sha256sum] = "ed02eb459dcb398f69b9fa5bf4dd813020405afc84331115469cdf7be9273ec7" |
| @@ -16,5 +18,3 @@ SRC_URI[sha256sum] = "ed02eb459dcb398f69b9fa5bf4dd813020405afc84331115469cdf7be9 | |||
| 16 | UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/lxde/files/menu-cache/1.1/" | 18 | UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/lxde/files/menu-cache/1.1/" |
| 17 | 19 | ||
| 18 | inherit autotools gettext pkgconfig gtk-doc | 20 | inherit autotools gettext pkgconfig gtk-doc |
| 19 | |||
| 20 | CFLAGS += "-fcommon" | ||
