aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2020-11-20 15:36:17 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2020-11-20 15:36:17 +0000
commitd64c95735b95058b383be0fcdde6a59bf4ce497e (patch)
tree9d44dafcef698b589e48019fc9cb0e59b52fbb40
parent46c2c2554f2aad4fed496de9ff5bd6369b654faa (diff)
downloadaports-d64c95735b95058b383be0fcdde6a59bf4ce497e.tar.gz
aports-d64c95735b95058b383be0fcdde6a59bf4ce497e.tar.bz2
aports-d64c95735b95058b383be0fcdde6a59bf4ce497e.tar.xz
community/menu-cache: upgrade to 1.1.0
-rw-r--r--community/menu-cache/APKBUILD22
-rw-r--r--community/menu-cache/menu-cache-1.1.0-0001-Support-gcc10-compilation.patch108
2 files changed, 116 insertions, 14 deletions
diff --git a/community/menu-cache/APKBUILD b/community/menu-cache/APKBUILD
index 98e3c43230..9c1a48ac0d 100644
--- a/community/menu-cache/APKBUILD
+++ b/community/menu-cache/APKBUILD
@@ -1,26 +1,20 @@
# Contributor: Bartłomiej Piotrowski <bpiotrowski@alpinelinux.org>
-# Maintainer:
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=menu-cache
-pkgver=0.5.1
-pkgrel=2
+pkgver=1.1.0
+pkgrel=0
pkgdesc="Caching mechanism for freedesktop.org compliant menus"
arch="all"
license="GPL-2.0+"
url="https://lxde.org/"
-makedepends="glib-dev"
+makedepends="glib-dev libfm-dev"
options="!check libtool" # No test suite.
-source="https://downloads.sourceforge.net/lxde/$pkgname-$pkgver.tar.gz"
+source="https://downloads.sourceforge.net/lxde/menu-cache-$pkgver.tar.xz
+ menu-cache-1.1.0-0001-Support-gcc10-compilation.patch"
subpackages="$pkgname-dev"
-prepare() {
- cd "$builddir"
- update_config_guess
- default_prepare
-}
-
build() {
- cd "$builddir"
./configure \
--prefix=/usr \
--sysconfdir=/etc \
@@ -30,8 +24,8 @@ build() {
}
package() {
- cd "$builddir"
make DESTDIR="$pkgdir" install
}
-sha512sums="44d55a01f5452804e77518c4a2ba400a5b65edbf4061e346a6c02356195867eaa0bb9eaa057fbf603ddf79759acb16632bf3b7ae543eebc1544e28517cd23066 menu-cache-0.5.1.tar.gz"
+sha512sums="e4c6619ade7b9a1b97c1366bb94dffb9975be5664b193cf0c69cf9470ef7ae19bda3390d04d98ee9a5b1658ec48aa5c83508c26c347af689161ee67c076b3c9e menu-cache-1.1.0.tar.xz
+e50671688b00bf20c71fcff4d1cdf063d86d4f39b2e5c9a6a80a3349b27120dc55a35279cc55887064e3f18dd4aa0f81056723692c46f858bcf15414b2b4dab2 menu-cache-1.1.0-0001-Support-gcc10-compilation.patch"
diff --git a/community/menu-cache/menu-cache-1.1.0-0001-Support-gcc10-compilation.patch b/community/menu-cache/menu-cache-1.1.0-0001-Support-gcc10-compilation.patch
new file mode 100644
index 0000000000..29f8e53444
--- /dev/null
+++ b/community/menu-cache/menu-cache-1.1.0-0001-Support-gcc10-compilation.patch
@@ -0,0 +1,108 @@
+From 1ce739649b4d66339a03fc0ec9ee7a2f7c141780 Mon Sep 17 00:00:00 2001
+From: Mamoru TASAKA <mtasaka@fedoraproject.org>
+Date: Fri, 24 Jan 2020 13:33:00 +0900
+Subject: [PATCH] Support gcc10 compilation
+
+gcc10 now defaults to -fno-common, and with gcc10 menu-cache compilation fails like
+
+/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
+/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
+/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
+....
+
+This patch fixes compilation with gcc10: properly declaring variables in header with "extern", and also removing some unneeded variables in header files.
+---
+ menu-cache-gen/menu-tags.h | 55 ++++++++++++--------------------------
+ 1 file changed, 17 insertions(+), 38 deletions(-)
+
+diff --git a/menu-cache-gen/menu-tags.h b/menu-cache-gen/menu-tags.h
+index f3fd7d3..f71c0bc 100644
+--- a/menu-cache-gen/menu-tags.h
++++ b/menu-cache-gen/menu-tags.h
+@@ -22,38 +22,17 @@
+ #include <libfm/fm-extra.h>
+ #include <menu-cache.h>
+
+-FmXmlFileTag menuTag_Menu;
+-FmXmlFileTag menuTag_AppDir;
+-FmXmlFileTag menuTag_DefaultAppDirs;
+-FmXmlFileTag menuTag_DirectoryDir;
+-FmXmlFileTag menuTag_DefaultDirectoryDirs;
+-FmXmlFileTag menuTag_Include;
+-FmXmlFileTag menuTag_Exclude;
+-FmXmlFileTag menuTag_Filename;
+-FmXmlFileTag menuTag_Or;
+-FmXmlFileTag menuTag_And;
+-FmXmlFileTag menuTag_Not;
+-FmXmlFileTag menuTag_Category;
+-FmXmlFileTag menuTag_MergeFile;
+-FmXmlFileTag menuTag_MergeDir;
+-FmXmlFileTag menuTag_DefaultMergeDirs;
+-FmXmlFileTag menuTag_Directory;
+-FmXmlFileTag menuTag_Name;
+-FmXmlFileTag menuTag_Deleted;
+-FmXmlFileTag menuTag_NotDeleted;
+-FmXmlFileTag menuTag_OnlyUnallocated;
+-FmXmlFileTag menuTag_NotOnlyUnallocated;
+-FmXmlFileTag menuTag_All;
+-FmXmlFileTag menuTag_LegacyDir;
+-FmXmlFileTag menuTag_KDELegacyDirs;
+-FmXmlFileTag menuTag_Move;
+-FmXmlFileTag menuTag_Old;
+-FmXmlFileTag menuTag_New;
+-FmXmlFileTag menuTag_Layout;
+-FmXmlFileTag menuTag_DefaultLayout;
+-FmXmlFileTag menuTag_Menuname;
+-FmXmlFileTag menuTag_Separator;
+-FmXmlFileTag menuTag_Merge;
++extern FmXmlFileTag menuTag_AppDir;
++extern FmXmlFileTag menuTag_DirectoryDir;
++extern FmXmlFileTag menuTag_Include;
++extern FmXmlFileTag menuTag_Exclude;
++extern FmXmlFileTag menuTag_Filename;
++extern FmXmlFileTag menuTag_Or;
++extern FmXmlFileTag menuTag_And;
++extern FmXmlFileTag menuTag_Not;
++extern FmXmlFileTag menuTag_Category;
++extern FmXmlFileTag menuTag_All;
++extern FmXmlFileTag menuTag_LegacyDir;
+
+ typedef enum {
+ MERGE_NONE, /* starting value */
+@@ -152,19 +131,19 @@ typedef struct {
+ } MenuRule;
+
+ /* requested language(s) */
+-char **languages;
++extern char **languages;
+
+ /* list of menu files to monitor */
+-GSList *MenuFiles;
++extern GSList *MenuFiles;
+
+ /* list of menu dirs to monitor */
+-GSList *MenuDirs;
++extern GSList *MenuDirs;
+
+ /* list of available app dirs */
+-GSList *AppDirs;
++extern GSList *AppDirs;
+
+ /* list of available dir dirs */
+-GSList *DirDirs;
++extern GSList *DirDirs;
+
+ /* parse and merge menu files */
+ MenuMenu *get_merged_menu(const char *file, FmXmlFile **xmlfile, GError **error);
+@@ -177,7 +156,7 @@ gboolean save_menu_cache(MenuMenu *layout, const char *menuname, const char *fil
+ void _free_layout_items(GList *data);
+
+ /* verbosity level */
+-gint verbose;
++extern gint verbose;
+
+ #define DBG if (verbose) g_debug
+ #define VDBG if (verbose > 1) g_debug
+--
+2.24.1
+